Gtk.Misc - Classes - Gtk 3.0 (original) (raw)
g Atk.ImplementorIface Atk.ImplementorIface Gtk.Widget Gtk.Widget Atk.ImplementorIface->Gtk.Widget GObject.GInterface GObject.GInterface GObject.GInterface->Atk.ImplementorIface Gtk.Buildable Gtk.Buildable GObject.GInterface->Gtk.Buildable GObject.InitiallyUnowned GObject.InitiallyUnowned GObject.InitiallyUnowned->Gtk.Widget GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned Gtk.Buildable->Gtk.Widget Gtk.Misc Gtk.Misc Gtk.Widget->Gtk.Misc
Subclasses:
Gtk.Arrow, Gtk.Image, Gtk.Label
Methods¶
Inherited:
Gtk.Widget (278), GObject.Object (37), Gtk.Buildable (10)
Structs:
Gtk.WidgetClass (12), GObject.ObjectClass (5)
get_alignment () |
---|
get_padding () |
set_alignment (xalign, yalign) |
set_padding (xpad, ypad) |
Virtual Methods¶
Inherited:
Gtk.Widget (82), GObject.Object (7), Gtk.Buildable (10)
Properties¶
Inherited:
Name | Type | Flags | Short Description |
---|---|---|---|
xalign | float | d/r/w | The horizontal alignment, from 0 (left) to 1 (right). Reversed for RTL layouts. deprecated |
xpad | int | d/r/w | The amount of space to add on the left and right of the widget, in pixels deprecated |
yalign | float | d/r/w | The vertical alignment, from 0 (top) to 1 (bottom) deprecated |
ypad | int | d/r/w | The amount of space to add on the top and bottom of the widget, in pixels deprecated |
Style Properties¶
Inherited:
Signals¶
Inherited:
Gtk.Widget (69), GObject.Object (1)
Fields¶
Inherited:
Gtk.Widget (69), GObject.Object (1)
Name | Type | Access | Description |
---|---|---|---|
widget | Gtk.Widget | r |
Class Details¶
class Gtk.Misc(**kwargs)¶
Bases:
Abstract:
Yes
Structure:
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 widget’s position.
Note that the desired effect can in most cases be achieved by using theGtk.Widget :halign, Gtk.Widget :valign and Gtk.Widget :margin properties on the child widget, so Gtk.Misc should not be used in new code. To reflect this fact, all Gtk.Misc API has been deprecated.
Returns:
xalign:
location to store X alignment of self, or None
yalign:
location to store Y alignment of self, or None
Return type:
(xalign: float, yalign: float)
Gets the X and Y alignment of the widget within its allocation. See Gtk.Misc.set_alignment().
Deprecated since version 3.14: Use Gtk.Widget alignment and margin properties.
Returns:
xpad:
location to store padding in the X direction, or None
ypad:
location to store padding in the Y direction, or None
Return type:
Gets the padding in the X and Y directions of the widget. See Gtk.Misc.set_padding().
Deprecated since version 3.14: Use Gtk.Widget alignment and margin properties.
set_alignment(xalign, yalign)[source]¶
Parameters:
- xalign (float) – the horizontal alignment, from 0 (left) to 1 (right).
- yalign (float) – the vertical alignment, from 0 (top) to 1 (bottom).
Sets the alignment of the widget.
set_padding(xpad, ypad)[source]¶
Parameters:
- xpad (int) – the amount of space to add on the left and right of the widget, in pixels.
- ypad (int) – the amount of space to add on the top and bottom of the widget, in pixels.
Sets the amount of space to add around the widget.
Deprecated since version 3.14: Use Gtk.Widget alignment and margin properties.
Property Details¶
Gtk.Misc.props.xalign¶
Name:
xalign
Type:
Default Value:
0.5
Flags:
DEPRECATED, READABLE, WRITABLE
The horizontal alignment. A value of 0.0 means left alignment (or right on RTL locales); a value of 1.0 means right alignment (or left on RTL locales).
Gtk.Misc.props.xpad¶
Name:
xpad
Type:
Default Value:
0
Flags:
DEPRECATED, READABLE, WRITABLE
The amount of space to add on the left and right of the widget, in pixels.
Gtk.Misc.props.yalign¶
Name:
yalign
Type:
Default Value:
0.5
Flags:
DEPRECATED, READABLE, WRITABLE
The vertical alignment. A value of 0.0 means top alignment; a value of 1.0 means bottom alignment.
Gtk.Misc.props.ypad¶
Name:
ypad
Type:
Default Value:
0
Flags:
DEPRECATED, READABLE, WRITABLE
The amount of space to add on the top and bottom of the widget, in pixels.