Maintainer | gtk2hs-users@lists.sourceforge.net |
---|---|
Stability | provisional |
Portability | portable (depends on GHC) |
Safe Haskell | None |
Language | Haskell98 |
A widget which controls the alignment and size of its child
- data Grid
- class ContainerClass o => GridClass o
- castToGrid :: GObjectClass obj => obj -> Grid
- gTypeGrid :: GType
- toGrid :: GridClass o => o -> Grid
- gridNew :: IO Grid
- gridAttach :: (GridClass self, WidgetClass child) => self -> child -> Int -> Int -> Int -> Int -> IO ()
- gridAttachNextTo :: (GridClass self, WidgetClass child, WidgetClass sibling) => self -> child -> Maybe sibling -> PositionType -> Int -> Int -> IO ()
- gridSetRowHomogeneous :: GridClass self => self -> Bool -> IO ()
- gridGetRowHomogeneous :: GridClass self => self -> IO Bool
- gridSetRowSpacing :: GridClass self => self -> Int -> IO ()
- gridGetRowSpacing :: GridClass self => self -> IO Int
- gridSetColumnHomogeneous :: GridClass self => self -> Bool -> IO ()
- gridGetColumnHomogeneous :: GridClass self => self -> IO Bool
- gridSetColumnSpacing :: GridClass self => self -> Int -> IO ()
- gridGetColumnSpacing :: GridClass self => self -> IO Int
- gridGetChildAt :: GridClass self => self -> Int -> Int -> IO (Maybe Widget)
- gridInsertRow :: GridClass self => self -> Int -> IO ()
- gridInsertColumn :: GridClass self => self -> Int -> IO ()
- gridInsertNextTo :: (GridClass self, WidgetClass sibling) => self -> sibling -> PositionType -> IO ()
- gridRemoveRow :: GridClass self => self -> Int -> IO ()
- gridRemoveColumn :: GridClass self => self -> Int -> IO ()
- gridGetBaselineRow :: GridClass self => self -> IO Int
- gridSetBaselineRow :: GridClass self => self -> Int -> IO ()
- gridGetRowBaselinePosition :: GridClass self => self -> Int -> IO BaselinePosition
- gridSetRowBaselinePosition :: GridClass self => self -> Int -> BaselinePosition -> IO ()
Detail
Grid
packs widgets into rows and columns.
Types
castToGrid :: GObjectClass obj => obj -> Grid Source
Constructors
Methods
:: (GridClass self, WidgetClass child) | |
=> self |
|
-> child |
|
-> Int |
|
-> Int |
|
-> Int |
|
-> Int |
|
-> IO () |
Adds a widget to the grid. The position of child is determined by left and top. the number of "cells" that child will occupy is determined by width and height.
:: (GridClass self, WidgetClass child, WidgetClass sibling) | |
=> self |
|
-> child |
|
-> Maybe sibling |
|
-> PositionType |
|
-> Int |
|
-> Int |
|
-> IO () |
Adds a widget to the grid. The widget is placed next to sibling , on the side determined by side . When sibling is Nothing, the widget is placed in row (for left or right placement) or column 0 (for top or bottom placement), at the end indicated by side.
Attaching widgets labeled [1], [2], [3] with sibling == Nothing and side == GTK_POS_LEFT yields a layout of 3[1].
Sets whether all rows of grid will have the same height.
:: GridClass self | |
=> self |
|
-> IO Bool | returns whether all rows of grid have same height. |
Returns whether all rows of grid have the same height.
:: GridClass self | |
=> self |
|
-> Int |
|
-> IO () |
Sets the amount of space between rows of grid.
Returns the amount of space between the rows of grid.
gridSetColumnHomogeneous Source
:: GridClass self | |
=> self |
|
-> Bool |
|
-> IO () |
Sets whether all columns of grid will have the same width.
gridGetColumnHomogeneous Source
:: GridClass self | |
=> self |
|
-> IO Bool | returns whether all columns of grid have the same width. |
Returns whether all columns of grid have the same width.
:: GridClass self | |
=> self |
|
-> Int |
|
-> IO () |
Sets the amount of space between columns of grid.
Returns the amount of space between the columns of grid.
:: GridClass self | |
=> self |
|
-> Int |
|
-> Int |
|
-> IO (Maybe Widget) | returns the child at the given position or Nothing. |
Gets the child of grid whose area covers the grid cell whose upper left corner is at left , top .
Inserts a row at the specified position. Children which are attached at or below this position are moved one row down. Children which span across this position are grown to span the new row.
Inserts a column at the specified position. Children which are attached at or to the right of this position are moved one column to the right. Children which span across this position are grown to span the new column
:: (GridClass self, WidgetClass sibling) | |
=> self |
|
-> sibling |
|
-> PositionType |
|
-> IO () |
Inserts a row or column at the specified position. The new row or column is placed next to sibling , on the side determined by side. If side is GTK_POS_TOP or GTK_POS_BOTTOM, a row is inserted. If side is GTK_POS_LEFT of GTK_POS_RIGHT, a column is inserted.
Removes a row from the grid. Children that are placed in this row are removed, spanning children that overlap this row have their height reduced by one, and children below the row are moved up.
Removes a column from the grid. Children that are placed in this column are removed, spanning children that overlap this column have their width reduced by one, and children after the column are moved to the left.
:: GridClass self | |
=> self |
|
-> IO Int | returns the row index defining the global baseline. |
Returns which row defines the global baseline of grid.
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.
gridGetRowBaselinePosition Source
:: GridClass self | |
=> self |
|
-> Int |
|
-> IO BaselinePosition | returns the baseline position of row. |
Returns the baseline position of row as set by gridSetRowBaselinePosition or the default value BASELINE_POSITION_CENTER
gridSetRowBaselinePosition Source
:: GridClass self | |
=> self |
|
-> Int |
|
-> BaselinePosition |
|
-> IO () |
Sets how the baseline should be positioned on row of the grid, in case that row is assigned more space than is requested.