wxMaxima
Loading...
Searching...
No Matches
Data Structures | Public Types | Public Member Functions
CellDrawListIterator< Cell > Class Template Referencefinal

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
 
CellDrawListIteratoroperator= (const CellDrawListIterator &o)=default
 
CellDrawListIterator operator++ (int)
 
CellDrawListIteratoroperator++ ()
 
bool operator== (const CellDrawListIterator &o) const
 
bool operator!= (const CellDrawListIterator &o) const
 
 operator bool () const
 
 operator Cell * () const
 
Celloperator-> () const
 

Detailed Description

template<typename Cell>
class CellDrawListIterator< Cell >

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).


The documentation for this class was generated from the following file: