I've no idea here...
[gtkD.git] / src / gtk / AspectFrame.d
blob2cb1f85310326b1deb2b5e62cfb5d9ebc163c127
1 /*
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
26 * outPack = gtk
27 * outFile = AspectFrame
28 * strct = GtkAspectFrame
29 * realStrct=
30 * ctorStrct=
31 * clss = AspectFrame
32 * interf =
33 * class Code: No
34 * interface Code: No
35 * template for:
36 * extend =
37 * implements:
38 * prefixes:
39 * - gtk_aspect_frame_
40 * - gtk_
41 * omit structs:
42 * omit prefixes:
43 * omit code:
44 * imports:
45 * - glib.Str
46 * structWrap:
47 * local aliases:
50 module gtk.AspectFrame;
52 private import gtk.gtktypes;
54 private import lib.gtk;
56 private import glib.Str;
58 /**
59 * Description
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;
88 /**
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;
97 /**
102 * Create a new GtkAspectFrame.
103 * label:
104 * Label text.
105 * xalign:
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)
109 * yalign:
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)
113 * ratio:
114 * The desired aspect ratio.
115 * obey_child:
116 * If TRUE, ratio is ignored, and the aspect
117 * ratio is taken from the requistion of the child.
118 * Returns:
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.
129 * aspect_frame:
130 * a GtkAspectFrame
131 * xalign:
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)
135 * yalign:
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)
139 * ratio:
140 * The desired aspect ratio.
141 * obey_child:
142 * If TRUE, ratio is ignored, and the aspect
143 * ratio is taken from the requistion of the child.
144 * Property Details
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);