1 <!-- ##### SECTION Title ##### -->
4 <!-- ##### SECTION Short_Description ##### -->
5 Base class for widgets with alignments and padding
7 <!-- ##### SECTION Long_Description ##### -->
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.
13 The horizontal and vertical padding attributes allows extra space to be
14 added around the widget.
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.
23 <!-- ##### SECTION See_Also ##### -->
28 <!-- ##### SECTION Stability_Level ##### -->
31 <!-- ##### SECTION Image ##### -->
34 <!-- ##### STRUCT GtkMisc ##### -->
36 The #GtkMisc-struct struct contains the following fields.
37 (These fields should be considered read-only. They should never be set by
40 <informaltable pgwide="1" frame="none" role="struct">
41 <tgroup cols="2"><colspec colwidth="2*"/><colspec colwidth="8*"/>
45 <entry>#gfloat <structfield>xalign</structfield>;</entry>
46 <entry>the horizontal alignment, from 0 (left) to 1 (right).</entry>
50 <entry>#gfloat <structfield>yalign</structfield>;</entry>
51 <entry>the vertical alignment, from 0 (top) to 1 (bottom).</entry>
55 <entry>#guint16 <structfield>xpad</structfield>;</entry>
56 <entry>the amount of space to add on the left and right of the widget,
61 <entry>#guint16 <structfield>ypad</structfield>;</entry>
62 <entry>the amount of space to add on the top and bottom of the widget,
65 </tbody></tgroup></informaltable>
69 <!-- ##### ARG GtkMisc:xalign ##### -->
74 <!-- ##### ARG GtkMisc:xpad ##### -->
79 <!-- ##### ARG GtkMisc:yalign ##### -->
84 <!-- ##### ARG GtkMisc:ypad ##### -->
89 <!-- ##### FUNCTION gtk_misc_set_alignment ##### -->
91 Sets the alignment of the widget.
95 @xalign: the horizontal alignment, from 0 (left) to 1 (right).
96 @yalign: the vertical alignment, from 0 (top) to 1 (bottom).
99 <!-- ##### FUNCTION gtk_misc_set_padding ##### -->
101 Sets the amount of space to add around the widget.
105 @xpad: the amount of space to add on the left and right of the widget,
107 @ypad: the amount of space to add on the top and bottom of the widget,
111 <!-- ##### FUNCTION gtk_misc_get_alignment ##### -->
121 <!-- ##### FUNCTION gtk_misc_get_padding ##### -->