Commit Graph

324 Commits

Author SHA1 Message Date
Enrico Forestieri
eb2600483a Fix bug #7068 (Crash when pressing down arrow in an equation when there is a suggestion)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36617 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-30 03:54:29 +00:00
Edwin Leuven
4e5d3469f6 have pointing cursor when hovering something clickable
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35806 a592a061-630c-0410-9148-cb99ea01b6c8
2010-10-24 21:41:47 +00:00
Vincent van Ravesteijn
7f593196fc Add an update parameter to BufferView::scrollToCursor and BufferView::scrollDocView. This parameter indicates whether a repaint is requested
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34658 a592a061-630c-0410-9148-cb99ea01b6c8
2010-06-14 21:48:23 +00:00
Vincent van Ravesteijn
e1ba93a068 *BufferView: Remove default parameter value.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34657 a592a061-630c-0410-9148-cb99ea01b6c8
2010-06-14 21:38:38 +00:00
Vincent van Ravesteijn
708b73cab7 Fix bug #3900: Mathed corners displayed without mouse hover.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34348 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-30 14:55:37 +00:00
Vincent van Ravesteijn
b14ef59db8 Remove boundary parameter from BufferView::coordOffset(). The first DocIterator parameter already contains this information.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34248 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-21 13:12:40 +00:00
Vincent van Ravesteijn
63d24ca3c4 Remove boundary parameter from BufferView::getPos(). The first DocIterator parameter already contains this information.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34247 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-21 13:03:04 +00:00
Richard Heck
dfaab2f50d Remove extra qualifier.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33911 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-29 15:45:24 +00:00
Vincent van Ravesteijn
71c1ad3517 Fix bug #3900: Insets painted as hovered without mouse hover.
When updating the screen, moving the mouse, or scrolling the buffer, we check whether the hovering status of the insets.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33908 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-29 15:21:10 +00:00
Richard Heck
6f624ab79b Change updateLayout() to updateDocumentClass(), since that is what it
does.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33682 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-08 20:37:11 +00:00
Jean-Marc Lasgouttes
fe9a43f44b Add DispatchResult argument to BufferView::dispatch, and remove explicit updates in there.
Split LyXFunc::dispatch into a wrapper that does the actual screen updates and
a worker method that updates a DispatchResult object.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33226 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-25 15:14:41 +00:00
Abdelrazak Younes
401b223dfb Transfer LFUN_INSET_APPLY from GuiView to BufferView.
The list of dialog edited inset is now stored in BufferView.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31472 a592a061-630c-0410-9148-cb99ea01b6c8
2009-09-27 10:29:13 +00:00
Abdelrazak Younes
16a82d6f97 * Move LFUN_TEXTCLASS_* and LFUN_TEXTCLASS_* to BufferView. This is a bit problematic because we don't check is this is a document BufferView or not for these LFUNs. We probably have to dispatch both to currentBufferView() and, if that fails, to documentBufferView(); same as we do know for current Buffer and document Buffer. Ideally those LFUN should go to Buffer as they operate on the full Buffer and the cursor is only needed either for an Undo record or to restore a cursor position. But we don't know how to do that inside Buffer of course.
* I transferred local function loadLayoutFile() in LyXFunc.cpp to a LayoutFileList::load().

Richard, as I am not into this layout thing, please check that these LFUNs still operate correctly (except from an embedded work area of course).


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31412 a592a061-630c-0410-9148-cb99ea01b6c8
2009-09-19 20:56:12 +00:00
Richard Heck
4daf7b5dfc The Buffer::dispatch() patch.
This patch enhances the Buffer::dispatch() method to make it a full-fledged
member of the dispatch sequence. The most immediate payoff is that LFUNs that
are handled in Buffer::dispatch() can be used from the command line.

We make better use of the DispatchResult object and return error information 
through it, rather than using return values. (This was JMarc's suggestion.) We 
also introduce a  corresponding Buffer::getStatus() method, and modify 
BufferView::getStatus() to return a flag indicating whether a decision has been 
made, as is already done in some other cases.

Finally, some LFUNs are moved to Buffer::dispatch(), including LFUN_BUFFER_PRINT.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29125 a592a061-630c-0410-9148-cb99ea01b6c8
2009-04-06 12:12:06 +00:00
Vincent van Ravesteijn
e207b0250f Make sure that the document is only scrolled to the cursor when the cursor is/was visible before resizing .
Resizing can occur by toggling toolbars (bug 4733), or by creating or closing buffers which causes the tabbar to toggle (e.g. bug 4174, comment 5).



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29066 a592a061-630c-0410-9148-cb99ea01b6c8
2009-04-03 21:39:06 +00:00
Vincent van Ravesteijn
7ad28349ab Fix bug 4935: Scroll down below document
http://bugzilla.lyx.org/show_bug.cgi?id=4935

* GuiPrefs: Add an option to the Editing dialog.

* BufferView: Scroll below document if the option is set.

* LyXRC: Write/read the option from preferences file.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28947 a592a061-630c-0410-9148-cb99ea01b6c8
2009-03-27 17:41:58 +00:00
Vincent van Ravesteijn
1bbcd403fc Fix bug 4733: Auto popup of math toolbar hides the math editor
http://bugzilla.lyx.org/show_bug.cgi?id=4733

* GuiWorkArea: This adds "buffer_view_->scrollToCursor();" to GuiWorkArea::resizeBufferView() to make sure that the cursor remains visible. 

* BufferView: Make sure that we can call the scrollToCursor function without causing a new repaint.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28946 a592a061-630c-0410-9148-cb99ea01b6c8
2009-03-27 17:27:38 +00:00
Vincent van Ravesteijn
b0d53e3250 Fix bug 5526: screen-recenter LFUN doesn't work
http://bugzilla.lyx.org/show_bug.cgi?id=5526

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28916 a592a061-630c-0410-9148-cb99ea01b6c8
2009-03-26 00:09:16 +00:00
Pavel Sanda
e59dbac2ed Introduce jump-back navigation through bookmark 0
http://bugzilla.lyx.org/show_bug.cgi?id=898
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg147949.html


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28478 a592a061-630c-0410-9148-cb99ea01b6c8
2009-02-13 13:46:08 +00:00
Vincent van Ravesteijn
550f1d9ce8 Do not paint an invisible cursor.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27631 a592a061-630c-0410-9148-cb99ea01b6c8
2008-11-18 23:57:26 +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
Jean-Marc Lasgouttes
d585528d50 fix properly http://bugzilla.lyx.org/show_bug.cgi?id=2040
* BufferView.cpp (setCursorFromInset): new method, useful to find
	an inset that is known to be in the document.

	* frontends/qt4/GuiView.cpp (dispatch): do a proper recordUndo
	befire appplying changes to an inset. The insets are responsible
	for recording additional undo steps that could be needed.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26428 a592a061-630c-0410-9148-cb99ea01b6c8
2008-09-17 14:51:27 +00:00
Abdelrazak Younes
979f5211a4 Fix PageDown/Up when at bottom/top of the document. Now the cursor moves to the bottom/top position. This also fixes http://bugzilla.lyx.org/show_bug.cgi?id=4384
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25441 a592a061-630c-0410-9148-cb99ea01b6c8
2008-07-04 11:33:28 +00:00
Abdelrazak Younes
2a1b0968cb more sensible value for max scrollbar value. Related to http://www.lyx.org/trac/changeset/24298.
Should fix bug http://bugzilla.lyx.org/show_bug.cgi?id=4901



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25337 a592a061-630c-0410-9148-cb99ea01b6c8
2008-06-20 12:52:38 +00:00
André Pönitz
bdc6d56cc7 initialize scrollbar parameters to some sensible dummy values.
valgrind reported conditional jumps on uninitialized values
in BufferView.cpp:1920


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24298 a592a061-630c-0410-9148-cb99ea01b6c8
2008-04-16 18:18:12 +00:00
Abdelrazak Younes
8675175492 declaration cleanup
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23554 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-08 09:01:41 +00:00
Abdelrazak Younes
5a9653203f Fix PageUp/Down select when at the top/bottom of a document.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23510 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-06 12:41:38 +00:00
Stefan Schimanski
833f0bab52 * minimize redraws during completion
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23105 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-21 19:43:16 +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
6cdf6bd6ab Support full screen in BufferView
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22899 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-09 17:20:23 +00:00
Abdelrazak Younes
81e06f7bc9 Fix scrolling to top and bottom of the document.
* BufferView
- showCursor(DocIterator): new DocIterator argument.
- showCursor(): use above method.
- scrollDocView(): take care of top and bottom special cases early in the method.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22707 a592a061-630c-0410-9148-cb99ea01b6c8
2008-01-29 09:51:12 +00:00
Abdelrazak Younes
ae0667c112 More scrolling work. Now the scrollbar parameters are normalized against the screen geometry and coordinates. This simplifies the logic and the code significantly.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22614 a592a061-630c-0410-9148-cb99ea01b6c8
2008-01-17 17:06:55 +00:00
Abdelrazak Younes
5587709f0e Introduce LFUN_SCROLL.
Santa-clauss.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22324 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-27 11:37:07 +00:00
Abdelrazak Younes
fc2658eff0 initial basic context menu support.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22309 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-26 12:40:58 +00:00
Abdelrazak Younes
02110a3d5b Prepare the code for context menu support.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22300 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-25 20:12:07 +00:00
Abdelrazak Younes
7c832d2d84 Implement tooltips for visible insets.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22298 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-25 18:53:38 +00:00
Abdelrazak Younes
96d2d6fc50 * LyXFunc::dispatch(): invert BufferView::dispatch() and cursor::dispatch() calling.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22227 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-21 10:42:59 +00:00
Abdelrazak Younes
2e8fdbb54b rename BufferView::center() to showCursor().
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22222 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-21 08:35:43 +00:00
Abdelrazak Younes
0743f576cb * BufferView:
- dispatch(): transfer LFUN_FILE_INSERT_PLAINTEXT_* to GuiView::dispatch()
- insertPlaintextFile(): split in BufferView::insertPlaintextFile() and GuiView::insertPlaintextFile()

This patch get rid of FileDialog use in BufferView. Remains Buffer, Converters and LyXFunc.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21930 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-02 20:05:17 +00:00
Abdelrazak Younes
c68601da9f * BufferView:
- dispatch(): transfer LFUN_FILE_INSERT to GuiView::dispatch()
- menuInsertLyXFile(): split in BufferView::insertLyXFile() and GuiView::insertLyXFile()


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21923 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-02 17:50:08 +00:00
Abdelrazak Younes
b1db731a98 * FileName::fileContents(): new argument to define the file encoding.
* BufferView:
- insertPlaintextString(): now accept a FileName.
- contentsOfPlaintextFile(): ditto and use FileName::fileContents().
 

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21915 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-02 11:55:25 +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
926abae753 Simplify single par drawing:
* ParagraphMetrics::computeRowSignature(): Integrate row's dimensions and selection status in the row signature.
* TextMetrics::drawParagraph(): compute the row signature here and rely on that to decide if a redraw is needed or not.
* BufferView::Private: get rid of the ViewMetricsInfo member. Just keep the ScreenUpdateStrategy.
* BufferView::draw(): full screen update even for singlePar case because the row signature will detect if something needs to be redrawn.
* Text3.cpp: get rid of hack following architecture update.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21650 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-17 11:27:03 +00:00
Abdelrazak Younes
e660f44001 Current update architecture doesn't need multiParSel() special case anymore.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21467 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-06 09:34:16 +00:00
Abdelrazak Younes
f84080f01c * Bufferview::updateMetrics(): Separate out the SinglePar optimization.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21463 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-06 08:32:25 +00:00
André Pönitz
14918bf4b9 remove unneeded @includes from BufferView.h
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21409 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-03 18:50:54 +00:00
André Pönitz
a5263e0f92 introduce a header to forward declare std::string.
hope there are only conforming implementaions out there ;-}


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21312 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-31 22:40:34 +00:00
Abdelrazak Younes
61dba28fc4 please Angus.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20935 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-13 07:33:07 +00:00
Abdelrazak Younes
a800da1bfe initial support for shift + right-mouse-click selection.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20903 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-11 14:46:53 +00:00
Abdelrazak Younes
9a458ec6e9 Move private part of BufferView to a private implementation.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20896 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-11 09:59:01 +00:00