mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
Update PAINTING_ANALYSIS and add a new task
This commit is contained in:
parent
656b7f5ab7
commit
095c390fe2
@ -58,15 +58,14 @@ The global idea would be to extend FitCursor to cover also horizontal
|
|||||||
cursor.
|
cursor.
|
||||||
|
|
||||||
|
|
||||||
* Proposals
|
|
||||||
|
|
||||||
|
|
||||||
* Clean-up of drawing code
|
* Clean-up of drawing code
|
||||||
|
|
||||||
The goal is to make painting with drawing disable fast enough that it
|
The goal is to make painting with drawing disable fast enough that it
|
||||||
can be used after every metrics computation. Then we can separate real
|
can be used after every metrics computation. Then we can separate real
|
||||||
drawing from metrics.
|
drawing from metrics.
|
||||||
|
|
||||||
|
Other changes are only clean-ups.
|
||||||
|
|
||||||
** DONE RowPainter
|
** DONE RowPainter
|
||||||
|
|
||||||
Inset position is set in paintInset, paintOnlyInsets, and paintText.
|
Inset position is set in paintInset, paintOnlyInsets, and paintText.
|
||||||
@ -114,29 +113,14 @@ topBottomSpace parameter should be removed after that.
|
|||||||
|
|
||||||
The helper version should return a Row::Element instead of an InsetTable.
|
The helper version should return a Row::Element instead of an InsetTable.
|
||||||
|
|
||||||
** TODO make Inset::display() more useful
|
** Do not make RowPainter operations update x_
|
||||||
|
|
||||||
[This has been started in the features/betterbreak branch. Time will
|
It is better to make them const and update x_ separately.
|
||||||
tell whether it really helps. The question in particular is the
|
|
||||||
handling of separator insets]
|
|
||||||
|
|
||||||
Extending the DisplayType enum would allow to remove special cases
|
Then it will be possible to reorder the painting of the different
|
||||||
from the code.
|
elements. In particular, if text is painted last, it will be more
|
||||||
|
visible in the presence of underlines (foreign language, change
|
||||||
The enumeration could be like
|
tracking, spell check).
|
||||||
: Inline = 0
|
|
||||||
: BreakBefore = 1 // break row before this inset
|
|
||||||
: BreakAfter = 2 // break row after this inset
|
|
||||||
: CanBreakAfter = 4 // optionally break row after this inset
|
|
||||||
: AlignLeft = 8
|
|
||||||
: AlignRight = 16
|
|
||||||
: NoBoundary = 32 // do not allow cursor to go at the end of the row
|
|
||||||
: //before display inset
|
|
||||||
: Display = BreakBefore|BreakAfter
|
|
||||||
|
|
||||||
A display equation would be Display, other could be Display|AlignLeft
|
|
||||||
BreakAfter can be used by Newline or separator insets
|
|
||||||
CanBreakAfter can be used by the optional hyphen InsetSpecialChar.
|
|
||||||
|
|
||||||
** Set inset position during metrics phase
|
** Set inset position during metrics phase
|
||||||
|
|
||||||
@ -222,12 +206,8 @@ update flag is Update::None.
|
|||||||
** Metrics computation
|
** Metrics computation
|
||||||
|
|
||||||
This is triggered by bv::updateMetrics, which calls tm::redoParagraph for
|
This is triggered by bv::updateMetrics, which calls tm::redoParagraph for
|
||||||
+ all visible paragraphs
|
all visible paragraphs. Paragraphs above or below the screen (needed
|
||||||
+ paragraph above the screen (up to one page)
|
for page up/down) and computed as needed.
|
||||||
+ paragraphs below the screen (up to one page again)
|
|
||||||
|
|
||||||
The paragraphs outside of the screen are required to make PageUp/Down
|
|
||||||
work.
|
|
||||||
|
|
||||||
tm::redoParagraph will call Inset::metrics for each inset. In the case
|
tm::redoParagraph will call Inset::metrics for each inset. In the case
|
||||||
of text insets, this will invoke recursively tm::metrics, which redoes
|
of text insets, this will invoke recursively tm::metrics, which redoes
|
||||||
|
Loading…
Reference in New Issue
Block a user