#include <tokenstyleelement.h>
|
| | TokenStyleElement (BasicElement *parent=0) |
| virtual void | calcSizes (const ContextStyle &context, 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) |
| | SequenceElement (BasicElement *parent=0) |
| | SequenceElement (const SequenceElement &) |
| virtual SequenceElement * | clone () |
| virtual bool | accept (ElementVisitor *visitor) |
| virtual bool | readOnly (const FormulaCursor *) const |
| virtual bool | isTextOnly () const |
| virtual BasicElement * | goToPos (FormulaCursor *, bool &handled, const LuPixelPoint &point, const LuPixelPoint &parentOrigin) |
| void | setSizeReduction (const ContextStyle &context) |
| bool | isEmpty () |
| virtual void | dispatchFontCommand (FontCommand *cmd) |
| virtual void | drawEmptyRect (TQPainter &painter, const ContextStyle &context, double factor, const LuPixelPoint &upperLeft) |
| virtual void | calcCursorSize (const ContextStyle &context, FormulaCursor *cursor, bool smallCursor) |
| virtual void | drawCursor (TQPainter &painter, const ContextStyle &context, StyleAttributes &style, FormulaCursor *cursor, bool smallCursor, bool activeCursor) |
| virtual void | moveWordLeft (FormulaCursor *cursor) |
| virtual void | moveWordRight (FormulaCursor *cursor) |
| virtual void | moveHome (FormulaCursor *cursor) |
| virtual void | moveEnd (FormulaCursor *cursor) |
| virtual void | goInside (FormulaCursor *cursor) |
| virtual void | goInsideLast (FormulaCursor *cursor) |
| virtual void | insert (FormulaCursor *, TQPtrList< BasicElement > &, Direction) |
| virtual void | remove (FormulaCursor *, TQPtrList< BasicElement > &, Direction) |
| virtual void | normalize (FormulaCursor *, Direction) |
| virtual BasicElement * | getChild (FormulaCursor *, Direction=beforeCursor) |
| virtual void | selectChild (FormulaCursor *cursor, BasicElement *child) |
| virtual void | childWillVanish (FormulaCursor *cursor, BasicElement *child) |
| uint | countChildren () const |
| bool | isChildNumber (uint pos, BasicElement *child) |
| void | selectAllChildren (FormulaCursor *cursor) |
| bool | onlyTextSelected (FormulaCursor *cursor) |
| virtual KCommand * | buildCommand (Container *, Request *) |
| virtual KCommand * | input (Container *container, TQChar ch) |
| virtual KCommand * | input (Container *container, TQKeyEvent *event) |
| virtual void | parse () |
| void | getChildrenDom (TQDomDocument &doc, TQDomElement elem, uint from, uint to) |
| void | getChildrenMathMLDom (TQDomDocument &doc, TQDomNode &elem, uint from, uint to) |
| bool | buildChildrenFromDom (TQPtrList< BasicElement > &list, TQDomNode n) |
| virtual TQString | toLatex () |
| virtual TQString | formulaString () |
| BasicElement * | getChild (uint i) |
| const BasicElement * | getChild (uint i) const |
| int | childPos (BasicElement *child) |
| int | childPos (const BasicElement *child) const |
| iterator | begin () |
| iterator | end () |
| virtual void | setStyle (StyleElement *style) |
| virtual int | buildChildrenFromMathMLDom (TQPtrList< BasicElement > &list, TQDomNode n) |
| virtual int | readContentFromMathMLDom (TQDomNode &node) |
| int | buildMathMLChild (TQDomNode node) |
| | 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 | entered (SequenceElement *) |
| virtual SequenceElement * | getMainChild () |
| virtual bool | isSenseless () |
| virtual void | registerTab (BasicElement *) |
| 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 bool | readAttributesFromMathMLDom (const TQDomElement &element) |
| virtual void | writeMathMLAttributes (TQDomElement &element) const |
| void | setAbsoluteSize (double s, bool fontsize=false) |
| void | setRelativeSize (double s, bool fontsize=false) |
| void | setPixelSize (double s, bool fontsize=false) |
| void | setCharStyle (CharStyle cs) |
| CharStyle | charStyle () const |
| void | setCharFamily (CharFamily cf) |
| CharFamily | charFamily () const |
| void | setMathColor (const TQColor &c) |
| TQColor | mathColor () const |
| void | setMathBackground (const TQColor &bg) |
| TQColor | mathBackground () const |
| void | setFontWeight (bool w) |
| bool | fontWeight () const |
| void | setFontStyle (bool s) |
| bool | fontStyle () const |
| void | setFontFamily (const TQString &s) |
| TQString | fontFamily () const |
| void | setColor (const TQColor &c) |
| TQColor | color () const |
| bool | customMathVariant () const |
| bool | customMathColor () const |
| bool | customMathBackground () const |
| bool | customFontWeight () const |
| bool | customFontStyle () const |
| bool | customFontFamily () const |
| bool | customColor () const |
| virtual void | setStyleSize (const ContextStyle &context, StyleAttributes &style) |
| virtual void | setStyleVariant (StyleAttributes &style) |
| void | setStyleColor (StyleAttributes &style) |
| virtual void | setStyleBackground (StyleAttributes &style) |
| virtual void | resetStyle (StyleAttributes &style) |
| TQString | getHtmlColor (const TQString &colorStr) |
| virtual TQString | getTagName () const |
| virtual void | writeDom (TQDomElement element) |
| virtual TQString | getElementName () const |
| virtual void | writeMathMLContent (TQDomDocument &doc, TQDomElement &element, bool oasisFormat) const |
| virtual bool | readAttributesFromDom (TQDomElement element) |
| virtual bool | readContentFromDom (TQDomNode &node) |
| virtual void | setChildrenPositions () |
| virtual BasicElement * | createElement (TQString type, const TQDomElement &element) |
| luPixel | getChildPosition (const ContextStyle &context, uint child) |
| virtual bool | isFirstOfToken (BasicElement *child) |
| bool | insert (uint index, BasicElement *child) |
| virtual luPt | getSpaceBefore (const ContextStyle &, ContextStyle::TextStyle, double) |
| virtual luPt | getSpaceAfter (const ContextStyle &, ContextStyle::TextStyle, double) |
| bool | buildChild (SequenceElement *child, TQDomNode node, TQString name) |
| double | getSize (const TQString &str, SizeType *st) |
| SizeType | getSpace (const TQString &str) |
This class handles mathematical style attributes common to token elements, as explained in MathML Spec, Section 3.2.2.
It is in charge of reading and saving elements' attributes and setting rendering information according to these attributes.
Definition at line 35 of file tokenstyleelement.h.
◆ TokenStyleElement()
| KFORMULA_NAMESPACE_BEGIN TokenStyleElement::TokenStyleElement |
( |
BasicElement * | parent = 0 | ) |
|
◆ calcSizes()
◆ charFamily()
| CharFamily TokenStyleElement::charFamily |
( |
| ) |
const |
|
inlineprotected |
◆ charStyle()
| CharStyle TokenStyleElement::charStyle |
( |
| ) |
const |
|
inlineprotected |
◆ color()
| TQColor TokenStyleElement::color |
( |
| ) |
const |
|
inlineprotected |
◆ customColor()
| bool TokenStyleElement::customColor |
( |
| ) |
const |
|
inlineprotected |
◆ customFontFamily()
| bool TokenStyleElement::customFontFamily |
( |
| ) |
const |
|
inlineprotected |
◆ customFontStyle()
| bool TokenStyleElement::customFontStyle |
( |
| ) |
const |
|
inlineprotected |
◆ customFontWeight()
| bool TokenStyleElement::customFontWeight |
( |
| ) |
const |
|
inlineprotected |
◆ customMathBackground()
| bool TokenStyleElement::customMathBackground |
( |
| ) |
const |
|
inlineprotected |
◆ customMathColor()
| bool TokenStyleElement::customMathColor |
( |
| ) |
const |
|
inlineprotected |
◆ customMathVariant()
| bool TokenStyleElement::customMathVariant |
( |
| ) |
const |
|
inlineprotected |
◆ draw()
| void TokenStyleElement::draw |
( |
TQPainter & | painter, |
|
|
const LuPixelRect & | r, |
|
|
const ContextStyle & | context, |
|
|
ContextStyle::TextStyle | tstyle, |
|
|
ContextStyle::IndexStyle | istyle, |
|
|
StyleAttributes & | style, |
|
|
const LuPixelPoint & | parentOrigin ) |
|
virtual |
◆ fontFamily()
| TQString TokenStyleElement::fontFamily |
( |
| ) |
const |
|
inlineprotected |
◆ fontStyle()
| bool TokenStyleElement::fontStyle |
( |
| ) |
const |
|
inlineprotected |
◆ fontWeight()
| bool TokenStyleElement::fontWeight |
( |
| ) |
const |
|
inlineprotected |
◆ getHtmlColor()
| TQString TokenStyleElement::getHtmlColor |
( |
const TQString & | colorStr | ) |
|
|
protected |
◆ mathBackground()
| TQColor TokenStyleElement::mathBackground |
( |
| ) |
const |
|
inlineprotected |
◆ mathColor()
| TQColor TokenStyleElement::mathColor |
( |
| ) |
const |
|
inlineprotected |
◆ readAttributesFromMathMLDom()
| bool TokenStyleElement::readAttributesFromMathMLDom |
( |
const TQDomElement & | element | ) |
|
|
protectedvirtual |
◆ resetStyle()
| void TokenStyleElement::resetStyle |
( |
StyleAttributes & | style | ) |
|
|
protectedvirtual |
◆ setAbsoluteSize()
| void TokenStyleElement::setAbsoluteSize |
( |
double | s, |
|
|
bool | fontsize = false ) |
|
protected |
◆ setCharFamily()
| void TokenStyleElement::setCharFamily |
( |
CharFamily | cf | ) |
|
|
inlineprotected |
◆ setCharStyle()
| void TokenStyleElement::setCharStyle |
( |
CharStyle | cs | ) |
|
|
inlineprotected |
◆ setColor()
| void TokenStyleElement::setColor |
( |
const TQColor & | c | ) |
|
|
inlineprotected |
◆ setFontFamily()
| void TokenStyleElement::setFontFamily |
( |
const TQString & | s | ) |
|
|
inlineprotected |
◆ setFontStyle()
| void TokenStyleElement::setFontStyle |
( |
bool | s | ) |
|
|
inlineprotected |
◆ setFontWeight()
| void TokenStyleElement::setFontWeight |
( |
bool | w | ) |
|
|
inlineprotected |
◆ setMathBackground()
| void TokenStyleElement::setMathBackground |
( |
const TQColor & | bg | ) |
|
|
inlineprotected |
◆ setMathColor()
| void TokenStyleElement::setMathColor |
( |
const TQColor & | c | ) |
|
|
inlineprotected |
◆ setPixelSize()
| void TokenStyleElement::setPixelSize |
( |
double | s, |
|
|
bool | fontsize = false ) |
|
protected |
◆ setRelativeSize()
| void TokenStyleElement::setRelativeSize |
( |
double | s, |
|
|
bool | fontsize = false ) |
|
protected |
◆ setStyleBackground()
| void TokenStyleElement::setStyleBackground |
( |
StyleAttributes & | style | ) |
|
|
protectedvirtual |
◆ setStyleColor()
| void TokenStyleElement::setStyleColor |
( |
StyleAttributes & | style | ) |
|
|
protected |
◆ setStyleSize()
| void TokenStyleElement::setStyleSize |
( |
const ContextStyle & | context, |
|
|
StyleAttributes & | style ) |
|
protectedvirtual |
◆ setStyleVariant()
| void TokenStyleElement::setStyleVariant |
( |
StyleAttributes & | style | ) |
|
|
protectedvirtual |
Set the mathvariant related info in style stacks, including info for deprecated attributes.
It may be redefined by token elements whose behaviour differs from default one (e.g. identifiers)
Definition at line 450 of file tokenstyleelement.cpp.
◆ writeMathMLAttributes()
| void TokenStyleElement::writeMathMLAttributes |
( |
TQDomElement & | element | ) |
const |
|
protectedvirtual |
The documentation for this class was generated from the following files:
|