1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
|
/* Petri-Foo is a fork of the Specimen audio sampler.
Copyright 2011 James W. Morris
This file is part of Petri-Foo.
Petri-Foo is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
published by the Free Software Foundation.
Petri-Foo is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Petri-Foo. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef BASIC_COMBOS_H
#define BASIC_COMBOS_H
#include "names.h"
#include <gtk/gtk.h>
/* create a basic GTK combo button using one of two methods. both methods
* give the same end result to the user: the ability to select one from
* a list of strings. invisible to the user, each string has an ID:
* basic_combo_create:
* *assigns* each string an ID based upon its array index.
* basic_combo_id_name_create:
* the ID is *specified* within the array of struct _id_name.
*/
GtkWidget* basic_combo_create(const char* str_array[]);
GtkWidget* basic_combo_id_name_create(const id_name const*);
/* basic_combo_get_active works for both of above - it returns the
* specified ID within id_name, or the assigned ID of str_array.
*/
int basic_combo_get_active(GtkWidget*);
/* basic_combo_get_iter_at_index matches on the specified ID within
* id_name or the assigned ID of str_array.
*/
gboolean basic_combo_get_iter_at_index(GtkWidget*, int index,
GtkTreeIter* result);
#endif /* BASIC_COMBOS_H */
|