class hiro::gui::SlidingInt
Overview
Slider which can be directly represented by integer variable. More…
#include <GuiTypes.h> class SlidingInt: public hiro::gui::LinkedElement { public: // methods virtual hiro::gui::SlidingInt* Set(int32_t value); hiro::gui::SlidingInt* SetMin(int32_t min_val); hiro::gui::SlidingInt* SetMax(int32_t max_val); hiro::gui::SlidingInt* SetMinMax(int32_t min, int32_t max); hiro::gui::SlidingInt* SetStep(int32_t val_step); int32_t Get() const; int32_t GetMin() const; int32_t GetMax() const; int32_t GetStep() const; float GetAsFloat() const; };
Inherited Members
public: // methods bool TestCondition() const; uint32_t GetId() const; C* SetConditionFunc(std::function<bool(void)> condition_func); C* SetConditionBool(bool* var, hiro::BoolFunc func = hiro::BoolFunc::equals_true); C* Subscribe(std::function<void(const C*)> callback_func); virtual C* Set(const T new_value) = 0; virtual T Get() const = 0; C* SetLink(T* pointer); protected: // methods void SetConditionFuncImpl(std::function<bool(void)> condition_func); virtual void NotifyChange() const; virtual void NotifyChange() const;
Detailed Documentation
Slider which can be directly represented by integer variable.
Set min max values to define range. Default range is <0,10>.
Methods
virtual hiro::gui::SlidingInt* Set(int32_t value)
Set value to slider handle. Values outside of min max range are clipped. Default 0.
hiro::gui::SlidingInt* SetMin(int32_t min_val)
Define the minimal value that can be set. Default 0.
hiro::gui::SlidingInt* SetMax(int32_t max_val)
Define the maximal value that can be set. Default 10.
hiro::gui::SlidingInt* SetMinMax(int32_t min, int32_t max)
Define the minimal and the maximal values that can be set.
Default for minimal is 0 and for maximal is 10.
hiro::gui::SlidingInt* SetStep(int32_t val_step)
Set step by which the slider moves when clicked out of handle bounds. Default 1.
int32_t Get() const
Returns current value defined by slider handle.
int32_t GetMin() const
Get the minimal value that can be set.
int32_t GetMax() const
Get the maximal value that can be set.
int32_t GetStep() const
Returns step by which the slider moves when clicked out of handle bounds.