Commit Graph

192 Commits

Author SHA1 Message Date
Abdelrazak Younes
2cf1154734 Fix bug http://bugzilla.lyx.org/show_bug.cgi?id=4599
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23401 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-02 19:07:15 +00:00
Stefan Schimanski
8c4b08920e * bug fix to only do paragraph redraws, not fullscreen
* avoid an extra redraw due to completion when typing


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23349 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-29 09:18:46 +00:00
Richard Heck
d8a6b5bfd0 Remove TextClassPtr without losing the type safety it provided.
See these threads:
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg136112.html
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg136062.html
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg135997.html
for some background.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23299 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-28 01:42:02 +00:00
André Pönitz
1cca0a86bd API cosmetics
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23295 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-27 23:03:26 +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
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
Richard Heck
0362c6aae7 Andre's s/getTextClass/textClass/ cleanup.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23190 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-24 15:06:35 +00:00
Richard Heck
2e7d1199df Revert 23154.
Sorry, Andre, but this broke not only the modules stuff but the general handling of TextClasses. I'm not opposed to doing this sort of thing, but it's going to be a little more complicated. I'll do it when I get a bit of time, or I can explain what the issue is here if you want to do it.

I'll separately re-commit some of the cleanup here.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23189 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-24 14:59:23 +00:00
André Pönitz
b306e9a2e1 Replace the text class shared ptr by good old index-into-global-list.
Also a few cosmetical changes where I xould not resist.

Would be nice if the 'modules people' could verify that their baby 
is strill alive... 



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23154 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-23 11:36:15 +00:00
Stefan Schimanski
f2837e7bcb * remove debug output
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23149 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-23 03:13:54 +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
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
f27c3fde43 * BufferView::resize() Remove showCursor() call when resizing.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23085 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-21 09:23:01 +00:00
Abdelrazak Younes
2a42f56b4e following revert of 23068: Better fix for bug 4044
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23076 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-20 14:53:19 +00:00
Abdelrazak Younes
3d3a55386d revert 23068 as this was causing a recursive repaint.
Warning for the future: *no* painting activity should happen inside a paint event.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23071 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-20 13:32:03 +00:00
Pavel Sanda
72b270ab4b Improve fullscreen mode (bug 4146).
- added toolbars/tabbar/scrollbar toggling
- added text width control
- added GUI preferences & menu & shortcut

Known problems:
- Outliner in Mac is seeking some Mac devie to fix (see hints here:
  http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg135382.html ) 
- Toolbars visibility is shared between windows (views)
  (needs toolbars overhaul).
- Adding new tab items does not reflect fullscreen mode
  (i.e. margins and tabbar get visible)



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23069 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-19 21:51:55 +00:00
Pavel Sanda
1ab314f8e6 Update cursor and scrollbar after resize.
Fixes bug 4044.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23068 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-19 21:27:18 +00:00
Richard Heck
040f3431e7 Fix bug 4037 and related problems. The patch has been cleaned up a bit
from the one posted to the list.

The basic idea has two parts. First, we hard code an "empty layout"
(called PlainLayout, for want of a better name) in TextClass and read it
before doing anything else. It can therefore be customized by classes,
if they want---say, to make it left-aligned. Second, InsetText's are
divided into three types: (i) normal ones, that use the "default" layout
defined by the text class; (ii) highly restrictive ones, such as ERT and
(not quite an inset) table cells, which demand the empty layout; (iii)
middling ones, which default to an empty layout and use the empty layout
in place of the default. (This is so we don't get the same problem we
had with ERT in e.g. footnotes.) The type of inset is signaled by new
methods InsetText::forceEmptyLayout() and InsetText::useEmptyLayout().
(The latter might better be called: useEmptyLayoutInsteadOfDefault(),
but that's silly.) The old InsetText::forceDefaultParagraphs() has been
split into these, plus a new method InsetText::allowParagraphCustomization(). 
A lot of the changes just adapt to this change.

The other big change is in GuiToolbar: We want to show LyXDefault and
the "default" layout only when they're active.

There are a handful of places where I'm not entirely sure whether we
should be using forceEmptyLayout or !allowParagraphCustomization() or
both. The InsetCaption is one of these. These places, and some others,
are marked with FIXMEs, so I'd appreciate it if people would search
through the patch and let me know whether these need changing. If they
don't, the FIXMEs can be deleted.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22966 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-12 17:31:07 +00:00
Abdelrazak Younes
2f54e2b75f LFUN_PARAGRAPH_GOTO: break/continue early. Force a full redraw.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22954 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-12 08:04:59 +00:00
Abdelrazak Younes
76ec27281b * BufferView::putSelectionAt(): Ensure a redraw in any case.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22927 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-10 19:18:57 +00:00
Abdelrazak Younes
149778a0a5 Ensure that the cursor is visible when searching text. Should fix the spellchecker and a few other bugs.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22926 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-10 19:05:09 +00:00
Abdelrazak Younes
02e8322c79 Fix LFUN_WORD_FIND
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22925 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-10 18:52:32 +00:00
Abdelrazak Younes
288b939274 More sensible default margins for fullscreen mode.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22913 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-10 10:01:16 +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
André Pönitz
24fdfc7d5e start work on less-likely-to-misuse iterators.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22898 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-09 15:23:05 +00:00
José Matox
03fb3b0aec Patch to please gcc 4.3. Less bloat in the include headers means that
we need to include explicitly some header files now.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22846 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-07 17:04:06 +00:00
Abdelrazak Younes
28826a461c header cleanup
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22826 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-07 08:58:35 +00:00
Stefan Schimanski
bfd3a964b3 * show anchor paragraph completely if the whole buffer is visible.
We need some better handling of the case when the cursor is in the
very first line, but the line is not completely visible. If the line
is not heigher than the BufferView we should scroll up to show it
completely.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22790 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-05 14:23:59 +00:00
Stefan Schimanski
0364c6c3cb * Make sure the cursor is completely visible when the BufferView get's its initial size.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22786 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-05 13:14:53 +00:00
Abdelrazak Younes
ddec18ca01 * BufferView::scrollDocView(): take care of the general case before the particular top and bottom cases as those don't work very well when the document starts or ends with a big inset.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22710 a592a061-630c-0410-9148-cb99ea01b6c8
2008-01-29 13:34:18 +00:00
Abdelrazak Younes
b78acb0b9d * BufferView::scrollDocView(): simplify by using showCursor() and add some comments.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22708 a592a061-630c-0410-9148-cb99ea01b6c8
2008-01-29 10:17:41 +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
Stefan Schimanski
ab1a045d10 * fix random jumps when scrolling very fast using a touchpad or mouse wheel.
The problem was this: The value in BufferView::scrollDocView(int value) is
relative to the d->scrollbarParameters_.min/max interval and _not_ absolute.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22675 a592a061-630c-0410-9148-cb99ea01b6c8
2008-01-26 00:47:22 +00:00
Pavel Sanda
f0f485e40d Get rid of ugly strings in .po file
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22625 a592a061-630c-0410-9148-cb99ea01b6c8
2008-01-18 22:50:19 +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
68d11a0b29 scrolling tweaks...
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22600 a592a061-630c-0410-9148-cb99ea01b6c8
2008-01-16 15:15:26 +00:00
Abdelrazak Younes
bc3029bcf4 scrolling tweaks... asymptotically tending towards scrolling correctness...
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22599 a592a061-630c-0410-9148-cb99ea01b6c8
2008-01-16 14:31:00 +00:00
Abdelrazak Younes
2db839d7bb Scrolling fixes...
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22598 a592a061-630c-0410-9148-cb99ea01b6c8
2008-01-16 09:06:36 +00:00
Bo Peng
c20f5a64d9 Embedding: simplify the interface of EmbeddedFiles, which will be later merged to EmbeddedFileList
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22444 a592a061-630c-0410-9148-cb99ea01b6c8
2008-01-08 18:33:43 +00:00
Abdelrazak Younes
e40499d5df BufferView::showCursor(): better fix.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22438 a592a061-630c-0410-9148-cb99ea01b6c8
2008-01-08 15:49:03 +00:00
Pavel Sanda
922aa7b1e8 Add characters counting.
Introduce LFUN_STATISTICS.
see http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg134033.html .


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22433 a592a061-630c-0410-9148-cb99ea01b6c8
2008-01-08 15:18:00 +00:00
Abdelrazak Younes
8379c2b70f Fix anchor bug.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22432 a592a061-630c-0410-9148-cb99ea01b6c8
2008-01-08 14:55:11 +00:00
Bo Peng
ed2b1631db Showing a message box after embedding status is changed.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22349 a592a061-630c-0410-9148-cb99ea01b6c8
2008-01-03 16:41:06 +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
88942bcae4 Fix a crash with depm.
* BufferView::checkDepm(): update d->cursor_ in case of depm.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22322 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-27 10:39:25 +00:00
Abdelrazak Younes
f3326796a1 Fix next-inset-toggle after scrolling work.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22321 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-27 09:44:39 +00:00
Abdelrazak Younes
02fd454216 header cleanup.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22316 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-26 14:21:50 +00:00
Abdelrazak Younes
ebdd03d477 Properly fix undo/redo following scroll work.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22315 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-26 14:10:24 +00:00
Abdelrazak Younes
e1033d4ad6 Fix undo/redo following scroll work.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22314 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-26 14:00:55 +00:00