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 |
GtkGridLayout
is a layout manager which arranges child widgets in
rows and columns.
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 GtkGridLayout
when several children occupy the same
grid cell is undefined.
GtkGridLayout
can be used like a GtkBoxLayout
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 GtkBoxLayout
.
Synopsis
- newtype GridLayout = GridLayout (ManagedPtr GridLayout)
- class (GObject o, IsDescendantOf GridLayout o) => IsGridLayout o
- toGridLayout :: (MonadIO m, IsGridLayout o) => o -> m GridLayout
- gridLayoutGetBaselineRow :: (HasCallStack, MonadIO m, IsGridLayout a) => a -> m Int32
- gridLayoutGetColumnHomogeneous :: (HasCallStack, MonadIO m, IsGridLayout a) => a -> m Bool
- gridLayoutGetColumnSpacing :: (HasCallStack, MonadIO m, IsGridLayout a) => a -> m Word32
- gridLayoutGetRowBaselinePosition :: (HasCallStack, MonadIO m, IsGridLayout a) => a -> Int32 -> m BaselinePosition
- gridLayoutGetRowHomogeneous :: (HasCallStack, MonadIO m, IsGridLayout a) => a -> m Bool
- gridLayoutGetRowSpacing :: (HasCallStack, MonadIO m, IsGridLayout a) => a -> m Word32
- gridLayoutNew :: (HasCallStack, MonadIO m) => m GridLayout
- gridLayoutSetBaselineRow :: (HasCallStack, MonadIO m, IsGridLayout a) => a -> Int32 -> m ()
- gridLayoutSetColumnHomogeneous :: (HasCallStack, MonadIO m, IsGridLayout a) => a -> Bool -> m ()
- gridLayoutSetColumnSpacing :: (HasCallStack, MonadIO m, IsGridLayout a) => a -> Word32 -> m ()
- gridLayoutSetRowBaselinePosition :: (HasCallStack, MonadIO m, IsGridLayout a) => a -> Int32 -> BaselinePosition -> m ()
- gridLayoutSetRowHomogeneous :: (HasCallStack, MonadIO m, IsGridLayout a) => a -> Bool -> m ()
- gridLayoutSetRowSpacing :: (HasCallStack, MonadIO m, IsGridLayout a) => a -> Word32 -> m ()
- constructGridLayoutBaselineRow :: (IsGridLayout o, MonadIO m) => Int32 -> m (GValueConstruct o)
- getGridLayoutBaselineRow :: (MonadIO m, IsGridLayout o) => o -> m Int32
- setGridLayoutBaselineRow :: (MonadIO m, IsGridLayout o) => o -> Int32 -> m ()
- constructGridLayoutColumnHomogeneous :: (IsGridLayout o, MonadIO m) => Bool -> m (GValueConstruct o)
- getGridLayoutColumnHomogeneous :: (MonadIO m, IsGridLayout o) => o -> m Bool
- setGridLayoutColumnHomogeneous :: (MonadIO m, IsGridLayout o) => o -> Bool -> m ()
- constructGridLayoutColumnSpacing :: (IsGridLayout o, MonadIO m) => Int32 -> m (GValueConstruct o)
- getGridLayoutColumnSpacing :: (MonadIO m, IsGridLayout o) => o -> m Int32
- setGridLayoutColumnSpacing :: (MonadIO m, IsGridLayout o) => o -> Int32 -> m ()
- constructGridLayoutRowHomogeneous :: (IsGridLayout o, MonadIO m) => Bool -> m (GValueConstruct o)
- getGridLayoutRowHomogeneous :: (MonadIO m, IsGridLayout o) => o -> m Bool
- setGridLayoutRowHomogeneous :: (MonadIO m, IsGridLayout o) => o -> Bool -> m ()
- constructGridLayoutRowSpacing :: (IsGridLayout o, MonadIO m) => Int32 -> m (GValueConstruct o)
- getGridLayoutRowSpacing :: (MonadIO m, IsGridLayout o) => o -> m Int32
- setGridLayoutRowSpacing :: (MonadIO m, IsGridLayout o) => o -> Int32 -> m ()
Exported types
newtype GridLayout Source #
Memory-managed wrapper type.
GridLayout (ManagedPtr GridLayout) |
Instances
Eq GridLayout Source # | |
Defined in GI.Gtk.Objects.GridLayout (==) :: GridLayout -> GridLayout -> Bool # (/=) :: GridLayout -> GridLayout -> Bool # | |
GObject GridLayout Source # | |
Defined in GI.Gtk.Objects.GridLayout | |
ManagedPtrNewtype GridLayout Source # | |
Defined in GI.Gtk.Objects.GridLayout toManagedPtr :: GridLayout -> ManagedPtr GridLayout | |
TypedObject GridLayout Source # | |
Defined in GI.Gtk.Objects.GridLayout | |
HasParentTypes GridLayout Source # | |
Defined in GI.Gtk.Objects.GridLayout | |
IsGValue (Maybe GridLayout) Source # | Convert |
Defined in GI.Gtk.Objects.GridLayout gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe GridLayout -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe GridLayout) | |
type ParentTypes GridLayout Source # | |
Defined in GI.Gtk.Objects.GridLayout |
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
(GObject o, IsDescendantOf GridLayout o) => IsGridLayout o Source # | |
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
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
getBaselineRow, getColumnHomogeneous, getColumnSpacing, getData, getLayoutChild, getProperty, getQdata, getRequestMode, getRowBaselinePosition, getRowHomogeneous, getRowSpacing, getWidget.
Setters
setBaselineRow, setColumnHomogeneous, setColumnSpacing, setData, setDataFull, setProperty, setRowBaselinePosition, setRowHomogeneous, setRowSpacing.
getBaselineRow
gridLayoutGetBaselineRow Source #
:: (HasCallStack, MonadIO m, IsGridLayout a) | |
=> a |
|
-> m Int32 | Returns: the global baseline row |
Retrieves the row set with gridLayoutSetBaselineRow
.
getColumnHomogeneous
gridLayoutGetColumnHomogeneous Source #
:: (HasCallStack, MonadIO m, IsGridLayout a) | |
=> a |
|
-> m Bool | Returns: |
Checks whether all columns of grid
should have the same width.
getColumnSpacing
gridLayoutGetColumnSpacing Source #
:: (HasCallStack, MonadIO m, IsGridLayout a) | |
=> a |
|
-> m Word32 | Returns: the spacing between consecutive columns |
Retrieves the spacing set with gridLayoutSetColumnSpacing
.
getRowBaselinePosition
gridLayoutGetRowBaselinePosition Source #
:: (HasCallStack, MonadIO m, IsGridLayout a) | |
=> a |
|
-> Int32 |
|
-> m BaselinePosition | Returns: the baseline position of |
Returns the baseline position of row
.
If no value has been set with
gridLayoutSetRowBaselinePosition
,
the default value of BaselinePositionCenter
is returned.
getRowHomogeneous
gridLayoutGetRowHomogeneous Source #
:: (HasCallStack, MonadIO m, IsGridLayout a) | |
=> a |
|
-> m Bool | Returns: |
Checks whether all rows of grid
should have the same height.
getRowSpacing
gridLayoutGetRowSpacing Source #
:: (HasCallStack, MonadIO m, IsGridLayout a) | |
=> a |
|
-> m Word32 | Returns: the spacing between consecutive rows |
Retrieves the spacing set with gridLayoutSetRowSpacing
.
new
:: (HasCallStack, MonadIO m) | |
=> m GridLayout | Returns: the newly created |
Creates a new GtkGridLayout
.
setBaselineRow
gridLayoutSetBaselineRow Source #
:: (HasCallStack, MonadIO m, IsGridLayout a) | |
=> a |
|
-> Int32 |
|
-> 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 #
:: (HasCallStack, MonadIO m, IsGridLayout a) | |
=> a |
|
-> Bool |
|
-> m () |
Sets whether all columns of grid
should have the same width.
setColumnSpacing
gridLayoutSetColumnSpacing Source #
:: (HasCallStack, MonadIO m, IsGridLayout a) | |
=> a |
|
-> Word32 |
|
-> m () |
Sets the amount of space to insert between consecutive columns.
setRowBaselinePosition
gridLayoutSetRowBaselinePosition Source #
:: (HasCallStack, MonadIO m, IsGridLayout a) | |
=> a |
|
-> Int32 |
|
-> 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 #
:: (HasCallStack, MonadIO m, IsGridLayout a) | |
=> a |
|
-> Bool |
|
-> m () |
Sets whether all rows of grid
should have the same height.
setRowSpacing
gridLayoutSetRowSpacing Source #
:: (HasCallStack, MonadIO m, IsGridLayout a) | |
=> a |
|
-> Word32 |
|
-> m () |
Sets the amount of space to insert between consecutive rows.
Properties
baselineRow
The row to align to the baseline, when GtkWidget: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 ]