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.

Note

Note that the desired effect can in most cases be achieved by using the "halign", "valign" and "margin" properties on the child widget, so GtkAlignment should not be used in new code.

Constructors

this
this(GtkAlignment* gtkAlignment)

Sets our main struct and passes it to the parent class

this
this(float xalign, float yalign, float xscale, float yscale)

Creates a new GtkAlignment.

Members

Functions

getAlignmentStruct
GtkAlignment* getAlignmentStruct()
Undocumented in source. Be warned that the author may not have intended to support it.
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(). Since 2.4

getStruct
void* getStruct()

the main Gtk struct as a void*

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. Since 2.4

setStruct
void setStruct(GObject* obj)
Undocumented in source. Be warned that the author may not have intended to support it.

Static functions

center
Alignment center(Widget widget)
east
Alignment east(Widget widget)
north
Alignment north(Widget widget)
northEast
Alignment northEast(Widget widget)
northWest
Alignment northWest(Widget widget)
south
Alignment south(Widget widget)
southEast
Alignment southEast(Widget widget)
southWest
Alignment southWest(Widget widget)
west
Alignment west(Widget widget)

Variables

gtkAlignment
GtkAlignment* gtkAlignment;

the main Gtk struct

Inherited Members

From Bin

gtkBin
GtkBin* gtkBin;

the main Gtk struct

getBinStruct
GtkBin* getBinStruct()
Undocumented in source. Be warned that the author may not have intended to support it.
getStruct
void* getStruct()

the main Gtk struct as a void*

setStruct
void setStruct(GObject* obj)
Undocumented in source. Be warned that the author may not have intended to support it.
getChild
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.

Meta