Re: Reverse-wrapping gtkmm widgets to gtk+ (for glade3)



On Mon, 2006-11-20 at 16:35 +0100, Alexander Brinkman wrote:
> On Mon, 2006-11-20 at 16:07 +0100, Oliver Nittka wrote:
> > at the moment, glade3 loads my widgets and pretends to create them with
> > the new type (new class name in "Properties" window), but it appearently
> > still uses the base type (if i derive a widget from DrawingArea and do
> > s'thing in it's on_expose_event(), it won't draw in glade's design mode)
> > 
> > will examinate.
> 
> Yes, the output in the constructors of my custom widgets also show that
> they are not called, so the base type is instantiated, not the custom
> widget itself (although Glade3 happily pretends that it has).

Yes, I guess there's no way for the C object to know that it should
instantiate a C++ wrapper which should handle the vfuncs and default
signal handlers (and run a constructor).

Maybe we could hook in a GObject init() function to the derived GType,
which would also create the C++ wrapper around it.

> Btw: If I do a g_object_new() call and check the name and type of the
> GObject it returns I see the correct name - gtkmm__CustomObject_mywidget
> - but not the correct type. I can't see which type the number
> represents, but judging by the number it was constructed later than the
> GType of my own custom widget...

-- 
Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com




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