summaryrefslogtreecommitdiff
path: root/docs/reference/gtk/tmpl/gtkmisc.sgml
blob: c3466bb6fd04789f8f0339432316727b8c8efbd7 (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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
<!-- ##### SECTION Title ##### -->
GtkMisc

<!-- ##### SECTION Short_Description ##### -->
Base class for widgets with alignments and padding

<!-- ##### SECTION Long_Description ##### -->
<para>
The #GtkMisc widget is an abstract widget which is not useful itself, but
is used to derive subclasses which have alignment and padding attributes.
</para>
<para>
The horizontal and vertical padding attributes allows extra space to be
added around the widget.
</para>
<para>
The horizontal and vertical alignment attributes enable the widget to be
positioned within its allocated area. Note that if the widget is added to
a container in such a way that it expands automatically to fill its
allocated area, the alignment settings will not alter the widgets position.
</para>

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

</para>

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


<!-- ##### SECTION Image ##### -->


<!-- ##### STRUCT GtkMisc ##### -->
<para>
The #GtkMisc-struct struct contains the following fields.
(These fields should be considered read-only. They should never be set by
an application.)

<informaltable pgwide="1" frame="none" role="struct">
<tgroup cols="2"><colspec colwidth="2*"/><colspec colwidth="8*"/>
<tbody>

<row>
<entry>#gfloat <structfield>xalign</structfield>;</entry>
<entry>the horizontal alignment, from 0 (left) to 1 (right).</entry>
</row>

<row>
<entry>#gfloat <structfield>yalign</structfield>;</entry>
<entry>the vertical alignment, from 0 (top) to 1 (bottom).</entry>
</row>

<row>
<entry>#guint16 <structfield>xpad</structfield>;</entry>
<entry>the amount of space to add on the left and right of the widget,
in pixels.</entry>
</row>

<row>
<entry>#guint16 <structfield>ypad</structfield>;</entry>
<entry>the amount of space to add on the top and bottom of the widget,
in pixels.</entry>
</row>
</tbody></tgroup></informaltable>
</para>


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

</para>

<!-- ##### ARG GtkMisc:xpad ##### -->
<para>

</para>

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

</para>

<!-- ##### ARG GtkMisc:ypad ##### -->
<para>

</para>

<!-- ##### FUNCTION gtk_misc_set_alignment ##### -->
<para>
Sets the alignment of the widget.
</para>

@misc: a #GtkMisc.
@xalign: the horizontal alignment, from 0 (left) to 1 (right).
@yalign: the vertical alignment, from 0 (top) to 1 (bottom).


<!-- ##### FUNCTION gtk_misc_set_padding ##### -->
<para>
Sets the amount of space to add around the widget.
</para>

@misc: a #GtkMisc.
@xpad: the amount of space to add on the left and right of the widget,
in pixels.
@ypad: the amount of space to add on the top and bottom of the widget,
in pixels.


<!-- ##### FUNCTION gtk_misc_get_alignment ##### -->
<para>

</para>

@misc: 
@xalign: 
@yalign: 


<!-- ##### FUNCTION gtk_misc_get_padding ##### -->
<para>

</para>

@misc: 
@xpad: 
@ypad: