GnuCash  2.6.99
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
gnc-combott.h
1 /********************************************************************\
2  * gnc-combott.h -- Basic simulation of ComboBox with tooltips for *
3  * each item. *
4  * Copyright (c) 2012 Robert Fewell *
5  * *
6  *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*
7  * This widget requires external ListStore which has two columns. *
8  * By default, column 0 holds the text to display and column 1 the *
9  * per item tooltip but these can be specified if the liststore has *
10  * a different format. *
11  *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*
12  * *
13  * This program is free software; you can redistribute it and/or *
14  * modify it under the terms of the GNU General Public License as *
15  * published by the Free Software Foundation; either version 2 of *
16  * the License, or (at your option) any later version. *
17  * *
18  * This program is distributed in the hope that it will be useful, *
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
21  * GNU General Public License for more details. *
22  * *
23  * You should have received a copy of the GNU General Public License*
24  * along with this program; if not, contact: *
25  * *
26  * Free Software Foundation Voice: +1-617-542-5942 *
27  * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 *
28  * Boston, MA 02110-1301, USA [email protected] *
29 \********************************************************************/
30 
31 #ifndef __GNC_COMBOTT_H__
32 #define __GNC_COMBOTT_H__
33 
34 /* type macros */
35 #define GNC_TYPE_COMBOTT (gnc_combott_get_type ())
36 #define GNC_COMBOTT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNC_TYPE_COMBOTT, GncCombott))
37 #define GNC_COMBOTT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNC_TYPE_COMBOTT, GncCombottClass))
38 #define GNC_IS_COMBOTT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNC_TYPE_COMBOTT))
39 #define GNC_IS_COMBOTT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNC_TYPE_COMBOTT))
40 #define GNC_COMBOTT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNC_TYPE_COMBOTT, GncCombottClass))
41 #define GNC_COMBOTT_NAME "GncCombott"
42 
43 /* typedefs & structures */
44 typedef struct _GncCombott GncCombott;
45 typedef struct _GncCombottClass GncCombottClass;
46 
48 {
49  GtkHBox hbox;
50 };
51 
53 {
54  GtkButtonClass parent;
55  void (* changed) (GncCombott *combott);
56 };
57 
58 /* Standard g_object type */
59 GType gnc_combott_get_type (void);
60 GncCombott *gnc_combott_new (void);
61 
62 gint gnc_combott_get_active (GncCombott *combott);
63 void gnc_combott_set_active (GncCombott *combott, gint index);
64 
65 #endif /* __GNC_COMBOTT_H__ */
66