class hiro::gui::NumericInt

Overview

Editbox that can contain only numeric integer values. More…

#include <GuiTypes.h>

class NumericInt: public hiro::gui::LinkedElement {
public:
    // methods

    virtual hiro::gui::NumericInt* Set(int32_t value);
    hiro::gui::NumericInt* SetMin(int32_t min_val);
    hiro::gui::NumericInt* SetMax(int32_t max_val);
    hiro::gui::NumericInt* SetMinMax(int32_t min, int32_t max);
    hiro::gui::NumericInt* SetStep(int32_t val_step);
    int32_t Get() const;
    int32_t GetMin() const;
    int32_t GetMax() const;
    int32_t GetStep() 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

Editbox that can contain only numeric integer values.

Methods

virtual hiro::gui::NumericInt* Set(int32_t value)

Set value to numeric. Values outside of min max range are clipped. Default 0.

hiro::gui::NumericInt* SetMin(int32_t min_val)

Define the minimal value that can be set. Default -32768.

hiro::gui::NumericInt* SetMax(int32_t max_val)

Define the maximal value that can be set. Default 32767.

hiro::gui::NumericInt* SetMinMax(int32_t min, int32_t max)

Define the minimal and the maximal values that can be set.

Default for minimal is -32768 and for maximal is 32767.

hiro::gui::NumericInt* SetStep(int32_t val_step)

Set step by which the value changes when clicked on the up and down. Default 1.

int32_t Get() const

Returns current value of numeric.

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

Get step by which the value changes when clicked on the up and down.