khtml Library API Documentation

khtml::CaretBox Class Reference

Represents a rectangular box within which the caret is located. More...

#include <khtml_caret_p.h>

List of all members.

Public Member Functions

 CaretBox ()
 CaretBox (InlineBox *ibox, bool outside, bool outsideEnd)
 CaretBox (int x, int y, int w, int h, RenderBox *cb, bool outside, bool outsideEnd)
int width () const
int height () const
int xPos () const
int yPos () const
RenderBox * enclosingObject () const
InlineBox * inlineBox () const
RenderBlock * containingBlock () const
bool isInline () const
bool isInlineTextBox () const
bool isLineBreak () const
bool isOutside () const
bool isOutsideEnd () const
RenderObject * object () const
long minOffset () const
long maxOffset () const

Protected Attributes

InlineBox * _box
short _w
int _h
int _x
int _y
RenderBox * cb
bool _outside:1
bool outside_end:1

Friends

class CaretBoxLine


Detailed Description

Represents a rectangular box within which the caret is located.

The caret box serves as a wrapper for inline boxes of all kind. It either wraps an InlineBox, InlineTextBox, or InlineFlowBox, or if no such boxes exist for a certain context, it contains the relevant information directly.

This class will be constructed whenever a caret position has to be described.

Since:
3.3
Author:
Leo Savernik

Definition at line 140 of file khtml_caret_p.h.


Constructor & Destructor Documentation

khtml::CaretBox::CaretBox  )  [inline]
 

empty constructor for later assignment

Definition at line 154 of file khtml_caret_p.h.

khtml::CaretBox::CaretBox InlineBox *  ibox,
bool  outside,
bool  outsideEnd
[inline]
 

initializes the caret box from the given inline box

Definition at line 156 of file khtml_caret_p.h.

khtml::CaretBox::CaretBox int  x,
int  y,
int  w,
int  h,
RenderBox *  cb,
bool  outside,
bool  outsideEnd
[inline]
 

initializes the caret box from scratch

Definition at line 164 of file khtml_caret_p.h.


Member Function Documentation

RenderBlock* khtml::CaretBox::containingBlock  )  const [inline]
 

returns the containing block of this caret box.

If the caret box resembles a block itself, its containing block is returned.

Definition at line 179 of file khtml_caret_p.h.

bool khtml::CaretBox::isInline  )  const [inline]
 

returns true if this caret box represents an inline element, or text box, otherwise false.

Definition at line 189 of file khtml_caret_p.h.

Referenced by khtml::EditableCaretBoxIterator::advance(), and khtml::CaretBoxLine::isOutside().

bool khtml::CaretBox::isInlineTextBox  )  const [inline]
 

returns true if this caret box represents an inline text box.

Definition at line 192 of file khtml_caret_p.h.

Referenced by khtml::EditableCharacterIterator::operator++(), and khtml::EditableCharacterIterator::operator--().

bool khtml::CaretBox::isLineBreak  )  const [inline]
 

returns true if this caret box represents a line break

Definition at line 195 of file khtml_caret_p.h.

Referenced by maxOffset(), and minOffset().

bool khtml::CaretBox::isOutside  )  const [inline]
 

returns true when this caret box represents an ouside position of an element.

Definition at line 202 of file khtml_caret_p.h.

Referenced by khtml::EditableCaretBoxIterator::advance(), khtml::EditableCharacterIterator::initFirstChar(), khtml::EditableCaretBoxIterator::isEditable(), khtml::CaretBoxLine::isOutside(), khtml::EditableCharacterIterator::operator++(), khtml::EditableCharacterIterator::operator--(), khtml::CaretBoxLine::SeekBoxParams::operator==(), and khtml::EditableCharacterIterator::peekNext().

bool khtml::CaretBox::isOutsideEnd  )  const [inline]
 

returns the position at which the outside is targeted at.

This method's return value is meaningless if isOutside() is not true.

Returns:
true if the outside end is meant, false if the outside beginning is meant.

Definition at line 209 of file khtml_caret_p.h.

Referenced by khtml::EditableCaretBoxIterator::advance(), khtml::EditableCaretBoxIterator::isEditable(), and khtml::CaretBoxLine::SeekBoxParams::operator==().

RenderObject* khtml::CaretBox::object  )  const [inline]
 

returns the associated render object.

Definition at line 211 of file khtml_caret_p.h.

Referenced by khtml::EditableCaretBoxIterator::isEditable(), khtml::EditableCharacterIterator::operator++(), and khtml::EditableCharacterIterator::operator--().

long khtml::CaretBox::minOffset  )  const [inline]
 

returns the minimum offset for this caret box.

Definition at line 215 of file khtml_caret_p.h.

References isLineBreak().

Referenced by khtml::EditableCharacterIterator::operator++(), and khtml::EditableCharacterIterator::operator--().

long khtml::CaretBox::maxOffset  )  const [inline]
 

returns the maximum offset for this caret box.

Definition at line 218 of file khtml_caret_p.h.

References isLineBreak().

Referenced by khtml::EditableCharacterIterator::initFirstChar(), khtml::EditableCharacterIterator::operator++(), and khtml::EditableCharacterIterator::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.3.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Fri Jul 22 10:18:41 2005 by doxygen 1.3.6 written by Dimitri van Heesch, © 1997-2003