Re: "public" widget fields




beach@ataman.com writes:

> To whomever knows:
> 
> I've noticed that Gtk exposes a lot of widget state simply by leaving
> it available in each widget's structure.  For example, GtkEntry has
> fields such as scroll_offset, timer, button, etc...  Are these fields
> to be considered publicly accessible from outside of Gtk?  (e.g if I'm
> writing interpreter bindings should I make it possible to access these
> fields?)  If so, which are read only and which are read-write?

No fields are read-write. As for the ones that are read-only, it is
basically a matter of tradition and necessity. Browsing through
gtkperl might prove useful, since I believe they have been added there
in a as-needed basis, which (except for documentation) is probably the
best way to do it. Just adding them randomly is not a good idea,
since, for instance, none of the fields you mention above is really
public.

(The two "public" ones that come up most often are toggle_button->active 
 and clist->selection)

Regards,
                                        Owen





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