Commit Graph

151 Commits

Author SHA1 Message Date
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
fd34bd3914 Cosmetics and cleanup.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21649 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-16 23:00:57 +00:00
Abdelrazak Younes
7a4c9a258e row selection tweaks.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21648 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-16 22:52:15 +00:00
André Pönitz
e1ce2f92db reduce line noise
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21631 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-15 20:04:51 +00:00
Abdelrazak Younes
8c1f803b83 simplify text selection drawing.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21628 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-15 17:01:38 +00:00
Abdelrazak Younes
cdf1378200 Introducing TextClassPtr.h to minimize header dependencies.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21506 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-07 23:25:08 +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
André Pönitz
9cca7a0c1a remove unneeded Cursor.h include;
use strfwd 


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21456 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-05 22:54:53 +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
André Pönitz
f8f78fe59d de-tuple-fication; cosmetics
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21389 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-02 20:41:04 +00:00
Stefan Schimanski
1231489798 * dynamic macros as described in http://1stein.org/download/dynmacro.pdf
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21328 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-01 11:13:07 +00:00
Abdelrazak Younes
c3452835a8 * MetricsInfo::background_color: int -> ColorCode
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21255 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-29 10:36:20 +00:00
Abdelrazak Younes
d2bfe05827 Forbid implicit conversion from FontInfo to Font.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21250 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-28 23:32:18 +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
6725b2db59 Reduce header dependencies in Paragraph.h
- Move Changes.h out of Paragraph.h
- pimpl the inset list.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21033 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-18 15:29:51 +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
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
André Pönitz
cd72af583f cosmetics
(maily move layout related enums into a header of there own to remov
include dependencies, alos rename a few things)


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20598 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-29 20:02:32 +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
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
aff5bdbc34 * TextMetrics::drawParagraph(): add 'inside' information to '-dbg painting'.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20561 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-28 07:44:02 +00:00
Abdelrazak Younes
5e8d4df0a5 Temporarily fix jumpy cursor.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20526 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-26 21:27:17 +00:00
Abdelrazak Younes
f93367f9e6 Fix RTL inset painting.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20449 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-23 15:35:06 +00:00
Abdelrazak Younes
0dc4a1fa97 Fix Cut&Paste bug.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20445 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-23 08:59:50 +00:00
Abdelrazak Younes
237c132c1e * Inset:
- get rid of the cached Dimension. Text inset dimensions are saved in ParagraphMetrics and mathed maintain their own dimension where needed.
- width(), ascent(), descent(): deleted.
- dimension(): now needs a valid BufferView.
- metrics(): now void.

* BufferView::getCoveringInset(): simplify.

* ParagraphMetrics(): now cache inset dimensions.




git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20420 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-21 20:39:47 +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
Abdelrazak Younes
ae7c588552 * TextMetrics:
- first() and last(): change return type because std::pair of reference didn't work (i.e. bug)

* BufferView::workAreaDispatch(): re-enable and fix 'mouse hover' feature.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20372 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-20 08:48:28 +00:00
Abdelrazak Younes
516ff470d8 Fix InsetBox drawing and remove remnant of the wide() hack.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20334 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-18 08:52:38 +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
e6854f527f * bufferview_funcs.cpp:status(): use new TextMetrics::parPosition().
* TextMetrics::cursorNext(): compil fix.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20239 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-12 12:07:45 +00:00
Abdelrazak Younes
8319910995 Fix PageDown/Up temporarily.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20237 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-12 08:15:56 +00:00
Abdelrazak Younes
6ce171eec8 Transfer the Paragraph position cache from CoordCache to ParagraphMetrics and TextMetrics.
* ParagraphMetrics::position_: new private member (and associated access method).

* TextMetrics:
- origin_: new screen position cache.
- use origin_ and ParagraphMetrics::position() instead of the parPos cache.

* Cursor:
- comment out buggy bruteFind() method, will work on that later.

* BufferView::updateMetrics(): refactor and simplify to use new cache and to gather everything SinglePar related.





git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20214 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-11 16:04:10 +00:00
Abdelrazak Younes
c3e3534148 * TextMetrics::draw(): withdraw first row ascent before drawing because the convention is that the baseline of a multirow text is the baseline of the first row.
All other files: adapt to above change.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20177 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-09 20:21:43 +00:00
Abdelrazak Younes
d4bf8e0a21 * TextMetrics::drawSelection(): use parMetrics() instead of direct access just in case. Should fix crash on selection with PageUp.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20081 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-05 21:26:17 +00:00
Abdelrazak Younes
d1813ca269 * TextMetrics::draw(): get rid of the first par ascent offset.
* BufferView::draw(): adapt to above change.

* InsetCollapsable::draw(): ditto -> get rid of textdim_ member.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20068 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-05 13:45:58 +00:00
Abdelrazak Younes
eed6514dd0 Move selection painting closer to row painting. Single row painting is now possible for selection.
* Row:
- setSelection(): set selection begin and end for this row.
- sel_beg, sel_end: new public members.

* BufferView::draw()
- do not trigger a full repaint for selection.
- use TextMetrics::draw() instead of hand calling TextMetrics::drawParagraph().

* InsetText::draw(): don't call TextMetrics::drawSelection().

* InsetMathMBox::drawSelection(): remove.

* TextMetrics:
- drawSelection(): simplify a bit. Now private.
- redoParagraph(): memorize Row selection status.
- x2pos(): fix crash when selecting with PageDown.
- draw(): fill-in the ParPos cache before everything else and not in drawParagraph().
- drawParagraph(): take care of row selection painting.







git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20066 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-05 13:04:05 +00:00
Alfredo Braunstein
a8ed1add4d rename Paragraph::isRightToLeftPar -> isRTL for the sake of consistence
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20031 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-04 10:27:55 +00:00
Alfredo Braunstein
cdd5c1bb17 fix multi-cell selection
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20026 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-03 22:16:54 +00:00
Alfredo Braunstein
3b6eb864d5 enable some non-rtl optimization
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20021 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-03 13:34:26 +00:00
Alfredo Braunstein
15dc381ce9 optimization: save some font copying
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20016 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-02 23:37:11 +00:00
Abdelrazak Younes
2ea432bab1 * TextMetrics: getDisplayFont() and isRTLBoundary() takes pit instead of Paragraph.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20015 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-02 22:28:49 +00:00
Abdelrazak Younes
d35d25460b * Text: Move some more stuff from Text to TextMetrics:
- getFont() becomes TextMetrics::getDisplayFont()
- setCharFont() now needs a display font.
- setInsetFont() and setFont() now needs a BufferView, will be transferred to TextMetrics too.
- isRTL(): moved to TextMetrics
- isRTLBoundary(): ditto
- font_: ditto

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20014 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-02 21:48:49 +00:00
Alfredo Braunstein
052e9071e9 fix crash + shut up warning
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20011 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-02 18:05:37 +00:00
Abdelrazak Younes
bc6304d760 Don't save background color in Text. Hand it down at drawing time.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20002 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-02 14:34:15 +00:00
Abdelrazak Younes
af06ed5ff1 Transfer current_font and real_current_font from Text to Cursor.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19999 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-02 13:35:48 +00:00
Abdelrazak Younes
cb796d31b0 Transfer metrics and screen related methods from Text to TextMetrics.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19995 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-02 11:27:19 +00:00
Abdelrazak Younes
502b048246 Transfer metrics and screen related methods from Text to TextMetrics.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19994 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-02 11:21:33 +00:00
Abdelrazak Younes
8695368e29 Fix crash when selection begins or ends outside the visible screen.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19992 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-02 10:23:28 +00:00
Abdelrazak Younes
4048448236 Transfer metrics and screen related methods from Text to TextMetrics.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19991 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-02 09:44:08 +00:00
Alfredo Braunstein
aa670e90c8 metrics fix: reset some Row values to default in top of computeRowMetrics as the code there assumes it
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19990 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-02 09:07:07 +00:00
Abdelrazak Younes
d166ee8699 Temporarily remove the assertion because it doesn't work on new doc.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19983 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-01 22:01:34 +00:00
Abdelrazak Younes
53299d06f8 Re-implement the wide() hack in a clean way (at metrics level): an InsetText will have automatically occupy the full allowable width if there is more than one paragraph or more more than one row.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19975 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-01 14:49:08 +00:00
Abdelrazak Younes
087fc75a9d Fix wrapping bug within inset. dim_.wid was not set!
Add some commented out debug info.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19972 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-01 10:30:44 +00:00
Abdelrazak Younes
5aefefe0cf Improve painting debug info.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19971 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-01 09:36:53 +00:00
Abdelrazak Younes
4ed011dbd1 Improve painting debug info.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19970 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-01 09:33:57 +00:00
Abdelrazak Younes
fb74d5a476 * InsetCollapsable::metrics(): it seems we don't need to refit anymore. Saves an InsetText::metrics() call and enable single Row painting within opened inline insets.
* TextMetrics::drawParagraph(): force full repaint on Insets that are within the current repainting row.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19968 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-01 09:24:20 +00:00
Abdelrazak Younes
7d97e555fc Transfer Paragraph::hfillExpansion() to ParagraphMetrics. This also reduce the dependency to Row.h which is probably going to change in the near future.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19951 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-31 14:46:13 +00:00
Abdelrazak Younes
2bff0157b6 Transfer Text::drawSelection() to TextMetrics.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19940 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-31 10:05:12 +00:00
Abdelrazak Younes
a088c6754a Finally enable single row repainting within insets! The inset width needs to stay fixed of course.
* BufferView::draw(): makes use of PainterInfo::full_repaint
* TextMetrics::drawParagraph(): ditto.
* InsetText::drawSelection(): don't fillRectangle() if there's no selection.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19918 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-30 15:17:38 +00:00
Abdelrazak Younes
97f66c07f6 * RowPainter:
- paintOnlyInsets(): new public method for inset painting only in case the inset dimension didn't change within a Row.
- paintInset(): put out everything not strictly related to the inset painting itself.
- paintHfill(): new private method to cut the reduce code in paintText().

* TextMetrics::drawParagraph(): use paintOnlyInsets() when the Row text nor it's dimension changed.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19912 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-30 13:19:24 +00:00
Abdelrazak Younes
79ba8fe22a Bug fixes. changed_ was always true...
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19901 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-29 23:06:14 +00:00
Abdelrazak Younes
8239945aa7 Enable use of Row::changed()
* TextMetrics::redoParagraph(): crop the RowList if it is too big.
* ParagraphMetrics::reset():  don't clear its RowList.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19897 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-29 21:33:11 +00:00
Abdelrazak Younes
8175971041 Transfer ParagraphMetrics::rowChangeStatus() to Row::changed(). Prepare for fine grained row redrawing.
^ Row:
- changed_: new boolean to inform change status at draw time.
- crc_: new crc_ signature
- inline pos() and endpos()
- replace width(), ascent() and descent() direct access with dimension().

* ParagraphMetrics
- do not maintain row_signature_ anymore
- rename calculateRowSignature() to computeRowSignature() and make it public

* TextMetrics
- redoParagraph(): don't clear the ParagraphMetrics row list, reuse and update it.
- rowHeight(), rowWidth(), rowBreakPoint(): take first/end positions instead of Row.





git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19895 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-29 21:03:41 +00:00
Abdelrazak Younes
a40d6cd7bc Take Track-Change into account when calculating row signature.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19876 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-28 22:44:09 +00:00
Abdelrazak Younes
34aba4a42b Update comment.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19870 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-28 18:30:15 +00:00
Abdelrazak Younes
3f54edc200 * TextMetrics::redoParagraph(): we need to check the returned value of Inset::metrics() nevertheless because some changes don't involves a dimension change (especially in multiline InsetText).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19868 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-28 18:25:28 +00:00
Abdelrazak Younes
0e7ef480f7 Don't draw if there's nothing to draw.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19866 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-28 18:05:55 +00:00
Abdelrazak Younes
5440aad928 We are not forced to redraw the row each time the cursor is moved.
* TextMetrics.cpp: CursorOnRow() removed.
* TextMetrics::drawParagraph() do not check cursor position.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19859 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-28 16:39:46 +00:00
Abdelrazak Younes
be8de62ae2 Merge the Row and RowMetrics class. Those classes were separated in the 1.4 code base because the Row list was part of Paragraph. As it is now in ParagraphMetrics, there is no need to separate them. Also, only compute the rowmetrics once when the containing paragraph is redone.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19858 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-28 15:47:53 +00:00
Abdelrazak Younes
971c543b34 - Transfer rowpainter.cpp:paintPar() to TextMetrics::drawParagraph()
- move RowPainter class out of the anonymous namespace so that it can be used by TextMetrics::drawParagraph().


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19848 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-28 08:57:13 +00:00
Abdelrazak Younes
55f184563e - Transfer rowpainter.cpp:paintTextInset() to TextMetrics::draw()
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19842 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-27 22:36:20 +00:00
Abdelrazak Younes
b52c339cce Bug fix: correctly redraw a Row containing and inset which Dimension slightly changed. This replace the need for the former leftEdgeFixed boolean in rowpainter.C:paintPar() before the removal of the wide() hack in revision 19834.
* Inset::dimension(): access to dim_

* TextMetrics::redoParagraph(): don't trust Inset::metrics() returned boolean as the internal dimension is changed down in the inheritance chain for InsetFoot->InsetCollapsable->InsetText.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19838 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-27 16:30:57 +00:00
Abdelrazak Younes
b3b6f44755 Gather ParagraphMetrics initialization in ParagraphMetrics::reset().
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19833 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-27 14:04:46 +00:00
André Pönitz
39c7e2faf0 rename Layout_ptr into LayoutPtr
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19758 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-23 19:59:07 +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
f91f682ef9 * Text:
- singleWidth(Buffer...): transfered to TextMetrics.
- singleWidth(Paragraph...): transfered to ParagraphMetrics.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19639 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-18 21:17:10 +00:00
Abdelrazak Younes
861e1e4dc5 * TextMetrics.cpp
- access par_metrics_ directly instead of parMetrics()
- redoParagraph() simplify the changed calculation.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19638 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-18 21:10:45 +00:00
Abdelrazak Younes
98008dc568 * Layout.h
- leftMargin, rightMargin, labelsep, labelindent, parindent are now docstring.

* TextClass.h:
- leftMargin() and rightMargin(): now return a docstring.

All other files: adapt to change above.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19633 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-18 13:21:12 +00:00
Lars Gullik Bjønnes
5ae54ddafb Get rid of a few warnings.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19409 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-10 20:14:54 +00:00
Stefan Schimanski
a8c4376ae3 * Font are lightweight, so better do not change the other font, but a copy
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18733 a592a061-630c-0410-9148-cb99ea01b6c8
2007-06-10 15:34:00 +00:00
Stefan Schimanski
d43c859cd4 * Changing the font does not change the fontmetrics variable,
hence we have to set it manually. 
  (bug #3787: Huge fonts do not set the row height)


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18731 a592a061-630c-0410-9148-cb99ea01b6c8
2007-06-10 14:54:45 +00:00
Stefan Schimanski
6daaf5388b * local_bidi.patch: The bidi object in the class Text is only used in
places now where a ParagraphMetrics::computeRowMetrics call comes
before. And this function the Bidi object is updated. So it is a
little step now to remove the Text::bidi completely and use local
Bidi objects instead without more work to do.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18706 a592a061-630c-0410-9148-cb99ea01b6c8
2007-06-07 20:39:14 +00:00
Stefan Schimanski
ff8fcc268a * no_bidi_isboundary.patch: added isRTLBoundary as a replacement to several references to the Text::bidi object.
(fixes #3790, #3801, #3809)


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18704 a592a061-630c-0410-9148-cb99ea01b6c8
2007-06-07 19:50:02 +00:00
Stefan Schimanski
6bb98d076f * removed the "dirty trick" to append a row with wrong start and
end (but start and end inside of the buffer limits) for the last
  empty row behind a newline.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18576 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-30 06:44:18 +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
Richard Heck
dfd9a1d53d Fix for bug 3650. Made changes to the Paragraph::checkBiblio() routine,
which now returns 1 if an InsetBibitem was inserted (and the cursor needs
to be incremented) or -POS if an InsetBibitem was deleted at position POS
(and the cursor needs to be decremented if it was past POS). Otherwise, it
returns 0. Made the corresponding changes in TextMetrics.cpp.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18424 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-19 19:29:50 +00:00
Bo Peng
73849af5df InsetListings: change the interface of diaplay function and allow AlignLeft. Applied to InsetListings. Fixes bug 3617, 3618
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18404 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-18 14:32:29 +00:00
Jürgen Spitzmüller
d17b7b3221 * src/Cursor.cpp (parbreak):
- do not insert blank line for listings content. 

* src/TextMetrics.cpp (setHeightOfRow):
        - don't use parkip in Listings insets (bug 3624)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18399 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-18 09:21:07 +00:00
Jürgen Spitzmüller
71d75896e0 * src/TextMetrics.cpp (setHeightOfRow):
- don't use parkip in ERT insets (bug 3146)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18205 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-05 12:06:37 +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
0bf9ac02a8 rename LyXLayout into Layout
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18096 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-29 18:58:28 +00:00
André Pönitz
fc6ce7cd08 rename LyXFont to Font except in tex2lyx
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18095 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-29 18:17:15 +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
André Pönitz
8c622e4ff0 rename/merge LyXLength related stuff
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18067 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-28 12:58:49 +00:00
André Pönitz
5008ee540f rename LColor into Color
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18046 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-26 17:34:20 +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