gtk_list_store_new(1, G_TYPE_STRING) and retrieving data



I made a GtkListStore model and populated it with data entries and view it
via a GtkTreeView no problem.  Now I want to use a button click callback to
scan through the list
to access all the items to print them out.  I found
gtk_tree_model_iter_next(model, iter) and gtk_tree_model_getvalue(model,
iter, column, value) and thought that might be the way to go:  then I found
gtk_tree_model_foreach(model, GtkTreeModelForeachFunc, data) and
GtkTreeModelForeachFunc(model, PATH, iter, data)!  The latter 2 methods look
like the easier path to follow but the documentation here is very sparse!
I'm trying to iterate through a list so what does PATH have to do with this?
I sure would like to see an example of these two techniques so any comments
and/or skeleton code would certainly be well appreciated.
Sydney



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