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

KHTML

  • khtml
  • CaretBoxLine
Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
khtml::CaretBoxLine Class Reference

#include <khtml_caret_p.h>

Classes

struct  SeekBoxParams
 

Public Member Functions

InlineFlowBox * baseFlowBox () const
 
CaretBoxIterator begin ()
 
RenderBlock * containingBlock () const
 
RenderBox * enclosingObject () const
 
CaretBoxIterator end ()
 
bool isOutside () const
 
bool isOutsideEnd () const
 
CaretBoxIterator preBegin ()
 
CaretBoxIterator preEnd ()
 

Static Public Member Functions

static CaretBoxLine * constructCaretBoxLine (MassDeleter< CaretBoxLine > *deleter, InlineFlowBox *baseFlowBox, InlineBox *seekBox, bool seekOutside, bool seekOutsideEnd, CaretBoxIterator &iter, RenderObject *seekObject=0)
 
static CaretBoxLine * constructCaretBoxLine (MassDeleter< CaretBoxLine > *deleter, RenderBox *cb, bool outside, bool outsideEnd, CaretBoxIterator &iter)
 

Protected Member Functions

 CaretBoxLine ()
 
 CaretBoxLine (InlineFlowBox *basefb)
 
void addConvertedInlineBox (InlineBox *, SeekBoxParams &)
 
void addCreatedFlowBoxEdge (InlineFlowBox *flowBox, const QFontMetrics &fm, bool left, bool rtl)
 
void addCreatedFlowBoxInside (InlineFlowBox *flowBox, const QFontMetrics &fm)
 
void addCreatedInlineBoxEdge (InlineBox *box, const QFontMetrics &fm, bool left, bool rtl)
 

Protected Attributes

InlineFlowBox * basefb
 
CaretBoxDeleter caret_boxes
 

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 <p>a <i><b>c</b> f</i> g</p> will be
represented by three caret box lines which each one consists of caret boxes
as follows:
CaretBoxLine 1:
CaretBox(cb=<p>, _box=0, _outside=true, outside_end=false)
CaretBoxLine 2:
CaretBox(cb=<p>, _box=InlineTextBox("a "), _outside=false)
CaretBox(cb=<p>, _box=InlineFlowBox(<i>), _outside=true, outside_end=false)
CaretBox(cb=<p>, _box=InlineFlowBox(<b>), _outside=true, outside_end=false)
CaretBox(cb=<p>, _box=InlineTextBox("c"), _outside=false)
CaretBox(cb=<p>, _box=InlineFlowBox(<b>), _outside=true, outside_end=true)
CaretBox(cb=<p>, _box=InlineTextBox(" f"), _outside=false)
CaretBox(cb=<p>, _box=InlineFlowBox(<i>), _outside=true, outside_end=true)
CaretBox(cb=<p>, _box=InlineTextBox(" g"), _outside=true, outside_end=true)
CaretBoxLine 3:
CaretBox(cb=<p>, _box=0, _outside=true, outside_end=true)

Definition at line 290 of file khtml_caret_p.h.

Constructor & Destructor Documentation

khtml::CaretBoxLine::CaretBoxLine ( )
inlineprotected

Definition at line 296 of file khtml_caret_p.h.

khtml::CaretBoxLine::CaretBoxLine ( InlineFlowBox *  basefb)
inlineprotected

Definition at line 297 of file khtml_caret_p.h.

Member Function Documentation

void khtml::CaretBoxLine::addConvertedInlineBox ( InlineBox *  box,
SeekBoxParams &  sbp 
)
protected

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 664 of file khtml_caret.cpp.

void khtml::CaretBoxLine::addCreatedFlowBoxEdge ( InlineFlowBox *  flowBox,
const QFontMetrics &  fm,
bool  left,
bool  rtl 
)
protected

creates and adds the edge of an inline flow box

Parameters
flowBoxinline flow box
fmfont metrics of inline flow box
lefttrue to add left edge, false to add right edge
rtltrue if direction is rtl

Definition at line 785 of file khtml_caret.cpp.

void khtml::CaretBoxLine::addCreatedFlowBoxInside ( InlineFlowBox *  flowBox,
const QFontMetrics &  fm 
)
protected

creates and adds the inside of an inline flow box

Parameters
flowBoxinline flow box
fmfont metrics of inline flow box

Definition at line 771 of file khtml_caret.cpp.

void khtml::CaretBoxLine::addCreatedInlineBoxEdge ( InlineBox *  box,
const QFontMetrics &  fm,
bool  left,
bool  rtl 
)
protected

creates and adds the edge of a generic inline box

Parameters
boxinline box
fmfont metrics of inline box
lefttrue to add left edge, false to add right edge
rtltrue if direction is rtl

Definition at line 798 of file khtml_caret.cpp.

InlineFlowBox* khtml::CaretBoxLine::baseFlowBox ( ) const
inline

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 338 of file khtml_caret_p.h.

CaretBoxIterator khtml::CaretBoxLine::begin ( )
inline

Definition at line 303 of file khtml_caret_p.h.

static CaretBoxLine* khtml::CaretBoxLine::constructCaretBoxLine ( MassDeleter< CaretBoxLine > *  deleter,
InlineFlowBox *  baseFlowBox,
InlineBox *  seekBox,
bool  seekOutside,
bool  seekOutsideEnd,
CaretBoxIterator &  iter,
RenderObject *  seekObject = 0 
)
static

constructs a new caret box line out of the given inline flow box

Parameters
deleterdeleter which handles alloc+dealloc of the object
baseFlowBoxbasic flow box which to create a caret line box from
seekBoxseek this box within the constructed line
seekOutsidedenoting whether position is outside of seekBox
seekOutsideEndwhether at the outside end of seekBox
iterreturns an iterator that corresponds to seekBox. If no suitable caret box exists, it will return end()
seekObjectseek this render object within the constructed line. It will only be regarded if seekBox is 0. iter will then point to the first caret box whose render object matches.
static CaretBoxLine* khtml::CaretBoxLine::constructCaretBoxLine ( MassDeleter< CaretBoxLine > *  deleter,
RenderBox *  cb,
bool  outside,
bool  outsideEnd,
CaretBoxIterator &  iter 
)
static

constructs a new caret box line for the given render block.

Parameters
deleterdeleter which handles alloc+dealloc of the object
cbrender block or render replaced
outsidetrue when line is to be constructed outside
outsideEndtrue when the ending outside is meant
iterreturns the iterator to the caret box representing the given position for cb
RenderBlock* khtml::CaretBoxLine::containingBlock ( ) const
inline

returns the containing block

Definition at line 341 of file khtml_caret_p.h.

RenderBox* khtml::CaretBoxLine::enclosingObject ( ) const
inline

returns the enclosing object

Definition at line 343 of file khtml_caret_p.h.

CaretBoxIterator khtml::CaretBoxLine::end ( )
inline

Definition at line 310 of file khtml_caret_p.h.

bool khtml::CaretBoxLine::isOutside ( ) const
inline

returns whether this caret box line is outside.

Returns
true if this caret box represents an outside position of this line box' containing block, false otherwise.

Definition at line 349 of file khtml_caret_p.h.

bool khtml::CaretBoxLine::isOutsideEnd ( ) const
inline

returns whether this caret box line is at the outside end.

The result cannot be relied upon unless isOutside() returns true.

Definition at line 359 of file khtml_caret_p.h.

CaretBoxIterator khtml::CaretBoxLine::preBegin ( )
inline

Definition at line 317 of file khtml_caret_p.h.

CaretBoxIterator khtml::CaretBoxLine::preEnd ( )
inline

Definition at line 324 of file khtml_caret_p.h.

Member Data Documentation

InlineFlowBox* khtml::CaretBoxLine::basefb
protected

Definition at line 294 of file khtml_caret_p.h.

CaretBoxDeleter khtml::CaretBoxLine::caret_boxes
protected

Definition at line 292 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-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:51:24 by doxygen 1.8.7 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 API Reference

Skip menu "kdelibs 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
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



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