Base class for widgets with alignments and padding
The <gtk-misc>
widget is an abstract widget which is not useful itself,
but is used to derive subclasses which have alignment and padding attributes.
The horizontal and vertical padding attributes allows extra space to be added around the widget.
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.
Derives from
<gtk-widget>
.This class defines the following slots:
xalign
- The horizontal alignment, from 0 (left) to 1 (right). Reversed for RTL layouts.
yalign
- The vertical alignment, from 0 (top) to 1 (bottom)
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
<gtk-misc>
) (xalign float
) (yalign float
)Sets the alignment of the widget.
- misc
- a
<gtk-misc>
.- xalign
- the horizontal alignment, from 0 (left) to 1 (right).
- yalign
- the vertical alignment, from 0 (top) to 1 (bottom).
<gtk-misc>
) (xpad int
) (ypad int
)Sets the amount of space to add around the widget.
- misc
- a
<gtk-misc>
.- 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.
<gtk-misc>
) ⇒ (xalign float
) (yalign float
)Gets the X and Y alignment of the widget within its allocation. See
gtk-misc-set-alignment
.
- misc
- a
<gtk-misc>
- xalign
- location to store X alignment of misc, or ‘
#f
’- yalign
- location to store Y alignment of misc, or ‘
#f
’
<gtk-misc>
) ⇒ (xpad int
) (ypad int
)Gets the padding in the X and Y directions of the widget. See
gtk-misc-set-padding
.
- misc
- a
<gtk-misc>
- xpad
- location to store padding in the X direction, or ‘
#f
’- ypad
- location to store padding in the Y direction, or ‘
#f
’