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
- 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
* 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
- 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
* 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
Override notifyCursorLeaves() in InsetText to force update when
inset was wide. Should be removed if and when wide is.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19511 a592a061-630c-0410-9148-cb99ea01b6c8
* buffer_funcs.cpp (updateLabels): new function taking a buffer and
a ParIterator as arguments. This one is used to update labels
into an InsetText. Cleanup the code to reset depth. Call setLabel
for each paragraph, and then updateLabel on each inset it contains.
(setCaptionLabels, setCaptions): removed.
(setLabel): use Counters::current_float to make caption paragraphs
labels.
* insets/Inset.h (updateLabels): new virtual method, empty by
default; this numbers the inset itself (if relevant) and then all
the paragraphs it may contain.
* insets/InsetText.cpp (updateLabels): basically calls
lyx::updateLabels from buffer_func.cpp.
* insets/InsetCaption.cpp (addToToc): use the label constructed by
updateLabels.
(computeFullLabel): removed.
(metrics, plaintext): don't use computeFullLabel.
(updateLabels): new method; set the label from
Counters::current_float.
* insets/InsetWrap.cpp (updateLabels):
* insets/InsetFloat.cpp (updateLabel): new method; sets
Counters::current_float to the float type.
* insets/InsetBranch.cpp (updateLabels): new method; the numbering
is reset afterwards if the branch is inactive. (bug 2671)
* insets/InsetNote.cpp (updateLabels): new method; the numbering
is reset after the underlying InsetText has been numbered.
(bug 2671)
* insets/InsetTabular.cpp (updateLabels): new method (also handles
longtable)
* insets/InsetListings.cpp (updateLabels): new method; mimics what
is done for Floats (although Listings are not floats technically)
* insets/InsetInclude.cpp (getScreenLabel): in the listings case,
use the computed label.
(updateLabels): new method; that either renumbers the child
document or number the current listing.
* LyXFunc.cpp (menuNew): do not updateLabels on empty documents
(why do we do that at all?)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19482 a592a061-630c-0410-9148-cb99ea01b6c8
It also solve a crash with non disconnect boost::signal and gcc-3.3 or 3.4.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18592 a592a061-630c-0410-9148-cb99ea01b6c8