lib

#include <matrixelement.h>

Inheritance diagram for MultilineElement:
BasicElement

Public Member Functions

 MultilineElement (BasicElement *parent=0)
 
 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 &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 insert (FormulaCursor *, TQPtrList< BasicElement > &, Direction)
 
virtual void remove (FormulaCursor *, TQPtrList< BasicElement > &, Direction)
 
virtual void normalize (FormulaCursor *, Direction)
 
virtual SequenceElement * getMainChild ()
 
virtual void selectChild (FormulaCursor *cursor, BasicElement *child)
 
virtual TQString toLatex ()
 
virtual TQString formulaString ()
 
virtual void writeMathML (TQDomDocument &doc, TQDomNode &parent, bool oasisFormat=false) const
 
- 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 TQChar getCharacter () const
 
virtual TokenType getTokenType () const
 
virtual bool isInvisible () const
 
LuPixelPoint widgetPos ()
 
virtual void moveHome (FormulaCursor *)
 
virtual void moveEnd (FormulaCursor *)
 
virtual bool isSenseless ()
 
virtual BasicElement * getChild (FormulaCursor *, Direction=beforeCursor)
 
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)
 
bool buildFromDom (TQDomElement element)
 
int buildFromMathMLDom (TQDomElement element)
 
ElementType * getElementType () const
 
virtual void setElementType (ElementType *t)
 
virtual void setStyle (StyleElement *)
 
virtual TQString getElementName () const
 

Protected Member Functions

virtual TQString getTagName () const
 
virtual void writeDom (TQDomElement element)
 
virtual bool readAttributesFromDom (TQDomElement element)
 
virtual bool readContentFromDom (TQDomNode &node)
 
- Protected Member Functions inherited from BasicElement
virtual void writeMathMLAttributes (TQDomElement &) const
 
virtual void writeMathMLContent (TQDomDocument &, TQDomElement &, bool) const
 
bool buildChild (SequenceElement *child, TQDomNode node, TQString name)
 
virtual bool readAttributesFromMathMLDom (const TQDomElement &element)
 
virtual int readContentFromMathMLDom (TQDomNode &node)
 
double getSize (const TQString &str, SizeType *st)
 
SizeType getSpace (const TQString &str)
 

Friends

class KFCNewLine
 

Additional Inherited Members

- Static Public Member Functions inherited from BasicElement
static int getEvilDestructionCount ()
 

Detailed Description

Any number of lines.

Definition at line 309 of file matrixelement.h.

Constructor & Destructor Documentation

◆ MultilineElement() [1/2]

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 2147 of file matrixelement.cpp.

◆ ~MultilineElement()

MultilineElement::~MultilineElement ( )

Definition at line 2154 of file matrixelement.cpp.

◆ MultilineElement() [2/2]

MultilineElement::MultilineElement ( const MultilineElement &  other)

Definition at line 2158 of file matrixelement.cpp.

Member Function Documentation

◆ accept()

bool MultilineElement::accept ( ElementVisitor *  )
virtual

Visit this element.

An implementation of the visitor pattern.

Implements BasicElement.

Definition at line 2171 of file matrixelement.cpp.

◆ calcSizes()

void MultilineElement::calcSizes ( const ContextStyle &  cstyle,
ContextStyle::TextStyle  tstyle,
ContextStyle::IndexStyle  istyle,
StyleAttributes &  style 
)
virtual

Calculates our width and height and our children's parentPosition.

Implements BasicElement.

Definition at line 2395 of file matrixelement.cpp.

◆ clone()

virtual MultilineElement * MultilineElement::clone ( )
inlinevirtual

Implements BasicElement.

Definition at line 324 of file matrixelement.h.

◆ dispatchFontCommand()

void MultilineElement::dispatchFontCommand ( FontCommand *  cmd)
virtual

Dispatch this FontCommand to all our TextElement children.

Reimplemented from BasicElement.

Definition at line 2491 of file matrixelement.cpp.

◆ draw()

void MultilineElement::draw ( TQPainter &  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 2456 of file matrixelement.cpp.

◆ entered()

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 2177 of file matrixelement.cpp.

◆ formulaString()

TQString MultilineElement::formulaString ( )
virtual

Reimplemented from BasicElement.

Definition at line 2679 of file matrixelement.cpp.

◆ getMainChild()

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 2562 of file matrixelement.cpp.

◆ getTagName()

virtual TQString MultilineElement::getTagName ( ) const
inlineprotectedvirtual

Returns the tag name of this element type.

Reimplemented from BasicElement.

Definition at line 432 of file matrixelement.h.

◆ goInside()

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 2207 of file matrixelement.cpp.

◆ goToPos()

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 2186 of file matrixelement.cpp.

◆ insert()

void MultilineElement::insert ( FormulaCursor *  ,
TQPtrList< BasicElement > &  ,
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 2500 of file matrixelement.cpp.

◆ moveDown()

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 2336 of file matrixelement.cpp.

◆ moveLeft()

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 2212 of file matrixelement.cpp.

◆ moveRight()

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 2245 of file matrixelement.cpp.

◆ moveUp()

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 2274 of file matrixelement.cpp.

◆ normalize()

void MultilineElement::normalize ( FormulaCursor *  cursor,
Direction  direction 
)
virtual

Moves the cursor to a normal place where new elements might be inserted.

Reimplemented from BasicElement.

Definition at line 2535 of file matrixelement.cpp.

◆ readAttributesFromDom()

bool MultilineElement::readAttributesFromDom ( TQDomElement  element)
protectedvirtual

Reads our attributes from the element.

Returns false if it failed.

Reimplemented from BasicElement.

Definition at line 2616 of file matrixelement.cpp.

◆ readContentFromDom()

bool MultilineElement::readContentFromDom ( TQDomNode &  node)
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 2644 of file matrixelement.cpp.

◆ remove()

void MultilineElement::remove ( FormulaCursor *  ,
TQPtrList< BasicElement > &  ,
Direction   
)
virtual

Removes all selected children and returns them.

Places the cursor to where the children have been.

Reimplemented from BasicElement.

Definition at line 2518 of file matrixelement.cpp.

◆ selectChild()

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 2567 of file matrixelement.cpp.

◆ toLatex()

TQString MultilineElement::toLatex ( )
virtual
Returns
the latex representation of the element and of the element's children

Reimplemented from BasicElement.

Definition at line 2666 of file matrixelement.cpp.

◆ writeDom()

void MultilineElement::writeDom ( TQDomElement  element)
protectedvirtual

Appends our attributes to the dom element.

Reimplemented from BasicElement.

Definition at line 2580 of file matrixelement.cpp.

◆ writeMathML()

void MultilineElement::writeMathML ( TQDomDocument &  doc,
TQDomNode &  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 2594 of file matrixelement.cpp.

Friends And Related Symbol Documentation

◆ KFCNewLine

friend class KFCNewLine
friend

Definition at line 310 of file matrixelement.h.


The documentation for this class was generated from the following files: