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 = GtkFrame.html
48 * - GtkWidget* -> Widget
54 private import gtk
.gtktypes
;
56 private import lib
.gtk
;
58 private import glib
.Str
;
59 private import gtk
.Widget
;
63 * The frame widget is a Bin that surrounds its child
64 * with a decorative frame and an optional label.
65 * If present, the label is drawn in a gap in the
66 * top side of the frame. The position of the
67 * label can be controlled with gtk_frame_set_label_align().
69 private import gtk
.Bin
;
70 public class Frame
: Bin
73 /** the main Gtk struct */
74 protected GtkFrame
* gtkFrame
;
77 public GtkFrame
* getFrameStruct()
83 /** the main Gtk struct as a void* */
84 protected void* getStruct()
86 return cast(void*)gtkFrame
;
90 * Sets our main struct and passes it to the parent class
92 public this (GtkFrame
* gtkFrame
)
94 super(cast(GtkBin
*)gtkFrame
);
95 this.gtkFrame
= gtkFrame
;
99 * Creates frame with label and set it's child widget
101 public this(Widget widget
, char[] label
)
112 * Creates a new GtkFrame, with optional label label.
113 * If label is NULL, the label is omitted.
115 * the text to use as the label of the frame
117 * a new GtkFrame widget
119 public this (char[] label
)
121 // GtkWidget* gtk_frame_new (const gchar *label);
122 this(cast(GtkFrame
*)gtk_frame_new(Str
.toStringz(label
)) );
126 * Sets the text of the label. If label is NULL,
127 * the current label is removed.
131 * the text to use as the label of the frame
133 public void setLabel(char[] label
)
135 // void gtk_frame_set_label (GtkFrame *frame, const gchar *label);
136 gtk_frame_set_label(gtkFrame
, Str
.toStringz(label
));
140 * Sets the label widget for the frame. This is the widget that
141 * will appear embedded in the top edge of the frame as a
146 * the new label widget
148 public void setLabelWidget(Widget labelWidget
)
150 // void gtk_frame_set_label_widget (GtkFrame *frame, GtkWidget *label_widget);
151 gtk_frame_set_label_widget(gtkFrame
, (labelWidget
is null) ?
null : labelWidget
.getWidgetStruct());
155 * Sets the alignment of the frame widget's label. The
156 * default values for a newly created frame are 0.0 and 0.5.
160 * The position of the label along the top edge
161 * of the widget. A value of 0.0 represents left alignment;
162 * 1.0 represents right alignment.
164 * The y alignment of the label. A value of 0.0 aligns under
165 * the frame; 1.0 aligns above the frame.
167 public void setLabelAlign(float xalign
, float yalign
)
169 // void gtk_frame_set_label_align (GtkFrame *frame, gfloat xalign, gfloat yalign);
170 gtk_frame_set_label_align(gtkFrame
, xalign
, yalign
);
174 * Sets the shadow type for frame.
178 * the new GtkShadowType
180 public void setShadowType(GtkShadowType type
)
182 // void gtk_frame_set_shadow_type (GtkFrame *frame, GtkShadowType type);
183 gtk_frame_set_shadow_type(gtkFrame
, type
);
187 * If the frame's label widget is a GtkLabel, returns the
188 * text in the label widget. (The frame will have a GtkLabel
189 * for the label widget if a non-NULL argument was passed
190 * to gtk_frame_new().)
194 * the text in the label, or NULL if there
195 * was no label widget or the lable widget was not
196 * a GtkLabel. This string is owned by GTK+ and
197 * must not be modified or freed.
199 public char[] getLabel()
201 // const gchar* gtk_frame_get_label (GtkFrame *frame);
202 return Str
.toString(gtk_frame_get_label(gtkFrame
) );
206 * Retrieves the X and Y alignment of the frame's label. See
207 * gtk_frame_set_label_align().
211 * location to store X alignment of frame's label, or NULL
213 * location to store X alignment of frame's label, or NULL
215 public void getLabelAlign(float* xalign
, float* yalign
)
217 // void gtk_frame_get_label_align (GtkFrame *frame, gfloat *xalign, gfloat *yalign);
218 gtk_frame_get_label_align(gtkFrame
, xalign
, yalign
);
222 * Retrieves the label widget for the frame. See
223 * gtk_frame_set_label_widget().
227 * the label widget, or NULL if there is none.
229 public Widget
getLabelWidget()
231 // GtkWidget* gtk_frame_get_label_widget (GtkFrame *frame);
232 return new Widget( gtk_frame_get_label_widget(gtkFrame
) );
236 * Retrieves the shadow type of the frame. See
237 * gtk_frame_set_shadow_type().
241 * the current shadow type of the frame.
243 * The "label" property
244 * "label" gchararray : Read / Write
245 * Text of the frame's label.
246 * Default value: NULL
248 public GtkShadowType
getShadowType()
250 // GtkShadowType gtk_frame_get_shadow_type (GtkFrame *frame);
251 return gtk_frame_get_shadow_type(gtkFrame
);