khtml Library API Documentation

khtml::ErgonomicEditableLineIterator Class Reference

Iterates through the editable lines of a document, in a topological order. More...

#include <khtml_caret_p.h>

Inheritance diagram for khtml::ErgonomicEditableLineIterator:

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

Public Member Functions

 ErgonomicEditableLineIterator (const LineIterator &it, int x)
 ErgonomicEditableLineIterator ()
ErgonomicEditableLineIteratoroperator++ ()
ErgonomicEditableLineIteratoroperator-- ()

Protected Member Functions

void determineTopologicalElement (RenderTableCell *oldCell, RenderObject *newObject, bool toBegin)
void calcAndStoreNewLine (RenderFlow *newBlock, bool toBegin)

Protected Attributes

int xCoor

Detailed Description

Iterates through the editable lines of a document, in a topological order.

The differences between this and the EditableLineIterator lies in the way lines are inquired. While the latter steps through the lines in document order, the former takes into consideration ergonomics.

This is especially useful for tables. EditableLineIterator traverses all table cells from left to right, top to bottom, while this one will actually snap to the cell in the right position, and traverse only upwards/downwards, thus providing a more intuitive navigation.

Author:
Leo Savernik

Definition at line 686 of file khtml_caret_p.h.


Constructor & Destructor Documentation

khtml::ErgonomicEditableLineIterator::ErgonomicEditableLineIterator const LineIterator it,
int  x
[inline]
 

Initializes a new ergonomic editable line iterator from the given one.

Parameters:
it line iterator
x absolute x-coordinate for cell determination

Definition at line 694 of file khtml_caret_p.h.

khtml::ErgonomicEditableLineIterator::ErgonomicEditableLineIterator  )  [inline]
 

Constructs an uninitialized iterator which must be assigned a line iterator before it can be used.

Definition at line 700 of file khtml_caret_p.h.


Member Function Documentation

ErgonomicEditableLineIterator & khtml::ErgonomicEditableLineIterator::operator++  ) 
 

seek next line.

The next line will be one that is visually situated below this line.

Reimplemented from khtml::EditableLineIterator.

Definition at line 1386 of file khtml_caret.cpp.

References endl(), and kdDebug().

ErgonomicEditableLineIterator & khtml::ErgonomicEditableLineIterator::operator--  ) 
 

seek previous line.

The previous line will be one that is visually situated above this line.

Reimplemented from khtml::EditableLineIterator.

Definition at line 1402 of file khtml_caret.cpp.

References endl().

void khtml::ErgonomicEditableLineIterator::determineTopologicalElement RenderTableCell *  oldCell,
RenderObject *  newObject,
bool  toBegin
[protected]
 

determines the topologically next render object.

Parameters:
oldCell table cell the original object was under.
newObject object to determine whether and which transition between cells is to be handled. It does not have to be an object in the correct topological cell, a simple delivery from an editable line iterator suffices.
toBegin if true, iterate towards the beginning

Definition at line 1274 of file khtml_caret.cpp.

References determineTopologicalElement().

Referenced by determineTopologicalElement().

void khtml::ErgonomicEditableLineIterator::calcAndStoreNewLine RenderFlow *  newBlock,
bool  toBegin
[inline, protected]
 

initializes the iterator to point to the first previous/following editable line.

Parameters:
newBlock take this as base block.
toBegin true, iterate towards beginning.

Definition at line 1255 of file khtml_caret.cpp.


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.2.3.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sat Jun 12 15:10:02 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003