[gtkmm] Emergency: unwrapped GtkTreeModel API
- From: Daniel Elstner <daniel elstner gmx net>
- To: gtkmm-list gnome org
- Subject: [gtkmm] Emergency: unwrapped GtkTreeModel API
- Date: 18 Oct 2002 21:03:34 +0200
Hi,
gtk_tree_model_row_changed()
gtk_tree_model_row_inserted()
gtk_tree_model_row_has_child_toggled()
gtk_tree_model_row_deleted()
gtk_tree_model_rows_reordered()
are not wrapped in gtkmm-1.3.26. Most of these functions are only of
interest when implementing a custom TreeModel, but row_changed() seems
to be really necessary.
The scenario is as follows: If you install a custom cell data function
to display data that's not directly stored in the model, you've to send
out notification of model changes manually. Without a row_changed()
method you'd have to work around it:
a) self-assignment:
const FileInfoPtr fileinfo = (*iter)[columns.fileinfo];
(*iter)[columns.fileinfo] = fileinfo;
b) plain C:
gtk_tree_model_row_changed(model->gobj(), path.gobj(), iter.gobj());
I ran into this problem in my app regexxer, where I want to paint the
list row of a modified file red. To do this I've a cell_data_func()
callback that accesses buffer->get_modified(). To force redrawing of
the TreeView, I need to send out notification in the
signal_modified_changed() handler.
Murray, do you think an API addition would be justified? It wouldn't
even break the ABI.
--Daniel
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]