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-- ()
void advance (bool toBegin)

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.

Since:
3.2

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

References advance(), and isEditable().

khtml::EditableLineIterator::EditableLineIterator  )  [inline]
 

empty constructor.

Only use if you want to copy another iterator onto it later. Definition at line 841 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 847 of file khtml_caret_p.h.

References advance().

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

References advance().

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 1684 of file khtml_caret.cpp.

References khtml::LinearDocument::advancePolicy(), endl(), isEditable(), and kdDebug().

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

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
lastit previous caret box line
Returns:
true if line is editable
Definition at line 867 of file khtml_caret_p.h.

Referenced by advance(), and EditableLineIterator().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for khtml Library Version 3.3.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Sep 29 09:42:35 2004 by doxygen 1.3.8 written by Dimitri van Heesch, © 1997-2003