C4 Engine
C4 Engine API Documentation

class TableWidget

Defined in:  C4Widgets.h
The TableWidget class represents an interface widget that displays a table.
Definition

class TableWidget final : public RenderableWidget

Member Functions
TableWidget::GetTableFlags Returns the table flags.
TableWidget::SetTableFlags Sets the table flags.
TableWidget::GetColumnCount Returns the number of columns in a table.
TableWidget::SetColumnCount Sets the number of columns in a table.
TableWidget::GetCellSize Returns the cell size for a table.
TableWidget::SetCellSize Sets the cell size for a table.
 
TableWidget::GetTableItemCount Returns the number of items in a table.
TableWidget::GetTableItem Returns the table item with a specific index.
TableWidget::GetFirstTableItem Returns the first item in a table.
TableWidget::GetLastTableItem Returns the last item in a table.
TableWidget::SetDisplayRow Scrolls a table widget so that a specific row is displayed at the top.
TableWidget::RevealTableItem Scrolls a table widget to reveal a specific item.
 
TableWidget::GetSelectedTableItemCount Returns the number of items that are currently selected in a table.
TableWidget::GetSelectedTableItem Returns the selected table item with a specific index.
TableWidget::GetFirstSelectedTableItem Returns the first selected item in a table.
TableWidget::GetLastSelectedTableItem Returns the last selected item in a table.
TableWidget::GetPreviousSelectedTableItem Returns the previous selected item in a table.
TableWidget::GetNextSelectedTableItem Returns the next selected item in a table.
TableWidget::SelectTableItem Selects an item in a table.
TableWidget::UnselectTableItem Unselects an item in a table.
TableWidget::SelectAllTableItems Selects all items in a table.
TableWidget::UnselectAllTableItems Unselects all items in a table.
 
TableWidget::PrependTableItem Adds an item to the beginning of a table.
TableWidget::AppendTableItem Adds an item to the end of a table.
Constructor

TableWidget(const Vector2D& size, int32 columns, const Vector2D& cell);

Parameters
size The size of the table, in pixels.
columns The number of columns in the table.
cell The size of each cell in the table, in pixels.
Description
The TableWidget class is used to display a box that contains a scrollable table of other widgets. The table has a fixed number of columns as specified by the columns parameter.

The default widget color corresponds to the kWidgetColorBorder color type and determines the color of the table's border. Other color types supported by the table widget are kWidgetColorBackground and kWidgetColorHilite. If a highlight color has not been explicitly specified, then the Interface Manager's global highlight color is used.
Base Classes
RenderableWidget All rendered interface widgets are subclasses of RenderableWidget.
See Also

ListWidget

TreeWidget

Wiki Articles

Table Widget