query_interface on tree models


We have a problem in that certain tree models can have capabilities
that others do not. Examples so far:

 - some can sort themselves when a column header is clicked, e.g. 

 - some can be reordered or have rows deleted/added via drag-and-drop

 - some can have their cell contents changed via editable tree rows
   (not implemented, but will be someday)

The issue is that you want GtkTreeView to dynamically discover the
available functionality and set things up to work. e.g. if a model is
sortable, automatically sort when the user clicks a column header.

Best solution so far proposed is to add interfaces such as
GtkTreeModelSortable and have models implement those; then 
the GtkTreeView would see if the model conforms to the relevant
interface and set things up automatically if it does.

Objections, better ideas?


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