KHTML
#include <khtml_caret_p.h>
Public Member Functions | |
void | advance (bool toBegin) |
bool | isOutside () const |
bool | isOutsideEnd () |
LinearDocument * | linearDocument () const |
bool | operator!= (const LineIterator &it) const |
CaretBoxLine * | operator* () const |
LineIterator & | operator++ () |
LineIterator & | operator-- () |
bool | operator== (const LineIterator &it) const |
Static Public Member Functions | |
static CaretBoxIterator & | currentCaretBox () |
static long | currentModifiedOffset () |
Protected Member Functions | |
LineIterator () | |
LineIterator (LinearDocument *l, DOM::NodeImpl *node, long offset) | |
void | nextBlock () |
void | prevBlock () |
Protected Attributes | |
CaretBoxLine * | cbl |
LinearDocument * | lines |
Static Protected Attributes | |
static CaretBoxIterator | currentBox |
static long | currentOffset |
Detailed Description
Iterates through the lines of a document.
The line iterator becomes invalid when the associated LinearDocument object is destroyed.
Definition at line 487 of file khtml_caret_p.h.
Constructor & Destructor Documentation
|
inlineprotected |
Default constructor, only for internal use.
Definition at line 501 of file khtml_caret_p.h.
|
protected |
Initializes a new iterator.
Note: This constructor neither cares about the correctness of node
nor about offset
. It is the responsibility of the caller to ensure that both point to valid places.
Definition at line 1319 of file khtml_caret.cpp.
Member Function Documentation
void khtml::LineIterator::advance | ( | bool | toBegin | ) |
advances to the line to come.
- Parameters
-
toBegin true, move to previous line, false, move to next line.
Definition at line 1482 of file khtml_caret.cpp.
|
inlinestatic |
Whenever a new line iterator is created, it gets a caret box created.
For memory reasons, it's saved in a static instance, thus making this function not thread-safe.
This value can only be trusted immediately after having instantiated a line iterator or one of its derivatives.
- Returns
- an iterator onto the corresponing caret box within the line represented by the last instantiation of a line iterator, or 0 if there was none.
Definition at line 576 of file khtml_caret_p.h.
|
inlinestatic |
Whenever a new line iterator is created, it calculates a modified offset that is to be used with respect to the current render object.
This offset can be queried with this function.
This value can only be trusted immediately after having instantiated a line iterator or one of its derivatives.
- Returns
- the modified offset.
Definition at line 586 of file khtml_caret_p.h.
|
inline |
Tells whether the offset is meant to be outside or inside the containing block.
Definition at line 559 of file khtml_caret_p.h.
|
inline |
Returns whether this line represents the outside end of the containing block.
This result can only be relied on when isOutside is true.
Definition at line 554 of file khtml_caret_p.h.
|
inline |
returns the associated linear document
Definition at line 520 of file khtml_caret_p.h.
|
protected |
seeks next block.
Definition at line 1345 of file khtml_caret.cpp.
|
inline |
compares two iterators
Definition at line 544 of file khtml_caret_p.h.
|
inline |
dereferences current caret box line.
- Returns
- the caret line box or 0 if end of document
Definition at line 516 of file khtml_caret_p.h.
|
inline |
seek next line
Guaranteed to crash if beyond beginning/end of document.
Definition at line 526 of file khtml_caret_p.h.
|
inline |
seek previous line.
Guaranteed to crash if beyond beginning/end of document.
Definition at line 532 of file khtml_caret_p.h.
|
inline |
compares two iterators.
The comparator actually works only for comparing arbitrary iterators to begin() and end().
Definition at line 537 of file khtml_caret_p.h.
|
protected |
seeks previous block.
Definition at line 1412 of file khtml_caret.cpp.
Member Data Documentation
|
protected |
Definition at line 491 of file khtml_caret_p.h.
|
staticprotected |
Definition at line 493 of file khtml_caret_p.h.
|
staticprotected |
Definition at line 494 of file khtml_caret_p.h.
|
protected |
Definition at line 490 of file khtml_caret_p.h.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:26:21 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.