8#include "../Tree/TreeTemplateTools.h"
9#include "../Tree/TreeTools.h"
18shared_ptr<const TreeDrawingSettings> AbstractTreeDrawing::DEFAULT_SETTINGS = std::make_shared<const TreeDrawingSettings>();
22 vector<INode*> nodes =
tree_->getNodes();
23 for (
INode* node : nodes)
25 if (node->getId() == nodeId)
27 return node->getInfos().getPosition();
35 vector<INode*> nodes =
tree_->getNodes();
36 for (
INode* node : nodes)
int getNodeAt(const Point2D< double > &position) const override
Get the node corresponding to a position on the device.
bool belongsTo(const Point2D< double > &p1, const Point2D< double > &p2) const
Utilitary function, telling if a point belongs to a specified area.
std::unique_ptr< TreeTemplate< INode > > tree_
virtual void drawAtBranch(GraphicDevice &gDevice, const INode &node, const std::string &text, double xOffset=0, double yOffset=0, short hpos=GraphicDevice::TEXT_HORIZONTAL_LEFT, short vpos=GraphicDevice::TEXT_VERTICAL_CENTER, double angle=0) const
Draw some text at a particular branch position.
virtual void drawAtNode(GraphicDevice &gDevice, const INode &node, const std::string &text, double xOffset=0, double yOffset=0, short hpos=GraphicDevice::TEXT_HORIZONTAL_LEFT, short vpos=GraphicDevice::TEXT_VERTICAL_CENTER, double angle=0) const
Draw some text at a particular node position.
std::shared_ptr< const TreeDrawingSettings > settings_
virtual void drawText(double x, double y, const std::string &text, short hpos=TEXT_HORIZONTAL_LEFT, short vpos=TEXT_VERTICAL_BOTTOM, double angle=0)=0
Exception thrown when something is wrong with a particular node.
const NodeTemplate< NodeInfos > * getFather() const
Get the father of this node is there is one.
virtual const NodeInfos & getInfos() const
virtual bool hasFather() const
Tell if this node has a father node.
std::string toString(T t)
Defines the basic types of data flow nodes.