Alignment

The #GtkAlignment widget controls the alignment and size of its child widget. It has four settings: xscale, yscale, xalign, and yalign.

The scale settings are used to specify how much the child widget should expand to fill the space allocated to the #GtkAlignment. The values can range from 0 (meaning the child doesn’t expand at all) to 1 (meaning the child expands to fill all of the available space).

The align settings are used to place the child widget within the available area. The values range from 0 (top or left) to 1 (bottom or right). Of course, if the scale settings are both set to 1, the alignment settings have no effect.

GtkAlignment has been deprecated in 3.14 and should not be used in newly-written code. The desired effect can be achieved by using the #GtkWidget:halign, #GtkWidget:valign and #GtkWidget:margin properties on the child widget.

Constructors

this
this(void* ptr, Flag!"Take" take)
this
this(float xalign, float yalign, float xscale, float yscale)

Creates a new #GtkAlignment.

Members

Functions

getPadding
void getPadding(uint paddingTop, uint paddingBottom, uint paddingLeft, uint paddingRight)

Gets the padding on the different sides of the widget. See gtk_alignment_set_padding ().

self
Alignment self()

Returns this, for use in with statements.

set
void set(float xalign, float yalign, float xscale, float yscale)

Sets the #GtkAlignment values.

setPadding
void setPadding(uint paddingTop, uint paddingBottom, uint paddingLeft, uint paddingRight)

Sets the padding on the different sides of the widget. The padding adds blank space to the sides of the widget. For instance, this can be used to indent the child widget towards the right by adding padding on the left.

Properties

_gType
GType _gType [@property getter]
bottomPadding
uint bottomPadding [@property getter]

Get bottomPadding property.

bottomPadding
uint bottomPadding [@property setter]

Set bottomPadding property.

leftPadding
uint leftPadding [@property getter]

Get leftPadding property.

leftPadding
uint leftPadding [@property setter]

Set leftPadding property.

rightPadding
uint rightPadding [@property getter]

Get rightPadding property.

rightPadding
uint rightPadding [@property setter]

Set rightPadding property.

topPadding
uint topPadding [@property getter]

Get topPadding property.

topPadding
uint topPadding [@property setter]

Set topPadding property.

xalign
float xalign [@property getter]

Get xalign property.

xalign
float xalign [@property setter]

Set xalign property.

xscale
float xscale [@property getter]

Get xscale property.

xscale
float xscale [@property setter]

Set xscale property.

yalign
float yalign [@property getter]

Get yalign property.

yalign
float yalign [@property setter]

Set yalign property.

yscale
float yscale [@property getter]

Get yscale property.

yscale
float yscale [@property setter]

Set yscale property.

Static functions

_getGType
GType _getGType()
builder
AlignmentGidBuilder builder()

Get builder for gtk.alignment.Alignment

Inherited Members

From Bin

_getGType
GType _getGType()
_gType
GType _gType [@property getter]
self
Bin self()

Returns this, for use in with statements.

builder
BinGidBuilder builder()

Get builder for gtk.bin.Bin

getChild
gtk.widget.Widget getChild()

Gets the child of the #GtkBin, or null if the bin contains no child widget. The returned widget does not have a reference added, so you do not need to unref it.