summaryrefslogtreecommitdiff
path: root/docs/reference/gtk/tmpl/gtkaspectframe.sgml
blob: 25d05e89fd088ad913307624876fb8c186952629 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<!-- ##### SECTION Title ##### -->
GtkAspectFrame

<!-- ##### SECTION Short_Description ##### -->
A frame that constrains its child to a particular aspect ratio

<!-- ##### SECTION Long_Description ##### -->
<para>
The #GtkAspectFrame is useful when you want
pack a widget so that it can resize but always retains
the same aspect ratio. For instance, one might be
drawing a small preview of a larger image. #GtkAspectFrame
derives from #GtkFrame, so it can draw a label and
a frame around the child. The frame will be
"shrink-wrapped" to the size of the child.
</para>

<!-- ##### SECTION See_Also ##### -->
<para>

</para>

<!-- ##### SECTION Stability_Level ##### -->


<!-- ##### STRUCT GtkAspectFrame ##### -->
<para>

</para>


<!-- ##### ARG GtkAspectFrame:obey-child ##### -->
<para>

</para>

<!-- ##### ARG GtkAspectFrame:ratio ##### -->
<para>

</para>

<!-- ##### ARG GtkAspectFrame:xalign ##### -->
<para>

</para>

<!-- ##### ARG GtkAspectFrame:yalign ##### -->
<para>

</para>

<!-- ##### FUNCTION gtk_aspect_frame_new ##### -->
<para>
Create a new #GtkAspectFrame.
</para>

@label: Label text.
@xalign: Horizontal alignment of the child within the allocation of
the #GtkAspectFrame. This ranges from 0.0 (left aligned)
to 1.0 (right aligned)
@yalign: Vertical alignment of the child within the allocation of
the #GtkAspectFrame. This ranges from 0.0 (left aligned)
to 1.0 (right aligned)
@ratio: The desired aspect ratio.
@obey_child: If %TRUE, @ratio is ignored, and the aspect
    ratio is taken from the requistion of the child.
@Returns: the new #GtkAspectFrame.
<!-- # Unused Parameters # -->
@ratio: The desired aspect ratio.


<!-- ##### FUNCTION gtk_aspect_frame_set ##### -->
<para>
Set parameters for an existing #GtkAspectFrame.
</para>

@aspect_frame: a #GtkAspectFrame
@xalign: Horizontal alignment of the child within the allocation of
the #GtkAspectFrame. This ranges from 0.0 (left aligned)
to 1.0 (right aligned)
@yalign: Vertical alignment of the child within the allocation of
the #GtkAspectFrame. This ranges from 0.0 (left aligned)
to 1.0 (right aligned)
@ratio: The desired aspect ratio.
@obey_child: If %TRUE, @ratio is ignored, and the aspect
    ratio is taken from the requistion of the child.