]> Pileus Git - ~andy/gtk/blob - docs/reference/gtk/tmpl/gtkaspectframe.sgml
9a6960578e341bbe16f0af6cd0aac116f062de24
[~andy/gtk] / docs / reference / gtk / tmpl / gtkaspectframe.sgml
1 <!-- ##### SECTION Title ##### -->
2 GtkAspectFrame
3
4 <!-- ##### SECTION Short_Description ##### -->
5 A frame that constrains its child to a particular aspect ratio.
6
7 <!-- ##### SECTION Long_Description ##### -->
8 <para>
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.
16 </para>
17
18 <!-- ##### SECTION See_Also ##### -->
19 <para>
20
21 </para>
22
23 <!-- ##### STRUCT GtkAspectFrame ##### -->
24 <para>
25
26 </para>
27
28
29 <!-- ##### FUNCTION gtk_aspect_frame_new ##### -->
30 <para>
31 Create a new #GtkAspectFrame.
32 </para>
33
34 @label: Label text.
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.
47
48
49 <!-- ##### FUNCTION gtk_aspect_frame_set ##### -->
50 <para>
51 Set parameters for an existing #GtkAspectFrame.
52 </para>
53
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.
64
65