Re: [gtk-list] Re: referring to children of a container



On Fri, 25 Sep 1998, Tim Janik wrote:

> that is *not* possible, object data needs a string for the key, neither
> the widget pointer itself nor the page index corresponds to a certain
> string.
> the correct approach is to use gtk_notebook_page_num() to retrive
> the correct index for a widget. the return value for a certain child
> may of course change after you inserted or removed other children.
> 

uhm, forgot to mention other widgets.

GtkNotebook introduces gtk_notebook_page_num() and gtk_notebook_reorder_child()
GtkBox introduces gtk_box_reorder_child(), gtk_box_query_child_packing() and
       gtk_box_set_child_packing()
GtkTable at least exports the attach options through the object argument
         interface, we should eventually provide a gtk_table_reattach()
         function to aquire the same functionality through the normal
         API, but it would essentially just do a gtk_container_remove()
         and then invoke gtk_table_attach() again.
GtkList lets you query a child's poition with gtk_list_child_position()
        but currently lacks a _reorder implementation.
GtkPacker implements gtk_packer_reorder_child() and gtk_packer_configure()
GtkFixed implements gtk_fixed_move()

i agree that the API names seem kinda randomly picked, and it would
actually be a good idea to change it in some places so we get more
consistent function names. but then again, the differences in the APIs
for dynamic changes to container children originate in the different
functionality that the containers provide (e.g. a GtkTable doesn't associate
a certain index with a child).

i'm open to suggestion...
         

> ---
> ciaoTJ
> 

---
ciaoTJ



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