5 #ifndef BPP_PHYL_GRAPHICS_TREEDRAWINGDISPLAYCONTROLER_H
6 #define BPP_PHYL_GRAPHICS_TREEDRAWINGDISPLAYCONTROLER_H
42 for (std::map<std::string, TreeDrawingListener*>::const_iterator it = tddc.
listeners_.begin();
52 for (std::map<std::string, TreeDrawingListener*>::const_iterator it = tddc.
listeners_.begin();
78 throw Exception(
"TreeDrawingDisplayControler::enableListener. No listener is registered for property " + propertyName +
".");
85 throw Exception(
"TreeDrawingDisplayControler::enableListener. No listener is registered for property " + propertyName +
".");
86 return listeners_.find(propertyName)->second->isEnabled();
92 throw Exception(
"TreeDrawingDisplayControler::registerTreeDrawing. TreeDrawing is already associated to this controller.");
93 for (std::map<std::string, TreeDrawingListener*>::iterator it =
listeners_.begin();
132 throw NullPointerException(
"BasicTreeDrawingDisplayControler::constructor. Trying to use NULL settings.");
Easy tune of tree drawings display, a basic implementation:
static const std::string PROPERTY_BRANCH_LENGTHS
BasicTreeDrawingDisplayControler(const BasicTreeDrawingDisplayControler &)
const TreeDrawingSettings * settings_
static const std::string PROPERTY_NODE_IDS
BasicTreeDrawingDisplayControler(const TreeDrawingSettings *settings)
static const std::string PROPERTY_BOOTSTRAP_VALUES
static const std::string PROPERTY_LEAF_NAMES
BasicTreeDrawingDisplayControler & operator=(const BasicTreeDrawingDisplayControler &)
A TreeDrawingListener implementation that write the bootstrap values of inner nodes.
A TreeDrawingListener implementation that write the branch lengths of inner nodes.
A TreeDrawingListener implementation that write leaf names.
A TreeDrawingListener implementation that writes nodes id.
Easy tune of tree drawings display.
void enableListener(const std::string &propertyName, bool tf)
TreeDrawingDisplayControler(const TreeDrawingDisplayControler &tddc)
TreeDrawingDisplayControler()
TreeDrawingDisplayControler & operator=(const TreeDrawingDisplayControler &tddc)
std::vector< TreeDrawing * > registeredTreeDrawings_
bool isListenerEnabled(const std::string &propertyName) const
virtual ~TreeDrawingDisplayControler()
void registerTreeDrawing(TreeDrawing *td)
std::map< std::string, TreeDrawingListener * > listeners_
bool hasListenerFor(const std::string &propertyName) const
void addListener(const std::string &propertyName, TreeDrawingListener *listener)
Add a listener to the controller. The controller then owns the object, and will copy or delete it whe...
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 void addTreeDrawingListener(TreeDrawingListener *listener)=0
Add a drawing listener to this instance.
Defines the basic types of data flow nodes.