Ardour  9.0-pre0-582-g084a23a80d
gtktoolbar.h
Go to the documentation of this file.
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  * Copyright (C) 2002 Anders Carlsson <andersca@gnome.org>
6  * Copyright (C) 2002 James Henstridge <james@daa.com.au>
7  * Copyright (C) 2003 Soeren Sandmann <sandmann@daimi.au.dk>
8  *
9  * This library is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU Lesser General Public
11  * License as published by the Free Software Foundation; either
12  * version 2 of the License, or (at your option) any later version.
13  *
14  * This library is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17  * Lesser General Public License for more details.
18  *
19  * You should have received a copy of the GNU Lesser General Public
20  * License along with this library; if not, write to the
21  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
22  * Boston, MA 02111-1307, USA.
23  */
24 
25 /*
26  * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
27  * file for a list of people on the GTK+ Team. See the ChangeLog
28  * files for a list of changes. These files are distributed with
29  * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
30  */
31 
32 #ifndef __GTK_TOOLBAR_H__
33 #define __GTK_TOOLBAR_H__
34 
35 
36 #if defined(GTK_DISABLE_SINGLE_INCLUDES) && !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
37 #error "Only <gtk/gtk.h> can be included directly."
38 #endif
39 
40 #include <gtk/gtkcontainer.h>
41 #include <gtk/gtktooltips.h>
42 #include <gtk/gtktoolitem.h>
43 
44 G_BEGIN_DECLS
45 
46 #define GTK_TYPE_TOOLBAR (gtk_toolbar_get_type ())
47 #define GTK_TOOLBAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_TOOLBAR, GtkToolbar))
48 #define GTK_TOOLBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_TOOLBAR, GtkToolbarClass))
49 #define GTK_IS_TOOLBAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_TOOLBAR))
50 #define GTK_IS_TOOLBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_TOOLBAR))
51 #define GTK_TOOLBAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_TOOLBAR, GtkToolbarClass))
52 
53 #ifndef GTK_DISABLE_DEPRECATED
54 typedef enum
55 {
62 
63 typedef struct _GtkToolbarChild GtkToolbarChild;
64 
66 {
71 };
72 
73 #endif /* GTK_DISABLE_DEPRECATED */
74 
75 typedef enum
76 {
80 
81 typedef struct _GtkToolbar GtkToolbar;
82 typedef struct _GtkToolbarClass GtkToolbarClass;
83 typedef struct _GtkToolbarPrivate GtkToolbarPrivate;
84 
86 {
88 
89  /*< public >*/
90  gint GSEAL (num_children);
91  GList *GSEAL (children);
92  GtkOrientation GSEAL (orientation);
94  GtkIconSize GSEAL (icon_size);
95 
96 #ifndef GTK_DISABLE_DEPRECATED
97  GtkTooltips *GSEAL (tooltips);
98 #else
99  gpointer GSEAL (_tooltips);
100 #endif
101 
102  /*< private >*/
103  gint GSEAL (button_maxw); /* maximum width of homogeneous children */
104  gint GSEAL (button_maxh); /* maximum height of homogeneous children */
105 
108 
109  guint GSEAL (style_set) : 1;
110  guint GSEAL (icon_size_set) : 1;
111 };
112 
114 {
116 
117  /* signals */
118  void (* orientation_changed) (GtkToolbar *toolbar,
119  GtkOrientation orientation);
120  void (* style_changed) (GtkToolbar *toolbar,
121  GtkToolbarStyle style);
122  gboolean (* popup_context_menu) (GtkToolbar *toolbar,
123  gint x,
124  gint y,
125  gint button_number);
126 
127  /* Padding for future expansion */
128  void (*_gtk_reserved1) (void);
129  void (*_gtk_reserved2) (void);
130  void (*_gtk_reserved3) (void);
131 };
132 
133 GType gtk_toolbar_get_type (void) G_GNUC_CONST;
135 
137  GtkToolItem *item,
138  gint pos);
139 
141  GtkToolItem *item);
144  gint n);
145 
148  gboolean show_arrow);
149 
152  GtkToolbarStyle style);
154 
157  GtkIconSize icon_size);
159 
162  gint x,
163  gint y);
165  GtkToolItem *tool_item,
166  gint index_);
167 
168 
169 /* internal functions */
170 gchar * _gtk_toolbar_elide_underscores (const gchar *original);
172  GtkToolbar *toolbar,
173  const GdkRectangle *area,
174  const GtkAllocation *allocation);
176 
177 
178 
179 #ifndef GTK_DISABLE_DEPRECATED
180 
183  GtkOrientation orientation);
186  gboolean enable);
187 
188 /* Simple button items */
190  const char *text,
191  const char *tooltip_text,
192  const char *tooltip_private_text,
193  GtkWidget *icon,
194  GCallback callback,
195  gpointer user_data);
197  const char *text,
198  const char *tooltip_text,
199  const char *tooltip_private_text,
200  GtkWidget *icon,
201  GCallback callback,
202  gpointer user_data);
204  const char *text,
205  const char *tooltip_text,
206  const char *tooltip_private_text,
207  GtkWidget *icon,
208  GCallback callback,
209  gpointer user_data,
210  gint position);
211 
212 /* Stock Items */
214  const gchar *stock_id,
215  const char *tooltip_text,
216  const char *tooltip_private_text,
217  GCallback callback,
218  gpointer user_data,
219  gint position);
220 
221 /* Space Items */
225  gint position);
227  gint position);
228 /* Any element type */
230  GtkToolbarChildType type,
231  GtkWidget *widget,
232  const char *text,
233  const char *tooltip_text,
234  const char *tooltip_private_text,
235  GtkWidget *icon,
236  GCallback callback,
237  gpointer user_data);
238 
240  GtkToolbarChildType type,
241  GtkWidget *widget,
242  const char *text,
243  const char *tooltip_text,
244  const char *tooltip_private_text,
245  GtkWidget *icon,
246  GCallback callback,
247  gpointer user_data);
248 
250  GtkToolbarChildType type,
251  GtkWidget *widget,
252  const char *text,
253  const char *tooltip_text,
254  const char *tooltip_private_text,
255  GtkWidget *icon,
256  GCallback callback,
257  gpointer user_data,
258  gint position);
259 
260 /* Generic Widgets */
262  GtkWidget *widget,
263  const char *tooltip_text,
264  const char *tooltip_private_text);
266  GtkWidget *widget,
267  const char *tooltip_text,
268  const char *tooltip_private_text);
270  GtkWidget *widget,
271  const char *tooltip_text,
272  const char *tooltip_private_text,
273  gint position);
274 
275 #endif /* GTK_DISABLE_DEPRECATED */
276 
277 
278 G_END_DECLS
279 
280 #endif /* __GTK_TOOLBAR_H__ */
GtkOrientation
Definition: gtkenums.h:263
GtkReliefStyle
Definition: gtkenums.h:330
GtkToolbarStyle
Definition: gtkenums.h:426
GtkIconSize
Definition: gtkenums.h:143
GType gtk_toolbar_get_type(void) G_GNUC_CONST
void gtk_toolbar_set_show_arrow(GtkToolbar *toolbar, gboolean show_arrow)
void gtk_toolbar_append_space(GtkToolbar *toolbar)
gint gtk_toolbar_get_n_items(GtkToolbar *toolbar)
GtkIconSize gtk_toolbar_get_icon_size(GtkToolbar *toolbar)
GtkWidget * gtk_toolbar_insert_element(GtkToolbar *toolbar, GtkToolbarChildType type, GtkWidget *widget, const char *text, const char *tooltip_text, const char *tooltip_private_text, GtkWidget *icon, GCallback callback, gpointer user_data, gint position)
gint _gtk_toolbar_get_default_space_size(void)
GtkToolbarStyle gtk_toolbar_get_style(GtkToolbar *toolbar)
void gtk_toolbar_insert(GtkToolbar *toolbar, GtkToolItem *item, gint pos)
gboolean gtk_toolbar_get_tooltips(GtkToolbar *toolbar)
GtkWidget * gtk_toolbar_insert_stock(GtkToolbar *toolbar, const gchar *stock_id, const char *tooltip_text, const char *tooltip_private_text, GCallback callback, gpointer user_data, gint position)
void gtk_toolbar_set_style(GtkToolbar *toolbar, GtkToolbarStyle style)
GtkWidget * gtk_toolbar_insert_item(GtkToolbar *toolbar, const char *text, const char *tooltip_text, const char *tooltip_private_text, GtkWidget *icon, GCallback callback, gpointer user_data, gint position)
void gtk_toolbar_unset_style(GtkToolbar *toolbar)
gint gtk_toolbar_get_item_index(GtkToolbar *toolbar, GtkToolItem *item)
GtkOrientation gtk_toolbar_get_orientation(GtkToolbar *toolbar)
GtkToolbarSpaceStyle
Definition: gtktoolbar.h:76
@ GTK_TOOLBAR_SPACE_LINE
Definition: gtktoolbar.h:78
@ GTK_TOOLBAR_SPACE_EMPTY
Definition: gtktoolbar.h:77
void gtk_toolbar_remove_space(GtkToolbar *toolbar, gint position)
GtkWidget * gtk_toolbar_new(void)
GtkReliefStyle gtk_toolbar_get_relief_style(GtkToolbar *toolbar)
GtkWidget * gtk_toolbar_append_element(GtkToolbar *toolbar, GtkToolbarChildType type, GtkWidget *widget, const char *text, const char *tooltip_text, const char *tooltip_private_text, GtkWidget *icon, GCallback callback, gpointer user_data)
GtkWidget * gtk_toolbar_prepend_element(GtkToolbar *toolbar, GtkToolbarChildType type, GtkWidget *widget, const char *text, const char *tooltip_text, const char *tooltip_private_text, GtkWidget *icon, GCallback callback, gpointer user_data)
void gtk_toolbar_prepend_widget(GtkToolbar *toolbar, GtkWidget *widget, const char *tooltip_text, const char *tooltip_private_text)
struct _GtkToolbarPrivate GtkToolbarPrivate
Definition: gtktoolbar.h:83
void gtk_toolbar_set_drop_highlight_item(GtkToolbar *toolbar, GtkToolItem *tool_item, gint index_)
void gtk_toolbar_append_widget(GtkToolbar *toolbar, GtkWidget *widget, const char *tooltip_text, const char *tooltip_private_text)
gchar * _gtk_toolbar_elide_underscores(const gchar *original)
void gtk_toolbar_insert_space(GtkToolbar *toolbar, gint position)
GtkWidget * gtk_toolbar_append_item(GtkToolbar *toolbar, const char *text, const char *tooltip_text, const char *tooltip_private_text, GtkWidget *icon, GCallback callback, gpointer user_data)
void gtk_toolbar_set_tooltips(GtkToolbar *toolbar, gboolean enable)
void gtk_toolbar_prepend_space(GtkToolbar *toolbar)
GtkToolItem * gtk_toolbar_get_nth_item(GtkToolbar *toolbar, gint n)
void gtk_toolbar_set_icon_size(GtkToolbar *toolbar, GtkIconSize icon_size)
void gtk_toolbar_unset_icon_size(GtkToolbar *toolbar)
gint gtk_toolbar_get_drop_index(GtkToolbar *toolbar, gint x, gint y)
void gtk_toolbar_set_orientation(GtkToolbar *toolbar, GtkOrientation orientation)
gboolean gtk_toolbar_get_show_arrow(GtkToolbar *toolbar)
void gtk_toolbar_insert_widget(GtkToolbar *toolbar, GtkWidget *widget, const char *tooltip_text, const char *tooltip_private_text, gint position)
GtkToolbarChildType
Definition: gtktoolbar.h:55
@ GTK_TOOLBAR_CHILD_SPACE
Definition: gtktoolbar.h:56
@ GTK_TOOLBAR_CHILD_TOGGLEBUTTON
Definition: gtktoolbar.h:58
@ GTK_TOOLBAR_CHILD_BUTTON
Definition: gtktoolbar.h:57
@ GTK_TOOLBAR_CHILD_RADIOBUTTON
Definition: gtktoolbar.h:59
@ GTK_TOOLBAR_CHILD_WIDGET
Definition: gtktoolbar.h:60
void _gtk_toolbar_paint_space_line(GtkWidget *widget, GtkToolbar *toolbar, const GdkRectangle *area, const GtkAllocation *allocation)
GtkWidget * gtk_toolbar_prepend_item(GtkToolbar *toolbar, const char *text, const char *tooltip_text, const char *tooltip_private_text, GtkWidget *icon, GCallback callback, gpointer user_data)
GtkWidget * widget
Definition: gtktoolbar.h:68
GtkWidget * icon
Definition: gtktoolbar.h:69
GtkToolbarChildType type
Definition: gtktoolbar.h:67
GtkWidget * label
Definition: gtktoolbar.h:70
void(* _gtk_reserved2)(void)
Definition: gtktoolbar.h:129
GtkContainerClass parent_class
Definition: gtktoolbar.h:115
void(* style_changed)(GtkToolbar *toolbar, GtkToolbarStyle style)
Definition: gtktoolbar.h:120
void(* _gtk_reserved1)(void)
Definition: gtktoolbar.h:128
gboolean(* popup_context_menu)(GtkToolbar *toolbar, gint x, gint y, gint button_number)
Definition: gtktoolbar.h:122
void(* _gtk_reserved3)(void)
Definition: gtktoolbar.h:130
void(* orientation_changed)(GtkToolbar *toolbar, GtkOrientation orientation)
Definition: gtktoolbar.h:118
guint _gtk_reserved2
Definition: gtktoolbar.h:107
gint GSEAL(button_maxh)
GtkContainer container
Definition: gtktoolbar.h:87
GList * GSEAL(children)
GtkTooltips * GSEAL(tooltips)
GtkIconSize GSEAL(icon_size)
guint _gtk_reserved1
Definition: gtktoolbar.h:106
GtkToolbarStyle GSEAL(style)
gint GSEAL(button_maxw)
GtkOrientation GSEAL(orientation)
gint GSEAL(num_children)