On Wed, Aug 22, 2007 at 07:03:50PM -0400, Richard Heck wrote:
> 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.

Sounds nice.

> 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.
> 
> The action is in BufferParams.{h,cpp}. Everything else is pretty much 
> adapting to the new interface.
> 
> Comments welcome, as well as comment on whether it is OK to commit to trunk.

The file TextClass_sptr.h seems to be missing from the patch?

Andre'

Reply via email to