SimpleTableModel
A simple implementation of TableModel.
| Header | #include "nativeui/table_model.h" |
| Namespace | namespace nu |
| Type | class (RefCounted) |
| Inherits | TableModel |
There is no need to call Notify methods when using SimpleTableModel.
Note that all data are stored as primary types, it is not possible to store
a native object (for example Images) in table model.
Constructors
SimpleTableModel(uint32_t columns)
Create a SimpleTableModel with fixed columns number.
Parameters
uint32_tcolumns
Methods
void AddRow(std::vector<base::Value> row)
Add a row.
The length of row should not be smaller than columns number.
The data should be std::moved for best performance.
Parameters
std::vector<base::Value>row
void RemoveRowAt(uint32_t index)
Remove the row at index.
Parameters
uint32_tindex