Re: [gtkmm] Inheriting from Gtk::Action?



On Tue, 2004-05-18 at 12:48 -0500, Philip Langdale wrote:
> Hi all,
> 
> I'm currently trying to derive a custom Action class

I'm be interested to know why you want to do this,

>  and I have absolutely no
> idea how to go about doing it. The constructors for Gtk::Action are private

Well, not all of them, but the ones you need are private. See below.

>  so
> how on earth am I supposed to call the parent constructor from a derived class?
> I've poked through the documentation and there's no section on inheritance and
> no clear example.
> 
> I get the impression that I have to jump through wierd hoops and call
> Glib::Object and Glib::ObjectBase constructors but this all seems to be
> undocumented.
> 
> I guess this is just a specific case of any widget that uses static create
> methods rather than constructors.
> 
> Any help would be much appreciated.

Oops. It needs a 
  protected:
after the
  _CLASS_GOBJECT
line in action.hg

Please try that out. If it's really necessary then I'll make that change
in a 2.4.x release.

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





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