Re: Is there ways to make a atk factory only used for some instances


The best way to ensure that an AtkFactory is used only with certain
instances of a GObject type is to create a new subtype.  In your case,
this means that GnomeCanvasItem should be subclassed, and an appropriate
AtkFactory registered for the new type or types.  

GnomeCanvasItem is already an abstract class, so you must already be
using subclasses.  If your GnomeCanvasItems are instances of existing
GnomeCanvas subtypes, for instance GnomeCanvasWidget instances, you may
need to create something like a GnomeCanvasActiveWidget type which is
used for your 'actionable' canvas items.



On Thu, 2003-09-04 at 08:06, Bolian Yin wrote:
> Hi Padraig,
> I met the problem in gnome-canvas-item. Gail has impl for 
> gnome-canvas-item, but programmers can add many functions to a 
> gnome-canvas-item.
> For example, a gnome-canvas-item support an action in some context, and 
> want to add a action interface to the atkobject creates for it. In this 
> case, I cannot register a new factory to create the atk object, or all 
> the gnome-canvas-items will create their atk objects using the new factory.
> Is there ways to make a atk factory only used for some instances of 
> gnome-canvas-item, and in other case the default (gail) factory will be 
> used?
> Thanks,
> Bolian

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