BracketElement Class Reference
A left and/or right bracket around one child. More...
#include <bracketelement.h>
Inheritance diagram for BracketElement:

Public Types | |
enum | { contentPos } |
Public Member Functions | |
BracketElement (SymbolType left=EmptyBracket, SymbolType right=EmptyBracket, BasicElement *parent=0) | |
BracketElement (const BracketElement &) | |
virtual BracketElement * | clone () |
virtual bool | accept (ElementVisitor *visitor) |
virtual TokenType | getTokenType () const |
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 | writeMathML (QDomDocument doc, QDomNode parent) |
Protected Member Functions | |
virtual QString | getTagName () const |
virtual bool | readAttributesFromDom (QDomElement element) |
virtual void | writeDom (QDomElement element) |
virtual QString | toLatex () |
virtual QString | formulaString () |
Detailed Description
A left and/or right bracket around one child.
Definition at line 153 of file bracketelement.h.
Member Function Documentation
|
Visit this element. An implementation of the visitor pattern. Implements BasicElement. Definition at line 224 of file bracketelement.cc. References accept(), and ElementVisitor::visit(). Referenced by accept(). |
|
Reimplemented from BasicElement. Definition at line 175 of file bracketelement.h. |
|
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 230 of file bracketelement.cc. References entered(), BasicElement::formula(), and FormulaElement::tell(). Referenced by entered(). |
|
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 SingleContentElement. Definition at line 236 of file bracketelement.cc. References SequenceElement::goToPos(), and goToPos(). Referenced by goToPos(). |
|
Calculates our width and height and our children's parentPosition.
Implements BasicElement. Definition at line 268 of file bracketelement.cc. References BasicElement::axis(), SequenceElement::calcSizes(), calcSizes(), BasicElement::getBaseline(), BasicElement::getHeight(), BasicElement::getWidth(), BasicElement::getY(), SequenceElement::isTextOnly(), BasicElement::setX(), and BasicElement::setY(). Referenced by calcSizes(). |
|
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 345 of file bracketelement.cc. References BasicElement::axis(), SequenceElement::draw(), draw(), BasicElement::getHeight(), and SequenceElement::isTextOnly(). Referenced by draw(). |
|
Same as above, just MathML.
Reimplemented from SingleContentElement. Definition at line 459 of file bracketelement.cc. References writeMathML(). Referenced by writeMathML(). |
|
Returns the tag name of this element type.
Reimplemented from BasicElement. Definition at line 218 of file bracketelement.h. |
|
Reads our attributes from the element. Returns false if it failed. Reimplemented from BasicElement. Definition at line 399 of file bracketelement.cc. References readAttributesFromDom(). Referenced by readAttributesFromDom(). |
|
Appends our attributes to the dom element.
Reimplemented from SingleContentElement. Definition at line 388 of file bracketelement.cc. References writeDom(). Referenced by writeDom(). |
|
Reimplemented from BasicElement. Definition at line 415 of file bracketelement.cc. References SequenceElement::toLatex(). |
The documentation for this class was generated from the following files: