1 <!-- ##### SECTION Title ##### -->
4 <!-- ##### SECTION Short_Description ##### -->
5 A frame that constrains its child to a particular aspect ratio.
7 <!-- ##### SECTION Long_Description ##### -->
9 The #GtkAspectFrame is useful when you want
10 pack a widget so that it can resize but always retains
11 the same aspect ratio. For instance, one might be
12 drawing a small preview of a larger image. #GtkAspectFrame
13 derives from #GtkFrame, so it can draw a label and
14 a frame around the child. The frame will be
15 "shrink-wrapped" to the size of the child.
18 <!-- ##### SECTION See_Also ##### -->
23 <!-- ##### STRUCT GtkAspectFrame ##### -->
29 <!-- ##### FUNCTION gtk_aspect_frame_new ##### -->
31 Create a new #GtkAspectFrame.
35 @xalign: Horizontal alignment of the child within the allocation of
36 the #GtkAspectFrame. This ranges from 0.0 (left aligned)
37 to 1.0 (right aligned)
38 @yalign: Vertical alignment of the child within the allocation of
39 the #GtkAspectFrame. This ranges from 0.0 (left aligned)
40 to 1.0 (right aligned)
41 @ratio: The desired aspect ratio.
42 @obey_child: If %TRUE, @ratio is ignored, and the aspect
43 ratio is taken from the requistion of the child.
44 @Returns: the new #GtkAspectFrame.
45 <!-- # Unused Parameters # -->
46 @ratio: The desired aspect ratio.
49 <!-- ##### FUNCTION gtk_aspect_frame_set ##### -->
51 Set parameters for an existing #GtkAspectFrame.
54 @aspect_frame: a #GtkAspectFrame
55 @xalign: Horizontal alignment of the child within the allocation of
56 the #GtkAspectFrame. This ranges from 0.0 (left aligned)
57 to 1.0 (right aligned)
58 @yalign: Vertical alignment of the child within the allocation of
59 the #GtkAspectFrame. This ranges from 0.0 (left aligned)
60 to 1.0 (right aligned)
61 @ratio: The desired aspect ratio.
62 @obey_child: If %TRUE, @ratio is ignored, and the aspect
63 ratio is taken from the requistion of the child.