lyx_mirror/development
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
..
cmake adjust tex2lyx cmake build 2007-08-22 23:33:14 +00:00
Code_rules Whitespace, only whitespace. Part II. 2004-10-28 14:35:53 +00:00
lyx3 major cleanup of this totally outdated file 2006-07-14 08:30:26 +00:00
lyxserver Whitespace, only whitespace. Part II. 2004-10-28 14:35:53 +00:00
MacOSX also install en.lproj file in the bundle on the mac 2007-08-12 17:49:50 +00:00
misc some scripts I fouind usefule when working on LyX 2006-10-21 07:05:52 +00:00
qmake Biblio.{h,cpp} --> BiblioInfo.{h,cpp} 2007-08-20 17:04:36 +00:00
scons 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
tools Convert kmap files from LaTeX commands to unicode as discussed last week 2007-03-31 16:07:05 +00:00
Win32 installer: sync with branch 2007-08-21 00:01:08 +00:00
boostworkaround.txt a couple of useful files 2002-05-21 23:58:52 +00:00
ChangeLog Michael's installer patch 2006-03-13 10:55:56 +00:00
FORMAT Further inset configurability, moving charstyle stuff to collapsable 2007-08-18 23:26:07 +00:00
gettext.patch update to gettext 0.10.40 2001-10-08 14:36:39 +00:00
lazy_lyxtext.txt Ensure that the last line of text files ends with a newline. 2006-01-19 00:40:38 +00:00
lyx.rpm.README * lyx.rpm.README: remove mentioning of qt3 2006-10-21 08:55:17 +00:00
lyx.spec.in * development/lyx.spec.in: remove not unneeded sourcing of /etc/profile 2006-05-13 13:09:46 +00:00
Makefile.am Rename development/cmake/README.cmake to INSTALL.cmake 2007-07-11 07:27:56 +00:00
Seminar.txt Ensure that the last line of text files ends with a newline. 2006-01-19 00:40:38 +00:00
TodoPlan-1.3 remove references to Qt3/Gtk 2006-10-30 21:45:37 +00:00