lib Library API Documentation

ElementType Class Reference

Basis of all types. More...

#include <elementtype.h>

Inheritance diagram for ElementType:

MultiElementType SequenceType SingleElementType NameType NumberType TextType List of all members.

Public Member Functions

 ElementType (SequenceParser *parser)
virtual bool isInvisible (const TextElement &) const
virtual QString text (SequenceElement *seq) const
uint start () const
uint end () const
virtual luPt getSpaceBefore (const ContextStyle &context, ContextStyle::TextStyle tstyle)
virtual luPt getSpaceAfter (MultiElementType *type, const ContextStyle &context, ContextStyle::TextStyle tstyle)
virtual luPt getSpaceAfter (OperatorType *type, const ContextStyle &context, ContextStyle::TextStyle tstyle)
virtual luPt getSpaceAfter (RelationType *type, const ContextStyle &context, ContextStyle::TextStyle tstyle)
virtual luPt getSpaceAfter (PunctuationType *type, const ContextStyle &context, ContextStyle::TextStyle tstyle)
virtual luPt getSpaceAfter (BracketType *type, const ContextStyle &context, ContextStyle::TextStyle tstyle)
virtual luPt getSpaceAfter (ComplexElementType *type, const ContextStyle &context, ContextStyle::TextStyle tstyle)
virtual luPt getSpaceAfter (InnerElementType *type, const ContextStyle &context, ContextStyle::TextStyle tstyle)
virtual QFont getFont (const ContextStyle &context)
virtual void setUpPainter (const ContextStyle &context, QPainter &painter)
virtual void output ()
void append (ElementType *)
ElementTypegetPrev () const
virtual void saveMathML (SequenceElement *se, QDomDocument doc, QDomElement de)
virtual bool multiElement () const

Static Public Member Functions

int getEvilDestructionCount ()

Protected Member Functions

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

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.


Member Function Documentation

virtual bool ElementType::isInvisible const TextElement  )  const [inline, virtual]
 

Returns:
whether we want to see this element.

Definition at line 60 of file elementtype.h.

References isInvisible().

Referenced by TextElement::isInvisible(), and isInvisible().

QString 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.cc.

References end(), BasicElement::getCharacter(), SequenceElement::getChild(), start(), and text().

Referenced by TextElement::draw(), and text().

uint ElementType::start  )  const [inline]
 

Returns:
the position of the first character

Definition at line 71 of file elementtype.h.

Referenced by SequenceElement::draw(), SequenceElement::isFirstOfToken(), SequenceElement::moveWordLeft(), and text().

uint ElementType::end  )  const [inline]
 

Returns:
the position of the first character after the typed element

Definition at line 76 of file elementtype.h.

Referenced by SequenceElement::draw(), SequenceElement::moveWordRight(), and text().

luPt ElementType::getSpaceBefore const ContextStyle context,
ContextStyle::TextStyle  tstyle
[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.cc.

References getSpaceBefore().

Referenced by SequenceElement::calcSizes(), and getSpaceBefore().

QFont 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 186 of file elementtype.cc.

References ContextStyle::getDefaultFont(), and getFont().

Referenced by TextElement::getFont(), and getFont().

void ElementType::setUpPainter const ContextStyle context,
QPainter painter
[virtual]
 

sets the painters pen to a appropriate value

Reimplemented in NumberType.

Definition at line 191 of file elementtype.cc.

References ContextStyle::getDefaultColor(), and setUpPainter().

Referenced by TextElement::setUpPainter(), and setUpPainter().

void ElementType::append ElementType  ) 
 

Adds a type at the end of the list.

Definition at line 196 of file elementtype.cc.

References append(), and prev.

Referenced by append().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for lib Library Version 1.3.3.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Fri Sep 24 18:22:30 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003