Commit Graph

40 Commits

Author SHA1 Message Date
Abdelrazak Younes
fb25ff1819 Cleanup mouse/selection/context-menu interactions.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23944 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-25 10:54:38 +00:00
André Pönitz
a694476ac6 try to pass a Buffer & to inset construction if some buffer(param)
access is needed


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23465 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-04 22:28:18 +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
André Pönitz
db8c16d554 progress on buffer-reference-in-insets. beware of instabilities...
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23289 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-27 20:43:16 +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
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
Richard Heck
2812202c2b Move the enum into InsetLayout.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23136 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-22 16:24:55 +00:00
Richard Heck
2c357c1d23 This should be the last of the commits refactoring the InsetLayout code.
This one just moves the Decoration enum into InsetLayout, changing the names
to avoid possible conflicts now that it is in the lyx namespace.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23135 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-22 16:15:21 +00:00
Martin Vermeer
6820d18e11 Tooltips for collapsables and branches
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22956 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-12 09:11:06 +00:00
Stefan Schimanski
36dbec4506 * Lazy MathData to avoid unneeded interpretation of macro definitions
* DocIterator as MacroPosition
* Iterative search for macro in scope until a visible one is found.
This include the ability to resolve macro inside nested text insets.
* Speed up macro lookups by factor 2: only getMacro(name) call, no
further hasMacro(name) call before
* Both way child/master support
* Correct macro scope for multi-paragraph environments
* Correct macro scope for multi-depth-paragraphs
* Buffer::updateMacros made const
* Update macros when loaded (of master and child)
* Do not remove too many braces when unfolding a macro. This could
lead to a data loss because the relationship between arguments of
macros can be mixed up if nested macros are unfold at once.
* Reduce dependencies to MetricsInfo in MathMacro   
* Update macros when needed. Normally it's done just before doing
metrics. But in cases without a brace around some constructs (like
\left(bla\right)) there is some help needed.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22241 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-21 20:42:46 +00:00
Abdelrazak Younes
9abb7db468 getting rid of superfluous std:: statements.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22104 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-12 19:28:07 +00:00
Abdelrazak Younes
9383f4c3c6 'using namespace std' instead of 'using std::xxx'
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22097 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-12 10:16:00 +00:00
André Pönitz
9d0ea8aeff Move debug.{cpp,h}, Messages.{cpp,h} and gettext.{cpp,h} to support/.
Now support/* should have no dependencies on src/* anymore.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21851 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-29 07:04:28 +00:00
Abdelrazak Younes
cdf1378200 Introducing TextClassPtr.h to minimize header dependencies.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21506 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-07 23:25:08 +00:00
Abdelrazak Younes
85f80979fc Further cleanup of InsetFlex, InsetCollapsable and InsetLayout:
- Getting rid of some unneeded init() methods.
- InsetCollapsable::layout_ is now a const pointer.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21396 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-03 00:35:07 +00:00
André Pönitz
09df753df4 pimpl not needed here
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21395 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-02 23:42:27 +00:00
Abdelrazak Younes
e33efb3c31 remove unneeded init() method.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21383 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-02 17:58:16 +00:00
Abdelrazak Younes
c51f1cffaa * InsetCollapsable:
- InsetCollapsable(): Move labelfont initialisation to InsetCollapsable::setLayout().
- read(): reset the inset layout.

All other insets: get rid of redundant setLayout() calls.

This commit fixes the multiple crashes in trunk but the color used for text and background are completely wrong...


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21382 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-02 17:47:51 +00:00
Abdelrazak Younes
eea79637c7 Move Color::color enum to ColorCode.h
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21198 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-25 12:41:02 +00:00
André Pönitz
f762cbf3c6 mainly cosmetics
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21079 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-20 10:03:45 +00:00
Martin Vermeer
3f358459fc Final touch on minimalistic branches
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19989 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-02 08:38:09 +00:00
Martin Vermeer
e0db6e2679 small cleanup collapsable; label fix branch
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19976 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-01 17:55:21 +00:00
Martin Vermeer
ed6f900552 Use Minimalistic for branches
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19973 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-01 11:40:09 +00:00
André Pönitz
ed858d73e5 use bald pointers in clone()
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19920 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-30 18:03:17 +00:00
Jean-Marc Lasgouttes
601a8e0192 Rewrite the label numbering code.
* buffer_funcs.cpp (updateLabels): new function taking a buffer and
	a ParIterator as arguments. This one is used to update labels
	into an InsetText. Cleanup the code to reset depth. Call setLabel
	for each paragraph, and then updateLabel on each inset it contains.
	(setCaptionLabels, setCaptions): removed.
	(setLabel): use Counters::current_float to make caption paragraphs
	labels.

	* insets/Inset.h (updateLabels): new virtual method, empty by
	default; this numbers the inset itself (if relevant) and then all
	the paragraphs it may contain.

	* insets/InsetText.cpp (updateLabels): basically calls
	lyx::updateLabels from buffer_func.cpp.

	* insets/InsetCaption.cpp (addToToc): use the label constructed by
	updateLabels.
	(computeFullLabel): removed.
	(metrics, plaintext): don't use computeFullLabel.
	(updateLabels): new method; set the label from
	Counters::current_float.

	* insets/InsetWrap.cpp (updateLabels):
	* insets/InsetFloat.cpp (updateLabel): new method; sets
	Counters::current_float to the float type.

	* insets/InsetBranch.cpp (updateLabels): new method; the numbering
	is reset afterwards if the branch is inactive. (bug 2671)

	* insets/InsetNote.cpp (updateLabels): new method; the numbering
	is reset after the underlying InsetText has been numbered.
	(bug 2671)

	* insets/InsetTabular.cpp (updateLabels): new method (also handles
	longtable)

	* insets/InsetListings.cpp (updateLabels): new method; mimics what
	is done for Floats (although Listings are not floats technically)

	* insets/InsetInclude.cpp (getScreenLabel): in the listings case,
	use the computed label.
	(updateLabels): new method; that either renumbers the child
	document or number the current listing.

	* LyXFunc.cpp (menuNew): do not updateLabels on empty documents
	(why do we do that at all?)


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19482 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-12 21:43:58 +00:00
Abdelrazak Younes
77736e8679 header cleanup.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18783 a592a061-630c-0410-9148-cb99ea01b6c8
2007-06-15 13:47:13 +00:00
Jean-Marc Lasgouttes
4ba4d701f7 Remove background_color_ in Insets: it takes a lot of unnecessary memory,
especially in math where each equation has many insets.

	* src/Insets.cpp: remove background_color_ member
	(setBackgroundColor): remove
	(backgroundColor): make virtual

	* insets/InsetBranch.cpp:
	* insets/InsetNote.cpp: move color setting code from setButtonLabel to 
	backgroundColor.

	* insets/InsetBox.cpp (setButtonLabel): remove call to setBackgroundColor.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18750 a592a061-630c-0410-9148-cb99ea01b6c8
2007-06-12 13:45:49 +00:00
Jürgen Spitzmüller
5d8e1d7dc5 * src/insets/insetBranch.cpp (doDispatch):
- remove wrong check, fix bug 3835.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18734 a592a061-630c-0410-9148-cb99ea01b6c8
2007-06-11 05:12:10 +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
Michael Schmitt
a746aa5214 "fix" bug #3332 (plain text export depends on the menu language)
Please note that method B_ (translate text to buffer language) is presently broken (at least on Windows)!


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18143 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-01 08:26:40 +00:00
André Pönitz
e0d54dd3b4 LyXText -> Text
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18103 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-29 23:33:02 +00:00
André Pönitz
fc6ce7cd08 rename LyXFont to Font except in tex2lyx
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18095 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-29 18:17:15 +00:00
André Pönitz
32871c1284 rename InsetBase to Inset
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18089 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-29 13:39:47 +00:00
André Pönitz
51fbea02a8 Remove InsetOld
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18087 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-29 12:32:14 +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
André Pönitz
42123ab8a7 rename LCursor->Cursor
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18040 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-26 14:56:30 +00:00
André Pönitz
39e79d8602 rename LyXLex into Lexer
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18033 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-26 11:30:54 +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
c8d00ed127 Rename insets/insetxxx to insets/InsetXxx, part 2
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17965 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-25 01:25:51 +00:00