lib

#include <textelement.h>

Inheritance diagram for EmptyElement:
BasicElement

Public Member Functions

 EmptyElement (BasicElement *parent=0)
 
 EmptyElement (const EmptyElement &)
 
virtual EmptyElement * clone ()
 
virtual bool accept (ElementVisitor *visitor)
 
virtual TQChar getCharacter () const
 
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 TQString toLatex ()
 
- 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
 
virtual BasicElement * goToPos (FormulaCursor *, bool &handled, const LuPixelPoint &point, const LuPixelPoint &parentOrigin)
 
LuPixelPoint widgetPos ()
 
virtual void dispatchFontCommand (FontCommand *)
 
virtual void moveLeft (FormulaCursor *cursor, BasicElement *from)
 
virtual void moveRight (FormulaCursor *cursor, BasicElement *from)
 
virtual void moveUp (FormulaCursor *, BasicElement *)
 
virtual void moveDown (FormulaCursor *, BasicElement *)
 
virtual void moveHome (FormulaCursor *)
 
virtual void moveEnd (FormulaCursor *)
 
virtual void goInside (FormulaCursor *cursor)
 
virtual void entered (SequenceElement *)
 
virtual SequenceElement * getMainChild ()
 
virtual void insert (FormulaCursor *, TQPtrList< BasicElement > &, Direction)
 
virtual void remove (FormulaCursor *, TQPtrList< BasicElement > &, Direction)
 
virtual void normalize (FormulaCursor *, Direction)
 
virtual bool isSenseless ()
 
virtual BasicElement * getChild (FormulaCursor *, Direction=beforeCursor)
 
virtual void selectChild (FormulaCursor *, BasicElement *)
 
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 *)
 
virtual TQString getElementName () const
 

Protected Member Functions

virtual TQString getTagName () const
 
- Protected Member Functions inherited from BasicElement
virtual void writeDom (TQDomElement element)
 
virtual void writeMathMLAttributes (TQDomElement &) const
 
virtual void writeMathMLContent (TQDomDocument &, TQDomElement &, bool) const
 
virtual bool readAttributesFromDom (TQDomElement element)
 
virtual bool readContentFromDom (TQDomNode &node)
 
bool buildChild (SequenceElement *child, TQDomNode node, TQString name)
 
virtual bool readAttributesFromMathMLDom (const TQDomElement &element)
 
virtual int readContentFromMathMLDom (TQDomNode &node)
 
virtual TQString formulaString ()
 
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

An element that represents an empty box.

Definition at line 225 of file textelement.h.

Constructor & Destructor Documentation

◆ EmptyElement() [1/2]

EmptyElement::EmptyElement ( BasicElement *  parent = 0)

Definition at line 504 of file textelement.cpp.

◆ EmptyElement() [2/2]

EmptyElement::EmptyElement ( const EmptyElement &  other)

Definition at line 509 of file textelement.cpp.

Member Function Documentation

◆ accept()

bool EmptyElement::accept ( ElementVisitor *  )
virtual

Visit this element.

An implementation of the visitor pattern.

Implements BasicElement.

Definition at line 515 of file textelement.cpp.

◆ calcSizes()

void EmptyElement::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 521 of file textelement.cpp.

◆ clone()

virtual EmptyElement * EmptyElement::clone ( )
inlinevirtual

Implements BasicElement.

Definition at line 232 of file textelement.h.

◆ draw()

void EmptyElement::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 540 of file textelement.cpp.

◆ getCharacter()

virtual TQChar EmptyElement::getCharacter ( ) const
inlinevirtual
Returns
the character that represents this element. Used for parsing a sequence. Here we use a dummy so an EmptyElement pretends to be a letter.

Reimplemented from BasicElement.

Definition at line 243 of file textelement.h.

◆ getTagName()

virtual TQString EmptyElement::getTagName ( ) const
inlineprotectedvirtual
Returns
the tag name of this element type.

Reimplemented from BasicElement.

Definition at line 280 of file textelement.h.

◆ toLatex()

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

Reimplemented from BasicElement.

Definition at line 562 of file textelement.cpp.


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