Copyright | Will Thompson, Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (garetxe@gmail.com) |
Safe Haskell | None |
Language | Haskell2010 |
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.
- newtype Alignment = Alignment (ManagedPtr Alignment)
- class GObject o => IsAlignment o
- toAlignment :: IsAlignment o => o -> IO Alignment
- noAlignment :: Maybe Alignment
- data AlignmentGetPaddingMethodInfo
- alignmentGetPadding :: (HasCallStack, MonadIO m, IsAlignment a) => a -> m (Word32, Word32, Word32, Word32)
- alignmentNew :: (HasCallStack, MonadIO m) => Float -> Float -> Float -> Float -> m Alignment
- data AlignmentSetMethodInfo
- alignmentSet :: (HasCallStack, MonadIO m, IsAlignment a) => a -> Float -> Float -> Float -> Float -> m ()
- data AlignmentSetPaddingMethodInfo
- alignmentSetPadding :: (HasCallStack, MonadIO m, IsAlignment a) => a -> Word32 -> Word32 -> Word32 -> Word32 -> m ()
- data AlignmentBottomPaddingPropertyInfo
- alignmentBottomPadding :: AttrLabelProxy "bottomPadding"
- constructAlignmentBottomPadding :: IsAlignment o => Word32 -> IO (GValueConstruct o)
- getAlignmentBottomPadding :: (MonadIO m, IsAlignment o) => o -> m Word32
- setAlignmentBottomPadding :: (MonadIO m, IsAlignment o) => o -> Word32 -> m ()
- data AlignmentLeftPaddingPropertyInfo
- alignmentLeftPadding :: AttrLabelProxy "leftPadding"
- constructAlignmentLeftPadding :: IsAlignment o => Word32 -> IO (GValueConstruct o)
- getAlignmentLeftPadding :: (MonadIO m, IsAlignment o) => o -> m Word32
- setAlignmentLeftPadding :: (MonadIO m, IsAlignment o) => o -> Word32 -> m ()
- data AlignmentRightPaddingPropertyInfo
- alignmentRightPadding :: AttrLabelProxy "rightPadding"
- constructAlignmentRightPadding :: IsAlignment o => Word32 -> IO (GValueConstruct o)
- getAlignmentRightPadding :: (MonadIO m, IsAlignment o) => o -> m Word32
- setAlignmentRightPadding :: (MonadIO m, IsAlignment o) => o -> Word32 -> m ()
- data AlignmentTopPaddingPropertyInfo
- alignmentTopPadding :: AttrLabelProxy "topPadding"
- constructAlignmentTopPadding :: IsAlignment o => Word32 -> IO (GValueConstruct o)
- getAlignmentTopPadding :: (MonadIO m, IsAlignment o) => o -> m Word32
- setAlignmentTopPadding :: (MonadIO m, IsAlignment o) => o -> Word32 -> m ()
- data AlignmentXalignPropertyInfo
- alignmentXalign :: AttrLabelProxy "xalign"
- constructAlignmentXalign :: IsAlignment o => Float -> IO (GValueConstruct o)
- getAlignmentXalign :: (MonadIO m, IsAlignment o) => o -> m Float
- setAlignmentXalign :: (MonadIO m, IsAlignment o) => o -> Float -> m ()
- data AlignmentXscalePropertyInfo
- alignmentXscale :: AttrLabelProxy "xscale"
- constructAlignmentXscale :: IsAlignment o => Float -> IO (GValueConstruct o)
- getAlignmentXscale :: (MonadIO m, IsAlignment o) => o -> m Float
- setAlignmentXscale :: (MonadIO m, IsAlignment o) => o -> Float -> m ()
- data AlignmentYalignPropertyInfo
- alignmentYalign :: AttrLabelProxy "yalign"
- constructAlignmentYalign :: IsAlignment o => Float -> IO (GValueConstruct o)
- getAlignmentYalign :: (MonadIO m, IsAlignment o) => o -> m Float
- setAlignmentYalign :: (MonadIO m, IsAlignment o) => o -> Float -> m ()
- data AlignmentYscalePropertyInfo
- alignmentYscale :: AttrLabelProxy "yscale"
- constructAlignmentYscale :: IsAlignment o => Float -> IO (GValueConstruct o)
- getAlignmentYscale :: (MonadIO m, IsAlignment o) => o -> m Float
- setAlignmentYscale :: (MonadIO m, IsAlignment o) => o -> Float -> m ()
Exported types
GObject Alignment Source # | |
IsImplementorIface Alignment Source # | |
IsObject Alignment Source # | |
IsWidget Alignment Source # | |
IsContainer Alignment Source # | |
IsBin Alignment Source # | |
IsBuildable Alignment Source # | |
IsAlignment Alignment Source # | |
((~) * info (ResolveAlignmentMethod t Alignment), MethodInfo * info Alignment p) => IsLabel t (Alignment -> p) Source # | |
((~) * info (ResolveAlignmentMethod t Alignment), MethodInfo * info Alignment p) => IsLabelProxy t (Alignment -> p) Source # | |
HasAttributeList * Alignment Source # | |
type AttributeList Alignment Source # | |
type SignalList Alignment Source # | |
class GObject o => IsAlignment o Source #
toAlignment :: IsAlignment o => o -> IO Alignment Source #
Methods
getPadding
data AlignmentGetPaddingMethodInfo Source #
((~) * signature (m (Word32, Word32, Word32, Word32)), MonadIO m, IsAlignment a) => MethodInfo * AlignmentGetPaddingMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsAlignment a) | |
=> a |
|
-> 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
:: (HasCallStack, MonadIO m) | |
=> Float |
|
-> Float |
|
-> Float |
|
-> Float |
|
-> m Alignment | Returns: the new |
set
data AlignmentSetMethodInfo Source #
((~) * signature (Float -> Float -> Float -> Float -> m ()), MonadIO m, IsAlignment a) => MethodInfo * AlignmentSetMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsAlignment a) | |
=> a |
|
-> Float |
|
-> Float |
|
-> Float |
|
-> Float |
|
-> m () |
setPadding
data AlignmentSetPaddingMethodInfo Source #
((~) * signature (Word32 -> Word32 -> Word32 -> Word32 -> m ()), MonadIO m, IsAlignment a) => MethodInfo * AlignmentSetPaddingMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsAlignment a) | |
=> a |
|
-> Word32 |
|
-> Word32 |
|
-> Word32 |
|
-> Word32 |
|
-> 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
data AlignmentBottomPaddingPropertyInfo Source #
alignmentBottomPadding :: AttrLabelProxy "bottomPadding" Source #
constructAlignmentBottomPadding :: IsAlignment o => Word32 -> IO (GValueConstruct o) Source #
getAlignmentBottomPadding :: (MonadIO m, IsAlignment o) => o -> m Word32 Source #
setAlignmentBottomPadding :: (MonadIO m, IsAlignment o) => o -> Word32 -> m () Source #
leftPadding
data AlignmentLeftPaddingPropertyInfo Source #
alignmentLeftPadding :: AttrLabelProxy "leftPadding" Source #
constructAlignmentLeftPadding :: IsAlignment o => Word32 -> IO (GValueConstruct o) Source #
getAlignmentLeftPadding :: (MonadIO m, IsAlignment o) => o -> m Word32 Source #
setAlignmentLeftPadding :: (MonadIO m, IsAlignment o) => o -> Word32 -> m () Source #
rightPadding
data AlignmentRightPaddingPropertyInfo Source #
alignmentRightPadding :: AttrLabelProxy "rightPadding" Source #
constructAlignmentRightPadding :: IsAlignment o => Word32 -> IO (GValueConstruct o) Source #
getAlignmentRightPadding :: (MonadIO m, IsAlignment o) => o -> m Word32 Source #
setAlignmentRightPadding :: (MonadIO m, IsAlignment o) => o -> Word32 -> m () Source #
topPadding
data AlignmentTopPaddingPropertyInfo Source #
alignmentTopPadding :: AttrLabelProxy "topPadding" Source #
constructAlignmentTopPadding :: IsAlignment o => Word32 -> IO (GValueConstruct o) Source #
getAlignmentTopPadding :: (MonadIO m, IsAlignment o) => o -> m Word32 Source #
setAlignmentTopPadding :: (MonadIO m, IsAlignment o) => o -> Word32 -> m () Source #
xalign
data AlignmentXalignPropertyInfo Source #
alignmentXalign :: AttrLabelProxy "xalign" Source #
constructAlignmentXalign :: IsAlignment o => Float -> IO (GValueConstruct o) Source #
getAlignmentXalign :: (MonadIO m, IsAlignment o) => o -> m Float Source #
setAlignmentXalign :: (MonadIO m, IsAlignment o) => o -> Float -> m () Source #
xscale
data AlignmentXscalePropertyInfo Source #
alignmentXscale :: AttrLabelProxy "xscale" Source #
constructAlignmentXscale :: IsAlignment o => Float -> IO (GValueConstruct o) Source #
getAlignmentXscale :: (MonadIO m, IsAlignment o) => o -> m Float Source #
setAlignmentXscale :: (MonadIO m, IsAlignment o) => o -> Float -> m () Source #
yalign
data AlignmentYalignPropertyInfo Source #
alignmentYalign :: AttrLabelProxy "yalign" Source #
constructAlignmentYalign :: IsAlignment o => Float -> IO (GValueConstruct o) Source #
getAlignmentYalign :: (MonadIO m, IsAlignment o) => o -> m Float Source #
setAlignmentYalign :: (MonadIO m, IsAlignment o) => o -> Float -> m () Source #
yscale
data AlignmentYscalePropertyInfo Source #
alignmentYscale :: AttrLabelProxy "yscale" Source #
constructAlignmentYscale :: IsAlignment o => Float -> IO (GValueConstruct o) Source #
getAlignmentYscale :: (MonadIO m, IsAlignment o) => o -> m Float Source #
setAlignmentYscale :: (MonadIO m, IsAlignment o) => o -> Float -> m () Source #