Beast - Music Synthesizer and Composer  0.11.1+10.g2da35
glewidgets.h
Go to the documentation of this file.
1  #ifndef __GLE_WIDGETS_H__
2 #define __GLE_WIDGETS_H__
3 #include <gtk/gtk.h>
4 #ifdef __cplusplus
5 extern "C" {
6 #endif /* __cplusplus */
7 
8 /* GTK - The GIMP Toolkit
9  * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
10  *
11  * GtkWrapBox: Wrapping box widget
12  * Copyright (C) 1999 Tim Janik
13  *
14  * This library is free software; you can redistribute it and/or
15  * modify it under the terms of the GNU Library General Public
16  * License as published by the Free Software Foundation; either
17  * version 2 of the License, or (at your option) any later version.
18  *
19  * This library is distributed in the hope that it will be useful,
20  * but WITHOUT ANY WARRANTY; without even the implied warranty of
21  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22  * Library General Public License for more details.
23  *
24  * You should have received a copy of the GNU Library General Public
25  * License along with this library; if not, write to the
26  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
27  * Boston, MA 02111-1307, USA.
28  */
29 #ifndef __GTK_WRAP_BOX_H__
30 #define __GTK_WRAP_BOX_H__
31 
32 
33 /* #include <gdk/gdk.h> */
34 /* #include <gtk/gtkcontainer.h> */
35 
36 
37 #ifdef __cplusplus
38 extern "C" {
39 #endif /* __cplusplus */
40 
41 
42 /* --- type macros --- */
43 #define GTK_TYPE_WRAP_BOX (gtk_wrap_box_get_type ())
44 #define GTK_WRAP_BOX(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_WRAP_BOX, GtkWrapBox))
45 #define GTK_WRAP_BOX_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_WRAP_BOX, GtkWrapBoxClass))
46 #define GTK_IS_WRAP_BOX(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_WRAP_BOX))
47 #define GTK_IS_WRAP_BOX_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_WRAP_BOX))
48 #define GTK_WRAP_BOX_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_WRAP_BOX, GtkWrapBoxClass))
49 
50 
51 /* --- typedefs --- */
52 typedef struct _GtkWrapBox GtkWrapBox;
53 typedef struct _GtkWrapBoxClass GtkWrapBoxClass;
54 typedef struct _GtkWrapBoxChild GtkWrapBoxChild;
55 
56 /* --- GtkWrapBox --- */
58 {
59  GtkContainer container;
60 
61  guint homogeneous : 1;
62  guint justify : 4;
63  guint line_justify : 4;
64  guint8 hspacing;
65  guint8 vspacing;
66  guint16 n_children;
67  GtkWrapBoxChild *children;
68  gfloat aspect_ratio; /* 1/256..256 */
69  guint child_limit;
70 };
72 {
73  GtkContainerClass parent_class;
74 
75  GSList* (*rlist_line_children) (GtkWrapBox *wbox,
76  GtkWrapBoxChild **child_p,
77  GtkAllocation *area,
78  guint *max_child_size,
79  gboolean *expand_line);
80 };
82 {
83  GtkWidget *widget;
84  guint hexpand : 1;
85  guint hfill : 1;
86  guint vexpand : 1;
87  guint vfill : 1;
88  guint wrapped : 1;
89 
90  GtkWrapBoxChild *next;
91 };
92 #define GTK_JUSTIFY_TOP GTK_JUSTIFY_LEFT
93 #define GTK_JUSTIFY_BOTTOM GTK_JUSTIFY_RIGHT
94 
95 
96 /* --- prototypes --- */
97 GtkType gtk_wrap_box_get_type (void);
98 void gtk_wrap_box_set_homogeneous (GtkWrapBox *wbox,
99  gboolean homogeneous);
100 void gtk_wrap_box_set_hspacing (GtkWrapBox *wbox,
101  guint hspacing);
102 void gtk_wrap_box_set_vspacing (GtkWrapBox *wbox,
103  guint vspacing);
104 void gtk_wrap_box_set_justify (GtkWrapBox *wbox,
105  GtkJustification justify);
106 void gtk_wrap_box_set_line_justify (GtkWrapBox *wbox,
107  GtkJustification line_justify);
108 void gtk_wrap_box_set_aspect_ratio (GtkWrapBox *wbox,
109  gfloat aspect_ratio);
110 void gtk_wrap_box_pack (GtkWrapBox *wbox,
111  GtkWidget *child,
112  gboolean hexpand,
113  gboolean hfill,
114  gboolean vexpand,
115  gboolean vfill);
116 void gtk_wrap_box_pack_wrapped (GtkWrapBox *wbox,
117  GtkWidget *child,
118  gboolean hexpand,
119  gboolean hfill,
120  gboolean vexpand,
121  gboolean vfill,
122  gboolean wrapped);
123 void gtk_wrap_box_reorder_child (GtkWrapBox *wbox,
124  GtkWidget *child,
125  gint position);
126 void gtk_wrap_box_query_child_packing (GtkWrapBox *wbox,
127  GtkWidget *child,
128  gboolean *hexpand,
129  gboolean *hfill,
130  gboolean *vexpand,
131  gboolean *vfill,
132  gboolean *wrapped);
133 void gtk_wrap_box_set_child_packing (GtkWrapBox *wbox,
134  GtkWidget *child,
135  gboolean hexpand,
136  gboolean hfill,
137  gboolean vexpand,
138  gboolean vfill,
139  gboolean wrapped);
140 guint* gtk_wrap_box_query_line_lengths (GtkWrapBox *wbox,
141  guint *n_lines);
142 
143 
144 
145 #ifdef __cplusplus
146 }
147 #endif /* __cplusplus */
148 
149 
150 #endif /* __GTK_WRAP_BOX_H__ */
151 /* GTK - The GIMP Toolkit
152  * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
153  *
154  * GtkHWrapBox: Horizontal wrapping box widget
155  * Copyright (C) 1999 Tim Janik
156  *
157  * This library is free software; you can redistribute it and/or
158  * modify it under the terms of the GNU Library General Public
159  * License as published by the Free Software Foundation; either
160  * version 2 of the License, or (at your option) any later version.
161  *
162  * This library is distributed in the hope that it will be useful,
163  * but WITHOUT ANY WARRANTY; without even the implied warranty of
164  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
165  * Library General Public License for more details.
166  *
167  * You should have received a copy of the GNU Library General Public
168  * License along with this library; if not, write to the
169  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
170  * Boston, MA 02111-1307, USA.
171  */
172 #ifndef __GTK_HWRAP_BOX_H__
173 #define __GTK_HWRAP_BOX_H__
174 
175 
176 /* #include <gle/gtkwrapbox.h> */
177 
178 
179 #ifdef __cplusplus
180 extern "C" {
181 #endif /* __cplusplus */
182 
183 
184 /* --- type macros --- */
185 #define GTK_TYPE_HWRAP_BOX (gtk_hwrap_box_get_type ())
186 #define GTK_HWRAP_BOX(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_HWRAP_BOX, GtkHWrapBox))
187 #define GTK_HWRAP_BOX_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_HWRAP_BOX, GtkHWrapBoxClass))
188 #define GTK_IS_HWRAP_BOX(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_HWRAP_BOX))
189 #define GTK_IS_HWRAP_BOX_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_HWRAP_BOX))
190 #define GTK_HWRAP_BOX_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_HWRAP_BOX, GtkHWrapBoxClass))
191 
192 
193 /* --- typedefs --- */
194 typedef struct _GtkHWrapBox GtkHWrapBox;
195 typedef struct _GtkHWrapBoxClass GtkHWrapBoxClass;
196 
197 
198 /* --- GtkHWrapBox --- */
200 {
201  GtkWrapBox parent_widget;
202 
203  /*<h2v-off>*/
204  guint max_child_width;
205  guint max_child_height;
206  /*<h2v-on>*/
207 };
208 
210 {
211  GtkWrapBoxClass parent_class;
212 };
213 
214 
215 /* --- prototypes --- */
216 GtkType gtk_hwrap_box_get_type (void);
217 GtkWidget* gtk_hwrap_box_new (gboolean homogeneous);
218 
219 
220 #ifdef __cplusplus
221 }
222 #endif /* __cplusplus */
223 
224 
225 #endif /* __GTK_HWRAP_BOX_H__ */
226 /* GTK - The GIMP Toolkit
227  * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
228  *
229  * GtkVWrapBox: Vertical wrapping box widget
230  * Copyright (C) 1999 Tim Janik
231  *
232  * This library is free software; you can redistribute it and/or
233  * modify it under the terms of the GNU Library General Public
234  * License as published by the Free Software Foundation; either
235  * version 2 of the License, or (at your option) any later version.
236  *
237  * This library is distributed in the hope that it will be useful,
238  * but WITHOUT ANY WARRANTY; without even the implied warranty of
239  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
240  * Library General Public License for more details.
241  *
242  * You should have received a copy of the GNU Library General Public
243  * License along with this library; if not, write to the
244  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
245  * Boston, MA 02111-1307, USA.
246  */
247 #ifndef __GTK_VWRAP_BOX_H__
248 #define __GTK_VWRAP_BOX_H__
249 
250 
251 /* #include <gle/gtkwrapbox.h> */
252 
253 
254 #ifdef __cplusplus
255 extern "C" {
256 #endif /* __cplusplus */
257 
258 
259 /* --- type macros --- */
260 #define GTK_TYPE_VWRAP_BOX (gtk_vwrap_box_get_type ())
261 #define GTK_VWRAP_BOX(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_VWRAP_BOX, GtkVWrapBox))
262 #define GTK_VWRAP_BOX_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_VWRAP_BOX, GtkVWrapBoxClass))
263 #define GTK_IS_VWRAP_BOX(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_VWRAP_BOX))
264 #define GTK_IS_VWRAP_BOX_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_VWRAP_BOX))
265 #define GTK_VWRAP_BOX_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_VWRAP_BOX, GtkVWrapBoxClass))
266 
267 
268 /* --- typedefs --- */
269 typedef struct _GtkVWrapBox GtkVWrapBox;
270 typedef struct _GtkVWrapBoxClass GtkVWrapBoxClass;
271 
272 
273 /* --- GtkVWrapBox --- */
275 {
276  GtkWrapBox parent_widget;
277 
278  /*<h2v-off>*/
279  guint max_child_width;
280  guint max_child_height;
281  /*<h2v-on>*/
282 };
283 
285 {
286  GtkWrapBoxClass parent_class;
287 };
288 
289 
290 /* --- prototypes --- */
291 GtkType gtk_vwrap_box_get_type (void);
292 GtkWidget* gtk_vwrap_box_new (gboolean homogeneous);
293 
294 
295 #ifdef __cplusplus
296 }
297 #endif /* __cplusplus */
298 
299 
300 #endif /* __GTK_VWRAP_BOX_H__ */
301 #ifdef __cplusplus
302 }
303 #endif /* __cplusplus */
304 #endif /* __GLE_WIDGETS_H__ */
Definition: glewidgets.h:209
Definition: glewidgets.h:71
Definition: glewidgets.h:284
Definition: glewidgets.h:57
Definition: glewidgets.h:274
Definition: glewidgets.h:199
Definition: glewidgets.h:81