GtkListStore usage



Hello

I would like to use GtkListStore in this way:
 - Create GtkListStore with 1 column (G_TYPE_POINTER) 
 - Register two functions get_value and set_value. When 
   gtk_list_store_{get,set}_value is called, my {get,set}_value will be
   called, returning a value from the object in column 1 (or generate
   a value from the object), and set a value in the object, respectively.
   "Registering" may be connecting to signal or setting a function pointer
   in GtkListStore struct, ..

 * Or we can create GtkListStore with n+1 columns, and let GtkListStore
   check data types instead of {get,set}_value.
 - {get,set}_value contain a lot of switches to control each column data.

Is there a way to do this without modifying GtkListStore or implementing
a new GtkTreeModel?

BTW, Gtk(2.0) uses gtktreedatalist to store a row. It would be better if 
GtkListStore allows developer to use another type instead of gtktreedatalist
when they want.

Regards,
-- 
Bi Cờ Lao



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