Re: Implementing GtkTreeModels
- From: Jonathan Blandford <jrb redhat com>
- To: Mariano Suarez-Alvarez <msuarezalvarez arnet com ar>
- Cc: gtk-devel-list gnome org
- Subject: Re: Implementing GtkTreeModels
- Date: 04 Aug 2003 14:54:13 -0400
Mariano Suarez-Alvarez <msuarezalvarez arnet com ar> writes:
> Hi all,
>
> There is a question at the end. Bear with me a little intro:
>
> Most of the time I use GtkTreeStore or GtkListStore, the data that will
> get displayed is stored somewhere, most probably some structs. Filling
> in the rows of the store ends up in quite a bit of duplication. I
> usually do this, then, by setting up my own class implementing the
> GtkTreeModel iface.
If you're just storing structs then you probably don't need to make a
custom model. Simply doing:
model = gtk_list_store_new (1, G_TYPE_POINTER);
in conjunction with gtk_tree_view_column_set_cell_data_func seems like
it will do everything you need.
Thanks,
-Jonathan
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]