]> Pileus Git - ~andy/gtk/blob - gtk/gtktoolbar.h
Removed the GTK_PIXMAP casts to match Eckehard's new prototypes.
[~andy/gtk] / gtk / gtktoolbar.h
1 /* GTK - The GIMP Toolkit
2  * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
3  * GtkToolbar copyright (C) Federico Mena
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Library General Public
7  * License as published by the Free Software Foundation; either
8  * version 2 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * Library General Public License for more details.
14  *
15  * You should have received a copy of the GNU Library General Public
16  * License along with this library; if not, write to the Free
17  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18  */
19
20 #ifndef __GTK_TOOLBAR_H__
21 #define __GTK_TOOLBAR_H__
22
23
24 #include <gdk/gdk.h>
25 #include <gtk/gtkcontainer.h>
26 #include <gtk/gtkenums.h>
27 #include <gtk/gtkpixmap.h>
28 #include <gtk/gtksignal.h>
29 #include <gtk/gtktooltips.h>
30
31
32 #ifdef __cplusplus
33 extern "C" {
34 #endif /* __cplusplus */
35
36
37 #define GTK_TOOLBAR(obj)         GTK_CHECK_CAST (obj, gtk_toolbar_get_type (), GtkToolbar)
38 #define GTK_TOOLBAR_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, gtk_toolbar_get_type (), GtkToolbarClass)
39 #define GTK_IS_TOOLBAR(obj)      GTK_CHECK_TYPE (obj, gtk_toolbar_get_type ())
40
41
42 typedef struct _GtkToolbar      GtkToolbar;
43 typedef struct _GtkToolbarClass GtkToolbarClass;
44
45 struct _GtkToolbar
46 {
47   GtkContainer container;
48
49   gint             num_children;
50   GList           *children;
51   GtkOrientation   orientation;
52   GtkToolbarStyle  style;
53   gint             space_size; /* big optional space between buttons */
54
55   GtkTooltips     *tooltips;
56
57   gint             button_maxw;
58   gint             button_maxh;
59 };
60
61 struct _GtkToolbarClass
62 {
63   GtkContainerClass parent_class;
64
65   void (* orientation_changed) (GtkToolbar      *toolbar,
66                                 GtkOrientation   orientation);
67   void (* style_changed)       (GtkToolbar      *toolbar,
68                                 GtkToolbarStyle  style);
69 };
70
71
72 guint      gtk_toolbar_get_type        (void);
73 GtkWidget *gtk_toolbar_new             (GtkOrientation   orientation,
74                                         GtkToolbarStyle  style);
75
76 GtkWidget *gtk_toolbar_append_item     (GtkToolbar      *toolbar,
77                                         const char      *text,
78                                         const char      *tooltip_text,
79                                         GtkWidget       *icon,
80                                         GtkSignalFunc    callback,
81                                         gpointer         user_data);
82 GtkWidget *gtk_toolbar_prepend_item    (GtkToolbar      *toolbar,
83                                         const char      *text,
84                                         const char      *tooltip_text,
85                                         GtkWidget       *icon,
86                                         GtkSignalFunc    callback,
87                                         gpointer         user_data);
88 GtkWidget *gtk_toolbar_insert_item     (GtkToolbar      *toolbar,
89                                         const char      *text,
90                                         const char      *tooltip_text,
91                                         GtkWidget       *icon,
92                                         GtkSignalFunc    callback,
93                                         gpointer         user_data,
94                                         gint             position);
95 void       gtk_toolbar_append_space    (GtkToolbar      *toolbar);
96 void       gtk_toolbar_prepend_space   (GtkToolbar      *toolbar);
97 void       gtk_toolbar_insert_space    (GtkToolbar      *toolbar,
98                                         gint             position);
99 void       gtk_toolbar_append_widget   (GtkToolbar      *toolbar,
100                                         GtkWidget       *widget,
101                                         const char      *tooltip_text);
102 void       gtk_toolbar_prepend_widget  (GtkToolbar      *toolbar,
103                                         GtkWidget       *widget,
104                                         const char      *tooltip_text);
105 void       gtk_toolbar_insert_widget   (GtkToolbar      *toolbar,
106                                         GtkWidget       *widget,
107                                         const char      *tooltip_text,
108                                         gint             position);
109
110 void       gtk_toolbar_set_orientation (GtkToolbar      *toolbar,
111                                         GtkOrientation   orientation);
112 void       gtk_toolbar_set_style       (GtkToolbar      *toolbar,
113                                         GtkToolbarStyle  style);
114 void       gtk_toolbar_set_space_size  (GtkToolbar      *toolbar,
115                                         gint             space_size);
116 void       gtk_toolbar_set_tooltips    (GtkToolbar      *toolbar,
117                                         gint             enable);
118
119
120 #ifdef __cplusplus
121 }
122 #endif /* __cplusplus */
123
124 #endif /* __GTK_TOOLBAR_H__ */