Re: [gtk-list] gtk_real_button_*



> 
> GtkButton has several functions prefixed with gtk_real_button_.. I had
> no problem understanding how they end up being called, and so forth.
> 
> What I'm not entirely sure about is why GtkButton is implemented this
> way.  About the only reasonable guess I can come up with is that it
> allows "inheritence" from GtkButton... but I can't for the life of me
> figure out what the problem would be doing things the other way. (the
> "other" way being, having the gtk_real_button_* code in gtk_button_*
> rather than the latter, emitting a signal)
> 

So someone can come along later and 'steal' these functions
by doing a signal_connect. See the fileselect widget for how
the 'tab' is stolen from entry this way. 

Or how you can subclass (or is it superclass) button to make
it similar but different.

This code pattern is repeatedly used in gtk.

Jamie



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