KHTML
khtml::EditableLineIterator Class Reference
Iterates through the editable lines of a document. More...
#include <khtml_caret_p.h>

Public Member Functions | |
| EditableLineIterator (const LineIterator &it, bool fromEnd=false) | |
| EditableLineIterator () | |
| void | advance (bool toBegin) |
| EditableLineIterator & | operator++ () |
| EditableLineIterator & | operator-- () |
Protected Member Functions | |
| bool | isEditable (LineIterator &it) |
Detailed Description
Iterates through the editable lines of a document.
This iterator, opposing to LineIterator, only regards editable lines. Additionally, this iterator enforces the caret advance policy.
The iterator can be compared to normal LineIterators, especially to LinearDocument::preBegin and LinearDocument::end
The line iterator becomes invalid when the associated LinearDocument object is destroyed.
Definition at line 807 of file khtml_caret_p.h.
Constructor & Destructor Documentation
| khtml::EditableLineIterator::EditableLineIterator | ( | const LineIterator & | it, |
| bool | fromEnd = false |
||
| ) | [inline] |
Initializes a new iterator.
The iterator is set to the first following editable line or to the end if no editable line follows.
- Parameters:
-
it a line iterator to initialize this from fromEnd true, traverse towards the beginning in search of an editable line
Definition at line 817 of file khtml_caret_p.h.
| khtml::EditableLineIterator::EditableLineIterator | ( | ) | [inline] |
empty constructor.
Only use if you want to copy another iterator onto it later.
Definition at line 828 of file khtml_caret_p.h.
Member Function Documentation
| void khtml::EditableLineIterator::advance | ( | bool | toBegin | ) |
advances to the line to come.
- Parameters:
-
toBegin true, move to previous line, false, move to next line.
Reimplemented from khtml::LineIterator.
Definition at line 1690 of file khtml_caret.cpp.
| bool khtml::EditableLineIterator::isEditable | ( | LineIterator & | it | ) | [inline, protected] |
finds out if the current line is editable.
- Parameters:
-
it check caret box line iterator points to
- Returns:
trueif line is editable
Definition at line 853 of file khtml_caret_p.h.
| EditableLineIterator& khtml::EditableLineIterator::operator++ | ( | ) | [inline] |
seek next line
Guaranteed to crash if beyond beginning/end of document.
Reimplemented from khtml::LineIterator.
Reimplemented in khtml::ErgonomicEditableLineIterator.
Definition at line 834 of file khtml_caret_p.h.
| EditableLineIterator& khtml::EditableLineIterator::operator-- | ( | ) | [inline] |
seek previous line.
Guaranteed to crash if beyond beginning/end of document.
Reimplemented from khtml::LineIterator.
Reimplemented in khtml::ErgonomicEditableLineIterator.
Definition at line 840 of file khtml_caret_p.h.
The documentation for this class was generated from the following files:
KDE 4.6 API Reference