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>
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.
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.
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.
23 #ifndef __GTK_TOOL_ITEM_H__
24 #define __GTK_TOOL_ITEM_H__
26 #include <gtk/gtkbin.h>
27 #include <gtk/gtktooltips.h>
28 #include <gtk/gtkmenuitem.h>
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 #define GTK_TOOL_ITEM_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GTK_TYPE_TOOL_ITEM, GtkToolItemPrivate))
38 typedef struct _GtkToolItem GtkToolItem;
39 typedef struct _GtkToolItemClass GtkToolItemClass;
40 typedef struct _GtkToolItemPrivate GtkToolItemPrivate;
46 GtkToolItemPrivate *priv;
49 struct _GtkToolItemClass
51 GtkBinClass parent_class;
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);
62 GType gtk_tool_item_get_type (void);
63 GtkToolItem *gtk_tool_item_new (void);
65 void gtk_tool_item_toolbar_reconfigured (GtkToolItem *tool_item);
67 void gtk_tool_item_set_homogeneous (GtkToolItem *tool_item,
68 gboolean homogeneous);
69 gboolean gtk_tool_item_get_homogeneous (GtkToolItem *tool_item);
71 void gtk_tool_item_set_expand (GtkToolItem *tool_item,
73 gboolean gtk_tool_item_get_expand (GtkToolItem *tool_item);
75 void gtk_tool_item_set_pack_end (GtkToolItem *tool_item,
77 gboolean gtk_tool_item_get_pack_end (GtkToolItem *tool_item);
79 void gtk_tool_item_set_tooltip (GtkToolItem *tool_item,
80 GtkTooltips *tooltips,
81 const gchar *tip_text,
82 const gchar *tip_private);
84 void gtk_tool_item_set_use_drag_window (GtkToolItem *toolitem,
85 gboolean use_drag_window);
86 gboolean gtk_tool_item_get_use_drag_window (GtkToolItem *toolitem);
88 void gtk_tool_item_set_visible_horizontal (GtkToolItem *toolitem,
89 gboolean visible_horizontal);
90 gboolean gtk_tool_item_get_visible_horizontal (GtkToolItem *toolitem);
92 void gtk_tool_item_set_visible_vertical (GtkToolItem *toolitem,
93 gboolean visible_horizontal);
94 gboolean gtk_tool_item_get_visible_vertical (GtkToolItem *toolitem);
96 GtkIconSize gtk_tool_item_get_icon_size (GtkToolItem *tool_item);
97 GtkOrientation gtk_tool_item_get_orientation (GtkToolItem *tool_item);
98 GtkToolbarStyle gtk_tool_item_get_toolbar_style (GtkToolItem *tool_item);
99 GtkReliefStyle gtk_tool_item_get_relief_style (GtkToolItem *tool_item);
101 GtkWidget * gtk_tool_item_retrieve_proxy_menu_item (GtkToolItem *tool_item);
102 GtkWidget * gtk_tool_item_get_proxy_menu_item (GtkToolItem *tool_item,
103 const gchar *menu_item_id);
104 void gtk_tool_item_set_proxy_menu_item (GtkToolItem *tool_item,
105 const gchar *menu_item_id,
106 GtkWidget *menu_item);
108 /* internal function */
109 GdkWindow *_gtk_tool_item_get_drag_window (GtkToolItem *tool_item);
112 #endif /* __GTK_TOOL_ITEM_H__ */