Commit Graph

11 Commits

Author SHA1 Message Date
Georg Baum
99d066de95 * src/frontends/qt4/GuiFontMetrics.C
(GuiFontMetrics::signedWidth): Micropotimization: Avoid a temporary
	docstring


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15755 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-05 18:27:50 +00:00
Michael Schmitt
5d166accfe * qt4/GuiFontMetrics.C: remove qt3 compatibility code
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15594 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-28 16:01:12 +00:00
Abdelrazak Younes
1372f311d3 replace the map based width cache with an array based one.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15585 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-27 22:46:36 +00:00
Abdelrazak Younes
7f94f08bbe * GuiFontMetrics: new metrics(QString) method
* QLPainter::paintText(): use GuiFontMetrics::metrics(QString) to avoid an ucs4 to QString conversion.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15584 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-27 21:27:03 +00:00
André Pönitz
1852693005 do not draw to intermediate pixmap
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15501 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-23 08:46:09 +00:00
Asger Ottar Alstrup
a127d540d3 - LyX is dead slow, so the least we can do is use anti-alised text
- Various micro-optimisations
- Revert Abdel's repaint instead of update for QPainter
- Get rid of unused methods in GuiWorkArea



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15491 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-22 18:49:18 +00:00
Abdelrazak Younes
c7e365365e This commit saves the need to check for lyx::use_gui in a number of places.
* lyx_main.h: define "extern bool lyx::use_gui" here.

* NoGuiFontMetrics.h: new class for command-line LyX

* NoGuiFontLoader.h: new class for command-line LyX

* Application.C:
  - theFontMetrics(): returns the above dummy FontMetrics when use_gui is false.
  - theFontLoader(): returns the above dummy FontLoader when use_gui is false.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15339 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-15 21:47:29 +00:00
Abdelrazak Younes
83ffa28e77 This commit is purely mechanical and get rid of lyx_gui.[Ch].
Only qt4 is guaranted to compile and work. I did not remove gtk and qt3 lyx_gui.C because they might be needed for reference to complete the header declarations in "GuiApplication.C".

 - lyx_gui::use_gui transfered to lyx::use_gui in lyx_main.C
 - all remaining lyx_gui functions transfered to Application and corresponding GuiApplication implementations. 


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15306 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-12 14:10:13 +00:00
Georg Baum
2b477c1f68 remove unused variable
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15268 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-07 17:07:46 +00:00
Abdelrazak Younes
a21259dd02 * qt_helpers:
- ucs4_to_qchar() and qchar_to_ucs4() have been inlined.
  - ucs4_to_qstring(): pass a QString to avoid a copy.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15266 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-07 16:30:26 +00:00
Abdelrazak Younes
00edcc582f This commit is a big rework of the FontLoader/FontMetrics interaction. Only Qt4 for now, I would be grateful is somebody steps up for qt3 and gtk.
Basically, I replaced all methods in the font_metrics namespace by a proper virtual interface FontMetrics. The FontLoader is _the_ container for FontMetrics.

This patch should also bring some optimizations in a number of place in the code. This is because we do not need any more to search for the LyXFont at each font_metrics call. In effect, the speed advantage is not as sensible and this is a bit deceiving considering that this was my primary motivation behind the patch. But I like the patch anyway as it cleans up the relation and interfacing between fonts, metrics and frontends.

* frontends/FontMetrics.h: new virtual interface. Renamed from font_metrics.h

* qt4/GuiFontMetrics: corresponding qt4 implememtation. Renamed from qfont_metrics.C. The smallCaps particular case treatment has been transfered here as well as the width cache for MacOSX and Windows.

* qt4/QLPainter.C: the smallCapsText has been reworked to return the width of the drawn text.C

all other files: replace font_metric helper function call with corresponding FontMetrics method calls.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15265 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-07 16:15:06 +00:00