]> Pileus Git - ~andy/gtk/blob - gtk/gtktoolitemgroup.h
GtkToolItemGroup now has label and label-widget properties.
[~andy/gtk] / gtk / gtktoolitemgroup.h
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 #include <gtk/gtkcontainer.h>
26 #include <gtk/gtktoolitem.h>
27
28 G_BEGIN_DECLS
29
30 #define GTK_TYPE_TOOL_ITEM_GROUP           (gtk_tool_item_group_get_type())
31 #define GTK_TOOL_ITEM_GROUP(obj)           (G_TYPE_CHECK_INSTANCE_CAST(obj, GTK_TYPE_TOOL_ITEM_GROUP, GtkToolItemGroup))
32 #define GTK_TOOL_ITEM_GROUP_CLASS(cls)     (G_TYPE_CHECK_CLASS_CAST(cls, GTK_TYPE_TOOL_ITEM_GROUP, GtkToolItemGroupClass))
33 #define GTK_IS_TOOL_ITEM_GROUP(obj)        (G_TYPE_CHECK_INSTANCE_TYPE(obj, GTK_TYPE_TOOL_ITEM_GROUP))
34 #define GTK_IS_TOOL_ITEM_GROUP_CLASS(obj)  (G_TYPE_CHECK_CLASS_TYPE(obj, GTK_TYPE_TOOL_ITEM_GROUP))
35 #define GTK_TOOL_ITEM_GROUP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GTK_TYPE_TOOL_ITEM_GROUP, GtkToolItemGroupClass))
36
37 typedef struct _GtkToolItemGroup        GtkToolItemGroup;
38 typedef struct _GtkToolItemGroupClass   GtkToolItemGroupClass;
39 typedef struct _GtkToolItemGroupPrivate GtkToolItemGroupPrivate;
40
41 /**
42  * GtkToolItemGroup:
43  *
44  * This should not be accessed directly. Use the accessor functions below.
45  */
46 struct _GtkToolItemGroup
47 {
48   GtkContainer parent_instance;
49   GtkToolItemGroupPrivate *priv;
50 };
51
52 struct _GtkToolItemGroupClass
53 {
54   GtkContainerClass parent_class;
55 };
56
57 GType                 gtk_tool_item_group_get_type          (void) G_GNUC_CONST;
58 GtkWidget*            gtk_tool_item_group_new               (const gchar        *label);
59
60 void                  gtk_tool_item_group_set_label         (GtkToolItemGroup   *group,
61                                                              const gchar        *label);
62 void                  gtk_tool_item_group_set_label_widget  (GtkToolItemGroup   *group,
63                                                              GtkWidget          *label_widget);
64 void                  gtk_tool_item_group_set_collapsed      (GtkToolItemGroup  *group,
65                                                              gboolean            collapsed);
66 void                  gtk_tool_item_group_set_ellipsize     (GtkToolItemGroup   *group,
67                                                              PangoEllipsizeMode  ellipsize);
68 void                  gtk_tool_item_group_set_header_relief (GtkToolItemGroup   *group,
69                                                              GtkReliefStyle      style);
70
71 G_CONST_RETURN gchar* gtk_tool_item_group_get_label         (GtkToolItemGroup   *group);
72 GtkWidget            *gtk_tool_item_group_get_label_widget  (GtkToolItemGroup   *group);
73 gboolean              gtk_tool_item_group_get_collapsed     (GtkToolItemGroup   *group);
74 PangoEllipsizeMode    gtk_tool_item_group_get_ellipsize     (GtkToolItemGroup   *group);
75 GtkReliefStyle        gtk_tool_item_group_get_header_relief (GtkToolItemGroup   *group);
76
77 void                  gtk_tool_item_group_insert            (GtkToolItemGroup   *group,
78                                                              GtkToolItem        *item,
79                                                              gint                position);
80 void                  gtk_tool_item_group_set_item_position (GtkToolItemGroup   *group,
81                                                              GtkToolItem        *item,
82                                                              gint                position);
83 gint                  gtk_tool_item_group_get_item_position (GtkToolItemGroup   *group,
84                                                              GtkToolItem        *item);
85
86 guint                 gtk_tool_item_group_get_n_items       (GtkToolItemGroup   *group);
87 GtkToolItem*          gtk_tool_item_group_get_nth_item      (GtkToolItemGroup   *group,
88                                                              guint               index);
89 GtkToolItem*          gtk_tool_item_group_get_drop_item     (GtkToolItemGroup   *group,
90                                                              gint                x,
91                                                              gint                y);
92
93 G_END_DECLS
94
95 #endif /* __GTK_TOOL_ITEM_GROUP_H__ */