lyx_mirror/src/frontends
Richard Heck 6e93e77f22 This is one of a series of patches that will merge the layout modules development in personal/branches/rgheck back into the tree.
Design goal: Allow the use of layout "modules", which are to LaTeX packages as layout files are to LaTeX document classes. Thus, one could have a module that defined certain character styles, environments, commands, or what have you, and include it in various documents, each of which uses a different document class, without having to modify the layout files themselves. For example, a theorems.module could be used with article.layout to provide support for theorem-type environments, without having to modify article.layout itself, and the same module could be used with book.layout, etc.

This first patch does some reworking of the infrastructrue. We need to distinguish between the TextClass that a particular document is using and the layout of that document, since modules, in particular, can modify the layout. The solution adopted here is to add a TextClass pointer to BufferParams, which will hold the layout. The layout itself is then constructed from the TextClass the document is using. At present, this is completely trivial, but that will change when modules are added.

The pointer in question is a boost::shared_ptr. This is needed because CutAndPaste saves a copy of the layout with each cut or copied selection. We cannot assume the selection vanishes when the document is closed, so there are two options: (i) keep a list of all the layouts that have ever been used by any document; (ii) used some kind of smart pointer. The latter seems preferable, as the former would waste memory. More importantly, the use of a smart pointer allows modules to be modified on disk and then reloaded while LyX is running, and it will eventually allow the same for layout files.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19756 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-23 16:41:13 +00:00
..
controllers This is one of a series of patches that will merge the layout modules development in personal/branches/rgheck back into the tree. 2007-08-23 16:41:13 +00:00
qt4 This is one of a series of patches that will merge the layout modules development in personal/branches/rgheck back into the tree. 2007-08-23 16:41:13 +00:00
Alert_pimpl.h Whitespace cleanup 2007-05-28 22:27:45 +00:00
alert.cpp Last (?) batch of renames: 2007-04-28 20:44:46 +00:00
alert.h Last (?) batch of renames: 2007-04-28 20:44:46 +00:00
Application.cpp The BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas: 2007-08-21 07:33:46 +00:00
Application.h The BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas: 2007-08-21 07:33:46 +00:00
ChangeLog rename LCursor->Cursor 2007-04-26 14:56:30 +00:00
Clipboard.h Rename .C ==> .cpp for files in src/frontends, part one 2007-04-26 04:02:55 +00:00
Dialogs.cpp cosmetics + move frontends/* to frontend namespace. 2007-08-14 09:54:59 +00:00
Dialogs.h cosmetics + move frontends/* to frontend namespace. 2007-08-14 09:54:59 +00:00
FileDialog.h Whitespace cleanup 2007-05-28 22:27:45 +00:00
FontLoader.h rename LyXFont to Font except in tex2lyx 2007-04-29 18:17:15 +00:00
FontMetrics.h rename LyXFont to Font except in tex2lyx 2007-04-29 18:17:15 +00:00
Gui.h The BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas: 2007-08-21 07:33:46 +00:00
key_state.h
KeySymbol.h rename LyXKeySym into KeySymbol 2007-04-27 08:43:38 +00:00
LyXView.cpp This is one of a series of patches that will merge the layout modules development in personal/branches/rgheck back into the tree. 2007-08-23 16:41:13 +00:00
LyXView.h header cleanup 2007-08-23 16:31:58 +00:00
Makefile.am delete unneeded Menubar virtual interface. 2007-08-23 12:54:35 +00:00
mouse_state.h
NoGuiFontLoader.h rename LyXFont to Font except in tex2lyx 2007-04-29 18:17:15 +00:00
NoGuiFontMetrics.h Whitespace cleanup 2007-05-28 22:27:45 +00:00
Painter.cpp Whitespace cleanup 2007-05-28 22:27:45 +00:00
Painter.h rename LyXFont to Font except in tex2lyx 2007-04-29 18:17:15 +00:00
pch.h
Selection.h Rename .C ==> .cpp for files in src/frontends, part one 2007-04-26 04:02:55 +00:00
Toolbars.cpp This is one of a series of patches that will merge the layout modules development in personal/branches/rgheck back into the tree. 2007-08-23 16:41:13 +00:00
Toolbars.h This is one of a series of patches that will merge the layout modules development in personal/branches/rgheck back into the tree. 2007-08-23 16:41:13 +00:00
WorkArea.cpp Put LyXView on a diet, step 2: get rid of menubar direct access from the core. Menubar handling is a frontend thing. 2007-08-23 12:44:21 +00:00
WorkArea.h The BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas: 2007-08-21 07:33:46 +00:00