LibreOffice Module starmath (master) 1
|
Font node. More...
#include <node.hxx>
Public Member Functions | |
SmFontNode (const SmToken &rNodeToken) | |
void | SetSizeParameter (const Fraction &rValue, FontSizeType nType) |
Sets font size to rValue in nType mode. More... | |
const Fraction & | GetSizeParameter () const |
Returns the font size. More... | |
FontSizeType | GetSizeType () const |
Returns the font size type. More... | |
virtual void | Prepare (const SmFormat &rFormat, const SmDocShell &rDocShell, int nDepth) override |
Prepare preliminary settings about font and text (e.g. More... | |
virtual void | Arrange (OutputDevice &rDev, const SmFormat &rFormat) override |
Prepares the SmRect to render. More... | |
void | Accept (SmVisitor *pVisitor) override |
Accept a visitor. More... | |
Public Member Functions inherited from SmStructureNode | |
virtual | ~SmStructureNode () override |
virtual bool | IsVisible () const override |
Checks node visibility. More... | |
virtual size_t | GetNumSubNodes () const override |
Gets the number of subnodes. More... | |
virtual SmNode * | GetSubNode (size_t nIndex) override |
Gets the subnode of index nIndex. More... | |
SmNode * | GetSubNodeBinMo (size_t nIndex) const |
Gets the subnode of index nIndex, used for operators. More... | |
void | ClearSubNodes () |
Does the cleaning of the subnodes. More... | |
void | SetSubNodes (std::unique_ptr< SmNode > pFirst, std::unique_ptr< SmNode > pSecond, std::unique_ptr< SmNode > pThird=nullptr) |
Sets subnodes, used for operators. More... | |
void | SetSubNodes (SmNode *pFirst, SmNode *pSecond, SmNode *pThird) |
Sets subnodes. More... | |
void | SetSubNodesBinMo (std::unique_ptr< SmNode > pFirst, std::unique_ptr< SmNode > pSecond, std::unique_ptr< SmNode > pThird=nullptr) |
Sets subnodes, used for operators. More... | |
void | SetSubNodes (SmNodeArray &&rNodeArray) |
Sets subnodes. More... | |
virtual void | GetAccessibleText (OUStringBuffer &rText) const override |
Appends to rText the node text. More... | |
SmNodeArray::iterator | begin () |
Gets the first subnode. More... | |
SmNodeArray::iterator | end () |
Gets the last subnode. More... | |
SmNodeArray::reverse_iterator | rbegin () |
Gets the last subnode. More... | |
SmNodeArray::reverse_iterator | rend () |
Gets the first subnode. More... | |
int | IndexOfSubNode (SmNode const *pSubNode) |
Get the index of the child node pSubNode. More... | |
void | SetSubNode (size_t nIndex, SmNode *pNode) |
Sets the subnode pNode at nIndex. More... | |
virtual SmNode * | GetSubNode (size_t nIndex)=0 |
Gets the subnode of index nIndex. More... | |
const SmNode * | GetSubNode (size_t nIndex) const |
Gets the subnode of index nIndex. More... | |
Public Member Functions inherited from SmNode | |
SmNode (const SmNode &)=delete | |
SmNode & | operator= (const SmNode &)=delete |
virtual | ~SmNode () |
virtual bool | IsVisible () const =0 |
Checks node visibility. More... | |
virtual size_t | GetNumSubNodes () const =0 |
Gets the number of subnodes. More... | |
virtual SmNode * | GetSubNode (size_t nIndex)=0 |
Gets the subnode of index nIndex. More... | |
const SmNode * | GetSubNode (size_t nIndex) const |
virtual const SmNode * | GetLeftMost () const |
(this assumes the one with index 0 is always the leftmost subnode for the current node). More... | |
FontChangeMask & | Flags () |
Gets the FontChangeMask flags. More... | |
FontAttribute & | Attributes () |
Gets the font attributes. More... | |
bool | IsPhantom () const |
Checks if it is a visible node rendered invisible. More... | |
void | SetPhantom (bool bIsPhantom) |
Sets the render visibility of a visible node to bIsPhantom. More... | |
void | SetColor (const Color &rColor) |
Sets the font color. More... | |
void | SetAttribute (FontAttribute nAttrib) |
Sets the font attribute nAttrib. More... | |
void | ClearAttribute (FontAttribute nAttrib) |
Clears the font attribute nAttrib. More... | |
const SmFace & | GetFont () const |
Gets the font. More... | |
SmFace & | GetFont () |
void | SetFont (const SmFace &rFace) |
Sets the font to rFace. More... | |
void | SetFontSize (const Fraction &rRelSize, FontSizeType nType) |
Sets the font size to rRelSize with type nType. More... | |
void | SetSize (const Fraction &rScale) |
Sets the font size to rRelSize with type FontSizeType::ABSOLUT. More... | |
virtual void | Prepare (const SmFormat &rFormat, const SmDocShell &rDocShell, int nDepth) |
Prepare preliminary settings about font and text (e.g. More... | |
void | PrepareAttributes () |
Prepare preliminary font attributes Called on Prepare(...). More... | |
void | SetRectHorAlign (RectHorAlign eHorAlign, bool bApplyToSubTree=true) |
Sets the alignment of the text. More... | |
RectHorAlign | GetRectHorAlign () const |
Gets the alignment of the text. More... | |
const SmRect & | GetRect () const |
Parses itself to SmRect. More... | |
void | Move (const Point &rVector) |
Moves the rectangle by rVector. More... | |
void | MoveTo (const Point &rPoint) |
Moves the rectangle to rPoint, being the top left corner the origin. More... | |
virtual void | Arrange (OutputDevice &rDev, const SmFormat &rFormat)=0 |
Prepares the SmRect to render. More... | |
virtual void | GetAccessibleText (OUStringBuffer &rText) const =0 |
Appends to rText the node text. More... | |
sal_Int32 | GetAccessibleIndex () const |
Gets the node accessible index. More... | |
void | SetAccessibleIndex (sal_Int32 nAccIndex) |
Sets the node accessible index to nAccIndex. More... | |
const SmNode * | FindNodeWithAccessibleIndex (sal_Int32 nAccIndex) const |
Finds the node with accessible index nAccIndex. More... | |
sal_uInt16 | GetRow () const |
Gets the line in the text where the node is located. More... | |
sal_uInt16 | GetColumn () const |
Gets the column of the line in the text where the node is located. More... | |
SmScaleMode | GetScaleMode () const |
Gets the scale mode. More... | |
void | SetScaleMode (SmScaleMode eMode) |
Sets the scale mode to eMode. More... | |
virtual void | AdaptToX (OutputDevice &rDev, sal_uLong nWidth) |
virtual void | AdaptToY (OutputDevice &rDev, sal_uLong nHeight) |
SmNodeType | GetType () const |
Gets the node type. More... | |
const SmToken & | GetToken () const |
Gets the token. More... | |
SmToken & | GetToken () |
const ESelection & | GetSelection () const |
Gets node position in input text. More... | |
void | SetSelection (ESelection aESelection) |
Gets node position in input text. More... | |
const SmNode * | FindTokenAt (sal_uInt16 nRow, sal_uInt16 nCol) const |
Finds the node from the position in the text. More... | |
const SmNode * | FindRectClosestTo (const Point &rPoint) const |
Finds the closest rectangle in the screen. More... | |
virtual void | Accept (SmVisitor *pVisitor)=0 |
Accept a visitor. More... | |
bool | IsSelected () const |
Checks if the node is selected. More... | |
void | SetSelected (bool Selected) |
Sets the node to Selected. More... | |
const SmStructureNode * | GetParent () const |
Gets the parent node of this node. More... | |
SmStructureNode * | GetParent () |
void | SetParent (SmStructureNode *parent) |
Sets the parent node. More... | |
void | SetToken (SmToken const &token) |
Sets the token for this node. More... | |
Public Member Functions inherited from SmRect | |
SmRect () | |
SmRect (const OutputDevice &rDev, const SmFormat *pFormat, const OUString &rText, sal_uInt16 nBorderWidth) | |
SmRect (tools::Long nWidth, tools::Long nHeight) | |
sal_uInt16 | GetBorderWidth () const |
void | SetItalicSpaces (tools::Long nLeftSpace, tools::Long nRightSpace) |
void | SetWidth (sal_uLong nWidth) |
void | SetLeft (tools::Long nLeft) |
void | SetRight (tools::Long nRight) |
void | SetBottom (tools::Long nBottom) |
void | SetTop (tools::Long nTop) |
const Point & | GetTopLeft () const |
tools::Long | GetTop () const |
tools::Long | GetLeft () const |
tools::Long | GetBottom () const |
tools::Long | GetRight () const |
tools::Long | GetCenterY () const |
tools::Long | GetWidth () const |
tools::Long | GetHeight () const |
tools::Long | GetItalicLeftSpace () const |
tools::Long | GetItalicRightSpace () const |
tools::Long | GetHiAttrFence () const |
tools::Long | GetLoAttrFence () const |
tools::Long | GetItalicLeft () const |
tools::Long | GetItalicCenterX () const |
tools::Long | GetItalicRight () const |
tools::Long | GetItalicWidth () const |
bool | HasBaseline () const |
tools::Long | GetBaseline () const |
tools::Long | GetBaselineOffset () const |
tools::Long | GetAlignT () const |
tools::Long | GetAlignM () const |
tools::Long | GetAlignB () const |
const Size & | GetSize () const |
Size | GetItalicSize () const |
void | Move (const Point &rPosition) |
void | MoveTo (const Point &rPosition) |
bool | IsEmpty () const |
bool | HasAlignInfo () const |
Point | AlignTo (const SmRect &rRect, RectPos ePos, RectHorAlign eHor, RectVerAlign eVer) const |
SmRect & | ExtendBy (const SmRect &rRect, RectCopyMBL eCopyMode) |
void | ExtendBy (const SmRect &rRect, RectCopyMBL eCopyMode, tools::Long nNewAlignM) |
SmRect & | ExtendBy (const SmRect &rRect, RectCopyMBL eCopyMode, bool bKeepVerAlignParams) |
tools::Long | OrientedDist (const Point &rPoint) const |
bool | IsInsideRect (const Point &rPoint) const |
bool | IsInsideItalicRect (const Point &rPoint) const |
tools::Rectangle | AsRectangle () const |
SmRect | AsGlyphRect () const |
Private Attributes | |
FontSizeType | meSizeType |
Fraction | maFontSize |
Additional Inherited Members | |
Protected Member Functions inherited from SmStructureNode | |
SmStructureNode (SmNodeType eNodeType, const SmToken &rNodeToken, size_t nSize=0) | |
Protected Member Functions inherited from SmNode | |
SmNode (SmNodeType eNodeType, SmToken aNodeToken) | |
|
inlineexplicit |
|
overridevirtual |
Accept a visitor.
Calls the method for this class on the visitor.
pVisitor |
Implements SmNode.
Definition at line 2383 of file node.cxx.
References SmVisitor::Visit().
|
overridevirtual |
Prepares the SmRect to render.
rDev | |
rFormat |
Implements SmNode.
Definition at line 1655 of file node.cxx.
References SmNode::Arrange(), Bold, SmNode::ClearAttribute(), SmToken::cMathChar, ColorTransparency, eType, SmNode::GetFont(), SmNode::GetRect(), SmStructureNode::GetSubNode(), SmNode::GetToken(), Italic, maFontSize, meSizeType, SAL_WARN, SmNode::SetAttribute(), SmNode::SetColor(), SmNode::SetFont(), SmNode::SetFontSize(), SmNode::SetPhantom(), TBOLD, TDVIPSNAMESCOL, TFIXED, THEX, THTMLCOL, TICONICCOL, TITALIC, TMATHMLCOL, TNBOLD, TNITALIC, TPHANTOM, TRGB, TRGBA, TSANS, TSERIF, TSIZE, and TUNKNOWN.
|
inline |
Returns the font size.
Definition at line 1956 of file node.hxx.
References maFontSize.
Referenced by SmXMLExport::ExportFont(), SmCloningVisitor::Visit(), and SmNodeToTextVisitor::Visit().
|
inline |
Returns the font size type.
Check FontSizeType for details.
Definition at line 1963 of file node.hxx.
References meSizeType.
Referenced by SmXMLExport::ExportFont(), SmCloningVisitor::Visit(), and SmNodeToTextVisitor::Visit().
|
overridevirtual |
Prepare preliminary settings about font and text (e.g.
maFace, meRectHorAlign, mnFlags, mnAttributes, etc.)
rFormat | |
rDocShell | |
nDepth |
prepare subnodes first
prevent overwrites of this font by 'Arrange' or 'SetFont' calls of other font nodes (those with lower depth in the tree)
Reimplemented from SmNode.
Definition at line 1631 of file node.cxx.
References eType, Face, SmNode::Flags(), FNT_FIXED, FNT_SANS, FNT_SERIF, SmNode::GetFont(), SmFormat::GetFont(), SmNode::GetToken(), SmNode::Prepare(), SmNode::SetFont(), TFIXED, TSANS, and TSERIF.
|
inline |
Sets font size to rValue in nType mode.
Check FontSizeType for details.
rValue | |
nType |
Definition at line 1949 of file node.hxx.
References maFontSize, meSizeType, and nType.
Referenced by SmCloningVisitor::Visit().
|
private |
Definition at line 1934 of file node.hxx.
Referenced by Arrange(), GetSizeParameter(), and SetSizeParameter().
|
private |
Definition at line 1933 of file node.hxx.
Referenced by Arrange(), GetSizeType(), and SetSizeParameter().