khtml Library API Documentation

khtml::EditableLineIterator Class Reference

Iterates through the editable lines of a document. More...

#include <khtml_caret_p.h>

Inheritance diagram for khtml::EditableLineIterator:

khtml::LineIterator khtml::ErgonomicEditableLineIterator List of all members.

Public Member Functions

 EditableLineIterator (const LineIterator &it, bool fromEnd=false)
 EditableLineIterator ()
EditableLineIteratoroperator++ ()
EditableLineIteratoroperator-- ()

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. If either KHTMLPart::editable or KHTMLPart::caretMode are true, this class works exactly as if it were a LineIterator.

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.

Since:
3.2

Definition at line 495 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 505 of file khtml_caret_p.h.

References isEditable(), kdDebug(), operator++(), and operator--().

khtml::EditableLineIterator::EditableLineIterator  )  [inline]
 

empty constructor.

Only use if you want to copy another iterator onto it later.

Definition at line 527 of file khtml_caret_p.h.


Member Function Documentation

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 533 of file khtml_caret_p.h.

References isEditable().

Referenced by EditableLineIterator().

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 555 of file khtml_caret_p.h.

References isEditable().

Referenced by EditableLineIterator().

bool khtml::EditableLineIterator::isEditable LineIterator it  )  [inline, protected]
 

finds out if the current line is editable.

Parameters:
it check flow box iterator points to
Returns:
true if line is editable

Definition at line 598 of file khtml_caret_p.h.

References KHTMLPart::isCaretMode(), KHTMLPart::isEditable(), kdDebug(), and khtml::LinearDocument::m_part.

Referenced by EditableLineIterator(), operator++(), and operator--().


The documentation for this class was generated from the following file:
KDE Logo
This file is part of the documentation for khtml Library Version 3.2.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed May 5 07:22:23 2004 by doxygen 1.3.6 written by Dimitri van Heesch, © 1997-2003