Commit Graph

89 Commits

Author SHA1 Message Date
Dov Feldstern
7412bd1fb1 allow extending a selection to outside a math inset (broken since r22930)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24143 a592a061-630c-0410-9148-cb99ea01b6c8
2008-04-06 20:11:05 +00:00
Enrico Forestieri
b5acd03891 Allow using \binom without amsmath and add support for \brace and \brack
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24067 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-31 01:23:25 +00:00
Stefan Schimanski
aad4651830 * another try on http://bugzilla.lyx.org/show_bug.cgi?id=4566:
"Eqnarray multiple cells size change erases what they contain"

  We also apply LFUN_MATH_INSERT to every selected cell if a single math inset is inserted.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23804 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-18 10:58:57 +00:00
Stefan Schimanski
7269440c83 * reset current_view_ when deleting a GuiView.
* check for current_view_ when exiting to avoid segfaults


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23752 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-15 02:42:59 +00:00
André Pönitz
a98f82c292 s/kb_action/FuncCode/g
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23749 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-15 01:20:36 +00:00
André Pönitz
f2c9b56fb4 cosmetics/#include cleanup
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23747 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-15 00:22:54 +00:00
Jürgen Spitzmüller
ad5ba124be * src/mathed/InsetMathNest.cpp:
- also handle the Color_inherit case.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23688 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-12 18:50:50 +00:00
Stefan Schimanski
2f67f8c2b3 * handle the multiple-selected-cells case also for color changes in mathed
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23682 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-12 14:04:25 +00:00
Stefan Schimanski
5e2aeffc43 * half of the fix for http://bugzilla.lyx.org/show_bug.cgi?id=4091
"Applying Text-style to math generates \color{ignore}"

Which kind of font changes do we want to support here? After all the
text style dialog is meant for text. So it only really make sense for
\mbox'es. But there we probably cannot store every font change because
it still math up to now.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23681 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-12 13:20:40 +00:00
Stefan Schimanski
e01f7e7105 * fix a serious data loss problem: undo did not save the whole
selection in mathed if more than one cell was selected.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23675 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-12 00:59:29 +00:00
Stefan Schimanski
40c4d50c82 * fix for http://bugzilla.lyx.org/show_bug.cgi?id=4566
"Eqnarray multiple cells size change erases what they contain"

  We now loop over the selected cells and change the font in each of them.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23673 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-12 00:19:31 +00:00
Stefan Schimanski
b2e8d557cc * only use selection of current cell when starting a macro (fixes http://bugzilla.lyx.org/show_bug.cgi?id=4566 for macros)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23670 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-12 00:18:39 +00:00
Uwe Stöhr
8151dd5852 InsetMathNest.cpp: Ctrl-b uses now \boldsymbol (fixes http://bugzilla.lyx.org/show_bug.cgi?id=499)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23608 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-09 23:23:50 +00:00
Bernhard Roider
a99c5828f8 Add support for \bm from bm.sty
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23520 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-06 20:49:59 +00:00
Abdelrazak Younes
a4d5b78430 Transfer and bug fix LFUN_BUFFER_BEGIN/END_SELECT to BufferView.cpp
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23512 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-06 15:39:30 +00:00
Stefan Schimanski
03a1c9192e * store the selection in the InsetMathUnknown and insert it into the
first argument after finalizing the macro. This also works with real
  math macros.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23449 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-04 14:49:24 +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
Stefan Schimanski
c0e2c0cd5c * better fix for * math commands. We allow the * for known math commands and for known math macros which are valid at that point in the buffer.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23273 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-27 10:46:38 +00:00
Stefan Schimanski
1b0591b28e * fix for http://bugzilla.lyx.org/show_bug.cgi?id=4584:
"not possible to use the command \tag*"


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23263 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-26 22:40:59 +00:00
Stefan Schimanski
b6be7d908f * adapt to the changed signature
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23229 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-25 14:25:49 +00:00
Stefan Schimanski
323e3b0207 * Moved std::sets out of Buffer.h to reduce overall LyX compile time
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23163 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-23 18:11:35 +00:00
Stefan Schimanski
8c2149d3aa * following Andre's advice to rename the method into
createCompletionList. This makes the ownership of the returned
  object clear.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23143 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-22 21:11:19 +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
6eb72bd1f2 * Reduce compilation time by removing the shared_ptr (which is not
really important because the ownership of the CompletionLists is
  easy enough) and by removing the deque for the half finished
  favorites implemention in InsetMathNest. I think this fits better
  into the GuiCompleter anyway.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23114 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-21 23:36:02 +00:00
Stefan Schimanski
7794f870f2 * add some space between math inset and popup. This should really come from the font maximal descent in fact.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23108 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-21 19:45:05 +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
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
Abdelrazak Younes
8e831bb602 modify Inset::EntryDirectionType to follow style used in FontEnums.h for enums.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22936 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-11 08:20:13 +00:00
Dov Feldstern
8f47f5d396 visual mode for bidi cursor movement --- in math
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22930 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-10 19:57:00 +00:00
Dov Feldstern
11a6b3c4c7 visual mode for bidi cursor movement
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22929 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-10 19:52:45 +00:00
Jean-Marc Lasgouttes
c3ec9ddda0 Disable and check properly the math numbering functions.
* InsetMathHull.cpp (getStatus): disable LFUN_MATH_NUMBER and LFUN_MATH_NONUMBER
	when the equation is not in display mode; add a checkbox as needed.
	(doDispatch): no need to test for dispatch() anymore.

	* InsetMathNest.cpp (getStatus): LFUN_MATH_NUMBER and LFUN_MATH_NONUMBER are not 
	handled by this class.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22350 a592a061-630c-0410-9148-cb99ea01b6c8
2008-01-03 17:31:12 +00:00
Stefan Schimanski
7150b0caa3 * moved atom_dim_ to coord cache in the buffer view to make it dependent on the buffer view
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22290 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-24 10:52:58 +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
7c392af6ea getting rid of superfluous lyx::support:: statements.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22106 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-12 19:57:42 +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
Pavel Sanda
fceb0d93ba Add comment
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22068 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-10 19:50:12 +00:00
Jürgen Spitzmüller
61e1643821 Support for \slash and \nobreakdash-
* src/lfuns.h:
* src/Text3.cpp:
* src/insets/InsetMathNest.cpp:
* src/insets/insetCollapsable:
	- new LFUN_SPECIALCHAR_INSERT
	- nuke LFUN_HYPHENATION_POINT_INSERT, 
	  LFUN_LIGATURE_BREAK_INSERT,
	  LFUN_DOTS_INSERT,
               LFUN_END_OF_SENTENCE_PERIOD_INSERT,
	  LFUN_MENU_SEPARATOR_INSERT
	  (functions now handled as arguments of the above)

* src/insets/InsetSpecialChar.{cpp,h}:
	- implement \slash and \nobreakdash-

* src/Buffer.cpp:
	- increment format to 307.
* lib/lyx2lyx/LyX.py:
* lib/lyx2lyx/lyx_1_6.py:
	- reversion methods for SpecialChar \slash{} and
	  SpecialChar \nobreakdash-
* development/FORMAT:
	- document file format change

* lib/ui/stdmenus.inc:
* lib/ui/classic.ui:
	- add new SpecialChars to the menus, adapt lfuns to new scheme

* lib/bind/aqua.bind:
* lib/bind/cua.bind:
* lib/bind/emacs.bind:
* lib/bind/fi/menus.bind:
* lib/bind/mac.bind:
* lib/bind/menus.bind:
* lib/bind/sciword.bind:
* lib/bind/xemacs.bind:
	- add shortcuts for new SpecialChars, adapt lfuns to new scheme

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21989 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-06 11:04:56 +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
André Pönitz
d5fc2425a9 consolidate showDialog() incarnations
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21662 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-18 00:39:15 +00:00
Abdelrazak Younes
216775d3c7 gcc compile fix.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21476 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-06 19:24:05 +00:00
Abdelrazak Younes
0b0c27ef59 * BufferView: Make use of ScreenUpdateStrategy::NoScreenUpdate, avoid a screen redraw when it is not really needed.
* Painter.h: move isDrawingEnabled() to public Area.

* TextMetrics::drawParagraph(): backup and restore original drawing state of the Painter.

* InsetTabular::draw(): ditto.

* InsetMathNest::drawSelection(): ditto.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21471 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-06 14:07:49 +00:00
Abdelrazak Younes
d69115d9db Avoid unnecessary redraw.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21468 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-06 13:16:27 +00:00
André Pönitz
9daf07588f #include cosmetics
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21459 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-05 23:46:17 +00:00
Dov Feldstern
cd95a4bae8 Getting rid of LTR bias --- part 4/4
This is the final patch (at least for now). This one deals with the idxFoo
methods in the math insets. The previous patches in the series are r21128, 
r21244 and r21448.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21449 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-05 19:44:03 +00:00
Dov Feldstern
ddd82f7aa4 Getting rid of LTR bias --- part 3/4
This is a continuation of r21128, r21244


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21448 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-05 19:41:16 +00:00
Stefan Schimanski
cc1b8dbe2b * change the fold/unfold behaviour a bit: if we are just in front of a macro with wrong state after we went one level up, we look further left. This feels more natural in cases nullary macros appear as parameters of other macros.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21361 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-02 00:11:51 +00:00
André Pönitz
a8cd9a4b8f cosmetics. mainly replace #include "dostring.h" by #include "strfwd.h"
in header files when possible. Adjust .cpp files.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21358 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-01 22:17:22 +00:00
Stefan Schimanski
dbbf47ab14 * LFUN handler for folding/unfolding of math macros
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21329 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-01 11:14:14 +00:00
Dov Feldstern
b4372a37d9 Getting rid of LTR bias --- part 2/?
This is a continuation of r21128. This round fixes the "Word" movement
functions and LFUNS.

Behavior should remain unchanged by this fix.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21244 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-28 20:35:57 +00:00