Template Class FloatBox

Inheritance Relationships

Base Type

Class Documentation

template<typename Scalar>
class FloatBox : public nanogui::TextBox

A specialization of TextBox representing floating point values.

Template parameters should be float types, e.g. float, double, float64_t, etc.

Public Functions

FloatBox(Widget *parent, Scalar value = (Scalar)0.f)
std::string numberFormat() const
void numberFormat(const std::string &format)
Scalar value() const
void setValue(Scalar value)
void setCallback(const std::function<void(Scalar)> &cb)
void setValueIncrement(Scalar incr)
void setMinValue(Scalar minValue)
void setMaxValue(Scalar maxValue)
void setMinMaxValues(Scalar minValue, Scalar maxValue)
virtual bool mouseButtonEvent(const Vector2i &p, int button, bool down, int modifiers)

Handle a mouse button event (default implementation: propagate to children)

virtual bool mouseDragEvent(const Vector2i &p, const Vector2i &rel, int button, int modifiers)

Handle a mouse drag event (default implementation: do nothing)

virtual bool scrollEvent(const Vector2i &p, const Vector2f &rel)

Handle a mouse scroll event (default implementation: propagate to children)