Re: [gtkmm] Wrapping by direct inheritance



Tim Janik wrote:
> 
[...]
> 
> GtkObject is not a particularly lightweight structure, it always comes
> with the signal handling abilities and also the classed type system
> overhead, thus it is often undesired to derive auxillary structures
> from it.

What about making GtkObject lightweight (as it should be) and then
have another object (derived from GtkObject) that comes with the
rest of the stuff ?
So allmost can be a GtkObject.

Actually Gtk has too few "molding" objects, everything is a GtkObject
or GtkWidget, and what doesn't fit in this objects are structs ...
Of course for Gtk 1.4 or 2.0 ...

> i do understand your desire to not wrap every structure and its
> ref/unref functions though. i'm not sure how to handle that issue
> more effectively, maybe we could create a new AuxBase structure
> that we derive *small* structures from and that language wrappers
> can wrap consistently:

think five years ahead, not one...
having a lightweight root object IMO is the rigth thing in the end.
Look in SmallTalk and other object-only libraries, you will find
always a lightweight root object.

Sergio
PS: I have the same problems (and more) wrapping Gtk in a object 
oriented fashion for pascal, actually I've give up.



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