khtml::LineIterator Class Reference
Iterates through the lines of a document. More...
#include <khtml_caret_p.h>
Inheritance diagram for khtml::LineIterator:

Public Member Functions | |
InlineFlowBox * | operator * () const |
LineIterator & | operator++ () |
LineIterator | operator++ (int) |
LineIterator & | operator-- () |
LineIterator | operator-- (int) |
LineIterator | operator+ (int summand) const |
LineIterator | operator- (int summand) const |
LineIterator & | operator+= (int summand) |
LineIterator & | operator-= (int summand) |
bool | operator== (const LineIterator &it) const |
bool | operator!= (const LineIterator &it) const |
Static Public Member Functions | |
InlineBox * | currentInlineBox () |
Protected Member Functions | |
LineIterator () | |
LineIterator (LinearDocument *l, DOM::NodeImpl *node, long offset) | |
void | nextBlock () |
void | prevBlock () |
Protected Attributes | |
LinearDocument * | lines |
RenderFlow * | cb |
InlineFlowBox * | flowBox |
Static Protected Attributes | |
InlineBox * | currentBox |
Detailed Description
Iterates through the lines of a document.The line iterator becomes invalid when the associated LinearDocument object is destroyed.
- Since:
- 3.2
Definition at line 85 of file khtml_caret_p.h.
Constructor & Destructor Documentation
|
Default constructor, only for internal use. Definition at line 99 of file khtml_caret_p.h. |
|
Initializes a new iterator.
Note: This constructor neither cares about the correctness of References khtml::LinearDocument::arena, endl(), and kdDebug(). |
Member Function Documentation
|
dereferences current line. Note: The returned inline flow box may be empty. This does not indicate the end of the document, but merely that the current paragraph does not contain any lines. Definition at line 117 of file khtml_caret_p.h. |
|
seek next line Guaranteed to crash if beyond beginning/end of document. Reimplemented in khtml::EditableLineIterator, and khtml::ErgonomicEditableLineIterator. Definition at line 674 of file khtml_caret.cpp. References nextBlock(). Referenced by operator++(). |
|
seek next line. Guaranteed to crash if beyond beginning/end of document. Note: The postfix operator is slow. Use the prefix operator whenever possible. Definition at line 685 of file khtml_caret.cpp. References operator++(). |
|
seek previous line. Guaranteed to crash if beyond beginning/end of document. Reimplemented in khtml::EditableLineIterator, and khtml::ErgonomicEditableLineIterator. Definition at line 735 of file khtml_caret.cpp. References prevBlock(). Referenced by operator--(). |
|
seek previous line. Guaranteed to crash if beyond beginning/end of document. Note: The postfix operator is slow. Use the prefix operator whenever possible. Definition at line 746 of file khtml_caret.cpp. References operator--(). |
|
does pointer arithmetic. This function is O(1) for values of +/-1, O(n) otherwise.
|
|
does pointer arithmetic. This function is O(1) for values of +/-1, O(n) otherwise.
|
|
does pointer arithmetic and assignment. This function is O(1) for values of +/-1, O(n) otherwise.
References khtml::LinearDocument::end(), and operator-=(). Referenced by operator-=(). |
|
does pointer arithmetic and assignment. This function is O(1) for values of +/-1, O(n) otherwise.
References operator+=(), and khtml::LinearDocument::preBegin(). Referenced by operator+=(). |
|
compares two iterators. The comparator actually works only for comparing arbitrary iterators to begin() and end(). Definition at line 176 of file khtml_caret_p.h. References cb, flowBox, and lines. Referenced by operator!=(). |
|
compares two iterators Definition at line 184 of file khtml_caret_p.h. References operator==(). |
|
Whenever a new line iterator is created, it gets the inline box it points to. 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.
Referenced by khtml::EditableCharacterIterator::EditableCharacterIterator(). |
|
seeks next block. Definition at line 622 of file khtml_caret.cpp. References khtml::LinearDocument::arena, endl(), and kdDebug(). Referenced by khtml::ErgonomicEditableLineIterator::calcAndStoreNewLine(), and operator++(). |
|
seeks previous block. Definition at line 692 of file khtml_caret.cpp. References khtml::LinearDocument::arena, endl(), and kdDebug(). Referenced by khtml::ErgonomicEditableLineIterator::calcAndStoreNewLine(), and operator--(). |
The documentation for this class was generated from the following files: