Class Slider¶
Defined in File slider.h
Page Contents
Inheritance Relationships¶
Base Type¶
public nanogui::Widget
(Class Widget)
Class Documentation¶
-
class
Slider
: public nanogui::Widget¶ Fractional slider widget with mouse control.
Public Functions
-
float
value
() const¶
-
void
setValue
(float value)¶
-
std::pair<float, float>
range
() const¶
-
void
setRange
(std::pair<float, float> range)¶
-
std::pair<float, float>
highlightedRange
() const¶
-
void
setHighlightedRange
(std::pair<float, float> highlightedRange)¶
-
std::function<void(float)>
callback
() const¶
-
void
setCallback
(const std::function<void(float)> &callback)¶
-
std::function<void(float)>
finalCallback
() const¶
-
void
setFinalCallback
(const std::function<void(float)> &callback)¶
-
virtual bool
mouseDragEvent
(const Vector2i &p, const Vector2i &rel, int button, int modifiers)¶ Handle a mouse drag event (default implementation: do nothing)
-
virtual bool
mouseButtonEvent
(const Vector2i &p, int button, bool down, int modifiers)¶ Handle a mouse button event (default implementation: propagate to children)
-
virtual void
draw
(NVGcontext *ctx)¶ Draw the widget (and all child widgets)
-
virtual void
save
(Serializer &s) const¶ Save the state of the widget into the given Serializer instance.
-
virtual bool
load
(Serializer &s)¶ Restore the state of the widget from the given Serializer instance.
-
float