|
TachyonUI 0.1.0
High-performance UI for building tools.
|
A VirtualTable column: the TableColumn plus cell generator, sort order and section. More...
#include <gui_controls/gui_table_types.h>
Classes | |
| struct | Internal |
| Written by the table each frame (end-of-frame handlers read it); not part of the API. More... | |
Public Attributes | |
| TableColumn | column |
| std::function< void(int rowIndex)> | generateCell |
| Emits the cell of dataset row rowIndex; null in the BeginTable/Cell flow. | |
| std::function< bool(int rowA, int rowB)> | sortAscending |
| Ascending strict-weak ordering on dataset row indices; VirtualTable sorts with it. | |
| int | sectionId = 0 |
| Consecutive columns with the same sectionId form a section, side by side and scrolling independently. | |
| SectionSizing | sectionSizing = SectionSizing::Scrollable |
| Read from the section's first column only. | |
| struct tachyon::VirtualTableColumn::Internal | internal |
| Written by the table; not part of the API. | |
A VirtualTable column: the TableColumn plus cell generator, sort order and section.
Reorder columns by reordering the array.
std::vector<VirtualTableColumn> columns = {
{ .column = { .header = "Name", .initialWidth = 160 },
.generateCell = [this](int row) { Cell(rows[row].name); },
.sortAscending = [this](int a, int b) { return rows[a].name < rows[b].name; } },
};
VirtualTable(tableID, tableState, columns, int(rows.size()), 0, theme.tableFillStyleRef,
LayoutOverride::Auto().FlexGrow(1).MinHeight(0));
| TableColumn tachyon::VirtualTableColumn::column |
| std::function<void(int rowIndex)> tachyon::VirtualTableColumn::generateCell |
Emits the cell of dataset row rowIndex; null in the BeginTable/Cell flow.
| std::function<bool(int rowA, int rowB)> tachyon::VirtualTableColumn::sortAscending |
Ascending strict-weak ordering on dataset row indices; VirtualTable sorts with it.
Providing it makes the column sortable.
| int tachyon::VirtualTableColumn::sectionId = 0 |
Consecutive columns with the same sectionId form a section, side by side and scrolling independently.
Reorder and implicit stretch stay within a section.
| SectionSizing tachyon::VirtualTableColumn::sectionSizing = SectionSizing::Scrollable |
Read from the section's first column only.
| struct tachyon::VirtualTableColumn::Internal tachyon::VirtualTableColumn::internal |
Written by the table; not part of the API.