#include <table_model.h>
Definition at line 96 of file table_model.h.
Public Member Functions | |
StaticTableModel (int width, int height) | |
virtual | ~StaticTableModel () |
virtual void | set (int row, int column, gcn::Widget *widget) |
Inserts a widget into the table model. | |
virtual void | fixColumnWidth (int column, int width) |
Fixes the column width for a given column; this overrides dynamic width inference. | |
virtual void | fixRowHeight (int height) |
Fixes the row height; this overrides dynamic height inference. | |
virtual void | resize () |
Resizes the table model. | |
virtual int | getRows () |
Determines the number of rows (lines) in the table. | |
virtual int | getColumns () |
Determines the number of columns in each row. | |
virtual int | getRowHeight () |
Determines the height for each row. | |
virtual int | getWidth () |
virtual int | getHeight () |
virtual int | getColumnWidth (int index) |
Determines the width of each individual column. | |
virtual gcn::Widget * | getElementAt (int row, int column) |
Retrieves the widget stored at the specified location within the table. | |
Protected Attributes | |
int | mRows |
int | mColumns |
int | mHeight |
std::vector< gcn::Widget * > | mTableModel |
std::vector< int > | mWidths |
StaticTableModel::StaticTableModel | ( | int | width, | |
int | height | |||
) |
Definition at line 54 of file table_model.cpp.
StaticTableModel::~StaticTableModel | ( | ) | [virtual] |
Definition at line 63 of file table_model.cpp.
void StaticTableModel::set | ( | int | row, | |
int | column, | |||
gcn::Widget * | widget | |||
) | [virtual] |
Inserts a widget into the table model.
The model is resized to accomodate the widget's width and height, unless column width / row height have been fixed.
Definition at line 75 of file table_model.cpp.
void StaticTableModel::fixColumnWidth | ( | int | column, | |
int | width | |||
) | [virtual] |
Fixes the column width for a given column; this overrides dynamic width inference.
Semantics are undefined for width 0.
Definition at line 105 of file table_model.cpp.
void StaticTableModel::fixRowHeight | ( | int | height | ) | [virtual] |
Fixes the row height; this overrides dynamic height inference.
Semantics are undefined for width 0.
Definition at line 114 of file table_model.cpp.
void StaticTableModel::resize | ( | ) | [virtual] |
int StaticTableModel::getRows | ( | ) | [virtual] |
Determines the number of rows (lines) in the table.
Implements TableModel.
Reimplemented in SkillGuiTableModel.
Definition at line 135 of file table_model.cpp.
int StaticTableModel::getColumns | ( | ) | [virtual] |
Determines the number of columns in each row.
Implements TableModel.
Definition at line 140 of file table_model.cpp.
int StaticTableModel::getRowHeight | ( | ) | [virtual] |
Determines the height for each row.
Implements TableModel.
Reimplemented in SkillGuiTableModel.
Definition at line 122 of file table_model.cpp.
int StaticTableModel::getWidth | ( | void | ) | [virtual] |
Definition at line 145 of file table_model.cpp.
int StaticTableModel::getHeight | ( | void | ) | [virtual] |
Definition at line 157 of file table_model.cpp.
int StaticTableModel::getColumnWidth | ( | int | index | ) | [virtual] |
Determines the width of each individual column.
Implements TableModel.
Reimplemented in SkillGuiTableModel.
Definition at line 127 of file table_model.cpp.
gcn::Widget * StaticTableModel::getElementAt | ( | int | row, | |
int | column | |||
) | [virtual] |
Retrieves the widget stored at the specified location within the table.
Implements TableModel.
Definition at line 100 of file table_model.cpp.
int StaticTableModel::mRows [protected] |
Definition at line 138 of file table_model.h.
int StaticTableModel::mColumns [protected] |
Definition at line 138 of file table_model.h.
int StaticTableModel::mHeight [protected] |
Definition at line 139 of file table_model.h.
std::vector<gcn::Widget *> StaticTableModel::mTableModel [protected] |
Definition at line 140 of file table_model.h.
std::vector<int> StaticTableModel::mWidths [protected] |
Definition at line 141 of file table_model.h.