| 1 | /* gtktoolitem.c |
| 2 | * |
| 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> |
| 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 | #if defined(GTK_DISABLE_SINGLE_INCLUDES) && !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION) |
| 27 | #error "Only <gtk/gtk.h> can be included directly." |
| 28 | #endif |
| 29 | |
| 30 | #include <gtk/gtkbin.h> |
| 31 | #include <gtk/gtktooltips.h> |
| 32 | #include <gtk/gtkmenuitem.h> |
| 33 | #include <gtk/gtksizegroup.h> |
| 34 | |
| 35 | G_BEGIN_DECLS |
| 36 | |
| 37 | #define GTK_TYPE_TOOL_ITEM (gtk_tool_item_get_type ()) |
| 38 | #define GTK_TOOL_ITEM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GTK_TYPE_TOOL_ITEM, GtkToolItem)) |
| 39 | #define GTK_TOOL_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_TOOL_ITEM, GtkToolItemClass)) |
| 40 | #define GTK_IS_TOOL_ITEM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GTK_TYPE_TOOL_ITEM)) |
| 41 | #define GTK_IS_TOOL_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_TOOL_ITEM)) |
| 42 | #define GTK_TOOL_ITEM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((o), GTK_TYPE_TOOL_ITEM, GtkToolItemClass)) |
| 43 | |
| 44 | typedef struct _GtkToolItem GtkToolItem; |
| 45 | typedef struct _GtkToolItemClass GtkToolItemClass; |
| 46 | typedef struct _GtkToolItemPrivate GtkToolItemPrivate; |
| 47 | |
| 48 | struct _GtkToolItem |
| 49 | { |
| 50 | GtkBin parent; |
| 51 | |
| 52 | /*< private >*/ |
| 53 | GtkToolItemPrivate *GSEAL (priv); |
| 54 | }; |
| 55 | |
| 56 | struct _GtkToolItemClass |
| 57 | { |
| 58 | GtkBinClass parent_class; |
| 59 | |
| 60 | /* signals */ |
| 61 | gboolean (* ) (GtkToolItem *tool_item); |
| 62 | void (* toolbar_reconfigured) (GtkToolItem *tool_item); |
| 63 | #ifndef GTK_DISABLE_DEPRECATED |
| 64 | gboolean (* set_tooltip) (GtkToolItem *tool_item, |
| 65 | GtkTooltips *tooltips, |
| 66 | const gchar *tip_text, |
| 67 | const gchar *tip_private); |
| 68 | #else |
| 69 | gpointer _set_tooltip; |
| 70 | #endif |
| 71 | |
| 72 | /* Padding for future expansion */ |
| 73 | void (* _gtk_reserved1) (void); |
| 74 | void (* _gtk_reserved2) (void); |
| 75 | void (* _gtk_reserved3) (void); |
| 76 | void (* _gtk_reserved4) (void); |
| 77 | }; |
| 78 | |
| 79 | GType gtk_tool_item_get_type (void) G_GNUC_CONST; |
| 80 | GtkToolItem *gtk_tool_item_new (void); |
| 81 | |
| 82 | void gtk_tool_item_set_homogeneous (GtkToolItem *tool_item, |
| 83 | gboolean homogeneous); |
| 84 | gboolean gtk_tool_item_get_homogeneous (GtkToolItem *tool_item); |
| 85 | |
| 86 | void gtk_tool_item_set_expand (GtkToolItem *tool_item, |
| 87 | gboolean expand); |
| 88 | gboolean gtk_tool_item_get_expand (GtkToolItem *tool_item); |
| 89 | |
| 90 | #ifndef GTK_DISABLE_DEPRECATED |
| 91 | void gtk_tool_item_set_tooltip (GtkToolItem *tool_item, |
| 92 | GtkTooltips *tooltips, |
| 93 | const gchar *tip_text, |
| 94 | const gchar *tip_private); |
| 95 | #endif /* GTK_DISABLE_DEPRECATED */ |
| 96 | void gtk_tool_item_set_tooltip_text (GtkToolItem *tool_item, |
| 97 | const gchar *text); |
| 98 | void gtk_tool_item_set_tooltip_markup (GtkToolItem *tool_item, |
| 99 | const gchar *markup); |
| 100 | |
| 101 | void gtk_tool_item_set_use_drag_window (GtkToolItem *tool_item, |
| 102 | gboolean use_drag_window); |
| 103 | gboolean gtk_tool_item_get_use_drag_window (GtkToolItem *tool_item); |
| 104 | |
| 105 | void gtk_tool_item_set_visible_horizontal (GtkToolItem *tool_item, |
| 106 | gboolean visible_horizontal); |
| 107 | gboolean gtk_tool_item_get_visible_horizontal (GtkToolItem *tool_item); |
| 108 | |
| 109 | void gtk_tool_item_set_visible_vertical (GtkToolItem *tool_item, |
| 110 | gboolean visible_vertical); |
| 111 | gboolean gtk_tool_item_get_visible_vertical (GtkToolItem *tool_item); |
| 112 | |
| 113 | gboolean gtk_tool_item_get_is_important (GtkToolItem *tool_item); |
| 114 | void gtk_tool_item_set_is_important (GtkToolItem *tool_item, |
| 115 | gboolean is_important); |
| 116 | |
| 117 | PangoEllipsizeMode gtk_tool_item_get_ellipsize_mode (GtkToolItem *tool_item); |
| 118 | GtkIconSize gtk_tool_item_get_icon_size (GtkToolItem *tool_item); |
| 119 | GtkOrientation gtk_tool_item_get_orientation (GtkToolItem *tool_item); |
| 120 | GtkToolbarStyle gtk_tool_item_get_toolbar_style (GtkToolItem *tool_item); |
| 121 | GtkReliefStyle gtk_tool_item_get_relief_style (GtkToolItem *tool_item); |
| 122 | gfloat gtk_tool_item_get_text_alignment (GtkToolItem *tool_item); |
| 123 | GtkOrientation gtk_tool_item_get_text_orientation (GtkToolItem *tool_item); |
| 124 | GtkSizeGroup * gtk_tool_item_get_text_size_group (GtkToolItem *tool_item); |
| 125 | |
| 126 | GtkWidget * (GtkToolItem *tool_item); |
| 127 | GtkWidget * (GtkToolItem *tool_item, |
| 128 | const gchar *); |
| 129 | void (GtkToolItem *tool_item, |
| 130 | const gchar *, |
| 131 | GtkWidget *); |
| 132 | void (GtkToolItem *tool_item); |
| 133 | |
| 134 | void gtk_tool_item_toolbar_reconfigured (GtkToolItem *tool_item); |
| 135 | |
| 136 | /* private */ |
| 137 | |
| 138 | gboolean (GtkToolItem *tool_item); |
| 139 | |
| 140 | G_END_DECLS |
| 141 | |
| 142 | #endif /* __GTK_TOOL_ITEM_H__ */ |
| 143 | |