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

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

Exported types

newtype BoxLayout Source #

Memory-managed wrapper type.

Constructors

BoxLayout (ManagedPtr BoxLayout) 

Instances

Instances details
Eq BoxLayout Source # 
Instance details

Defined in GI.Gtk.Objects.BoxLayout

GObject BoxLayout Source # 
Instance details

Defined in GI.Gtk.Objects.BoxLayout

ManagedPtrNewtype BoxLayout Source # 
Instance details

Defined in GI.Gtk.Objects.BoxLayout

Methods

toManagedPtr :: BoxLayout -> ManagedPtr BoxLayout

TypedObject BoxLayout Source # 
Instance details

Defined in GI.Gtk.Objects.BoxLayout

Methods

glibType :: IO GType

HasParentTypes BoxLayout Source # 
Instance details

Defined in GI.Gtk.Objects.BoxLayout

IsGValue (Maybe BoxLayout) Source #

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

Instance details

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 # 
Instance details

Defined in GI.Gtk.Objects.BoxLayout

type ParentTypes BoxLayout = '[LayoutManager, Object, Orientable]

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

Instances details
(GObject o, IsDescendantOf BoxLayout o) => IsBoxLayout o Source # 
Instance details

Defined in GI.Gtk.Objects.BoxLayout

toBoxLayout :: (MonadIO m, IsBoxLayout o) => o -> m BoxLayout Source #

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

Methods

getBaselinePosition

boxLayoutGetBaselinePosition Source #

Arguments

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

boxLayout: a GtkBoxLayout

-> m BaselinePosition

Returns: the baseline position

Gets the value set by boxLayoutSetBaselinePosition.

getHomogeneous

boxLayoutGetHomogeneous Source #

Arguments

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

boxLayout: a GtkBoxLayout

-> m Bool

Returns: True if the layout is homogeneous

Returns whether the layout is set to be homogeneous.

getSpacing

boxLayoutGetSpacing Source #

Arguments

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

boxLayout: a GtkBoxLayout

-> m Word32

Returns: the spacing of the layout

Returns the space that boxLayout puts between children.

new

boxLayoutNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Orientation

orientation: the orientation for the new layout

-> m BoxLayout

Returns: a new box layout

Creates a new GtkBoxLayout.

setBaselinePosition

boxLayoutSetBaselinePosition Source #

Arguments

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

boxLayout: a GtkBoxLayout

-> BaselinePosition

position: a GtkBaselinePosition

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

boxLayout: a GtkBoxLayout

-> Bool

homogeneous: True to set the box layout as homogeneous

-> m () 

Sets whether the box layout will allocate the same size to all children.

setSpacing

boxLayoutSetSpacing Source #

Arguments

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

boxLayout: a GtkBoxLayout

-> Word32

spacing: the spacing to apply between children

-> m () 

Sets how much spacing to put between children.

Properties

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 ]