NCBI C++ ToolKit
phylo_tree_node.hpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 #ifndef GUI_WIDGETS_PHY_TREE___PHYLO_TREE_NODE__HPP
2 #define GUI_WIDGETS_PHY_TREE___PHYLO_TREE_NODE__HPP
3 
4 /* $Id: phylo_tree_node.hpp 32608 2015-03-31 20:04:19Z falkrb $
5  * ===========================================================================
6  *
7  * PUBLIC DOMAIN NOTICE
8  * National Center for Biotechnology Information
9  *
10  * This software/database is a "United States Government Work" under the
11  * terms of the United States Copyright Act. It was written as part of
12  * the author's official duties as a United States Government employee and
13  * thus cannot be copyrighted. This software/database is freely available
14  * to the public for use. The National Library of Medicine and the U.S.
15  * Government have not placed any restriction on its use or reproduction.
16  *
17  * Although all reasonable efforts have been taken to ensure the accuracy
18  * and reliability of the software and data, the NLM and the U.S.
19  * Government do not and cannot warrant the performance or results that
20  * may be obtained by using this software or data. The NLM and the U.S.
21  * Government disclaim all warranties, express or implied, including
22  * warranties of performance, merchantability or fitness for any particular
23  * purpose.
24  *
25  * Please cite the author in any work or product based on this material.
26  *
27  * ===========================================================================
28  *
29  * Authors: Bob Falk
30  *
31  * File Description:
32  *
33  */
34 
35 #include <corelib/ncbistl.hpp>
36 #include <corelib/ncbistd.hpp>
37 #include <corelib/ncbiobj.hpp>
38 #include <corelib/ncbi_tree.hpp>
41 #include <gui/utils/rgba_color.hpp>
42 #include <gui/utils/vect2.hpp>
43 #include <gui/utils/vect3.hpp>
44 #include <gui/opengl/glrect.hpp>
45 #include <gui/opengl/glpane.hpp>
47 
48 #define TEXTURED_COLORS
49 
50 
52 
53 class CSubtreeBoundary;
54 class CTreeGraphicsModel;
55 class CGlTextureFont;
57 
59 public:
60  typedef int TID;
61  typedef string TLabel;
62  typedef float TDistance;
63  typedef int TClusterID;
64  typedef vector<int> TSelClusterIDs;
66 
67  typedef enum {
68  eNotSelected, // node is not selected
69  eSelected, // node is selected (descending)
70  eTraced, // node is traced (up to root)
71  eShared // node is on path between selected nodes
72  } TSelectedState;
73 
74  typedef enum {
75  eShowChildren, // node expanded
76  eHideChildren // node collapsed
77  } TDisplayChildren;
78 
79  typedef enum {
81  eDirty
82  } TDirtyState;
83 
84  typedef enum {
86  eBounded
87  } TBoundingState;
88 
90  typedef pair<int,int> TIndex;
91  typedef string TColor;
92 
93  static const TColor TNoColor;
94 
95 public:
97  : m_NmbChilds(0)
98  , m_NmbLeafs(0)
99  , m_Counter(0)
100  , m_PamlCounter(0)
101  , m_NmbChildsEx(0)
102  , m_NmbLeafsEx(0)
103  , m_NmbNodes(0)
104  , m_ClusterID(-1)
105  , m_Label("")
106  , m_Distance(0)
107  , m_Angle(0.0f)
108  , m_Selected(CPhyloNodeData::eNotSelected)
109  , m_Children(CPhyloNodeData::eShowChildren)
110  , m_Dirty(CPhyloNodeData::eDirty)
111 #ifdef TEXTURED_COLORS
112  , m_NodeEdColorIdx(-1)
113  , m_NodeFgColorIdx(-1)
114  , m_ClusterFgColorIdx(-1)
115  , m_ClusterEdColorIdx(-1)
116  , m_LabelFgColorIdx(-1)
117  , m_LabelBgColorIdx(-1)
118 #else
119  , m_LabelFgColor("#FFFFFF")
120  , m_LabelBgColor("#6D95E0")
121 #endif
122  , m_Boundary(NULL)
123  , m_Size(-1)
124  , m_NodeColor(1.0f, 0.0f, 1.0f, 1.0f)
125  , m_NodeColorIdx(-1)
126  , m_FgColor(1.0f, 0.0f, 1.0f, 1.0f)
127  , m_FgColorIdx(-1)
128  , m_EdgeColorGradient(0.0f) {}
129 
130  CPhyloNodeData(const CPhyloNodeData& rhs);
131  ~CPhyloNodeData();
132  CPhyloNodeData& operator=(const CPhyloNodeData& rhs);
133 
134 #ifdef TEXTURED_COLORS
135  void Init(const CBioTreeFeatureDictionary& dict,
137 #else
138  void Init(const CBioTreeFeatureDictionary& dict);
139 #endif
140 
141  void Sync(CBioTreeFeatureDictionary& dict);
142 
143  const CRef<objects::CSeq_id>& GetSeqID() const { return m_SeqID; }
144  void SetSeqID(objects::CSeq_id* sid) { m_SeqID.Reset(sid); }
145 
146  CBioTreeFeatureList& GetBioTreeFeatureList();
147  const CBioTreeFeatureList& GetBioTreeFeatureList() const { return m_Features; }
148  void SetBioTreeFeatureList(const CBioTreeFeatureList & btcfl);
149 
150  // cache accessors
151  int GetLeavesNmb() const { return m_NmbLeafs; }
152  void SetLeavesNmb(int x_ln) { m_NmbLeafs = x_ln; }
153 
154  int GetLeavesNmbEx() const { return m_NmbLeafsEx; }
155  void SetLeavesNmbEx(int x_ln) { m_NmbLeafsEx = x_ln; }
156 
157  int GetChildsNmb() const { return m_NmbChilds; }
158  void SetChildsNmb(int x_ch) { m_NmbChilds = x_ch; }
159 
160  int GetNodesNmb() const { return m_NmbNodes; }
161  void SetNodesNmb(int x_ch) { m_NmbNodes = x_ch; }
162 
163  int GetChildsNmbEx() const { return m_NmbChildsEx; }
164  void SetChildsNmbEx(int x_ln) { m_NmbChildsEx = x_ln; }
165 
166  /// With selection clusters a node may have multiple cluster ids. Return
167  /// highest-priority cluster (first selection cluster, if present,
168  /// m_ClusterID otherwise)
169  int GetPrimaryCluster() const;
170 
171  /// Return total # of applicable clusters - selection + m_ClusterID
172  int GetNumClusters() const;
173 
174  TClusterID GetClusterID(void) const { return m_ClusterID; }
175  void SetClusterID(TClusterID x_id) { m_ClusterID = x_id; }
176 
177  TSelClusterIDs& GetSelClusters() { return m_SelClusters; }
178  void SetSelClusters(const TSelClusterIDs& sc) { m_SelClusters = sc; }
179 
180  int GetCounter() const { return m_Counter; }
181  void SetCounter(int x_ctr) { m_Counter = x_ctr; }
182 
183  int GetPamlCounter() const { return m_PamlCounter; }
184  void SetPamlCounter(int x_ctr) { m_PamlCounter = x_ctr;}
185 
186  TID GetId() const { return m_ID; }
187  void SetId(TID x_id);
188 
189  TDistance GetDistance() const { return fabs(m_Distance); }
190  const TLabel & GetLabel() const { return m_Label; }
191 
192  void SetDistance(TDistance x_dist) { m_Distance = x_dist; }
193  void SetLabel(const TLabel & x_label) { m_Label = x_label; }
194 
195  void Set(TID x_id, TDistance x_dist,
196  const TLabel & x_label)
197  {
198  m_ID = x_id;
199  m_Label = x_label;
200  m_Distance = x_dist;
201  }
202 
203 
204  TPoint& XY() { return m_XY; }
205  float& X() { return m_XY.X(); }
206  float& Y() { return m_XY.Y(); }
207 
208  TPoint XY() const { return m_XY; }
209  float X() const { return m_XY.X(); }
210  float Y() const { return m_XY.Y(); }
211 
212  TIndex& IDX() { return m_IDX; }
213 
214  TSelectedState GetSelectedState() const { return m_Selected; }
215  void SetSelectedState(TSelectedState x_state) { m_Selected = x_state; }
216 
217  TDisplayChildren GetDisplayChildren() const { return m_Children; }
218  void SetDisplayChildren(TDisplayChildren x_chds) { m_Children = x_chds; }
219 
220  TBoundingState GetBoundedDisplay() const { return m_Bounded; }
221  void SetBoundedDisplay(TBoundingState x_bound) { m_Bounded = x_bound; }
222 
223  // Is this used at all? Not in Genome workbench.
224  TDirtyState GetDirtyState() const { return m_Dirty; }
225  void SetDirtyState(TDirtyState x_dst) { m_Dirty = x_dst; }
226 
227 #ifdef TEXTURED_COLORS
228  short GetNodeEdColorIdx() const { return m_NodeEdColorIdx; }
229  short GetNodeFgColorIdx() const { return m_NodeFgColorIdx; }
230  short GetClusterEdColorIdx() const { return m_ClusterEdColorIdx; }
231  short GetClusterFgColorIdx() const { return m_ClusterFgColorIdx; }
232  short GetLabelFgColorIdx() const { return m_LabelFgColorIdx; }
233  short GetLabelBgColorIdx() { return m_LabelBgColorIdx; }
234 
235  void SetNodeFgColorIdx(short idx) { m_NodeFgColorIdx = idx; }
236  void SetNodeEdgeColorIdx(short idx) { m_NodeEdColorIdx = idx; }
237  void SetClusterFgColorIdx(short idx) { m_ClusterFgColorIdx = idx; }
238  void SetClusterEdgeColorIdx(short idx) { m_ClusterEdColorIdx = idx; }
239  void SetLabelColorIdx(short idx) { m_LabelFgColorIdx = idx; }
240  void SetLabelBgColorIdx(short idx) { m_LabelBgColorIdx = idx; }
241 #else
242  const TColor& GetNodeEdColor() { return m_NodeEdColor; }
243  const TColor& GetNodeFgColor() { return m_NodeFgColor; }
244 
245  const TColor& GetClusterEdColor() { return m_ClusterEdColor; }
246  const TColor& GetClusterFgColor() { return m_ClusterFgColor; }
247 
248  const TColor& GetLabelFgColor() { return m_LabelFgColor; }
249  const TColor& GetLabelBgColor() { return m_LabelBgColor; }
250 
251  void SetNodeColor(TColor x_fg, TColor x_edge = TNoColor)
252  {
253  m_NodeFgColor = x_fg;
254  m_NodeEdColor = x_edge;
255  }
256 
257  void SetClusterColor(TColor x_fg, TColor x_edge = TNoColor)
258  {
259  m_ClusterFgColor = x_fg;
260  m_ClusterEdColor = x_edge;
261  }
262 
263  void SetLabelColor(TColor x_fg, TColor x_bg = TNoColor)
264  {
265  m_LabelFgColor = x_fg;
266  m_LabelBgColor = x_bg;
267  }
268 #endif
269 
270  void SetLabelRect(const CGlRect<float>& r) {m_LabelRect = r; }
271  CGlRect<float> GetLabelRect() const { return m_LabelRect; }
272 
273  void SetMarkerColors(const string& str);
274  string GetMarkerColorsAsString();
275  vector<CRgbaColor>& GetMarkerColors() { return m_MarkerColors; }
276  float GetMarkerSize() const { return m_MarkerSize; }
277  void SetMarkerSize(float f) { m_MarkerSize = f; }
278 
279  /// Gets current boundary or creates a new one if m_Boundary is NULL
280  CSubtreeBoundary* GetSubtreeBoundary();
281  /// Deletes current boundary (if not NULL).
282  void DeleteSubtreeBoundary();
283 
284 
285 
286  int GetNodeSize() const { return m_Size; }
287  void SetNodeSize(int x_sz) { m_Size = x_sz; }
288 
289  float GetAngle(void) const { return m_Angle; }
290  void SetAngle(float angle) { m_Angle = angle; }
291 
292  void SetFeature(CBioTreeFeatureDictionary& dict,
293  const string & name, const string & value);
294  void RemoveFeature(CBioTreeFeatureDictionary& dict, const string & name);
295 
296  // init excluding seq-id
297 #ifdef TEXTURED_COLORS
298  void InitFeatures(const CBioTreeFeatureDictionary& dict,
300 #else
301  void InitFeatures(const CBioTreeFeatureDictionary& dict);
302 #endif
303 
304  /// Draw the label using scale to compute its offset from m_BasePos
305  void Render(CGlPane& pane,
306  const CGlTextureFont& font,
307  CRgbaGradColorTable* color_table,
308  const CVect3<float>& scale,
309  bool truncate_labels);
310 
311  /// Draw the label and rotate it to match m_Angle (radial text)
312  /// This form does not support label truncation
313  void RenderRotated(CGlPane& pane,
314  const CGlTextureFont& font,
315  CRgbaGradColorTable* color_table,
316  const CVect3<float>& scale);
317 
318  /// Return the drawing position and (possibly truncated) text
319  CVect2<float> GetTextOut(CGlPane& pane,
320  const CGlTextureFont& font,
321  const CVect3<float>& scale,
322  bool truncate_labels,
323  string& text_out);
324 
325  /// Find the rectangle for the label given the current zoom level (scale)
326  void GetLabelRect(const CVect2<float>& scale,
327  CVect2<float>& lower_left,
328  CVect2<float>& upper_right,
329  bool rotated=false);
330 
331  /// Return true if pt is inside of this nodes text box
332  bool PointInTextBox(const CVect2<float>& scale,
333  CVect2<float> pt,
334  bool rotated=false);
335 
336  /// Find the rectangle for the label in pixel coordinates, taking rotation into account
337  CGlRect<float> GetLabelRect(const CVect2<float>& scale, bool rotated);
338 
339  /// Find the rectangle for the node and label combined given the
340  /// current zoom level (scale)
341  void GetBoundingRect(const CVect2<float>& scale,
342  CVect2<float>& lower_left,
343  CVect2<float>& upper_right,
344  bool rotated=false);
345 
346  /// Return text box (m_LabelRect) rotated to align with radial edges
347  CVect4<CVect2<float> > GetRotatedTextBox(const CVect3<float>& scale,
348  float& angle) const;
349 
350  /// Return the text starting point rotated to align with radial edges
351  CVect2<float> GetRotatedTextPos(const CVect3<float>& scale,
352  float& angle) const;
353 
354  /// Return labels minimal X coordinate
355  float GetMinX(const CVect2<float>& scale);
356 
357  /// Flag to renderer to determine whether to draw label
358  void SetVisible(bool b);
359  bool GetVisible() const { return m_Visible; }
360 
361  /// set/get label text
362  void SetDisplayLabel(const string& t) { m_Text = t; }
363  const string& GetDisplayLabel() const { return m_Text; }
364 
365  /// set/get node size
366  void SetNodeDisplaySize(float s) { m_NodeSize = s; }
367  const float GetNodeDisplaySize() const { return m_NodeSize; }
368 
369  /// Enable (1) or disable (0) gradient coloring of edges between nodes
370  void SetEdgeColorGradient(float g) { m_EdgeColorGradient = g; }
371  float GetEdgeColorGradient() const { return m_EdgeColorGradient; }
372 
373  /// Set/get node color
374  void SetNodeDisplayColor(const CRgbaColor& c) { m_NodeColor = c; }
375  CRgbaColor GetNodeDisplayColor() const { return m_NodeColor; }
376  void SetNodeDisplayColorIdx(short c) { m_NodeColorIdx = c; }
377  short GetNodeDisplayColorIdx() const { return m_NodeColorIdx; }
378 
379  /// Set/get text color
380  void SetTextDisplayColor(const CRgbaColor& c) { m_FgColor = c; }
381  CRgbaColor GetTextDisplayColor() const { return m_FgColor; }
382  void SetTextDisplayColorIdx(short c) { m_FgColorIdx = c; }
383  short GetTextDisplayColorIdx() const { return m_FgColorIdx; }
384 
385  /// Flag set after each drawing and cleared when rendering frame done
386  void SetAlreadyDrawn(bool b) { m_AlreadyDrawn = b; }
387  bool GetAlreadyDrawn() const { return m_AlreadyDrawn; }
388 
389 protected:
390  string x_GetParameter(const string& features, const string& parm);
391 
394 
395  // cached values
398 
399  // counter, for labeling
400  // it's not an ID and will be overwritten by algorithm
402 
403  // Paml-style counter, leaf-skipping
405 
406  // tweaked for close/open
409 
410  // number of all internal nodes
412 
413  // cluster ID
414  TClusterID m_ClusterID;
415 
416  // selection clusters
417  vector<int> m_SelClusters;
418 
419  TID m_ID;
420  TLabel m_Label;
421  TDistance m_Distance;
422 
423  // location / coordinates
424  TPoint m_XY;
425  TIndex m_IDX;
426  float m_Angle;
427 
428  // Pixel coordinates of label relative to node position
430 
431  // states
436 
437 #ifdef TEXTURED_COLORS
438  /// Node colors defined by scheme
441 
442  // Node colors, if cluster present
445 
446  /// Label color
449 #else
450  // node colors, defined by scheme
451  TColor m_NodeEdColor;
452  TColor m_NodeFgColor;
453 
454  // node colors, if cluster present
455  TColor m_ClusterEdColor;
456  TColor m_ClusterFgColor;
457 
458  // label color
459  TColor m_LabelFgColor;
460  TColor m_LabelBgColor;
461 #endif
462 
463  // marker colors (0 or 1 at a leaf, 0..n otherwise)
464  vector<CRgbaColor> m_MarkerColors;
465  // marker size, as a multiple of node size
467 
468  // Boundary for subtree at this node (if m_Bounded is eBounded)
470 
471  // node size
472  int m_Size;
473 
476  /// Color of text to be drawn
479  /// Text to render
480  string m_Text;
481  /// Node scale factor
482  float m_NodeSize;
483  /// Controls use of gradient coloring for edges - if 0, edges will be a
484  /// single color, if 1 the edge will transition from child to parent color
486  /// True if node is visible
487  bool m_Visible;
488  /// Text is alpha-blended so we add a flag to prevent drawing multiple times
490 };
491 
492 
494 {
495 public:
496  /// ctor
497  CPhyloTreeNode();
498  /// Set Id (must be unique), dist to parent and label
499  CPhyloTreeNode(int x_id, double x_dist, const string& x_label);
500 
501  /// Return true the index 'idx' in the array is not currently part of the tree.
502  /// This can happen if a node is deleted, for example.
503  bool IsUnused() const { return GetValue().GetId() == CPhyloNodeData::TID(-1); }
504 
505  /// Return true if node is currently not collapsed
506  bool Expanded() const { return GetValue().GetDisplayChildren() == CPhyloNodeData::eShowChildren; }
507  /// Set this node to be expanded/collapsed
508  void ExpandCollapse(CBioTreeFeatureDictionary& dict,
510  /// Return true if node can have its expand/collapsed state changed to chds
511  bool CanExpandCollapse(CPhyloNodeData::TDisplayChildren chds);
512  /// Set label string and synch value to the feature list for this ndoe
513  void SetLabel(CBioTreeFeatureDictionary& dict,
514  const string & label);
515 
516  /// Return the number of immediate children of this node
517  int NumChildren() const { return m_ChildNodes.size(); }
518 
519  /// Return true if node is a leaf or is collapsed
520  bool IsLeafEx() { return (m_ChildNodes.empty() || (!Expanded())); }
521 
522  /// Return the child nodes only if visible
523  TNodeList_I SubNodeBeginEx() { return Expanded() ? m_ChildNodes.begin() : m_ChildNodes.end(); }
524  TNodeList_I SubNodeEndEx() { return m_ChildNodes.end(); }
525 };
526 
528 
529 #endif //GUI_WIDGETS_PHY_TREE___PHYLO_TREE_NODE__HPP
void SetDirtyState(TDirtyState x_dst)
void SetLabelColorIdx(short idx)
string m_Text
Text to render.
float GetEdgeColorGradient() const
void SetClusterID(TClusterID x_id)
const string & GetDisplayLabel() const
CRgbaColor GetNodeDisplayColor() const
CRgbaColor m_NodeColor
CGlRect< float > m_LabelRect
TDirtyState GetDirtyState() const
float m_NodeSize
Node scale factor.
int GetChildsNmb() const
void SetLeavesNmbEx(int x_ln)
TSelectedState GetSelectedState() const
const TLabel & GetLabel() const
CVect2< float > TPoint
void SetNodeEdgeColorIdx(short idx)
TPoint XY() const
Features storage for the bio tree node.
Definition: bio_tree.hpp:94
int NumChildren() const
Return the number of immediate children of this node.
TDistance GetDistance() const
void SetPamlCounter(int x_ctr)
void Set(TID x_id, TDistance x_dist, const TLabel &x_label)
short GetClusterEdColorIdx() const
CRgbaGradColorTable Provides a storage for colors (to eliminate color creation overhead) and Function...
void SetClusterFgColorIdx(short idx)
The NCBI C++/STL use hints.
float Y() const
float m_EdgeColorGradient
Controls use of gradient coloring for edges - if 0, edges will be a single color, if 1 the edge will ...
void SetNodeDisplayColorIdx(short c)
short GetClusterFgColorIdx() const
CBioTreeFeatureList TNodeFeaturesType
Things for representing and manipulating bio trees.
void SetClusterEdgeColorIdx(short idx)
TBoundingState m_Bounded
short GetLabelFgColorIdx() const
void SetNodesNmb(int x_ch)
class CGlPane
Definition: glpane.hpp:61
#define NULL
Definition: ncbistd.hpp:225
static const TColor TNoColor
bool GetVisible() const
bool m_Visible
True if node is visible.
int GetChildsNmbEx() const
class CTreeGraphicsModel Model for rendering tree graphics data.
vector< int > m_SelClusters
TClusterID GetClusterID(void) const
void SetMarkerSize(float f)
CSubtreeBoundary –.
void SetCounter(int x_ctr)
bool IsUnused() const
Return true the index 'idx' in the array is not currently part of the tree.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:101
bool m_AlreadyDrawn
Text is alpha-blended so we add a flag to prevent drawing multiple times.
TID GetId() const
short GetTextDisplayColorIdx() const
CBioTreeFeatureList m_Features
TNodeList_I SubNodeEndEx()
void SetDisplayLabel(const string &t)
set/get label text
int GetNodesNmb() const
const float GetNodeDisplaySize() const
TBoundingState GetBoundedDisplay() const
double f(double x_, const double &y_)
Definition: njn_root.hpp:188
void SetLeavesNmb(int x_ln)
#define NCBI_GUIWIDGETS_PHYLO_TREE_EXPORT
Definition: gui_export.h:524
TNodeList_I SubNodeBeginEx()
Return the child nodes only if visible.
short m_LabelFgColorIdx
Label color.
short GetNodeEdColorIdx() const
int g(Seg_Gsm *spe, Seq_Mtf *psm, Thd_Gsm *tdg)
Definition: thrddgri.c:44
const CRef< objects::CSeq_id > & GetSeqID() const
void SetBoundedDisplay(TBoundingState x_bound)
bool Expanded() const
Return true if node is currently not collapsed.
short GetLabelBgColorIdx()
CRgbaColor m_FgColor
Color of text to be drawn.
bool IsLeafEx()
Return true if node is a leaf or is collapsed.
TData & GetValue()
Return the value object for the node.
Definition: tree_model.hpp:159
const CBioTreeFeatureList & GetBioTreeFeatureList() const
void SetSeqID(objects::CSeq_id *sid)
vector< CRgbaColor > m_MarkerColors
float GetAngle(void) const
int GetPamlCounter() const
char value[7]
Definition: config.c:428
void SetChildsNmb(int x_ch)
void SetEdgeColorGradient(float g)
Enable (1) or disable (0) gradient coloring of edges between nodes.
void SetDisplayChildren(TDisplayChildren x_chds)
short GetNodeFgColorIdx() const
TDisplayChildren GetDisplayChildren() const
#define TEXTURED_COLORS
bool GetAlreadyDrawn() const
Portable reference counted smart and weak pointers using CWeakRef, CRef, CObject and CObjectEx...
short GetNodeDisplayColorIdx() const
TDirtyState m_Dirty
void SetAlreadyDrawn(bool b)
Flag set after each drawing and cleared when rendering frame done.
Feature dictionary.
Definition: bio_tree.hpp:165
void SetLabel(const TLabel &x_label)
void SetNodeDisplayColor(const CRgbaColor &c)
Set/get node color.
static const char * str(char *buf, int n)
Definition: stats.c:84
pair< int, int > TIndex
void SetNodeFgColorIdx(short idx)
static void Init(void)
Definition: cursor6.c:79
vector< CRgbaColor > & GetMarkerColors()
int GetLeavesNmbEx() const
void SetSelClusters(const TSelClusterIDs &sc)
short m_NodeEdColorIdx
Node colors defined by scheme.
Base class for nodes in the tree.
Definition: tree_model.hpp:56
void SetDistance(TDistance x_dist)
void SetNodeDisplaySize(float s)
set/get node size
TSelectedState m_Selected
void SetTextDisplayColor(const CRgbaColor &c)
Set/get text color.
void SetLabelRect(const CGlRect< float > &r)
int GetLeavesNmb() const
TSelClusterIDs & GetSelClusters()
void SetNodeSize(int x_sz)
double r(size_t dimension_, const Int4 *score_, const double *prob_, double theta_)
void SetLabelBgColorIdx(short idx)
class CRgbaColor provides a simple abstraction for managing colors.
Definition: rgba_color.hpp:54
CSubtreeBoundary * m_Boundary
#define fabs(v)
Definition: ncbi_dispd.c:46
TNodeList::iterator TNodeList_I
Definition: tree_model.hpp:63
void SetChildsNmbEx(int x_ln)
vector< int > TSelClusterIDs
TClusterID m_ClusterID
void SetSelectedState(TSelectedState x_state)
CRef< objects::CSeq_id > m_SeqID
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:98
TDisplayChildren m_Children
int GetCounter() const
float X() const
void SetAngle(float angle)
int GetNodeSize() const
CRgbaColor GetTextDisplayColor() const
CGlRect< float > GetLabelRect() const
void SetTextDisplayColorIdx(short c)
float GetMarkerSize() const
Modified on Tue Jun 28 18:04:44 2016 by modify_doxy.py rev. 426318