Commit Graph

69 Commits

Author SHA1 Message Date
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
Abdelrazak Younes
5ddc612b73 Splitup Font in saner bits:
* Font::FontBits -> FontInfo
* Font::FONT_XXX -> all enums transfered to FontEnums.h and renamed to FontXxx

I've replaced Font uses with FontInfo were the language() member was not needed, basically all draw() and metrics methods. There's one problematic cases with InsetQuotes which I solved by taking the Buffer main language.




git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21240 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-28 18:51:54 +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
Dov Feldstern
662b58497e Getting rid of LTR bias --- part 1/?
This is the first patch in a series meant to remove LTR bias from the code.
Currently, there are many places in the code where "right" and "left" are used,
but where we actually mean "forward" and "backwards" --- which is the same 
thing in LTR text, but not in RTL/Bidi text.

See full details in http://permalink.gmane.org/gmane.editors.lyx.devel/97550.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21128 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-22 22:18:52 +00:00
Abdelrazak Younes
55beda376a Refactor Undo/Redo framework into an Undo class owned by a Buffer. This reduces header dependencies from Undo.h which was including lots of stuff previously. This also solves the bug where undo/redo were reset upon buffer switching. Now, each buffer has a truly independant undo/redo architecture.
In the future, when Cursor has been fixed to work correctly with multiple views of the same Buffer, we could transfer the Undo owner from Buffer to Cursor.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21031 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-18 11:51:17 +00:00
Abdelrazak Younes
f7b1c86393 Move Inset::Code to InsetCode.h
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20936 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-13 09:04:52 +00:00
Martin Vermeer
739e3c8df3 Allow dissolution of insets inside mathed
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20692 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-03 10:24:37 +00:00
André Pönitz
5aaf4dce20 move font related stuff from bufferview_funcs to Font
delete bufferview_funcs, since it's now empty


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20579 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-29 11:00:18 +00:00
Abdelrazak Younes
f319fdbc2a Put MathData on a diet: transfer dimension cache to BufferView' CoordCache along its position.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20465 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-24 13:52:04 +00:00
André Pönitz
82309f0c2d Remove a few includes from Text.h
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20386 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-20 20:44:08 +00:00
Richard Heck
aa01777060 Change LFUN_FONT_CODE to LFUN_FONT_TYPEWERITER, possibly in preparation for a move to character-style-based font changes, etc.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20381 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-20 18:02:39 +00:00
Abdelrazak Younes
8d52aa5638 Give PageDown/Up scrolling a sane behaviour. Does not work with selection yet...
* BufferView:
- new scroll(), scrollDown() and scrollUp() method for pixel scrolling.
- new LFUN_SCREEN_UP/DOWN handling.
 
* TextMetrics: new helper and access methods.




git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20283 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-15 12:28:41 +00:00
Abdelrazak Younes
8d8dbfd51c Fix bug 4117.
http://bugzilla.lyx.org/show_bug.cgi?id=4117


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19644 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-19 13:32:21 +00:00
Jean-Marc Lasgouttes
ded1c011f2 * inset/InsetTabular.cpp (doDispatch): LFUN_MOUSE_PRESS: let Text::dispatch
do the work, unless we really have a reason not to (fixes bug 4133)

	* mathed/InsetMathNest.cpp (lfunMousePress): refactor the code to use
	BufferView::mouseSetCursor.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19506 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-13 15:38:32 +00:00
André Pönitz
b99bbdb7f1 move tex2lyx and client subdir handling to the main Makefile.am, so they won't be considered when building in src only. Faster roundtrips...
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19421 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-11 08:48:57 +00:00
Christian Ridderström
1050cc4471 Converted '#warning ...' into FIXME-comments
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19397 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-10 11:47:12 +00:00
Bo Peng
252ec84acd Remove all saveSelection calls and unify theSelection().setSelection. This is the common, housekeeping part of JMarc's and my patches. Fixes of bug 3877 will come later
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19003 a592a061-630c-0410-9148-cb99ea01b6c8
2007-07-06 17:03:45 +00:00
Stefan Schimanski
98fb638d61 * the old cursor is stored before dispatch and then used after moving
up/down to tell the insets that the cursor left them. The
  notifyCursorLeaves methods can set updateFlags to trigger a redraw.
* leave mathed with cursor up/down and get the math redrawn for the
  decorations



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18773 a592a061-630c-0410-9148-cb99ea01b6c8
2007-06-14 20:32:28 +00:00
Dov Feldstern
6742e42e79 KeyMap is now switched (if necessary) only just before it is actually used
for translating keystrokes. Up until now, the switching was done in advance
in all kinds of situations, but not just before translating was actually done
--- which resulted in the KeyMap not always being switched on time...

This solves bug #3811 (http://bugzilla.lyx.org/show_bug.cgi?id=3811)


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18744 a592a061-630c-0410-9148-cb99ea01b6c8
2007-06-11 22:05:44 +00:00
Stefan Schimanski
b7ce285f8b * Only enter inset which return true on isActive(). This is the behavior in the cursor code.
Only newly created inset were entered everytime.
* Derived classes of CommandInset do not draw all cells, so return false.
  (fixes http://bugzilla.lyx.org/show_bug.cgi?id=3715)


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18742 a592a061-630c-0410-9148-cb99ea01b6c8
2007-06-11 18:26:42 +00:00
Bo Peng
358e7136f2 Fix compiling errors caused by r18701 (moving drawMarkers and drawMarkers2 back to Inset)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18708 a592a061-630c-0410-9148-cb99ea01b6c8
2007-06-07 21:36:42 +00:00