Commit Graph

296 Commits

Author SHA1 Message Date
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
Abdelrazak Younes
e3032e7d0e * BufferView::update(): renamed to processUpdateFlags() to clarify the intent. Also get rid of the default argument which added to the confusion as to what was the purpose of update(). Now also emit Buffer::changed() signal internally instead of assuming that the caller will act upon the returned boolean.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20884 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-10 08:52:55 +00:00
Abdelrazak Younes
86e8f751e1 Small API cleanup: as BufferView already use Buffer::changed() make it use it some more instead of WorkArea.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20747 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-05 09:38:40 +00:00
André Pönitz
58ab972f71 last commit was incomplete... not sure how I managed this..
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20710 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-03 20:15:49 +00:00
André Pönitz
095cf23394 shuffle some code around
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20706 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-03 18:56:37 +00:00
André Pönitz
b847b8c7df the delegate patch
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20667 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-02 18:27:20 +00:00
Abdelrazak Younes
3ca9ddb6ed Move most of the Gui specific code in Toolbars to its new qt4 specialization GuiToolbars.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20644 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-01 20:45:50 +00:00
André Pönitz
fad47c0fe0 boost/utility -> boost/noncopyable
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20608 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-30 15:47:00 +00:00
André Pönitz
122f32ea29 cosmetics
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20578 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-29 09:22:17 +00:00
André Pönitz
f1687373b1 cosmetics
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20577 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-29 08:02:37 +00:00
Abdelrazak Younes
2417d9d911 * BufferView::updateMetrics(): split up the method in two for the SinglePar case.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20563 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-28 09:11:24 +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
a276c05770 transfer margin declaration to BufferView.h
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19854 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-28 15:31:04 +00:00
Abdelrazak Younes
a43e822c98 Transfer rowpainter.cpp:paintText() to BufferView::draw()
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19843 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-27 22:53:16 +00:00
Abdelrazak Younes
91f8cbe204 * BufferView::workAreaResize(): renamed to resize.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19766 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-24 07:05:19 +00:00
Abdelrazak Younes
e809647c77 simplify BufferView::moveToPosition() use for the external use (in LyXView and LyXFunc).
* BufferView::moveToPosition()
- now only return success boolean
- now schedule a screen centering
- now set the current font to the new position.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19722 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-22 14:25:51 +00:00
Abdelrazak Younes
5203c56db4 Fix bug 3427:
http://bugzilla.lyx.org/show_bug.cgi?id=3427

The problem was that offset_ref_ was calculated based on an empty metrics. The solution is delay the calculation up until the next metrics update.

* BufferView:
- center(): now just set the anchor_ref and program a new screen recentering.
- updateOffsetRef(): update the offset_ref_


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19721 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-22 14:14:52 +00:00
Abdelrazak Younes
0fcae6cc10 * BufferView::buffer() returns a reference instead of a pointer.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19691 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-21 13:03:55 +00:00
Abdelrazak Younes
1356543c45 The BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas:
* Buffer:
- get rid of cursor_ and anchor_
- ~Buffer(): update the labels of its master buffer before closing
- closing(): pass the Buffer address.

* BufferView():
- BufferView(): needs a valid Buffer (should be const in the future.
- most of the change is about removing all test of buffer_ nullity.
- resize(): deleted.
- setBuffer(): deleted.

* Application:
- newLyXView(): simplification
- updated design description in Application.h

* Gui/GuiImplementation: remove all WorkAreas and BufferView creation/Deletion. Workareas are directly handled by  LyXView/GuiView and BufferView is created/delete by WorkArea.

* LyXView/GuiView: implement the new design

What is not working yet:
- the close tab button: it is implemented but does not show up.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19686 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-21 07:33:46 +00:00
Richard Heck
eacbcb3f3a Fix bug 4096. Don't disconnect the buffer until we're ready to connect again.
Also, clean up the code a little.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19287 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-03 14:07:39 +00:00
Abdelrazak Younes
4a53fa6e01 Allow unicode in Layout names.
* Layout.h:
  - name_, obsoleted_by_, depends_on_ are now docstrings.

All other changes results from the above string -> docstring changes. In particular, we now try to translate the layout names only if possible (i.e. if they are ASCII only).



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19042 a592a061-630c-0410-9148-cb99ea01b6c8
2007-07-11 13:39:08 +00:00
Abdelrazak Younes
144e721b65 Polish revision 18825 and fix some remaining issues with child documents. The diff is bigger than it should because of white space issues.
* buffer_funcs.{h,cpp}: new checkAndLoadLyXFile() transferred from BufferView::loadLyXFile().

* BufferView::loadLyXFile(): deleted.

* LyXView::loadLyXFile(): simplify logic and fix some issues:
  - buggy child document leads to crash due to error list dialog.
  - ensure that we switch to buffer if there's some errors.
  - use LyXView::setBuffer() instead of repeating code.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18828 a592a061-630c-0410-9148-cb99ea01b6c8
2007-06-19 16:03:47 +00:00
Richard Heck
d3003c1022 Polish the Toc and labels updating when loading a child document.
Fix Bug 3860: Toc crash when loading a child documents.

* BufferView::loadLyXFile(): simplify, transfer last part to
  LyXView::loadLyXFile().
  Change return value to Buffer created by load (or 0 if none).
  Ultimately, this should all be moved to buffer_funcs.cpp, as it is no
  longer needed here.

* Buffer::setParentName(): small fix to avoid recursive includes.

* LyXView:
- setBuffer(): properly update the labels and the Toc if this is [LOAD Child
  Document] command. Move buffer connection and disconnection, simplifying
  earlier code.
- loadLyXFile(): get some code from BufferView::loadLyXFile() and from
  LyXFunc::LFUN_BUFFER_CHILD_OPEN, properly handle the child document case.
  There's a lot of overlap with setBuffer() here. This needs cleaning.

* LyXFunc: add optional argument to LFUN_BUFFER_CHILD_OPEN to indicate if
  the document is being opened by LyX itself rather than the user (as on 
  View>DVI, for example).

* LyX: adapt to loadLyXFile() API changes.

* insets/InsetInclude: use LFUN_BUFFER_CHILD_OPEN rather than calling
  loadLyXFile() directly. Make use of new optional argument.

With this in place, the only thing missing for proper multipart document support is to automatically update the parent Buffer when switching from the parent Buffer. This would be very useful when you work with multiple document sharing the same child documents (as I often do).



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18825 a592a061-630c-0410-9148-cb99ea01b6c8
2007-06-19 14:56:52 +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
Lars Gullik Bjønnes
897436efbb Whitespace cleanup
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18550 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-28 22:27:45 +00:00
André Pönitz
e0d54dd3b4 LyXText -> Text
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18103 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-29 23:33:02 +00:00
André Pönitz
32871c1284 rename InsetBase to Inset
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18089 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-29 13:39:47 +00:00
Bo Peng
e36fba33ab Last (?) batch of renames:
src/frontends/Alert.h src/frontends/alert.h
src/frontends/Alert.cpp src/frontends/alert.cpp
src/frontends/Alert_pimpl.cpp src/frontends/alert_pimpl.cpp
src/frontends/qt4/Alert_pimpl.cpp src/frontends/qt4/alert_pimpl.cpp
src/frontends/controllers/ButtonPolicies.cpp src/frontends/controllers/ButtonPolicy.cpp
src/frontends/controllers/ButtonPolicies.h src/frontends/controllers/ButtonPolicy.h
src/insets/InsetEnv.cpp src/insets/InsetEnvironment.cpp
src/insets/InsetEnv.h src/insets/InsetEnvironment.h
src/mathed/MathMacroTable.h src/mathed/MacroTable.h
src/mathed/MathMacroTable.cpp src/mathed/MacroTable.cpp
src/lyx_cb.h src/callback.h
src/lyx_cb.cpp src/callback.cpp
src/UpdateFlags.h src/update_flags.h


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18076 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-28 20:44:46 +00:00
André Pönitz
42123ab8a7 rename LCursor->Cursor
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18040 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-26 14:56:30 +00:00