]> Pileus Git - ~andy/gtk/blob - gtk/gtktoolitem.h
Doc formatting tweaks.
[~andy/gtk] / gtk / gtktoolitem.h
1 /* gtktoolitem.c
2  *
3  * Copyright (C) 2002 Anders Carlsson <andersca@codefactory.se>
4  * Copyright (C) 2002 James Henstridge <james@daa.com.au>
5  * Copyright (C) 2003 Soeren Sandmann <sandmann@daimi.au.dk>
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2 of the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with this library; if not, write to the
19  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20  * Boston, MA 02111-1307, USA.
21  */
22
23 #ifndef __GTK_TOOL_ITEM_H__
24 #define __GTK_TOOL_ITEM_H__
25
26 #include <gtk/gtkbin.h>
27 #include <gtk/gtktooltips.h>
28 #include <gtk/gtkmenuitem.h>
29
30 #define GTK_TYPE_TOOL_ITEM            (gtk_tool_item_get_type ())
31 #define GTK_TOOL_ITEM(o)              (G_TYPE_CHECK_INSTANCE_CAST ((o), GTK_TYPE_TOOL_ITEM, GtkToolItem))
32 #define GTK_TOOL_ITEM_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_TOOL_ITEM, GtkToolItemClass))
33 #define GTK_IS_TOOL_ITEM(o)           (G_TYPE_CHECK_INSTANCE_TYPE ((o), GTK_TYPE_TOOL_ITEM))
34 #define GTK_IS_TOOL_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((o), GTK_TYPE_TOOL_ITEM))
35 #define GTK_TOOL_ITEM_GET_CLASS(o)    (G_TYPE_INSTANCE_GET_CLASS((o), GTK_TYPE_TOOL_ITEM, GtkToolItemClass))
36
37 typedef struct _GtkToolItem        GtkToolItem;
38 typedef struct _GtkToolItemClass   GtkToolItemClass;
39 typedef struct _GtkToolItemPrivate GtkToolItemPrivate;
40
41 struct _GtkToolItem
42 {
43   GtkBin parent;
44
45   /*< private >*/
46   GtkToolItemPrivate *priv;
47 };
48
49 struct _GtkToolItemClass
50 {
51   GtkBinClass parent_class;
52
53   /* signals */
54   gboolean   (* create_menu_proxy)    (GtkToolItem *tool_item);
55   void       (* toolbar_reconfigured) (GtkToolItem *tool_item);
56   gboolean   (* set_tooltip)          (GtkToolItem *tool_item,
57                                        GtkTooltips *tooltips,
58                                        const gchar *tip_text,
59                                        const gchar *tip_private);
60
61   /* Padding for future expansion */
62   void (* _gtk_reserved1) (void);
63   void (* _gtk_reserved2) (void);
64   void (* _gtk_reserved3) (void);
65   void (* _gtk_reserved4) (void);
66 };
67
68 GType        gtk_tool_item_get_type (void);
69 GtkToolItem *gtk_tool_item_new      (void);
70
71 void            gtk_tool_item_set_homogeneous          (GtkToolItem *tool_item,
72                                                         gboolean     homogeneous);
73 gboolean        gtk_tool_item_get_homogeneous          (GtkToolItem *tool_item);
74
75 void            gtk_tool_item_set_expand               (GtkToolItem *tool_item,
76                                                         gboolean     expand);
77 gboolean        gtk_tool_item_get_expand               (GtkToolItem *tool_item);
78
79 void            gtk_tool_item_set_pack_end             (GtkToolItem *tool_item,
80                                                         gboolean     pack_end);
81 gboolean        gtk_tool_item_get_pack_end             (GtkToolItem *tool_item);
82
83 void            gtk_tool_item_set_tooltip              (GtkToolItem *tool_item,
84                                                         GtkTooltips *tooltips,
85                                                         const gchar *tip_text,
86                                                         const gchar *tip_private);
87
88 void            gtk_tool_item_set_use_drag_window      (GtkToolItem *toolitem,
89                                                         gboolean     use_drag_window);
90 gboolean        gtk_tool_item_get_use_drag_window      (GtkToolItem *toolitem);
91
92 void            gtk_tool_item_set_visible_horizontal   (GtkToolItem *toolitem,
93                                                         gboolean     visible_horizontal);
94 gboolean        gtk_tool_item_get_visible_horizontal   (GtkToolItem *toolitem);
95
96 void            gtk_tool_item_set_visible_vertical     (GtkToolItem *toolitem,
97                                                         gboolean     visible_vertical);
98 gboolean        gtk_tool_item_get_visible_vertical     (GtkToolItem *toolitem);
99
100 gboolean        gtk_tool_item_get_is_important         (GtkToolItem *tool_item);
101 void            gtk_tool_item_set_is_important         (GtkToolItem *tool_item,
102                                                         gboolean     is_important);
103
104 GtkIconSize     gtk_tool_item_get_icon_size            (GtkToolItem *tool_item);
105 GtkOrientation  gtk_tool_item_get_orientation          (GtkToolItem *tool_item);
106 GtkToolbarStyle gtk_tool_item_get_toolbar_style        (GtkToolItem *tool_item);
107 GtkReliefStyle  gtk_tool_item_get_relief_style         (GtkToolItem *tool_item);
108
109 GtkWidget *     gtk_tool_item_retrieve_proxy_menu_item (GtkToolItem *tool_item);
110 GtkWidget *     gtk_tool_item_get_proxy_menu_item      (GtkToolItem *tool_item,
111                                                         const gchar *menu_item_id);
112 void            gtk_tool_item_set_proxy_menu_item      (GtkToolItem *tool_item,
113                                                         const gchar *menu_item_id,
114                                                         GtkWidget   *menu_item);
115
116 /* internal function */
117 void       _gtk_tool_item_toolbar_reconfigured (GtkToolItem *tool_item);
118
119
120 #endif /* __GTK_TOOL_ITEM_H__ */