LibreOffice Module starmath (master) 1
|
#include <node.hxx>
Public Member Functions | |
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 |
Protected Member Functions | |
SmNode (SmNodeType eNodeType, SmToken aNodeToken) | |
Private Attributes | |
SmFace | maFace |
SmToken | maNodeToken |
ESelection | m_aESelection |
SmNodeType | meType |
SmScaleMode | meScaleMode |
RectHorAlign | meRectHorAlign |
FontChangeMask | mnFlags |
FontAttribute | mnAttributes |
bool | mbIsPhantom |
bool | mbIsSelected |
sal_Int32 | mnAccIndex |
SmStructureNode * | mpParentNode |
|
protected |
|
delete |
|
pure virtual |
Accept a visitor.
Calls the method for this class on the visitor.
pVisitor |
Implemented in SmRectangleNode, SmPolyLineNode, SmTextNode, SmSpecialNode, SmGlyphSpecialNode, SmMathSymbolNode, SmRootSymbolNode, SmPlaceNode, SmErrorNode, SmTableNode, SmLineNode, SmExpressionNode, SmUnHorNode, SmRootNode, SmBinHorNode, SmBinVerNode, SmBinDiagonalNode, SmSubSupNode, SmBraceNode, SmBracebodyNode, SmVerticalBraceNode, SmOperNode, SmAlignNode, SmAttributeNode, SmFontNode, SmMatrixNode, and SmBlankNode.
Referenced by SmCloningVisitor::Clone(), SmCloningVisitor::CloneKids(), SmCaretLinesVisitor::DoIt(), SmNodeToTextVisitor::LineToText(), SmCaretPos2LineVisitor::SmCaretPos2LineVisitor(), SmCaretPosGraphBuildingVisitor::SmCaretPosGraphBuildingVisitor(), SmDrawingVisitor::SmDrawingVisitor(), SmNodeToTextVisitor::SmNodeToTextVisitor(), SmSelectionRectanglesVisitor::SmSelectionRectanglesVisitor(), SmSetSelectionVisitor::SmSetSelectionVisitor(), SmNodeToTextVisitor::Visit(), and SmCaretPosGraphBuildingVisitor::Visit().
|
virtual |
Reimplemented in SmRootSymbolNode, SmRectangleNode, SmPolyLineNode, and SmMathSymbolNode.
Definition at line 241 of file node.cxx.
Referenced by SmAttributeNode::Arrange().
|
virtual |
Reimplemented in SmRectangleNode, SmPolyLineNode, SmMathSymbolNode, and SmRootSymbolNode.
Definition at line 246 of file node.cxx.
Referenced by SmBraceNode::Arrange(), and SmBracebodyNode::Arrange().
|
pure virtual |
Prepares the SmRect to render.
rDev | |
rFormat |
Implemented in SmRectangleNode, SmPolyLineNode, SmTextNode, SmSpecialNode, SmGlyphSpecialNode, SmMathSymbolNode, SmPlaceNode, SmErrorNode, SmTableNode, SmLineNode, SmExpressionNode, SmUnHorNode, SmRootNode, SmBinHorNode, SmBinVerNode, SmBinDiagonalNode, SmSubSupNode, SmBraceNode, SmBracebodyNode, SmVerticalBraceNode, SmOperNode, SmAlignNode, SmAttributeNode, SmFontNode, SmMatrixNode, and SmBlankNode.
Referenced by SmTableNode::Arrange(), SmLineNode::Arrange(), SmUnHorNode::Arrange(), SmRootNode::Arrange(), SmBinHorNode::Arrange(), SmBinVerNode::Arrange(), SmBinDiagonalNode::Arrange(), SmSubSupNode::Arrange(), SmBraceNode::Arrange(), SmBracebodyNode::Arrange(), SmVerticalBraceNode::Arrange(), SmOperNode::Arrange(), SmAlignNode::Arrange(), SmAttributeNode::Arrange(), SmFontNode::Arrange(), and SmMatrixNode::Arrange().
|
inline |
Gets the font attributes.
Definition at line 185 of file node.hxx.
References mnAttributes.
Referenced by SmTextNode::Prepare(), SmSpecialNode::Prepare(), and PrepareAttributes().
void SmNode::ClearAttribute | ( | FontAttribute | nAttrib | ) |
Clears the font attribute nAttrib.
Check FontAttribute class.
nAttrib |
Definition at line 111 of file node.cxx.
References Bold, ClearAttribute(), Flags(), Italic, and mnAttributes.
Referenced by SmFontNode::Arrange(), and ClearAttribute().
const SmNode * SmNode::FindNodeWithAccessibleIndex | ( | sal_Int32 | nAccIndex | ) | const |
Finds the node with accessible index nAccIndex.
Used for visual editing.
nAccIndex |
Definition at line 322 of file node.cxx.
References FindNodeWithAccessibleIndex(), GetAccessibleIndex(), GetAccessibleText(), GetNumSubNodes(), GetSubNode(), and i.
Referenced by FindNodeWithAccessibleIndex(), and SmGraphicAccessible::getCharacterBounds().
Finds the closest rectangle in the screen.
rPoint |
Definition at line 280 of file node.cxx.
References FindRectClosestTo(), GetNumSubNodes(), GetSubNode(), i, SmRect::IsInsideRect(), IsVisible(), LONG_MAX, and SmRect::OrientedDist().
Referenced by FindRectClosestTo(), SmGraphicAccessible::getIndexAtPoint(), and SmGraphicWidget::MouseButtonDown().
const SmNode * SmNode::FindTokenAt | ( | sal_uInt16 | nRow, |
sal_uInt16 | nCol | ||
) | const |
Finds the node from the position in the text.
(there should be exactly one such node if any)
It is used to do the visual <-> text correspondence.
nRow | |
nCol |
Definition at line 251 of file node.cxx.
References FindTokenAt(), GetSelection(), and i.
Referenced by FindTokenAt(), and SmGraphicWidget::SetCursorPos().
|
inline |
Gets the FontChangeMask flags.
Definition at line 179 of file node.hxx.
References mnFlags.
Referenced by ClearAttribute(), SmSpecialNode::Prepare(), SmMathSymbolNode::Prepare(), SmPlaceNode::Prepare(), SmErrorNode::Prepare(), SmLineNode::Prepare(), SmFontNode::Prepare(), SmBlankNode::Prepare(), SetAttribute(), SetColor(), SetFont(), SetFontSize(), and SetPhantom().
|
inline |
Gets the node accessible index.
Used for visual editing.
Definition at line 326 of file node.hxx.
References mnAccIndex.
Referenced by FindNodeWithAccessibleIndex(), SmGraphicAccessible::getCharacterBounds(), and SmGraphicAccessible::getIndexAtPoint().
|
pure virtual |
Appends to rText the node text.
rText |
Implemented in SmStructureNode, SmGraphicNode, and SmTextNode.
Referenced by FindNodeWithAccessibleIndex(), SmStructureNode::GetAccessibleText(), SmGraphicAccessible::getCharacterBounds(), and SmGraphicAccessible::getIndexAtPoint().
|
inline |
Gets the column of the line in the text where the node is located.
It is used to do the visual <-> text correspondence.
Definition at line 356 of file node.hxx.
References m_aESelection, and ESelection::nStartPos.
Referenced by SmViewShell::ShowError().
|
inline |
Gets the font.
Definition at line 227 of file node.hxx.
References maFace.
Referenced by SmMathSymbolNode::AdaptToX(), SmRectangleNode::AdaptToY(), SmPolyLineNode::AdaptToY(), SmMathSymbolNode::AdaptToY(), SmRectangleNode::Arrange(), SmPolyLineNode::Arrange(), SmTextNode::Arrange(), SmSpecialNode::Arrange(), SmGlyphSpecialNode::Arrange(), SmMathSymbolNode::Arrange(), SmPlaceNode::Arrange(), SmErrorNode::Arrange(), SmTableNode::Arrange(), SmLineNode::Arrange(), SmRootNode::Arrange(), SmBinVerNode::Arrange(), SmBinDiagonalNode::Arrange(), SmSubSupNode::Arrange(), SmBraceNode::Arrange(), SmBracebodyNode::Arrange(), SmVerticalBraceNode::Arrange(), SmOperNode::Arrange(), SmAttributeNode::Arrange(), SmFontNode::Arrange(), SmMatrixNode::Arrange(), SmBlankNode::Arrange(), SmDrawingVisitor::DrawSpecialNode(), SmDrawingVisitor::DrawTextNode(), SmXMLExport::ExportFont(), SmXMLExport::ExportMath(), SmXMLExport::ExportText(), SmGraphicAccessible::getCharacterBounds(), SmGraphicAccessible::getIndexAtPoint(), SmOoxmlExport::HandleText(), MathType::HandleText(), Prepare(), SmTextNode::Prepare(), SmSpecialNode::Prepare(), SmMathSymbolNode::Prepare(), SmPlaceNode::Prepare(), SmErrorNode::Prepare(), SmLineNode::Prepare(), SmFontNode::Prepare(), SmBlankNode::Prepare(), PrepareAttributes(), SetColor(), SetFont(), SetFontSize(), SetSize(), SmDrawingVisitor::Visit(), SmCaretLinesVisitor::Visit(), SmCaretPos2LineVisitor::Visit(), and SmSelectionRectanglesVisitor::Visit().
|
virtual |
(this assumes the one with index 0 is always the leftmost subnode for the current node).
Reimplemented in SmTableNode, SmBinVerNode, and SmMatrixNode.
Definition at line 66 of file node.cxx.
References GetLeftMost(), GetNumSubNodes(), and GetSubNode().
Referenced by SmTableNode::Arrange(), SmExpressionNode::Arrange(), SmBinVerNode::Arrange(), SmMatrixNode::Arrange(), and GetLeftMost().
|
pure virtual |
Gets the number of subnodes.
Implemented in SmStructureNode, and SmVisibleNode.
Referenced by SmCursor::CountSelectedNodes(), SmSetSelectionVisitor::DefaultVisit(), SmXMLExport::ExportBinaryDiagonal(), SmXMLExport::ExportBinaryVertical(), SmXMLExport::ExportExpression(), SmXMLExport::ExportFont(), SmXMLExport::ExportTable(), FindNodeWithAccessibleIndex(), FindRectClosestTo(), SmCursor::FindSelectedNode(), GetLeftMost(), SmWordExportBase::HandleAllSubNodes(), SmOoxmlExport::HandleFractions(), SmRtfExport::HandleFractions(), MathType::HandleMAlign(), SmWordExportBase::HandleNode(), MathType::HandleNodes(), SmWordExportBase::HandleTable(), MathType::HandleTable(), SmOoxmlExport::HandleVerticalStack(), SmRtfExport::HandleVerticalStack(), SmSetSelectionVisitor::SetSelectedOnAll(), and SmSelectionRectanglesVisitor::VisitChildren().
|
inline |
Definition at line 444 of file node.hxx.
References mpParentNode.
|
inline |
Gets the parent node of this node.
Definition at line 443 of file node.hxx.
References mpParentNode.
Referenced by SmSetSelectionVisitor::DefaultVisit(), SmCursor::Delete(), SmCursor::DeletePrev(), SmCursor::FindTopMostNodeInLine(), SmCursor::InsertBrackets(), SmCursor::InsertFraction(), SmCursor::InsertNodes(), SmCursor::InsertRow(), SmCursor::InsertSubSup(), SmCursor::IsAtTailOfBracket(), SmCursor::NodeToList(), and SmNodeToTextVisitor::Visit().
|
inline |
Parses itself to SmRect.
Definition at line 290 of file node.hxx.
Referenced by SmTableNode::Arrange(), SmLineNode::Arrange(), SmUnHorNode::Arrange(), SmSubSupNode::Arrange(), SmAlignNode::Arrange(), SmFontNode::Arrange(), and SmMatrixNode::Arrange().
|
inline |
Gets the alignment of the text.
Definition at line 284 of file node.hxx.
References meRectHorAlign.
Referenced by SmTableNode::Arrange(), SmExpressionNode::Arrange(), SmBinVerNode::Arrange(), and SmMatrixNode::Arrange().
|
inline |
Gets the line in the text where the node is located.
It is used to do the visual <-> text correspondence.
Definition at line 349 of file node.hxx.
References m_aESelection, and ESelection::nStartPara.
Referenced by SmViewShell::ShowError().
|
inline |
Gets the scale mode.
Definition at line 362 of file node.hxx.
References meScaleMode.
Referenced by SmBraceNode::Arrange(), SmBracebodyNode::Arrange(), SmAttributeNode::Arrange(), SmCursor::CloneLineToClipboard(), SmCloningVisitor::CloneNodeAttr(), SmCursor::Copy(), SmXMLExport::ExportBrace(), and SmNodeToTextVisitor::Visit().
|
inline |
Gets node position in input text.
Definition at line 394 of file node.hxx.
References m_aESelection.
Referenced by SmGraphicWidget::MouseButtonDown(), and SmCloningVisitor::Visit().
|
inline |
Definition at line 170 of file node.hxx.
References GetSubNode(), and nIndex.
|
pure virtual |
Gets the subnode of index nIndex.
nIndex |
Implemented in SmStructureNode, SmVisibleNode, SmStructureNode, and SmVisibleNode.
Referenced by SmXMLExport::ExportAttributes(), SmXMLExport::ExportBinaryDiagonal(), SmXMLExport::ExportBinaryVertical(), SmXMLExport::ExportBrace(), SmXMLExport::ExportExpression(), SmXMLExport::ExportFont(), SmXMLExport::ExportMatrix(), SmXMLExport::ExportOperator(), SmXMLExport::ExportRoot(), SmXMLExport::ExportSubSupScript(), SmXMLExport::ExportTable(), FindNodeWithAccessibleIndex(), FindRectClosestTo(), GetLeftMost(), GetSubNode(), SmWordExportBase::HandleAllSubNodes(), MathType::HandleAttributes(), SmRtfExport::HandleBrace(), MathType::HandleBrace(), MathType::HandleCScript(), SmOoxmlExport::HandleFractions(), SmRtfExport::HandleFractions(), MathType::HandleFractions(), MathType::HandleLim(), MathType::HandleMAlign(), MathType::HandleNodes(), MathType::HandleOperator(), MathType::HandleRoot(), MathType::HandleSubSupScript(), MathType::HandleTable(), MathType::HandleVerticalBrace(), SmOoxmlExport::HandleVerticalStack(), SmRtfExport::HandleVerticalStack(), and SmNodeToTextVisitor::Visit().
|
inline |
Definition at line 388 of file node.hxx.
References maNodeToken.
|
inline |
Gets the token.
The token contains the data extracted from the text mode. Ej: text, type (sub, sup, int,...), row and column,...
Definition at line 387 of file node.hxx.
References maNodeToken.
Referenced by SmTextNode::AdjustFontDesc(), SmPolyLineNode::Arrange(), SmUnHorNode::Arrange(), SmSubSupNode::Arrange(), SmBraceNode::Arrange(), SmVerticalBraceNode::Arrange(), SmOperNode::Arrange(), SmAlignNode::Arrange(), SmAttributeNode::Arrange(), SmFontNode::Arrange(), SmTextNode::ChangeText(), SmCursor::Copy(), SmXMLExport::ExportAttributes(), SmXMLExport::ExportBinaryDiagonal(), SmXMLExport::ExportBinaryHorizontal(), SmXMLExport::ExportBinaryVertical(), SmXMLExport::ExportBrace(), SmXMLExport::ExportFont(), SmXMLExport::ExportNodes(), SmXMLExport::ExportTable(), SmXMLExport::ExportText(), SmXMLExport::ExportVerticalBrace(), SmCursor::FindPositionInLineList(), SmGraphicNode::GetAccessibleText(), SmOoxmlExport::HandleAttribute(), SmRtfExport::HandleAttribute(), MathType::HandleAttributes(), SmWordExportBase::HandleBinaryOperation(), SmOoxmlExport::HandleBrace(), MathType::HandleBrace(), MathType::HandleLim(), MathType::HandleMAlign(), SmWordExportBase::HandleMath(), MathType::HandleMath(), MathType::HandleNodes(), SmOoxmlExport::HandleOperator(), SmRtfExport::HandleOperator(), MathType::HandleOperator(), SmOoxmlExport::HandleText(), SmRtfExport::HandleText(), SmWordExportBase::HandleUnaryOperation(), SmOoxmlExport::HandleVerticalBrace(), SmRtfExport::HandleVerticalBrace(), MathType::HandleVerticalBrace(), SmCursor::InsertRow(), SmCursor::IsAtTailOfBracket(), SmCursor::PatchLineList(), SmTextNode::Prepare(), SmSpecialNode::Prepare(), SmFontNode::Prepare(), SmMathSymbolNode::SmMathSymbolNode(), SmCursor::TakeSelectedNodesFromList(), SmCloningVisitor::Visit(), and SmNodeToTextVisitor::Visit().
|
inline |
Gets the node type.
Definition at line 379 of file node.hxx.
References meType.
Referenced by SmVerticalBraceNode::Brace(), SmBraceNode::ClosingBrace(), SmCursor::Copy(), SmSetSelectionVisitor::DefaultVisit(), SmCursor::DeletePrev(), SmXMLExport::ExportBinaryHorizontal(), SmXMLExport::ExportBinaryVertical(), SmXMLExport::ExportExpression(), SmXMLExport::ExportMath(), SmXMLExport::ExportNodes(), SmXMLExport::ExportTable(), SmCursor::FinishEdit(), SmCaretPos::GetPosAfter(), SmStructureNode::GetSubNodeBinMo(), SmOperNode::GetSymbol(), SmOoxmlExport::HandleBrace(), SmRtfExport::HandleBrace(), SmWordExportBase::HandleNode(), MathType::HandleNodes(), SmOoxmlExport::HandleOperator(), SmRtfExport::HandleOperator(), SmCursor::InsertRow(), SmCursor::InsertSubSup(), SmCursor::IsAtTailOfBracket(), SmCursor::IsLineCompositionNode(), mathSymbolToString(), SmBraceNode::OpeningBrace(), SmCursor::PatchLineList(), SmStructureNode::SetSubNodesBinMo(), SmCaretPosGraphBuildingVisitor::SmCaretPosGraphBuildingVisitor(), SmSetSelectionVisitor::SmSetSelectionVisitor(), SmRootNode::Symbol(), SmCaretPosGraphBuildingVisitor::Visit(), and SmNodeToTextVisitor::Visit().
|
inline |
Checks if it is a visible node rendered invisible.
Definition at line 191 of file node.hxx.
References mbIsPhantom.
Referenced by SmDrawingVisitor::DrawChildren(), SmDrawingVisitor::DrawTextNode(), and SmDrawingVisitor::Visit().
|
inline |
Checks if the node is selected.
Definition at line 430 of file node.hxx.
References mbIsSelected.
Referenced by SmSelectionRectanglesVisitor::DefaultVisit(), SmCursor::FindTopMostNodeInLine(), SmSetSelectionVisitor::SmSetSelectionVisitor(), and SmSelectionRectanglesVisitor::Visit().
|
pure virtual |
Checks node visibility.
Returns true if this is an instance of SmVisibleNode's subclass, false otherwise.
Implemented in SmStructureNode, and SmVisibleNode.
Referenced by FindRectClosestTo(), SmStructureNode::GetAccessibleText(), and SmGraphicAccessible::getIndexAtPoint().
void SmNode::Move | ( | const Point & | rVector | ) |
Moves the rectangle by rVector.
rVector |
Definition at line 231 of file node.cxx.
References SmRect::Move(), Move(), Point::X(), and Point::Y().
Referenced by SmMatrixNode::Arrange(), Move(), and MoveTo().
|
inline |
Moves the rectangle to rPoint, being the top left corner the origin.
rPoint |
Definition at line 304 of file node.hxx.
References SmRect::GetTopLeft(), and Move().
Referenced by SmTableNode::Arrange(), SmLineNode::Arrange(), SmRootNode::Arrange(), SmBinVerNode::Arrange(), SmBinDiagonalNode::Arrange(), SmSubSupNode::Arrange(), SmBraceNode::Arrange(), SmBracebodyNode::Arrange(), SmOperNode::Arrange(), SmAttributeNode::Arrange(), and SmMatrixNode::Arrange().
|
virtual |
Prepare preliminary settings about font and text (e.g.
maFace, meRectHorAlign, mnFlags, mnAttributes, etc.)
rFormat | |
rDocShell | |
nDepth |
Reimplemented in SmTextNode, SmSpecialNode, SmMathSymbolNode, SmPlaceNode, SmErrorNode, SmLineNode, SmFontNode, and SmBlankNode.
Definition at line 207 of file node.cxx.
References Center, FNT_MATH, GetFont(), SmFormat::GetFont(), SmFormat::GetHorAlign(), ITALIC_NONE, Left, mbIsPhantom, meRectHorAlign, mnAttributes, mnFlags, None, Prepare(), Right, vcl::Font::SetItalic(), vcl::Font::SetWeight(), and WEIGHT_NORMAL.
Referenced by SmCursor::InsertBrackets(), SmCursor::InsertElement(), SmCursor::InsertSubSup(), Prepare(), SmTextNode::Prepare(), SmSpecialNode::Prepare(), SmMathSymbolNode::Prepare(), SmPlaceNode::Prepare(), SmErrorNode::Prepare(), SmLineNode::Prepare(), SmFontNode::Prepare(), and SmBlankNode::Prepare().
void SmNode::PrepareAttributes | ( | ) |
Prepare preliminary font attributes Called on Prepare(...).
Definition at line 200 of file node.cxx.
References Attributes(), Bold, GetFont(), Italic, ITALIC_NONE, ITALIC_NORMAL, vcl::Font::SetItalic(), vcl::Font::SetWeight(), WEIGHT_BOLD, and WEIGHT_NORMAL.
Referenced by SmTextNode::Arrange(), SmSpecialNode::Arrange(), SmGlyphSpecialNode::Arrange(), SmMathSymbolNode::Arrange(), SmPlaceNode::Arrange(), and SmErrorNode::Arrange().
|
inline |
Sets the node accessible index to nAccIndex.
Used for visual editing.
nAccIndex |
Definition at line 334 of file node.hxx.
References mnAccIndex.
Referenced by SmStructureNode::GetAccessibleText().
void SmNode::SetAttribute | ( | FontAttribute | nAttrib | ) |
Sets the font attribute nAttrib.
Check FontAttribute class.
nAttrib |
Definition at line 97 of file node.cxx.
References Bold, Flags(), Italic, mnAttributes, and SetAttribute().
Referenced by SmFontNode::Arrange(), SmSpecialNode::Prepare(), and SetAttribute().
void SmNode::SetColor | ( | const Color & | rColor | ) |
Sets the font color.
rColor |
Definition at line 88 of file node.cxx.
References Color, Flags(), GetFont(), vcl::Font::SetColor(), and SetColor().
Referenced by SmFontNode::Arrange(), and SetColor().
void SmNode::SetFont | ( | const SmFace & | rFace | ) |
Sets the font to rFace.
rFace |
Definition at line 125 of file node.cxx.
References Face, Flags(), GetFont(), and SetFont().
Referenced by SmFontNode::Arrange(), SmFontNode::Prepare(), and SetFont().
void SmNode::SetFontSize | ( | const Fraction & | rRelSize, |
FontSizeType | nType | ||
) |
Sets the font size to rRelSize with type nType.
'rSize' is in units of pts
Check FontSizeType for details.
rRelSize | |
nType |
Definition at line 133 of file node.cxx.
References ABSOLUT, Size::AdjustHeight(), conversionFract(), o3tl::convert(), DIVIDE, Flags(), GetFont(), vcl::Font::GetFontSize(), Size::Height(), MINUS, MULTIPLY, nType, PLUS, o3tl::pt, SetFontSize(), Size::setHeight(), SmFace::SetSize(), Size::setWidth(), Size, and SmO3tlLengthUnit().
Referenced by SmFontNode::Arrange(), and SetFontSize().
|
inline |
Sets the parent node.
parent |
Definition at line 451 of file node.hxx.
References mpParentNode.
Referenced by SmStructureNode::ClaimPaternity(), and SmStructureNode::SetSubNode().
void SmNode::SetPhantom | ( | bool | bIsPhantom | ) |
Sets the render visibility of a visible node to bIsPhantom.
bIsPhantom |
Definition at line 78 of file node.cxx.
References Flags(), mbIsPhantom, Phantom, and SetPhantom().
Referenced by SmFontNode::Arrange(), and SetPhantom().
void SmNode::SetRectHorAlign | ( | RectHorAlign | eHorAlign, |
bool | bApplyToSubTree = true |
||
) |
Sets the alignment of the text.
Check RectHorAlign class for details. The subtrees will be affected if bApplyToSubTree.
eHorAlign | |
bApplyToSubTree |
Definition at line 191 of file node.cxx.
References meRectHorAlign, and SetRectHorAlign().
Referenced by SmExpressionNode::Arrange(), SmAlignNode::Arrange(), SmTextNode::Prepare(), and SetRectHorAlign().
|
inline |
Sets the scale mode to eMode.
eMode |
Definition at line 369 of file node.hxx.
References eMode, and meScaleMode.
Referenced by SmCloningVisitor::CloneNodeAttr(), SmCursor::CreateBracket(), and SmCursor::InsertBrackets().
|
inline |
Sets the node to Selected.
Selected |
Definition at line 437 of file node.hxx.
References mbIsSelected, and Selected.
Referenced by SmSetSelectionVisitor::DefaultVisit(), SmSetSelectionVisitor::SetSelectedOnAll(), SmSetSelectionVisitor::Visit(), and SmSetSelectionVisitor::VisitCompositionNode().
|
inline |
Gets node position in input text.
aESelection |
Definition at line 400 of file node.hxx.
References m_aESelection.
Referenced by SmParser5::DoBracebody(), SmParser5::DoError(), and SmCloningVisitor::Visit().
void SmNode::SetSize | ( | const Fraction & | rScale | ) |
Sets the font size to rRelSize with type FontSizeType::ABSOLUT.
rScale |
Definition at line 183 of file node.cxx.
References GetFont(), and SetSize().
Referenced by SmUnHorNode::Arrange(), SmRootNode::Arrange(), SmBinVerNode::Arrange(), SmSubSupNode::Arrange(), SmOperNode::Arrange(), and SetSize().
|
inline |
Sets the token for this node.
token |
Definition at line 458 of file node.hxx.
References maNodeToken.
Referenced by SmCursor::InsertRow().
|
private |
Definition at line 130 of file node.hxx.
Referenced by GetColumn(), GetRow(), GetSelection(), and SetSelection().
|
private |
Definition at line 129 of file node.hxx.
Referenced by GetToken(), and SetToken().
|
private |
Definition at line 137 of file node.hxx.
Referenced by IsPhantom(), Prepare(), and SetPhantom().
|
private |
Definition at line 138 of file node.hxx.
Referenced by IsSelected(), and SetSelected().
|
private |
Definition at line 134 of file node.hxx.
Referenced by GetRectHorAlign(), Prepare(), and SetRectHorAlign().
|
private |
Definition at line 133 of file node.hxx.
Referenced by GetScaleMode(), and SetScaleMode().
|
private |
|
private |
Definition at line 140 of file node.hxx.
Referenced by GetAccessibleIndex(), and SetAccessibleIndex().
|
private |
Definition at line 136 of file node.hxx.
Referenced by Attributes(), ClearAttribute(), Prepare(), and SetAttribute().
|
private |
|
private |
Definition at line 461 of file node.hxx.
Referenced by GetParent(), and SetParent().