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 |
- Exported types
- Methods
- addColumnSelection
- addRowSelection
- getCaption
- getColumnAtIndex
- getColumnDescription
- getColumnExtentAt
- getColumnHeader
- getIndexAt
- getNColumns
- getNRows
- getRowAtIndex
- getRowDescription
- getRowExtentAt
- getRowHeader
- getSelectedColumns
- getSelectedRows
- getSummary
- isColumnSelected
- isRowSelected
- isSelected
- refAt
- removeColumnSelection
- removeRowSelection
- setCaption
- setColumnDescription
- setColumnHeader
- setRowDescription
- setRowHeader
- setSummary
- Signals
Table
should be implemented by components which present
elements ordered via rows and columns. It may also be used to
present tree-structured information if the nodes of the trees can
be said to contain multiple "columns". Individual elements of an
Table
are typically referred to as "cells". Those cells should
implement the interface TableCell
, but Atk
doesn't require
them to be direct children of the current Table
. They can be
grand-children, grand-grand-children etc. Table
provides the
API needed to get a individual cell based on the row and column
numbers.
Children of Table
are frequently "lightweight" objects, that
is, they may not have backing widgets in the host UI toolkit. They
are therefore often transient.
Since tables are often very complex, Table
includes provision
for offering simplified summary information, as well as row and
column headers and captions. Headers and captions are AtkObjects
which may implement other interfaces (tText
, Image
, etc.) as
appropriate. Table
summaries may themselves be (simplified)
AtkTables
, etc.
Note for implementors: in the past, Table
required that all the
cells should be direct children of Table
, and provided some
index based methods to request the cells. The practice showed that
that forcing made Table
implementation complex, and hard to
expose other kind of children, like rows or captions. Right now,
index-based methods are deprecated.
Synopsis
- newtype Table = Table (ManagedPtr Table)
- class (GObject o, IsDescendantOf Table o) => IsTable o
- toTable :: (MonadIO m, IsTable o) => o -> m Table
- tableAddColumnSelection :: (HasCallStack, MonadIO m, IsTable a) => a -> Int32 -> m Bool
- tableAddRowSelection :: (HasCallStack, MonadIO m, IsTable a) => a -> Int32 -> m Bool
- tableGetCaption :: (HasCallStack, MonadIO m, IsTable a) => a -> m (Maybe Object)
- tableGetColumnAtIndex :: (HasCallStack, MonadIO m, IsTable a) => a -> Int32 -> m Int32
- tableGetColumnDescription :: (HasCallStack, MonadIO m, IsTable a) => a -> Int32 -> m Text
- tableGetColumnExtentAt :: (HasCallStack, MonadIO m, IsTable a) => a -> Int32 -> Int32 -> m Int32
- tableGetColumnHeader :: (HasCallStack, MonadIO m, IsTable a) => a -> Int32 -> m (Maybe Object)
- tableGetIndexAt :: (HasCallStack, MonadIO m, IsTable a) => a -> Int32 -> Int32 -> m Int32
- tableGetNColumns :: (HasCallStack, MonadIO m, IsTable a) => a -> m Int32
- tableGetNRows :: (HasCallStack, MonadIO m, IsTable a) => a -> m Int32
- tableGetRowAtIndex :: (HasCallStack, MonadIO m, IsTable a) => a -> Int32 -> m Int32
- tableGetRowDescription :: (HasCallStack, MonadIO m, IsTable a) => a -> Int32 -> m (Maybe Text)
- tableGetRowExtentAt :: (HasCallStack, MonadIO m, IsTable a) => a -> Int32 -> Int32 -> m Int32
- tableGetRowHeader :: (HasCallStack, MonadIO m, IsTable a) => a -> Int32 -> m (Maybe Object)
- tableGetSelectedColumns :: (HasCallStack, MonadIO m, IsTable a) => a -> Int32 -> m Int32
- tableGetSelectedRows :: (HasCallStack, MonadIO m, IsTable a) => a -> Int32 -> m Int32
- tableGetSummary :: (HasCallStack, MonadIO m, IsTable a) => a -> m Object
- tableIsColumnSelected :: (HasCallStack, MonadIO m, IsTable a) => a -> Int32 -> m Bool
- tableIsRowSelected :: (HasCallStack, MonadIO m, IsTable a) => a -> Int32 -> m Bool
- tableIsSelected :: (HasCallStack, MonadIO m, IsTable a) => a -> Int32 -> Int32 -> m Bool
- tableRefAt :: (HasCallStack, MonadIO m, IsTable a) => a -> Int32 -> Int32 -> m Object
- tableRemoveColumnSelection :: (HasCallStack, MonadIO m, IsTable a) => a -> Int32 -> m Bool
- tableRemoveRowSelection :: (HasCallStack, MonadIO m, IsTable a) => a -> Int32 -> m Bool
- tableSetCaption :: (HasCallStack, MonadIO m, IsTable a, IsObject b) => a -> b -> m ()
- tableSetColumnDescription :: (HasCallStack, MonadIO m, IsTable a) => a -> Int32 -> Text -> m ()
- tableSetColumnHeader :: (HasCallStack, MonadIO m, IsTable a, IsObject b) => a -> Int32 -> b -> m ()
- tableSetRowDescription :: (HasCallStack, MonadIO m, IsTable a) => a -> Int32 -> Text -> m ()
- tableSetRowHeader :: (HasCallStack, MonadIO m, IsTable a, IsObject b) => a -> Int32 -> b -> m ()
- tableSetSummary :: (HasCallStack, MonadIO m, IsTable a, IsObject b) => a -> b -> m ()
- type TableColumnDeletedCallback = Int32 -> Int32 -> IO ()
- afterTableColumnDeleted :: (IsTable a, MonadIO m) => a -> ((?self :: a) => TableColumnDeletedCallback) -> m SignalHandlerId
- onTableColumnDeleted :: (IsTable a, MonadIO m) => a -> ((?self :: a) => TableColumnDeletedCallback) -> m SignalHandlerId
- type TableColumnInsertedCallback = Int32 -> Int32 -> IO ()
- afterTableColumnInserted :: (IsTable a, MonadIO m) => a -> ((?self :: a) => TableColumnInsertedCallback) -> m SignalHandlerId
- onTableColumnInserted :: (IsTable a, MonadIO m) => a -> ((?self :: a) => TableColumnInsertedCallback) -> m SignalHandlerId
- type TableColumnReorderedCallback = IO ()
- afterTableColumnReordered :: (IsTable a, MonadIO m) => a -> ((?self :: a) => TableColumnReorderedCallback) -> m SignalHandlerId
- onTableColumnReordered :: (IsTable a, MonadIO m) => a -> ((?self :: a) => TableColumnReorderedCallback) -> m SignalHandlerId
- type TableModelChangedCallback = IO ()
- afterTableModelChanged :: (IsTable a, MonadIO m) => a -> ((?self :: a) => TableModelChangedCallback) -> m SignalHandlerId
- onTableModelChanged :: (IsTable a, MonadIO m) => a -> ((?self :: a) => TableModelChangedCallback) -> m SignalHandlerId
- type TableRowDeletedCallback = Int32 -> Int32 -> IO ()
- afterTableRowDeleted :: (IsTable a, MonadIO m) => a -> ((?self :: a) => TableRowDeletedCallback) -> m SignalHandlerId
- onTableRowDeleted :: (IsTable a, MonadIO m) => a -> ((?self :: a) => TableRowDeletedCallback) -> m SignalHandlerId
- type TableRowInsertedCallback = Int32 -> Int32 -> IO ()
- afterTableRowInserted :: (IsTable a, MonadIO m) => a -> ((?self :: a) => TableRowInsertedCallback) -> m SignalHandlerId
- onTableRowInserted :: (IsTable a, MonadIO m) => a -> ((?self :: a) => TableRowInsertedCallback) -> m SignalHandlerId
- type TableRowReorderedCallback = IO ()
- afterTableRowReordered :: (IsTable a, MonadIO m) => a -> ((?self :: a) => TableRowReorderedCallback) -> m SignalHandlerId
- onTableRowReordered :: (IsTable a, MonadIO m) => a -> ((?self :: a) => TableRowReorderedCallback) -> m SignalHandlerId
Exported types
Memory-managed wrapper type.
Instances
Eq Table Source # | |
GObject Table Source # | |
Defined in GI.Atk.Interfaces.Table | |
ManagedPtrNewtype Table Source # | |
Defined in GI.Atk.Interfaces.Table toManagedPtr :: Table -> ManagedPtr Table # | |
TypedObject Table Source # | |
Defined in GI.Atk.Interfaces.Table | |
HasParentTypes Table Source # | |
Defined in GI.Atk.Interfaces.Table | |
IsGValue (Maybe Table) Source # | Convert |
Defined in GI.Atk.Interfaces.Table | |
type ParentTypes Table Source # | |
Defined in GI.Atk.Interfaces.Table |
class (GObject o, IsDescendantOf Table o) => IsTable o Source #
Instances
(GObject o, IsDescendantOf Table o) => IsTable o Source # | |
Defined in GI.Atk.Interfaces.Table |
Methods
Click to display all available methods, including inherited ones
Methods
addColumnSelection, addRowSelection, bindProperty, bindPropertyFull, forceFloating, freezeNotify, getv, isColumnSelected, isFloating, isRowSelected, isSelected, notify, notifyByPspec, ref, refAt, refSink, removeColumnSelection, removeRowSelection, runDispose, stealData, stealQdata, thawNotify, unref, watchClosure.
Getters
getCaption, getColumnAtIndex, getColumnDescription, getColumnExtentAt, getColumnHeader, getData, getIndexAt, getNColumns, getNRows, getProperty, getQdata, getRowAtIndex, getRowDescription, getRowExtentAt, getRowHeader, getSelectedColumns, getSelectedRows, getSummary.
Setters
setCaption, setColumnDescription, setColumnHeader, setData, setDataFull, setProperty, setRowDescription, setRowHeader, setSummary.
addColumnSelection
tableAddColumnSelection Source #
:: (HasCallStack, MonadIO m, IsTable a) | |
=> a |
|
-> Int32 |
|
-> m Bool | Returns: a gboolean representing if the column was successfully added to the selection, or 0 if value does not implement this interface. |
Adds the specified column
to the selection.
addRowSelection
:: (HasCallStack, MonadIO m, IsTable a) | |
=> a |
|
-> Int32 |
|
-> m Bool | Returns: a gboolean representing if row was successfully added to selection, or 0 if value does not implement this interface. |
Adds the specified row
to the selection.
getCaption
:: (HasCallStack, MonadIO m, IsTable a) | |
=> a |
|
-> m (Maybe Object) | Returns: a AtkObject* representing the
table caption, or |
Gets the caption for the table
.
getColumnAtIndex
tableGetColumnAtIndex Source #
:: (HasCallStack, MonadIO m, IsTable a) | |
=> a |
|
-> Int32 |
|
-> m Int32 | Returns: a gint representing the column at the specified index, or -1 if the table does not implement this method. |
Deprecated: Since 2.12.
Gets a gint
representing the column at the specified index_
.
getColumnDescription
tableGetColumnDescription Source #
:: (HasCallStack, MonadIO m, IsTable a) | |
=> a |
|
-> Int32 |
|
-> m Text | Returns: a gchar* representing the column description, or |
Gets the description text of the specified column
in the table
getColumnExtentAt
tableGetColumnExtentAt Source #
:: (HasCallStack, MonadIO m, IsTable a) | |
=> a |
|
-> Int32 |
|
-> Int32 |
|
-> m Int32 | Returns: a gint representing the column extent at specified position, or 0 if value does not implement this interface. |
Gets the number of columns occupied by the accessible object
at the specified row
and column
in the table
.
getColumnHeader
:: (HasCallStack, MonadIO m, IsTable a) | |
=> a |
|
-> Int32 |
|
-> m (Maybe Object) | Returns: a AtkObject* representing the
specified column header, or |
Gets the column header of a specified column in an accessible table.
getIndexAt
:: (HasCallStack, MonadIO m, IsTable a) | |
=> a |
|
-> Int32 |
|
-> Int32 |
|
-> m Int32 | Returns: a |
Deprecated: Since 2.12. Use tableRefAt
in order to get theaccessible that represents the cell at (row
, column
)
Gets a gint
representing the index at the specified row
and
column
.
getNColumns
:: (HasCallStack, MonadIO m, IsTable a) | |
=> a |
|
-> m Int32 | Returns: a gint representing the number of columns, or 0 if value does not implement this interface. |
Gets the number of columns in the table.
getNRows
:: (HasCallStack, MonadIO m, IsTable a) | |
=> a |
|
-> m Int32 | Returns: a gint representing the number of rows, or 0 if value does not implement this interface. |
Gets the number of rows in the table.
getRowAtIndex
:: (HasCallStack, MonadIO m, IsTable a) | |
=> a |
|
-> Int32 |
|
-> m Int32 | Returns: a gint representing the row at the specified index, or -1 if the table does not implement this method. |
Deprecated: since 2.12.
Gets a gint
representing the row at the specified index_
.
getRowDescription
tableGetRowDescription Source #
:: (HasCallStack, MonadIO m, IsTable a) | |
=> a |
|
-> Int32 |
|
-> m (Maybe Text) | Returns: a gchar* representing the row description, or
|
Gets the description text of the specified row in the table
getRowExtentAt
:: (HasCallStack, MonadIO m, IsTable a) | |
=> a |
|
-> Int32 |
|
-> Int32 |
|
-> m Int32 | Returns: a gint representing the row extent at specified position, or 0 if value does not implement this interface. |
Gets the number of rows occupied by the accessible object
at a specified row
and column
in the table
.
getRowHeader
:: (HasCallStack, MonadIO m, IsTable a) | |
=> a |
|
-> Int32 |
|
-> m (Maybe Object) | Returns: a AtkObject* representing the
specified row header, or |
Gets the row header of a specified row in an accessible table.
getSelectedColumns
tableGetSelectedColumns Source #
:: (HasCallStack, MonadIO m, IsTable a) | |
=> a |
|
-> Int32 |
|
-> m Int32 | Returns: a gint representing the number of selected columns,
or |
Gets the selected columns of the table by initializing **selected with the selected column numbers. This array should be freed by the caller.
getSelectedRows
:: (HasCallStack, MonadIO m, IsTable a) | |
=> a |
|
-> Int32 |
|
-> m Int32 | Returns: a gint representing the number of selected rows, or zero if value does not implement this interface. |
Gets the selected rows of the table by initializing **selected with the selected row numbers. This array should be freed by the caller.
getSummary
:: (HasCallStack, MonadIO m, IsTable a) | |
=> a |
|
-> m Object | Returns: a AtkObject* representing a summary description of the table, or zero if value does not implement this interface. |
Gets the summary description of the table.
isColumnSelected
tableIsColumnSelected Source #
:: (HasCallStack, MonadIO m, IsTable a) | |
=> a |
|
-> Int32 |
|
-> m Bool | Returns: a gboolean representing if the column is selected, or 0 if value does not implement this interface. |
Gets a boolean value indicating whether the specified column
is selected
isRowSelected
:: (HasCallStack, MonadIO m, IsTable a) | |
=> a |
|
-> Int32 |
|
-> m Bool | Returns: a gboolean representing if the row is selected, or 0 if value does not implement this interface. |
Gets a boolean value indicating whether the specified row
is selected
isSelected
:: (HasCallStack, MonadIO m, IsTable a) | |
=> a |
|
-> Int32 |
|
-> Int32 |
|
-> m Bool | Returns: a gboolean representing if the cell is selected, or 0 if value does not implement this interface. |
Gets a boolean value indicating whether the accessible object
at the specified row
and column
is selected
refAt
:: (HasCallStack, MonadIO m, IsTable a) | |
=> a |
|
-> Int32 |
|
-> Int32 |
|
-> m Object | Returns: an |
Get a reference to the table cell at row
, column
. This cell
should implement the interface TableCell
removeColumnSelection
tableRemoveColumnSelection Source #
:: (HasCallStack, MonadIO m, IsTable a) | |
=> a |
|
-> Int32 |
|
-> m Bool | Returns: a gboolean representing if the column was successfully removed from the selection, or 0 if value does not implement this interface. |
Adds the specified column
to the selection.
removeRowSelection
tableRemoveRowSelection Source #
:: (HasCallStack, MonadIO m, IsTable a) | |
=> a |
|
-> Int32 |
|
-> m Bool | Returns: a gboolean representing if the row was successfully removed from the selection, or 0 if value does not implement this interface. |
Removes the specified row
from the selection.
setCaption
:: (HasCallStack, MonadIO m, IsTable a, IsObject b) | |
=> a |
|
-> b |
|
-> m () |
Sets the caption for the table.
setColumnDescription
tableSetColumnDescription Source #
:: (HasCallStack, MonadIO m, IsTable a) | |
=> a |
|
-> Int32 |
|
-> Text |
|
-> m () |
Sets the description text for the specified column
of the table
.
setColumnHeader
:: (HasCallStack, MonadIO m, IsTable a, IsObject b) | |
=> a |
|
-> Int32 |
|
-> b |
|
-> m () |
Sets the specified column header to header
.
setRowDescription
tableSetRowDescription Source #
:: (HasCallStack, MonadIO m, IsTable a) | |
=> a |
|
-> Int32 |
|
-> Text |
|
-> m () |
Sets the description text for the specified row
of table
.
setRowHeader
:: (HasCallStack, MonadIO m, IsTable a, IsObject b) | |
=> a |
|
-> Int32 |
|
-> b |
|
-> m () |
Sets the specified row header to header
.
setSummary
:: (HasCallStack, MonadIO m, IsTable a, IsObject b) | |
=> a |
|
-> b |
|
-> m () |
Sets the summary description of the table.
Signals
columnDeleted
type TableColumnDeletedCallback Source #
= Int32 |
|
-> Int32 |
|
-> IO () |
The "column-deleted" signal is emitted by an object which implements the AtkTable interface when a column is deleted.
afterTableColumnDeleted :: (IsTable a, MonadIO m) => a -> ((?self :: a) => TableColumnDeletedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the columnDeleted signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
table #columnDeleted callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onTableColumnDeleted :: (IsTable a, MonadIO m) => a -> ((?self :: a) => TableColumnDeletedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the columnDeleted signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
table #columnDeleted callback
columnInserted
type TableColumnInsertedCallback Source #
The "column-inserted" signal is emitted by an object which implements the AtkTable interface when a column is inserted.
afterTableColumnInserted :: (IsTable a, MonadIO m) => a -> ((?self :: a) => TableColumnInsertedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the columnInserted signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
table #columnInserted callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onTableColumnInserted :: (IsTable a, MonadIO m) => a -> ((?self :: a) => TableColumnInsertedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the columnInserted signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
table #columnInserted callback
columnReordered
type TableColumnReorderedCallback = IO () Source #
The "column-reordered" signal is emitted by an object which implements the AtkTable interface when the columns are reordered.
afterTableColumnReordered :: (IsTable a, MonadIO m) => a -> ((?self :: a) => TableColumnReorderedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the columnReordered signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
table #columnReordered callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onTableColumnReordered :: (IsTable a, MonadIO m) => a -> ((?self :: a) => TableColumnReorderedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the columnReordered signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
table #columnReordered callback
modelChanged
type TableModelChangedCallback = IO () Source #
The "model-changed" signal is emitted by an object which implements the AtkTable interface when the model displayed by the table changes.
afterTableModelChanged :: (IsTable a, MonadIO m) => a -> ((?self :: a) => TableModelChangedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the modelChanged signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
table #modelChanged callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onTableModelChanged :: (IsTable a, MonadIO m) => a -> ((?self :: a) => TableModelChangedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the modelChanged signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
table #modelChanged callback
rowDeleted
type TableRowDeletedCallback Source #
The "row-deleted" signal is emitted by an object which implements the AtkTable interface when a row is deleted.
afterTableRowDeleted :: (IsTable a, MonadIO m) => a -> ((?self :: a) => TableRowDeletedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the rowDeleted signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
table #rowDeleted callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onTableRowDeleted :: (IsTable a, MonadIO m) => a -> ((?self :: a) => TableRowDeletedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the rowDeleted signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
table #rowDeleted callback
rowInserted
type TableRowInsertedCallback Source #
The "row-inserted" signal is emitted by an object which implements the AtkTable interface when a row is inserted.
afterTableRowInserted :: (IsTable a, MonadIO m) => a -> ((?self :: a) => TableRowInsertedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the rowInserted signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
table #rowInserted callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onTableRowInserted :: (IsTable a, MonadIO m) => a -> ((?self :: a) => TableRowInsertedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the rowInserted signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
table #rowInserted callback
rowReordered
type TableRowReorderedCallback = IO () Source #
The "row-reordered" signal is emitted by an object which implements the AtkTable interface when the rows are reordered.
afterTableRowReordered :: (IsTable a, MonadIO m) => a -> ((?self :: a) => TableRowReorderedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the rowReordered signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
table #rowReordered callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onTableRowReordered :: (IsTable a, MonadIO m) => a -> ((?self :: a) => TableRowReorderedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the rowReordered signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
table #rowReordered callback