Getting at tree information in ATK



To support trees in ATK, I was thinking of defining the relations
ATK_RELATION_TREE_NODE_CHILDREN and ATK_TREE_NODE_PARENT. 

These would allow us to specify for each accessible which is in a tree, i.e. 
GtkTreeStore, the children of a node and the parent node of a node.

These would be used instead of parent/child to navigate a tree.

One problem with this approach is that we would have to create accessible 
objects for each child cell when the user wished to investigate how many child 
nodes a node has.

The alternative is to try and use the parent/child relationship to navigate the 
tree.

To achieve this I think we need the following:

1) We need to deal with columns in a GtkTreeView which have more than one 
renderer. We will assume that there are not two renderers of the same type.
Consider the case where the column contains a pixbuf and text. Instead of 
exposing the cells objects corresponding to the pixbuf and the text as children 
of the containercell the containercell will implement all the interfaces that 
its children may implement and call through to the first child which implements 
the interface.

2) We do not assume that all the cells in a table are children of the table. For 
a GtkTreeStore only the top level cells will be children of the table. For a 
GtkListStore all the cells will be children of the table.

3) The function atk_table_get_index_at() may return an invalid index, i.e. -1, 
for cells which are not children of the table. This implies that the cell at the 
specified (row, column) is a child of an expandable cell.

Padraig




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