3
* Copyright (C) 2002 Anders Carlsson <andersca@gnome.org>
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>
32
#define GTK_TYPE_TOOL_ITEM (gtk_tool_item_get_type ())
33
#define GTK_TOOL_ITEM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GTK_TYPE_TOOL_ITEM, GtkToolItem))
34
#define GTK_TOOL_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_TOOL_ITEM, GtkToolItemClass))
35
#define GTK_IS_TOOL_ITEM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GTK_TYPE_TOOL_ITEM))
36
#define GTK_IS_TOOL_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_TOOL_ITEM))
37
#define GTK_TOOL_ITEM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((o), GTK_TYPE_TOOL_ITEM, GtkToolItemClass))
39
typedef struct _GtkToolItem GtkToolItem;
40
typedef struct _GtkToolItemClass GtkToolItemClass;
41
typedef struct _GtkToolItemPrivate GtkToolItemPrivate;
48
GtkToolItemPrivate *priv;
51
struct _GtkToolItemClass
53
GtkBinClass parent_class;
56
gboolean (* create_menu_proxy) (GtkToolItem *tool_item);
57
void (* toolbar_reconfigured) (GtkToolItem *tool_item);
58
gboolean (* set_tooltip) (GtkToolItem *tool_item,
59
GtkTooltips *tooltips,
60
const gchar *tip_text,
61
const gchar *tip_private);
63
/* Padding for future expansion */
64
void (* _gtk_reserved1) (void);
65
void (* _gtk_reserved2) (void);
66
void (* _gtk_reserved3) (void);
67
void (* _gtk_reserved4) (void);
70
GType gtk_tool_item_get_type (void) G_GNUC_CONST;
71
GtkToolItem *gtk_tool_item_new (void);
73
void gtk_tool_item_set_homogeneous (GtkToolItem *tool_item,
74
gboolean homogeneous);
75
gboolean gtk_tool_item_get_homogeneous (GtkToolItem *tool_item);
77
void gtk_tool_item_set_expand (GtkToolItem *tool_item,
79
gboolean gtk_tool_item_get_expand (GtkToolItem *tool_item);
81
void gtk_tool_item_set_tooltip (GtkToolItem *tool_item,
82
GtkTooltips *tooltips,
83
const gchar *tip_text,
84
const gchar *tip_private);
86
void gtk_tool_item_set_use_drag_window (GtkToolItem *toolitem,
87
gboolean use_drag_window);
88
gboolean gtk_tool_item_get_use_drag_window (GtkToolItem *toolitem);
90
void gtk_tool_item_set_visible_horizontal (GtkToolItem *toolitem,
91
gboolean visible_horizontal);
92
gboolean gtk_tool_item_get_visible_horizontal (GtkToolItem *toolitem);
94
void gtk_tool_item_set_visible_vertical (GtkToolItem *toolitem,
95
gboolean visible_vertical);
96
gboolean gtk_tool_item_get_visible_vertical (GtkToolItem *toolitem);
98
gboolean gtk_tool_item_get_is_important (GtkToolItem *tool_item);
99
void gtk_tool_item_set_is_important (GtkToolItem *tool_item,
100
gboolean is_important);
102
GtkIconSize gtk_tool_item_get_icon_size (GtkToolItem *tool_item);
103
GtkOrientation gtk_tool_item_get_orientation (GtkToolItem *tool_item);
104
GtkToolbarStyle gtk_tool_item_get_toolbar_style (GtkToolItem *tool_item);
105
GtkReliefStyle gtk_tool_item_get_relief_style (GtkToolItem *tool_item);
107
GtkWidget * gtk_tool_item_retrieve_proxy_menu_item (GtkToolItem *tool_item);
108
GtkWidget * gtk_tool_item_get_proxy_menu_item (GtkToolItem *tool_item,
109
const gchar *menu_item_id);
110
void gtk_tool_item_set_proxy_menu_item (GtkToolItem *tool_item,
111
const gchar *menu_item_id,
112
GtkWidget *menu_item);
113
void gtk_tool_item_rebuild_menu (GtkToolItem *tool_item);
115
/* internal function */
116
void _gtk_tool_item_toolbar_reconfigured (GtkToolItem *tool_item);
120
#endif /* __GTK_TOOL_ITEM_H__ */