atk.table_mixin

Module for [Table] interface mixin

Templates 2

tmplTableT()

The ATK interface implemented for UI components which contain tabular or row/column information.

#AtkTable 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 #AtkTable are typically referred to as "cells". Those cells should implement the interface #AtkTableCell, but #Atk doesn't require them to be direct children of the current #AtkTable. They can be grand-children, grand-grand-children etc. #AtkTable provides the API needed to get a individual cell based on the row and column numbers.

Children of #AtkTable 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, #AtkTable 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 (#AtkText, #AtkImage, etc.) as appropriate. #AtkTable summaries may themselves be (simplified) #AtkTables, etc.

Note for implementors: in the past, #AtkTable required that all the cells should be direct children of #AtkTable, and provided some index based methods to request the cells. The practice showed that that forcing made #AtkTable implementation complex, and hard to expose other kind of children, like rows or captions. Right now, index-based methods are deprecated.

Functions
bool addColumnSelection(int column)

Adds the specified column to the selection.

Parameters

columna #gint representing a column in table

Returns

a gboolean representing if the column was successfully added to

the selection, or 0 if value does not implement this interface.

bool addRowSelection(int row)

Adds the specified row to the selection.

Parameters

rowa #gint representing a row in table

Returns

a gboolean representing if row was successfully added to selection,

or 0 if value does not implement this interface.

Gets the caption for the table.

Returns

a AtkObject* representing the

table caption, or null if value does not implement this interface.

int getColumnAtIndex(int index)

Gets a #gint representing the column at the specified index_.

Parameters

indexa #gint representing an index in table

Returns

a gint representing the column at the specified index,

or -1 if the table does not implement this method.

Deprecated

Since 2.12.
string getColumnDescription(int column)

Gets the description text of the specified column in the table

Parameters

columna #gint representing a column in table

Returns

a gchar* representing the column description, or null

if value does not implement this interface.

int getColumnExtentAt(int row, int column)

Gets the number of columns occupied by the accessible object at the specified row and column in the table.

Parameters

rowa #gint representing a row in table
columna #gint representing a column in table

Returns

a gint representing the column extent at specified position, or 0

if value does not implement this interface.

atk.object.ObjectWrap getColumnHeader(int column)

Gets the column header of a specified column in an accessible table.

Parameters

columna #gint representing a column in the table

Returns

a AtkObject* representing the

specified column header, or null if value does not implement this interface.

int getIndexAt(int row, int column)

Gets a #gint representing the index at the specified row and column.

Parameters

rowa #gint representing a row in table
columna #gint representing a column in table

Returns

a #gint representing the index at specified position.

The value -1 is returned if the object at row,column is not a child of table or table does not implement this interface.

Deprecated

Since 2.12. Use [atk.table.Table.refAt] in order to get the

accessible that represents the cell at (row, column)

int getNColumns()

Gets the number of columns in the table.

Returns

a gint representing the number of columns, or 0

if value does not implement this interface.

int getNRows()

Gets the number of rows in the table.

Returns

a gint representing the number of rows, or 0

if value does not implement this interface.

int getRowAtIndex(int index)

Gets a #gint representing the row at the specified index_.

Parameters

indexa #gint representing an index in table

Returns

a gint representing the row at the specified index,

or -1 if the table does not implement this method.

Deprecated

since 2.12.
string getRowDescription(int row)

Gets the description text of the specified row in the table

Parameters

rowa #gint representing a row in table

Returns

a gchar* representing the row description, or

null if value does not implement this interface.

int getRowExtentAt(int row, int column)

Gets the number of rows occupied by the accessible object at a specified row and column in the table.

Parameters

rowa #gint representing a row in table
columna #gint representing a column in table

Returns

a gint representing the row extent at specified position, or 0

if value does not implement this interface.

atk.object.ObjectWrap getRowHeader(int row)

Gets the row header of a specified row in an accessible table.

Parameters

rowa #gint representing a row in the table

Returns

a AtkObject* representing the

specified row header, or null if value does not implement this interface.

void getSelectedColumns(out int[] selected)

Gets the selected columns of the table by initializing **selected with the selected column numbers. This array should be freed by the caller.

Parameters

selecteda #gint** that is to contain the selected columns numbers
void getSelectedRows(out int[] selected)

Gets the selected rows of the table by initializing **selected with the selected row numbers. This array should be freed by the caller.

Parameters

selecteda #gint** that is to contain the selected row numbers

Gets the summary description of the table.

Returns

a AtkObject* representing a summary description

of the table, or zero if value does not implement this interface.

bool isColumnSelected(int column)

Gets a boolean value indicating whether the specified column is selected

Parameters

columna #gint representing a column in table

Returns

a gboolean representing if the column is selected, or 0

if value does not implement this interface.

bool isRowSelected(int row)

Gets a boolean value indicating whether the specified row is selected

Parameters

rowa #gint representing a row in table

Returns

a gboolean representing if the row is selected, or 0

if value does not implement this interface.

bool isSelected(int row, int column)

Gets a boolean value indicating whether the accessible object at the specified row and column is selected

Parameters

rowa #gint representing a row in table
columna #gint representing a column in table

Returns

a gboolean representing if the cell is selected, or 0

if value does not implement this interface.

atk.object.ObjectWrap refAt(int row, int column)

Get a reference to the table cell at row, column. This cell should implement the interface #AtkTableCell

Parameters

rowa #gint representing a row in table
columna #gint representing a column in table

Returns

an #AtkObject representing the referred

to accessible

bool removeColumnSelection(int column)

Adds the specified column to the selection.

Parameters

columna #gint representing a column in table

Returns

a gboolean representing if the column was successfully removed from

the selection, or 0 if value does not implement this interface.

bool removeRowSelection(int row)

Removes the specified row from the selection.

Parameters

rowa #gint representing a row in table

Returns

a gboolean representing if the row was successfully removed from

the selection, or 0 if value does not implement this interface.

void setCaption(atk.object.ObjectWrap caption)

Sets the caption for the table.

Parameters

captiona #AtkObject representing the caption to set for table
void setColumnDescription(int column, string description)

Sets the description text for the specified column of the table.

Parameters

columna #gint representing a column in table
descriptiona #gchar representing the description text to set for the specified column of the table
void setColumnHeader(int column, atk.object.ObjectWrap header)

Sets the specified column header to header.

Parameters

columna #gint representing a column in table
headeran #AtkTable
void setRowDescription(int row, string description)

Sets the description text for the specified row of table.

Parameters

rowa #gint representing a row in table
descriptiona #gchar representing the description text to set for the specified row of table
void setRowHeader(int row, atk.object.ObjectWrap header)

Sets the specified row header to header.

Parameters

rowa #gint representing a row in table
headeran #AtkTable
void setSummary(atk.object.ObjectWrap accessible)

Sets the summary description of the table.

Parameters

accessiblean #AtkObject representing the summary description to set for table
gulong connectColumnDeleted(T)(T callback, Flag!"After" after = No.After) if (isCallable!T && is(ReturnType!T == void) && (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] == int))) && (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.none && is(Parameters!T[1] == int))) && (Parameters!T.length < 3 || (ParameterStorageClassTuple!T[2] == ParameterStorageClass.none && is(Parameters!T[2] : atk.table.Table))) && Parameters!T.length < 4)

Connect to ColumnDeleted signal.

The "column-deleted" signal is emitted by an object which implements the AtkTable interface when a column is deleted.

Parameters

callbacksignal callback delegate or function to connect void callback(int arg1, int arg2, atk.table.Table table) arg1 The index of the first column deleted. (optional) arg2 The number of columns deleted. (optional) table the instance the signal is connected to (optional)
afterYes.After to execute callback after default handler, No.After to execute before (default)

Returns

Signal ID
gulong connectColumnInserted(T)(T callback, Flag!"After" after = No.After) if (isCallable!T && is(ReturnType!T == void) && (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] == int))) && (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.none && is(Parameters!T[1] == int))) && (Parameters!T.length < 3 || (ParameterStorageClassTuple!T[2] == ParameterStorageClass.none && is(Parameters!T[2] : atk.table.Table))) && Parameters!T.length < 4)

Connect to ColumnInserted signal.

The "column-inserted" signal is emitted by an object which implements the AtkTable interface when a column is inserted.

Parameters

callbacksignal callback delegate or function to connect void callback(int arg1, int arg2, atk.table.Table table) arg1 The index of the column inserted. (optional) arg2 The number of colums inserted. (optional) table the instance the signal is connected to (optional)
afterYes.After to execute callback after default handler, No.After to execute before (default)

Returns

Signal ID
gulong connectColumnReordered(T)(T callback, Flag!"After" after = No.After) if (isCallable!T && is(ReturnType!T == void) && (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : atk.table.Table))) && Parameters!T.length < 2)

Connect to ColumnReordered signal.

The "column-reordered" signal is emitted by an object which implements the AtkTable interface when the columns are reordered.

Parameters

callbacksignal callback delegate or function to connect void callback(atk.table.Table table) table the instance the signal is connected to (optional)
afterYes.After to execute callback after default handler, No.After to execute before (default)

Returns

Signal ID
gulong connectModelChanged(T)(T callback, Flag!"After" after = No.After) if (isCallable!T && is(ReturnType!T == void) && (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : atk.table.Table))) && Parameters!T.length < 2)

Connect to ModelChanged signal.

The "model-changed" signal is emitted by an object which implements the AtkTable interface when the model displayed by the table changes.

Parameters

callbacksignal callback delegate or function to connect void callback(atk.table.Table table) table the instance the signal is connected to (optional)
afterYes.After to execute callback after default handler, No.After to execute before (default)

Returns

Signal ID
gulong connectRowDeleted(T)(T callback, Flag!"After" after = No.After) if (isCallable!T && is(ReturnType!T == void) && (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] == int))) && (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.none && is(Parameters!T[1] == int))) && (Parameters!T.length < 3 || (ParameterStorageClassTuple!T[2] == ParameterStorageClass.none && is(Parameters!T[2] : atk.table.Table))) && Parameters!T.length < 4)

Connect to RowDeleted signal.

The "row-deleted" signal is emitted by an object which implements the AtkTable interface when a row is deleted.

Parameters

callbacksignal callback delegate or function to connect void callback(int arg1, int arg2, atk.table.Table table) arg1 The index of the first row deleted. (optional) arg2 The number of rows deleted. (optional) table the instance the signal is connected to (optional)
afterYes.After to execute callback after default handler, No.After to execute before (default)

Returns

Signal ID
gulong connectRowInserted(T)(T callback, Flag!"After" after = No.After) if (isCallable!T && is(ReturnType!T == void) && (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] == int))) && (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.none && is(Parameters!T[1] == int))) && (Parameters!T.length < 3 || (ParameterStorageClassTuple!T[2] == ParameterStorageClass.none && is(Parameters!T[2] : atk.table.Table))) && Parameters!T.length < 4)

Connect to RowInserted signal.

The "row-inserted" signal is emitted by an object which implements the AtkTable interface when a row is inserted.

Parameters

callbacksignal callback delegate or function to connect void callback(int arg1, int arg2, atk.table.Table table) arg1 The index of the first row inserted. (optional) arg2 The number of rows inserted. (optional) table the instance the signal is connected to (optional)
afterYes.After to execute callback after default handler, No.After to execute before (default)

Returns

Signal ID
gulong connectRowReordered(T)(T callback, Flag!"After" after = No.After) if (isCallable!T && is(ReturnType!T == void) && (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : atk.table.Table))) && Parameters!T.length < 2)

Connect to RowReordered signal.

The "row-reordered" signal is emitted by an object which implements the AtkTable interface when the rows are reordered.

Parameters

callbacksignal callback delegate or function to connect void callback(atk.table.Table table) table the instance the signal is connected to (optional)
afterYes.After to execute callback after default handler, No.After to execute before (default)

Returns

Signal ID
tmplTableGidBuilderT()