gi-gtk-3.0.37: 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.Table

Description

The Table functions allow the programmer to arrange widgets in rows and columns, making it easy to align many widgets next to each other, horizontally and vertically.

Tables are created with a call to tableNew, the size of which can later be changed with tableResize.

Widgets can be added to a table using tableAttach or the more convenient (but slightly less flexible) tableAttachDefaults.

To alter the space next to a specific row, use tableSetRowSpacing, and for a column, tableSetColSpacing. The gaps between all rows or columns can be changed by calling tableSetRowSpacings or tableSetColSpacings respectively. Note that spacing is added between the children, while padding added by tableAttach is added on either side of the widget it belongs to.

tableSetHomogeneous, can be used to set whether all cells in the table will resize themselves to the size of the largest widget in the table.

t'GI.Gtk.Objects.Table.Table' has been deprecated. Use t'GI.Gtk.Objects.Grid.Grid' instead. It provides the same
capabilities as GtkTable for arranging widgets in a rectangular grid, but
does support height-for-width geometry management.
Synopsis

Exported types

newtype Table Source #

Memory-managed wrapper type.

Constructors

Table (ManagedPtr Table) 

Instances

Instances details
Eq Table Source # 
Instance details

Defined in GI.Gtk.Objects.Table

Methods

(==) :: Table -> Table -> Bool #

(/=) :: Table -> Table -> Bool #

GObject Table Source # 
Instance details

Defined in GI.Gtk.Objects.Table

ManagedPtrNewtype Table Source # 
Instance details

Defined in GI.Gtk.Objects.Table

Methods

toManagedPtr :: Table -> ManagedPtr Table

TypedObject Table Source # 
Instance details

Defined in GI.Gtk.Objects.Table

Methods

glibType :: IO GType

HasParentTypes Table Source # 
Instance details

Defined in GI.Gtk.Objects.Table

IsGValue (Maybe Table) Source #

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

Instance details

Defined in GI.Gtk.Objects.Table

Methods

gvalueGType_ :: IO GType

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

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

type ParentTypes Table Source # 
Instance details

Defined in GI.Gtk.Objects.Table

type ParentTypes Table = '[Container, Widget, Object, ImplementorIface, Buildable]

class (GObject o, IsDescendantOf Table o) => IsTable o Source #

Type class for types which can be safely cast to Table, for instance with toTable.

Instances

Instances details
(GObject o, IsDescendantOf Table o) => IsTable o Source # 
Instance details

Defined in GI.Gtk.Objects.Table

toTable :: (MonadIO m, IsTable o) => o -> m Table Source #

Cast to Table, 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

Expand

Methods

activate, add, addAccelerator, addChild, addDeviceEvents, addEvents, addMnemonicLabel, addTickCallback, attach, attachDefaults, bindProperty, bindPropertyFull, canActivateAccel, checkResize, childFocus, childGetProperty, childNotify, childNotifyByPspec, childSetProperty, childType, classPath, computeExpand, constructChild, createPangoContext, createPangoLayout, customFinished, customTagEnd, customTagStart, destroy, destroyed, deviceIsShadowed, dragBegin, dragBeginWithCoordinates, dragCheckThreshold, dragDestAddImageTargets, dragDestAddTextTargets, dragDestAddUriTargets, dragDestFindTarget, dragDestGetTargetList, dragDestGetTrackMotion, dragDestSet, dragDestSetProxy, dragDestSetTargetList, dragDestSetTrackMotion, dragDestUnset, dragGetData, dragHighlight, dragSourceAddImageTargets, dragSourceAddTextTargets, dragSourceAddUriTargets, dragSourceGetTargetList, dragSourceSet, dragSourceSetIconGicon, dragSourceSetIconName, dragSourceSetIconPixbuf, dragSourceSetIconStock, dragSourceSetTargetList, dragSourceUnset, dragUnhighlight, draw, ensureStyle, errorBell, event, forall, forceFloating, foreach, freezeChildNotify, freezeNotify, getv, grabAdd, grabDefault, grabFocus, grabRemove, hasDefault, hasFocus, hasGrab, hasRcStyle, hasScreen, hasVisibleFocus, hide, hideOnDelete, inDestruction, initTemplate, inputShapeCombineRegion, insertActionGroup, intersect, isAncestor, isComposited, isDrawable, isFloating, isFocus, isSensitive, isToplevel, isVisible, keynavFailed, listAccelClosures, listActionPrefixes, listMnemonicLabels, map, mnemonicActivate, modifyBase, modifyBg, modifyCursor, modifyFg, modifyFont, modifyStyle, modifyText, notify, notifyByPspec, overrideBackgroundColor, overrideColor, overrideCursor, overrideFont, overrideSymbolicColor, parserFinished, path, propagateDraw, queueAllocate, queueComputeExpand, queueDraw, queueDrawArea, queueDrawRegion, queueResize, queueResizeNoRedraw, realize, ref, refSink, regionIntersect, registerWindow, remove, removeAccelerator, removeMnemonicLabel, removeTickCallback, renderIcon, renderIconPixbuf, reparent, resetRcStyles, resetStyle, resize, resizeChildren, runDispose, sendExpose, sendFocusChange, shapeCombineRegion, show, showAll, showNow, sizeAllocate, sizeAllocateWithBaseline, sizeRequest, stealData, stealQdata, styleAttach, styleGetProperty, thawChildNotify, thawNotify, translateCoordinates, triggerTooltipQuery, unmap, unparent, unrealize, unref, unregisterWindow, unsetFocusChain, unsetStateFlags, watchClosure.

Getters

getAccessible, getActionGroup, getAllocatedBaseline, getAllocatedHeight, getAllocatedSize, getAllocatedWidth, getAllocation, getAncestor, getAppPaintable, getBorderWidth, getCanDefault, getCanFocus, getChildRequisition, getChildVisible, getChildren, getClip, getClipboard, getColSpacing, getCompositeName, getData, getDefaultColSpacing, getDefaultRowSpacing, getDeviceEnabled, getDeviceEvents, getDirection, getDisplay, getDoubleBuffered, getEvents, getFocusChain, getFocusChild, getFocusHadjustment, getFocusOnClick, getFocusVadjustment, getFontMap, getFontOptions, getFrameClock, getHalign, getHasTooltip, getHasWindow, getHexpand, getHexpandSet, getHomogeneous, getInternalChild, getMapped, getMarginBottom, getMarginEnd, getMarginLeft, getMarginRight, getMarginStart, getMarginTop, getModifierMask, getModifierStyle, getName, getNoShowAll, getOpacity, getPangoContext, getParent, getParentWindow, getPath, getPathForChild, getPointer, getPreferredHeight, getPreferredHeightAndBaselineForWidth, getPreferredHeightForWidth, getPreferredSize, getPreferredWidth, getPreferredWidthForHeight, getProperty, getQdata, getRealized, getReceivesDefault, getRequestMode, getRequisition, getResizeMode, getRootWindow, getRowSpacing, getScaleFactor, getScreen, getSensitive, getSettings, getSize, getSizeRequest, getState, getStateFlags, getStyle, getStyleContext, getSupportMultidevice, getTemplateChild, getTooltipMarkup, getTooltipText, getTooltipWindow, getToplevel, getValign, getValignWithBaseline, getVexpand, getVexpandSet, getVisible, getVisual, getWindow.

Setters

setAccelPath, setAllocation, setAppPaintable, setBorderWidth, setBuildableProperty, setCanDefault, setCanFocus, setChildVisible, setClip, setColSpacing, setColSpacings, setCompositeName, setData, setDataFull, setDeviceEnabled, setDeviceEvents, setDirection, setDoubleBuffered, setEvents, setFocusChain, setFocusChild, setFocusHadjustment, setFocusOnClick, setFocusVadjustment, setFontMap, setFontOptions, setHalign, setHasTooltip, setHasWindow, setHexpand, setHexpandSet, setHomogeneous, setMapped, setMarginBottom, setMarginEnd, setMarginLeft, setMarginRight, setMarginStart, setMarginTop, setName, setNoShowAll, setOpacity, setParent, setParentWindow, setProperty, setRealized, setReallocateRedraws, setReceivesDefault, setRedrawOnAllocate, setResizeMode, setRowSpacing, setRowSpacings, setSensitive, setSizeRequest, setState, setStateFlags, setStyle, setSupportMultidevice, setTooltipMarkup, setTooltipText, setTooltipWindow, setValign, setVexpand, setVexpandSet, setVisible, setVisual, setWindow.

attach

tableAttach Source #

Arguments

:: (HasCallStack, MonadIO m, IsTable a, IsWidget b) 
=> a

table: The Table to add a new widget to.

-> b

child: The widget to add.

-> Word32

leftAttach: the column number to attach the left side of a child widget to.

-> Word32

rightAttach: the column number to attach the right side of a child widget to.

-> Word32

topAttach: the row number to attach the top of a child widget to.

-> Word32

bottomAttach: the row number to attach the bottom of a child widget to.

-> [AttachOptions]

xoptions: Used to specify the properties of the child widget when the table is resized.

-> [AttachOptions]

yoptions: The same as xoptions, except this field determines behaviour of vertical resizing.

-> Word32

xpadding: An integer value specifying the padding on the left and right of the widget being added to the table.

-> Word32

ypadding: The amount of padding above and below the child widget.

-> m () 

Deprecated: (Since version 3.4)Use gridAttach with Grid. Note that the attach arguments differ between those two functions.

Adds a widget to a table. The number of “cells” that a widget will occupy is specified by leftAttach, rightAttach, topAttach and bottomAttach. These each represent the leftmost, rightmost, uppermost and lowest column and row numbers of the table. (Columns and rows are indexed from zero).

To make a button occupy the lower right cell of a 2x2 table, use > >gtk_table_attach (table, button, > 1, 2, // left, right attach > 1, 2, // top, bottom attach > xoptions, yoptions, > xpadding, ypadding);

If you want to make the button span the entire bottom row, use leftAttach == 0 and rightAttach = 2 instead.

attachDefaults

tableAttachDefaults Source #

Arguments

:: (HasCallStack, MonadIO m, IsTable a, IsWidget b) 
=> a

table: The table to add a new child widget to.

-> b

widget: The child widget to add.

-> Word32

leftAttach: The column number to attach the left side of the child widget to.

-> Word32

rightAttach: The column number to attach the right side of the child widget to.

-> Word32

topAttach: The row number to attach the top of the child widget to.

-> Word32

bottomAttach: The row number to attach the bottom of the child widget to.

-> m () 

Deprecated: (Since version 3.4)Use gridAttach with Grid. Note that the attach arguments differ between those two functions.

As there are many options associated with tableAttach, this convenience function provides the programmer with a means to add children to a table with identical padding and expansion options. The values used for the AttachOptions are GTK_EXPAND | GTK_FILL, and the padding is set to 0.

getColSpacing

tableGetColSpacing Source #

Arguments

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

table: a Table

-> Word32

column: a column in the table, 0 indicates the first column

-> m Word32

Returns: the column spacing

Deprecated: (Since version 3.4)tGrid does not offer a replacement for this functionality.

Gets the amount of space between column col, and column col + 1. See tableSetColSpacing.

getDefaultColSpacing

tableGetDefaultColSpacing Source #

Arguments

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

table: a Table

-> m Word32

Returns: the default column spacing

Deprecated: (Since version 3.4)Use gridGetColumnSpacing with Grid.

Gets the default column spacing for the table. This is the spacing that will be used for newly added columns. (See tableSetColSpacings)

getDefaultRowSpacing

tableGetDefaultRowSpacing Source #

Arguments

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

table: a Table

-> m Word32

Returns: the default row spacing

Deprecated: (Since version 3.4)Use gridGetRowSpacing with Grid.

Gets the default row spacing for the table. This is the spacing that will be used for newly added rows. (See tableSetRowSpacings)

getHomogeneous

tableGetHomogeneous Source #

Arguments

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

table: a Table

-> m Bool

Returns: True if the cells are all constrained to the same size

Deprecated: (Since version 3.4)Use gridGetRowHomogeneous and gridGetColumnHomogeneous with Grid.

Returns whether the table cells are all constrained to the same width and height. (See gtk_table_set_homogeneous ())

getRowSpacing

tableGetRowSpacing Source #

Arguments

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

table: a Table

-> Word32

row: a row in the table, 0 indicates the first row

-> m Word32

Returns: the row spacing

Deprecated: (Since version 3.4)tGrid does not offer a replacement for this functionality.

Gets the amount of space between row row, and row row + 1. See tableSetRowSpacing.

getSize

tableGetSize Source #

Arguments

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

table: a Table

-> m (Word32, Word32) 

Deprecated: (Since version 3.4)tGrid does not expose the number of columns and rows.

Gets the number of rows and columns in the table.

Since: 2.22

new

tableNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Word32

rows: The number of rows the new table should have.

-> Word32

columns: The number of columns the new table should have.

-> Bool

homogeneous: If set to True, all table cells are resized to the size of the cell containing the largest widget.

-> m Table

Returns: A pointer to the newly created table widget.

Deprecated: (Since version 3.4)Use gridNew.

Used to create a new table widget. An initial size must be given by specifying how many rows and columns the table should have, although this can be changed later with tableResize. rows and columns must both be in the range 1 .. 65535. For historical reasons, 0 is accepted as well and is silently interpreted as 1.

resize

tableResize Source #

Arguments

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

table: The Table you wish to change the size of.

-> Word32

rows: The new number of rows.

-> Word32

columns: The new number of columns.

-> m () 

Deprecated: (Since version 3.4)tGrid resizes automatically.

If you need to change a table’s size after it has been created, this function allows you to do so.

setColSpacing

tableSetColSpacing Source #

Arguments

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

table: a Table.

-> Word32

column: the column whose spacing should be changed.

-> Word32

spacing: number of pixels that the spacing should take up.

-> m () 

Deprecated: (Since version 3.4)Use widgetSetMarginStart and widgetSetMarginEnd on the widgets contained in the row if you need this functionality. Grid does not support per-row spacing.

Alters the amount of space between a given table column and the following column.

setColSpacings

tableSetColSpacings Source #

Arguments

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

table: a Table.

-> Word32

spacing: the number of pixels of space to place between every column in the table.

-> m () 

Deprecated: (Since version 3.4)Use gridSetColumnSpacing with Grid.

Sets the space between every column in table equal to spacing.

setHomogeneous

tableSetHomogeneous Source #

Arguments

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

table: The Table you wish to set the homogeneous properties of.

-> Bool

homogeneous: Set to True to ensure all table cells are the same size. Set to False if this is not your desired behaviour.

-> m () 

Deprecated: (Since version 3.4)Use gridSetRowHomogeneous and gridSetColumnHomogeneous with Grid.

Changes the homogenous property of table cells, ie. whether all cells are an equal size or not.

setRowSpacing

tableSetRowSpacing Source #

Arguments

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

table: a Table containing the row whose properties you wish to change.

-> Word32

row: row number whose spacing will be changed.

-> Word32

spacing: number of pixels that the spacing should take up.

-> m () 

Deprecated: (Since version 3.4)Use widgetSetMarginTop and widgetSetMarginBottom on the widgets contained in the row if you need this functionality. Grid does not support per-row spacing.

Changes the space between a given table row and the subsequent row.

setRowSpacings

tableSetRowSpacings Source #

Arguments

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

table: a Table.

-> Word32

spacing: the number of pixels of space to place between every row in the table.

-> m () 

Deprecated: (Since version 3.4)Use gridSetRowSpacing with Grid.

Sets the space between every row in table equal to spacing.

Properties

columnSpacing

No description available in the introspection data.

constructTableColumnSpacing :: (IsTable o, MonadIO m) => Word32 -> 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.

getTableColumnSpacing :: (MonadIO m, IsTable o) => o -> m Word32 Source #

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

get table #columnSpacing

setTableColumnSpacing :: (MonadIO m, IsTable o) => o -> Word32 -> m () Source #

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

set table [ #columnSpacing := value ]

homogeneous

No description available in the introspection data.

constructTableHomogeneous :: (IsTable 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.

getTableHomogeneous :: (MonadIO m, IsTable o) => o -> m Bool Source #

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

get table #homogeneous

setTableHomogeneous :: (MonadIO m, IsTable o) => o -> Bool -> m () Source #

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

set table [ #homogeneous := value ]

nColumns

No description available in the introspection data.

constructTableNColumns :: (IsTable o, MonadIO m) => Word32 -> m (GValueConstruct o) Source #

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

getTableNColumns :: (MonadIO m, IsTable o) => o -> m Word32 Source #

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

get table #nColumns

setTableNColumns :: (MonadIO m, IsTable o) => o -> Word32 -> m () Source #

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

set table [ #nColumns := value ]

nRows

No description available in the introspection data.

constructTableNRows :: (IsTable o, MonadIO m) => Word32 -> m (GValueConstruct o) Source #

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

getTableNRows :: (MonadIO m, IsTable o) => o -> m Word32 Source #

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

get table #nRows

setTableNRows :: (MonadIO m, IsTable o) => o -> Word32 -> m () Source #

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

set table [ #nRows := value ]

rowSpacing

No description available in the introspection data.

constructTableRowSpacing :: (IsTable o, MonadIO m) => Word32 -> 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.

getTableRowSpacing :: (MonadIO m, IsTable o) => o -> m Word32 Source #

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

get table #rowSpacing

setTableRowSpacing :: (MonadIO m, IsTable o) => o -> Word32 -> m () Source #

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

set table [ #rowSpacing := value ]