Class Slider#
Defined in File Slider.h
Inheritance Relationships#
Base Type#
public Karana::WebUI::Widget(Class Widget)
Class Documentation#
-
class Slider : public Karana::WebUI::Widget#
Widget displaying a slider + editable text box composed of two HTML
rangeobjects.Uses a single State object to store the value, and supports customization via a constructor parameter.
Public Functions
-
Slider(Router &router, std::string_view text, std::function<void(double)> on_change = {}, const SliderOptions &opts = {}, const Karana::Core::ks_ptr<State> &value_state = nullptr)#
Slider constructor.
-
void setValue(double value)#
Set the current value of the slider.
- Parameters:
value – The value of the slider
-
void setMin(double min)#
Set the min value of the slider.
- Parameters:
min – The lower bound on possible values
-
void setMax(double max)#
Set the max value of the slider.
- Parameters:
max – The upper bound on possible values
-
void setStep(double step)#
Set the step size of the slider.
- Parameters:
step – The step size of values on the slider
Protected Functions
-
virtual void _onConnect(int client_id) override#
First setup on initial connection.
- Parameters:
client_id – The ID of the client connecting.
-
Slider(Router &router, std::string_view text, std::function<void(double)> on_change = {}, const SliderOptions &opts = {}, const Karana::Core::ks_ptr<State> &value_state = nullptr)#