tree{,item} widget questions



	I was browsing through the tree widget source for 0.99.4, and I had
two questions:

1) If I wanted to tack on 'satellite' data to something such as a
   GTKTreeItem (to hook on my own data to a tree item to refer to when
   the user selects the item), is gtk_object_{set,get}_data (or the
   {get,set}_user_data wrappers) the "right" way to do this?

2) In gtk_tree_insert, there's a check to make sure the new child is a tree
   item, but there's no such check in gtk_tree_add; is this intentional?
   There are (unprotected, as nearly as I can determine) GTK_TREE_ITEM()
   casts made on a child in:
   gtk_tree_draw, gtk_tree_foreach, gtk_tree_map, gtk_tree_remove_items,
   gtk_tree_size_allocate, and gtk_tree_size_request
   and there are type-checked casts several other places.  It seems likely
   to me that the intention was for a GTKTree to only allow GTKTreeItems
   as children, although these GTKTreeItems may have other kinds of
   children themselves (which is allowed -- or at least handled -- in
   gtk_tree_button_press).

Thanks in advance,
- Michael



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]