|
wxMaxima
|
Walks the "draw list": the flattened sequence of cells that make up one displayed line, in the order they should be measured/drawn/hit-tested. More...
#include <CellIterators.h>
Public Types | |
| using | iterator_category = std::forward_iterator_tag |
| using | value_type = Cell |
| using | difference_type = std::ptrdiff_t |
| using | pointer = Cell * |
| using | reference = Cell & |
Public Member Functions | |
| CellDrawListIterator (const std::unique_ptr< Cell > &p) | |
| CellDrawListIterator (Cell *p) | |
| CellDrawListIterator (const CellDrawListIterator &o)=default | |
| CellDrawListIterator & | operator= (const CellDrawListIterator &o)=default |
| CellDrawListIterator | operator++ (int) |
| CellDrawListIterator & | operator++ () |
| bool | operator== (const CellDrawListIterator &o) const |
| bool | operator!= (const CellDrawListIterator &o) const |
| operator bool () const | |
| operator Cell * () const | |
| Cell * | operator-> () const |
Walks the "draw list": the flattened sequence of cells that make up one displayed line, in the order they should be measured/drawn/hit-tested.
This used to be a stored m_nextToDraw pointer on every Cell, threaded by hand (via virtual SetNextToDraw() overrides) whenever a compound cell's BreakUp()/Unbreak() ran. It is now computed on the fly instead: a cell that IsBrokenIntoLines() is expanded into its GetBrokenCellCount()/ GetBrokenCell() pieces (each of which may itself have further siblings via GetNext(), and may itself be broken, recursively) instead of being treated as a single opaque node. The explicit stack below remembers, for each broken cell currently being expanded, which piece to resume at once its current piece's own chain is exhausted – normal documents nest only a few levels deep, so this stays small (and empty, with no allocation at all, for any line that contains no broken cell).