formulacursor.cpp
679bool FormulaCursor::buildElementsFromMathMLDom( TQDomElement root, TQPtrList<BasicElement>& list )
virtual FormulaElement * formula()
Provide fast access to the rootElement for each child.
Definition basicelement.cpp:70
virtual void remove(FormulaCursor *, TQPtrList< BasicElement > &, Direction)
Removes all selected children and returns them.
Definition basicelement.h:282
virtual void moveHome(FormulaCursor *)
Enters this element while moving to the left starting inside the element `from'.
Definition basicelement.h:226
virtual BasicElement * getChild(FormulaCursor *, Direction=beforeCursor)
Returns the child at the cursor.
Definition basicelement.h:301
virtual void selectChild(FormulaCursor *, BasicElement *)
Sets the cursor to select the child.
Definition basicelement.h:308
virtual void goInside(FormulaCursor *cursor)
Sets the cursor inside this element to its start position.
Definition basicelement.cpp:114
virtual void normalize(FormulaCursor *, Direction)
Moves the cursor to a normal place where new elements might be inserted.
Definition basicelement.cpp:155
virtual bool isSenseless()
Returns wether the element has no more useful children (except its main child) and should therefore b...
Definition basicelement.h:296
virtual void insert(FormulaCursor *, TQPtrList< BasicElement > &, Direction)
Inserts all new children at the cursor position.
Definition basicelement.h:276
virtual void childWillVanish(FormulaCursor *, BasicElement *)
Moves the cursor away from the given child.
Definition basicelement.h:315
virtual void moveEnd(FormulaCursor *)
Moves the cursor to the last position in this sequence.
Definition basicelement.h:232
A black box that is supposed to contain everything which is needed to describe a cursor.
Definition formulacursor.h:315
bool buildElementsFromMathMLDom(TQDomElement root, TQPtrList< BasicElement > &list)
Inserts the elements that could be read from the MathML dom into the list.
Definition formulacursor.cpp:679
IndexElement * getActiveIndexElement()
Returns the IndexElement the cursor is on or 0 if there is non.
Definition formulacursor.cpp:493
NameSequence * getActiveNameSequence()
Definition formulacursor.cpp:546
SequenceElement * normal()
Returns the sequence the cursor is in if we are normal.
Definition formulacursor.cpp:736
void normalize(Direction direction=beforeCursor)
Moves the cursor to a normal position.
Definition formulacursor.cpp:286
void insert(BasicElement *, Direction=beforeCursor)
Inserts the child at the current position.
Definition formulacursor.cpp:297
SymbolElement * getActiveSymbolElement()
Returns the SymbolElement the cursor is on or 0 if there is non.
Definition formulacursor.cpp:529
void selectActiveElement()
Selects the element the cursor points to (stands after) if there is such an element and if there is n...
Definition formulacursor.cpp:465
void replaceSelectionWith(BasicElement *, Direction=beforeCursor)
Replaces the current selection with the supplied element.
Definition formulacursor.cpp:346
void setCursorData(CursorData *data)
Sets the cursor to where the CursorData points to.
Definition formulacursor.cpp:721
FormulaCursor(FormulaElement *element)
Creates a cursor and puts is at the beginning of the formula.
Definition formulacursor.cpp:37
CursorData * getCursorData()
Creates a new CursorData object that describes the cursor.
Definition formulacursor.cpp:696
RootElement * getActiveRootElement()
Returns the RootElement the cursor is on or 0 if there is non.
Definition formulacursor.cpp:511
BasicElement * replaceByMainChildContent(Direction=beforeCursor)
Replaces the element the cursor points to with its main child's content.
Definition formulacursor.cpp:383
BasicElement * removeEnclosingElement(Direction=beforeCursor)
Trys to find the element we are the main child of and replace it with our content.
Definition formulacursor.cpp:412
void calcCursorSize(const ContextStyle &context, bool smallCursor)
Calculates the size of the cursor.
Definition formulacursor.cpp:72
void goInsideElement(BasicElement *element)
Moves the cursor inside the element.
Definition formulacursor.cpp:274
void elementWillVanish(BasicElement *element)
The element is going to leave the formula with and all its children.
Definition formulacursor.cpp:587
void setTo(BasicElement *element, uint cursor, int mark=-1)
Sets the cursor to a new position.
Definition formulacursor.cpp:45
bool buildElementsFromDom(TQDomElement root, TQPtrList< BasicElement > &list)
Inserts the elements that could be read from the dom into the list.
Definition formulacursor.cpp:662
bool elementIsSenseless()
Returns wether the element the cursor points to should be replaced.
Definition formulacursor.cpp:430
MatrixElement * getActiveMatrixElement()
Definition formulacursor.cpp:568
TextElement * getActiveTextElement()
Definition formulacursor.cpp:562
void remove(TQPtrList< BasicElement > &, Direction=beforeCursor)
Removes the current selected children and returns them.
Definition formulacursor.cpp:318
void draw(TQPainter &, const ContextStyle &context, StyleAttributes &style, bool smallCursor, bool activeCursor)
Draws the cursor at its current position.
Definition formulacursor.cpp:82
void formulaLoaded(FormulaElement *rootElement)
A new formula has been loaded.
Definition formulacursor.cpp:611
void copy(TQDomDocument &doc)
Stores the currently selected elements inside a dom.
Definition formulacursor.cpp:639
BasicElement * goToPos(FormulaCursor *, const LuPixelPoint &point)
Returns the element the point is in.
Definition formulaelement.cpp:56
void selectAllChildren(FormulaCursor *cursor)
Selects all children.
Definition sequenceelement.cpp:919
void getChildrenMathMLDom(TQDomDocument &doc, TQDomNode &elem, uint from, uint to)
Stores the given childrens MathML dom in the element.
Definition sequenceelement.cpp:1414
virtual void moveWordLeft(FormulaCursor *cursor)
Enters this element while moving to the left starting inside the element `from'.
virtual void moveEnd(FormulaCursor *cursor)
Moves the cursor to the last position in this sequence.
Definition sequenceelement.cpp:671
virtual void remove(FormulaCursor *, TQPtrList< BasicElement > &, Direction)
Removes all selected children and returns them.
Definition sequenceelement.cpp:788
virtual void drawCursor(TQPainter &painter, const ContextStyle &context, StyleAttributes &style, FormulaCursor *cursor, bool smallCursor, bool activeCursor)
If the cursor is inside a sequence it needs to be drawn.
Definition sequenceelement.cpp:380
virtual void moveWordRight(FormulaCursor *cursor)
Moves to the end of this word or if we are there already to the end of the next.
virtual void goInside(FormulaCursor *cursor)
Sets the cursor inside this element to its start position.
Definition sequenceelement.cpp:695
virtual void selectChild(FormulaCursor *cursor, BasicElement *child)
Sets the cursor to select the child.
Definition sequenceelement.cpp:891
virtual bool readOnly(const FormulaCursor *) const
Definition sequenceelement.cpp:107
bool buildChildrenFromDom(TQPtrList< BasicElement > &list, TQDomNode n)
Builds elements from the given node and its siblings and puts them into the list.
Definition sequenceelement.cpp:1428
virtual void moveHome(FormulaCursor *cursor)
Enters this element while moving up starting inside the element `from'.
Definition sequenceelement.cpp:653
