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 |
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.
- newtype Alignment = Alignment (ManagedPtr Alignment)
- class GObject o => IsAlignment o
- toAlignment :: (MonadIO m, IsAlignment o) => o -> m Alignment
- noAlignment :: Maybe Alignment
- alignmentGetPadding :: (HasCallStack, MonadIO m, IsAlignment a) => a -> m (Word32, Word32, Word32, Word32)
- alignmentNew :: (HasCallStack, MonadIO m) => Float -> Float -> Float -> Float -> m Alignment
- alignmentSet :: (HasCallStack, MonadIO m, IsAlignment a) => a -> Float -> Float -> Float -> Float -> m ()
- alignmentSetPadding :: (HasCallStack, MonadIO m, IsAlignment a) => a -> Word32 -> Word32 -> Word32 -> Word32 -> m ()
- constructAlignmentBottomPadding :: IsAlignment o => Word32 -> IO (GValueConstruct o)
- getAlignmentBottomPadding :: (MonadIO m, IsAlignment o) => o -> m Word32
- setAlignmentBottomPadding :: (MonadIO m, IsAlignment o) => o -> Word32 -> m ()
- constructAlignmentLeftPadding :: IsAlignment o => Word32 -> IO (GValueConstruct o)
- getAlignmentLeftPadding :: (MonadIO m, IsAlignment o) => o -> m Word32
- setAlignmentLeftPadding :: (MonadIO m, IsAlignment o) => o -> Word32 -> m ()
- constructAlignmentRightPadding :: IsAlignment o => Word32 -> IO (GValueConstruct o)
- getAlignmentRightPadding :: (MonadIO m, IsAlignment o) => o -> m Word32
- setAlignmentRightPadding :: (MonadIO m, IsAlignment o) => o -> Word32 -> m ()
- constructAlignmentTopPadding :: IsAlignment o => Word32 -> IO (GValueConstruct o)
- getAlignmentTopPadding :: (MonadIO m, IsAlignment o) => o -> m Word32
- setAlignmentTopPadding :: (MonadIO m, IsAlignment o) => o -> Word32 -> m ()
- constructAlignmentXalign :: IsAlignment o => Float -> IO (GValueConstruct o)
- getAlignmentXalign :: (MonadIO m, IsAlignment o) => o -> m Float
- setAlignmentXalign :: (MonadIO m, IsAlignment o) => o -> Float -> m ()
- constructAlignmentXscale :: IsAlignment o => Float -> IO (GValueConstruct o)
- getAlignmentXscale :: (MonadIO m, IsAlignment o) => o -> m Float
- setAlignmentXscale :: (MonadIO m, IsAlignment o) => o -> Float -> m ()
- constructAlignmentYalign :: IsAlignment o => Float -> IO (GValueConstruct o)
- getAlignmentYalign :: (MonadIO m, IsAlignment o) => o -> m Float
- setAlignmentYalign :: (MonadIO m, IsAlignment o) => o -> Float -> m ()
- 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
Constructors
Alignment (ManagedPtr Alignment) |
class GObject o => IsAlignment o Source #
Instances
toAlignment :: (MonadIO m, IsAlignment o) => o -> m Alignment Source #
Methods
getPadding
Arguments
:: (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
Arguments
:: (HasCallStack, MonadIO m) | |
=> Float |
|
-> Float |
|
-> Float |
|
-> Float |
|
-> m Alignment | Returns: the new |
set
Arguments
:: (HasCallStack, MonadIO m, IsAlignment a) | |
=> a |
|
-> Float |
|
-> Float |
|
-> Float |
|
-> Float |
|
-> m () |
setPadding
Arguments
:: (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
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
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
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
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
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
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
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
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 #