]> git.sur5r.net Git - glabels/blob - src/mygal/mygal-combo-box.h
Imported Upstream version 2.2.8
[glabels] / src / mygal / mygal-combo-box.h
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 /*
3  * mygal-combo-box.h - a customizable combobox
4  * Copyright 2000, 2001, Ximian, Inc.
5  *
6  * Authors:
7  *   Miguel de Icaza <miguel@ximian.com>
8  *
9  * Modified for gLabels by:
10  *   Jim Evins <evins@snaught.com>
11  *
12  * This library is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU General Public
14  * License, version 2, as published by the Free Software Foundation.
15  *
16  * This library is distributed in the hope that it will be useful, but
17  * WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19  * General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public
22  * License along with this library; if not, write to the Free Software
23  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
24  * 02111-1307, USA.
25  */
26
27 #ifndef _MYGAL_COMBO_BOX_H_
28 #define _MYGAL_COMBO_BOX_H_
29
30 #include <gtk/gtkhbox.h>
31
32 #ifdef __cplusplus
33 extern "C" {
34 #endif /* __cplusplus */
35
36 #define MYGAL_COMBO_BOX_TYPE          (mygal_combo_box_get_type())
37 #define MYGAL_COMBO_BOX(obj)          G_TYPE_CHECK_INSTANCE_CAST (obj, mygal_combo_box_get_type (), MygalComboBox)
38 #define MYGAL_COMBO_BOX_CLASS(klass)  G_TYPE_CHECK_CLASS_CAST (klass, mygal_combo_box_get_type (), MygalComboBoxClass)
39 #define MYGAL_IS_COMBO_BOX(obj)       G_TYPE_CHECK_INSTANCE_TYPE (obj, mygal_combo_box_get_type ())
40
41 typedef struct _MygalComboBox        MygalComboBox;
42 typedef struct _MygalComboBoxPrivate MygalComboBoxPrivate;
43 typedef struct _MygalComboBoxClass   MygalComboBoxClass;
44
45 struct _MygalComboBox {
46         GtkHBox hbox;
47         MygalComboBoxPrivate *priv;
48 };
49
50 struct _MygalComboBoxClass {
51         GtkHBoxClass parent_class;
52
53         GtkWidget *(*pop_down_widget) (MygalComboBox *cbox);
54
55         /*
56          * invoked when the popup has been hidden, if the signal
57          * returns TRUE, it means it should be killed from the
58          */ 
59         gboolean  *(*pop_down_done)   (MygalComboBox *cbox, GtkWidget *);
60
61         /*
62          * Notification signals.
63          */
64         void      (*pre_pop_down)     (MygalComboBox *cbox);
65         void      (*post_pop_hide)    (MygalComboBox *cbox);
66 };
67
68 GtkType    mygal_combo_box_get_type    (void);
69 void       mygal_combo_box_construct   (MygalComboBox *combo_box,
70                                         GtkWidget   *display_widget,
71                                         GtkWidget   *optional_pop_down_widget);
72 void       mygal_combo_box_get_pos     (MygalComboBox *combo_box, int *x, int *y);
73
74 GtkWidget *mygal_combo_box_new         (GtkWidget *display_widget,
75                                         GtkWidget *optional_pop_down_widget);
76 void       mygal_combo_box_popup_hide  (MygalComboBox *combo_box);
77
78 void       mygal_combo_box_set_display (MygalComboBox *combo_box,
79                                         GtkWidget *display_widget);
80
81 void       mygal_combo_box_set_title   (MygalComboBox *combo,
82                                         const gchar *title);
83
84 void       mygal_combo_box_set_tearable        (MygalComboBox *combo,
85                                                 gboolean tearable);
86 void       mygal_combo_box_set_arrow_sensitive (MygalComboBox *combo,
87                                                 gboolean sensitive);
88 void       mygal_combo_box_set_arrow_relief    (MygalComboBox *cc,
89                                                 GtkReliefStyle relief);
90 #ifdef __cplusplus
91 };
92 #endif /* __cplusplus */
93
94 #endif /* _MYGAL_COMBO_BOX_H_ */