Re: [gtk-list] Re: Method to query toggle button state?



On Fri, Feb 19, 1999 at 08:50:13PM -0600, Havoc Pennington wrote:
> 
> On Fri, 19 Feb 1999, Jimmie Mayfield wrote:
> > 
> > Are there any plans to add a gtk_toggle_button_get_toggle_state() for
> > toggle buttons and/or radio buttons?  Such a function would (obviously)
> > return the toggle state of the specified button to the caller.  The
> > current library design seems to require that the programmer create a callback
> > function to catch click events.
> > 
> 
> Most people use GTK_TOGGLE_BUTTON(widget)->active, I think.

That was precisely the point of my post.  IME, it's not a good design
for programs to have to access internal widget members directly.  In OO,
you could say this is defeating the object's encapsulation.  But however 
you choose to describe it, programs that do stuff like this are dependent on 
the internal design of the object and that is a "bad thing" (tm).

I still think an inline function or MACRO provided by GTK would be the best 
way to do this.

> Havoc

Jimmie



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