- enable by default, could be disabled with -Ddisable-pch
- use different pch files for Debug/Release/...
- use only one config_pch.C
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15549 a592a061-630c-0410-9148-cb99ea01b6c8
- only precompile boost and stl headers
- for qt4 also precompile QtGui and QtGui
- don't use one global precomiled header file
to get out of the dependency hell
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15517 a592a061-630c-0410-9148-cb99ea01b6c8
* LyXFunc:
- dispatch(): transfer assertion on lyx_view_ to each LFUN on a case by case basis.
- dispatch(): new LFUN_WINDOW_CLOSE
- getStatus(): special treatment for LFUN_LYX_QUIT
* LyX:
- views_, addLyXView(): deleted
- quit(): call saveGeometry() on each LyXView before exiting.
* GuiApplication:
- is now a QObject.
- quitLyX(): new Qt slot for lastWindowClosed signal.
* Gui.h:
- destroyView(), destroyWorkArea(): deleted
- viewIds(): new method
* GuiImplementation:
- implement above changes.
- GuiImplementation is now a QObject
- cleanupViews(): new private slot.
- buildViewIds(): new helper method
- views_ and work_areas_ are now maps of raw pointers instead of schared_ptr.
* LyXView
- now stores its id.
- dispatch(): special treatment for LFUN_WINDOW_CLOSE.
- workAreaIds(): new method.
- close(): new pure virtual method.
- saveGeometry(): new pure virtual method.
* GuiView:
- implements above changes.
- GuiView(): set WA_DeleteOnClose and Qt::WA_QuitOnClose to let Qt manage the destruction on close().
- closeEvent(): session stuff transfered to saveGeometry()
* WorkArea
- now store its id.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15514 a592a061-630c-0410-9148-cb99ea01b6c8
* src/insets/insetcommandparams.[Ch]:
(operator[]): New, access a parameter
(clear): New, clear all parameters
(info_): New, stire info about this command
(cmdname): Rename to name_
(contents, options, sec_options): Replace with params_. Parameters
are now stored as docstring.
(findInfo): New factor for command info for all commands
(read, write): Use new syntax
(parameter set and get methods): reimplemenmt for new parameter storage
* src/insets/insetcommand.h
(getParam): New, get a parameter
(setParam): New, set a parameter
(parameter set and get methods): Adjust to InsetCommandParams changes
* src/insets/insetbibitem.[Ch]
(write): Remove, not needed anymore
(directWrite): ditto
* src/insets/insetbibitem.C
(InsetBibitem::read): Use InsetCommand::read
* src/insets/insetref.C
(InsetRef::latex): Use new InsetCommandParams interface
* src/mathed/InsetMathHull.C
(InsetMathHull::doDispatch): ditto
* src/text3.C
(LyXText::dispatch): ditto
* src/factory.C
(createInset): Create InsetCommandParams with command name
(readInset): ditto
(readInset): Remove error message for bibitem, since bibitem is
now a normal command inset
* src/buffer.C: Bump file format number
* src/frontends/controllers/ControlCommand.[Ch]
(ControlCommand): take an additional command name parameter
* src/text.C
(readParToken): Remove code for \bibitem
* lib/lyx2lyx/LyX.py: Bump latest file format number
* lib/lyx2lyx/lyx_1_5.py
(convert_bibitem, convert_commandparams): new, convert to new format
(revert_commandparams): new, convert to old format
* development/FORMAT: document new format
* many other files: Adjust to the changes above
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15357 a592a061-630c-0410-9148-cb99ea01b6c8
* src/buffer:
file format incrementation to 251
* src/insets/insetcharstyle.[Ch]:
- make show_label a param and save its state
- let all-insets-toggle togle the label in charstyles
* development/FORMAT:
document file format change
* lib/lyx2lyx/LyX.py:
add new file format
* lib/lyx2lyx/lyx_1_5.py:
remove char style label param on reversion to 250.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15345 a592a061-630c-0410-9148-cb99ea01b6c8
* 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