class hiro::gui::NumericFloat — HIRO 0.7.0 documentation

# class hiro::gui::NumericFloat

## Overview

Edit box which can contain only numeric float values. More…

    #include <GuiTypes.h>

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

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

Edit box which can contain only numeric float values.

### Methods

    virtual hiro::gui::NumericFloat* Set(float value)

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

    hiro::gui::NumericFloat* SetMin(float min_val)

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

    hiro::gui::NumericFloat* SetMax(float max_val)

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

    hiro::gui::NumericFloat* SetMinMax(float min, float max)

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

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

    hiro::gui::NumericFloat* SetStep(float val_step)

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

    float Get() const

Returns current value of numeric.

    float GetMin() const

Get the minimal value that can be set.

    float GetMax() const

Get the maximal value that can be set.

    float GetStep() const

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