]> Pileus Git - ~andy/gtk/blob - gtk/gtktoolbar.h
0f409dadbaf2dc45014c6adf71b07b37052621e4
[~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
28
29 #ifdef __cplusplus
30 extern "C" {
31 #endif /* __cplusplus */
32
33
34 #define GTK_TOOLBAR(obj)         GTK_CHECK_CAST (obj, gtk_toolbar_get_type (), GtkToolbar)
35 #define GTK_TOOLBAR_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, gtk_toolbar_get_type (), GtkToolbarClass)
36 #define GTK_IS_TOOLBAR(obj)      GTK_CHECK_TYPE (obj, gtk_toolbar_get_type ())
37
38
39 typedef struct _GtkToolbar      GtkToolbar;
40 typedef struct _GtkToolbarClass GtkToolbarClass;
41
42 struct _GtkToolbar
43 {
44   GtkContainer container;
45
46   gint             num_children;
47   GList           *children;
48   GtkOrientation   orientation;
49   GtkToolbarStyle  style;
50   gint             space_size; /* big optional space between buttons */
51
52   gint             child_maxw;
53   gint             child_maxh;
54 };
55
56 struct _GtkToolbarClass
57 {
58   GtkContainerClass parent_class;
59 };
60
61
62 guint      gtk_toolbar_get_type      (void);
63 GtkWidget *gtk_toolbar_new           (GtkOrientation   orientation,
64                                       GtkToolbarStyle  style);
65
66 void       gtk_toolbar_append_item   (GtkToolbar      *toolbar,
67                                       const char      *text,
68                                       const char      *tooltip_text,
69                                       GtkPixmap       *icon);
70 void       gtk_toolbar_prepend_item  (GtkToolbar      *toolbar,
71                                       const char      *text,
72                                       const char      *tooltip_text,
73                                       GtkPixmap       *icon);
74 void       gtk_toolbar_insert_item   (GtkToolbar      *toolbar,
75                                       const char      *text,
76                                       const char      *tooltip_text,
77                                       GtkPixmap       *icon,
78                                       gint             position);
79 void       gtk_toolbar_append_space  (GtkToolbar      *toolbar);
80 void       gtk_toolbar_prepend_space (GtkToolbar      *toolbar);
81 void       gtk_toolbar_insert_space  (GtkToolbar      *toolbar,
82                                       gint             position);
83
84
85 #ifdef __cplusplus
86 }
87 #endif /* __cplusplus */
88
89 #endif /* __GTK_TOOLBAR_H__ */