NCBI C++ ToolKit
Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
CPhyloNodeData Class Reference

Search Toolkit Book for CPhyloNodeData

#include <gui/widgets/phylo_tree/phylo_tree_node.hpp>

+ Collaboration diagram for CPhyloNodeData:

Public Types

enum  TSelectedState { eNotSelected , eSelected , eTraced , eShared }
 
enum  TDisplayChildren { eShowChildren , eHideChildren }
 
enum  TBoundingState { eUnBounded , eBounded }
 
typedef objects::CNode::TId TID
 
typedef string TLabel
 
typedef float TDistance
 
typedef int TClusterID
 
typedef vector< intTSelClusterIDs
 
typedef CBioTreeFeatureList TNodeFeaturesType
 
typedef CVect2< float > TPoint
 
typedef pair< int, intTIndex
 
typedef string TColor
 

Public Member Functions

 CPhyloNodeData ()
 
 CPhyloNodeData (const CPhyloNodeData &rhs)
 
 ~CPhyloNodeData ()
 
CPhyloNodeDataoperator= (const CPhyloNodeData &rhs)
 
void Init (const CBioTreeFeatureDictionary &dict, CRgbaGradColorTable *t)
 
void Sync (CBioTreeFeatureDictionary &dict)
 
const CRef< objects::CSeq_id > & GetSeqID () const
 
void SetSeqID (objects::CSeq_id *sid)
 
CBioTreeFeatureListGetBioTreeFeatureList ()
 
const CBioTreeFeatureListGetBioTreeFeatureList () const
 
void SetBioTreeFeatureList (const CBioTreeFeatureList &btcfl)
 
int GetNumLeaves () const
 
void SetNumLeaves (int x_ln)
 
int GetNumLeavesEx () const
 
void SetNumLeavesEx (int x_ln)
 
int GetPrimaryCluster () const
 With selection clusters a node may have multiple cluster ids. More...
 
size_t GetNumClusters () const
 Return total # of applicable clusters - selection + m_ClusterID. More...
 
TClusterID GetClusterID (void) const
 
void SetClusterID (TClusterID x_id)
 
int GetPamlCounter () const
 
void SetPamlCounter (int x_ctr)
 
TID GetId () const
 
void SetId (TID x_id)
 
TDistance GetDistance () const
 
void SetDistance (TDistance x_dist)
 
TDistance GetDistanceFromRoot () const
 
void SetDistanceFromRoot (TDistance x_dist)
 
TDistance GetMaxChildDistance () const
 
void SetMaxChildDistance (TDistance x_dist)
 
void SetLabel (const TLabel &x_label)
 
const TLabelGetLabel () const
 
void Set (TID x_id, TDistance x_dist, const TLabel &x_label)
 
TPointXY ()
 
float & X ()
 
float & Y ()
 
TPoint XY () const
 
float X () const
 
float Y () const
 
TIndexIDX ()
 
const TIndexIDX () const
 
TSelectedState GetSelectedState () const
 
void SetSelectedState (TSelectedState x_state)
 
CPhyloTreeScheme::TPhyloTreeColors GetColoration () const
 
void SetColoration (CPhyloTreeScheme::TPhyloTreeColors ct)
 
TDisplayChildren GetDisplayChildren () const
 
void SetDisplayChildren (TDisplayChildren show)
 
TBoundingState GetBoundedDisplay () const
 
short GetNodeEdColorIdx () const
 
short GetNodeFgColorIdx () const
 
short GetClusterColorIdx () const
 
short GetLabelFgColorIdx () const
 
short GetLabelBgColorIdx ()
 
void SetNodeFgColorIdx (short idx)
 
void SetNodeEdgeColorIdx (short idx)
 
void SetClusterColorIdx (short idx)
 
void SetLabelColorIdx (short idx)
 
void SetLabelBgColorIdx (short idx)
 
void SetLabelRect (const CGlRect< float > &r)
 
CGlRect< float > GetLabelRect () const
 
void SetNodeOffset (const CVect2< float > &o)
 
CVect2< float > GetNodeOffset () const
 
void SetNodePixelOffset (const CVect2< float > &o)
 
CVect2< float > GetNodePixelOffset () const
 
bool HasSelClusters () const
 
TSelClusterIDsGetSelClusters ()
 
void SetSelClusters (const TSelClusterIDs &sc)
 
void SetMarkerColors (const string &str)
 
string GetMarkerColorsAsString ()
 
bool HasNodeMarker () const
 
vector< CRgbaColor > & GetMarkerColors ()
 
float GetMarkerSize () const
 
void SetMarkerSize (float f)
 
CSubtreeBoundaryGetSubtreeBoundary ()
 Gets current boundary or creates a new one if m_Boundary is NULL. More...
 
void DeleteSubtreeBoundary ()
 Deletes current boundary (if not NULL). More...
 
float GetNodeSize () const
 
void SetNodeSize (float x_sz)
 
float GetAngle (void) const
 
void SetAngle (float angle)
 
float GetDrawAngle (void) const
 
void SetDrawAngle (float angle)
 
float GetEdgeScore () const
 
void SetEdgeScore (float s)
 
void SetFeature (CBioTreeFeatureDictionary &dict, const string &name, const string &value)
 
void RemoveFeature (CBioTreeFeatureDictionary &dict, const string &name)
 
void InitFeatures (const CBioTreeFeatureDictionary &dict, CRgbaGradColorTable *t)
 
float GetScaledAngle (const CVect3< float > &scale, float a, bool for_label=true) const
 Utility to get screen rotation angle after scaling. More...
 
CVect2< float > GetNodePosEx (const CVect3< float > &scale, CPhyloTreeScheme *scheme, float &node_size, float size_scaler=1.0f) const
 Get modified center of node position - this works for collapsed nodes in rotated layouts and with offsets between label and node. More...
 
void Render (const CGlPane &pane, const CGlTextureFont &font, CRgbaGradColorTable *color_table, const CVect3< float > &scale, bool truncate_labels, TModelUnit max_len=-1.0f)
 Draw the label using scale to compute its offset from m_BasePos. More...
 
void RenderRotated (const CGlPane &pane, const CGlTextureFont &font, CRgbaGradColorTable *color_table, const CVect3< float > &scale, float orig_angle, bool truncate_labels)
 Draw the label and rotate it to match m_Angle (radial text) This form does not support label truncation. More...
 
CVect2< float > GetTextOut (CGlPane &pane, const CGlTextureFont &font, const CVect3< float > &scale, bool truncate_labels, string &text_out)
 Return the drawing position and (possibly truncated) text. More...
 
void GetLabelRect (const CVect2< float > &scale, CVect2< float > &lower_left, CVect2< float > &upper_right, bool rotated=false)
 Find the rectangle for the label given the current zoom level (scale) More...
 
bool PointInTextBox (const CVect2< float > &scale, CVect2< float > pt, bool rotated=false)
 Return true if pt is inside of this nodes text box. More...
 
CGlRect< float > GetLabelRect (const CVect2< float > &scale, bool rotated)
 Find the rectangle for the label in pixel coordinates, taking rotation into account. More...
 
void GetBoundingRect (const CVect2< float > &scale, CVect2< float > &lower_left, CVect2< float > &upper_right, bool rotated=false)
 Find the rectangle for the node and label combined given the current zoom level (scale) More...
 
CVect4< CVect2< float > > GetRotatedTextBox (const CVect3< float > &scale, float &angle, float orig_angle=0.0f) const
 Return text box (m_LabelRect) rotated to align with radial edges. More...
 
CVect2< float > GetRotatedTextPos (const CVect3< float > &scale, float &angle) const
 Return the text starting point rotated to align with radial edges. More...
 
float GetMinX (const CVect2< float > &scale)
 Return labels minimal X coordinate. More...
 
float GetDefaultNodeSize (const CPhyloTreeScheme *scheme) const
 Get modified node size - includes scaled (BOA) size. More...
 
float GetNodeLayoutSize (const CPhyloTreeScheme *scheme) const
 Get modified node size - use this instead of GetDefaultNodeSize when doing layout (doesn't go to 0 if leaf node size does) This is basically the height of the node for layout purposes. More...
 
float GetNodeWidthScaler (const CPhyloTreeScheme *scheme) const
 Get modified node width (length) for collapsed nodes. Default is 1. More...
 
float GetNodeOverhang (const CVect2< float > &scale) const
 Get extenstion of node beyond end of edge in pixels. More...
 
void SetVisible (bool b)
 Flag to renderer to determine whether to draw label. More...
 
bool GetVisible () const
 
void SetDisplayLabel (const string &t)
 set/get label text More...
 
const stringGetDisplayLabel () const
 
void SetNodeDisplaySize (float s)
 set/get node size (this is the result of GetDefaultNodeSize()) More...
 
float GetNodeDisplaySize () const
 
void SetEdgeColorGradient (bool g)
 Enable or disable gradient coloring of edges between nodes. More...
 
bool GetEdgeColorGradient () const
 
void SetNodeDisplayColor (const CRgbaColor &c)
 Set/get node color. More...
 
CRgbaColor GetNodeDisplayColor () const
 
void SetTextDisplayColor (const CRgbaColor &c)
 Set/get text color. More...
 
CRgbaColor GetTextDisplayColor () const
 
void SetAlreadyDrawn (bool b)
 Flag set after each drawing and cleared when rendering frame done. More...
 
bool GetAlreadyDrawn () const
 

Static Public Attributes

static const TColor TNoColor = ""
 

Protected Member Functions

string x_GetParameter (const string &features, const string &parm)
 
bool x_HasExtendedParms () const
 

Protected Attributes

CRef< objects::CSeq_id > m_SeqID
 
CBioTreeFeatureList m_Features
 
int m_NumLeaves
 
int m_NumLeavesEx
 
int m_PamlCounter
 
TClusterID m_ClusterID
 
TID m_ID
 
TDistance m_Distance
 
TDistance m_DistanceFromRoot
 
TDistance m_MaxChildDistance
 
TPoint m_XY
 
TIndex m_IDX
 
float m_Angle
 
float m_DrawAngle
 
float m_EdgeScore
 
CGlRect< float > m_LabelRect
 
CVect2< float > m_NodeOffset
 
CVect2< float > m_NodePixelOffset
 Pixel offset to apply the node. More...
 
TSelectedState m_Selected
 
CPhyloTreeScheme::TPhyloTreeColors m_ColorType
 
SExtendedNodeParmsm_ExtendedParms
 
CRgbaColor m_NodeColor
 Current node color. More...
 
CRgbaColor m_FgColor
 Current text color. More...
 
TLabel m_Label
 Full label. More...
 
string m_Text
 Text to render. More...
 
float m_Size
 
float m_NodeSize
 Scaled node size. More...
 
float m_NodeWidth
 This is computed by GetNodeWidthScaler(..) for collapsed nodes and we need to hang onto it for node label positioning. More...
 
short m_NodeEdColorIdx
 Node colors defined by scheme. More...
 
short m_NodeFgColorIdx
 
short m_ClusterColorIdx
 
short m_LabelFgColorIdx
 Label color. More...
 
short m_LabelBgColorIdx
 
bool m_EdgeColorGradient
 Controls use of gradient coloring for edges - if false, edges will be a single color, if true the edge will transition from child to parent color. More...
 
bool m_Children
 expand-collapse state (expanded==true) More...
 
bool m_Visible
 True if node is visible. More...
 
bool m_AlreadyDrawn
 Text is alpha-blended so we add a flag to prevent drawing multiple times. More...
 

Detailed Description

Definition at line 82 of file phylo_tree_node.hpp.

Member Typedef Documentation

◆ TClusterID

Definition at line 87 of file phylo_tree_node.hpp.

◆ TColor

Definition at line 110 of file phylo_tree_node.hpp.

◆ TDistance

Definition at line 86 of file phylo_tree_node.hpp.

◆ TID

typedef objects::CNode::TId CPhyloNodeData::TID

Definition at line 84 of file phylo_tree_node.hpp.

◆ TIndex

typedef pair<int, int> CPhyloNodeData::TIndex

Definition at line 109 of file phylo_tree_node.hpp.

◆ TLabel

Definition at line 85 of file phylo_tree_node.hpp.

◆ TNodeFeaturesType

Definition at line 89 of file phylo_tree_node.hpp.

◆ TPoint

Definition at line 108 of file phylo_tree_node.hpp.

◆ TSelClusterIDs

Definition at line 88 of file phylo_tree_node.hpp.

Member Enumeration Documentation

◆ TBoundingState

Enumerator
eUnBounded 
eBounded 

Definition at line 103 of file phylo_tree_node.hpp.

◆ TDisplayChildren

Enumerator
eShowChildren 
eHideChildren 

Definition at line 98 of file phylo_tree_node.hpp.

◆ TSelectedState

Enumerator
eNotSelected 
eSelected 
eTraced 
eShared 

Definition at line 91 of file phylo_tree_node.hpp.

Constructor & Destructor Documentation

◆ CPhyloNodeData() [1/2]

CPhyloNodeData::CPhyloNodeData ( )
inline

Definition at line 115 of file phylo_tree_node.hpp.

◆ CPhyloNodeData() [2/2]

CPhyloNodeData::CPhyloNodeData ( const CPhyloNodeData rhs)

Definition at line 160 of file phylo_tree_node.cpp.

◆ ~CPhyloNodeData()

CPhyloNodeData::~CPhyloNodeData ( )

Definition at line 211 of file phylo_tree_node.cpp.

References m_ExtendedParms, and NULL.

Member Function Documentation

◆ DeleteSubtreeBoundary()

void CPhyloNodeData::DeleteSubtreeBoundary ( )

Deletes current boundary (if not NULL).

Definition at line 341 of file phylo_tree_node.cpp.

References SExtendedNodeParms::m_Boundary, m_ExtendedParms, NULL, and x_HasExtendedParms().

Referenced by InitFeatures().

◆ GetAlreadyDrawn()

bool CPhyloNodeData::GetAlreadyDrawn ( ) const
inline

Definition at line 391 of file phylo_tree_node.hpp.

References m_AlreadyDrawn.

◆ GetAngle()

float CPhyloNodeData::GetAngle ( void  ) const
inline

◆ GetBioTreeFeatureList() [1/2]

CBioTreeFeatureList & CPhyloNodeData::GetBioTreeFeatureList ( )

◆ GetBioTreeFeatureList() [2/2]

const CBioTreeFeatureList& CPhyloNodeData::GetBioTreeFeatureList ( ) const
inline

Definition at line 157 of file phylo_tree_node.hpp.

References m_Features.

◆ GetBoundedDisplay()

CPhyloNodeData::TBoundingState CPhyloNodeData::GetBoundedDisplay ( ) const

◆ GetBoundingRect()

void CPhyloNodeData::GetBoundingRect ( const CVect2< float > &  scale,
CVect2< float > &  lower_left,
CVect2< float > &  upper_right,
bool  rotated = false 
)

Find the rectangle for the node and label combined given the current zoom level (scale)

Definition at line 1162 of file phylo_tree_node.cpp.

References abs, GetLabelRect(), m_NodeOffset, m_NodeSize, max(), min(), CVect2< T >::X(), X(), CVect2< T >::Y(), and Y().

◆ GetClusterColorIdx()

short CPhyloNodeData::GetClusterColorIdx ( ) const
inline

Definition at line 229 of file phylo_tree_node.hpp.

References m_ClusterColorIdx.

◆ GetClusterID()

TClusterID CPhyloNodeData::GetClusterID ( void  ) const
inline

Definition at line 175 of file phylo_tree_node.hpp.

References m_ClusterID.

Referenced by Sync().

◆ GetColoration()

CPhyloTreeScheme::TPhyloTreeColors CPhyloNodeData::GetColoration ( ) const
inline

Definition at line 219 of file phylo_tree_node.hpp.

References m_ColorType.

◆ GetDefaultNodeSize()

float CPhyloNodeData::GetDefaultNodeSize ( const CPhyloTreeScheme scheme) const

◆ GetDisplayChildren()

TDisplayChildren CPhyloNodeData::GetDisplayChildren ( ) const
inline

◆ GetDisplayLabel()

const string& CPhyloNodeData::GetDisplayLabel ( ) const
inline

Definition at line 371 of file phylo_tree_node.hpp.

References m_Text.

◆ GetDistance()

TDistance CPhyloNodeData::GetDistance ( ) const
inline

◆ GetDistanceFromRoot()

TDistance CPhyloNodeData::GetDistanceFromRoot ( ) const
inline

Definition at line 187 of file phylo_tree_node.hpp.

References fabs, and m_DistanceFromRoot.

◆ GetDrawAngle()

float CPhyloNodeData::GetDrawAngle ( void  ) const
inline

Definition at line 270 of file phylo_tree_node.hpp.

References m_DrawAngle.

◆ GetEdgeColorGradient()

bool CPhyloNodeData::GetEdgeColorGradient ( ) const
inline

Definition at line 379 of file phylo_tree_node.hpp.

References m_EdgeColorGradient.

◆ GetEdgeScore()

float CPhyloNodeData::GetEdgeScore ( ) const
inline

Definition at line 273 of file phylo_tree_node.hpp.

References m_EdgeScore.

Referenced by IPhyloTreeRender::GetEdgeColor().

◆ GetId()

TID CPhyloNodeData::GetId ( void  ) const
inline

◆ GetLabel()

const TLabel& CPhyloNodeData::GetLabel ( void  ) const
inline

Definition at line 194 of file phylo_tree_node.hpp.

References m_Label.

Referenced by Sync().

◆ GetLabelBgColorIdx()

short CPhyloNodeData::GetLabelBgColorIdx ( )
inline

Definition at line 231 of file phylo_tree_node.hpp.

References m_LabelBgColorIdx.

◆ GetLabelFgColorIdx()

short CPhyloNodeData::GetLabelFgColorIdx ( ) const
inline

Definition at line 230 of file phylo_tree_node.hpp.

References m_LabelFgColorIdx.

◆ GetLabelRect() [1/3]

CGlRect<float> CPhyloNodeData::GetLabelRect ( ) const
inline

◆ GetLabelRect() [2/3]

CGlRect< float > CPhyloNodeData::GetLabelRect ( const CVect2< float > &  scale,
bool  rotated 
)

◆ GetLabelRect() [3/3]

void CPhyloNodeData::GetLabelRect ( const CVect2< float > &  scale,
CVect2< float > &  lower_left,
CVect2< float > &  upper_right,
bool  rotated = false 
)

Find the rectangle for the label given the current zoom level (scale)

Definition at line 1045 of file phylo_tree_node.cpp.

References GetLabelRect(), GetRotatedTextBox(), max(), min(), r(), CVect2< T >::X(), CVect4< T >::X(), X(), CVect2< T >::Y(), CVect4< T >::Y(), and Y().

◆ GetMarkerColors()

vector< CRgbaColor > & CPhyloNodeData::GetMarkerColors ( )

◆ GetMarkerColorsAsString()

string CPhyloNodeData::GetMarkerColorsAsString ( )

◆ GetMarkerSize()

float CPhyloNodeData::GetMarkerSize ( ) const

◆ GetMaxChildDistance()

TDistance CPhyloNodeData::GetMaxChildDistance ( ) const
inline

Definition at line 190 of file phylo_tree_node.hpp.

References fabs, and m_MaxChildDistance.

◆ GetMinX()

float CPhyloNodeData::GetMinX ( const CVect2< float > &  scale)

Return labels minimal X coordinate.

Definition at line 1183 of file phylo_tree_node.cpp.

References GetLabelRect(), CVect2< T >::X(), and X().

◆ GetNodeDisplayColor()

CRgbaColor CPhyloNodeData::GetNodeDisplayColor ( ) const
inline

Definition at line 383 of file phylo_tree_node.hpp.

References m_NodeColor.

◆ GetNodeDisplaySize()

float CPhyloNodeData::GetNodeDisplaySize ( ) const
inline

Definition at line 375 of file phylo_tree_node.hpp.

References m_NodeSize.

◆ GetNodeEdColorIdx()

short CPhyloNodeData::GetNodeEdColorIdx ( ) const
inline

Definition at line 227 of file phylo_tree_node.hpp.

References m_NodeEdColorIdx.

◆ GetNodeFgColorIdx()

short CPhyloNodeData::GetNodeFgColorIdx ( ) const
inline

Definition at line 228 of file phylo_tree_node.hpp.

References m_NodeFgColorIdx.

◆ GetNodeLayoutSize()

float CPhyloNodeData::GetNodeLayoutSize ( const CPhyloTreeScheme scheme) const

Get modified node size - use this instead of GetDefaultNodeSize when doing layout (doesn't go to 0 if leaf node size does) This is basically the height of the node for layout purposes.

Definition at line 1226 of file phylo_tree_node.cpp.

References GetDefaultNodeSize(), CPhyloTreeScheme::GetNodeSize(), max(), and ncbi::grid::netcache::search::fields::size.

Referenced by IPhyloTreeRender::GetNodeLayoutSize().

◆ GetNodeOffset()

CVect2<float> CPhyloNodeData::GetNodeOffset ( ) const
inline

Definition at line 243 of file phylo_tree_node.hpp.

References m_NodeOffset.

◆ GetNodeOverhang()

float CPhyloNodeData::GetNodeOverhang ( const CVect2< float > &  scale) const

Get extenstion of node beyond end of edge in pixels.

In circular views, this takes tfhe offset into the circle into account as well.

Definition at line 1272 of file phylo_tree_node.cpp.

References abs, eShowChildren, GetDisplayChildren(), CGlRect< T >::Left(), CVect2< T >::Length(), m_LabelRect, m_NodeOffset, m_NodePixelOffset, m_NodeWidth, min(), CGlRect< T >::Right(), CVect2< T >::X(), and CVect2< T >::Y().

Referenced by GetRotatedTextBox().

◆ GetNodePixelOffset()

CVect2<float> CPhyloNodeData::GetNodePixelOffset ( ) const
inline

Definition at line 246 of file phylo_tree_node.hpp.

References m_NodePixelOffset.

◆ GetNodePosEx()

CVect2< float > CPhyloNodeData::GetNodePosEx ( const CVect3< float > &  scale,
CPhyloTreeScheme scheme,
float &  node_size,
float  size_scaler = 1.0f 
) const

Get modified center of node position - this works for collapsed nodes in rotated layouts and with offsets between label and node.

Definition at line 683 of file phylo_tree_node.cpp.

References a, eShowChildren, GetDefaultNodeSize(), GetDisplayChildren(), GetScaledAngle(), m_Angle, m_NodeOffset, m_XY, CVect2< T >::X(), CVect3< T >::X(), CVect2< T >::Y(), and CVect3< T >::Y().

◆ GetNodeSize()

float CPhyloNodeData::GetNodeSize ( ) const
inline

Definition at line 264 of file phylo_tree_node.hpp.

References m_Size.

Referenced by GetDefaultNodeSize().

◆ GetNodeWidthScaler()

float CPhyloNodeData::GetNodeWidthScaler ( const CPhyloTreeScheme scheme) const

◆ GetNumClusters()

size_t CPhyloNodeData::GetNumClusters ( ) const

Return total # of applicable clusters - selection + m_ClusterID.

Definition at line 628 of file phylo_tree_node.cpp.

References HasSelClusters(), m_ClusterID, m_ExtendedParms, and SExtendedNodeParms::m_SelClusters.

◆ GetNumLeaves()

int CPhyloNodeData::GetNumLeaves ( ) const
inline

Definition at line 161 of file phylo_tree_node.hpp.

References m_NumLeaves.

Referenced by GetDefaultNodeSize(), and CPhyloTreeLabel::x_GenerateAutoLabel().

◆ GetNumLeavesEx()

int CPhyloNodeData::GetNumLeavesEx ( ) const
inline

◆ GetPamlCounter()

int CPhyloNodeData::GetPamlCounter ( ) const
inline

Definition at line 178 of file phylo_tree_node.hpp.

References m_PamlCounter.

◆ GetPrimaryCluster()

int CPhyloNodeData::GetPrimaryCluster ( ) const

With selection clusters a node may have multiple cluster ids.

Return highest-priority cluster (first selection cluster, if present, m_ClusterID otherwise)

Definition at line 616 of file phylo_tree_node.cpp.

References HasSelClusters(), m_ClusterID, m_ExtendedParms, and SExtendedNodeParms::m_SelClusters.

◆ GetRotatedTextBox()

CVect4< CVect2< float > > CPhyloNodeData::GetRotatedTextBox ( const CVect3< float > &  scale,
float &  angle,
float  orig_angle = 0.0f 
) const

Return text box (m_LabelRect) rotated to align with radial edges.

Definition at line 942 of file phylo_tree_node.cpp.

References GetLabelRect(), GetNodeOverhang(), GetScaledAngle(), m_Angle, r(), result, CVect2< T >::Set(), CVect2< T >::X(), CVect3< T >::X(), X(), CGlPoint< T >::X(), CVect2< T >::Y(), CVect3< T >::Y(), Y(), and CGlPoint< T >::Y().

Referenced by GetLabelRect(), and RenderRotated().

◆ GetRotatedTextPos()

CVect2< float > CPhyloNodeData::GetRotatedTextPos ( const CVect3< float > &  scale,
float &  angle 
) const

Return the text starting point rotated to align with radial edges.

Definition at line 977 of file phylo_tree_node.cpp.

References GetLabelRect(), GetScaledAngle(), m_Angle, r(), result, CVect2< T >::X(), CVect3< T >::X(), X(), CVect2< T >::Y(), CVect3< T >::Y(), and Y().

◆ GetScaledAngle()

float CPhyloNodeData::GetScaledAngle ( const CVect3< float > &  scale,
float  a,
bool  for_label = true 
) const

Utility to get screen rotation angle after scaling.

Definition at line 666 of file phylo_tree_node.cpp.

References a, CVect3< T >::X(), and CVect3< T >::Y().

Referenced by GetNodePosEx(), GetRotatedTextBox(), and GetRotatedTextPos().

◆ GetSelClusters()

CPhyloNodeData::TSelClusterIDs & CPhyloNodeData::GetSelClusters ( )

◆ GetSelectedState()

TSelectedState CPhyloNodeData::GetSelectedState ( ) const
inline

Definition at line 216 of file phylo_tree_node.hpp.

References m_Selected.

◆ GetSeqID()

const CRef<objects::CSeq_id>& CPhyloNodeData::GetSeqID ( ) const
inline

Definition at line 153 of file phylo_tree_node.hpp.

References m_SeqID.

◆ GetSubtreeBoundary()

CSubtreeBoundary * CPhyloNodeData::GetSubtreeBoundary ( )

Gets current boundary or creates a new one if m_Boundary is NULL.

Definition at line 330 of file phylo_tree_node.cpp.

References SExtendedNodeParms::m_Boundary, m_ExtendedParms, NULL, and x_HasExtendedParms().

Referenced by InitFeatures().

◆ GetTextDisplayColor()

CRgbaColor CPhyloNodeData::GetTextDisplayColor ( ) const
inline

Definition at line 387 of file phylo_tree_node.hpp.

References m_FgColor.

◆ GetTextOut()

CVect2< float > CPhyloNodeData::GetTextOut ( CGlPane pane,
const CGlTextureFont font,
const CVect3< float > &  scale,
bool  truncate_labels,
string text_out 
)

◆ GetVisible()

bool CPhyloNodeData::GetVisible ( void  ) const
inline

Definition at line 367 of file phylo_tree_node.hpp.

References m_Visible.

◆ HasNodeMarker()

bool CPhyloNodeData::HasNodeMarker ( ) const

◆ HasSelClusters()

bool CPhyloNodeData::HasSelClusters ( ) const

◆ IDX() [1/2]

TIndex& CPhyloNodeData::IDX ( )
inline

Definition at line 213 of file phylo_tree_node.hpp.

References m_IDX.

Referenced by NodeIdxSort::operator()(), and CPhyloTreeLabel::x_GenerateAutoLabel().

◆ IDX() [2/2]

const TIndex& CPhyloNodeData::IDX ( ) const
inline

Definition at line 214 of file phylo_tree_node.hpp.

References m_IDX.

◆ Init()

void CPhyloNodeData::Init ( const CBioTreeFeatureDictionary dict,
CRgbaGradColorTable t 
)

◆ InitFeatures()

void CPhyloNodeData::InitFeatures ( const CBioTreeFeatureDictionary dict,
CRgbaGradColorTable t 
)

◆ operator=()

CPhyloNodeData & CPhyloNodeData::operator= ( const CPhyloNodeData rhs)

◆ PointInTextBox()

bool CPhyloNodeData::PointInTextBox ( const CVect2< float > &  scale,
CVect2< float >  pt,
bool  rotated = false 
)

Return true if pt is inside of this nodes text box.

Definition at line 1081 of file phylo_tree_node.cpp.

References a, GetLabelRect(), m_DrawAngle, r(), CVect2< T >::X(), X(), CVect2< T >::Y(), and Y().

◆ RemoveFeature()

void CPhyloNodeData::RemoveFeature ( CBioTreeFeatureDictionary dict,
const string name 
)

◆ Render()

void CPhyloNodeData::Render ( const CGlPane pane,
const CGlTextureFont font,
CRgbaGradColorTable color_table,
const CVect3< float > &  scale,
bool  truncate_labels,
TModelUnit  max_len = -1.0f 
)

◆ RenderRotated()

void CPhyloNodeData::RenderRotated ( const CGlPane pane,
const CGlTextureFont font,
CRgbaGradColorTable color_table,
const CVect3< float > &  scale,
float  orig_angle,
bool  truncate_labels 
)

◆ Set()

void CPhyloNodeData::Set ( TID  x_id,
TDistance  x_dist,
const TLabel x_label 
)
inline

Definition at line 196 of file phylo_tree_node.hpp.

References m_Distance, m_ID, and m_Label.

Referenced by CPhyloTreeNode::CPhyloTreeNode().

◆ SetAlreadyDrawn()

void CPhyloNodeData::SetAlreadyDrawn ( bool  b)
inline

Flag set after each drawing and cleared when rendering frame done.

Definition at line 390 of file phylo_tree_node.hpp.

References b, and m_AlreadyDrawn.

Referenced by IPhyloTreeRender::x_RenderNodeVbo().

◆ SetAngle()

void CPhyloNodeData::SetAngle ( float  angle)
inline

Definition at line 268 of file phylo_tree_node.hpp.

References m_Angle.

Referenced by CCalcSlantedTree::operator()().

◆ SetBioTreeFeatureList()

void CPhyloNodeData::SetBioTreeFeatureList ( const CBioTreeFeatureList btcfl)

Definition at line 611 of file phylo_tree_node.cpp.

References m_Features.

◆ SetClusterColorIdx()

void CPhyloNodeData::SetClusterColorIdx ( short  idx)
inline

Definition at line 235 of file phylo_tree_node.hpp.

References m_ClusterColorIdx.

◆ SetClusterID()

void CPhyloNodeData::SetClusterID ( TClusterID  x_id)
inline

Definition at line 176 of file phylo_tree_node.hpp.

References m_ClusterID.

Referenced by InitFeatures().

◆ SetColoration()

void CPhyloNodeData::SetColoration ( CPhyloTreeScheme::TPhyloTreeColors  ct)
inline

Definition at line 220 of file phylo_tree_node.hpp.

References m_ColorType.

◆ SetDisplayChildren()

void CPhyloNodeData::SetDisplayChildren ( TDisplayChildren  show)
inline

Definition at line 223 of file phylo_tree_node.hpp.

References eShowChildren, and m_Children.

Referenced by CPhyloTreeNode::ExpandCollapse(), and InitFeatures().

◆ SetDisplayLabel()

void CPhyloNodeData::SetDisplayLabel ( const string t)
inline

set/get label text

Definition at line 370 of file phylo_tree_node.hpp.

References m_Text, and t.

◆ SetDistance()

void CPhyloNodeData::SetDistance ( TDistance  x_dist)
inline

◆ SetDistanceFromRoot()

void CPhyloNodeData::SetDistanceFromRoot ( TDistance  x_dist)
inline

Definition at line 188 of file phylo_tree_node.hpp.

References m_DistanceFromRoot.

◆ SetDrawAngle()

void CPhyloNodeData::SetDrawAngle ( float  angle)
inline

Definition at line 271 of file phylo_tree_node.hpp.

References m_DrawAngle.

Referenced by Render(), and RenderRotated().

◆ SetEdgeColorGradient()

void CPhyloNodeData::SetEdgeColorGradient ( bool  g)
inline

Enable or disable gradient coloring of edges between nodes.

Definition at line 378 of file phylo_tree_node.hpp.

References g(), and m_EdgeColorGradient.

◆ SetEdgeScore()

void CPhyloNodeData::SetEdgeScore ( float  s)
inline

Definition at line 274 of file phylo_tree_node.hpp.

References m_EdgeScore.

◆ SetFeature()

void CPhyloNodeData::SetFeature ( CBioTreeFeatureDictionary dict,
const string name,
const string value 
)

◆ SetId()

void CPhyloNodeData::SetId ( TID  x_id)

Definition at line 640 of file phylo_tree_node.cpp.

References m_ID.

Referenced by CPhyloTreeDataSource::Remove(), and IPhyloTreeFilter::x_OnStep().

◆ SetLabel()

void CPhyloNodeData::SetLabel ( const TLabel x_label)
inline

Definition at line 193 of file phylo_tree_node.hpp.

References m_Label.

Referenced by CPhyloTreeNode::SetLabel().

◆ SetLabelBgColorIdx()

void CPhyloNodeData::SetLabelBgColorIdx ( short  idx)
inline

Definition at line 237 of file phylo_tree_node.hpp.

References m_LabelBgColorIdx.

Referenced by InitFeatures().

◆ SetLabelColorIdx()

void CPhyloNodeData::SetLabelColorIdx ( short  idx)
inline

Definition at line 236 of file phylo_tree_node.hpp.

References m_LabelFgColorIdx.

Referenced by InitFeatures().

◆ SetLabelRect()

void CPhyloNodeData::SetLabelRect ( const CGlRect< float > &  r)
inline

Definition at line 239 of file phylo_tree_node.hpp.

References m_LabelRect, and r().

◆ SetMarkerColors()

void CPhyloNodeData::SetMarkerColors ( const string str)

◆ SetMarkerSize()

void CPhyloNodeData::SetMarkerSize ( float  f)

◆ SetMaxChildDistance()

void CPhyloNodeData::SetMaxChildDistance ( TDistance  x_dist)
inline

Definition at line 191 of file phylo_tree_node.hpp.

References m_MaxChildDistance.

◆ SetNodeDisplayColor()

void CPhyloNodeData::SetNodeDisplayColor ( const CRgbaColor c)
inline

Set/get node color.

Definition at line 382 of file phylo_tree_node.hpp.

References m_NodeColor.

Referenced by IPhyloTreeRender::x_RenderNodeVbo().

◆ SetNodeDisplaySize()

void CPhyloNodeData::SetNodeDisplaySize ( float  s)
inline

set/get node size (this is the result of GetDefaultNodeSize())

Definition at line 374 of file phylo_tree_node.hpp.

References m_NodeSize.

Referenced by IPhyloTreeRender::x_RenderNodeVbo().

◆ SetNodeEdgeColorIdx()

void CPhyloNodeData::SetNodeEdgeColorIdx ( short  idx)
inline

Definition at line 234 of file phylo_tree_node.hpp.

References m_NodeEdColorIdx.

Referenced by InitFeatures().

◆ SetNodeFgColorIdx()

void CPhyloNodeData::SetNodeFgColorIdx ( short  idx)
inline

Definition at line 233 of file phylo_tree_node.hpp.

References m_NodeFgColorIdx.

Referenced by InitFeatures().

◆ SetNodeOffset()

void CPhyloNodeData::SetNodeOffset ( const CVect2< float > &  o)
inline

◆ SetNodePixelOffset()

void CPhyloNodeData::SetNodePixelOffset ( const CVect2< float > &  o)
inline

Definition at line 245 of file phylo_tree_node.hpp.

References m_NodePixelOffset.

◆ SetNodeSize()

void CPhyloNodeData::SetNodeSize ( float  x_sz)
inline

Definition at line 265 of file phylo_tree_node.hpp.

References m_Size.

Referenced by InitFeatures().

◆ SetNumLeaves()

void CPhyloNodeData::SetNumLeaves ( int  x_ln)
inline

Definition at line 162 of file phylo_tree_node.hpp.

References m_NumLeaves.

◆ SetNumLeavesEx()

void CPhyloNodeData::SetNumLeavesEx ( int  x_ln)
inline

Definition at line 165 of file phylo_tree_node.hpp.

References m_NumLeavesEx.

◆ SetPamlCounter()

void CPhyloNodeData::SetPamlCounter ( int  x_ctr)
inline

Definition at line 179 of file phylo_tree_node.hpp.

References m_PamlCounter.

◆ SetSelClusters()

void CPhyloNodeData::SetSelClusters ( const TSelClusterIDs sc)

◆ SetSelectedState()

void CPhyloNodeData::SetSelectedState ( TSelectedState  x_state)
inline

Definition at line 217 of file phylo_tree_node.hpp.

References m_Selected.

◆ SetSeqID()

void CPhyloNodeData::SetSeqID ( objects::CSeq_id *  sid)
inline

Definition at line 154 of file phylo_tree_node.hpp.

References m_SeqID, and CRef< C, Locker >::Reset().

Referenced by Init().

◆ SetTextDisplayColor()

void CPhyloNodeData::SetTextDisplayColor ( const CRgbaColor c)
inline

Set/get text color.

Definition at line 386 of file phylo_tree_node.hpp.

References m_FgColor.

Referenced by IPhyloTreeRender::x_RenderNodeVbo().

◆ SetVisible()

void CPhyloNodeData::SetVisible ( bool  b)

Flag to renderer to determine whether to draw label.

Definition at line 1178 of file phylo_tree_node.cpp.

References b, and m_Visible.

Referenced by IPhyloTreeRender::x_RenderNodeVbo().

◆ Sync()

void CPhyloNodeData::Sync ( CBioTreeFeatureDictionary dict)

◆ X() [1/2]

float& CPhyloNodeData::X ( void  )
inline

◆ X() [2/2]

float CPhyloNodeData::X ( void  ) const
inline

Definition at line 210 of file phylo_tree_node.hpp.

References m_XY, and CVect2< T >::X().

◆ x_GetParameter()

string CPhyloNodeData::x_GetParameter ( const string features,
const string parm 
)
protected

Definition at line 645 of file phylo_tree_node.cpp.

References NStr::ToLower().

Referenced by SetMarkerColors().

◆ x_HasExtendedParms()

bool CPhyloNodeData::x_HasExtendedParms ( ) const
inlineprotected

◆ XY() [1/2]

TPoint& CPhyloNodeData::XY ( )
inline

Definition at line 205 of file phylo_tree_node.hpp.

References m_XY.

Referenced by CPhyloTreeWidget::RedrawDataSource(), and CPhyloTreeWidget::SendEditEvent().

◆ XY() [2/2]

TPoint CPhyloNodeData::XY ( ) const
inline

Definition at line 209 of file phylo_tree_node.hpp.

References m_XY.

◆ Y() [1/2]

float& CPhyloNodeData::Y ( void  )
inline

◆ Y() [2/2]

float CPhyloNodeData::Y ( void  ) const
inline

Definition at line 211 of file phylo_tree_node.hpp.

References m_XY, and CVect2< T >::Y().

Member Data Documentation

◆ m_AlreadyDrawn

bool CPhyloNodeData::m_AlreadyDrawn
protected

Text is alpha-blended so we add a flag to prevent drawing multiple times.

Definition at line 486 of file phylo_tree_node.hpp.

Referenced by GetAlreadyDrawn(), Render(), RenderRotated(), and SetAlreadyDrawn().

◆ m_Angle

float CPhyloNodeData::m_Angle
protected

◆ m_Children

bool CPhyloNodeData::m_Children
protected

expand-collapse state (expanded==true)

Definition at line 482 of file phylo_tree_node.hpp.

Referenced by GetDisplayChildren(), operator=(), and SetDisplayChildren().

◆ m_ClusterColorIdx

short CPhyloNodeData::m_ClusterColorIdx
protected

Definition at line 472 of file phylo_tree_node.hpp.

Referenced by GetClusterColorIdx(), operator=(), and SetClusterColorIdx().

◆ m_ClusterID

TClusterID CPhyloNodeData::m_ClusterID
protected

◆ m_ColorType

CPhyloTreeScheme::TPhyloTreeColors CPhyloNodeData::m_ColorType
protected

Definition at line 442 of file phylo_tree_node.hpp.

Referenced by GetColoration(), operator=(), and SetColoration().

◆ m_Distance

TDistance CPhyloNodeData::m_Distance
protected

Definition at line 413 of file phylo_tree_node.hpp.

Referenced by GetDistance(), operator=(), Set(), and SetDistance().

◆ m_DistanceFromRoot

TDistance CPhyloNodeData::m_DistanceFromRoot
protected

Definition at line 415 of file phylo_tree_node.hpp.

Referenced by GetDistanceFromRoot(), operator=(), and SetDistanceFromRoot().

◆ m_DrawAngle

float CPhyloNodeData::m_DrawAngle
protected

Definition at line 426 of file phylo_tree_node.hpp.

Referenced by GetDrawAngle(), operator=(), PointInTextBox(), and SetDrawAngle().

◆ m_EdgeColorGradient

bool CPhyloNodeData::m_EdgeColorGradient
protected

Controls use of gradient coloring for edges - if false, edges will be a single color, if true the edge will transition from child to parent color.

Definition at line 480 of file phylo_tree_node.hpp.

Referenced by GetEdgeColorGradient(), InitFeatures(), operator=(), and SetEdgeColorGradient().

◆ m_EdgeScore

float CPhyloNodeData::m_EdgeScore
protected

Definition at line 430 of file phylo_tree_node.hpp.

Referenced by GetEdgeScore(), and SetEdgeScore().

◆ m_ExtendedParms

SExtendedNodeParms* CPhyloNodeData::m_ExtendedParms
protected

◆ m_Features

CBioTreeFeatureList CPhyloNodeData::m_Features
protected

◆ m_FgColor

CRgbaColor CPhyloNodeData::m_FgColor
protected

Current text color.

Definition at line 450 of file phylo_tree_node.hpp.

Referenced by GetTextDisplayColor(), operator=(), Render(), RenderRotated(), and SetTextDisplayColor().

◆ m_ID

TID CPhyloNodeData::m_ID
protected

Definition at line 411 of file phylo_tree_node.hpp.

Referenced by GetId(), operator=(), Set(), and SetId().

◆ m_IDX

TIndex CPhyloNodeData::m_IDX
protected

Definition at line 421 of file phylo_tree_node.hpp.

Referenced by IDX(), and operator=().

◆ m_Label

TLabel CPhyloNodeData::m_Label
protected

Full label.

Definition at line 453 of file phylo_tree_node.hpp.

Referenced by GetLabel(), operator=(), Set(), and SetLabel().

◆ m_LabelBgColorIdx

short CPhyloNodeData::m_LabelBgColorIdx
protected

◆ m_LabelFgColorIdx

short CPhyloNodeData::m_LabelFgColorIdx
protected

Label color.

Definition at line 475 of file phylo_tree_node.hpp.

Referenced by GetLabelFgColorIdx(), operator=(), and SetLabelColorIdx().

◆ m_LabelRect

CGlRect<float> CPhyloNodeData::m_LabelRect
protected

Definition at line 433 of file phylo_tree_node.hpp.

Referenced by GetLabelRect(), GetNodeOverhang(), operator=(), and SetLabelRect().

◆ m_MaxChildDistance

TDistance CPhyloNodeData::m_MaxChildDistance
protected

◆ m_NodeColor

CRgbaColor CPhyloNodeData::m_NodeColor
protected

Current node color.

Definition at line 448 of file phylo_tree_node.hpp.

Referenced by GetNodeDisplayColor(), operator=(), and SetNodeDisplayColor().

◆ m_NodeEdColorIdx

short CPhyloNodeData::m_NodeEdColorIdx
protected

Node colors defined by scheme.

Definition at line 468 of file phylo_tree_node.hpp.

Referenced by GetNodeEdColorIdx(), operator=(), and SetNodeEdgeColorIdx().

◆ m_NodeFgColorIdx

short CPhyloNodeData::m_NodeFgColorIdx
protected

Definition at line 469 of file phylo_tree_node.hpp.

Referenced by GetNodeFgColorIdx(), operator=(), and SetNodeFgColorIdx().

◆ m_NodeOffset

CVect2<float> CPhyloNodeData::m_NodeOffset
protected

◆ m_NodePixelOffset

CVect2<float> CPhyloNodeData::m_NodePixelOffset
protected

Pixel offset to apply the node.

Definition at line 438 of file phylo_tree_node.hpp.

Referenced by GetNodeOverhang(), GetNodePixelOffset(), operator=(), and SetNodePixelOffset().

◆ m_NodeSize

float CPhyloNodeData::m_NodeSize
protected

Scaled node size.

Definition at line 461 of file phylo_tree_node.hpp.

Referenced by GetBoundingRect(), GetNodeDisplaySize(), and SetNodeDisplaySize().

◆ m_NodeWidth

float CPhyloNodeData::m_NodeWidth
mutableprotected

This is computed by GetNodeWidthScaler(..) for collapsed nodes and we need to hang onto it for node label positioning.

Definition at line 465 of file phylo_tree_node.hpp.

Referenced by GetNodeOverhang(), GetNodeWidthScaler(), and operator=().

◆ m_NumLeaves

int CPhyloNodeData::m_NumLeaves
protected

Definition at line 401 of file phylo_tree_node.hpp.

Referenced by GetNumLeaves(), operator=(), and SetNumLeaves().

◆ m_NumLeavesEx

int CPhyloNodeData::m_NumLeavesEx
protected

Definition at line 403 of file phylo_tree_node.hpp.

Referenced by GetNumLeavesEx(), operator=(), and SetNumLeavesEx().

◆ m_PamlCounter

int CPhyloNodeData::m_PamlCounter
protected

Definition at line 406 of file phylo_tree_node.hpp.

Referenced by GetPamlCounter(), operator=(), and SetPamlCounter().

◆ m_Selected

TSelectedState CPhyloNodeData::m_Selected
protected

Definition at line 441 of file phylo_tree_node.hpp.

Referenced by GetSelectedState(), operator=(), and SetSelectedState().

◆ m_SeqID

CRef<objects::CSeq_id> CPhyloNodeData::m_SeqID
protected

Definition at line 397 of file phylo_tree_node.hpp.

Referenced by GetSeqID(), operator=(), and SetSeqID().

◆ m_Size

float CPhyloNodeData::m_Size
protected

Definition at line 458 of file phylo_tree_node.hpp.

Referenced by GetNodeSize(), operator=(), and SetNodeSize().

◆ m_Text

string CPhyloNodeData::m_Text
protected

Text to render.

Definition at line 455 of file phylo_tree_node.hpp.

Referenced by GetDisplayLabel(), GetTextOut(), Render(), RenderRotated(), and SetDisplayLabel().

◆ m_Visible

bool CPhyloNodeData::m_Visible
protected

True if node is visible.

Definition at line 484 of file phylo_tree_node.hpp.

Referenced by GetVisible(), Render(), RenderRotated(), and SetVisible().

◆ m_XY

TPoint CPhyloNodeData::m_XY
protected

Definition at line 420 of file phylo_tree_node.hpp.

Referenced by GetNodePosEx(), operator=(), X(), XY(), and Y().

◆ TNoColor

const CPhyloNodeData::TColor CPhyloNodeData::TNoColor = ""
static

Definition at line 112 of file phylo_tree_node.hpp.


The documentation for this class was generated from the following files:
Modified on Thu May 23 12:32:37 2024 by modify_doxy.py rev. 669887