1 #ifndef VTESTBED_GUI_TABLEPANEL_HH 2 #define VTESTBED_GUI_TABLEPANEL_HH 7 #include <vtestbed/gui/Window.hh> 27 size_t _selected_row = 0;
28 size_t _sort_column = 0;
29 bool _ascending =
false;
30 bool _show_first_column =
false;
34 inline void columns(
array1 rhs) { this->_columns = std::move(rhs); }
35 inline void width(
width_array rhs) { this->_width = std::move(rhs); }
36 inline const table_type& table()
const {
return this->_table; }
39 selected_row()
const {
40 return this->_table[this->_selected_row];
43 inline bool empty()
const {
return this->_table.empty(); }
47 this->_table = std::move(rhs);
48 auto max_row = this->_table.size()-1;
49 if (max_row < this->_selected_row) { this->_selected_row = max_row; }
53 show_first_column(
bool b) {
54 this->_show_first_column = b;
72 #endif // vim:filetype=cpp