Class Dropdown#
Defined in File Dropdown.h
Inheritance Relationships#
Base Type#
public Karana::WebUI::Widget(Class Widget)
Class Documentation#
-
class Dropdown : public Karana::WebUI::Widget#
Widget displaying a Dropdown menu via an HTML select.
Uses a single State object to store the index selected.
Public Functions
-
Dropdown(Router &router, std::string_view text, const std::vector<std::string> &choices, std::function<void(size_t)> on_change = {}, const Karana::Core::ks_ptr<State> &select_state = nullptr)#
Dropdown constructor.
-
void setIndex(size_t index)#
Set the current index of the dropdown.
- Parameters:
index – The index of the current dropdown item
-
Dropdown(Router &router, std::string_view text, const std::vector<std::string> &choices, std::function<void(size_t)> on_change = {}, const Karana::Core::ks_ptr<State> &select_state = nullptr)#