gi-gtk-3.0.37: Gtk bindings
CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.Gtk.Objects.Alignment

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

newtype Alignment Source #

Memory-managed wrapper type.

Constructors

Alignment (ManagedPtr Alignment) 

Instances

Instances details
Eq Alignment Source # 
Instance details

Defined in GI.Gtk.Objects.Alignment

GObject Alignment Source # 
Instance details

Defined in GI.Gtk.Objects.Alignment

ManagedPtrNewtype Alignment Source # 
Instance details

Defined in GI.Gtk.Objects.Alignment

Methods

toManagedPtr :: Alignment -> ManagedPtr Alignment

TypedObject Alignment Source # 
Instance details

Defined in GI.Gtk.Objects.Alignment

Methods

glibType :: IO GType

HasParentTypes Alignment Source # 
Instance details

Defined in GI.Gtk.Objects.Alignment

IsGValue (Maybe Alignment) Source #

Convert Alignment to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.Gtk.Objects.Alignment

Methods

gvalueGType_ :: IO GType

gvalueSet_ :: Ptr GValue -> Maybe Alignment -> IO ()

gvalueGet_ :: Ptr GValue -> IO (Maybe Alignment)

type ParentTypes Alignment Source # 
Instance details

Defined in GI.Gtk.Objects.Alignment

type ParentTypes Alignment = '[Bin, Container, Widget, Object, ImplementorIface, Buildable]

class (GObject o, IsDescendantOf Alignment o) => IsAlignment o Source #

Type class for types which can be safely cast to Alignment, for instance with toAlignment.

Instances

Instances details
(GObject o, IsDescendantOf Alignment o) => IsAlignment o Source # 
Instance details

Defined in GI.Gtk.Objects.Alignment

toAlignment :: (MonadIO m, IsAlignment o) => o -> m Alignment Source #

Cast to Alignment, for types for which this is known to be safe. For general casts, use castTo.

Methods

Click to display all available methods, including inherited ones

Expand

Methods

activate, add, addAccelerator, addChild, addDeviceEvents, addEvents, addMnemonicLabel, addTickCallback, bindProperty, bindPropertyFull, canActivateAccel, checkResize, childFocus, childGetProperty, childNotify, childNotifyByPspec, childSetProperty, childType, classPath, computeExpand, constructChild, createPangoContext, createPangoLayout, customFinished, customTagEnd, customTagStart, destroy, destroyed, deviceIsShadowed, dragBegin, dragBeginWithCoordinates, dragCheckThreshold, dragDestAddImageTargets, dragDestAddTextTargets, dragDestAddUriTargets, dragDestFindTarget, dragDestGetTargetList, dragDestGetTrackMotion, dragDestSet, dragDestSetProxy, dragDestSetTargetList, dragDestSetTrackMotion, dragDestUnset, dragGetData, dragHighlight, dragSourceAddImageTargets, dragSourceAddTextTargets, dragSourceAddUriTargets, dragSourceGetTargetList, dragSourceSet, dragSourceSetIconGicon, dragSourceSetIconName, dragSourceSetIconPixbuf, dragSourceSetIconStock, dragSourceSetTargetList, dragSourceUnset, dragUnhighlight, draw, ensureStyle, errorBell, event, forall, forceFloating, foreach, freezeChildNotify, freezeNotify, getv, grabAdd, grabDefault, grabFocus, grabRemove, hasDefault, hasFocus, hasGrab, hasRcStyle, hasScreen, hasVisibleFocus, hide, hideOnDelete, inDestruction, initTemplate, inputShapeCombineRegion, insertActionGroup, intersect, isAncestor, isComposited, isDrawable, isFloating, isFocus, isSensitive, isToplevel, isVisible, keynavFailed, listAccelClosures, listActionPrefixes, listMnemonicLabels, map, mnemonicActivate, modifyBase, modifyBg, modifyCursor, modifyFg, modifyFont, modifyStyle, modifyText, notify, notifyByPspec, overrideBackgroundColor, overrideColor, overrideCursor, overrideFont, overrideSymbolicColor, parserFinished, path, propagateDraw, queueAllocate, queueComputeExpand, queueDraw, queueDrawArea, queueDrawRegion, queueResize, queueResizeNoRedraw, realize, ref, refSink, regionIntersect, registerWindow, remove, removeAccelerator, removeMnemonicLabel, removeTickCallback, renderIcon, renderIconPixbuf, reparent, resetRcStyles, resetStyle, resizeChildren, runDispose, sendExpose, sendFocusChange, set, shapeCombineRegion, show, showAll, showNow, sizeAllocate, sizeAllocateWithBaseline, sizeRequest, stealData, stealQdata, styleAttach, styleGetProperty, thawChildNotify, thawNotify, translateCoordinates, triggerTooltipQuery, unmap, unparent, unrealize, unref, unregisterWindow, unsetFocusChain, unsetStateFlags, watchClosure.

Getters

getAccessible, getActionGroup, getAllocatedBaseline, getAllocatedHeight, getAllocatedSize, getAllocatedWidth, getAllocation, getAncestor, getAppPaintable, getBorderWidth, getCanDefault, getCanFocus, getChild, getChildRequisition, getChildVisible, getChildren, getClip, getClipboard, getCompositeName, getData, getDeviceEnabled, getDeviceEvents, getDirection, getDisplay, getDoubleBuffered, getEvents, getFocusChain, getFocusChild, getFocusHadjustment, getFocusOnClick, getFocusVadjustment, getFontMap, getFontOptions, getFrameClock, getHalign, getHasTooltip, getHasWindow, getHexpand, getHexpandSet, getInternalChild, getMapped, getMarginBottom, getMarginEnd, getMarginLeft, getMarginRight, getMarginStart, getMarginTop, getModifierMask, getModifierStyle, getName, getNoShowAll, getOpacity, getPadding, getPangoContext, getParent, getParentWindow, getPath, getPathForChild, getPointer, getPreferredHeight, getPreferredHeightAndBaselineForWidth, getPreferredHeightForWidth, getPreferredSize, getPreferredWidth, getPreferredWidthForHeight, getProperty, getQdata, getRealized, getReceivesDefault, getRequestMode, getRequisition, getResizeMode, getRootWindow, getScaleFactor, getScreen, getSensitive, getSettings, getSizeRequest, getState, getStateFlags, getStyle, getStyleContext, getSupportMultidevice, getTemplateChild, getTooltipMarkup, getTooltipText, getTooltipWindow, getToplevel, getValign, getValignWithBaseline, getVexpand, getVexpandSet, getVisible, getVisual, getWindow.

Setters

setAccelPath, setAllocation, setAppPaintable, setBorderWidth, setBuildableProperty, setCanDefault, setCanFocus, setChildVisible, setClip, setCompositeName, setData, setDataFull, setDeviceEnabled, setDeviceEvents, setDirection, setDoubleBuffered, setEvents, setFocusChain, setFocusChild, setFocusHadjustment, setFocusOnClick, setFocusVadjustment, setFontMap, setFontOptions, setHalign, setHasTooltip, setHasWindow, setHexpand, setHexpandSet, setMapped, setMarginBottom, setMarginEnd, setMarginLeft, setMarginRight, setMarginStart, setMarginTop, setName, setNoShowAll, setOpacity, setPadding, setParent, setParentWindow, setProperty, setRealized, setReallocateRedraws, setReceivesDefault, setRedrawOnAllocate, setResizeMode, setSensitive, setSizeRequest, setState, setStateFlags, setStyle, setSupportMultidevice, setTooltipMarkup, setTooltipText, setTooltipWindow, setValign, setVexpand, setVexpandSet, setVisible, setVisual, setWindow.

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

The padding to insert at the bottom of the widget.

Since: 2.4

constructAlignmentBottomPadding :: (IsAlignment o, MonadIO m) => Word32 -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “bottom-padding” property. This is rarely needed directly, but it is used by new.

getAlignmentBottomPadding :: (MonadIO m, IsAlignment o) => o -> m Word32 Source #

Get the value of the “bottom-padding” property. When overloading is enabled, this is equivalent to

get alignment #bottomPadding

setAlignmentBottomPadding :: (MonadIO m, IsAlignment o) => o -> Word32 -> m () Source #

Set the value of the “bottom-padding” property. When overloading is enabled, this is equivalent to

set alignment [ #bottomPadding := value ]

leftPadding

The padding to insert at the left of the widget.

Since: 2.4

constructAlignmentLeftPadding :: (IsAlignment o, MonadIO m) => Word32 -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “left-padding” property. This is rarely needed directly, but it is used by new.

getAlignmentLeftPadding :: (MonadIO m, IsAlignment o) => o -> m Word32 Source #

Get the value of the “left-padding” property. When overloading is enabled, this is equivalent to

get alignment #leftPadding

setAlignmentLeftPadding :: (MonadIO m, IsAlignment o) => o -> Word32 -> m () Source #

Set the value of the “left-padding” property. When overloading is enabled, this is equivalent to

set alignment [ #leftPadding := value ]

rightPadding

The padding to insert at the right of the widget.

Since: 2.4

constructAlignmentRightPadding :: (IsAlignment o, MonadIO m) => Word32 -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “right-padding” property. This is rarely needed directly, but it is used by new.

getAlignmentRightPadding :: (MonadIO m, IsAlignment o) => o -> m Word32 Source #

Get the value of the “right-padding” property. When overloading is enabled, this is equivalent to

get alignment #rightPadding

setAlignmentRightPadding :: (MonadIO m, IsAlignment o) => o -> Word32 -> m () Source #

Set the value of the “right-padding” property. When overloading is enabled, this is equivalent to

set alignment [ #rightPadding := value ]

topPadding

The padding to insert at the top of the widget.

Since: 2.4

constructAlignmentTopPadding :: (IsAlignment o, MonadIO m) => Word32 -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “top-padding” property. This is rarely needed directly, but it is used by new.

getAlignmentTopPadding :: (MonadIO m, IsAlignment o) => o -> m Word32 Source #

Get the value of the “top-padding” property. When overloading is enabled, this is equivalent to

get alignment #topPadding

setAlignmentTopPadding :: (MonadIO m, IsAlignment o) => o -> Word32 -> m () Source #

Set the value of the “top-padding” property. When overloading is enabled, this is equivalent to

set alignment [ #topPadding := value ]

xalign

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

constructAlignmentXalign :: (IsAlignment o, MonadIO m) => Float -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “xalign” property. This is rarely needed directly, but it is used by new.

getAlignmentXalign :: (MonadIO m, IsAlignment o) => o -> m Float Source #

Get the value of the “xalign” property. When overloading is enabled, this is equivalent to

get alignment #xalign

setAlignmentXalign :: (MonadIO m, IsAlignment o) => o -> Float -> m () Source #

Set the value of the “xalign” property. When overloading is enabled, this is equivalent to

set alignment [ #xalign := value ]

xscale

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.

constructAlignmentXscale :: (IsAlignment o, MonadIO m) => Float -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “xscale” property. This is rarely needed directly, but it is used by new.

getAlignmentXscale :: (MonadIO m, IsAlignment o) => o -> m Float Source #

Get the value of the “xscale” property. When overloading is enabled, this is equivalent to

get alignment #xscale

setAlignmentXscale :: (MonadIO m, IsAlignment o) => o -> Float -> m () Source #

Set the value of the “xscale” property. When overloading is enabled, this is equivalent to

set alignment [ #xscale := value ]

yalign

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.

constructAlignmentYalign :: (IsAlignment o, MonadIO m) => Float -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “yalign” property. This is rarely needed directly, but it is used by new.

getAlignmentYalign :: (MonadIO m, IsAlignment o) => o -> m Float Source #

Get the value of the “yalign” property. When overloading is enabled, this is equivalent to

get alignment #yalign

setAlignmentYalign :: (MonadIO m, IsAlignment o) => o -> Float -> m () Source #

Set the value of the “yalign” property. When overloading is enabled, this is equivalent to

set alignment [ #yalign := value ]

yscale

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.

constructAlignmentYscale :: (IsAlignment o, MonadIO m) => Float -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “yscale” property. This is rarely needed directly, but it is used by new.

getAlignmentYscale :: (MonadIO m, IsAlignment o) => o -> m Float Source #

Get the value of the “yscale” property. When overloading is enabled, this is equivalent to

get alignment #yscale

setAlignmentYscale :: (MonadIO m, IsAlignment o) => o -> Float -> m () Source #

Set the value of the “yscale” property. When overloading is enabled, this is equivalent to

set alignment [ #yscale := value ]