Re: GailTreeView Changes Proposal

Hi Brian,

> I just had a long conversation with Marc Mulcahy and wanted to share

> the discussion.


> ...


> The "atk_registry_get_factory" function is taking a "renderer" as its

> second object so it is building the gail type for the cell based upon

> the renderer type used by the specific GtkTreeViewColumn.  In this

> example, if it notices that the type is GtkCellRendererText, then it

> builds a GailTreeViewTextCell.


> This is perhaps a problem because it assumes that the various

> GtkCellRenderers are *only* used by GtkTreeView.  Currently GtkTreeView

> is the only one making use of the various renderers.  I have just sent an

> email to Jonathan Blandford (the author of GtkTreeView) to see if this

> is a safe assumption, but I am guessing he'll tell me that it is 

> valid to use the various GtkCellRenderers in other/custom Gtk objects.


> It seems that we want an "atk_registry_get_factory()" function that

> could build the factory based upon the renderer type *and* the fact

> that the renderer is used in a GtkTreeView.  Unfortunately the

> renderer itself doesn't store this information.


> One idea is to change the call to look like this:


>     factory = atk_registry_get_factory (default_registry,

>                                         GTK_OBJECT_TYPE (tv_col));


> so that the factory is based upon the GtkTreeViewColumn object, and

> then the factory is responsible for digging into the GtkTreeViewColumn

> and figuring out which renderer it is using and then builds the

> appropriate Gail object based upon the renderer used by the column.


> However this idea is also a little broken because GtkCellRenderer is

> an interface that can be extended by anyone.  So if we took this 

> approach, I am not sure how the factory would be able to handle 

> any renderers aside from the default ones.


> Ideas?

What about keeping the first pattern - basing the accessible on the


   cell = atk_object_factory_create_accessible (factory,

                                                 G_OBJECT (renderer));

and then modifying the accessible cell with appropriate information about

the context of the object (please excuse my blatant Java-isms below).  E.g.:




Since the code that is building the accessible cell knows where the cell is,

it should contain all of the additional information needed.

Peter Korn

Sun Accessibiliy team

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