Tree and tree item
- From: "Florent. Devin" <Florent Devin lifl fr>
- To: "gnome-devel-list gnome org" <gnome-devel-list gnome org>
- Subject: Tree and tree item
- Date: Fri, 26 May 2000 11:40:46 +0200
Hi,
Can you tell me if I am right, or not.
To create a tree we use gtk_tree_new().
Then to add an object the function gtk_tree_append(tree, item), but you
have
to initialize first your item by the function gtk_tree_item_new ().
when you need a subtree you initialize a new tree, and attach this tree
to an item.
Just an example, and then my question ....
root_tree = gtk_tree_new ();
root_item = gtk_tree_item_new();
sub_tree = gtk_tree_new ();
gtk_tree_append (root_tree, root_item);
gtk_tree_item_set_subtree (root_item, sub_tree);
sub_item = gtk_tree_item ();
gtk_tree_append (sub_tree, sub_item);
sub_sub_tree = gtk_tree_new ();
gtk_tree_item_set_subtree (sub_item, sub_sub_tree);
sub_sub_item = gtk_tree_item_new ();
gtk_tree_append (sub_sub_tree, sub_sub_item);
if I call a function with this prototype :
void my_function (GtkWidget* sub_sub_item);
How can I find the ROOT_TREE (which is in my example root_tree) ?
When I look to the definition of a GtkTreeItem I have not found a
pointer
to its parent...
A known bug, a feature, a forgiven feature ???
If you know how to have its root_tree, can you tell me the way.
Sure I can pass the sub_sub_tree but is this the only solution ?
--
Florent DEVIN, 33 (0)3 20 43 47 30, Fax (33) (0)3 20 43 65 66 (Fax LIFL)
LIFL, Laboratoire d'Informatique Fondamentale de LILLE
USTL, Bureau 326, Bātiment M3, 59655 Villeneuve d'Ascq Cedex
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]