gtk.misc

Module for [Misc] class

Types 3

classMisc : gtk.widget.Widget

The #GtkMisc 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 #GtkWidget:halign, #GtkWidget:valign and #GtkWidget:margin properties on the child widget, so GtkMisc should not be used in new code. To reflect this fact, all #GtkMisc API has been deprecated.

Methods
GType _getGType() static nothrow
GType _gType() @property nothrow
Misc self() nothrowReturns `this`, for use in `with` statements.
MiscGidBuilder builder() static nothrowGet builder for [gtk.misc.Misc] Returns: New builder object
float xalign() @property nothrowGet `xalign` property. Returns: 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).
void xalign(float propval) @property nothrowSet `xalign` property. Params: propval = 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).
int xpad() @property nothrowGet `xpad` property. Returns: The amount of space to add on the left and right of the widget, in pixels.
void xpad(int propval) @property nothrowSet `xpad` property. Params: propval = The amount of space to add on the left and right of the widget, in pixels.
float yalign() @property nothrowGet `yalign` property. Returns: The vertical alignment. A value of 0.0 means top alignment; a value of 1.0 means bottom alignment.
void yalign(float propval) @property nothrowSet `yalign` property. Params: propval = The vertical alignment. A value of 0.0 means top alignment; a value of 1.0 means bottom alignment.
int ypad() @property nothrowGet `ypad` property. Returns: The amount of space to add on the top and bottom of the widget, in pixels.
void ypad(int propval) @property nothrowSet `ypad` property. Params: propval = The amount of space to add on the top and bottom of the widget, in pixels.
void getAlignment(out float xalign, out float yalign) nothrowGets the X and Y alignment of the widget within its allocation. See [gtk.misc.Misc.setAlignment].
void getPadding(out int xpad, out int ypad) nothrowGets the padding in the X and Y directions of the widget. See [gtk.misc.Misc.setPadding].
void setAlignment(float xalign, float yalign) nothrowSets the alignment of the widget.
void setPadding(int xpad, int ypad) nothrowSets the amount of space to add around the widget.
Constructors
this(void * ptr, Flag!"Take" take)

Fluent builder implementation template for gtk.misc.Misc

Methods
T xalign(float propval) nothrowSet `xalign` property. Params: propval = 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). Retu...
T xpad(int propval) nothrowSet `xpad` property. Params: propval = The amount of space to add on the left and right of the widget, in pixels. Returns: Builder instance for fluent chaining
T yalign(float propval) nothrowSet `yalign` property. Params: propval = The vertical alignment. A value of 0.0 means top alignment; a value of 1.0 means bottom alignment. Returns: Builder instance for fluent chaining
T ypad(int propval) nothrowSet `ypad` property. Params: propval = The amount of space to add on the top and bottom of the widget, in pixels. Returns: Builder instance for fluent chaining

Fluent builder for gtk.misc.Misc

Methods
Misc build() nothrowCreate object from builder. Returns: New object