1999-08-16 18:51:52 +00:00
|
|
|
<!-- ##### SECTION Title ##### -->
|
|
|
|
GtkMisc
|
|
|
|
|
|
|
|
<!-- ##### SECTION Short_Description ##### -->
|
2004-10-11 20:10:52 +00:00
|
|
|
Base class for widgets with alignments and padding
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
<!-- ##### 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>
|
2010-09-19 05:01:09 +00:00
|
|
|
<para>
|
|
|
|
Note that the desired effect can in most cases be achieved by using the
|
|
|
|
#GtkWidget:halign, #GtkWidget:valign and #GtkWidget:margin properties
|
2010-10-22 14:52:08 +00:00
|
|
|
on the child widget, so GtkMisc should not be used in new code.
|
2010-09-19 05:01:09 +00:00
|
|
|
</para>
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
<!-- ##### SECTION See_Also ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
2005-06-20 22:06:27 +00:00
|
|
|
<!-- ##### SECTION Stability_Level ##### -->
|
|
|
|
|
|
|
|
|
2010-05-08 05:18:53 +00:00
|
|
|
<!-- ##### SECTION Image ##### -->
|
|
|
|
|
|
|
|
|
1999-08-16 18:51:52 +00:00
|
|
|
<!-- ##### 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.)
|
|
|
|
|
2002-05-28 22:23:55 +00:00
|
|
|
<informaltable pgwide="1" frame="none" role="struct">
|
|
|
|
<tgroup cols="2"><colspec colwidth="2*"/><colspec colwidth="8*"/>
|
1999-08-16 18:51:52 +00:00
|
|
|
<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>
|
1999-08-17 13:10:00 +00:00
|
|
|
</tbody></tgroup></informaltable>
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
|
|
|
|
2004-07-20 02:26:06 +00:00
|
|
|
<!-- ##### ARG GtkMisc:xalign ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<!-- ##### ARG GtkMisc:xpad ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<!-- ##### ARG GtkMisc:yalign ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<!-- ##### ARG GtkMisc:ypad ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
1999-08-16 18:51:52 +00:00
|
|
|
<!-- ##### 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.
|
|
|
|
|
|
|
|
|
2001-09-08 06:24:46 +00:00
|
|
|
<!-- ##### FUNCTION gtk_misc_get_alignment ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@misc:
|
|
|
|
@xalign:
|
|
|
|
@yalign:
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_misc_get_padding ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@misc:
|
|
|
|
@xpad:
|
|
|
|
@ypad:
|
|
|
|
|
|
|
|
|