lib Library API Documentation

SingleContentElement Class Reference

The base of (all) elements that contain just one content element. More...

#include <bracketelement.h>

Inheritance diagram for SingleContentElement:

Inheritance graph
[legend]
Collaboration diagram for SingleContentElement:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 SingleContentElement (BasicElement *parent=0)
 SingleContentElement (const SingleContentElement &)
virtual QChar getCharacter () const
virtual BasicElementgoToPos (FormulaCursor *, bool &handled, const LuPixelPoint &point, const LuPixelPoint &parentOrigin)
virtual void dispatchFontCommand (FontCommand *cmd)
virtual void moveLeft (FormulaCursor *cursor, BasicElement *from)
virtual void moveRight (FormulaCursor *cursor, BasicElement *from)
virtual void moveUp (FormulaCursor *cursor, BasicElement *from)
virtual void moveDown (FormulaCursor *cursor, BasicElement *from)
virtual void remove (FormulaCursor *, QPtrList< BasicElement > &, Direction)
virtual void normalize (FormulaCursor *, Direction)
virtual SequenceElementgetMainChild ()
virtual void selectChild (FormulaCursor *cursor, BasicElement *child)
virtual void writeMathML (QDomDocument doc, QDomNode parent)

Protected Member Functions

virtual void writeDom (QDomElement element)
virtual bool readContentFromDom (QDomNode &node)
SequenceElementgetContent ()

Detailed Description

The base of (all) elements that contain just one content element.

(No indexes.)

Definition at line 39 of file bracketelement.h.


Member Function Documentation

QChar SingleContentElement::getCharacter  )  const [virtual]
 

Returns:
the character that represents this element. Used for parsing a sequence. This is guaranteed to be QChar::null for all non-text elements.

Reimplemented from BasicElement.

Definition at line 59 of file bracketelement.cc.

References BasicElement::getCharacter(), and SequenceElement::isTextOnly().

BasicElement * SingleContentElement::goToPos FormulaCursor ,
bool &  handled,
const LuPixelPoint point,
const LuPixelPoint parentOrigin
[virtual]
 

Sets the cursor and returns the element the point is in.

The handled flag shows whether the cursor has been set. This is needed because only the innermost matching element is allowed to set the cursor.

Reimplemented from BasicElement.

Reimplemented in BracketElement.

Definition at line 70 of file bracketelement.cc.

References SequenceElement::goToPos(), and BasicElement::goToPos().

void SingleContentElement::dispatchFontCommand FontCommand cmd  )  [virtual]
 

Dispatch this FontCommand to all our TextElement children.

Reimplemented from BasicElement.

Definition at line 87 of file bracketelement.cc.

References SequenceElement::dispatchFontCommand().

void SingleContentElement::moveLeft FormulaCursor cursor,
BasicElement from
[virtual]
 

Enters this element while moving to the left starting inside the element `from'.

Searches for a cursor position inside this element or to the left of it.

Reimplemented from BasicElement.

Definition at line 92 of file bracketelement.cc.

References FormulaCursor::isSelectionMode(), SequenceElement::moveLeft(), and BasicElement::moveLeft().

void SingleContentElement::moveRight FormulaCursor cursor,
BasicElement from
[virtual]
 

Enters this element while moving to the right starting inside the element `from'.

Searches for a cursor position inside this element or to the right of it.

Reimplemented from BasicElement.

Definition at line 108 of file bracketelement.cc.

References FormulaCursor::isSelectionMode(), SequenceElement::moveRight(), and BasicElement::moveRight().

void SingleContentElement::moveUp FormulaCursor cursor,
BasicElement from
[virtual]
 

Enters this element while moving up starting inside the element `from'.

Searches for a cursor position inside this element or above it.

Reimplemented from BasicElement.

Definition at line 124 of file bracketelement.cc.

References BasicElement::moveUp().

void SingleContentElement::moveDown FormulaCursor cursor,
BasicElement from
[virtual]
 

Enters this element while moving down starting inside the element `from'.

Searches for a cursor position inside this element or below it.

Reimplemented from BasicElement.

Definition at line 129 of file bracketelement.cc.

References BasicElement::moveDown().

void SingleContentElement::remove FormulaCursor ,
QPtrList< BasicElement > &  ,
Direction 
[virtual]
 

Removes all selected children and returns them.

Places the cursor to where the children have been.

We remove ourselve if we are requested to remove our content.

Reimplemented from BasicElement.

Definition at line 134 of file bracketelement.cc.

References FormulaCursor::getPos(), BasicElement::remove(), and BasicElement::selectChild().

void SingleContentElement::normalize FormulaCursor ,
Direction 
[virtual]
 

Moves the cursor to a normal place where new elements might be inserted.

Reimplemented from BasicElement.

Definition at line 146 of file bracketelement.cc.

References SequenceElement::moveLeft(), and SequenceElement::moveRight().

SequenceElement * SingleContentElement::getMainChild  )  [virtual]
 

Removes the child.

If this was the main child this element might request its own removal. The cursor is the one that caused the removal. It has to be moved to the place any user expects the cursor after that particular element has been removed.

Reimplemented from BasicElement.

Definition at line 156 of file bracketelement.cc.

void SingleContentElement::selectChild FormulaCursor cursor,
BasicElement child
[virtual]
 

Sets the cursor to select the child.

The mark is placed before, the position behind it.

Reimplemented from BasicElement.

Definition at line 161 of file bracketelement.cc.

References FormulaCursor::setTo().

void SingleContentElement::writeMathML QDomDocument  doc,
QDomNode  parent
[virtual]
 

Same as above, just MathML.

Reimplemented from BasicElement.

Reimplemented in BracketElement, OverlineElement, and UnderlineElement.

Definition at line 194 of file bracketelement.cc.

References SequenceElement::writeMathML().

Referenced by UnderlineElement::writeMathML(), OverlineElement::writeMathML(), and BracketElement::writeMathML().

void SingleContentElement::writeDom QDomElement  element  )  [protected, virtual]
 

Appends our attributes to the dom element.

Reimplemented from BasicElement.

Reimplemented in BracketElement.

Definition at line 168 of file bracketelement.cc.

References BasicElement::getElementDom(), and BasicElement::writeDom().

Referenced by BracketElement::writeDom().

bool SingleContentElement::readContentFromDom QDomNode node  )  [protected, virtual]
 

Reads our content from the node.

Sets the node to the next node that needs to be read. Returns false if it failed.

Reimplemented from BasicElement.

Definition at line 179 of file bracketelement.cc.

References BasicElement::buildChild(), BasicElement::getTagName(), and BasicElement::readContentFromDom().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for lib Library Version 1.3.5.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Fri Mar 11 11:50:56 2005 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2003