Commit Graph

198 Commits

Author SHA1 Message Date
Stefan Schimanski
5d112c185c * remove the need of an active GuiView
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23718 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-14 16:33:16 +00:00
Bo Peng
48f9225e27 Embed: allow the use of embedded layout and class (.cls, .sty) files.
* src/EmbeddedFiles.h|cpp: add validate() function to validate loaded .lyx file.
	* src/LayoutFile.h|cpp: add Layout_Type parameter to addLayoutFile to load an embedded layout.
	* src/BufferParams.h|cpp: read layout from temp directory, then local directory.
	* src/frontends/qt4/GuiDocument.cpp: handle embedded layout type
	* src/LyXFunc.cpp: handle embedded layout when a layout is re-read.
	* src/Buffer.cpp: validate after a buffer is read. handle exceptions properly.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23667 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-11 18:31:38 +00:00
Stefan Schimanski
9d2654311a * restart cursor not only after mouse- and keyboard events, but also after those from the toolbar, menus, etc.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23648 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-10 19:08:03 +00:00
Pavel Sanda
63e712c8a4 LFUN_TOGGLE_CURSOR_FOLLOWS_SCROLLBAR -> LFUN_CURSOR_FOLLOWS_SCROLLBAR_TOGGLE.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23605 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-09 21:23:37 +00:00
Richard Heck
6edb3984bf BaseClassList --> LayoutFileList
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23532 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-07 03:53:21 +00:00
Abdelrazak Younes
9931b0155e typos.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23421 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-04 06:56:13 +00:00
Abdelrazak Younes
cbb7b9a0a4 remove unused variables.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23419 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-03 18:16:11 +00:00
Abdelrazak Younes
c084b71a9b get rid of LFUN_INSET_REFRESH
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23418 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-03 18:06:27 +00:00
Stefan Schimanski
8c4b08920e * bug fix to only do paragraph redraws, not fullscreen
* avoid an extra redraw due to completion when typing


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23349 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-29 09:18:46 +00:00
Richard Heck
2b3bd7b5f4 This is the last of the commits that hopes to enforce the distinction between "layout files" and "document classes" that was introduced by the modules code. For the most part, these changes just refactor code from TextClass between: (a) a TextClass base class; (b) a LayoutFile subclass, which represents the information in a .layout file; and (c) a DocumentClass subclass, which represents the layout information associated with a Buffer---a LayoutFile plus Modules. Methods from TextClass have been apportioned between the three classes depending upon what is needed where, and signatures have been changed where necessary so that the right kind of class is required.
At this point, there are no simple TextClass objects in the main LyX code, and it is impossible to create them, since the TextClass constructor is protected. Only LayoutFile and DocumentClass objects can be constructed, and for the most part these are constructed only by their respective containers: BaseClassList and DocumentClassBundle. There is an exception: LayoutFile does have a public default constructor, but if anyone knows how to make it go away, please do.

There will be one or two more commits along these lines, but these will be simple renamings. For example, BaseClassList should be LayoutFileList.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23343 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-29 02:45:33 +00:00
Richard Heck
2c382f2f47 More work towards type safety regarding TextClass's. A couple bugs have been fixed here, too, discovered along the way.
Note that we no longer rely upon BaseClassList to be sorted. This would allow layout descriptions---such as "article (AMS)"---to be translated, and the ordering of the list in Document>Settings will then follow the translations.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23334 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-28 21:04:55 +00:00
Richard Heck
224e6ad0a3 baseclasslist --> BaseClassList singleton. Prep for further type safety.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23322 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-28 14:49:01 +00:00
Richard Heck
d8a6b5bfd0 Remove TextClassPtr without losing the type safety it provided.
See these threads:
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg136112.html
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg136062.html
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg135997.html
for some background.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23299 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-28 01:42:02 +00:00
Abdelrazak Younes
8c8ff137da Get rid of 'quitting' global variable. It is not needed anymore because all windows are closed in order now and the frontend/core is properly separated.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23280 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-27 12:30:41 +00:00
Abdelrazak Younes
8446d3dbfc Get rid of LyXFunc::closeBuffer()
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23274 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-27 11:05:58 +00:00
Richard Heck
b2475f6625 Replace boost::shared_ptr<TextClass> with a global cache of sorts of the TextClass's used by Buffers---or, more strictly, constructed by BufferParams::makeTextClass(). The action is in TextClass.{h,cpp}.
I've left the typedef in TextClassPtr.h. At the moment, it's kind of silly. But I've left it mostly because it helps to identify where the TextClass's stored in the TextClassBundle are used, and maybe it'd be worth having some sort of strong typedef like the one for BaseClassIndex here.

I need to check whether the textClass_ member of InsetCollapsable is needed now. I think not.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23232 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-25 19:31:31 +00:00
Abdelrazak Younes
0655e4d78f Should Fix crash on exit.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23218 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-25 07:32:02 +00:00
Richard Heck
4c6180d209 Try to make the distinction between base classes and text classes clearer in the code.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23198 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-24 16:59:49 +00:00
Richard Heck
69de04feac Restore Andre's TextClassIndex, but now in the form of BaseClassIndex. It seems worth distinguishing more clearly than we do at the moment between TextClass's and BaseClass's. The latter correspond to *.layout files; the former are based upon *.layout files but may be modified by modules.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23197 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-24 16:29:40 +00:00
Richard Heck
ebd4f002af Andre's s/getBaseClass/baseClass/ cleanup.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23191 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-24 15:12:41 +00:00
Richard Heck
0362c6aae7 Andre's s/getTextClass/textClass/ cleanup.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23190 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-24 15:06:35 +00:00
Richard Heck
2e7d1199df Revert 23154.
Sorry, Andre, but this broke not only the modules stuff but the general handling of TextClasses. I'm not opposed to doing this sort of thing, but it's going to be a little more complicated. I'll do it when I get a bit of time, or I can explain what the issue is here if you want to do it.

I'll separately re-commit some of the cleanup here.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23189 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-24 14:59:23 +00:00
Bo Peng
1aaa96e6f1 Load local textclass in addTextClass(), reload local layout correctly in LFUN_TEXTCLASS_APPLY and LFUN_TEXTCLASS_LOAD
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23175 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-24 06:14:48 +00:00
Abdelrazak Younes
ee4dcf105a fix crash on quit with Ctr-Q. Patch by Horst Schirmeier (see http://bugzilla.lyx.org/show_bug.cgi?id=4572)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23162 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-23 18:10:52 +00:00
André Pönitz
b306e9a2e1 Replace the text class shared ptr by good old index-into-global-list.
Also a few cosmetical changes where I xould not resist.

Would be nice if the 'modules people' could verify that their baby 
is strill alive... 



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23154 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-23 11:36:15 +00:00
Stefan Schimanski
8527a08903 * simplify notifyCursorLeaves logic: We now only call it from strategic
places, i.e.
  - BufferView::setMouseCursor,
  - BufferView::mouseEventDispatch
  - LyXFunc::dispatch
  Before it was called from several dispatch handlers in the middle of the
  dispatch process. Because the cursor might get invalidated, this is
  not a good idea. We had plenty of crashes and odd behaviours because
  of this as nobody really understood those cases.

  This fixes (at least) #2069 and #4163.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23140 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-22 20:45:18 +00:00
Stefan Schimanski
f5fdd7cdab * cosmetic
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23133 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-22 15:38:26 +00:00
Stefan Schimanski
1bf7b59d60 * completion infrastructure
* completion support for mathed
* experimental completion support for text


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23104 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-21 19:42:34 +00:00
Abdelrazak Younes
2a725d7c23 Introduce LFUN_CLOSE_TAB_GROUP.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23097 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-21 14:53:09 +00:00
Pavel Sanda
3d87d2f724 Squash RC warnings.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23096 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-21 14:34:41 +00:00
Abdelrazak Younes
9d40f89b58 Introducing LFUN_SPLIT_VIEW
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23084 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-20 21:46:49 +00:00
Abdelrazak Younes
f0b51ef8c9 Various small cleanup.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23064 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-19 09:10:59 +00:00
Abdelrazak Younes
2bf1c09376 header cleanup
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23049 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-18 07:14:42 +00:00
Pavel Sanda
10426cb833 Wrong status of ui-toggle. Spotted by Bennett.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22986 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-14 00:06:39 +00:00
Pavel Sanda
c6161cfdc6 Remove LFUN_FILE_NEW.
Obsoleted by LFUN_BUFFER_NEW, moreover its was currently buggy.

See http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg135371.html .


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22977 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-13 14:07:50 +00:00
Pavel Sanda
b9cf09838f Improve fullscreen capabilities ( http://bugzilla.lyx.org/show_bug.cgi?id=4146 ).
- adding frames, adding fullscreen switch.
- LFUN_MENUBAR_TOGGLE, LFUN_STATUSBAR_TOGGLE -> LFUN_UI_TOGGLE.

There are still limitations wrt Outlining in MAC OS - someone could check, 
see http://www.nabble.com/Fullscreen-mode-to15314676.html#a15367830 .




git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22893 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-09 11:58:01 +00:00
Abdelrazak Younes
28826a461c header cleanup
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22826 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-07 08:58:35 +00:00
Abdelrazak Younes
e6519eb5f6 Transfer some GUI oriented code from core to frontend.
* lyxFunc:
- doImport(): transfered to GuiView::inportDocument() together with LFUN_BUFFER_IMPORT


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22820 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-06 23:54:13 +00:00
Abdelrazak Younes
8d99df0c93 Transfer some GUI oriented code from core to frontend.
* Application/GuiApplication:
- restoreGuiSession(): new method for session restoration.

* LyXView/GuiView
- loadDocument(): new pure virtual interface

* lyxFunc:
- loadAndViewFile(): transfered to GuiView::loadDocument()
- openDocument(): transfered to GuiView.

* LyX.h
- Impl::files_to_load_ : now a simple vector<string>.
- restoreGuiSession(): removed.
- execBatchCommands(): simplified and make use of Application::restoreGuiSession().



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22816 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-06 23:02:57 +00:00
Pavel Sanda
c2e397cdee Add LFUN_MENUBAR_TOGGLE and LFUN_STATUSBAR_TOGGLE.
This partly solves the bug http://bugzilla.lyx.org/show_bug.cgi?id=4146 .


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22809 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-06 17:54:04 +00:00
Abdelrazak Younes
4b2c2f3578 header cleanup
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22750 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-02 15:48:58 +00:00
Stefan Schimanski
dd3842505b * a configuration value for the mouse wheel scrolling speed:
lyxrc.mouse_wheel_speed 


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22717 a592a061-630c-0410-9148-cb99ea01b6c8
2008-01-30 21:20:29 +00:00
Richard Heck
5bef46157c Add some comments, and change enum terminology to reflect actual purpose.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22685 a592a061-630c-0410-9148-cb99ea01b6c8
2008-01-26 20:25:25 +00:00
Richard Heck
20a5e94a86 Fix bug 4517.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22681 a592a061-630c-0410-9148-cb99ea01b6c8
2008-01-26 20:02:30 +00:00
Stefan Schimanski
8e212b98b4 * optional old-style editing mode for macros with a parameter list.
* combobox in the preferences dialog to choose the macro editing mode of choice.

The reason for the three choices (inline box, inline without box,
list) is that it seems that there are at least these three groups of
people, and each of them is very strong about their opinion what that
the best mode is. So here there are all of them, pick your favourite.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22670 a592a061-630c-0410-9148-cb99ea01b6c8
2008-01-25 22:02:38 +00:00
Stefan Schimanski
0a701fb254 * Option to make macro editing less "noisy" by hiding the grey box with the
macro name when the cursor is inside. The downside of the coin is that
you have to look into the statusbar to see which macro is used. But
some people prefer that than having the slight size change of macros
when the cursor enters.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22650 a592a061-630c-0410-9148-cb99ea01b6c8
2008-01-22 21:23:41 +00:00
Richard Heck
9a7cd29f5b Rationalize the handling of makeTextClass().
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22388 a592a061-630c-0410-9148-cb99ea01b6c8
2008-01-05 17:04:56 +00:00
Richard Heck
d4dbefc749 Tiny comment.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22328 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-28 17:11:39 +00:00
Abdelrazak Younes
33eb188fb6 Add an RC setting to disable/enable the tooltips in the work area.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22313 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-26 13:52:56 +00:00
Stefan Schimanski
5caf1bb4de * Some dialogs are independent of the lyxview. Moreover it seems that
the Qt Mac application menu is handled differently such that no
  getStatus() is issued anymore later when opening it. Hence we have
  to return the correct (i.e. enable==true) value for those lfuns from
  the beginning.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22286 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-23 19:07:46 +00:00