query_interface on tree models



Hi,

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. 
   GtkTreeModelSort

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

Havoc




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