lib
MultilineElement Class Reference
#include <matrixelement.h>
Inheritance diagram for MultilineElement:

Detailed Description
Any number of lines.
Definition at line 309 of file matrixelement.h.
Public Member Functions | |
MultilineElement (BasicElement *parent=0) | |
~MultilineElement () | |
MultilineElement (const MultilineElement &) | |
virtual MultilineElement * | clone () |
virtual bool | accept (ElementVisitor *visitor) |
virtual void | entered (SequenceElement *child) |
BasicElement * | goToPos (FormulaCursor *cursor, bool &handled, const LuPixelPoint &point, const LuPixelPoint &parentOrigin) |
virtual void | goInside (FormulaCursor *cursor) |
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 | calcSizes (const ContextStyle &style, ContextStyle::TextStyle tstyle, ContextStyle::IndexStyle istyle, StyleAttributes &style) |
virtual void | draw (QPainter &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 | insert (FormulaCursor *, QPtrList< BasicElement > &, Direction) |
virtual void | remove (FormulaCursor *, QPtrList< BasicElement > &, Direction) |
virtual void | normalize (FormulaCursor *, Direction) |
virtual SequenceElement * | getMainChild () |
virtual void | selectChild (FormulaCursor *cursor, BasicElement *child) |
virtual QString | toLatex () |
virtual QString | formulaString () |
virtual void | writeMathML (QDomDocument &doc, QDomNode &parent, bool oasisFormat=false) const |
Protected Member Functions | |
virtual QString | getTagName () const |
virtual void | writeDom (QDomElement element) |
virtual bool | readAttributesFromDom (QDomElement element) |
virtual bool | readContentFromDom (QDomNode &node) |
Friends | |
class | KFCNewLine |
Constructor & Destructor Documentation
MultilineElement::MultilineElement | ( | BasicElement * | parent = 0 |
) |
The container this FormulaElement belongs to must not be 0, except you really know what you are doing.
Definition at line 2139 of file matrixelement.cc.
Member Function Documentation
bool MultilineElement::accept | ( | ElementVisitor * | visitor | ) | [virtual] |
Visit this element.
An implementation of the visitor pattern.
Implements BasicElement.
Definition at line 2163 of file matrixelement.cc.
void MultilineElement::entered | ( | SequenceElement * | child | ) | [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 2169 of file matrixelement.cc.
BasicElement * MultilineElement::goToPos | ( | FormulaCursor * | cursor, | |
bool & | handled, | |||
const LuPixelPoint & | point, | |||
const LuPixelPoint & | parentOrigin | |||
) | [virtual] |
Returns the element the point is in.
Reimplemented from BasicElement.
Definition at line 2178 of file matrixelement.cc.
void MultilineElement::goInside | ( | FormulaCursor * | cursor | ) | [virtual] |
Sets the cursor inside this element to its start position.
For most elements that is the main child.
Reimplemented from BasicElement.
Definition at line 2199 of file matrixelement.cc.
void MultilineElement::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 2204 of file matrixelement.cc.
void MultilineElement::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 2237 of file matrixelement.cc.
void MultilineElement::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 2266 of file matrixelement.cc.
void MultilineElement::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 2328 of file matrixelement.cc.
void MultilineElement::calcSizes | ( | const ContextStyle & | style, | |
ContextStyle::TextStyle | tstyle, | |||
ContextStyle::IndexStyle | istyle, | |||
StyleAttributes & | style | |||
) | [virtual] |
Calculates our width and height and our children's parentPosition.
Implements BasicElement.
Definition at line 2387 of file matrixelement.cc.
void MultilineElement::draw | ( | QPainter & | painter, | |
const LuPixelRect & | r, | |||
const ContextStyle & | context, | |||
ContextStyle::TextStyle | tstyle, | |||
ContextStyle::IndexStyle | istyle, | |||
StyleAttributes & | style, | |||
const LuPixelPoint & | parentOrigin | |||
) | [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 2448 of file matrixelement.cc.
void MultilineElement::dispatchFontCommand | ( | FontCommand * | cmd | ) | [virtual] |
Dispatch this FontCommand to all our TextElement children.
Reimplemented from BasicElement.
Definition at line 2483 of file matrixelement.cc.
void MultilineElement::insert | ( | FormulaCursor * | cursor, | |
QPtrList< BasicElement > & | newChildren, | |||
Direction | direction | |||
) | [virtual] |
Inserts all new children at the cursor position.
Places the cursor according to the direction.
The list will be emptied but stays the property of the caller.
Reimplemented from BasicElement.
Definition at line 2492 of file matrixelement.cc.
void MultilineElement::remove | ( | FormulaCursor * | cursor, | |
QPtrList< BasicElement > & | removedChildren, | |||
Direction | direction | |||
) | [virtual] |
Removes all selected children and returns them.
Places the cursor to where the children have been.
Reimplemented from BasicElement.
Definition at line 2510 of file matrixelement.cc.
void MultilineElement::normalize | ( | FormulaCursor * | , | |
Direction | ||||
) | [virtual] |
Moves the cursor to a normal place where new elements might be inserted.
Reimplemented from BasicElement.
Definition at line 2527 of file matrixelement.cc.
SequenceElement * MultilineElement::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 2554 of file matrixelement.cc.
void MultilineElement::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 2559 of file matrixelement.cc.
QString MultilineElement::toLatex | ( | ) | [virtual] |
- Returns:
- the latex representation of the element and of the element's children
Reimplemented from BasicElement.
Definition at line 2658 of file matrixelement.cc.
void MultilineElement::writeMathML | ( | QDomDocument & | doc, | |
QDomNode & | parent, | |||
bool | oasisFormat = false | |||
) | const [virtual] |
Same as above, just MathML.
It shouldn't be redefined but for exceptional cases, use the general writeMathML* API instead
Reimplemented from BasicElement.
Definition at line 2586 of file matrixelement.cc.
virtual QString MultilineElement::getTagName | ( | ) | const [inline, protected, virtual] |
Returns the tag name of this element type.
Reimplemented from BasicElement.
Definition at line 432 of file matrixelement.h.
void MultilineElement::writeDom | ( | QDomElement | element | ) | [protected, virtual] |
Appends our attributes to the dom element.
Reimplemented from BasicElement.
Definition at line 2572 of file matrixelement.cc.
bool MultilineElement::readAttributesFromDom | ( | QDomElement | element | ) | [protected, virtual] |
Reads our attributes from the element.
Returns false if it failed.
Reimplemented from BasicElement.
Definition at line 2608 of file matrixelement.cc.
bool MultilineElement::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 2636 of file matrixelement.cc.
The documentation for this class was generated from the following files: