gi-gtk-4.0.4: 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.GridLayout

Description

GtkGridLayout is a layout manager which arranges child widgets in rows and columns, with arbitrary positions and horizontal/vertical spans.

Children have an "attach point" defined by the horizontal and vertical index of the cell they occupy; children can span multiple rows or columns. The layout properties for setting the attach points and spans are set using the GridLayoutChild associated to each child widget.

The behaviour of GtkGrid when several children occupy the same grid cell is undefined.

GtkGridLayout can be used like a BoxLayout if all children are attached to the same row or column; however, if you only ever need a single row or column, you should consider using BoxLayout.

Synopsis

Exported types

newtype GridLayout Source #

Memory-managed wrapper type.

Constructors

GridLayout (ManagedPtr GridLayout) 

Instances

Instances details
Eq GridLayout Source # 
Instance details

Defined in GI.Gtk.Objects.GridLayout

GObject GridLayout Source # 
Instance details

Defined in GI.Gtk.Objects.GridLayout

ManagedPtrNewtype GridLayout Source # 
Instance details

Defined in GI.Gtk.Objects.GridLayout

Methods

toManagedPtr :: GridLayout -> ManagedPtr GridLayout

TypedObject GridLayout Source # 
Instance details

Defined in GI.Gtk.Objects.GridLayout

Methods

glibType :: IO GType

HasParentTypes GridLayout Source # 
Instance details

Defined in GI.Gtk.Objects.GridLayout

IsGValue (Maybe GridLayout) Source #

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

Instance details

Defined in GI.Gtk.Objects.GridLayout

Methods

gvalueGType_ :: IO GType

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

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

type ParentTypes GridLayout Source # 
Instance details

Defined in GI.Gtk.Objects.GridLayout

type ParentTypes GridLayout = '[LayoutManager, Object]

class (GObject o, IsDescendantOf GridLayout o) => IsGridLayout o Source #

Type class for types which can be safely cast to GridLayout, for instance with toGridLayout.

Instances

Instances details
(GObject o, IsDescendantOf GridLayout o) => IsGridLayout o Source # 
Instance details

Defined in GI.Gtk.Objects.GridLayout

toGridLayout :: (MonadIO m, IsGridLayout o) => o -> m GridLayout Source #

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

Methods

getBaselineRow

gridLayoutGetBaselineRow Source #

Arguments

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

grid: a GridLayout

-> m Int32

Returns: the global baseline row

Retrieves the row set with gridLayoutSetBaselineRow.

getColumnHomogeneous

gridLayoutGetColumnHomogeneous Source #

Arguments

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

grid: a GridLayout

-> m Bool

Returns: True if the columns are homogeneous, and False otherwise

Checks whether all columns of grid should have the same width.

getColumnSpacing

gridLayoutGetColumnSpacing Source #

Arguments

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

grid: a GridLayout

-> m Word32

Returns: the spacing between consecutive columns

Retrieves the spacing set with gridLayoutSetColumnSpacing.

getRowBaselinePosition

gridLayoutGetRowBaselinePosition Source #

Arguments

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

grid: a GridLayout

-> Int32

row: a row index

-> m BaselinePosition

Returns: the baseline position of row

Returns the baseline position of row as set by gridLayoutSetRowBaselinePosition, or the default value of BaselinePositionCenter.

getRowHomogeneous

gridLayoutGetRowHomogeneous Source #

Arguments

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

grid: a GridLayout

-> m Bool

Returns: True if the rows are homogeneous, and False otherwise

Checks whether all rows of grid should have the same height.

getRowSpacing

gridLayoutGetRowSpacing Source #

Arguments

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

grid: a GridLayout

-> m Word32

Returns: the spacing between consecutive rows

Retrieves the spacing set with gridLayoutSetRowSpacing.

new

gridLayoutNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m GridLayout

Returns: the newly created GridLayout

Creates a new GridLayout.

setBaselineRow

gridLayoutSetBaselineRow Source #

Arguments

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

grid: a GridLayout

-> Int32

row: the row index

-> m () 

Sets which row defines the global baseline for the entire grid.

Each row in the grid can have its own local baseline, but only one of those is global, meaning it will be the baseline in the parent of the grid.

setColumnHomogeneous

gridLayoutSetColumnHomogeneous Source #

Arguments

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

grid: a GridLayout

-> Bool

homogeneous: True to make columns homogeneous

-> m () 

Sets whether all columns of grid should have the same width.

setColumnSpacing

gridLayoutSetColumnSpacing Source #

Arguments

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

grid: a GridLayout

-> Word32

spacing: the amount of space between columns, in pixels

-> m () 

Sets the amount of space to insert between consecutive columns.

setRowBaselinePosition

gridLayoutSetRowBaselinePosition Source #

Arguments

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

grid: a GridLayout

-> Int32

row: a row index

-> BaselinePosition

pos: a BaselinePosition

-> m () 

Sets how the baseline should be positioned on row of the grid, in case that row is assigned more space than is requested.

setRowHomogeneous

gridLayoutSetRowHomogeneous Source #

Arguments

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

grid: a GridLayout

-> Bool

homogeneous: True to make rows homogeneous

-> m () 

Sets whether all rows of grid should have the same height.

setRowSpacing

gridLayoutSetRowSpacing Source #

Arguments

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

grid: a GridLayout

-> Word32

spacing: the amount of space between rows, in pixels

-> m () 

Sets the amount of space to insert between consecutive rows.

Properties

baselineRow

The row to align to the baseline, when Widget:valign is set to AlignBaseline.

constructGridLayoutBaselineRow :: (IsGridLayout o, MonadIO m) => Int32 -> m (GValueConstruct o) Source #

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

getGridLayoutBaselineRow :: (MonadIO m, IsGridLayout o) => o -> m Int32 Source #

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

get gridLayout #baselineRow

setGridLayoutBaselineRow :: (MonadIO m, IsGridLayout o) => o -> Int32 -> m () Source #

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

set gridLayout [ #baselineRow := value ]

columnHomogeneous

Whether all the columns in the grid have the same width.

constructGridLayoutColumnHomogeneous :: (IsGridLayout o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

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

getGridLayoutColumnHomogeneous :: (MonadIO m, IsGridLayout o) => o -> m Bool Source #

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

get gridLayout #columnHomogeneous

setGridLayoutColumnHomogeneous :: (MonadIO m, IsGridLayout o) => o -> Bool -> m () Source #

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

set gridLayout [ #columnHomogeneous := value ]

columnSpacing

The amount of space between to consecutive columns.

constructGridLayoutColumnSpacing :: (IsGridLayout o, MonadIO m) => Int32 -> m (GValueConstruct o) Source #

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

getGridLayoutColumnSpacing :: (MonadIO m, IsGridLayout o) => o -> m Int32 Source #

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

get gridLayout #columnSpacing

setGridLayoutColumnSpacing :: (MonadIO m, IsGridLayout o) => o -> Int32 -> m () Source #

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

set gridLayout [ #columnSpacing := value ]

rowHomogeneous

Whether all the rows in the grid have the same height.

constructGridLayoutRowHomogeneous :: (IsGridLayout o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

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

getGridLayoutRowHomogeneous :: (MonadIO m, IsGridLayout o) => o -> m Bool Source #

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

get gridLayout #rowHomogeneous

setGridLayoutRowHomogeneous :: (MonadIO m, IsGridLayout o) => o -> Bool -> m () Source #

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

set gridLayout [ #rowHomogeneous := value ]

rowSpacing

The amount of space between to consecutive rows.

constructGridLayoutRowSpacing :: (IsGridLayout o, MonadIO m) => Int32 -> m (GValueConstruct o) Source #

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

getGridLayoutRowSpacing :: (MonadIO m, IsGridLayout o) => o -> m Int32 Source #

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

get gridLayout #rowSpacing

setGridLayoutRowSpacing :: (MonadIO m, IsGridLayout o) => o -> Int32 -> m () Source #

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

set gridLayout [ #rowSpacing := value ]