Grid
AppCUI::Controls::Grid (class)
-
class Grid : public AppCUI::Controls::Control
Public Functions
-
virtual void OnMousePressed(int x, int y, Input::MouseButton button, Input::Key keyCode) override
-
virtual void OnMouseReleased(int x, int y, Input::MouseButton button, Input::Key keyCode) override
-
virtual bool OnMouseDrag(int x, int y, Input::MouseButton button, Input::Key keyCode) override
-
virtual bool OnMouseWheel(int x, int y, Input::MouseWheel direction, Input::Key keyCode) override
-
virtual bool OnMouseOver(int x, int y) override
-
virtual bool OnMouseLeave() override
-
virtual void OnLoseFocus() override
-
void SetFilterOnCurrentColumn(const std::u16string &filter)
-
bool UpdateCell(uint32 index, ConstString content, Graphics::TextAlignament textAlignment = Graphics::TextAlignament::Left, bool = false)
-
bool UpdateCell(uint32 x, uint32 y, ConstString content, Graphics::TextAlignament textAlignment = Graphics::TextAlignament::Left, bool = false)
-
const ConstString GetSeparator() const
-
void SetSeparator(ConstString separator)
-
bool UpdateHeaderValues(const vector<ConstString> &headerValues, Graphics::TextAlignament textAlignment = Graphics::TextAlignament::Left)
-
void SetDefaultHeaderValues()
-
void ToggleHorizontalLines()
-
void ToggleVerticalLines()
-
void Sort()
Sorts the rows (with GridFlags::Sort) by the column sorted last - a click on a header sorts by that column - or by the first column if none was.
Every cell of a row moves with it. The grid itself never sorts the rows it is given until a header is clicked or Sort is called.
-
void Filter()
-
std::optional<std::string> GetCellContent(uint32 x, uint32 y) const
The text of the cell at column
x, rowy(as shown, after sorting / filtering); std::nullopt outside the grid.
-
std::optional<std::string> GetSelectedCellContent()
-
std::optional<std::pair<std::string, std::vector<std::string>>> GetSelectedColumnContent()
Friends
- friend class Factory::Grid
-
virtual void OnMousePressed(int x, int y, Input::MouseButton button, Input::Key keyCode) override