Re: how to browse values from a GtkListStore ?

2009-11-15 Thread David Nečas
On Sat, Nov 14, 2009 at 04:49:36PM +0100, for...@free.fr wrote: Is possible to browse them with an index ? What is an index? You can use gtk_tree_mogel_get_iter() to get an iter corresponding to given position in the tree (as represented by GtkTreePath). You can iterate using

Re: how to browse values from a GtkListStore ?

2009-11-15 Thread Tadej Borovšak
Hello. Is possible to browse them with an index ? What is an index? You can use gtk_tree_mogel_get_iter() to get an iter corresponding to given position in the tree (as represented by GtkTreePath). You can iterate using gtk_tree_iter_first()/gtk_tree_iter_next(). If index is mean as a

Using GTK+ in windows DLL

2009-11-15 Thread e. strooisma
My question concerns using GTK+ in a windows DLL. This DLL is actually a VST plugin where GTK+ is used for the GUI. I only need to create a main window with some buttons and other controls. Assuming this is possible I wonder how to do the following: - Initialize GTK+: what should I use for the

Re: Using GTK+ in windows DLL

2009-11-15 Thread Tor Lillqvist
- Initialize GTK+: what should I use for the arguments of the gtk_init_check; I do not have a main in the DLL Just pass and empty argument vector then? - Cleanup GTK+: how to free resources; I cannot exit the application That is not really possible, sorry. There will always be some

Re: how to browse values from a GtkListStore ?

2009-11-15 Thread for . ad
Selon Tadej Borovšak tadeb...@gmail.com: Hello. Is possible to browse them with an index ? What is an index? You can use gtk_tree_mogel_get_iter() to get an iter corresponding to given position in the tree (as represented by GtkTreePath). You can iterate using

Re: how to browse values from a GtkListStore ?

2009-11-15 Thread Tadej Borovšak
Hello How to return string orange at iter ? This depends on how you GtkListStore has been created and how those strings have been added into the store. In order for to be able to help you, you'll need to provide gtk_list_store_new function call you used to create new store and

Re: how to browse values from a GtkListStore ?

2009-11-15 Thread Tadej Borovšak
Hello. Sorry this written in multiple separate functions, I can't paste it easily. There is no gtk function that do that ?? We can set values in the store but we can't get ! I don't need your functions in their entirety. What I need to know in order to help you is how did you create your list

Re: how to browse values from a GtkListStore ?

2009-11-15 Thread for . ad
Selon Tadej Borovšak tadeb...@gmail.com: Hello. Sorry this written in multiple separate functions, I can't paste it easily. There is no gtk function that do that ?? We can set values in the store but we can't get ! I don't need your functions in their entirety. What I need to know in

Re: how to browse values from a GtkListStore ?

2009-11-15 Thread Tadej Borovšak
Hello. Ok, here a sample of code used : GtkListStore *list; GtkTreeIter iter; funct3(GtkListStore *list) {    gtk_list_store_append(list, iter);    gtk_list_store_set(list, iter, 0,apple, -1); } funct2() {    funct3(list);    // I would like to return some value here. } funct1()

Re: how to browse values from a GtkListStore ?

2009-11-15 Thread Carlos Pereira
Let's say you would like to retrieve some information for the selected row, not just the string name. You could add a (hidden) column to your store, with that information, and then get it back with gtk_tree_model_get. Let's say you would like to have a pointer to a function, for each of your