khtml::EditableCharacterIterator Class Reference
Provides iterating through the document in terms of characters. More...
#include <khtml_caret_p.h>
Collaboration diagram for khtml::EditableCharacterIterator:

Public Member Functions | |
EditableCharacterIterator () | |
EditableCharacterIterator (LinearDocument *ld) | |
int | chr () const |
QChar | operator * () const |
bool | isEnd () const |
long | offset () const |
RenderObject * | renderer () const |
CaretBox * | caretBox () const |
InlineBox * | inlineBox () const |
EditableCharacterIterator & | operator++ () |
EditableCharacterIterator & | operator-- () |
Protected Member Functions | |
void | initFirstChar () |
void | peekNext () |
void | peekPrev () |
Protected Attributes | |
EditableLineIterator | _it |
EditableCaretBoxIterator | ebit |
long | _offset |
int | _char |
bool | _end:1 |
Detailed Description
Provides iterating through the document in terms of characters.Only the editable characters are regarded.
This iterator represents the document, which is structured as a tree itself, as a linear stream of characters.
Definition at line 1000 of file khtml_caret_p.h.
Constructor & Destructor Documentation
|
empty constructor. Only use if you want to assign another iterator as no fields will be initialized. Definition at line 1015 of file khtml_caret_p.h. |
|
constructs a new iterator from the given linear document.
References khtml::LinearDocument::end(), and initFirstChar(). |
Member Function Documentation
|
returns the current character, or -1 if not on a text node, or beyond the end. Definition at line 1034 of file khtml_caret_p.h. |
|
returns the current character as a unicode symbol, substituting a blank for a non-text node. Definition at line 1039 of file khtml_caret_p.h. |
|
returns true when the end of the document has been reached. Definition at line 1043 of file khtml_caret_p.h. |
|
returns the current offset Definition at line 1046 of file khtml_caret_p.h. |
|
returns the current render object. Definition at line 1049 of file khtml_caret_p.h. |
|
returns the current caret box. Will crash if beyond end. Definition at line 1054 of file khtml_caret_p.h. |
|
returns the current inline box. May be 0 if the current element has none, or if the end has been reached. Therefore, do *not* use this to test for the end condition, use node() instead. Definition at line 1061 of file khtml_caret_p.h. |
|
moves to the next editable character. _peekNext Definition at line 1763 of file khtml_caret.cpp. References khtml::LinearDocument::end(), endl(), khtml::CaretBox::inlineBox(), khtml::CaretBox::isInlineTextBox(), khtml::CaretBox::isOutside(), kdDebug(), khtml::LineIterator::lines, khtml::CaretBox::maxOffset(), khtml::CaretBox::minOffset(), khtml::CaretBox::object(), and peekNext(). |
|
moves to the previous editable character. Definition at line 1865 of file khtml_caret.cpp. References endl(), khtml::CaretBox::inlineBox(), khtml::CaretBox::isInlineTextBox(), khtml::CaretBox::isOutside(), kdDebug(), khtml::LineIterator::lines, khtml::CaretBox::maxOffset(), khtml::CaretBox::minOffset(), khtml::CaretBox::object(), and khtml::LinearDocument::preBegin(). |
|
initializes the _char member by reading the character at the current offset, peeking ahead as necessary. Definition at line 1740 of file khtml_caret.cpp. References khtml::CaretBox::inlineBox(), khtml::CaretBox::isOutside(), khtml::CaretBox::maxOffset(), and peekNext(). Referenced by EditableCharacterIterator(). |
|
reads ahead the next node and updates the data structures accordingly Definition at line 1082 of file khtml_caret_p.h. References khtml::CaretBox::inlineBox(), and khtml::CaretBox::isOutside(). Referenced by initFirstChar(), and operator++(). |
|
reads ahead the previous node and updates the data structures accordingly Definition at line 1097 of file khtml_caret_p.h. |
The documentation for this class was generated from the following files: