bpp-phyl3  3.0.0
bpp::BasicTreeDrawingDisplayControler Class Reference

Easy tune of tree drawings display, a basic implementation: More...

#include <Bpp/Phyl/Graphics/TreeDrawingDisplayControler.h>

+ Inheritance diagram for bpp::BasicTreeDrawingDisplayControler:
+ Collaboration diagram for bpp::BasicTreeDrawingDisplayControler:

Public Member Functions

 BasicTreeDrawingDisplayControler (const TreeDrawingSettings *settings)
 
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 when needed. More...
 
bool hasListenerFor (const std::string &propertyName) const
 
void enableListener (const std::string &propertyName, bool tf)
 
bool isListenerEnabled (const std::string &propertyName) const
 
void registerTreeDrawing (TreeDrawing *td)
 

Static Public Attributes

static const std::string PROPERTY_NODE_IDS = "Node ids"
 
static const std::string PROPERTY_LEAF_NAMES = "Leaf names"
 
static const std::string PROPERTY_BRANCH_LENGTHS = "Branch lengths"
 
static const std::string PROPERTY_BOOTSTRAP_VALUES = "Bootstrap values"
 

Private Member Functions

 BasicTreeDrawingDisplayControler (const BasicTreeDrawingDisplayControler &)
 
BasicTreeDrawingDisplayControleroperator= (const BasicTreeDrawingDisplayControler &)
 

Private Attributes

const TreeDrawingSettingssettings_
 
std::map< std::string, TreeDrawingListener * > listeners_
 
std::vector< TreeDrawing * > registeredTreeDrawings_
 

Detailed Description

Easy tune of tree drawings display, a basic implementation:

This class maintains several "standard" drawing listener for:

  • Plotting node id,
  • Plotting leaves names,
  • Plotting branch lengths,
  • Plotting plotting bootstrap values.

This controller takes as an argument a TreeDrawingSettings object that is used by all listeners that require one.

Definition at line 115 of file TreeDrawingDisplayControler.h.

Constructor & Destructor Documentation

◆ BasicTreeDrawingDisplayControler() [1/2]

bpp::BasicTreeDrawingDisplayControler::BasicTreeDrawingDisplayControler ( const TreeDrawingSettings settings)
inline

◆ BasicTreeDrawingDisplayControler() [2/2]

bpp::BasicTreeDrawingDisplayControler::BasicTreeDrawingDisplayControler ( const BasicTreeDrawingDisplayControler )
inlineprivate

Definition at line 140 of file TreeDrawingDisplayControler.h.

Member Function Documentation

◆ addListener()

void TreeDrawingDisplayControler::addListener ( const std::string &  propertyName,
TreeDrawingListener listener 
)
inherited

Add a listener to the controller. The controller then owns the object, and will copy or delete it when needed.

Definition at line 23 of file TreeDrawingDisplayControler.cpp.

References bpp::TreeDrawingListener::isAutonomous().

Referenced by BasicTreeDrawingDisplayControler().

◆ enableListener()

void bpp::TreeDrawingDisplayControler::enableListener ( const std::string &  propertyName,
bool  tf 
)
inlineinherited

◆ hasListenerFor()

bool bpp::TreeDrawingDisplayControler::hasListenerFor ( const std::string &  propertyName) const
inlineinherited

◆ isListenerEnabled()

bool bpp::TreeDrawingDisplayControler::isListenerEnabled ( const std::string &  propertyName) const
inlineinherited

◆ operator=()

BasicTreeDrawingDisplayControler& bpp::BasicTreeDrawingDisplayControler::operator= ( const BasicTreeDrawingDisplayControler )
inlineprivate

Definition at line 141 of file TreeDrawingDisplayControler.h.

◆ registerTreeDrawing()

void bpp::TreeDrawingDisplayControler::registerTreeDrawing ( TreeDrawing td)
inlineinherited

Member Data Documentation

◆ listeners_

◆ PROPERTY_BOOTSTRAP_VALUES

const string BasicTreeDrawingDisplayControler::PROPERTY_BOOTSTRAP_VALUES = "Bootstrap values"
static

Definition at line 122 of file TreeDrawingDisplayControler.h.

Referenced by BasicTreeDrawingDisplayControler().

◆ PROPERTY_BRANCH_LENGTHS

const string BasicTreeDrawingDisplayControler::PROPERTY_BRANCH_LENGTHS = "Branch lengths"
static

Definition at line 121 of file TreeDrawingDisplayControler.h.

Referenced by BasicTreeDrawingDisplayControler().

◆ PROPERTY_LEAF_NAMES

const string BasicTreeDrawingDisplayControler::PROPERTY_LEAF_NAMES = "Leaf names"
static

Definition at line 120 of file TreeDrawingDisplayControler.h.

Referenced by BasicTreeDrawingDisplayControler().

◆ PROPERTY_NODE_IDS

const string BasicTreeDrawingDisplayControler::PROPERTY_NODE_IDS = "Node ids"
static

Definition at line 119 of file TreeDrawingDisplayControler.h.

Referenced by BasicTreeDrawingDisplayControler().

◆ registeredTreeDrawings_

std::vector<TreeDrawing*> bpp::TreeDrawingDisplayControler::registeredTreeDrawings_
privateinherited

◆ settings_

const TreeDrawingSettings* bpp::BasicTreeDrawingDisplayControler::settings_
private

Definition at line 125 of file TreeDrawingDisplayControler.h.

Referenced by BasicTreeDrawingDisplayControler().


The documentation for this class was generated from the following files: