#include <indexelement.h>
Public Member Functions | |
| IndexElement (BasicElement *parent=0) | |
| IndexElement (const IndexElement &) | |
| virtual IndexElement * | clone () |
| virtual bool | accept (ElementVisitor *visitor) |
| virtual TQChar | getCharacter () const |
| virtual void | entered (SequenceElement *child) |
| virtual BasicElement * | goToPos (FormulaCursor *, bool &handled, const LuPixelPoint &point, const LuPixelPoint &parentOrigin) |
| virtual void | calcSizes (const ContextStyle &cstyle, ContextStyle::TextStyle tstyle, ContextStyle::IndexStyle istyle, StyleAttributes &style) |
| virtual void | draw (TQPainter &painter, const LuPixelRect &r, const ContextStyle &context, ContextStyle::TextStyle tstyle, ContextStyle::IndexStyle istyle, StyleAttributes &style, 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 SequenceElement * | getMainChild () |
| SequenceElement * | getExponent () |
| virtual void | insert (FormulaCursor *, TQPtrList< BasicElement > &, Direction) |
| virtual void | remove (FormulaCursor *, TQPtrList< BasicElement > &, Direction) |
| virtual void | normalize (FormulaCursor *, Direction) |
| virtual BasicElement * | getChild (FormulaCursor *, Direction=beforeCursor) |
| virtual void | selectChild (FormulaCursor *cursor, BasicElement *child) |
| virtual bool | isSenseless () |
| bool | hasUpperLeft () const |
| bool | hasUpperMiddle () const |
| bool | hasUpperRight () const |
| bool | hasLowerLeft () const |
| bool | hasLowerMiddle () const |
| bool | hasLowerRight () const |
| void | setToUpperLeft (FormulaCursor *cursor) |
| void | setToUpperMiddle (FormulaCursor *cursor) |
| void | setToUpperRight (FormulaCursor *cursor) |
| void | setToLowerLeft (FormulaCursor *cursor) |
| void | setToLowerMiddle (FormulaCursor *cursor) |
| void | setToLowerRight (FormulaCursor *cursor) |
| void | moveToUpperLeft (FormulaCursor *cursor, Direction direction) |
| void | moveToUpperMiddle (FormulaCursor *cursor, Direction direction) |
| void | moveToUpperRight (FormulaCursor *cursor, Direction direction) |
| void | moveToLowerLeft (FormulaCursor *cursor, Direction direction) |
| void | moveToLowerMiddle (FormulaCursor *cursor, Direction direction) |
| void | moveToLowerRight (FormulaCursor *cursor, Direction direction) |
| ElementIndexPtr | getUpperLeft () |
| ElementIndexPtr | getLowerLeft () |
| ElementIndexPtr | getUpperMiddle () |
| ElementIndexPtr | getLowerMiddle () |
| ElementIndexPtr | getUpperRight () |
| ElementIndexPtr | getLowerRight () |
| ElementIndexPtr | getIndex (int position) |
| virtual TQString | toLatex () |
| virtual TQString | formulaString () |
Public Member Functions inherited from BasicElement | |
| BasicElement (BasicElement *parent=0) | |
| BasicElement (const BasicElement &) | |
| virtual bool | readOnly (const BasicElement *child) const |
| virtual FormulaElement * | formula () |
| virtual const FormulaElement * | formula () const |
| virtual TokenType | getTokenType () const |
| virtual bool | isInvisible () const |
| LuPixelPoint | widgetPos () |
| virtual void | moveHome (FormulaCursor *) |
| virtual void | moveEnd (FormulaCursor *) |
| virtual void | goInside (FormulaCursor *cursor) |
| virtual void | childWillVanish (FormulaCursor *, BasicElement *) |
| virtual void | registerTab (BasicElement *) |
| virtual KCommand * | buildCommand (Container *, Request *) |
| virtual KCommand * | input (Container *, TQKeyEvent *) |
| const BasicElement * | getParent () const |
| BasicElement * | getParent () |
| void | setParent (BasicElement *p) |
| luPixel | getX () const |
| luPixel | getY () const |
| void | setX (luPixel x) |
| void | setY (luPixel y) |
| luPixel | getWidth () const |
| luPixel | getHeight () const |
| void | setWidth (luPixel width) |
| void | setHeight (luPixel height) |
| luPixel | getBaseline () const |
| void | setBaseline (luPixel line) |
| luPixel | axis (const ContextStyle &style, ContextStyle::TextStyle tstyle, double factor) const |
| TQDomElement | getElementDom (TQDomDocument &doc) |
| virtual void | writeMathML (TQDomDocument &doc, TQDomNode &parent, bool oasisFormat=false) const |
| bool | buildFromDom (TQDomElement element) |
| int | buildFromMathMLDom (TQDomElement element) |
| ElementType * | getElementType () const |
| virtual void | setElementType (ElementType *t) |
| virtual void | setStyle (StyleElement *) |
Protected Member Functions | |
| virtual TQString | getTagName () const |
| virtual void | writeDom (TQDomElement element) |
| virtual TQString | getElementName () const |
| virtual void | writeMathMLAttributes (TQDomElement &element) const |
| virtual void | writeMathMLContent (TQDomDocument &doc, TQDomElement &element, bool oasisFormat) const |
| virtual bool | readAttributesFromDom (TQDomElement element) |
| virtual bool | readContentFromDom (TQDomNode &node) |
| virtual bool | readAttributesFromMathMLDom (const TQDomElement &element) |
| virtual int | readContentFromMathMLDom (TQDomNode &node) |
Protected Member Functions inherited from BasicElement | |
| bool | buildChild (SequenceElement *child, TQDomNode node, TQString name) |
| double | getSize (const TQString &str, SizeType *st) |
| SizeType | getSpace (const TQString &str) |
Additional Inherited Members | |
Static Public Member Functions inherited from BasicElement | |
| static int | getEvilDestructionCount () |
Detailed Description
The element with up to four indexes in the four corners.
Definition at line 34 of file indexelement.h.
Constructor & Destructor Documentation
◆ IndexElement() [1/2]
| IndexElement::IndexElement | ( | BasicElement * | parent = 0 | ) |
Definition at line 93 of file indexelement.cpp.
◆ ~IndexElement()
| IndexElement::~IndexElement | ( | ) |
Definition at line 110 of file indexelement.cpp.
◆ IndexElement() [2/2]
| IndexElement::IndexElement | ( | const IndexElement & | other | ) |
Definition at line 122 of file indexelement.cpp.
Member Function Documentation
◆ accept()
|
virtual |
Visit this element.
An implementation of the visitor pattern.
Implements BasicElement.
Definition at line 181 of file indexelement.cpp.
◆ calcSizes()
|
virtual |
Calculates our width and height and our children's parentPosition.
Implements BasicElement.
Definition at line 346 of file indexelement.cpp.
◆ clone()
|
inlinevirtual |
Implements BasicElement.
Definition at line 43 of file indexelement.h.
◆ dispatchFontCommand()
|
virtual |
Dispatch this FontCommand to all our TextElement children.
Reimplemented from BasicElement.
Definition at line 593 of file indexelement.cpp.
◆ draw()
|
virtual |
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 549 of file indexelement.cpp.
◆ entered()
|
virtual |
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 215 of file indexelement.cpp.
◆ formulaString()
|
virtual |
Reimplemented from BasicElement.
Definition at line 1625 of file indexelement.cpp.
◆ getCharacter()
|
virtual |
- Returns
- the character that represents this element. Used for parsing a sequence. This is guaranteed to be TQChar::null for all non-text elements.
Reimplemented from BasicElement.
Definition at line 187 of file indexelement.cpp.
◆ getChild()
|
virtual |
Returns the child at the cursor.
Reimplemented from BasicElement.
Definition at line 1048 of file indexelement.cpp.
◆ getElementName()
|
protectedvirtual |
Reimplemented from BasicElement.
Definition at line 1637 of file indexelement.cpp.
◆ getExponent()
|
inline |
Definition at line 159 of file indexelement.h.
◆ getIndex()
| ElementIndexPtr IndexElement::getIndex | ( | int | position | ) |
Returns the index at the position.
Defaults to upperRight.
Definition at line 1562 of file indexelement.cpp.
◆ getLowerLeft()
|
inline |
Definition at line 249 of file indexelement.h.
◆ getLowerMiddle()
|
inline |
Definition at line 251 of file indexelement.h.
◆ getLowerRight()
|
inline |
Definition at line 253 of file indexelement.h.
◆ getMainChild()
|
inlinevirtual |
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 indexelement.h.
◆ getTagName()
|
inlineprotectedvirtual |
Returns the tag name of this element type.
Reimplemented from BasicElement.
Definition at line 276 of file indexelement.h.
◆ getUpperLeft()
|
inline |
Definition at line 248 of file indexelement.h.
◆ getUpperMiddle()
|
inline |
Definition at line 250 of file indexelement.h.
◆ getUpperRight()
|
inline |
Definition at line 252 of file indexelement.h.
◆ goToPos()
|
virtual |
Sets the cursor and returns the element the point is in.
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 229 of file indexelement.cpp.
◆ hasLowerLeft()
|
inline |
Definition at line 224 of file indexelement.h.
◆ hasLowerMiddle()
|
inline |
Definition at line 225 of file indexelement.h.
◆ hasLowerRight()
|
inline |
Definition at line 226 of file indexelement.h.
◆ hasUpperLeft()
|
inline |
Definition at line 221 of file indexelement.h.
◆ hasUpperMiddle()
|
inline |
Definition at line 222 of file indexelement.h.
◆ hasUpperRight()
|
inline |
Definition at line 223 of file indexelement.h.
◆ insert()
|
virtual |
Inserts all new children at the cursor position.
Places the cursor according to the direction.
You only can insert one index at a time. So the list must contain exactly on SequenceElement. And the index you want to insert must not exist already.
The list will be emptied but stays the property of the caller.
Reimplemented from BasicElement.
Definition at line 914 of file indexelement.cpp.
◆ isSenseless()
|
virtual |
Moves the cursor away from the given child.
Returns wether the element has no more useful children (except its main child) and should therefore be replaced by its main child's content.
The cursor is guaranteed to be inside this element. Returns wether the element has no more useful children (except its main child) and should therefore be replaced by its main child's content.
Reimplemented from BasicElement.
Definition at line 1038 of file indexelement.cpp.
◆ moveDown()
|
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 845 of file indexelement.cpp.
◆ moveLeft()
|
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 656 of file indexelement.cpp.
◆ moveRight()
|
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 727 of file indexelement.cpp.
◆ moveToLowerLeft()
| void IndexElement::moveToLowerLeft | ( | FormulaCursor * | cursor, |
| Direction | direction | ||
| ) |
Definition at line 1190 of file indexelement.cpp.
◆ moveToLowerMiddle()
| void IndexElement::moveToLowerMiddle | ( | FormulaCursor * | cursor, |
| Direction | direction | ||
| ) |
Definition at line 1202 of file indexelement.cpp.
◆ moveToLowerRight()
| void IndexElement::moveToLowerRight | ( | FormulaCursor * | cursor, |
| Direction | direction | ||
| ) |
Definition at line 1214 of file indexelement.cpp.
◆ moveToUpperLeft()
| void IndexElement::moveToUpperLeft | ( | FormulaCursor * | cursor, |
| Direction | direction | ||
| ) |
Definition at line 1154 of file indexelement.cpp.
◆ moveToUpperMiddle()
| void IndexElement::moveToUpperMiddle | ( | FormulaCursor * | cursor, |
| Direction | direction | ||
| ) |
Definition at line 1166 of file indexelement.cpp.
◆ moveToUpperRight()
| void IndexElement::moveToUpperRight | ( | FormulaCursor * | cursor, |
| Direction | direction | ||
| ) |
Definition at line 1178 of file indexelement.cpp.
◆ moveUp()
|
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 798 of file indexelement.cpp.
◆ normalize()
|
virtual |
Moves the cursor to a normal place where new elements might be inserted.
Reimplemented from BasicElement.
Definition at line 1023 of file indexelement.cpp.
◆ readAttributesFromDom()
|
protectedvirtual |
Reads our attributes from the element.
Returns false if it failed.
Reimplemented from BasicElement.
Definition at line 1276 of file indexelement.cpp.
◆ readAttributesFromMathMLDom()
|
protectedvirtual |
Reads our attributes from the MathML element.
Returns false if it failed.
Reimplemented from BasicElement.
Definition at line 1348 of file indexelement.cpp.
◆ readContentFromDom()
|
protectedvirtual |
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 1289 of file indexelement.cpp.
◆ readContentFromMathMLDom()
|
protectedvirtual |
Reads our content from the MathML node.
Sets the node to the next node that needs to be read. It is sometimes needed to read more than one node (e. g. for fence operators). Returns the number of nodes processed or -1 if it failed.
Reimplemented from BasicElement.
Definition at line 1411 of file indexelement.cpp.
◆ remove()
|
virtual |
Removes all selected children and returns them.
Places the cursor to where the children have been.
The cursor has to be inside one of our indexes which is supposed to be empty. The index will be removed and the cursor will be placed to the removed index so it can be inserted again. This methode is called by SequenceElement::remove only.
The ownership of the list is passed to the caller.
Reimplemented from BasicElement.
Definition at line 967 of file indexelement.cpp.
◆ selectChild()
|
virtual |
Sets the cursor to select the child.
The mark is placed before, the position behind it.
Reimplemented from BasicElement.
Definition at line 1081 of file indexelement.cpp.
◆ setToLowerLeft()
| void IndexElement::setToLowerLeft | ( | FormulaCursor * | cursor | ) |
Definition at line 1136 of file indexelement.cpp.
◆ setToLowerMiddle()
| void IndexElement::setToLowerMiddle | ( | FormulaCursor * | cursor | ) |
Definition at line 1141 of file indexelement.cpp.
◆ setToLowerRight()
| void IndexElement::setToLowerRight | ( | FormulaCursor * | cursor | ) |
Definition at line 1146 of file indexelement.cpp.
◆ setToUpperLeft()
| void IndexElement::setToUpperLeft | ( | FormulaCursor * | cursor | ) |
Definition at line 1121 of file indexelement.cpp.
◆ setToUpperMiddle()
| void IndexElement::setToUpperMiddle | ( | FormulaCursor * | cursor | ) |
Definition at line 1126 of file indexelement.cpp.
◆ setToUpperRight()
| void IndexElement::setToUpperRight | ( | FormulaCursor * | cursor | ) |
Definition at line 1131 of file indexelement.cpp.
◆ toLatex()
|
virtual |
- Returns
- the latex representation of the element and of the element's children
Reimplemented from BasicElement.
Definition at line 1583 of file indexelement.cpp.
◆ writeDom()
|
protectedvirtual |
Appends our attributes to the dom element.
Reimplemented from BasicElement.
Definition at line 1230 of file indexelement.cpp.
◆ writeMathMLAttributes()
|
protectedvirtual |
Reimplemented from BasicElement.
Definition at line 1656 of file indexelement.cpp.
◆ writeMathMLContent()
|
protectedvirtual |
Reimplemented from BasicElement.
Definition at line 1702 of file indexelement.cpp.
The documentation for this class was generated from the following files:

Public Member Functions inherited from