Commit Graph

16 Commits

Author SHA1 Message Date
Lars Gullik Bjønnes
26f336769a Remove warnings reported with gcc 4.3:
- Modifier on return type ignored
	- Ambigous else
	- Ambigous logical operators
	- Semi-colon instead of empty block
	- Missing header files
	- Missing using std::XX
	- Initialization out of order


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20304 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-16 10:36:57 +00:00
Richard Heck
2499fdf7f5 This is the last of a series of patches that merges 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 patch adds the GUI for managing modules.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20282 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-15 01:55:09 +00:00
André Pönitz
94e61a3bc9 shuffle some frontend stuff around. merge controller(base) and "Kernel". Make frontend::Dialog pure virtual
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20202 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-10 22:32:59 +00:00
André Pönitz
d21894949b make Controller a standalone class.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20161 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-08 21:16:54 +00:00
Richard Heck
d7a33bc841 This patch continues 19964. It takes advantage of the work there to simplify a few things elsewhere. First, in ControlDocument::dispatchParams(), we're setting the TextClass and then dispatching the BufferParams, which sets it again now. So we can get rid of the first call. This, however, requires loading the TextClass somewhere other than LFUN_TEXTCLASS_APPLY, which I do in BufferParams::setBaseClass(), which is when you'd actually need to do it. So I've moved some of the loading logic there. (It seemed a good idea to make setBaseClass() return whether it was successful, then, though this isn't used at the moment.)
That makes another simplification both possible and desirable. For some reason, whenever you change the Document Class combobox in Document Settings, LyX tries to read whatever you choose _before_ you try to hit "Apply". Why? I see no good reason. You get the warning earlier that way, but maybe you weren't going to try to load it anyway and were going to change your mind. So I have removed that behavior, in which case you'll get the warning when you try to apply the parameters. This means we can also remove ControlDocument::loadTextclass().

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19965 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-01 04:03:24 +00:00
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
Lars Gullik Bjønnes
897436efbb Whitespace cleanup
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18550 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-28 22:27:45 +00:00
Abdelrazak Younes
9e371e2a24 Fix gcc warning and be 64 bit clean.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18312 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-14 16:41:50 +00:00
Abdelrazak Younes
06099a8959 restore cursor position in preamble.
* ControlDocument::id(): new method returning the id of the current buffer.

* PreambleModule: new class for the preamble module. Handle everything preamble related, including memorizing the cursor position for each Buffer.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18307 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-14 12:09:14 +00:00
Abdelrazak Younes
9ed920f62a revert 18186: this cannot be done right now because of the way LFUN_BUFFER_PARAMS_APPLY is implemented.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18187 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-03 14:47:22 +00:00
Abdelrazak Younes
696b6a2167 Fix interface problem in order to cleanly support "cursor position memory" in the preamble editor.
* ControlDocument::params(): replace BufferParams local copy with Buffer::params() direct access.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18186 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-03 14:20:12 +00:00
André Pönitz
40e4ab9bf3 distribute content sof tex-strings.cpp to their respective unique places of usage
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18130 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-30 21:01:24 +00:00
André Pönitz
6add1994c7 rename LyXTextClass* into TextClass*
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18097 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-29 19:53:54 +00:00
André Pönitz
5008ee540f rename LColor into Color
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18046 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-26 17:34:20 +00:00
Bo Peng
00e305c9d9 Rename .C ==> .cpp for files in src, part one
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18018 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-26 04:41:58 +00:00
Bo Peng
8d850dcb7e Rename .C => .cpp for files in src/frontends/controllers, step 2
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18000 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-25 18:06:07 +00:00