GtkIconView with custom icons



Usually, a GtkIconView uses a GtkTreeModel with a few important
columns. A column of type G_TYPE_STRING for the label or the markup and
a column of type GDK_TYPE_PIXBUF for the icon.
In my application I have a G_TYPE_OBJECT derived object that resembles
such an icon in the few, a row if you wish. It contains the label,
pixbuf and some other data, and also another pixbuf which I use as a
custom tooltip.
I'd like to know if there is a way to create a
GtkTreeModel/GtkListStore for the GtkIconView so I can still use the
gtk_icon_view_set_*_colum functions and have everything shown up
properly.
As an example, I use gtk_list_store_new (1, G_TYPE_OBJECT) but
obviously I have to columns that the icon view object could display,
the relevant data is "hidden" in the first and only column. And the
icon view will not display anything because the text/markup/pixbuf
columns are all set to -1.


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