gi-gtk-3.0.17: Gtk bindings

CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (garetxe@gmail.com)
Safe HaskellNone
LanguageHaskell2010

GI.Gtk.Objects.Alignment

Contents

Description

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

Synopsis

Exported types

Methods

getPadding

alignmentGetPadding Source #

Arguments

:: (HasCallStack, MonadIO m, IsAlignment a) 
=> a

alignment: a Alignment

-> m (Word32, Word32, Word32, Word32) 

Deprecated: (Since version 3.14)Use Widget alignment and margin properties

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

Since: 2.4

new

alignmentNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Float

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

-> Float

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

-> Float

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

-> Float

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

-> m Alignment

Returns: the new Alignment

Deprecated: (Since version 3.14)Use Widget alignment and margin properties

Creates a new Alignment.

set

alignmentSet Source #

Arguments

:: (HasCallStack, MonadIO m, IsAlignment a) 
=> a

alignment: a Alignment.

-> Float

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

-> Float

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

-> Float

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

-> Float

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

-> m () 

Deprecated: (Since version 3.14)Use Widget alignment and margin properties

Sets the Alignment values.

setPadding

alignmentSetPadding Source #

Arguments

:: (HasCallStack, MonadIO m, IsAlignment a) 
=> a

alignment: a Alignment

-> Word32

paddingTop: the padding at the top of the widget

-> Word32

paddingBottom: the padding at the bottom of the widget

-> Word32

paddingLeft: the padding at the left of the widget

-> Word32

paddingRight: the padding at the right of the widget.

-> m () 

Deprecated: (Since version 3.14)Use Widget alignment and margin properties

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

Properties

bottomPadding

leftPadding

rightPadding

topPadding

xalign

xscale

yalign

yscale