Re: Overriding vfuncs with disabled vfunc API



On Sun, 2007-05-27 at 14:57 +0200, Armin Burgmeier wrote:
> is it possible somehow (without creating a new GObject on my own) to
> override vfuncs when implementing for example a custom Gtk::Container
> with disabled vfunc API (GLIBMM_ENABLE_VFUNCS not defined)? The
> documentation says the following:
> 
> "However, if you really need to override a _vfunc, for instance when
> implementing a custom Gtk::TreeModel, you may directly access the
> underlying GObject via the gobj() method."
> 
> However, I am not sure what I can do with the underlaying GObject in
> this case. I can probably use it to get a pointer to the class struct
> and register my vfunc there, but this is really hackish because if
> another one does the same thing, it will overwrite my vfunc.

Maybe that's OK if you specify a custom GType name to the
Glib::ObjectBase constructor in your constructor's initializer list.
-- 
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]