28#include "contextstyle.h"
29#include "kformuladefs.h"
33KFORMULA_NAMESPACE_BEGIN
37class ComplexElementType;
38class InnerElementType;
71 uint start() const { return from; }
76 uint end() const { return to; }
89 virtual luPt getSpaceAfter( OperatorType* type,
93 virtual luPt getSpaceAfter( RelationType* type,
97 virtual luPt getSpaceAfter( PunctuationType* type,
101 virtual luPt getSpaceAfter( BracketType* type,
105 virtual luPt getSpaceAfter( ComplexElementType* type,
109 virtual luPt getSpaceAfter( InnerElementType* type,
125 static int getEvilDestructionCount() { return evilDestructionCount; }
127 virtual void output();
136 virtual void saveMathML( SequenceElement* se, TQDomDocument& doc, TQDomElement de, bool oasisFormat = false );
138 virtual bool multiElement() const { return false; }
143 void setEnd( uint end ) { to = end; }
148 luPt mediumSpaceIfNotScript( const ContextStyle& context,
151 luPt thickSpaceIfNotScript( const ContextStyle& context,
176 static int evilDestructionCount;
189 virtual void output();
209 virtual luPt getSpaceAfter( OperatorType* type,
213 virtual luPt getSpaceAfter( RelationType* type,
217 virtual luPt getSpaceAfter( InnerElementType* type,
222 virtual bool multiElement() const { return true; }
243 virtual void saveMathML( SequenceElement* se, TQDomDocument& doc, TQDomElement de, bool oasisFormat = false );
264 virtual void saveMathML( SequenceElement* se, TQDomDocument& doc, TQDomElement de, bool oasisFormat = false );
289 virtual void saveMathML( SequenceElement* se, TQDomDocument& doc, TQDomElement de, bool oasisFormat = false );
299 void saveMathML( SequenceElement* se, TQDomDocument& doc, TQDomElement de, bool oasisFormat = false );
302class OperatorType : public AbstractOperatorType {
306 virtual luPt getSpaceBefore( const ContextStyle& context,
313 virtual luPt getSpaceAfter( BracketType* type,
317 virtual luPt getSpaceAfter( ComplexElementType* type,
321 virtual luPt getSpaceAfter( InnerElementType* type,
334 virtual void setUpPainter( const ContextStyle& context, TQPainter& painter);
338class RelationType : public AbstractOperatorType {
342 virtual luPt getSpaceBefore( const ContextStyle& context,
349 virtual luPt getSpaceAfter( BracketType* type,
353 virtual luPt getSpaceAfter( ComplexElementType* type,
357 virtual luPt getSpaceAfter( InnerElementType* type,
370 virtual void setUpPainter( const ContextStyle& context, TQPainter& painter );
374class PunctuationType : public AbstractOperatorType {
378 virtual luPt getSpaceBefore( const ContextStyle& context,
385 virtual luPt getSpaceAfter( RelationType* type,
389 virtual luPt getSpaceAfter( PunctuationType* type,
393 virtual luPt getSpaceAfter( BracketType* type,
397 virtual luPt getSpaceAfter( ComplexElementType* type,
401 virtual luPt getSpaceAfter( InnerElementType* type,
414 virtual void setUpPainter( const ContextStyle& context, TQPainter& painter );
425 virtual luPt getSpaceAfter( OperatorType* type,
429 virtual luPt getSpaceAfter( RelationType* type,
433 virtual luPt getSpaceAfter( InnerElementType* type,
448 virtual luPt getSpaceAfter( OperatorType* type,
452 virtual luPt getSpaceAfter( RelationType* type,
456 virtual luPt getSpaceAfter( InnerElementType* type,
474 virtual luPt getSpaceAfter( OperatorType* type,
478 virtual luPt getSpaceAfter( RelationType* type,
482 virtual luPt getSpaceAfter( PunctuationType* type,
486 virtual luPt getSpaceAfter( BracketType* type,
490 virtual luPt getSpaceAfter( ComplexElementType* type,
494 virtual luPt getSpaceAfter( InnerElementType* type,
501KFORMULA_NAMESPACE_END
Basis of every formula element.
Contains all the style information for the formela.
TextStyle Textstyles like in TeX.
virtual TQFont getFont(const ContextStyle &context)
virtual TQString text(SequenceElement *seq) const
virtual bool isInvisible(const TextElement &) const
void append(ElementType *) Adds a type at the end of the list.
virtual luPt getSpaceBefore(const ContextStyle &context, ContextStyle::TextStyle tstyle, double factor)
virtual void setUpPainter(const ContextStyle &context, TQPainter &painter) sets the painters pen to a appropriate value
Basis for all tokens that run along several elements.
virtual luPt getSpaceBefore(const ContextStyle &context, ContextStyle::TextStyle tstyle, double factor)
virtual TQString text(SequenceElement *) const
virtual TQFont getFont(const ContextStyle &context)
A range of elements that make up a number.
virtual void setUpPainter(const ContextStyle &context, TQPainter &painter) sets the painters pen to a appropriate value
virtual TQFont getFont(const ContextStyle &context)
The element that contains a number of children.
The parser that gets the element list and returns a syntax tree.
The token that belongs to a sequence.
Basis for all tokens that consist of one element only.
An element that represents one char.
A text element that doesn't belong to an name.
|