Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
GI.Gtk.Objects.BoxLayout
Description
GtkBoxLayout
is a layout manager that arranges children in a single
row or column.
Whether it is a row or column depends on the value of its
Orientable
:orientation
property. Within the other dimension
all children all allocated the same size. The GtkBoxLayout
will respect
the Widget:halign and Widget:valign
properties of each child widget.
If you want all children to be assigned the same size, you can use the BoxLayout:homogeneous property.
If you want to specify the amount of space placed between each child, you can use the BoxLayout:spacing property.
Synopsis
- newtype BoxLayout = BoxLayout (ManagedPtr BoxLayout)
- class (GObject o, IsDescendantOf BoxLayout o) => IsBoxLayout o
- toBoxLayout :: (MonadIO m, IsBoxLayout o) => o -> m BoxLayout
- boxLayoutGetBaselineChild :: (HasCallStack, MonadIO m, IsBoxLayout a) => a -> m Int32
- boxLayoutGetBaselinePosition :: (HasCallStack, MonadIO m, IsBoxLayout a) => a -> m BaselinePosition
- boxLayoutGetHomogeneous :: (HasCallStack, MonadIO m, IsBoxLayout a) => a -> m Bool
- boxLayoutGetSpacing :: (HasCallStack, MonadIO m, IsBoxLayout a) => a -> m Word32
- boxLayoutNew :: (HasCallStack, MonadIO m) => Orientation -> m BoxLayout
- boxLayoutSetBaselineChild :: (HasCallStack, MonadIO m, IsBoxLayout a) => a -> Int32 -> m ()
- boxLayoutSetBaselinePosition :: (HasCallStack, MonadIO m, IsBoxLayout a) => a -> BaselinePosition -> m ()
- boxLayoutSetHomogeneous :: (HasCallStack, MonadIO m, IsBoxLayout a) => a -> Bool -> m ()
- boxLayoutSetSpacing :: (HasCallStack, MonadIO m, IsBoxLayout a) => a -> Word32 -> m ()
- constructBoxLayoutBaselineChild :: (IsBoxLayout o, MonadIO m) => Int32 -> m (GValueConstruct o)
- getBoxLayoutBaselineChild :: (MonadIO m, IsBoxLayout o) => o -> m Int32
- setBoxLayoutBaselineChild :: (MonadIO m, IsBoxLayout o) => o -> Int32 -> m ()
- constructBoxLayoutBaselinePosition :: (IsBoxLayout o, MonadIO m) => BaselinePosition -> m (GValueConstruct o)
- getBoxLayoutBaselinePosition :: (MonadIO m, IsBoxLayout o) => o -> m BaselinePosition
- setBoxLayoutBaselinePosition :: (MonadIO m, IsBoxLayout o) => o -> BaselinePosition -> m ()
- constructBoxLayoutHomogeneous :: (IsBoxLayout o, MonadIO m) => Bool -> m (GValueConstruct o)
- getBoxLayoutHomogeneous :: (MonadIO m, IsBoxLayout o) => o -> m Bool
- setBoxLayoutHomogeneous :: (MonadIO m, IsBoxLayout o) => o -> Bool -> m ()
- constructBoxLayoutSpacing :: (IsBoxLayout o, MonadIO m) => Int32 -> m (GValueConstruct o)
- getBoxLayoutSpacing :: (MonadIO m, IsBoxLayout o) => o -> m Int32
- setBoxLayoutSpacing :: (MonadIO m, IsBoxLayout o) => o -> Int32 -> m ()
Exported types
Memory-managed wrapper type.
Instances
Eq BoxLayout Source # | |
GObject BoxLayout Source # | |
Defined in GI.Gtk.Objects.BoxLayout | |
ManagedPtrNewtype BoxLayout Source # | |
Defined in GI.Gtk.Objects.BoxLayout Methods toManagedPtr :: BoxLayout -> ManagedPtr BoxLayout | |
TypedObject BoxLayout Source # | |
Defined in GI.Gtk.Objects.BoxLayout | |
HasParentTypes BoxLayout Source # | |
Defined in GI.Gtk.Objects.BoxLayout | |
IsGValue (Maybe BoxLayout) Source # | Convert |
Defined in GI.Gtk.Objects.BoxLayout Methods gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe BoxLayout -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe BoxLayout) | |
type ParentTypes BoxLayout Source # | |
Defined in GI.Gtk.Objects.BoxLayout |
class (GObject o, IsDescendantOf BoxLayout o) => IsBoxLayout o Source #
Type class for types which can be safely cast to BoxLayout
, for instance with toBoxLayout
.
Instances
(GObject o, IsDescendantOf BoxLayout o) => IsBoxLayout o Source # | |
Defined in GI.Gtk.Objects.BoxLayout |
toBoxLayout :: (MonadIO m, IsBoxLayout o) => o -> m BoxLayout Source #
Methods
Click to display all available methods, including inherited ones
Methods
allocate, bindProperty, bindPropertyFull, forceFloating, freezeNotify, getv, isFloating, layoutChanged, measure, notify, notifyByPspec, ref, refSink, runDispose, stealData, stealQdata, thawNotify, unref, watchClosure.
Getters
getBaselineChild, getBaselinePosition, getData, getHomogeneous, getLayoutChild, getOrientation, getProperty, getQdata, getRequestMode, getSpacing, getWidget.
Setters
setBaselineChild, setBaselinePosition, setData, setDataFull, setHomogeneous, setOrientation, setProperty, setSpacing.
getBaselineChild
boxLayoutGetBaselineChild Source #
Arguments
:: (HasCallStack, MonadIO m, IsBoxLayout a) | |
=> a |
|
-> m Int32 | Returns: the index of the child that determines the baseline in vertical layout, or -1 |
Gets the value set by boxLayoutSetBaselineChild
.
Since: 4.12
getBaselinePosition
boxLayoutGetBaselinePosition Source #
Arguments
:: (HasCallStack, MonadIO m, IsBoxLayout a) | |
=> a |
|
-> m BaselinePosition | Returns: the baseline position |
Gets the value set by boxLayoutSetBaselinePosition
.
getHomogeneous
boxLayoutGetHomogeneous Source #
Arguments
:: (HasCallStack, MonadIO m, IsBoxLayout a) | |
=> a |
|
-> m Bool | Returns: |
Returns whether the layout is set to be homogeneous.
getSpacing
Arguments
:: (HasCallStack, MonadIO m, IsBoxLayout a) | |
=> a |
|
-> m Word32 | Returns: the spacing of the layout |
Returns the space that boxLayout
puts between children.
new
Arguments
:: (HasCallStack, MonadIO m) | |
=> Orientation |
|
-> m BoxLayout | Returns: a new box layout |
Creates a new GtkBoxLayout
.
setBaselineChild
boxLayoutSetBaselineChild Source #
Arguments
:: (HasCallStack, MonadIO m, IsBoxLayout a) | |
=> a |
|
-> Int32 |
|
-> m () |
Sets the index of the child that determines the baseline in vertical layout.
Since: 4.12
setBaselinePosition
boxLayoutSetBaselinePosition Source #
Arguments
:: (HasCallStack, MonadIO m, IsBoxLayout a) | |
=> a |
|
-> BaselinePosition |
|
-> m () |
Sets the baseline position of a box layout.
The baseline position affects only horizontal boxes with at least one
baseline aligned child. If there is more vertical space available than
requested, and the baseline is not allocated by the parent then the
given position
is used to allocate the baseline within the extra
space available.
setHomogeneous
boxLayoutSetHomogeneous Source #
Arguments
:: (HasCallStack, MonadIO m, IsBoxLayout a) | |
=> a |
|
-> Bool |
|
-> m () |
Sets whether the box layout will allocate the same size to all children.
setSpacing
Arguments
:: (HasCallStack, MonadIO m, IsBoxLayout a) | |
=> a |
|
-> Word32 |
|
-> m () |
Sets how much spacing to put between children.
Properties
baselineChild
The child that determines the baseline of the box in vertical layout.
If the child does baseline positioning, then its baseline is lined up with the baseline of the box. If it doesn't, then the bottom edge of the child is used.
Since: 4.12
constructBoxLayoutBaselineChild :: (IsBoxLayout o, MonadIO m) => Int32 -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “baseline-child
” property. This is rarely needed directly, but it is used by new
.
getBoxLayoutBaselineChild :: (MonadIO m, IsBoxLayout o) => o -> m Int32 Source #
Get the value of the “baseline-child
” property.
When overloading is enabled, this is equivalent to
get
boxLayout #baselineChild
setBoxLayoutBaselineChild :: (MonadIO m, IsBoxLayout o) => o -> Int32 -> m () Source #
Set the value of the “baseline-child
” property.
When overloading is enabled, this is equivalent to
set
boxLayout [ #baselineChild:=
value ]
baselinePosition
The position of the allocated baseline within the extra space allocated to each child.
This property is only relevant for horizontal layouts containing at least one child with a baseline alignment.
constructBoxLayoutBaselinePosition :: (IsBoxLayout o, MonadIO m) => BaselinePosition -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “baseline-position
” property. This is rarely needed directly, but it is used by new
.
getBoxLayoutBaselinePosition :: (MonadIO m, IsBoxLayout o) => o -> m BaselinePosition Source #
Get the value of the “baseline-position
” property.
When overloading is enabled, this is equivalent to
get
boxLayout #baselinePosition
setBoxLayoutBaselinePosition :: (MonadIO m, IsBoxLayout o) => o -> BaselinePosition -> m () Source #
Set the value of the “baseline-position
” property.
When overloading is enabled, this is equivalent to
set
boxLayout [ #baselinePosition:=
value ]
homogeneous
Whether the box layout should distribute the available space equally among the children.
constructBoxLayoutHomogeneous :: (IsBoxLayout o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “homogeneous
” property. This is rarely needed directly, but it is used by new
.
getBoxLayoutHomogeneous :: (MonadIO m, IsBoxLayout o) => o -> m Bool Source #
Get the value of the “homogeneous
” property.
When overloading is enabled, this is equivalent to
get
boxLayout #homogeneous
setBoxLayoutHomogeneous :: (MonadIO m, IsBoxLayout o) => o -> Bool -> m () Source #
Set the value of the “homogeneous
” property.
When overloading is enabled, this is equivalent to
set
boxLayout [ #homogeneous:=
value ]
spacing
The space to put between the children.
constructBoxLayoutSpacing :: (IsBoxLayout o, MonadIO m) => Int32 -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “spacing
” property. This is rarely needed directly, but it is used by new
.
getBoxLayoutSpacing :: (MonadIO m, IsBoxLayout o) => o -> m Int32 Source #
Get the value of the “spacing
” property.
When overloading is enabled, this is equivalent to
get
boxLayout #spacing
setBoxLayoutSpacing :: (MonadIO m, IsBoxLayout o) => o -> Int32 -> m () Source #
Set the value of the “spacing
” property.
When overloading is enabled, this is equivalent to
set
boxLayout [ #spacing:=
value ]