2 * This file is part of duit.
4 * duit is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; either version 2.1 of the License, or
7 * (at your option) any later version.
9 * duit 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
12 * GNU Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with duit; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 // generated automatically - do not change
20 // find conversion definition on APILookup.txt
21 // implement new conversion functionalities on the wrap.utils pakage
24 * Conversion parameters:
25 * inFile = GtkSizeGroup.html
28 * strct = GtkSizeGroup
47 * - GtkWidget* -> Widget
53 private import gtk
.gtktypes
;
55 private import lib
.gtk
;
57 private import gtk
.Widget
;
61 * GtkSizeGroup provides a mechanism for grouping a number of widgets
62 * together so they all request the same amount of space. This is
63 * typically useful when you want a column of widgets to have the same
64 * size, but you can't use a GtkTable widget.
65 * In detail, the size requested for each widget in a GtkSizeGroup is
66 * the maximum of the sizes that would have been requested for each
67 * widget in the size group if they were not in the size group. The mode
68 * of the size group (see gtk_size_group_set_mode()) determines whether
69 * this applies to the horizontal size, the vertical size, or both sizes.
70 * Note that size groups only affect the amount of space requested, not
71 * the size that the widgets finally receive. If you want the widgets in
72 * a GtkSizeGroup to actually be the same size, you need to pack them in
73 * such a way that they get the size they request and not more. For
74 * example, if you are packing your widgets into a table, you would not
75 * include the GTK_FILL flag.
76 * GtkSizeGroup objects are referenced by each widget in the size group,
77 * so once you have added all widgets to a GtkSizeGroup, you can drop
78 * the initial reference to the size group with g_object_unref(). If the
79 * widgets in the size group are subsequently destroyed, then they will
80 * be removed from the size group and drop their references on the size
81 * group; when all widgets have been removed, the size group will be
83 * Widgets can be part of multiple size groups; GTK+ will compute the
84 * horizontal size of a widget from the horizontal requisition of all
85 * widgets that can be reached from the widget by a chain of size groups
86 * of type GTK_SIZE_GROUP_HORIZONTAL or GTK_SIZE_GROUP_BOTH, and the
87 * vertical size from the vertical requisition of all widgets that can be
88 * reached from the widget by a chain of size groups of type
89 * GTK_SIZE_GROUP_VERTICAL or GTK_SIZE_GROUP_BOTH.
91 private import gobject
.ObjectG
;
92 public class SizeGroup
: ObjectG
95 /** the main Gtk struct */
96 protected GtkSizeGroup
* gtkSizeGroup
;
99 public GtkSizeGroup
* getSizeGroupStruct()
105 /** the main Gtk struct as a void* */
106 protected void* getStruct()
108 return cast(void*)gtkSizeGroup
;
112 * Sets our main struct and passes it to the parent class
114 public this (GtkSizeGroup
* gtkSizeGroup
)
116 super(cast(GObject
*)gtkSizeGroup
);
117 this.gtkSizeGroup
= gtkSizeGroup
;
126 * Create a new GtkSizeGroup.
128 * the mode for the new size group.
130 * a newly created GtkSizeGroup
132 public this (GtkSizeGroupMode mode
)
134 // GtkSizeGroup* gtk_size_group_new (GtkSizeGroupMode mode);
135 this(cast(GtkSizeGroup
*)gtk_size_group_new(mode
) );
139 * Sets the GtkSizeGroupMode of the size group. The mode of the size
140 * group determines whether the widgets in the size group should
141 * all have the same horizontal requisition (GTK_SIZE_GROUP_MODE_HORIZONTAL)
142 * all have the same vertical requisition (GTK_SIZE_GROUP_MODE_VERTICAL),
143 * or should all have the same requisition in both directions
144 * (GTK_SIZE_GROUP_MODE_BOTH).
148 * the mode to set for the size group.
150 public void setMode(GtkSizeGroupMode mode
)
152 // void gtk_size_group_set_mode (GtkSizeGroup *size_group, GtkSizeGroupMode mode);
153 gtk_size_group_set_mode(gtkSizeGroup
, mode
);
157 * Gets the current mode of the size group. See gtk_size_group_set_mode().
161 * the current mode of the size group.
163 public GtkSizeGroupMode
getMode()
165 // GtkSizeGroupMode gtk_size_group_get_mode (GtkSizeGroup *size_group);
166 return gtk_size_group_get_mode(gtkSizeGroup
);
170 * Sets whether unmapped widgets should be ignored when
171 * calculating the size.
175 * whether unmapped widgets should be ignored
176 * when calculating the size
179 public void setIgnoreHidden(int ignoreHidden
)
181 // void gtk_size_group_set_ignore_hidden (GtkSizeGroup *size_group, gboolean ignore_hidden);
182 gtk_size_group_set_ignore_hidden(gtkSizeGroup
, ignoreHidden
);
186 * Returns if invisible widgets are ignored when calculating the size.
190 * TRUE if invisible widgets are ignored.
193 public int getIgnoreHidden()
195 // gboolean gtk_size_group_get_ignore_hidden (GtkSizeGroup *size_group);
196 return gtk_size_group_get_ignore_hidden(gtkSizeGroup
);
200 * Adds a widget to a GtkSizeGroup. In the future, the requisition
201 * of the widget will be determined as the maximum of its requisition
202 * and the requisition of the other widgets in the size group.
203 * Whether this applies horizontally, vertically, or in both directions
204 * depends on the mode of the size group. See gtk_size_group_set_mode().
208 * the GtkWidget to add
210 public void addWidget(Widget widget
)
212 // void gtk_size_group_add_widget (GtkSizeGroup *size_group, GtkWidget *widget);
213 gtk_size_group_add_widget(gtkSizeGroup
, (widget
is null) ?
null : widget
.getWidgetStruct());
217 * Removes a widget from a GtkSizeGroup.
221 * the GtkWidget to remove
223 public void removeWidget(Widget widget
)
225 // void gtk_size_group_remove_widget (GtkSizeGroup *size_group, GtkWidget *widget);
226 gtk_size_group_remove_widget(gtkSizeGroup
, (widget
is null) ?
null : widget
.getWidgetStruct());
230 * Returns the list of widgets associated with size_group.
234 * a GSList of widgets. The list is owned by GTK+
235 * and should not be modified.
238 * The "ignore-hidden" property
239 * "ignore-hidden" gboolean : Read / Write
240 * If TRUE, unmapped widgets are ignored when determining
241 * the size of the group.
242 * Default value: FALSE
245 public GSList
* getWidgets()
247 // GSList* gtk_size_group_get_widgets (GtkSizeGroup *size_group);
248 return gtk_size_group_get_widgets(gtkSizeGroup
);