[gtk-list] Re: why not more code inheritance?
- From: Patrice Fortier <Patrice Fortier aquarel fr>
- To: gtk-list redhat com
- Subject: [gtk-list] Re: why not more code inheritance?
- Date: Fri, 13 Mar 1998 12:17:43 +0100 (MET)
>
> > 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.
MOst of the _realize code is the Window attribute settings (95%) + the
call to the window creation (1 line).
It's quite hard to make a generic function to do that, as the
window attribute structure is different for each window :(
Patrice.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]