gtk3-0.14.5: Binding to the Gtk+ 3 graphical user interface library

Maintainergtk2hs-users@lists.sourceforge.net
Stabilityprovisional
Portabilityportable (depends on GHC)
Safe HaskellNone
LanguageHaskell98

Graphics.UI.Gtk.Layout.Grid

Contents

Description

A widget which controls the alignment and size of its child

Synopsis

Detail

Grid packs widgets into rows and columns.

Types

Constructors

gridNew :: IO Grid Source #

Creates a new grid widget.

Methods

gridAttach Source #

Arguments

:: (GridClass self, WidgetClass child) 
=> self

self - the grid.

-> child

child - the widget to add.

-> Int

left - the column number of to attach the left side of child to.

-> Int

top - the row number to attach the top side of child to.

-> Int

width - the number of columns that child will span.

-> Int

height - the number of rows that child will span.

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

gridAttachNextTo Source #

Arguments

:: (GridClass self, WidgetClass child, WidgetClass sibling) 
=> self

self - the grid.

-> child

child - the widget to add

-> Maybe sibling

sib - the child of grid that child will be placed next to.

-> PositionType

pos - the side of the sibling that child is positioned next to.

-> Int

width - the number of columns that child will span.

-> Int

height - the number of rows that child will span.

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

gridSetRowHomogeneous Source #

Arguments

:: GridClass self 
=> self

self - the grid.

-> Bool

homogeneous - True to make row homogeneous.

-> IO () 

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

gridGetRowHomogeneous Source #

Arguments

:: GridClass self 
=> self

self - the grid.

-> IO Bool

returns whether all rows of grid have same height.

Returns whether all rows of grid have the same height.

gridSetRowSpacing Source #

Arguments

:: GridClass self 
=> self

self - the grid.

-> Int

spacing - the amount of space to insert between rows.

-> IO () 

Sets the amount of space between rows of grid.

gridGetRowSpacing Source #

Arguments

:: GridClass self 
=> self

self - the grid.

-> IO Int

returns the spacing of grid.

Returns the amount of space between the rows of grid.

gridSetColumnHomogeneous Source #

Arguments

:: GridClass self 
=> self

self - the grid.

-> Bool

homogeneous - True to make columns homogeneous.

-> IO () 

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

gridGetColumnHomogeneous Source #

Arguments

:: GridClass self 
=> self

self - the grid.

-> IO Bool

returns whether all columns of grid have the same width.

Returns whether all columns of grid have the same width.

gridSetColumnSpacing Source #

Arguments

:: GridClass self 
=> self

self - the grid.

-> Int

spacing - the amount of space to insert between columns.

-> IO () 

Sets the amount of space between columns of grid.

gridGetColumnSpacing Source #

Arguments

:: GridClass self 
=> self

self - the grid.

-> IO Int

returns the spacing of grid.

Returns the amount of space between the columns of grid.

gridGetChildAt Source #

Arguments

:: GridClass self 
=> self

self - the grid.

-> Int

left - the left edge of the cell.

-> Int

top - the top edge of the cell.

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

gridInsertRow Source #

Arguments

:: GridClass self 
=> self

self - the grid.

-> Int

pos - the position to insert the row at.

-> IO () 

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.

gridInsertColumn Source #

Arguments

:: GridClass self 
=> self

self - the grid.

-> Int

pos - the positiion to insert the column at.

-> IO () 

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

gridInsertNextTo Source #

Arguments

:: (GridClass self, WidgetClass sibling) 
=> self

self - the grid.

-> sibling

sib - the child of grid that the new row or column will be placed next to.

-> PositionType

pos - the isde of the sibling that child is positioned next to.

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

gridRemoveRow Source #

Arguments

:: GridClass self 
=> self

self - the grid.

-> Int

pos - the position of the row to remove.

-> IO () 

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.

gridRemoveColumn Source #

Arguments

:: GridClass self 
=> self

self - the grid.

-> Int

pos -the position of the column to remove.

-> IO () 

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.

gridGetBaselineRow Source #

Arguments

:: GridClass self 
=> self

self - the grid.

-> IO Int

returns the row index defining the global baseline.

Returns which row defines the global baseline of grid.

gridSetBaselineRow Source #

Arguments

:: GridClass self 
=> self

self - the grid.

-> Int

row - the row index.

-> IO () 

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 #

Arguments

:: GridClass self 
=> self

self - the grid.

-> Int

row - a row index.

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

Arguments

:: GridClass self 
=> self

self - the grid.

-> Int

row - a row index.

-> BaselinePosition

pos - a 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.