pixel_offset.
X() = 0.0f;
47pixel_offset.
Y() = 0.0f;
59 boolbLeft = cosf((**node).GetAngle()) < 0.0f;
63pixel_offset.
X() = defNodeSize + 2.0f;
64pixel_offset.
Y() = -label_size.
Y() / 2.0f;
67pixel_offset.
X() = -(defNodeSize + 4.0f + label_size.
X());
68pixel_offset.
Y() = -label_size.
Y() / 2.0f;
80pixel_offset.
X() = 0.0f;
81pixel_offset.
Y() = 0.0f;
85 boolbLeft = cosf((**node).GetAngle()) < 0.0f;
89pixel_offset.
X() = defNodeSize + 2.0f;
90pixel_offset.
Y() = -label_size.
Y() / 2.0f;
93pixel_offset.
X() = -(defNodeSize + 4.0f + label_size.
X());
94pixel_offset.
Y() = -label_size.
Y() / 2.0f;
117ilabel = (*node).GetPamlCounter() + 1;
120 intibase =
static_cast<int>(
tree.GetNumNodes()-1 -
tree.GetRoot()->GetNumLeaves());
121ilabel = ibase + node.
GetValue().
IDX().second + 1;
138ilabel =
tree.GetRoot()->GetNumLeaves() + (*node).GetPamlCounter() + 1;
153 string result= (*node).GetLabel();
158 if(autoLabel.length()) {
188 if(!fmt.empty() && (
m_Format!=fmt)) {
204 stringready_label =
m_LabelFormat->FormatLabel((*node).GetBioTreeFeatureList());
212 const string&line_break)
214std::vector<std::string>
arr;
221 for(
unsigned int i=0;
i<
arr.size(); ++
i) {
222 if(
arr[
i].length() > 0) {
224 if(
arr[
i].substr(0, 6) ==
"label:")
227 if(
arr[
i].substr(0,16) ==
"$NODE_COLLAPSED:")
231std::string::size_type idx1 =
arr[
i].find_first_of(
":");
232 if(
arr[
i].length() > idx1+1) {
233std::string::size_type idx2 =
arr[
i].find_first_not_of(
' ', idx1+1);
234 if(idx2 != std::string::npos) {
235final_text +=
arr[
i];
236final_text += line_break;
264 returnvisibleDistance >= h;
CRef< CPhyloTreeScheme > m_SL
CVect2< float > GetNodeLabelOffset(const string &label, CPhyloTreeNode *node, IPhyloTreeLOD *lod, CVect2< float > &pixel_offset) const
Get label rectangle.
std::unique_ptr< CBioTreeFormatLabel > m_LabelFormat
bool IsVisible(IPhyloTreeLOD *lod) const
string GetToolTipForNode(const CPhyloTree &tree, const CPhyloTreeNode &node, const string &format, const string &line_break)
string GetLabel(const CPhyloTree &tree, const CPhyloTreeNode &node) const
string x_GenerateAutoLabel(const CPhyloTree &tree, const CPhyloTreeNode &node, CPhyloTreeScheme::TAutoLabels lbl) const
string GetLabelForNode(const CPhyloTree &tree, const CPhyloTreeNode &node, const string &format)
void SetLabelFormat(const string &fmt, const CPhyloTree *tree)
TVPUnit GetMinVerticalSeparation() const
void SetScheme(CPhyloTreeScheme &sl, const CPhyloTree *tree)
bool Expanded() const
Return true if node is currently not collapsed.
string & SetLabelFormat(void)
int GetMaxLabelLength() const
const CGlTextureFont & GetFont(void) const
const TAutoLabels & GetAutoLabels(void) const
Tree subclass also has functions and data needed for rendering and selection.
TData & GetValue()
Return the value object for the node.
bool HasParent() const
Check if the node has a parent.
bool IsLeaf() const
Report whether this is a leaf node.
virtual TVPUnit DistanceBetweenNodes(void) const =0
virtual float GetNodeLabelDist(const CPhyloTreeNode *n) const
static vector< string > arr
IRender & GetGl()
convenience function for getting current render manager
virtual TModelUnit TextHeight(const CGlTextureFont *font) const =0
virtual TModelUnit TextWidth(const CGlTextureFont *font, const char *text) const =0
virtual TModelUnit GetMetric(const CGlTextureFont *font, IGlFont::EMetric metric, const char *text=NULL, int len=-1) const =0
Calls the standard font metric functions except for pdf in which case it first replaces any bitmap fo...
void Reset(void)
Reset reference object.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
static list< string > & Split(const CTempString str, const CTempString delim, list< string > &arr, TSplitFlags flags=0, vector< SIZE_TYPE > *token_pos=NULL)
Split a string using specified delimiters.
static void TruncateSpacesInPlace(string &str, ETrunc where=eTrunc_Both)
Truncate whitespace in a string (in-place)
static string IntToString(int value, TNumToStringFlags flags=0, int base=10)
Convert int to string.
static const char label[]
unsigned int
A callback function used to compare two keys in a database.
The blob sat and sat key Both must be positive integers</td > n< td > Non empty string The interpretation of the blob id depends on a processor Cassandra n processor expects the following format
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4