| Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
|---|---|
| License | LGPL-2.1 |
| Maintainer | Iñaki García Etxebarria (garetxe@gmail.com) |
| Safe Haskell | None |
| Language | Haskell2010 |
GI.Atk.Interfaces.Table
Contents
- 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
Description
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 (Text, 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.
- newtype Table = Table (ManagedPtr Table)
- noTable :: Maybe Table
- class GObject 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 C_TableColumnDeletedCallback = Ptr () -> Int32 -> Int32 -> Ptr () -> IO ()
- type TableColumnDeletedCallback = Int32 -> Int32 -> IO ()
- afterTableColumnDeleted :: (IsTable a, MonadIO m) => a -> TableColumnDeletedCallback -> m SignalHandlerId
- genClosure_TableColumnDeleted :: TableColumnDeletedCallback -> IO Closure
- mk_TableColumnDeletedCallback :: C_TableColumnDeletedCallback -> IO (FunPtr C_TableColumnDeletedCallback)
- noTableColumnDeletedCallback :: Maybe TableColumnDeletedCallback
- onTableColumnDeleted :: (IsTable a, MonadIO m) => a -> TableColumnDeletedCallback -> m SignalHandlerId
- wrap_TableColumnDeletedCallback :: TableColumnDeletedCallback -> Ptr () -> Int32 -> Int32 -> Ptr () -> IO ()
- type C_TableColumnInsertedCallback = Ptr () -> Int32 -> Int32 -> Ptr () -> IO ()
- type TableColumnInsertedCallback = Int32 -> Int32 -> IO ()
- afterTableColumnInserted :: (IsTable a, MonadIO m) => a -> TableColumnInsertedCallback -> m SignalHandlerId
- genClosure_TableColumnInserted :: TableColumnInsertedCallback -> IO Closure
- mk_TableColumnInsertedCallback :: C_TableColumnInsertedCallback -> IO (FunPtr C_TableColumnInsertedCallback)
- noTableColumnInsertedCallback :: Maybe TableColumnInsertedCallback
- onTableColumnInserted :: (IsTable a, MonadIO m) => a -> TableColumnInsertedCallback -> m SignalHandlerId
- wrap_TableColumnInsertedCallback :: TableColumnInsertedCallback -> Ptr () -> Int32 -> Int32 -> Ptr () -> IO ()
- type C_TableColumnReorderedCallback = Ptr () -> Ptr () -> IO ()
- type TableColumnReorderedCallback = IO ()
- afterTableColumnReordered :: (IsTable a, MonadIO m) => a -> TableColumnReorderedCallback -> m SignalHandlerId
- genClosure_TableColumnReordered :: TableColumnReorderedCallback -> IO Closure
- mk_TableColumnReorderedCallback :: C_TableColumnReorderedCallback -> IO (FunPtr C_TableColumnReorderedCallback)
- noTableColumnReorderedCallback :: Maybe TableColumnReorderedCallback
- onTableColumnReordered :: (IsTable a, MonadIO m) => a -> TableColumnReorderedCallback -> m SignalHandlerId
- wrap_TableColumnReorderedCallback :: TableColumnReorderedCallback -> Ptr () -> Ptr () -> IO ()
- type C_TableModelChangedCallback = Ptr () -> Ptr () -> IO ()
- type TableModelChangedCallback = IO ()
- afterTableModelChanged :: (IsTable a, MonadIO m) => a -> TableModelChangedCallback -> m SignalHandlerId
- genClosure_TableModelChanged :: TableModelChangedCallback -> IO Closure
- mk_TableModelChangedCallback :: C_TableModelChangedCallback -> IO (FunPtr C_TableModelChangedCallback)
- noTableModelChangedCallback :: Maybe TableModelChangedCallback
- onTableModelChanged :: (IsTable a, MonadIO m) => a -> TableModelChangedCallback -> m SignalHandlerId
- wrap_TableModelChangedCallback :: TableModelChangedCallback -> Ptr () -> Ptr () -> IO ()
- type C_TableRowDeletedCallback = Ptr () -> Int32 -> Int32 -> Ptr () -> IO ()
- type TableRowDeletedCallback = Int32 -> Int32 -> IO ()
- afterTableRowDeleted :: (IsTable a, MonadIO m) => a -> TableRowDeletedCallback -> m SignalHandlerId
- genClosure_TableRowDeleted :: TableRowDeletedCallback -> IO Closure
- mk_TableRowDeletedCallback :: C_TableRowDeletedCallback -> IO (FunPtr C_TableRowDeletedCallback)
- noTableRowDeletedCallback :: Maybe TableRowDeletedCallback
- onTableRowDeleted :: (IsTable a, MonadIO m) => a -> TableRowDeletedCallback -> m SignalHandlerId
- wrap_TableRowDeletedCallback :: TableRowDeletedCallback -> Ptr () -> Int32 -> Int32 -> Ptr () -> IO ()
- type C_TableRowInsertedCallback = Ptr () -> Int32 -> Int32 -> Ptr () -> IO ()
- type TableRowInsertedCallback = Int32 -> Int32 -> IO ()
- afterTableRowInserted :: (IsTable a, MonadIO m) => a -> TableRowInsertedCallback -> m SignalHandlerId
- genClosure_TableRowInserted :: TableRowInsertedCallback -> IO Closure
- mk_TableRowInsertedCallback :: C_TableRowInsertedCallback -> IO (FunPtr C_TableRowInsertedCallback)
- noTableRowInsertedCallback :: Maybe TableRowInsertedCallback
- onTableRowInserted :: (IsTable a, MonadIO m) => a -> TableRowInsertedCallback -> m SignalHandlerId
- wrap_TableRowInsertedCallback :: TableRowInsertedCallback -> Ptr () -> Int32 -> Int32 -> Ptr () -> IO ()
- type C_TableRowReorderedCallback = Ptr () -> Ptr () -> IO ()
- type TableRowReorderedCallback = IO ()
- afterTableRowReordered :: (IsTable a, MonadIO m) => a -> TableRowReorderedCallback -> m SignalHandlerId
- genClosure_TableRowReordered :: TableRowReorderedCallback -> IO Closure
- mk_TableRowReorderedCallback :: C_TableRowReorderedCallback -> IO (FunPtr C_TableRowReorderedCallback)
- noTableRowReorderedCallback :: Maybe TableRowReorderedCallback
- onTableRowReordered :: (IsTable a, MonadIO m) => a -> TableRowReorderedCallback -> m SignalHandlerId
- wrap_TableRowReorderedCallback :: TableRowReorderedCallback -> Ptr () -> Ptr () -> IO ()
Exported types
Constructors
| Table (ManagedPtr Table) |
class GObject o => IsTable o Source #
Instances
| (GObject a, UnknownAncestorError Constraint Table a) => IsTable a Source # | |
| IsTable Table Source # | |
| IsTable NoOpObject Source # | |
Methods
addColumnSelection
tableAddColumnSelection Source #
Arguments
| :: (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
Arguments
| :: (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
Arguments
| :: (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 #
Arguments
| :: (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 #
Arguments
| :: (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 #
Arguments
| :: (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
Arguments
| :: (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
Arguments
| :: (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
Arguments
| :: (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
Arguments
| :: (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
Arguments
| :: (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 #
Arguments
| :: (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
Arguments
| :: (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
Arguments
| :: (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 #
Arguments
| :: (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
Arguments
| :: (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
Arguments
| :: (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 #
Arguments
| :: (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
Arguments
| :: (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
Arguments
| :: (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
Arguments
| :: (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 #
Arguments
| :: (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 #
Arguments
| :: (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
Arguments
| :: (HasCallStack, MonadIO m, IsTable a, IsObject b) | |
| => a |
|
| -> b |
|
| -> m () |
Sets the caption for the table.
setColumnDescription
tableSetColumnDescription Source #
Arguments
| :: (HasCallStack, MonadIO m, IsTable a) | |
| => a |
|
| -> Int32 |
|
| -> Text |
|
| -> m () |
Sets the description text for the specified column of the table.
setColumnHeader
Arguments
| :: (HasCallStack, MonadIO m, IsTable a, IsObject b) | |
| => a |
|
| -> Int32 |
|
| -> b |
|
| -> m () |
Sets the specified column header to header.
setRowDescription
tableSetRowDescription Source #
Arguments
| :: (HasCallStack, MonadIO m, IsTable a) | |
| => a |
|
| -> Int32 |
|
| -> Text |
|
| -> m () |
Sets the description text for the specified row of table.
setRowHeader
Arguments
| :: (HasCallStack, MonadIO m, IsTable a, IsObject b) | |
| => a |
|
| -> Int32 |
|
| -> b |
|
| -> m () |
Sets the specified row header to header.
setSummary
Arguments
| :: (HasCallStack, MonadIO m, IsTable a, IsObject b) | |
| => a |
|
| -> b |
|
| -> m () |
Sets the summary description of the table.
Signals
columnDeleted
afterTableColumnDeleted :: (IsTable a, MonadIO m) => a -> TableColumnDeletedCallback -> m SignalHandlerId Source #
mk_TableColumnDeletedCallback :: C_TableColumnDeletedCallback -> IO (FunPtr C_TableColumnDeletedCallback) Source #
onTableColumnDeleted :: (IsTable a, MonadIO m) => a -> TableColumnDeletedCallback -> m SignalHandlerId Source #
wrap_TableColumnDeletedCallback :: TableColumnDeletedCallback -> Ptr () -> Int32 -> Int32 -> Ptr () -> IO () Source #
columnInserted
afterTableColumnInserted :: (IsTable a, MonadIO m) => a -> TableColumnInsertedCallback -> m SignalHandlerId Source #
mk_TableColumnInsertedCallback :: C_TableColumnInsertedCallback -> IO (FunPtr C_TableColumnInsertedCallback) Source #
onTableColumnInserted :: (IsTable a, MonadIO m) => a -> TableColumnInsertedCallback -> m SignalHandlerId Source #
wrap_TableColumnInsertedCallback :: TableColumnInsertedCallback -> Ptr () -> Int32 -> Int32 -> Ptr () -> IO () Source #
columnReordered
type TableColumnReorderedCallback = IO () Source #
afterTableColumnReordered :: (IsTable a, MonadIO m) => a -> TableColumnReorderedCallback -> m SignalHandlerId Source #
mk_TableColumnReorderedCallback :: C_TableColumnReorderedCallback -> IO (FunPtr C_TableColumnReorderedCallback) Source #
onTableColumnReordered :: (IsTable a, MonadIO m) => a -> TableColumnReorderedCallback -> m SignalHandlerId Source #
wrap_TableColumnReorderedCallback :: TableColumnReorderedCallback -> Ptr () -> Ptr () -> IO () Source #
modelChanged
type TableModelChangedCallback = IO () Source #
afterTableModelChanged :: (IsTable a, MonadIO m) => a -> TableModelChangedCallback -> m SignalHandlerId Source #
mk_TableModelChangedCallback :: C_TableModelChangedCallback -> IO (FunPtr C_TableModelChangedCallback) Source #
onTableModelChanged :: (IsTable a, MonadIO m) => a -> TableModelChangedCallback -> m SignalHandlerId Source #
wrap_TableModelChangedCallback :: TableModelChangedCallback -> Ptr () -> Ptr () -> IO () Source #
rowDeleted
afterTableRowDeleted :: (IsTable a, MonadIO m) => a -> TableRowDeletedCallback -> m SignalHandlerId Source #
mk_TableRowDeletedCallback :: C_TableRowDeletedCallback -> IO (FunPtr C_TableRowDeletedCallback) Source #
onTableRowDeleted :: (IsTable a, MonadIO m) => a -> TableRowDeletedCallback -> m SignalHandlerId Source #
wrap_TableRowDeletedCallback :: TableRowDeletedCallback -> Ptr () -> Int32 -> Int32 -> Ptr () -> IO () Source #
rowInserted
afterTableRowInserted :: (IsTable a, MonadIO m) => a -> TableRowInsertedCallback -> m SignalHandlerId Source #
mk_TableRowInsertedCallback :: C_TableRowInsertedCallback -> IO (FunPtr C_TableRowInsertedCallback) Source #
onTableRowInserted :: (IsTable a, MonadIO m) => a -> TableRowInsertedCallback -> m SignalHandlerId Source #
wrap_TableRowInsertedCallback :: TableRowInsertedCallback -> Ptr () -> Int32 -> Int32 -> Ptr () -> IO () Source #
rowReordered
type TableRowReorderedCallback = IO () Source #
afterTableRowReordered :: (IsTable a, MonadIO m) => a -> TableRowReorderedCallback -> m SignalHandlerId Source #
mk_TableRowReorderedCallback :: C_TableRowReorderedCallback -> IO (FunPtr C_TableRowReorderedCallback) Source #
onTableRowReordered :: (IsTable a, MonadIO m) => a -> TableRowReorderedCallback -> m SignalHandlerId Source #
wrap_TableRowReorderedCallback :: TableRowReorderedCallback -> Ptr () -> Ptr () -> IO () Source #