gntcombobox.h
Go to the documentation of this file.00001
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef GNT_COMBO_BOX_H
00028 #define GNT_COMBO_BOX_H
00029
00030 #include "gnt.h"
00031 #include "gntcolors.h"
00032 #include "gntkeys.h"
00033 #include "gntwidget.h"
00034
00035 #define GNT_TYPE_COMBO_BOX (gnt_combo_box_get_gtype())
00036 #define GNT_COMBO_BOX(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GNT_TYPE_COMBO_BOX, GntComboBox))
00037 #define GNT_COMBO_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GNT_TYPE_COMBO_BOX, GntComboBoxClass))
00038 #define GNT_IS_COMBO_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GNT_TYPE_COMBO_BOX))
00039 #define GNT_IS_COMBO_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GNT_TYPE_COMBO_BOX))
00040 #define GNT_COMBO_BOX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GNT_TYPE_COMBO_BOX, GntComboBoxClass))
00041
00042 #define GNT_COMBO_BOX_FLAGS(obj) (GNT_COMBO_BOX(obj)->priv.flags)
00043 #define GNT_COMBO_BOX_SET_FLAGS(obj, flags) (GNT_COMBO_BOX_FLAGS(obj) |= flags)
00044 #define GNT_COMBO_BOX_UNSET_FLAGS(obj, flags) (GNT_COMBO_BOX_FLAGS(obj) &= ~(flags))
00045
00046 typedef struct _GntComboBox GntComboBox;
00047 typedef struct _GntComboBoxPriv GntComboBoxPriv;
00048 typedef struct _GntComboBoxClass GntComboBoxClass;
00049
00050 struct _GntComboBox
00051 {
00052 GntWidget parent;
00053
00054 GntWidget *dropdown;
00055
00056 void *selected;
00057 };
00058
00059 struct _GntComboBoxClass
00060 {
00061 GntWidgetClass parent;
00062
00063 void (*gnt_reserved1)(void);
00064 void (*gnt_reserved2)(void);
00065 void (*gnt_reserved3)(void);
00066 void (*gnt_reserved4)(void);
00067 };
00068
00069 G_BEGIN_DECLS
00070
00074 GType gnt_combo_box_get_gtype(void);
00075
00081 GntWidget * gnt_combo_box_new(void);
00082
00090 void gnt_combo_box_add_data(GntComboBox *box, gpointer key, const char *text);
00091
00098 void gnt_combo_box_remove(GntComboBox *box, gpointer key);
00099
00105 void gnt_combo_box_remove_all(GntComboBox *box);
00106
00114 gpointer gnt_combo_box_get_selected_data(GntComboBox *box);
00115
00122 void gnt_combo_box_set_selected(GntComboBox *box, gpointer key);
00123
00124 G_END_DECLS
00125
00126 #endif