atk.Table
Prev | The atk Class Reference | Next

## atk.Table

atk.Table — the ATK interface implemented for UI components which contain tabular or row/column information.

## Synopsis

    class atk.Table(gobject.GInterface):
        def ref_at(row, column)
        def get_index_at(row, column)
        def get_column_at_index(index)
        def get_row_at_index(index)
        def get_n_columns()
        def get_n_rows()
        def get_column_extent_at(row, column)
        def get_row_extent_at(row, column)
        def get_caption()
        def get_column_description(column)
        def get_column_header(column)
        def get_row_description(row)
        def get_row_header(row)
        def get_summary()
        def set_caption(caption)
        def set_column_description(column, description)
        def set_column_header(column, header)
        def set_row_description(row, description)
        def set_row_header(row, header)
        def set_summary(accessible)
        def get_selected_columns(selected)
        def get_selected_rows(selected)
        def is_column_selected(column)
        def is_row_selected(row)
        def is_selected(row, column)
        def add_row_selection(row)
        def remove_row_selection(row)
        def add_column_selection(column)
        def remove_column_selection(column)

## atk.Table Signal Prototypes

"column-deleted" | `def callback(`atktable`, `column`, `count`, `user_param1`, `...`)`
"column-inserted" | `def callback(`atktable`, `column`, `count`, `user_param1`, `...`)`
"column-reordered" | `def callback(`atktable`, `user_param1`, `...`)`
"model-changed" | `def callback(`atktable`, `user_param1`, `...`)`
"row-deleted" | `def callback(`atktable`, `row`, `count`, `user_param1`, `...`)`
"row-inserted" | `def callback(`atktable`, `row`, `count`, `user_param1`, `...`)`
"row-reordered" | `def callback(`atktable`, `user_param1`, `...`)`

## Description

`atk.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 `atk.Table` are typically referred to as "cells", and these cells are exposed by `atk.Table` as child `atk.Object` objects of the `atk.Table`. Both row/column and child-index-based access to these children is provided.

Children of `atk.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, `atk.Table` includes provision for offering simplified summary information, as well as row and column headers and captions. Headers and captions are `atk.Object` objects which may implement other interfaces (`atk.Text`, `atk.Image`, etc.) as appropriate. `atk.Table` summaries may themselves be (simplified) `atk.Table` objects, etc.

## Methods

### atk.Table.ref_at

        def ref_at(row, column)

`row` : | an index representing a row in `table`
`column` : | an index representing a column in `table`
Returns : | a `atk.Object` representing the referred to accessible

Get a reference to the table cell at `row`, `column`.

### atk.Table.get_index_at

        def get_index_at(row, column)

`row` : | an index representing a row in `table`
`column` : | an index representing a column in `table`
Returns : | an index representing the index at specified position

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

### atk.Table.get_column_at_index

        def get_column_at_index(index)

`index` : |
Returns : | an integer representing the column at the specified index.

Gets an index representing the column at the specified `index`, or -1 if the table does not implement this interface

### atk.Table.get_row_at_index

        def get_row_at_index(index)

`index` : |
Returns : | an integer representing the row at the specified index.

Gets an index representing the row at the specified `index`, or -1 if the table does not implement this interface

### atk.Table.get_n_columns

        def get_n_columns()

Returns : | an integer representing the number of columns, or 0 if value does not implement this interface.

Gets the number of columns in the table.

### atk.Table.get_n_rows

        def get_n_rows()

Returns : | an integer representing the number of rows, or 0 if value does not implement this interface.

Gets the number of rows in the table.

### atk.Table.get_column_extent_at

        def get_column_extent_at(row, column)

`row` : | an index representing a row in `table`
`column` : | an index representing a column in `table`
Returns : | an integer 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`.

### atk.Table.get_row_extent_at

        def get_row_extent_at(row, column)

`row` : | an index representing a row in `table`
`column` : | an index representing a column in `table`
Returns : | an integer 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`.

### atk.Table.get_caption

        def get_caption()

Returns : | a `atk.Object` representing the table caption, or `None` if value does not implement this interface.

Gets the caption for the table.

### atk.Table.get_column_description

        def get_column_description(column)

`column` : | an index representing a column in the table
Returns : | a string representing the column description, or `None` if value does not implement this interface.

Gets the description text of the specified `column` in the table

### atk.Table.get_column_header

        def get_column_header(column)

`column` : | an index representing a column in the table
Returns : | a `atk.Object` representing the specified column header, or `None` if value does not implement this interface.

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

### atk.Table.get_row_description

        def get_row_description(row)

`row` : | an index representing a row in table
Returns : | a string representing the row description, or `None` if value does not implement this interface.

Gets the description text of the specified row in the table

### atk.Table.get_row_header

        def get_row_header(row)

`row` : | an index representing a row in the table
Returns : | a `atk.Object` representing the specified row header, or `None` if value does not implement this interface.

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

### atk.Table.get_summary

        def get_summary()

Returns : | a `atk.Object` representing a summary description of the table, or zero if value does not implement this interface.

Gets the summary description of the table.

### atk.Table.set_caption

        def set_caption(caption)

`caption` : | a `atk.Object` representing the caption to set for table

Sets the caption for the table.

### atk.Table.set_column_description

        def set_column_description(column, description)

`column` : | an index representing a column in table
`description` : | a string representing the description text to set for the specified `column` of the table

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

### atk.Table.set_column_header

        def set_column_header(column, header)

`column` : | an index representing a column in table
`header` : | an `atk.Table`

Sets the specified column header to `header`.

### atk.Table.set_row_description

        def set_row_description(row, description)

`row` : | an index representing a row in table
`description` : | a string representing the description text to set for the specified `row` of table

Sets the description text for the specified `row` of table.

### atk.Table.set_row_header

        def set_row_header(row, header)

`row` : | an index representing a row in table
`header` : | an `atk.Table`

Sets the specified row header to `header`.

### atk.Table.set_summary

        def set_summary(accessible)

`accessible` : | an `atk.Object` representing the summary description to set for table

Sets the summary description of the table.

### atk.Table.get_selected_columns

        def get_selected_columns()

Returns : | a tuple containing the indices ofthe selected columns.

Gets the selected columns of the table.

### atk.Table.get_selected_rows

        def get_selected_rows()

Returns : | a tuple containing the indices ofthe selected rows.

Gets the selected rows of the table.

### atk.Table.is_column_selected

        def is_column_selected(column)

`column` : | an index representing a column in table
Returns : | `True` 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

### atk.Table.is_row_selected

        def is_row_selected(row)

`row` : | an index representing a row in table
Returns : | `True` 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

### atk.Table.is_selected

        def is_selected(row, column)

`row` : | an index representing a row in table
`column` : | an index representing a column in table
Returns : | `True` 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

### atk.Table.add_row_selection

        def add_row_selection(row)

`row` : | an index representing a row in table
Returns : | `True` if `row` was successfully added to selection, or 0 if value does not implement this interface.

Adds the specified `row` to the selection.

### atk.Table.remove_row_selection

        def remove_row_selection(row)

`row` : | an index representing a row in table
Returns : | `True` if `row` was successfully removed from the selection, or 0 if value does not implement this interface.

Removes the specified `row` from the selection.

### atk.Table.add_column_selection

        def add_column_selection(column)

`column` : | an index representing a column in table
Returns : | `True` if `column` was successfully added to the selection, or 0 if value does not implement this interface.

Adds the specified `column` to the selection.

### atk.Table.remove_column_selection

        def remove_column_selection(column)

`column` : | an index representing a column in table
Returns : | `True` if `column` was successfully removed from the selection, or 0 if value does not implement this interface.

Adds the specified `column` to the selection.

## Signals

### The "column-deleted" atk.Table Signal

        def callback(atktable, arg1, arg2, user_param1, ...)

`atktable` : | the object which received the signal.
`column` : | The index of the first column deleted.
`count` : | The number of columns deleted.
`user_param1` : | the first user parameter (if any) specified with the `connect`() method
`...` : | additional user parameters (if any)

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

### The "column-inserted" atk.Table Signal

        def callback(atktable, column, count, user_param1, ...)

`atktable` : | the object which received the signal.
`column` : | The index of the column inserted.
`count` : | The number of colums inserted.
`user_param1` : | the first user parameter (if any) specified with the `connect`() method
`...` : | additional user parameters (if any)

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

### The "column-reordered" atk.Table Signal

        def callback(atktable, user_param1, ...)

`atktable` : | the object which received the signal.
`user_param1` : | the first user parameter (if any) specified with the `connect`() method
`...` : | additional user parameters (if any)

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

### The "model-changed" atk.Table Signal

        def callback(atktable, user_param1, ...)

`atktable` : | the object which received the signal.
`user_param1` : | the first user parameter (if any) specified with the `connect`() method
`...` : | additional user parameters (if any)

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

### The "row-deleted" atk.Table Signal

        def callback(atktable, row, count, user_param1, ...)

`atktable` : | the object which received the signal.
`row` : | The index of the first row deleted.
`count` : | The number of rows deleted.
`user_param1` : | the first user parameter (if any) specified with the `connect`() method
`...` : | additional user parameters (if any)

The "row-deleted" signal is emitted by an object which implements the `atk.Table` interface when a column is inserted.

### The "row-inserted" atk.Table Signal

        def callback(atktable, row, count, user_param1, ...)

`atktable` : | the object which received the signal.
`row` : | The index of the first row deleted.
`count` : | The number of rows deleted.
`user_param1` : | the first user parameter (if any) specified with the `connect`() method
`...` : | additional user parameters (if any)

The "row-inserted" signal is emitted by an object which implements the `atk.Table` interface when a column is inserted.

### The "row-reordered" atk.Table Signal

        def callback(atktable, user_param1, ...)

`atktable` : | the object which received the signal.
`user_param1` : | the first user parameter (if any) specified with the `connect`() method
`...` : | additional user parameters (if any)

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

Prev | Up | Next
atk.StreamableContent | Home | atk.Text