5#ifndef BPP_PHYL_GRAPHICS_TREEDRAWINGDISPLAYCONTROLER_H
6#define BPP_PHYL_GRAPHICS_TREEDRAWINGDISPLAYCONTROLER_H
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();
96 td->addTreeDrawingListener(it->second);
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 &)
static const std::string PROPERTY_NODE_IDS
static const std::string PROPERTY_BOOTSTRAP_VALUES
static const std::string PROPERTY_LEAF_NAMES
BasicTreeDrawingDisplayControler & operator=(const BasicTreeDrawingDisplayControler &)
std::shared_ptr< const TreeDrawingSettings > settings_
BasicTreeDrawingDisplayControler(std::shared_ptr< const TreeDrawingSettings > settings)
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()
void registerTreeDrawing(std::shared_ptr< TreeDrawing > td)
bool isListenerEnabled(const std::string &propertyName) const
virtual ~TreeDrawingDisplayControler()
std::vector< std::shared_ptr< TreeDrawing > > registeredTreeDrawings_
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...
TreeDrawingDisplayControler & operator=(const TreeDrawingDisplayControler &tddc)
Interface allowing to capture drawing events.
Defines the basic types of data flow nodes.