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



Quoting Murray Cumming <murrayc murrayc com>:

> 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,

I want to derive custom actions that encapsulate all the logic to derive the
state of that action (toggled, sensitive, etc), as opposed to having some
external object do those calculations and then manipulate the action. Due to
the fine grain nature of the state calculations, such an external object would
need to treat each action individually and that would turn into a real mess.
 
> >  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.
> 
> 
> 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.
> 

I'll try it out then.

Thanks.

--phil



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