Commit Graph

79 Commits

Author SHA1 Message Date
Richard Heck
c060a85d81 Revert r32684, per Andre's suggestion.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32689 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-31 15:46:39 +00:00
Richard Heck
8a0134cc8c Introduce a return value for mathmlize(). We will need this to be able
to defer labels.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32684 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-31 03:50:12 +00:00
Enrico Forestieri
d3378a6b84 Style: insetCur -> inset_cursor
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32049 a592a061-630c-0410-9148-cb99ea01b6c8
2009-11-16 13:31:01 +00:00
Enrico Forestieri
7365a29fea Fix bug #6208: macro crash.
The fix consists in not updating the macro while it is being edited,
and this is accomplished by the changes in MathData::updateMacros().
However, when clicking away with the mouse I was getting another crash,
which is cured by the changes in MathMacro::notifyCursorLeaves().


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32037 a592a061-630c-0410-9148-cb99ea01b6c8
2009-11-15 23:54:45 +00:00
Richard Heck
ae60474513 Get math macros working for MathML.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32004 a592a061-630c-0410-9148-cb99ea01b6c8
2009-11-15 12:30:26 +00:00
Abdelrazak Younes
ff4460603e Make Buffer argument mandatory in most of the InsetMath based class... boring work...
Math manual loads and save correctly it seems but expect some instability period.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31898 a592a061-630c-0410-9148-cb99ea01b6c8
2009-11-08 11:45:46 +00:00
Enrico Forestieri
21fcdfb479 Fix a crash when the modified uncompleted macro is a font changing command.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31379 a592a061-630c-0410-9148-cb99ea01b6c8
2009-09-12 21:20:51 +00:00
Enrico Forestieri
0c2902d0c0 Better fix for bug #5923. Now the macro name can be freely edited.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30425 a592a061-630c-0410-9148-cb99ea01b6c8
2009-07-09 15:21:21 +00:00
Enrico Forestieri
654600486b Fix bug 5541: http://bugzilla.lyx.org/show_bug.cgi?id=5541
This was due to a thinko in http://www.lyx.org/trac/changeset/26002


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28605 a592a061-630c-0410-9148-cb99ea01b6c8
2009-02-25 12:16:56 +00:00
André Pönitz
f1cba8ff64 more latin1..utf8 schanges. all of src/* should be utf8 now
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27425 a592a061-630c-0410-9148-cb99ea01b6c8
2008-11-14 15:58:50 +00:00
Abdelrazak Younes
46b4a8428b Style, const access and small optimizations.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27185 a592a061-630c-0410-9148-cb99ea01b6c8
2008-10-29 08:03:26 +00:00
Enrico Forestieri
7d4ec3f944 Fix bug 5393
http://bugzilla.lyx.org/show_bug.cgi?id=5393


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27044 a592a061-630c-0410-9148-cb99ea01b6c8
2008-10-23 00:48:06 +00:00
Stefan Schimanski
af9206b392 * Call metrics of the parameters with the correct font in MathMacros, for example
if they are in an index and should be drawn smaller.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26927 a592a061-630c-0410-9148-cb99ea01b6c8
2008-10-16 21:27:43 +00:00
Stefan Schimanski
c874e95030 * Be more conservative about leaving out parenthesis by checking for < 0x80.
This fixes lyxmathsym characters as macro arguments.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26802 a592a061-630c-0410-9148-cb99ea01b6c8
2008-10-07 16:24:07 +00:00
Enrico Forestieri
dac70247f0 Fix bug 5041
http://bugzilla.lyx.org/show_bug.cgi?id=5041


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26002 a592a061-630c-0410-9148-cb99ea01b6c8
2008-07-30 15:07:06 +00:00
Enrico Forestieri
aabd9d03bb Fix bug 4992
http://bugzilla.lyx.org/show_bug.cgi?id=4992


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25458 a592a061-630c-0410-9148-cb99ea01b6c8
2008-07-05 23:29:48 +00:00
Enrico Forestieri
2477901f07 Fix color of math macros
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25403 a592a061-630c-0410-9148-cb99ea01b6c8
2008-06-28 22:49:40 +00:00
Enrico Forestieri
c691839abe Fix bug 4687
http://bugzilla.lyx.org/show_bug.cgi?id=4687


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25318 a592a061-630c-0410-9148-cb99ea01b6c8
2008-06-19 09:16:05 +00:00
Enrico Forestieri
e224ef029b Implement the suggestion by Andre'
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25287 a592a061-630c-0410-9148-cb99ea01b6c8
2008-06-17 11:10:43 +00:00
Enrico Forestieri
90837aaf6e Fix bug 1527
http://bugzilla.lyx.org/show_bug.cgi?id=1527

* src/mathed/*.cpp:
	- Track mode (math or text) when outputting latex code and
	  properly wrap commands that are in the wrong mode with
	  either \ensuremath or \lyxmathsym.

* src/mathed/MathParser.cpp:
	- Parse \ensuremath and \lyxmathsym, such that exported latex
	  produces the same result when imported back.
	- Replace latex commands with corresponding unicode symbols.

* src/Encoding.cpp:
	- Implement Encodings::fromLaTeXCommand() for converting either
	  a single or a sequence of latex commands to unicode symbols.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25270 a592a061-630c-0410-9148-cb99ea01b6c8
2008-06-16 01:21:17 +00:00
Jean-Marc Lasgouttes
ecb715d682 unbreak compilation (part 2)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24632 a592a061-630c-0410-9148-cb99ea01b6c8
2008-05-06 10:36:32 +00:00
Abdelrazak Younes
45bc27809b remove unneeded includes.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24628 a592a061-630c-0410-9148-cb99ea01b6c8
2008-05-06 06:48:38 +00:00
Jean-Marc Lasgouttes
9b4a26a252 rename assert.h to lassert.h
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24559 a592a061-630c-0410-9148-cb99ea01b6c8
2008-04-30 08:26:40 +00:00
André Pönitz
7f461f4392 infrastructure for 'graceful asserts'
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24216 a592a061-630c-0410-9148-cb99ea01b6c8
2008-04-10 21:49:34 +00:00
Stefan Schimanski
98787bbec6 * corrected handling of validation of math macros. The macro instances
will require the needed LaTeXFeatures of their definition and their
  paramenters.
* Require the "xargs" package when there is a macro with optional
  parameters which is prepended to a child document which is rendered alone.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23971 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-26 12:55: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
Stefan Schimanski
cf15bd840b * cosmetic
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23451 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-04 14:57:46 +00:00
Stefan Schimanski
501763cafa * add appetite concept to the math macro to restrict the number of parameter which are eaten greedily.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23448 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-04 14:49:03 +00:00
Stefan Schimanski
d87c5c062b * Update::SinglePar should be enough for most cases. In notifyCursorLeaves though we might need a fullscreen redraw if we don't add more clever checks whether the cursors moved to another paragraph.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23415 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-03 15:21:13 +00:00
Stefan Schimanski
dee531e765 * allow macro names with *
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23272 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-27 10:43:29 +00:00
Stefan Schimanski
4413bf3783 * Update::SinglePar is enough, Update::Force is a fullscreen update
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23251 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-26 14:22:56 +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
426c4bf356 * some more relicts of the unfinished favorite handling for math completion
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23142 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-22 21:11:05 +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
4c5c14ff62 * a MathMacro is like a normal InsetMathNest in folded mode. Hence it should also behave like that concerning completion.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23109 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-21 19:45:36 +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
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
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
Stefan Schimanski
49daeaec29 * fix for buggy cursor logic due to multi bufferview support in MathMacros. It's much simpler now, even for simple single bufferview cases.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22562 a592a061-630c-0410-9148-cb99ea01b6c8
2008-01-14 21:53:49 +00:00
Stefan Schimanski
102638a478 * fix broken default value logic from last cleanup: only show default value if not in edit mode and the given value is empty.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22413 a592a061-630c-0410-9148-cb99ea01b6c8
2008-01-07 13:50:21 +00:00
Stefan Schimanski
04537d8664 * make sure the edit mode is the same in math macros and argument proxy
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22292 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-24 10:54:39 +00:00
Stefan Schimanski
6a9e5edae3 * setDimCache is superfluous in mathed
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22291 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-24 10:53:53 +00:00
Stefan Schimanski
ec996ed828 * \newlyxcommand support
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22280 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-23 16:31:37 +00:00
Stefan Schimanski
85e37b01b2 * simplify editing logic of math macros by making it purely dynamic
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22260 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-22 14:39:47 +00:00
Stefan Schimanski
9ac321f28f * kerning may depend on the BufferView because the metrics of some insets (e.g. math macros) depend on the cursor position in the view
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22259 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-22 14:39:22 +00:00