Commit Graph

192 Commits

Author SHA1 Message Date
Georg Baum
143e14045f Code cleanup of \bigl related stuff:
* src/cursor.C
	(LCursor::plainInsert): Move special \bigl stuff from here to
	MathNestInset::interpret
	(LCursor::macroModeClose): try to intepret the current macro before
	it is simply inserted

	* src/mathed/math_nestinset.C
	(MathNestInset::doDispatch): try to intepret the argument of
	LFUN_SELFINSERT also if it is longer than one character

	* src/mathed/math_nestinset.[Ch]
	(MathNestInset::interpret): new, moved from LCursor::plainInsert


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13786 a592a061-630c-0410-9148-cb99ea01b6c8
2006-05-01 08:05:22 +00:00
Georg Baum
2bbe7e5b89 Make MathBigInset working
* src/cursor.C
        (LCursor::plainInsert): combine the previous math atom with the new
        one to a MathBigInset if possible

        * src/mathed/math_biginset.[Ch]
        (MathBigInset::name): implement
        (MathBigInset::isBigInsetDelim): new, test whether a given token is
        a valid MathBigInset delimiter

        * src/mathed/math_biginset.C
        (MathBigInset::size): handle Big, Bigg and Biggg
        (MathBigInset::increase): ditto
        (MathBigInset::draw): fix deco drawing
        (MathBigInset::write): append space if necessary

        * src/mathed/math_factory.C
        (createMathInset): handle l->inset == "big"

        * src/mathed/math_parser.C
        (Token::asInput): return a token as input, stolen from tex2lyx
        (void Parser::parse1): Create a MathBigInset when needed

	* src/mathed/math_support.C:
	(deco_table): add lbrace and rbrace

        * src/mathed/math_nestinset.C
        (MathNestInset::interpret): combine the previous math atom with the
        new character to a MathBigInset if possible

        * src/ParagraphParameters.C
        (findToken): move from here

        * src/support/lstrings.[Ch]
        (findToken): to here

        * lib/symbols: add MathBigInset symbols


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13700 a592a061-630c-0410-9148-cb99ea01b6c8
2006-04-20 09:55:45 +00:00
Martin Vermeer
7db0b5ae00 * math_nestinset.C
(MathNestInset::doDispatch): replace recordUndo by recordUndoInset for
	LFUN_DELETE, to fix undo behaviour



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13658 a592a061-630c-0410-9148-cb99ea01b6c8
2006-04-13 08:40:11 +00:00
Martin Vermeer
e6c2e24dc8 Undo previous
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13619 a592a061-630c-0410-9148-cb99ea01b6c8
2006-04-10 11:04:20 +00:00
Martin Vermeer
df09c79544 Fix bug 2485 and crash on middle-mouse paste into math.
Also move reponse to middle mouse from Release to Press

        * math_nestinset.C
        (MathNestInset::lfunMousePress): Add and convert to editXY
        (MathNestInset::lfunMouseRelease): Remove


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13617 a592a061-630c-0410-9148-cb99ea01b6c8
2006-04-10 10:47:59 +00:00
Martin Vermeer
e977a3e509 Fix bug 2485 and crash on middle mouse paste on math
* math_nestinset.C
	(MathNestInset::lfunMousePress): handle middle mouse here, use
	editXY, not setScreenPos
	(MathNestInset::lfunMouseRelease): don't handle here



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13612 a592a061-630c-0410-9148-cb99ea01b6c8
2006-04-09 07:06:57 +00:00
Lars Gullik Bjønnes
3b9338a3a8 Whitespace cleanup.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13565 a592a061-630c-0410-9148-cb99ea01b6c8
2006-04-05 23:56:29 +00:00
Martin Vermeer
206e3745a2 Further revision of the raise/lower selection to super/subscript
patch, avoiding class data member for nestinset

	* cursor.h: remove paste() (was forgotten)
	* mathed/math_nestinset.C
	(MathNestInset::doDispatch):
	(MathNestInset::lfunMouseRelease): 
	(MathNestInset::interpret): incorporate saved selection into
	script() call parameters
	(MathNestInset::script): saved selection is extra parameter
	* mathed/math_nestinset.h: extra parameter; remove safe_



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13431 a592a061-630c-0410-9148-cb99ea01b6c8
2006-03-20 14:42:04 +00:00
Martin Vermeer
0a57bcafeb * math_nestinset.C
(MathNestInset::doDispatch): fix bug 2345: C-M on text in math gives
	an empty mbox



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13425 a592a061-630c-0410-9148-cb99ea01b6c8
2006-03-20 08:42:43 +00:00
Martin Vermeer
2c30e9b17a Get raising/lowering into super/subscripts of selection working (1.3
regression)

	* cursor.C: get rid of paste()

	* mathed/math_nestinset.C
	(MathNestInset::doDispatch):
	(MathNestInset::lfunMouseRelease): define safe_ (selection) in
	several places
	(MathNestInset::script): use data member safe_ to insert selection

	* mathed/math_nestinset.h: data member safe_



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13424 a592a061-630c-0410-9148-cb99ea01b6c8
2006-03-20 06:53:29 +00:00
Martin Vermeer
786c079b89 fix (properly) insertion of fonts/decorations around selection
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13280 a592a061-630c-0410-9148-cb99ea01b6c8
2006-02-28 19:16:38 +00:00
Jean-Marc Lasgouttes
0b281dcea7 fix bug 1934
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10781 a592a061-630c-0410-9148-cb99ea01b6c8
2006-01-27 22:24:37 +00:00
Jean-Marc Lasgouttes
1b411d8e9c fix bug 2034
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10726 a592a061-630c-0410-9148-cb99ea01b6c8
2006-01-11 17:08:50 +00:00
Jürgen Spitzmüller
6a36d26356 fix bug 2139 (creation of two consecutives, but different script insets)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10641 a592a061-630c-0410-9148-cb99ea01b6c8
2005-12-02 06:34:19 +00:00
Jean-Marc Lasgouttes
3246cc9a4a bug 2109: trigger dEPM when moving cursor with mouse
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10637 a592a061-630c-0410-9148-cb99ea01b6c8
2005-12-01 10:28:50 +00:00
Georg Baum
2fdc606248 fix bug 2126 (references in math)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10616 a592a061-630c-0410-9148-cb99ea01b6c8
2005-11-22 13:52:25 +00:00
Angus Leeming
d9f29afe1c Trivial fixes to some warnings thrown up by MSVS.Net 2003.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10585 a592a061-630c-0410-9148-cb99ea01b6c8
2005-11-02 20:11:36 +00:00
Georg Baum
d7055d0a8e implement missing bits of math cut and paste and fix bug 2059
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10548 a592a061-630c-0410-9148-cb99ea01b6c8
2005-10-12 18:44:53 +00:00
Georg Baum
a2b40d9038 fix invalid cursor after math undo
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10547 a592a061-630c-0410-9148-cb99ea01b6c8
2005-10-12 18:40:22 +00:00
Georg Baum
7c67a37f53 fix bug 2060
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10525 a592a061-630c-0410-9148-cb99ea01b6c8
2005-10-05 21:19:32 +00:00
Jean-Marc Lasgouttes
609e7ae488 fix bug 2057: Delete key acting unexpectedly in MathEd
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10515 a592a061-630c-0410-9148-cb99ea01b6c8
2005-10-03 12:22:19 +00:00
Jürgen Spitzmüller
66d2b93f7c fix bug 2058 (crash when undoing math matrix delete)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10510 a592a061-630c-0410-9148-cb99ea01b6c8
2005-10-03 09:50:28 +00:00
Jürgen Spitzmüller
cc4af55608 leave inset to the right when hitting ESC (bug 2034)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10488 a592a061-630c-0410-9148-cb99ea01b6c8
2005-09-27 08:42:28 +00:00
Jürgen Spitzmüller
97ca98f0b7 make LFUN_CUT in mathed undoable (bug 2041)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10485 a592a061-630c-0410-9148-cb99ea01b6c8
2005-09-26 11:14:59 +00:00
Jean-Marc Lasgouttes
81efcd9cf6 fix compiler warnings (bug 1927)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10465 a592a061-630c-0410-9148-cb99ea01b6c8
2005-09-20 08:31:37 +00:00
Jürgen Spitzmüller
dea6e50734 fix bug 1960 and bug 1981 properly, using cur.normalize()
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10457 a592a061-630c-0410-9148-cb99ea01b6c8
2005-09-19 09:57:04 +00:00
Martin Vermeer
16e093636f Fix bug 1981
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10399 a592a061-630c-0410-9148-cb99ea01b6c8
2005-08-19 12:57:47 +00:00
André Pönitz
3410c395b5 Andreas' patch to prevent crash on click on previewd inset
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10309 a592a061-630c-0410-9148-cb99ea01b6c8
2005-07-18 00:45:10 +00:00
André Pönitz
6d8d1f3d62 reenable TAB and S-TAB in math, fixing a regression against 1.3
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10307 a592a061-630c-0410-9148-cb99ea01b6c8
2005-07-18 00:09:20 +00:00
André Pönitz
0411671a57 Stephan's patch
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10223 a592a061-630c-0410-9148-cb99ea01b6c8
2005-07-15 16:52:27 +00:00
André Pönitz
41ecabf519 make boundary property an iterator property instead of a CursorSlice property
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10214 a592a061-630c-0410-9148-cb99ea01b6c8
2005-07-15 15:49:40 +00:00
André Pönitz
97a158fd8e small cosmetic fix and removing some debug output
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10198 a592a061-630c-0410-9148-cb99ea01b6c8
2005-07-15 08:51:34 +00:00
André Pönitz
1a9992c796 partial fix for bug 622, cosmetic rest remains open
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10195 a592a061-630c-0410-9148-cb99ea01b6c8
2005-07-15 00:39:44 +00:00
André Pönitz
de70b1ce26 handle LFUN_ESCAPE properly in math insets (i.e. go up one level of
nesting)


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10184 a592a061-630c-0410-9148-cb99ea01b6c8
2005-07-14 14:48:46 +00:00
André Pönitz
8120816f1a cursor should not get stuck on page up/down in math
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10181 a592a061-630c-0410-9148-cb99ea01b6c8
2005-07-14 11:54:45 +00:00
Jürgen Spitzmüller
2368acd8c0 fix {super|sub}script via menu (bug 1667)
fix font attribute handling in mathed text mode


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10100 a592a061-630c-0410-9148-cb99ea01b6c8
2005-06-24 10:14:33 +00:00
Georg Baum
02ab1bf675 fix math color inset UI and parsing
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10083 a592a061-630c-0410-9148-cb99ea01b6c8
2005-06-17 14:35:19 +00:00
Angus Leeming
70572847e2 Whitespace, only whitespace. s/ +$//
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10024 a592a061-630c-0410-9148-cb99ea01b6c8
2005-06-09 09:58:08 +00:00
Martin Vermeer
6d5b9d7791 Suppress a number of illegal things in text-within-math
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9892 a592a061-630c-0410-9148-cb99ea01b6c8
2005-05-01 16:15:32 +00:00
Martin Vermeer
2eab957971 Fix handling of aligment; rearrange tabular-features menu stuff
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9872 a592a061-630c-0410-9148-cb99ea01b6c8
2005-04-25 14:10:10 +00:00
Martin Vermeer
361db9a6b1 Make insert-around-select work properly for rootinset
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9807 a592a061-630c-0410-9148-cb99ea01b6c8
2005-04-11 18:48:34 +00:00
Martin Vermeer
7f1066c339 Make HOME/END keys work to leave math sub-insets
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9798 a592a061-630c-0410-9148-cb99ea01b6c8
2005-04-10 09:07:28 +00:00
Martin Vermeer
331824c537 Make Helge happy: no more crash on arrow up/down in math macro
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9792 a592a061-630c-0410-9148-cb99ea01b6c8
2005-04-08 12:15:28 +00:00
Martin Vermeer
f4c0f6ec8b fix cursor positioning in non-grid nestinsets, and selection enclosure
when inserting font or deco insets.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9784 a592a061-630c-0410-9148-cb99ea01b6c8
2005-04-06 19:01:55 +00:00
Martin Vermeer
e9ac548c9a Final touches, corner markers & clickability in math
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9778 a592a061-630c-0410-9148-cb99ea01b6c8
2005-04-04 22:11:53 +00:00
Georg Baum
da92b37c1d fix bug 1823 by reverting to the mbox solution of 1.3
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9717 a592a061-630c-0410-9148-cb99ea01b6c8
2005-03-16 17:06:47 +00:00
Angus Leeming
e1928a2109 (Andr��): partial fix for mouse handling in math insets.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9686 a592a061-630c-0410-9148-cb99ea01b6c8
2005-02-28 11:32:58 +00:00
Jürgen Spitzmüller
70f4ff1a59 fix bug 1598 (crash on cursor up/down in script)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9616 a592a061-630c-0410-9148-cb99ea01b6c8
2005-02-12 15:46:22 +00:00
Angus Leeming
e22c5f4d97 Asger's commentary, const-correct and bug-squashing little beauty.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9558 a592a061-630c-0410-9148-cb99ea01b6c8
2005-01-31 16:29:48 +00:00
Lars Gullik Bjønnes
e3c9bdd0ea fix compilation with gcc 4.0
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9447 a592a061-630c-0410-9148-cb99ea01b6c8
2005-01-06 16:07:02 +00:00