RootElement Class Reference
A nice graphical root. More...
#include <rootelement.h>
Inheritance diagram for RootElement:

Public Member Functions | |
RootElement (BasicElement *parent=0) | |
RootElement (const RootElement &) | |
virtual RootElement * | clone () |
virtual bool | accept (ElementVisitor *visitor) |
virtual void | entered (SequenceElement *child) |
virtual BasicElement * | goToPos (FormulaCursor *, bool &handled, const LuPixelPoint &point, const LuPixelPoint &parentOrigin) |
virtual void | calcSizes (const ContextStyle &style, ContextStyle::TextStyle tstyle, ContextStyle::IndexStyle istyle) |
virtual void | draw (QPainter &painter, const LuPixelRect &r, const ContextStyle &style, ContextStyle::TextStyle tstyle, ContextStyle::IndexStyle istyle, 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 | insert (FormulaCursor *, QPtrList< BasicElement > &, Direction) |
virtual void | remove (FormulaCursor *, QPtrList< BasicElement > &, Direction) |
virtual void | normalize (FormulaCursor *, Direction) |
virtual SequenceElement * | getMainChild () |
SequenceElement * | getRadiant () |
virtual void | selectChild (FormulaCursor *cursor, BasicElement *child) |
void | moveToIndex (FormulaCursor *, Direction) |
void | setToIndex (FormulaCursor *) |
bool | hasIndex () const |
ElementIndexPtr | getIndex () |
virtual QString | toLatex () |
virtual QString | formulaString () |
virtual void | writeMathML (QDomDocument doc, QDomNode parent) |
Protected Member Functions | |
virtual QString | getTagName () const |
virtual void | writeDom (QDomElement element) |
virtual bool | readAttributesFromDom (QDomElement element) |
virtual bool | readContentFromDom (QDomNode &node) |
Detailed Description
A nice graphical root.
Definition at line 35 of file rootelement.h.
Member Function Documentation
|
Visit this element. An implementation of the visitor pattern. Implements BasicElement. Definition at line 123 of file rootelement.cc. References ElementVisitor::visit(). |
|
The cursor has entered one of our child sequences. This is a good point to tell the user where he is. Reimplemented from BasicElement. Definition at line 129 of file rootelement.cc. References BasicElement::formula(), and FormulaElement::tell(). |
|
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. Definition at line 140 of file rootelement.cc. References BasicElement::getHeight(), SequenceElement::goToPos(), BasicElement::goToPos(), and SequenceElement::moveLeft(). |
|
Calculates our width and height and our children's parentPosition.
Implements BasicElement. Definition at line 181 of file rootelement.cc. References SequenceElement::calcSizes(), BasicElement::getBaseline(), BasicElement::getHeight(), BasicElement::getWidth(), BasicElement::getY(), BasicElement::setX(), and BasicElement::setY(). |
|
Draws the whole element including its children. The `parentOrigin' is the point this element's parent starts. We can use our parentPosition to get our own origin then. Implements BasicElement. Definition at line 236 of file rootelement.cc. References SequenceElement::draw(), BasicElement::getHeight(), and BasicElement::getWidth(). |
|
Dispatch this FontCommand to all our TextElement children.
Reimplemented from BasicElement. Definition at line 285 of file rootelement.cc. References SequenceElement::dispatchFontCommand(). |
|
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 298 of file rootelement.cc. References FormulaCursor::getLinearMovement(), FormulaCursor::isSelectionMode(), SequenceElement::moveLeft(), and BasicElement::moveLeft(). |
|
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 327 of file rootelement.cc. References FormulaCursor::getLinearMovement(), FormulaCursor::isSelectionMode(), SequenceElement::moveRight(), and BasicElement::moveRight(). |
|
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 356 of file rootelement.cc. References FormulaCursor::isSelectionMode(), SequenceElement::moveRight(), and BasicElement::moveUp(). |
|
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 384 of file rootelement.cc. References FormulaCursor::isSelectionMode(), BasicElement::moveDown(), and SequenceElement::moveRight(). |
|
Reinserts the index if it has been removed.
Reimplemented from BasicElement. Definition at line 410 of file rootelement.cc. References FormulaElement::changed(), BasicElement::formula(), FormulaCursor::getPos(), SequenceElement::moveLeft(), SequenceElement::moveRight(), BasicElement::setParent(), and FormulaCursor::setSelection(). |
|
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 435 of file rootelement.cc. References FormulaElement::changed(), FormulaElement::elementRemoval(), BasicElement::formula(), FormulaCursor::getPos(), BasicElement::remove(), BasicElement::selectChild(), and FormulaCursor::setTo(). |
|
Moves the cursor to a normal place where new elements might be inserted.
Reimplemented from BasicElement. Definition at line 459 of file rootelement.cc. References SequenceElement::moveLeft(), and SequenceElement::moveRight(). |
|
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 474 of file rootelement.cc. |
|
Sets the cursor to select the child. The mark is placed before, the position behind it. Reimplemented from BasicElement. Definition at line 492 of file rootelement.cc. References FormulaCursor::setTo(). |
|
Moves the cursor away from the given child. The cursor is guaranteed to be inside this element. Definition at line 503 of file rootelement.cc. References SequenceElement::moveLeft(), and SequenceElement::moveRight(). |
|
Reimplemented from BasicElement. Definition at line 583 of file rootelement.cc. References SequenceElement::toLatex(). |
|
Same as above, just MathML.
Reimplemented from BasicElement. Definition at line 607 of file rootelement.cc. References SequenceElement::writeMathML(). |
|
Returns the tag name of this element type.
Reimplemented from BasicElement. Definition at line 189 of file rootelement.h. |
|
Appends our attributes to the dom element.
Reimplemented from BasicElement. Definition at line 524 of file rootelement.cc. References BasicElement::getElementDom(), and BasicElement::writeDom(). |
|
Reads our attributes from the element. Returns false if it failed. Reimplemented from BasicElement. Definition at line 545 of file rootelement.cc. References BasicElement::readAttributesFromDom(). |
|
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 555 of file rootelement.cc. References BasicElement::buildChild(), and BasicElement::readContentFromDom(). |
The documentation for this class was generated from the following files: