• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.8.3 API Reference
  • KDE Home
  • Contact Us
 

KHTML

  • khtml
  • EditableCharacterIterator
Public Member Functions | Protected Member Functions | Protected Attributes
khtml::EditableCharacterIterator Class Reference

#include <khtml_caret_p.h>

List of all members.

Public Member Functions

 EditableCharacterIterator ()
 EditableCharacterIterator (LinearDocument *ld)
CaretBox * caretBox () const
int chr () const
InlineBox * inlineBox () const
bool isEnd () const
long offset () const
QChar operator* () const
EditableCharacterIterator & operator++ ()
EditableCharacterIterator & operator-- ()
RenderObject * renderer () const

Protected Member Functions

void initFirstChar ()
void peekNext ()
void peekPrev ()

Protected Attributes

int _char
bool _end:1
EditableLineIterator _it
long _offset
EditableCaretBoxIterator ebit

Detailed Description

Provides iterating through the document in terms of characters.

Only the editable characters are regarded.

This iterator represents the document, which is structured as a tree itself, as a linear stream of characters.

Definition at line 984 of file khtml_caret_p.h.


Constructor & Destructor Documentation

khtml::EditableCharacterIterator::EditableCharacterIterator ( ) [inline]

empty constructor.

Only use if you want to assign another iterator as no fields will be initialized.

Definition at line 999 of file khtml_caret_p.h.

khtml::EditableCharacterIterator::EditableCharacterIterator ( LinearDocument *  ld) [inline]

constructs a new iterator from the given linear document.

Parameters:
ldlinear representation of document.

Definition at line 1005 of file khtml_caret_p.h.


Member Function Documentation

CaretBox* khtml::EditableCharacterIterator::caretBox ( ) const [inline]

returns the current caret box.

Will crash if beyond end.

Definition at line 1038 of file khtml_caret_p.h.

int khtml::EditableCharacterIterator::chr ( ) const [inline]

returns the current character, or -1 if not on a text node, or beyond the end.

Definition at line 1018 of file khtml_caret_p.h.

void khtml::EditableCharacterIterator::initFirstChar ( ) [protected]

initializes the _char member by reading the character at the current offset, peeking ahead as necessary.

Definition at line 1744 of file khtml_caret.cpp.

InlineBox* khtml::EditableCharacterIterator::inlineBox ( ) const [inline]

returns the current inline box.

May be 0 if the current element has none, or if the end has been reached. Therefore, do not use this to test for the end condition, use node() instead.

Definition at line 1045 of file khtml_caret_p.h.

bool khtml::EditableCharacterIterator::isEnd ( ) const [inline]

returns true when the end of the document has been reached.

Definition at line 1027 of file khtml_caret_p.h.

long khtml::EditableCharacterIterator::offset ( ) const [inline]

returns the current offset

Definition at line 1030 of file khtml_caret_p.h.

QChar khtml::EditableCharacterIterator::operator* ( ) const [inline]

returns the current character as a unicode symbol, substituting a blank for a non-text node.

Definition at line 1023 of file khtml_caret_p.h.

EditableCharacterIterator & khtml::EditableCharacterIterator::operator++ ( )

returns whether the current line box represents the outside of its render object.

moves to the next editable character.

_peekNext

Definition at line 1767 of file khtml_caret.cpp.

EditableCharacterIterator & khtml::EditableCharacterIterator::operator-- ( )

moves to the previous editable character.

Definition at line 1869 of file khtml_caret.cpp.

void khtml::EditableCharacterIterator::peekNext ( ) [inline, protected]

reads ahead the next node and updates the data structures accordingly

Definition at line 1066 of file khtml_caret_p.h.

void khtml::EditableCharacterIterator::peekPrev ( ) [inline, protected]

reads ahead the previous node and updates the data structures accordingly

Definition at line 1081 of file khtml_caret_p.h.

RenderObject* khtml::EditableCharacterIterator::renderer ( ) const [inline]

returns the current render object.

Definition at line 1033 of file khtml_caret_p.h.


Member Data Documentation

int khtml::EditableCharacterIterator::_char [protected]

Definition at line 989 of file khtml_caret_p.h.

bool khtml::EditableCharacterIterator::_end [protected]

Definition at line 990 of file khtml_caret_p.h.

EditableLineIterator khtml::EditableCharacterIterator::_it [protected]

Definition at line 986 of file khtml_caret_p.h.

long khtml::EditableCharacterIterator::_offset [protected]

Definition at line 988 of file khtml_caret_p.h.

EditableCaretBoxIterator khtml::EditableCharacterIterator::ebit [protected]

Definition at line 987 of file khtml_caret_p.h.


The documentation for this class was generated from the following files:
  • khtml_caret_p.h
  • khtml_caret.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2012 The KDE developers.
Generated on Wed May 2 2012 18:54:03 by doxygen 1.8.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KHTML

Skip menu "KHTML"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs-4.8.3 API Reference

Skip menu "kdelibs-4.8.3 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal