506 if( pNode ) pNode->
Accept(
this );
515 void Append( std::u16string_view rText ) {
Node for brace construction.
Visitor for drawing a caret position.
virtual void ProcessUnderline(Point from, Point to) override
SmCaretDrawingVisitor(OutputDevice &rDevice, SmCaretPos position, Point offset, bool caretVisible)
Given position and device this constructor will draw the caret.
virtual void ProcessCaretLine(Point from, Point to) override
A line that represents a caret.
Point maOffset
Offset to draw from.
virtual void ProcessCaretLine(Point from, Point to)=0
SmCaretLinesVisitor(OutputDevice &rDevice, SmCaretPos position, Point offset)
void Visit(SmTextNode *pNode) override
void DefaultVisit(SmNode *pNode) override
Default method for drawing pNodes.
virtual ~SmCaretLinesVisitor()=default
virtual void ProcessUnderline(Point from, Point to)=0
Visitor getting a line from a caret position.
VclPtr< OutputDevice > mpDev
SmCaretPos2LineVisitor(OutputDevice *pDevice, SmCaretPos position)
Given position and device this constructor will compute a line for the caret.
virtual ~SmCaretPos2LineVisitor()
void DefaultVisit(SmNode *pNode) override
Default method for computing lines for pNodes.
const SmCaretLine & GetResult() const
void Visit(SmTextNode *pNode) override
A visitor for building a SmCaretPosGraph.
SmCaretPosGraphBuildingVisitor(SmNode *pRootNode)
Builds a caret position graph for pRootNode.
void Visit(SmTableNode *pNode) override
Build SmCaretPosGraph for SmTableNode This method covers cases where SmTableNode is used in a binom o...
SmCaretPosGraphEntry * mpRightMost
std::unique_ptr< SmCaretPosGraph > mpGraph
virtual ~SmCaretPosGraphBuildingVisitor()
SmCaretPosGraph * takeGraph()
A graph over all caret positions.
const tools::Rectangle & getCaret() const
virtual void ProcessUnderline(Point from, Point to) override
SmCaretRectanglesVisitor(OutputDevice &rDevice, SmCaretPos position)
virtual void ProcessCaretLine(Point from, Point to) override
Visitor for cloning a pNode.
void CloneKids(SmStructureNode *pSource, SmStructureNode *pTarget)
Clone children of pSource and give them to pTarget.
SmNode * Clone(SmNode *pNode)
Clone a pNode.
void Visit(SmTableNode *pNode) override
static void CloneNodeAttr(SmNode const *pSource, SmNode *pTarget)
Clone attributes on a pNode.
virtual ~SmCloningVisitor()
Visitor that uses DefaultVisit for handling visits by default.
virtual void DefaultVisit(SmNode *pNode)=0
Method invoked by Visit methods by default.
void Visit(SmTableNode *pNode) override
Visitor for drawing SmNodes to OutputDevice.
OutputDevice & mrDev
OutputDevice to draw on.
virtual ~SmDrawingVisitor()
Point maPosition
Position to draw on the mrDev.
SmDrawingVisitor(OutputDevice &rDevice, Point position, SmNode *pTree)
Create an instance of SmDrawingVisitor, and use it to draw a formula.
void Visit(SmTableNode *pNode) override
void DrawTextNode(SmTextNode *pNode)
Draw an SmTextNode or a subclass of this.
void DrawChildren(SmStructureNode *pNode)
Draw the children of a pNode This the default method, use by most pNodes.
void DrawSpecialNode(SmSpecialNode *pNode)
Draw an SmSpecialNode or a subclass of this
Error node, for parsing errors.
Glyph node for custom operators.
Extract command text from pNodes.
OUStringBuffer maCmdText
Output text generated from the pNodes.
virtual ~SmNodeToTextVisitor()
void LineToText(SmNode *pNode)
Extract text from a pNode that constitutes a line.
SmNodeToTextVisitor(SmNode *pNode, OUString &rText)
void Separate()
Append a blank for separation, if needed.
void Append(std::u16string_view rText)
Appends rText to the OUStringBuffer ( maCmdText ).
void Visit(SmTableNode *pNode) override
virtual void Accept(SmVisitor *pVisitor)=0
Accept a visitor.
SmSelectionDrawingVisitor(OutputDevice &rDevice, SmNode *pTree, const Point &rOffset)
Draws a selection on rDevice for the selection on pTree.
const tools::Rectangle & GetSelection()
tools::Rectangle maSelectionArea
The current area that is selected.
void DefaultVisit(SmNode *pNode) override
Default visiting method.
SmSelectionRectanglesVisitor(OutputDevice &rDevice, SmNode *pTree)
virtual ~SmSelectionRectanglesVisitor()=default
void VisitChildren(SmNode *pNode)
Visit the children of a given pNode.
OutputDevice & mrDev
Reference to drawing device.
void ExtendSelectionArea(const tools::Rectangle &rArea)
Extend the area that must be selected
void Visit(SmTextNode *pNode) override
Set Selection Visitor Sets the IsSelected( ) property on all SmNodes of the tree.
static void SetSelectedOnAll(SmNode *pSubTree, bool IsSelected=true)
Set IsSelected on all pNodes of pSubTree.
virtual ~SmSetSelectionVisitor()
bool mbSelecting
The current state of this visitor This property changes when the visitor meets either maStartPos or m...
SmSetSelectionVisitor(SmCaretPos startPos, SmCaretPos endPos, SmNode *pNode)
void VisitCompositionNode(SmStructureNode *pNode)
void DefaultVisit(SmNode *pNode) override
Visit a selectable pNode Can be used to handle pNodes that can be selected, that doesn't have more Sm...
void Visit(SmBinHorNode *pNode) override
SmCaretPos maStartPos
Caret position where the selection starts.
SmCaretPos maEndPos
Caret position where the selection ends.
Special node for user defined characters.
Abstract baseclass for all composite node.
Super- and subscript node.
Node for vertical brace construction.
Visitors are an easy way to automating operations with nodes.
virtual void Visit(SmBlankNode *pNode)=0
virtual void Visit(SmBinDiagonalNode *pNode)=0
virtual void Visit(SmMatrixNode *pNode)=0
virtual void Visit(SmRootNode *pNode)=0
virtual void Visit(SmRectangleNode *pNode)=0
virtual void Visit(SmTextNode *pNode)=0
virtual void Visit(SmErrorNode *pNode)=0
virtual void Visit(SmUnHorNode *pNode)=0
virtual void Visit(SmGlyphSpecialNode *pNode)=0
virtual void Visit(SmRootSymbolNode *pNode)=0
virtual void Visit(SmSpecialNode *pNode)=0
virtual void Visit(SmOperNode *pNode)=0
virtual void Visit(SmExpressionNode *pNode)=0
virtual void Visit(SmLineNode *pNode)=0
virtual void Visit(SmBinVerNode *pNode)=0
virtual void Visit(SmBinHorNode *pNode)=0
virtual void Visit(SmBraceNode *pNode)=0
virtual void Visit(SmPlaceNode *pNode)=0
virtual void Visit(SmMathSymbolNode *pNode)=0
virtual void Visit(SmAlignNode *pNode)=0
virtual void Visit(SmSubSupNode *pNode)=0
virtual void Visit(SmAttributeNode *pNode)=0
virtual void Visit(SmTableNode *pNode)=0
virtual void Visit(SmVerticalBraceNode *pNode)=0
virtual void Visit(SmFontNode *pNode)=0
virtual void Visit(SmPolyLineNode *pNode)=0
virtual void Visit(SmBracebodyNode *pNode)=0
#define SAL_WARN_IF(condition, area, stream)
An entry in SmCaretPosGraph.
Representation of caret position with an equation.
SmNode * pSelectedNode
Selected node.