GLXCurses.Misc module

class GLXCurses.Misc.Misc[source]

Bases: GLXCurses.Widget.Widget

The 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 the “halign”, “valign” and “margin” properties on the child widget

Warning

To reflect this fact, all Misc API will be deprecated soon.

xalign - The horizontal alignment, from 0.0 to 1.0
yalign - The vertical alignment, from 0.0 to 1.0
xpad - The amount of space to add on the left and right of the widget, in characters
ypad - The amount of space to add above and below the widget, in characters
xalign

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).

Allowed values: [0,1] Default value: 0.5

Returns:The horizontal alignment value.
Return type:float
yalign

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).

Allowed values: [0,1] Default value: 0.5

Returns:The horizontal alignment
Return type:float
xpad

The amount of space to add on the left and right of the widget, in chars.

Returns:The amount of space in chars
Return type:int
ypad
Returns:The amount of space in chars
Raise:int