5 #ifndef BPP_PHYL_GRAPHICS_TREEDRAWING_H
6 #define BPP_PHYL_GRAPHICS_TREEDRAWING_H
15 #include "../Tree/Tree.h"
21 class TreeDrawingListener;
71 double addX(
double increment) {
return x_ += increment; }
72 double addY(
double increment) {
return y_ += increment; }
Data structure describing a plotting direction.
Cursor getTranslation(double x, double y) const
double addY(double increment)
double addX(double increment)
Cursor(double x, double y, double angle=0, short hpos=GraphicDevice::TEXT_HORIZONTAL_CENTER, short vpos=GraphicDevice::TEXT_VERTICAL_CENTER)
Event class used by TreeDrawing classes.
virtual const TreeDrawing * getTreeDrawing() const
virtual Cursor getBranchCursor(double position) const =0
DrawBranchEvent(const TreeDrawing *source, GraphicDevice *gd, int nodeId, const Cursor &cursor)
virtual const Cursor & getCursor() const
virtual int getNodeId() const
virtual GraphicDevice * getGraphicDevice() const
DrawBranchEvent & operator=(const DrawBranchEvent &dne)
DrawBranchEvent(const DrawBranchEvent &dne)
virtual ~DrawBranchEvent()
Event class used by TreeDrawing classes.
DrawNodeEvent & operator=(const DrawNodeEvent &dne)
DrawNodeEvent(const TreeDrawing *source, GraphicDevice *gd, int nodeId, const Cursor &cursor)
virtual const Cursor & getCursor() const
DrawNodeEvent(const DrawNodeEvent &dne)
virtual const TreeDrawing * getTreeDrawing() const
virtual GraphicDevice * getGraphicDevice() const
virtual int getNodeId() const
Event class used by TreeDrawing classes.
DrawTreeEvent(const DrawTreeEvent &dne)
virtual GraphicDevice * getGraphicDevice() const
virtual const TreeDrawing * getTreeDrawing() const
DrawTreeEvent & operator=(const DrawTreeEvent &dte)
DrawTreeEvent(const TreeDrawing *source, GraphicDevice *gd)
static short TEXT_HORIZONTAL_CENTER
static short TEXT_VERTICAL_CENTER
Interface allowing to capture drawing events.
A set of options to tune the display of a TreeDrawing object.
Basal interface for tree drawing classes.
virtual bool isNodeCollapsed(int nodeId) const =0
virtual double getYUnit() const =0
virtual Point2D< double > getNodePosition(int nodeId) const =0
Get the position of a node.
virtual void collapseNode(int nodeId, bool yn)=0
Properties to draw.
virtual bool hasTree() const =0
virtual void addTreeDrawingListener(TreeDrawingListener *listener)=0
Add a drawing listener to this instance.
virtual void setTree(const Tree *tree)=0
TreeDrawing * clone() const =0
virtual int getNodeAt(const Point2D< double > &position) const =0
Get the node corresponding to a position on the device.
virtual const Tree * getTree() const =0
virtual void setDisplaySettings(const TreeDrawingSettings *tds)=0
Global drawing settings.
virtual std::string getName() const =0
virtual void setYUnit(double yu)=0
Set the 'vertical' expansion unit.
virtual void setXUnit(double xu)=0
Set the 'horizontal' expansion unit.
virtual double getHeight() const =0
virtual void plot(GraphicDevice &gDevice) const =0
Plot the tree onto the specified device.
virtual void removeTreeDrawingListener(TreeDrawingListener *listener)=0
Remove a drawing listener from this instance.
virtual double getWidth() const =0
virtual const TreeDrawingSettings & getDisplaySettings() const =0
virtual double getXUnit() const =0
Interface for phylogenetic tree objects.
Defines the basic types of data flow nodes.