Reference Manual

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

# Inti::Atk::Table Class Reference

An AtkTable C++ wrapper class. More...

`#include <inti/atk/table.h>`

Inheritance diagram for Inti::Atk::Table:

List of all members.

## Public Member Functions

Accessors

- AtkTable * atk_table () const
    Get a pointer to the AtkTable structure.
- AtkTableIface * atk_table_iface () const
    Get a pointer to the AtkTableIface structure.
- operator AtkTable * () const
    Conversion operator; safely converts a Table to an AtkTable pointer.
- Object * ref_at (int row, int column) const
    Get a reference to the table cell at row, column.
- int get_index_at (int row, int column) const
    Gets a integer representing the index at the specified row and column.
- int get_column_at_index (int index) const
    Gets an integer representing the column at the specified index.
- int get_row_at_index (int index) const
    Gets an integer representing the row at the specified index.
- int get_n_columns () const
    Gets the number of columns in the table.
- int get_n_rows () const
    Gets the number of rows in the table.
- int get_column_extent_at (int row, int column) const
    Gets the number of columns occupied by the accessible object at the specified row and column in the table.
- int get_row_extent_at (int row, int column) const
    Gets the number of rows occupied by the accessible object at the specified row and column in the table.
- Object * get_caption () const
    Gets the caption for the table.
- String get_column_description (int column) const
    Gets the description text of the specified column in the table.
- Object * get_column_header (int column) const
    Gets the column header of a specified column in an accessible table.
- String get_row_description (int row) const
    Gets the description text of the specified row in the table.
- Object * get_row_header (int row) const
    Gets the row header of a specified row in an accessible table.
- Object * get_summary () const
    Gets the summary description of the table.
- bool get_selected_columns (std::vector< int > &selected) const
    Gets the selected columns of the table.
- bool get_selected_rows (std::vector< int > &selected) const
    Gets the selected rows of the table.
- bool is_column_selected (int column) const
    Gets whether the specified column is selected.
- bool is_row_selected (int row) const
    Gets whether the specified row is selected.
- bool is_selected (int row, int column) const
    Gets a bool value indicating whether the accessible object at the specified row and column is selected.

Methods

- void set_caption (const Object *caption)
    Sets the caption for the table.
- void set_column_description (int column, const String &description)
    Sets the description text for the specified column of the table.
- void set_column_header (int column, const Object *header)
    Sets the specified column header to header.
- void set_row_description (int row, const String &description)
    Sets the description text for the specified row of the table.
- void set_row_header (int row, const Object *header)
    Sets the specified row header to header.
- void set_summary (const Object *accessible)
    Sets the summary description of the table.
- bool add_row_selection (int row)
    Adds the specified row to the selection.
- bool remove_row_selection (int row)
    Removes the specified row from the selection.
- bool add_column_selection (int column)
    Adds the specified column to the selection.
- bool remove_column_selection (int column)
    Removes the specified column from the selection.

Signal Proxies

- const RowInsertedSignalProxy sig_row_inserted ()
    Connect to the row_inserted_signal; emitted when one or more rows are inserted into a table.
- const ColumnInsertedSignalProxy sig_column_inserted ()
    Connect to the column_inserted_signal; emitted when one or more columns are inserted into a table.
- const RowDeletedSignalProxy sig_row_deleted ()
    Connect to the row_deleted_signal; emitted when one or more rows in a table are deleted.
- const ColumnDeletedSignalProxy sig_column_deleted ()
    Connect to the column_deleted_signal; emitted when one or more columns in a table are deleted.
- const RowReorderedSignalProxy sig_row_reordered ()
    Connect to the row_reordered_signal; emitted when the rows in a table are reordered.
- const ColumnReorderedSignalProxy sig_column_reordered ()
    Connect to the column_reordered_signal; emitted when the columns in a table are reordered.
- const ModelChangedSignalProxy sig_model_changed ()
    Connect to the model_changed_signal.

## Protected Member Functions

Constructors

- virtual ~Table ()=0
    Destructor.

Signal Handlers

- virtual void on_row_inserted (int row, int num_inserted)
    Called when one or more rows are inserted into the table.
- virtual void on_column_inserted (int column, int num_inserted)
    Called when one or more columns are inserted into the table.
- virtual void on_row_deleted (int row, int num_deleted)
    Called when one or more rows in the table are deleted.
- virtual void on_column_deleted (int column, int num_deleted)
    Called when one or more columns in the table are deleted.
- virtual void on_row_reordered ()
    Called when the rows in the table are reordered.
- virtual void on_column_reordered ()
    Called when the columns in the table are reordered.
- virtual void on_model_changed ()
    Called when a model_changed signal is received.

## Detailed Description

An AtkTable C++ wrapper class.

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", and these cells are exposed by Table as child Atk::Objects of the Table. Both row/column and child-index-based access to these children is provided.

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 Atk::Objects which may implement other interfaces (Text, Image, etc.) as appropriate. Table summaries may themselves be (simplified) Tables, etc.

## Member Function Documentation

bool Inti::Atk::Table::add_column_selection | ( | int | column | ) |

  | Adds the specified column to the selection. Parameters:
  column | An integer representing a column in the table.
Returns: true if the column was successfully added to the selection, or false if the table does not implement this interface.

bool Inti::Atk::Table::add_row_selection | ( | int | row | ) |

  | Adds the specified row to the selection. Parameters:
  row | An integer representing a row in the table.
Returns: true if the row was successfully added to the selection, or false if the table does not implement this interface.

Object* Inti::Atk::Table::get_caption | ( |  | ) | const

| Gets the caption for the table. Returns: A pointer to an Atk::Object representing the table caption, or null if table does not implement this interface.

int Inti::Atk::Table::get_column_at_index | ( | int | index | ) | const

  | Gets an integer representing the column at the specified index. Parameters:
  index | An integer representing an index in the table.
Returns: An integer representing the column at the specified index, or or -1 if the table does not implement this interface.

String Inti::Atk::Table::get_column_description | ( | int | column | ) | const

  | Gets the description text of the specified column in the table. Parameters:
  column | An integer representing a column in the table.
Returns: A string representing the column description, or a null String if the table does not implement this interface.

int Inti::Atk::Table::get_column_extent_at | ( | int | row,
|  | int | column
| ) | const

  | Gets the number of columns occupied by the accessible object at the specified row and column in the table. Parameters:
  row | An integer representing a row in the table.
  column | An integer representing a column in the table.
Returns: An integer representing the column extent at specified position, or 0 if the table does not implement this interface.

Object* Inti::Atk::Table::get_column_header | ( | int | column | ) | const

  | Gets the column header of a specified column in an accessible table. Parameters:
  column | An integer representing a column in the table.
Returns: A pointer to an Atk::Object representing the specified column header, or null if table does not implement this interface.

int Inti::Atk::Table::get_index_at | ( | int | row,
|  | int | column
| ) | const

  | Gets a integer representing the index at the specified row and column. Parameters:
  row | An integer representing a row in the table.
  column | An integer representing a column in the table.
Returns: An integer representing the index at specified position. The value -1 is returned if the object at row, column is not a child of the table or the table does not implement this interface.

int Inti::Atk::Table::get_n_columns | ( |  | ) | const

| Gets the number of columns in the table. Returns: An integer representing the number of columns, or 0 if the table does not implement this interface.

int Inti::Atk::Table::get_n_rows | ( |  | ) | const

| Gets the number of rows in the table. Returns: An integer representing the number of rows, or 0 if the table does not implement this interface.

int Inti::Atk::Table::get_row_at_index | ( | int | index | ) | const

  | Gets an integer representing the row at the specified index. Parameters:
  index | An integer representing an index in the table.
Returns: An integer representing the row at the specified index, or or -1 if the table does not implement this interface.

String Inti::Atk::Table::get_row_description | ( | int | row | ) | const

  | Gets the description text of the specified row in the table. Parameters:
  row | An integer representing a row in the table.
Returns: A string representing the row description, or null if the table does not implement this interface.

int Inti::Atk::Table::get_row_extent_at | ( | int | row,
|  | int | column
| ) | const

  | Gets the number of rows occupied by the accessible object at the specified row and column in the table. Parameters:
  row | An integer representing a row in the table.
  column | An integer representing a column in the table.
Returns: An integer representing the row extent at specified position, or 0 if the table does not implement this interface.

Object* Inti::Atk::Table::get_row_header | ( | int | row | ) | const

  | Gets the row header of a specified row in an accessible table. Parameters:
  row | An integer representing a row in the table.
Returns: A pointer to an Atk::Object representing the specified row header, or null if table does not implement this interface.

bool Inti::Atk::Table::get_selected_columns | ( | std::vector< int > & | selected | ) | const

  | Gets the selected columns of the table. Parameters:
  selected | A vector of int that is to hold the selected columns numbers.
Returns: true if the vector is not empty.

bool Inti::Atk::Table::get_selected_rows | ( | std::vector< int > & | selected | ) | const

  | Gets the selected rows of the table. Parameters:
  selected | A vector of int that is to hold the selected rows numbers.
Returns: true if the vector is not empty.

Object* Inti::Atk::Table::get_summary | ( |  | ) | const

| Gets the summary description of the table. Returns: A pointer to an Atk::Object representing a summary description of the table, or null if table does not implement this interface.

bool Inti::Atk::Table::is_column_selected | ( | int | column | ) | const

  | Gets whether the specified column is selected. Parameters:
  column | An integer representing a column in the table.
Returns: true if the column is selected, or false if the table does not implement this interface. bool is_row_selected(int row);

bool Inti::Atk::Table::is_row_selected | ( | int | row | ) | const

  | Gets whether the specified row is selected. Parameters:
  row | An integer representing a row in the table.
Returns: true if the row is selected, or false if the table does not implement this interface.

bool Inti::Atk::Table::is_selected | ( | int | row,
|  | int | column
| ) | const

  | Gets a bool value indicating whether the accessible object at the specified row and column is selected. Parameters:
  row | An integer representing a row in the table.
  column | An integer representing a column in the table.
Returns: true if the cell is selected, or false if the table does not implement this interface.

virtual void Inti::Atk::Table::on_column_deleted | ( | int | column,
|  | int | num_deleted
| ) | `[protected, virtual]`

  | Called when one or more columns in the table are deleted. Parameters:
  column | The index of the first column deleted.
  num_deleted | The number of columns deleted.

virtual void Inti::Atk::Table::on_column_inserted | ( | int | column,
|  | int | num_inserted
| ) | `[protected, virtual]`

  | Called when one or more columns are inserted into the table. Parameters:
  column | The index of the first column inserted.
  num_inserted | The number of columns inserted.

virtual void Inti::Atk::Table::on_row_deleted | ( | int | row,
|  | int | num_deleted
| ) | `[protected, virtual]`

  | Called when one or more rows in the table are deleted. Parameters:
  row | The index of the first row deleted.
  num_deleted | The number of rows deleted.

virtual void Inti::Atk::Table::on_row_inserted | ( | int | row,
|  | int | num_inserted
| ) | `[protected, virtual]`

  | Called when one or more rows are inserted into the table. Parameters:
  row | The index of the first row inserted.
  num_inserted | The number of rows inserted.

Object* Inti::Atk::Table::ref_at | ( | int | row,
|  | int | column
| ) | const

  | Get a reference to the table cell at row, column. Parameters:
  row | An integer representing a row in table.
  column | an integer representing a column in the table.
Returns: A pointer to Atk::Object representing the referred to accessible.

bool Inti::Atk::Table::remove_column_selection | ( | int | column | ) |

  | Removes the specified column from the selection. Parameters:
  column | An integer representing a column in the table.
Returns: true if the column was successfully removed from the selection, or false if the table does not implement this interface.

bool Inti::Atk::Table::remove_row_selection | ( | int | row | ) |

  | Removes the specified row from the selection. Parameters:
  row | An integer representing a row in the table.
Returns: true if the row was successfully removed from the selection, or false if the table does not implement this interface.

void Inti::Atk::Table::set_caption | ( | const Object * | caption | ) |

  | Sets the caption for the table. Parameters:
  caption | An Atk::Object representing the caption to set for the table.

void Inti::Atk::Table::set_column_description | ( | int | column,
|  | const String & | description
| ) |

  | Sets the description text for the specified column of the table. Parameters:
  column | An integer representing a column in the table.
  description | A string representing the description text to set for the specified column of the table.

void Inti::Atk::Table::set_column_header | ( | int | column,
|  | const Object * | header
| ) |

  | Sets the specified column header to header. Parameters:
  column | An integer representing a column in the table.
  header | An Atk::Object representing the specified column header.

void Inti::Atk::Table::set_row_description | ( | int | row,
|  | const String & | description
| ) |

  | Sets the description text for the specified row of the table. Parameters:
  row | An integer representing a row in the table.
  description | A string representing the description text to set for the specified row of the table.

void Inti::Atk::Table::set_row_header | ( | int | row,
|  | const Object * | header
| ) |

  | Sets the specified row header to header. Parameters:
  row | An integer representing a row in the table.
  header | An Atk::Object representing the specified row header.

void Inti::Atk::Table::set_summary | ( | const Object * | accessible | ) |

  | Sets the summary description of the table. Parameters:
  accessible | An Atk::Object representing the summary description to set for table.

The documentation for this class was generated from the following file:

- atk/table.h

Main Page - Footer