]> Pileus Git - ~andy/gtk/blob - docs/reference/gtk/tmpl/gtkmisc.sgml
Discourage use of GtkMisc and GtkAlignment
[~andy/gtk] / docs / reference / gtk / tmpl / gtkmisc.sgml
1 <!-- ##### SECTION Title ##### -->
2 GtkMisc
3
4 <!-- ##### SECTION Short_Description ##### -->
5 Base class for widgets with alignments and padding
6
7 <!-- ##### SECTION Long_Description ##### -->
8 <para>
9 The #GtkMisc widget is an abstract widget which is not useful itself, but
10 is used to derive subclasses which have alignment and padding attributes.
11 </para>
12 <para>
13 The horizontal and vertical padding attributes allows extra space to be
14 added around the widget.
15 </para>
16 <para>
17 The horizontal and vertical alignment attributes enable the widget to be
18 positioned within its allocated area. Note that if the widget is added to
19 a container in such a way that it expands automatically to fill its
20 allocated area, the alignment settings will not alter the widgets position.
21 </para>
22 <para>
23 Note that the desired effect can in most cases be achieved by using the
24 #GtkWidget:halign, #GtkWidget:valign and #GtkWidget:margin properties
25 on the child widget, so GtkMisc should not be used in new code.
26 </para>
27
28 <!-- ##### SECTION See_Also ##### -->
29 <para>
30
31 </para>
32
33 <!-- ##### SECTION Stability_Level ##### -->
34
35
36 <!-- ##### SECTION Image ##### -->
37
38
39 <!-- ##### STRUCT GtkMisc ##### -->
40 <para>
41 The #GtkMisc-struct struct contains the following fields.
42 (These fields should be considered read-only. They should never be set by
43 an application.)
44
45 <informaltable pgwide="1" frame="none" role="struct">
46 <tgroup cols="2"><colspec colwidth="2*"/><colspec colwidth="8*"/>
47 <tbody>
48
49 <row>
50 <entry>#gfloat <structfield>xalign</structfield>;</entry>
51 <entry>the horizontal alignment, from 0 (left) to 1 (right).</entry>
52 </row>
53
54 <row>
55 <entry>#gfloat <structfield>yalign</structfield>;</entry>
56 <entry>the vertical alignment, from 0 (top) to 1 (bottom).</entry>
57 </row>
58
59 <row>
60 <entry>#guint16 <structfield>xpad</structfield>;</entry>
61 <entry>the amount of space to add on the left and right of the widget,
62 in pixels.</entry>
63 </row>
64
65 <row>
66 <entry>#guint16 <structfield>ypad</structfield>;</entry>
67 <entry>the amount of space to add on the top and bottom of the widget,
68 in pixels.</entry>
69 </row>
70 </tbody></tgroup></informaltable>
71 </para>
72
73
74 <!-- ##### ARG GtkMisc:xalign ##### -->
75 <para>
76
77 </para>
78
79 <!-- ##### ARG GtkMisc:xpad ##### -->
80 <para>
81
82 </para>
83
84 <!-- ##### ARG GtkMisc:yalign ##### -->
85 <para>
86
87 </para>
88
89 <!-- ##### ARG GtkMisc:ypad ##### -->
90 <para>
91
92 </para>
93
94 <!-- ##### FUNCTION gtk_misc_set_alignment ##### -->
95 <para>
96 Sets the alignment of the widget.
97 </para>
98
99 @misc: a #GtkMisc.
100 @xalign: the horizontal alignment, from 0 (left) to 1 (right).
101 @yalign: the vertical alignment, from 0 (top) to 1 (bottom).
102
103
104 <!-- ##### FUNCTION gtk_misc_set_padding ##### -->
105 <para>
106 Sets the amount of space to add around the widget.
107 </para>
108
109 @misc: a #GtkMisc.
110 @xpad: the amount of space to add on the left and right of the widget,
111 in pixels.
112 @ypad: the amount of space to add on the top and bottom of the widget,
113 in pixels.
114
115
116 <!-- ##### FUNCTION gtk_misc_get_alignment ##### -->
117 <para>
118
119 </para>
120
121 @misc: 
122 @xalign: 
123 @yalign: 
124
125
126 <!-- ##### FUNCTION gtk_misc_get_padding ##### -->
127 <para>
128
129 </para>
130
131 @misc: 
132 @xpad: 
133 @ypad: 
134
135