5#ifndef BPP_PHYL_GRAPHICS_TREEDRAWING_H
6#define BPP_PHYL_GRAPHICS_TREEDRAWING_H
16#include "../Tree/Tree.h"
22class TreeDrawingListener;
72 double addX(
double increment) {
return x_ += increment; }
73 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 Cursor getBranchCursor(double position) const =0
DrawBranchEvent(const TreeDrawing *source, GraphicDevice *gd, int nodeId, const Cursor &cursor)
virtual GraphicDevice * getGraphicDevice() const
virtual const Cursor & getCursor() const
virtual int getNodeId() const
DrawBranchEvent(const DrawBranchEvent &dne)
DrawBranchEvent & operator=(const DrawBranchEvent &dne)
virtual const TreeDrawing * getTreeDrawing() const
virtual ~DrawBranchEvent()
Event class used by TreeDrawing classes.
DrawNodeEvent(const TreeDrawing *source, GraphicDevice *gd, int nodeId, const Cursor &cursor)
virtual const Cursor & getCursor() const
DrawNodeEvent(const DrawNodeEvent &dne)
virtual GraphicDevice * getGraphicDevice() const
DrawNodeEvent & operator=(const DrawNodeEvent &dne)
virtual const TreeDrawing * getTreeDrawing() const
virtual int getNodeId() const
Event class used by TreeDrawing classes.
DrawTreeEvent(const DrawTreeEvent &dne)
DrawTreeEvent & operator=(const DrawTreeEvent &dte)
virtual const TreeDrawing * getTreeDrawing() const
virtual GraphicDevice * getGraphicDevice() const
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 void collapseNode(int nodeId, bool yn)=0
Properties to draw.
virtual bool hasTree() const =0
TreeDrawing * clone() const =0
virtual void addTreeDrawingListener(TreeDrawingListener *listener)=0
Add a drawing listener to this instance.
virtual int getNodeAt(const Point2D< double > &position) const =0
Get the node corresponding to a position on the device.
virtual std::string getName() const =0
virtual void setTree(const Tree &tree)=0
virtual const TreeDrawingSettings & displaySettings() const =0
virtual void setDisplaySettings(std::shared_ptr< const TreeDrawingSettings > tds)=0
Global drawing settings.
virtual Point2D< double > getNodePosition(int nodeId) const =0
Get the position of a node.
virtual const Tree & tree() 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 double getXUnit() const =0
Interface for phylogenetic tree objects.
Defines the basic types of data flow nodes.