Getting the "path" in a gtk tree
- From: roumian clr34ei der edf fr (Jean-Paul ROUMIAN)
- To: gtk-list redhat com
- Subject: Getting the "path" in a gtk tree
- Date: Fri, 6 Aug 1999 09:16:12 +0200
Hello,
I'v built a whole tree with items and subtrees using
gtk_tree_new, gtk_tree_append, gtk_tree_item_set_subtree.
Now, I want to get the full path of an selected item (the names of all the tree names from the
root).
I've looked in gtk+-1.2.2/examples/tree:
I use gtk_signal_connect (GTK_OBJECT(subtree), "select_child",
GTK_SIGNAL_FUNC(cb_select_child), subtree);
I can get the selection list with GTK_TREE_SELECTION(tree),
But I cannot figure how to get the root item of a subtree.
I don't see where it is stored in _GtkTree (root_tree ? tree_owner ?), and what
macros to use to get the data. (I've done many tries, which all failed)
struct _GtkTree
{
GtkContainer container;
GList *children;
GtkTree* /* owner of selection list */
GtkWidget*
GList *selection;
guint level;
guint indent_value;
guint current_indent;
guint selection_mode : 2;
guint view_mode : 1;
guint view_line : 1;
};
Thanks for your help.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]