khtml::CaretBoxLine Class Reference
Resembles a line consisting of caret boxes. More...
#include <khtml_caret_p.h>
Public Member Functions | |
CaretBoxIterator | begin () |
CaretBoxIterator | end () |
CaretBoxIterator | preBegin () |
CaretBoxIterator | preEnd () |
InlineFlowBox * | baseFlowBox () const |
RenderBlock * | containingBlock () const |
RenderBox * | enclosingObject () const |
bool | isOutside () const |
bool | isOutsideEnd () const |
Static Public Member Functions | |
CaretBoxLine * | constructCaretBoxLine (MassDeleter< CaretBoxLine > *deleter, InlineFlowBox *baseFlowBox, InlineBox *seekBox, bool seekOutside, bool seekOutsideEnd, CaretBoxIterator &iter, RenderObject *seekObject=0) |
CaretBoxLine * | constructCaretBoxLine (MassDeleter< CaretBoxLine > *deleter, RenderBox *cb, bool outside, bool outsideEnd, CaretBoxIterator &iter) |
Protected Member Functions | |
CaretBoxLine (InlineFlowBox *basefb) | |
void | addConvertedInlineBox (InlineBox *, SeekBoxParams &) |
void | addCreatedInlineBoxEdge (InlineBox *box, const QFontMetrics &fm, bool left, bool rtl) |
void | addCreatedFlowBoxEdge (InlineFlowBox *flowBox, const QFontMetrics &fm, bool left, bool rtl) |
void | addCreatedFlowBoxInside (InlineFlowBox *flowBox, const QFontMetrics &fm) |
Protected Attributes | |
CaretBoxDeleter | caret_boxes |
InlineFlowBox * | basefb |
Friends | |
class | CaretBoxIterator |
Detailed Description
Resembles a line consisting of caret boxes.To the contrary of InlineFlowBoxes which are nested as needed to map the DOM to the rendered representation, it is sufficient for caret navigation to provide a linear list of unnested caret boxes.
Example: The document fragment
a c f g will be represented by three caret box lines which each one consists of caret boxes as follows: CaretBoxLine 1: CaretBox(cb=
, _box=0, _outside=true, outside_end=false) CaretBoxLine 2: CaretBox(cb=
, _box=InlineTextBox("a "), _outside=false) CaretBox(cb=
, _box=InlineFlowBox(), _outside=true, outside_end=false) CaretBox(cb=
, _box=InlineFlowBox(), _outside=true, outside_end=false) CaretBox(cb=
, _box=InlineTextBox("c"), _outside=false) CaretBox(cb=
, _box=InlineFlowBox(), _outside=true, outside_end=true) CaretBox(cb=
, _box=InlineTextBox(" f"), _outside=false) CaretBox(cb=
, _box=InlineFlowBox(), _outside=true, outside_end=true) CaretBox(cb=
, _box=InlineTextBox(" g"), _outside=true, outside_end=true) CaretBoxLine 3: CaretBox(cb=
, _box=0, _outside=true, outside_end=true)
Definition at line 299 of file khtml_caret_p.h.
Member Function Documentation
|
returns the base inline flow box which the caret boxes of this caret box line have been constructed from. This is generally a root line box, but may be an inline flow box when the base is restricted to an inline element. Definition at line 347 of file khtml_caret_p.h. |
|
returns the containing block
Definition at line 350 of file khtml_caret_p.h. |
|
returns the enclosing object
Definition at line 352 of file khtml_caret_p.h. |
|
returns whether this caret box line is outside.
Definition at line 358 of file khtml_caret_p.h. References khtml::CaretBox::isInline(), and khtml::CaretBox::isOutside(). Referenced by khtml::LineIterator::isOutside(). |
|
returns whether this caret box line is at the outside end. The result cannot be relied upon unless isOutside() returns true. Definition at line 368 of file khtml_caret_p.h. Referenced by khtml::LineIterator::isOutsideEnd(). |
|
constructs a new caret box line out of the given inline flow box
|
|
constructs a new caret box line for the given render block.
|
|
recursively converts the given inline box into caret boxes and adds them to this caret box line. It will additionally look for the caret box specified in SeekBoxParams. Definition at line 663 of file khtml_caret.cpp. References addCreatedFlowBoxEdge(), addCreatedFlowBoxInside(), addCreatedInlineBoxEdge(), khtml::CaretBoxLine::SeekBoxParams::check(), khtml::CaretBoxLine::SeekBoxParams::equalsBox(), khtml::CaretBoxLine::SeekBoxParams::found, khtml::CaretBoxLine::SeekBoxParams::it, and kdDebug(). |
|
creates and adds the edge of a generic inline box
Definition at line 797 of file khtml_caret.cpp. References khtml::CaretBox::_h, khtml::CaretBox::_w, khtml::CaretBox::_x, and khtml::CaretBox::_y. Referenced by addConvertedInlineBox(). |
|
creates and adds the edge of an inline flow box
Definition at line 784 of file khtml_caret.cpp. References khtml::CaretBox::_h, khtml::CaretBox::_w, khtml::CaretBox::_x, and khtml::CaretBox::_y. Referenced by addConvertedInlineBox(). |
|
creates and adds the inside of an inline flow box
Definition at line 770 of file khtml_caret.cpp. References khtml::CaretBox::_h, and khtml::CaretBox::_y. Referenced by addConvertedInlineBox(). |
The documentation for this class was generated from the following files: