1 | /* GtkToolPalette -- A tool palette with categories and DnD support |
2 | * Copyright (C) 2008 Openismus GmbH |
3 | * |
4 | * This library is free software; you can redistribute it and/or |
5 | * modify it under the terms of the GNU Lesser General Public |
6 | * License as published by the Free Software Foundation; either |
7 | * version 2.1 of the License, or (at your option) any later version. |
8 | * |
9 | * This library is distributed in the hope that it will be useful, |
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
12 | * Lesser General Public License for more details. |
13 | * |
14 | * You should have received a copy of the GNU Lesser General Public |
15 | * License along with this library; if not, write to the Free Software |
16 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
17 | * |
18 | * Authors: |
19 | * Mathias Hasselmann |
20 | */ |
21 | |
22 | #ifndef __GTK_TOOL_ITEM_GROUP_H__ |
23 | #define __GTK_TOOL_ITEM_GROUP_H__ |
24 | |
25 | #if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION) |
26 | #error "Only <gtk/gtk.h> can be included directly." |
27 | #endif |
28 | |
29 | #include <gtk/gtkcontainer.h> |
30 | #include <gtk/gtktoolitem.h> |
31 | |
32 | G_BEGIN_DECLS |
33 | |
34 | #define GTK_TYPE_TOOL_ITEM_GROUP (gtk_tool_item_group_get_type ()) |
35 | #define GTK_TOOL_ITEM_GROUP(obj) (G_TYPE_CHECK_INSTANCE_CAST (obj, GTK_TYPE_TOOL_ITEM_GROUP, GtkToolItemGroup)) |
36 | #define GTK_TOOL_ITEM_GROUP_CLASS(cls) (G_TYPE_CHECK_CLASS_CAST (cls, GTK_TYPE_TOOL_ITEM_GROUP, GtkToolItemGroupClass)) |
37 | #define GTK_IS_TOOL_ITEM_GROUP(obj) (G_TYPE_CHECK_INSTANCE_TYPE (obj, GTK_TYPE_TOOL_ITEM_GROUP)) |
38 | #define GTK_IS_TOOL_ITEM_GROUP_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE (obj, GTK_TYPE_TOOL_ITEM_GROUP)) |
39 | #define GTK_TOOL_ITEM_GROUP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_TOOL_ITEM_GROUP, GtkToolItemGroupClass)) |
40 | |
41 | typedef struct _GtkToolItemGroup GtkToolItemGroup; |
42 | typedef struct _GtkToolItemGroupClass GtkToolItemGroupClass; |
43 | typedef struct _GtkToolItemGroupPrivate GtkToolItemGroupPrivate; |
44 | |
45 | /** |
46 | * GtkToolItemGroup: |
47 | * |
48 | * This should not be accessed directly. Use the accessor functions below. |
49 | */ |
50 | struct _GtkToolItemGroup |
51 | { |
52 | GtkContainer parent_instance; |
53 | GtkToolItemGroupPrivate *priv; |
54 | }; |
55 | |
56 | struct _GtkToolItemGroupClass |
57 | { |
58 | GtkContainerClass parent_class; |
59 | }; |
60 | |
61 | GType gtk_tool_item_group_get_type (void) G_GNUC_CONST; |
62 | GtkWidget* gtk_tool_item_group_new (const gchar *label); |
63 | |
64 | void gtk_tool_item_group_set_label (GtkToolItemGroup *group, |
65 | const gchar *label); |
66 | void gtk_tool_item_group_set_label_widget (GtkToolItemGroup *group, |
67 | GtkWidget *label_widget); |
68 | void gtk_tool_item_group_set_collapsed (GtkToolItemGroup *group, |
69 | gboolean collapsed); |
70 | void gtk_tool_item_group_set_ellipsize (GtkToolItemGroup *group, |
71 | PangoEllipsizeMode ellipsize); |
72 | void (GtkToolItemGroup *group, |
73 | GtkReliefStyle style); |
74 | |
75 | const gchar * gtk_tool_item_group_get_label (GtkToolItemGroup *group); |
76 | GtkWidget *gtk_tool_item_group_get_label_widget (GtkToolItemGroup *group); |
77 | gboolean gtk_tool_item_group_get_collapsed (GtkToolItemGroup *group); |
78 | PangoEllipsizeMode gtk_tool_item_group_get_ellipsize (GtkToolItemGroup *group); |
79 | GtkReliefStyle (GtkToolItemGroup *group); |
80 | |
81 | void gtk_tool_item_group_insert (GtkToolItemGroup *group, |
82 | GtkToolItem *item, |
83 | gint position); |
84 | void gtk_tool_item_group_set_item_position (GtkToolItemGroup *group, |
85 | GtkToolItem *item, |
86 | gint position); |
87 | gint gtk_tool_item_group_get_item_position (GtkToolItemGroup *group, |
88 | GtkToolItem *item); |
89 | |
90 | guint gtk_tool_item_group_get_n_items (GtkToolItemGroup *group); |
91 | GtkToolItem* gtk_tool_item_group_get_nth_item (GtkToolItemGroup *group, |
92 | guint index); |
93 | GtkToolItem* gtk_tool_item_group_get_drop_item (GtkToolItemGroup *group, |
94 | gint x, |
95 | gint y); |
96 | |
97 | G_END_DECLS |
98 | |
99 | #endif /* __GTK_TOOL_ITEM_GROUP_H__ */ |
100 | |