khtml Library API Documentation

khtml::EditableCaretBoxIterator Class Reference

Iterates over the editable inner elements of a caret line box. More...

#include <khtml_caret_p.h>

Inheritance diagram for khtml::EditableCaretBoxIterator:

khtml::CaretBoxIterator List of all members.

Public Member Functions

 EditableCaretBoxIterator (LineIterator &lit, bool fromEnd=false, CaretBoxIterator *it=0)
 EditableCaretBoxIterator ()
bool isAdjacent () const
EditableCaretBoxIteratoroperator++ ()
EditableCaretBoxIteratoroperator-- ()
void advance (bool toBegin)

Protected Member Functions

bool isEditable (const CaretBoxIterator &boxit, bool fromEnd)

Detailed Description

Iterates over the editable inner elements of a caret line box.

The incrementor will traverse all caret boxes according to the associated linear document's caret advance policy. In contrast to CaretBoxIterator this iterator only regards caret boxes which are editable.

Author:
Leo Savernik

Definition at line 754 of file khtml_caret_p.h.


Constructor & Destructor Documentation

khtml::EditableCaretBoxIterator::EditableCaretBoxIterator LineIterator lit,
bool  fromEnd = false,
CaretBoxIterator it = 0
[inline]
 

initializes a new iterator from the given line iterator, beginning with the given caret box iterator, if specified

Definition at line 763 of file khtml_caret_p.h.

khtml::EditableCaretBoxIterator::EditableCaretBoxIterator  )  [inline]
 

empty constructor.

Use only to copy another iterator into this one. Definition at line 776 of file khtml_caret_p.h.


Member Function Documentation

bool khtml::EditableCaretBoxIterator::isAdjacent  )  const [inline]
 

returns true when the current caret box is adjacent to the previously iterated caret box, i.

e. no intervening caret boxes. Definition at line 781 of file khtml_caret_p.h.

EditableCaretBoxIterator& khtml::EditableCaretBoxIterator::operator++  )  [inline]
 

increments the iterator to point to the next editable caret box.

Reimplemented from khtml::CaretBoxIterator.

Definition at line 785 of file khtml_caret_p.h.

References advance().

EditableCaretBoxIterator& khtml::EditableCaretBoxIterator::operator--  )  [inline]
 

decrements the iterator to point to the previous editable caret box.

Reimplemented from khtml::CaretBoxIterator.

Definition at line 789 of file khtml_caret_p.h.

References advance().

void khtml::EditableCaretBoxIterator::advance bool  toBegin  ) 
 

advances to the editable caret box to come

Parameters:
toBegin true, move towards beginning, false, move towards end.
Definition at line 1501 of file khtml_caret.cpp.

References endl(), khtml::CaretBox::inlineBox(), isEditable(), khtml::CaretBox::isInline(), khtml::CaretBox::isOutside(), khtml::CaretBox::isOutsideEnd(), k_funcinfo, and kdDebug().

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

bool khtml::EditableCaretBoxIterator::isEditable const CaretBoxIterator boxit,
bool  fromEnd
[protected]
 

finds out if the given box is editable.

Parameters:
boxit iterator to given caret box
fromEnd true when advancing towards the beginning
Returns:
true if box is editable
Definition at line 1638 of file khtml_caret.cpp.

References endl(), KHTMLPart::isCaretMode(), KHTMLPart::isEditable(), khtml::CaretBox::isOutside(), khtml::CaretBox::isOutsideEnd(), kdDebug(), and khtml::CaretBox::object().

Referenced by advance().


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