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 = GtkAspectFrame.html
27 * outFile = AspectFrame
28 * strct = GtkAspectFrame
50 module gtk
.AspectFrame
;
52 private import gtk
.gtktypes
;
54 private import lib
.gtk
;
56 private import glib
.Str
;
60 * The GtkAspectFrame is useful when you want
61 * pack a widget so that it can resize but always retains
62 * the same aspect ratio. For instance, one might be
63 * drawing a small preview of a larger image. GtkAspectFrame
64 * derives from GtkFrame, so it can draw a label and
65 * a frame around the child. The frame will be
66 * "shrink-wrapped" to the size of the child.
68 private import gtk
.Frame
;
69 public class AspectFrame
: Frame
72 /** the main Gtk struct */
73 protected GtkAspectFrame
* gtkAspectFrame
;
76 public GtkAspectFrame
* getAspectFrameStruct()
78 return gtkAspectFrame
;
82 /** the main Gtk struct as a void* */
83 protected void* getStruct()
85 return cast(void*)gtkAspectFrame
;
89 * Sets our main struct and passes it to the parent class
91 public this (GtkAspectFrame
* gtkAspectFrame
)
93 super(cast(GtkFrame
*)gtkAspectFrame
);
94 this.gtkAspectFrame
= gtkAspectFrame
;
102 * Create a new GtkAspectFrame.
106 * Horizontal alignment of the child within the allocation of
107 * the GtkAspectFrame. This ranges from 0.0 (left aligned)
108 * to 1.0 (right aligned)
110 * Vertical alignment of the child within the allocation of
111 * the GtkAspectFrame. This ranges from 0.0 (left aligned)
112 * to 1.0 (right aligned)
114 * The desired aspect ratio.
116 * If TRUE, ratio is ignored, and the aspect
117 * ratio is taken from the requistion of the child.
119 * the new GtkAspectFrame.
121 public this (char[] label
, float xalign
, float yalign
, float ratio
, int obeyChild
)
123 // GtkWidget* gtk_aspect_frame_new (const gchar *label, gfloat xalign, gfloat yalign, gfloat ratio, gboolean obey_child);
124 this(cast(GtkAspectFrame
*)gtk_aspect_frame_new(Str
.toStringz(label
), xalign
, yalign
, ratio
, obeyChild
) );
128 * Set parameters for an existing GtkAspectFrame.
132 * Horizontal alignment of the child within the allocation of
133 * the GtkAspectFrame. This ranges from 0.0 (left aligned)
134 * to 1.0 (right aligned)
136 * Vertical alignment of the child within the allocation of
137 * the GtkAspectFrame. This ranges from 0.0 (left aligned)
138 * to 1.0 (right aligned)
140 * The desired aspect ratio.
142 * If TRUE, ratio is ignored, and the aspect
143 * ratio is taken from the requistion of the child.
145 * The "obey-child" property
146 * "obey-child" gboolean : Read / Write
147 * Force aspect ratio to match that of the frame's child.
148 * Default value: TRUE
150 public void set(float xalign
, float yalign
, float ratio
, int obeyChild
)
152 // void gtk_aspect_frame_set (GtkAspectFrame *aspect_frame, gfloat xalign, gfloat yalign, gfloat ratio, gboolean obey_child);
153 gtk_aspect_frame_set(gtkAspectFrame
, xalign
, yalign
, ratio
, obeyChild
);