Sophie

Sophie

distrib > Fedora > 13 > x86_64 > by-pkgid > f48941b2df41f17d4c9519d16b753438 > files > 505

ClanLib06-devel-0.6.5-16.fc13.x86_64.rpm


<html>
<head><title>ClanLib Reference: CL_TreeNode</title></head>
<body text=black link=blue vlink=#800080 bgcolor=white topmargin=0 leftmargin=0>
<table border=0 cellspacing=0 cellpadding=0 width=100%><tr><td><img border=0 src="../images/eyeheader-main-purple-a.gif" alt="ClanSoft logo" width=525 height=96></td></tr>
<tr bgcolor=#dadada><td align=left valign=top><img border=0 src="../images/eyeheader-main-purple-b.gif" alt="ClanSoft logo" width=190 height=14></td><td align=right valign=top><img border=0 src="../images/clanlib_light.gif" width=42 height=14></td></tr></table>
<table align=center border=0 cellspacing=10> <tr>
<td><a href="entire_class_index.html">Entire Class Index</a></td>
<td><a href="class_index.html">Main Class Index</a></td>
<td><a href="cross_index.html">Cross Index</a></td>
<td><a href="global_index.html">Global Index</a></td>
</table><h1 align=center>Class CL_TreeNode</h1><p>
<b>  TreeView node</b><br>
Contained in: <a href="global_index.html">global</a><br>
Derived from:
<i>none</i>
<br>
Derived by:
<a href="CL_TreeView.html">CL_TreeView</a>
<br>Group: GUI (Controls)
<p>
#include &lt;ClanLib/gui.h&gt;
<p>
<hr noshade>
<table border=0>
<tr><td colspan=3><h3>public function member index:</h3></td>
<tr valign=top><td align=left><h3>Construction:</h3></td>
<tr valign=top><td align=right><tt></tt> </td><td align=right><a href="CL_TreeNode.html#2724"><tt><font color=blue><b>CL_TreeNode</b></font></tt></a></td><td><tt>(<a href="CL_TreeView.html"><tt><font color=navy><b>CL_TreeView</b></font></tt></a>* <tt><font color=blue>root_tree</font></tt>)</tt>;</td>
<tr valign=top><td align=right><tt><tt>virtual</tt> </tt> </td><td align=right><a href="CL_TreeNode.html#2725"><tt><font color=blue><b>~CL_TreeNode</b></font></tt></a></td><td><tt>()</tt>;</td>
<tr valign=top><td align=left><h3>Attributes:</h3></td>
<tr valign=top><td align=right><tt><tt><font color=purple>bool</font></tt></tt> </td><td align=right><a href="CL_TreeNode.html#2726"><tt><font color=blue><b>is_selected</b></font></tt></a></td><td><tt>() <tt>const</tt></tt>;</td>
<tr valign=top><td align=right><tt><tt><font color=purple>bool</font></tt></tt> </td><td align=right><a href="CL_TreeNode.html#2727"><tt><font color=blue><b>is_collapsed</b></font></tt></a></td><td><tt>() <tt>const</tt></tt>;</td>
<tr valign=top><td align=right><tt><tt><font color=purple>bool</font></tt></tt> </td><td align=right><a href="CL_TreeNode.html#2728"><tt><font color=blue><b>has_children</b></font></tt></a></td><td><tt>() <tt>const</tt></tt>;</td>
<tr valign=top><td align=right><tt><tt><font color=purple>void</font></tt>*</tt> </td><td align=right><a href="CL_TreeNode.html#2729"><tt><font color=blue><b>get_userdata</b></font></tt></a></td><td><tt>() <tt>const</tt></tt>;</td>
<tr valign=top><td align=right><tt><a href="CL_Component.html"><tt><font color=navy><b>CL_Component</b></font></tt></a>*</tt> </td><td align=right><a href="CL_TreeNode.html#2730"><tt><font color=blue><b>get_component</b></font></tt></a></td><td><tt>() <tt>const</tt></tt>;</td>
<tr valign=top><td align=left><h3>Operations:</h3></td>
<tr valign=top><td align=right><tt><a href="CL_TreeNode.html#2742"><tt><font color=blue><b>CL_TreeNode</b></font></tt></a>*</tt> </td><td align=right><a href="CL_TreeNode.html#2731"><tt><font color=blue><b>insert_item</b></font></tt></a></td><td><tt>(<tt>const</tt> <tt><font color=navy>std::string</font></tt>& <tt><font color=blue>text</font></tt>, <tt><font color=purple>int</font></tt> <tt><font color=blue>index</font></tt> = -1)</tt>;</td>
<tr valign=top><td align=right><tt><a href="CL_TreeNode.html#2742"><tt><font color=blue><b>CL_TreeNode</b></font></tt></a>*</tt> </td><td align=right><a href="CL_TreeNode.html#2732"><tt><font color=blue><b>insert_item</b></font></tt></a></td><td><tt>(<a href="CL_Component.html"><tt><font color=navy><b>CL_Component</b></font></tt></a>* <tt><font color=blue>component</font></tt>, <tt><font color=purple>bool</font></tt> <tt><font color=blue>delete_component</font></tt> = false, <tt><font color=purple>int</font></tt> <tt><font color=blue>index</font></tt> = -1)</tt>;</td>
<tr valign=top><td align=right><tt><tt><font color=purple>void</font></tt></tt> </td><td align=right><a href="CL_TreeNode.html#2733"><tt><font color=blue><b>set_component</b></font></tt></a></td><td><tt>(<a href="CL_Component.html"><tt><font color=navy><b>CL_Component</b></font></tt></a>* <tt><font color=blue>component</font></tt>, <tt><font color=purple>bool</font></tt> <tt><font color=blue>delete_component</font></tt> = false)</tt>;</td>
<tr valign=top><td align=right><tt><tt><font color=purple>void</font></tt></tt> </td><td align=right><a href="CL_TreeNode.html#2734"><tt><font color=blue><b>set_collapsed</b></font></tt></a></td><td><tt>(<tt><font color=purple>bool</font></tt> <tt><font color=blue>collapse</font></tt> = true)</tt>;</td>
<tr valign=top><td align=right><tt><tt><font color=purple>void</font></tt></tt> </td><td align=right><a href="CL_TreeNode.html#2735"><tt><font color=blue><b>set_selected</b></font></tt></a></td><td><tt>(<tt><font color=purple>bool</font></tt> <tt><font color=blue>select</font></tt> = true)</tt>;</td>
<tr valign=top><td align=right><tt><tt><font color=purple>void</font></tt></tt> </td><td align=right><a href="CL_TreeNode.html#2736"><tt><font color=blue><b>set_selected</b></font></tt></a></td><td><tt>(<a href="CL_TreeNode.html#2742"><tt><font color=blue><b>CL_TreeNode</b></font></tt></a>* <tt><font color=blue>node</font></tt>, <tt><font color=purple>bool</font></tt> <tt><font color=blue>select</font></tt> = true)</tt>;</td>
<tr valign=top><td align=right><tt><tt><font color=purple>void</font></tt></tt> </td><td align=right><a href="CL_TreeNode.html#2737"><tt><font color=blue><b>clear_selection</b></font></tt></a></td><td><tt>()</tt>;</td>
<tr valign=top><td align=right><tt><tt><font color=purple>void</font></tt></tt> </td><td align=right><a href="CL_TreeNode.html#2738"><tt><font color=blue><b>invert_selection</b></font></tt></a></td><td><tt>()</tt>;</td>
<tr valign=top><td align=right><tt><tt><font color=purple>void</font></tt></tt> </td><td align=right><a href="CL_TreeNode.html#2739"><tt><font color=blue><b>clear</b></font></tt></a></td><td><tt>()</tt>;</td>
<tr valign=top><td align=right><tt><tt><font color=purple>void</font></tt></tt> </td><td align=right><a href="CL_TreeNode.html#2740"><tt><font color=blue><b>set_userdata</b></font></tt></a></td><td><tt>(<tt><font color=purple>void</font></tt>* <tt><font color=blue>data</font></tt>)</tt>;</td>
<tr valign=top><td align=right><tt><tt><font color=purple>void</font></tt></tt> </td><td align=right><a href="CL_TreeNode.html#2741"><tt><font color=blue><b>draw_nodes</b></font></tt></a></td><td><tt>(<a href="CL_Point.html"><tt><font color=navy><b>CL_Point</b></font></tt></a>& <tt><font color=blue>point</font></tt>)</tt>;</td>
<tr><td>&nbsp;</td><tr><td colspan=3><h3>private function member index:</h3></td>
<tr valign=top><td align=left><h3>Implementation:</h3></td>
<tr valign=top><td align=right><tt></tt> </td><td align=right><a href="CL_TreeNode.html#2742"><tt><font color=blue><b>CL_TreeNode</b></font></tt></a></td><td><tt>(<tt>const</tt> <a href="CL_TreeNode.html#2742"><tt><font color=blue><b>CL_TreeNode</b></font></tt></a>& <tt><font color=blue>copy</font></tt>)</tt>;</td>
<tr><td>&nbsp;</td></table>
<hr noshade>
<h2>Description:</h2>
<p>
<hr noshade>
<h2>Function Member Descriptions:</h2>
<a name="2724"><font size=+1><b>CL_TreeNode::CL_TreeNode</b></font></a> -   The treenode constructor.<br>  Not to be constructed by user - use insert_item() instead, which<br>  creates a <a href="CL_TreeNode.html">CL_TreeNode</a>.<br><tt></tt> <a href="CL_TreeNode.html#2724"><tt><font color=blue><b>CL_TreeNode</b></font></tt></a><tt>(<a href="CL_TreeView.html"><tt><font color=navy><b>CL_TreeView</b></font></tt></a>* <tt><font color=blue>root_tree</font></tt>)</tt>;<hr size="1" width="70%" align="left" noshade="noshade"><br><br>
<a name="2739"><font size=+1><b>CL_TreeNode::clear</b></font></a> -   Deletes all items in the tree.<br><tt><tt><font color=purple>void</font></tt></tt> <a href="CL_TreeNode.html#2739"><tt><font color=blue><b>clear</b></font></tt></a><tt>()</tt>;<hr size="1" width="70%" align="left" noshade="noshade"><br><br>
<a name="2737"><font size=+1><b>CL_TreeNode::clear_selection</b></font></a> -   Deselects current selected item.<br><tt><tt><font color=purple>void</font></tt></tt> <a href="CL_TreeNode.html#2737"><tt><font color=blue><b>clear_selection</b></font></tt></a><tt>()</tt>;<hr size="1" width="70%" align="left" noshade="noshade"><br><br>
<a name="2730"><font size=+1><b>CL_TreeNode::get_component</b></font></a> -   Returns the <a href="CL_Component.html">CL_Component</a> this node uses.<br><tt><a href="CL_Component.html"><tt><font color=navy><b>CL_Component</b></font></tt></a>*</tt> <a href="CL_TreeNode.html#2730"><tt><font color=blue><b>get_component</b></font></tt></a><tt>() <tt>const</tt></tt>;<hr size="1" width="70%" align="left" noshade="noshade"><br><br>
<a name="2729"><font size=+1><b>CL_TreeNode::get_userdata</b></font></a> -   Returns the attaches userdata, if any.<br><tt><tt><font color=purple>void</font></tt>*</tt> <a href="CL_TreeNode.html#2729"><tt><font color=blue><b>get_userdata</b></font></tt></a><tt>() <tt>const</tt></tt>;<hr size="1" width="70%" align="left" noshade="noshade"><br><br>
<a name="2728"><font size=+1><b>CL_TreeNode::has_children</b></font></a> -   Return true if node has sub-items<br><tt><tt><font color=purple>bool</font></tt></tt> <a href="CL_TreeNode.html#2728"><tt><font color=blue><b>has_children</b></font></tt></a><tt>() <tt>const</tt></tt>;<hr size="1" width="70%" align="left" noshade="noshade"><br><br>
<a name="2731"><font size=+1><b>CL_TreeNode::insert_item</b></font></a> -   Inserts an item at index. <br><tt><a href="CL_TreeNode.html#2742"><tt><font color=blue><b>CL_TreeNode</b></font></tt></a>*</tt> <a href="CL_TreeNode.html#2731"><tt><font color=blue><b>insert_item</b></font></tt></a><tt>(<tt>const</tt> <tt><font color=navy>std::string</font></tt>& <tt><font color=blue>text</font></tt>, <tt><font color=purple>int</font></tt> <tt><font color=blue>index</font></tt> = -1)</tt>;<br><blockquote>  If index is negative, text is inserted at the end of the list.<br>  Returns the node of the item.</blockquote>
<hr size="1" width="70%" align="left" noshade="noshade"><br><br>
<a name="2732"><font size=+1><b>CL_TreeNode::insert_item</b></font></a> -   Inserts an item (uses any type of component) at index. <br><tt><a href="CL_TreeNode.html#2742"><tt><font color=blue><b>CL_TreeNode</b></font></tt></a>*</tt> <a href="CL_TreeNode.html#2732"><tt><font color=blue><b>insert_item</b></font></tt></a><tt>(<a href="CL_Component.html"><tt><font color=navy><b>CL_Component</b></font></tt></a>* <tt><font color=blue>component</font></tt>, <tt><font color=purple>bool</font></tt> <tt><font color=blue>delete_component</font></tt> = false, <tt><font color=purple>int</font></tt> <tt><font color=blue>index</font></tt> = -1)</tt>;<br><blockquote>  If index is negative, text is inserted at the end of the list.<br>  Set delete_component to true if you want the component to be deleted when<br>  this node gets deleted.<br>  Returns the node of the item.</blockquote>
<hr size="1" width="70%" align="left" noshade="noshade"><br><br>
<a name="2738"><font size=+1><b>CL_TreeNode::invert_selection</b></font></a> -   Inverts the selection.<br>  Works only in Multi selection mode.<br><tt><tt><font color=purple>void</font></tt></tt> <a href="CL_TreeNode.html#2738"><tt><font color=blue><b>invert_selection</b></font></tt></a><tt>()</tt>;<hr size="1" width="70%" align="left" noshade="noshade"><br><br>
<a name="2727"><font size=+1><b>CL_TreeNode::is_collapsed</b></font></a> -   Return true if node is collapsed<br><tt><tt><font color=purple>bool</font></tt></tt> <a href="CL_TreeNode.html#2727"><tt><font color=blue><b>is_collapsed</b></font></tt></a><tt>() <tt>const</tt></tt>;<hr size="1" width="70%" align="left" noshade="noshade"><br><br>
<a name="2726"><font size=+1><b>CL_TreeNode::is_selected</b></font></a> -   Returns true if node is selected<br><tt><tt><font color=purple>bool</font></tt></tt> <a href="CL_TreeNode.html#2726"><tt><font color=blue><b>is_selected</b></font></tt></a><tt>() <tt>const</tt></tt>;<hr size="1" width="70%" align="left" noshade="noshade"><br><br>
<a name="2734"><font size=+1><b>CL_TreeNode::set_collapsed</b></font></a> -   Collapse this node.<br><tt><tt><font color=purple>void</font></tt></tt> <a href="CL_TreeNode.html#2734"><tt><font color=blue><b>set_collapsed</b></font></tt></a><tt>(<tt><font color=purple>bool</font></tt> <tt><font color=blue>collapse</font></tt> = true)</tt>;<hr size="1" width="70%" align="left" noshade="noshade"><br><br>
<a name="2733"><font size=+1><b>CL_TreeNode::set_component</b></font></a> -   Sets/changes a new component for the node.<br><tt><tt><font color=purple>void</font></tt></tt> <a href="CL_TreeNode.html#2733"><tt><font color=blue><b>set_component</b></font></tt></a><tt>(<a href="CL_Component.html"><tt><font color=navy><b>CL_Component</b></font></tt></a>* <tt><font color=blue>component</font></tt>, <tt><font color=purple>bool</font></tt> <tt><font color=blue>delete_component</font></tt> = false)</tt>;<br><blockquote>  Mostly used when add(CL_Component *) is used with a NULL parameter.<br>  Set delete_component to true if you want the component to be deleted when<br>  this node gets deleted.</blockquote>
<hr size="1" width="70%" align="left" noshade="noshade"><br><br>
<a name="2735"><font size=+1><b>CL_TreeNode::set_selected</b></font></a> -   Select this node.<br><tt><tt><font color=purple>void</font></tt></tt> <a href="CL_TreeNode.html#2735"><tt><font color=blue><b>set_selected</b></font></tt></a><tt>(<tt><font color=purple>bool</font></tt> <tt><font color=blue>select</font></tt> = true)</tt>;<hr size="1" width="70%" align="left" noshade="noshade"><br><br>
<a name="2736"><font size=+1><b>CL_TreeNode::set_selected</b></font></a> -   Select any of the children nodes.<br><tt><tt><font color=purple>void</font></tt></tt> <a href="CL_TreeNode.html#2736"><tt><font color=blue><b>set_selected</b></font></tt></a><tt>(<a href="CL_TreeNode.html#2742"><tt><font color=blue><b>CL_TreeNode</b></font></tt></a>* <tt><font color=blue>node</font></tt>, <tt><font color=purple>bool</font></tt> <tt><font color=blue>select</font></tt> = true)</tt>;<hr size="1" width="70%" align="left" noshade="noshade"><br><br>
<a name="2740"><font size=+1><b>CL_TreeNode::set_userdata</b></font></a> -   Attaches userdata to node.<br><tt><tt><font color=purple>void</font></tt></tt> <a href="CL_TreeNode.html#2740"><tt><font color=blue><b>set_userdata</b></font></tt></a><tt>(<tt><font color=purple>void</font></tt>* <tt><font color=blue>data</font></tt>)</tt>;<hr size="1" width="70%" align="left" noshade="noshade"><br><br>
<hr noshade>
<h2>Variable Member Descriptions:</h2>
<hr noshade>
</body>
</html>