* 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
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
export (e.g. the ToC) and the navigate menu.
* src/insets/insetbase.h
(InsetBase::plaintext): output to a docstream
(InsetBase::textString): ditto
* src/mathed/TextPainter.h
(TextPainter::show): ditto
* src/support/docstream.[Ch] New file and string streams for
docstring. The file streams convert to UTF8 on the fly.
* many more files: Adjust to the changes above
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15301 a592a061-630c-0410-9148-cb99ea01b6c8
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
* frontends/FontLoader.h: new interface class.
* frontends/Application.h: new FontLoader() pure virtual method
* frontends/lyx_gui: update_fonts() and font_available() methods deleted
* [qt3/qt4/gtk]/GuiApplication: implement the new interface
* qt4/GuiFontLoader:
- renamed from FontLoader
- now derives from FontLoader
- now in the lyx::frontend namespace
* qt3/qfont_loader
- now derives from FontLoader
* gtk/xftFontLoader
- now derives from FontLoader
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15220 a592a061-630c-0410-9148-cb99ea01b6c8
virtual std::string const romanFontName() = 0;
virtual std::string const sansFontName() = 0;
virtual std::string const typewriterFontName() = 0;
My goal is to transfer all of "frontends/*/lyx_gui.C" to "frontends/lyx_gui.C". When this is done, "frontends/lyx_gui.C" can go altogether as its functions will then be replaced with direct calls to theApp->XXX().
* frontends/lyx_gui.C: new file with code transfered from [qt3,qt4,gtk]/lyx_gui.C
* frontends/Application: 3 new font related pure virtual methods
* [qt3,qt4,gtk]/GuiApplication: implement the above method with code transfered from lyx_gui.C
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15208 a592a061-630c-0410-9148-cb99ea01b6c8
These font related functions were identical for qt3 and qt4. They are not Qt dependent at all and could also apply to an eventual Win32 or MacOSX gtk port.
Jen-Marc says: It would be nice to convince fontconfig to do the same for linux.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15196 a592a061-630c-0410-9148-cb99ea01b6c8
* src/support/docstring.[Ch]
(from_ascii): new conversion function
(from_utf8): new conversion function
(to_utf8): new conversion function
(operator==) new, compare docstring and ASCII C string
(operator!=) new, compare docstring and ASCII C string
* src/support/Makefile.am: add new file docstring.C
* development/scons/scons_manifest.py: ditto
* src/funcrequest.[Ch]
(argument): change name to argument_ and type to docstring,
add an accessor
(FuncRequest): Add two new constructors taking a docstring argument
* all other files: adjust to the FuncRequest changes above
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14861 a592a061-630c-0410-9148-cb99ea01b6c8
* INSTALL.scons: stop lyx1.4.x/qt2 support
* development/scons/scons_manifest.py: list of all filenames
* development/scons/SConstruct: use explicit file list
* development/scons/scons_utils.py: remove globFiles
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14634 a592a061-630c-0410-9148-cb99ea01b6c8