lib

#include <elementtype.h>

Inheritance diagram for ElementType:
MultiElementType SequenceType SingleElementType NameType NumberType TextType

Public Member Functions

 ElementType (SequenceParser *parser)
 
virtual bool isInvisible (const TextElement &) const
 
virtual TQString text (SequenceElement *seq) const
 
uint start () const
 
uint end () const
 
virtual luPt getSpaceBefore (const ContextStyle &context, ContextStyle::TextStyle tstyle, double factor)
 
virtual luPt getSpaceAfter (MultiElementType *type, const ContextStyle &context, ContextStyle::TextStyle tstyle, double factor)
 
virtual luPt getSpaceAfter (OperatorType *type, const ContextStyle &context, ContextStyle::TextStyle tstyle, double factor)
 
virtual luPt getSpaceAfter (RelationType *type, const ContextStyle &context, ContextStyle::TextStyle tstyle, double factor)
 
virtual luPt getSpaceAfter (PunctuationType *type, const ContextStyle &context, ContextStyle::TextStyle tstyle, double factor)
 
virtual luPt getSpaceAfter (BracketType *type, const ContextStyle &context, ContextStyle::TextStyle tstyle, double factor)
 
virtual luPt getSpaceAfter (ComplexElementType *type, const ContextStyle &context, ContextStyle::TextStyle tstyle, double factor)
 
virtual luPt getSpaceAfter (InnerElementType *type, const ContextStyle &context, ContextStyle::TextStyle tstyle, double factor)
 
virtual TQFont getFont (const ContextStyle &context)
 
virtual void setUpPainter (const ContextStyle &context, TQPainter &painter)
 
virtual void output ()
 
void append (ElementType *)
 
ElementType * getPrev () const
 
virtual void saveMathML (SequenceElement *se, TQDomDocument &doc, TQDomElement de, bool oasisFormat=false)
 
virtual bool multiElement () const
 

Static Public Member Functions

static int getEvilDestructionCount ()
 

Protected Member Functions

void setStart (uint start)
 
void setEnd (uint end)
 
luPt thinSpaceIfNotScript (const ContextStyle &context, ContextStyle::TextStyle tstyle, double factor)
 
luPt mediumSpaceIfNotScript (const ContextStyle &context, ContextStyle::TextStyle tstyle, double factor)
 
luPt thickSpaceIfNotScript (const ContextStyle &context, ContextStyle::TextStyle tstyle, double factor)
 

Detailed Description

Basis of all types.

Types make up a hierarchy that describes the semantic of the sequence.

Definition at line 52 of file elementtype.h.

Constructor & Destructor Documentation

◆ ElementType()

ElementType::ElementType ( SequenceParser *  parser)

Definition at line 80 of file elementtype.cpp.

◆ ~ElementType()

ElementType::~ElementType ( )
virtual

Definition at line 86 of file elementtype.cpp.

Member Function Documentation

◆ append()

void ElementType::append ( ElementType *  element)

Adds a type at the end of the list.

Definition at line 207 of file elementtype.cpp.

◆ end()

uint ElementType::end ( ) const
inline
Returns
the position of the first character after the typed element

Definition at line 76 of file elementtype.h.

◆ getEvilDestructionCount()

static int ElementType::getEvilDestructionCount ( )
inlinestatic

Definition at line 125 of file elementtype.h.

◆ getFont()

TQFont ElementType::getFont ( const ContextStyle &  context)
virtual
Returns
the font to be used for this kind of element

Reimplemented in NumberType, and NameType.

Definition at line 197 of file elementtype.cpp.

◆ getPrev()

ElementType * ElementType::getPrev ( ) const
inline

Definition at line 134 of file elementtype.h.

◆ getSpaceAfter() [1/7]

luPt ElementType::getSpaceAfter ( BracketType *  type,
const ContextStyle &  context,
ContextStyle::TextStyle  tstyle,
double  factor 
)
virtual

Definition at line 142 of file elementtype.cpp.

◆ getSpaceAfter() [2/7]

luPt ElementType::getSpaceAfter ( ComplexElementType *  type,
const ContextStyle &  context,
ContextStyle::TextStyle  tstyle,
double  factor 
)
virtual

Definition at line 150 of file elementtype.cpp.

◆ getSpaceAfter() [3/7]

luPt ElementType::getSpaceAfter ( InnerElementType *  type,
const ContextStyle &  context,
ContextStyle::TextStyle  tstyle,
double  factor 
)
virtual

Definition at line 158 of file elementtype.cpp.

◆ getSpaceAfter() [4/7]

luPt ElementType::getSpaceAfter ( MultiElementType *  type,
const ContextStyle &  context,
ContextStyle::TextStyle  tstyle,
double  factor 
)
virtual

Definition at line 110 of file elementtype.cpp.

◆ getSpaceAfter() [5/7]

luPt ElementType::getSpaceAfter ( OperatorType *  type,
const ContextStyle &  context,
ContextStyle::TextStyle  tstyle,
double  factor 
)
virtual

Definition at line 118 of file elementtype.cpp.

◆ getSpaceAfter() [6/7]

luPt ElementType::getSpaceAfter ( PunctuationType *  type,
const ContextStyle &  context,
ContextStyle::TextStyle  tstyle,
double  factor 
)
virtual

Definition at line 134 of file elementtype.cpp.

◆ getSpaceAfter() [7/7]

luPt ElementType::getSpaceAfter ( RelationType *  type,
const ContextStyle &  context,
ContextStyle::TextStyle  tstyle,
double  factor 
)
virtual

Definition at line 126 of file elementtype.cpp.

◆ getSpaceBefore()

luPt ElementType::getSpaceBefore ( const ContextStyle &  context,
ContextStyle::TextStyle  tstyle,
double  factor 
)
virtual
Returns
the space to be left before each char for the given style and font size.

Reimplemented in MultiElementType.

Definition at line 103 of file elementtype.cpp.

◆ isInvisible()

virtual bool ElementType::isInvisible ( const TextElement &  ) const
inlinevirtual
Returns
whether we want to see this element.

Definition at line 60 of file elementtype.h.

◆ mediumSpaceIfNotScript()

luPt ElementType::mediumSpaceIfNotScript ( const ContextStyle &  context,
ContextStyle::TextStyle  tstyle,
double  factor 
)
protected

Definition at line 176 of file elementtype.cpp.

◆ multiElement()

virtual bool ElementType::multiElement ( ) const
inlinevirtual

Definition at line 138 of file elementtype.h.

◆ output()

void ElementType::output ( )
virtual

Definition at line 212 of file elementtype.cpp.

◆ saveMathML()

void ElementType::saveMathML ( SequenceElement *  se,
TQDomDocument &  doc,
TQDomElement  de,
bool  oasisFormat = false 
)
virtual

Definition at line 217 of file elementtype.cpp.

◆ setEnd()

void ElementType::setEnd ( uint  end)
inlineprotected

Definition at line 143 of file elementtype.h.

◆ setStart()

void ElementType::setStart ( uint  start)
inlineprotected

Definition at line 142 of file elementtype.h.

◆ setUpPainter()

void ElementType::setUpPainter ( const ContextStyle &  context,
TQPainter &  painter 
)
virtual

sets the painters pen to a appropriate value

Reimplemented in NumberType.

Definition at line 202 of file elementtype.cpp.

◆ start()

uint ElementType::start ( ) const
inline
Returns
the position of the first character

Definition at line 71 of file elementtype.h.

◆ text()

TQString ElementType::text ( SequenceElement *  seq) const
virtual
Returns
the spanned text. seq must be the original parent sequence.

Reimplemented in MultiElementType.

Definition at line 93 of file elementtype.cpp.

◆ thickSpaceIfNotScript()

luPt ElementType::thickSpaceIfNotScript ( const ContextStyle &  context,
ContextStyle::TextStyle  tstyle,
double  factor 
)
protected

Definition at line 186 of file elementtype.cpp.

◆ thinSpaceIfNotScript()

luPt ElementType::thinSpaceIfNotScript ( const ContextStyle &  context,
ContextStyle::TextStyle  tstyle,
double  factor 
)
protected

Definition at line 166 of file elementtype.cpp.


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