]> Pileus Git - ~andy/gtk/blob - gtk/gtkwrapbox.h
30db2603d788c2b77c62a0b4fdb67f31214a5219
[~andy/gtk] / gtk / gtkwrapbox.h
1 /* 
2  * Copyright (C) 2010 Openismus GmbH
3  *
4  * Authors:
5  *      Tristan Van Berkom <tristanvb@openismus.com>
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Library 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  * Library General Public License for more details.
16  *
17  * You should have received a copy of the GNU Library 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_WRAP_BOX_H__
24 #define __GTK_WRAP_BOX_H__
25
26 #include <gtk/gtkcontainer.h>
27
28 G_BEGIN_DECLS
29
30
31 #define GTK_TYPE_WRAP_BOX                  (gtk_wrap_box_get_type ())
32 #define GTK_WRAP_BOX(obj)                  (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_WRAP_BOX, GtkWrapBox))
33 #define GTK_WRAP_BOX_CLASS(klass)          (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_WRAP_BOX, GtkWrapBoxClass))
34 #define GTK_IS_WRAP_BOX(obj)               (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_WRAP_BOX))
35 #define GTK_IS_WRAP_BOX_CLASS(klass)       (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_WRAP_BOX))
36 #define GTK_WRAP_BOX_GET_CLASS(obj)        (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_WRAP_BOX, GtkWrapBoxClass))
37
38 typedef struct _GtkWrapBox            GtkWrapBox;
39 typedef struct _GtkWrapBoxPrivate     GtkWrapBoxPrivate;
40 typedef struct _GtkWrapBoxClass       GtkWrapBoxClass;
41
42 struct _GtkWrapBox
43 {
44   GtkContainer container;
45
46   /*< private >*/
47   GtkWrapBoxPrivate *priv;
48 };
49
50 struct _GtkWrapBoxClass
51 {
52   GtkContainerClass parent_class;
53 };
54
55 GType                 gtk_wrap_box_get_type                  (void) G_GNUC_CONST;
56
57 GtkWidget            *gtk_wrap_box_new                       (GtkWrapAllocationMode mode,
58                                                               GtkWrapBoxSpreading   spreading,
59                                                               guint                 horizontal_spacing,
60                                                               guint                 vertical_spacing);
61 void                  gtk_wrap_box_set_allocation_mode       (GtkWrapBox           *layout,
62                                                               GtkWrapAllocationMode mode);
63 GtkWrapAllocationMode gtk_wrap_box_get_allocation_mode       (GtkWrapBox           *layout);
64
65 void                  gtk_wrap_box_set_spreading             (GtkWrapBox           *layout,
66                                                               GtkWrapBoxSpreading   spreading);
67 GtkWrapBoxSpreading   gtk_wrap_box_get_spreading             (GtkWrapBox           *layout);
68
69 void                  gtk_wrap_box_set_vertical_spacing      (GtkWrapBox           *layout, 
70                                                               guint                 spacing);
71 guint                 gtk_wrap_box_get_vertical_spacing      (GtkWrapBox           *layout);
72
73 void                  gtk_wrap_box_set_horizontal_spacing    (GtkWrapBox           *layout, 
74                                                               guint                 spacing);
75 guint                 gtk_wrap_box_get_horizontal_spacing    (GtkWrapBox           *layout);
76
77 void                  gtk_wrap_box_set_minimum_line_children (GtkWrapBox           *layout, 
78                                                               guint                 n_children);
79 guint                 gtk_wrap_box_get_minimum_line_children (GtkWrapBox           *layout);
80
81 void                  gtk_wrap_box_set_natural_line_children (GtkWrapBox           *layout, 
82                                                               guint                 n_children);
83 guint                 gtk_wrap_box_get_natural_line_children (GtkWrapBox           *layout);
84
85 void                  gtk_wrap_box_insert_child              (GtkWrapBox           *layout,
86                                                               GtkWidget            *widget,
87                                                               gint                  index,
88                                                               guint                 xpad,
89                                                               guint                 ypad,
90                                                               gboolean              xexpand,
91                                                               gboolean              yexpand,
92                                                               gboolean              xfill,
93                                                               gboolean              yfill);
94
95 void                  gtk_wrap_box_reorder_child             (GtkWrapBox           *layout,
96                                                               GtkWidget            *widget,
97                                                               guint                 index);
98
99 G_END_DECLS
100
101
102 #endif /* __GTK_WRAP_BOX_H__ */