Class QuantityInput#
Defined in File QuantityInput.h
Inheritance Relationships#
Base Type#
public Karana::WebUI::Widget(Class Widget)
Class Documentation#
-
class QuantityInput : public Karana::WebUI::Widget#
Widget displaying two HTML
inputelements: one for inputting numeric quantities, and one for a units string.Uses a single State object with a numeric field
valueand a string fieldunits.Public Functions
-
QuantityInput(Router &router, std::string_view text, std::function<void(double, std::string_view)> on_change = {}, const Karana::Core::ks_ptr<State> &quantity_state = nullptr)#
QuantityInput constructor.
- Parameters:
router – The connection router to use
text – The text displayed in the QuantityInput
on_change – Called when the QuantityInput is modified
quantity_state – State for synchronizing the QuantityInput’s value
-
virtual ~QuantityInput()#
QuantityInput destructor.
-
QuantityInput(Router &router, std::string_view text, std::function<void(double, std::string_view)> on_change = {}, const Karana::Core::ks_ptr<State> &quantity_state = nullptr)#