Re: [gtk-list] why not more code inheritance?



>  Why doesn't gtk make more use of code inheritance?  Seems to me that
>  most invocations of *_realize are going to be 90% identical.  A quick
>  grep and eyeball shows that to be true.  Why not move that code into
>  the parent?  It would make the code easier to understand because the
>  differences would be obvious.

*Shrug*  You could have a generic gtk_widget_generic_realize()
function that you could simply use for your widget_class->realize.
Most widget which want a single default window could use that.  The
exotic widgets with more than one window can keep their existing
realize methods.

  Quartic



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