Gtk.Alignment

Entities

Tagged Types

Access Types

Constants

Subprograms

Generic Instantiations

Description

The Gtk.Alignment.Gtk_Alignment 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 Gtk.Alignment.Gtk_Alignment. 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 Gtk.Widget.Gtk_Widget:halign, Gtk.Widget.Gtk_Widget:valign and Gtk.Widget.Gtk_Widget:margin properties on the child widget.

<screenshot>gtk-alignment</screenshot> <testgtk>create_alignment.adb</testgtk>

"+"

function "+"
  (Widget : access Gtk_Alignment_Record'Class)
return Gtk.Buildable.Gtk_Buildable
Parameters
Widget
Return Value

"-"

function "-"
  (Interf : Gtk.Buildable.Gtk_Buildable)
return Gtk_Alignment
Parameters
Interf
Return Value

Bottom_Padding_Property

Bottom_Padding_Property : constant Glib.Properties.Property_Uint;

The padding to insert at the bottom of the widget.

Get_Padding

procedure Get_Padding
   (Alignment      : not null access Gtk_Alignment_Record;
    Padding_Top    : out Guint;
    Padding_Bottom : out Guint;
    Padding_Left   : out Guint;
    Padding_Right  : out Guint)

Gets the padding on the different sides of the widget. See gtk_alignment_set_padding (). Since: gtk+ 2.4 Deprecated since 3.14, 1

Parameters
Alignment
Padding_Top

location to store the padding for the top of the widget, or null

Padding_Bottom

location to store the padding for the bottom of the widget, or null

Padding_Left

location to store the padding for the left of the widget, or null

Padding_Right

location to store the padding for the right of the widget, or null

Get_Type

function Get_Type return Glib.GType
Return Value

Gtk_Alignment

type Gtk_Alignment is access all Gtk_Alignment_Record'Class;

Gtk_Alignment_New

function Gtk_Alignment_New
   (Xalign : Gfloat;
    Yalign : Gfloat;
    Xscale : Gfloat;
    Yscale : Gfloat) return Gtk_Alignment

Creates a new Gtk.Alignment.Gtk_Alignment.

Parameters
Xalign

the horizontal alignment of the child widget, from 0 (left) to 1 (right).

Yalign

the vertical alignment of the child widget, from 0 (top) to 1 (bottom).

Xscale

the amount that the child widget expands horizontally to fill up unused space, from 0 to 1. A value of 0 indicates that the child widget should never expand. A value of 1 indicates that the child widget will expand to fill all of the space allocated for the Gtk.Alignment.Gtk_Alignment.

Yscale

the amount that the child widget expands vertically to fill up unused space, from 0 to 1. The values are similar to Xscale.

Return Value

Gtk_Alignment_Record

type Gtk_Alignment_Record is new Gtk_Bin_Record with null record;

Gtk_New

procedure Gtk_New
   (Alignment : out Gtk_Alignment;
    Xalign    : Gfloat;
    Yalign    : Gfloat;
    Xscale    : Gfloat;
    Yscale    : Gfloat)

Creates a new Gtk.Alignment.Gtk_Alignment. Initialize does nothing if the object was already created with another call to Initialize* or G_New.

Parameters
Alignment
Xalign

the horizontal alignment of the child widget, from 0 (left) to 1 (right).

Yalign

the vertical alignment of the child widget, from 0 (top) to 1 (bottom).

Xscale

the amount that the child widget expands horizontally to fill up unused space, from 0 to 1. A value of 0 indicates that the child widget should never expand. A value of 1 indicates that the child widget will expand to fill all of the space allocated for the Gtk.Alignment.Gtk_Alignment.

Yscale

the amount that the child widget expands vertically to fill up unused space, from 0 to 1. The values are similar to Xscale.

Implements_Gtk_Buildable

package Implements_Gtk_Buildable is new Glib.Types.Implements
  (Gtk.Buildable.Gtk_Buildable, Gtk_Alignment_Record, Gtk_Alignment);

Initialize

procedure Initialize
   (Alignment : not null access Gtk_Alignment_Record'Class;
    Xalign    : Gfloat;
    Yalign    : Gfloat;
    Xscale    : Gfloat;
    Yscale    : Gfloat)

Creates a new Gtk.Alignment.Gtk_Alignment. Initialize does nothing if the object was already created with another call to Initialize* or G_New.

Parameters
Alignment
Xalign

the horizontal alignment of the child widget, from 0 (left) to 1 (right).

Yalign

the vertical alignment of the child widget, from 0 (top) to 1 (bottom).

Xscale

the amount that the child widget expands horizontally to fill up unused space, from 0 to 1. A value of 0 indicates that the child widget should never expand. A value of 1 indicates that the child widget will expand to fill all of the space allocated for the Gtk.Alignment.Gtk_Alignment.

Yscale

the amount that the child widget expands vertically to fill up unused space, from 0 to 1. The values are similar to Xscale.

Left_Padding_Property

Left_Padding_Property : constant Glib.Properties.Property_Uint;

The padding to insert at the left of the widget.

Right_Padding_Property

Right_Padding_Property : constant Glib.Properties.Property_Uint;

The padding to insert at the right of the widget.

Set

procedure Set
   (Alignment : not null access Gtk_Alignment_Record;
    Xalign    : Gfloat;
    Yalign    : Gfloat;
    Xscale    : Gfloat;
    Yscale    : Gfloat)

Sets the Gtk.Alignment.Gtk_Alignment values. Deprecated since 3.14, 1

Parameters
Alignment
Xalign

the horizontal alignment of the child widget, from 0 (left) to 1 (right).

Yalign

the vertical alignment of the child widget, from 0 (top) to 1 (bottom).

Xscale

the amount that the child widget expands horizontally to fill up unused space, from 0 to 1. A value of 0 indicates that the child widget should never expand. A value of 1 indicates that the child widget will expand to fill all of the space allocated for the Gtk.Alignment.Gtk_Alignment.

Yscale

the amount that the child widget expands vertically to fill up unused space, from 0 to 1. The values are similar to Xscale.

Set_Padding

procedure Set_Padding
   (Alignment      : not null access Gtk_Alignment_Record;
    Padding_Top    : Guint;
    Padding_Bottom : Guint;
    Padding_Left   : Guint;
    Padding_Right  : Guint)

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: gtk+ 2.4 Deprecated since 3.14, 1

Parameters
Alignment
Padding_Top

the padding at the top of the widget

Padding_Bottom

the padding at the bottom of the widget

Padding_Left

the padding at the left of the widget

Padding_Right

the padding at the right of the widget.

Top_Padding_Property

Top_Padding_Property : constant Glib.Properties.Property_Uint;

The padding to insert at the top of the widget.

Xalign_Property

Xalign_Property : constant Glib.Properties.Property_Float;

Horizontal position of child in available space. A value of 0.0 will flush the child left (or right, in RTL locales); a value of 1.0 will flush the child right (or left, in RTL locales).

Xscale_Property

Xscale_Property : constant Glib.Properties.Property_Float;

If available horizontal space is bigger than needed, how much of it to use for the child. A value of 0.0 means none; a value of 1.0 means all.

Yalign_Property

Yalign_Property : constant Glib.Properties.Property_Float;

Vertical position of child in available space. A value of 0.0 will flush the child to the top; a value of 1.0 will flush the child to the bottom.

Yscale_Property

Yscale_Property : constant Glib.Properties.Property_Float;

If available vertical space is bigger than needed, how much of it to use for the child. A value of 0.0 means none; a value of 1.0 means all.