PROGRAM(tree);
// A 'tree' with subnodes etc.  do not have a tree with more than 100
// or so entries. It will be very slow.
//
// <p>
// IMG: lambda() { object t = GTK.Tree();  object i, t2;  t->add(i = GTK.Tree_item("Sub node 1"));  i->set_subtree( GTK.Tree() )->show();  t->add(i = GTK.Tree_item("Sub node 2"));  i->set_subtree( t2=GTK.Tree() )->show();  call_out(i->expand, 0);  t2->add( GTK.Tree_item("Sub sub 1")->show() );  t2->add( GTK.Tree_item("Sub sub 2")->show() );  t->add(i = GTK.Tree_item("Sub node 3"));  i->set_subtree( GTK.Tree() )->show();  return t;}()
// IMG: lambda() { object t = GTK.Tree();  object i, t2;  t->add(i = GTK.Tree_item("Sub node 1"));  i->set_subtree( GTK.Tree() )->show();  t->add(i = GTK.Tree_item("Sub node 2"));  i->set_subtree( t2=GTK.Tree() )->show();  call_out(i->expand, 0);  t2->add( GTK.Tree_item("Sub sub 1")->show() );  t2->add( GTK.Tree_item("Sub sub 2")->show() );  t->add(i = GTK.Tree_item("Sub node 3"));  i->set_subtree( GTK.Tree() )->show();  return t;}()->set_view_lines(0)
SIGNAL("selection_changed", "");
SIGNAL("select_child", "");
SIGNAL("unselect_child", "");
INHERIT(container);
COMPLEX_FUNCTION(create);
COMPLEX_FUNCTION(append, tree_item);
NAME_ARGS(child);
// Add a new tree item at insertion point
COMPLEX_FUNCTION(prepend, tree_item);
NAME_ARGS(child);
// Add a new tree item from end (same as 'add')
COMPLEX_FUNCTION(insert, tree_item, int);
NAME_ARGS(child,pos);
// Insert a new tree item at the specified position
COMPLEX_FUNCTION(clear_items, int,int);
NAME_ARGS(start,end);

COMPLEX_FUNCTION(select_item, int);
NAME_ARGS(pos);
// Select a specified (by index) item
COMPLEX_FUNCTION(unselect_item, int);
NAME_ARGS(pos);
// Unselect a specified (by index) item
COMPLEX_FUNCTION(select_child, tree_item);
NAME_ARGS(child);
// Select a specified (by object) item
COMPLEX_FUNCTION(unselect_child, tree_item);
NAME_ARGS(child);

int COMPLEX_FUNCTION(child_position, tree_item);

// Unselect a specified (by object) item
COMPLEX_FUNCTION(set_selection_mode, int);
NAME_ARGS(selection_mode);
// One of CONST(GTK_SELECTION)
COMPLEX_FUNCTION(set_view_mode, int);
NAME_ARGS(view_mode);
// One of CONST(GTK_TREE)
COMPLEX_FUNCTION(set_view_lines, int);
NAME_ARGS(viewp);
// if true, draw lines between the nodes
