Gtk-- Reference: Gtk::Tree

Class Index | Cross Index | Namespace Index

# Class Gtk::Tree

A treelist widget.
Contained in: Gtk
Derived from: Gtk::Container
Derived by: none

#include <gtk--/tree.h>

### public function member index:
`` | `Tree` | `()`;
``void`` | `append` | `(`TreeItem`& `widget`)`;
``gint`` | `child_position` | `(`TreeItem`& `child`) `const``;
``void`` | `clear_items` | `(`gint` `start`, `gint` `end`)`;
``guint`` | `get_level` | `() `const``;
``GtkTree`*` | `gtkobj` | `()`;
``const` `GtkTree`*` | `gtkobj` | `() `const``;
``void`` | `insert` | `(`TreeItem`& `widget`, `gint` `position`)`;
``static` `bool`` | `isA` | `(`Object`* `object`)`;
``void`` | `prepend` | `(`TreeItem`& `widget`)`;
``void`` | `remove_item` | `(`TreeItem`& `child`)`;
``emitable` `signal` `void`` | `select_child` | `(`Widget`&)`;
``void`` | `select_item` | `(`gint` `item`)`;
`SelectionList&` | `selection` | `()`;
``const` SelectionList&` | `selection` | `() `const``;
``signal` `void`` | `selection_changed` | `()`;
``void`` | `set_selection_mode` | `(`GtkSelectionMode` `mode`)`;
``void`` | `set_view_lines` | `(`bool` `flag`)`;
``void`` | `set_view_mode` | `(`GtkTreeViewMode` `mode`)`;
`ItemList&` | `tree` | `()`;
``const` ItemList&` | `tree` | `() `const``;
``emitable` `signal` `void`` | `unselect_child` | `(`Widget`&)`;
``void`` | `unselect_item` | `(`gint` `item`)`;
``virtual`` | `~Tree` | `()`;
### protected function member index:
``virtual` `void`` | `select_child_impl` | `(`Widget`& `p0`)`;
``virtual` `void`` | `selection_changed_impl` | `()`;
``virtual` `void`` | `unselect_child_impl` | `(`Widget`& `p0`)`;

## Description:

The `Gtk::Tree` widget is a container that shows users a list of items, in a tree complete with branches and leafnodes. Branches can be expanded to show their child items, or collapsed to hide them.

## Function Member Descriptions:

Gtk::Tree::append - deprecated - use tree().push_back(w);

``void`` `append``(`TreeItem`& `widget`)`;
Gtk::Tree::clear_items - deprecated - use tree().erase(start,end);

``void`` `clear_items``(`gint` `start`, `gint` `end`)`;
Gtk::Tree::gtkobj - Returns the underlaying gtk+ object.

``GtkTree`*` `gtkobj``()`;
Gtk::Tree::insert - deprecated - use tree().insert(loc,w);

``void`` `insert``(`TreeItem`& `widget`, `gint` `position`)`;
Gtk::Tree::isA - Returns true if object is this type.

``static` `bool`` `isA``(`Object`* `object`)`;
Gtk::Tree::prepend - deprecated - use tree().push_front(w);

``void`` `prepend``(`TreeItem`& `widget`)`;
Gtk::Tree::remove_item - deprecated use tree().remove(w);

``void`` `remove_item``(`TreeItem`& `child`)`;
Gtk::Tree::select_item - select item by number.

``void`` `select_item``(`gint` `item`)`;

> equivelent to tree()[itemnum]->select();

Gtk::Tree::unselect_item - equivelent to tree()[itemnum]->unselect();

``void`` `unselect_item``(`gint` `item`)`;