Home | All Classes | Grouped Classes | Index | Search

# Class CL_TreeNode

TreeView node More...

Derived from: none
Derived by: CL_TreeView
Group: GUI (Controls)

#include <ClanLib/gui.h>

Construction:

CL_TreeNode | The treenode constructor.

Attributes:

is_selectable | Returns true if node is selectable.
is_collapsable | Returns true if node is collapsable.
is_selected | Returns true if node is selected.
is_collapsed | Return true if node is collapsed.
has_children | Return true if node has sub-items.
is_root | Returns true if node is root item.
get_current_item | Returns the current selected item. Note: This searches children as well.
get_userdata | Returns the attaches userdata, if any.
get_component | Returns the CL_Component this node uses.
get_treeview | Returns the CL_TreeView this node belongs to.
get_parent | Returns the parent node.
get_depth | Returns the depth of this node. Root node starts at 1.
get_placement_offset | Returns the x offset the component is located at. Used by themes to align columns correctly.
get_items_height | Returns the height of all opened items.

Operations:

insert_item | Inserts a child item.
remove_item | Removes an item from tree. Note that it searches children as well for the item. Returns true if item was found and deleted.
set_component | Sets/changes a new component for the node. It takes ownership of the component, and deletes it on shutdown.
set_collapsed | Collapse this node.
set_collapsable | Set the tree to collapsable or not. If set to false, item will never be collapsable by the user.
set_selectable | Set the tree to selectable or not. If set to false, item will never be selectable by the user.
set_selected | Select this node.
clear_selection | Deselects current selected item.
invert_selection | Inverts the selection. Works only in Multi selection mode.
clear | Deletes all items in the tree.
set_userdata | Attaches userdata to node.
set_placement_offset | Set the x offset the component is located at. Used by themes to align columns correctly.
draw_nodes |

Detailed description:

!group=GUI/Controls! !header=gui.h!
Questions or comments, write to the ClanLib mailing list.