20 #ifndef ofxOuiMultiSlider_hpp 21 #define ofxOuiMultiSlider_hpp 41 enum class Origin { Lower, Upper, Zero };
80 template <
typename T,
typename args,
class ListenerClass>
81 void onEditSlider(T* owner,
void (ListenerClass::*listenerMethod)(args)) {
82 using namespace std::placeholders;
96 MultiSlider(
int x_ = 0,
int y_ = 0,
int width_ = 0,
int height_ = 0);
void onEditSlider(T *owner, void(ListenerClass::*listenerMethod)(args))
Set callback function for slider editing events.
Definition: ofxOuiMultiSlider.hpp:81
virtual void drawLabel()
Definition: ofxOuiMultiSlider.cpp:48
Event arguments for slider editing events.
Definition: ofxOuiMultiSlider.hpp:46
Layout
Display Layout.
Definition: ofxOuiMultiSlider.hpp:36
void clipValues()
Definition: ofxOuiMultiSlider.cpp:108
MultiSlider * sender
pointer to the sender component
Definition: ofxOuiMultiSlider.hpp:59
MultiSlider.
Definition: ofxOuiMultiSlider.hpp:31
virtual void mousePressed(ofMouseEventArgs &e)
Definition: ofxOuiMultiSlider.cpp:114
virtual void update()
OF-like update function.
Definition: ofxOuiMultiSlider.cpp:40
Layout layout
Display Layout.
Definition: ofxOuiMultiSlider.hpp:126
float value
value of the modified slider
Definition: ofxOuiMultiSlider.hpp:69
virtual void mouseDragged(ofMouseEventArgs &e)
Definition: ofxOuiMultiSlider.cpp:151
Base UI Component (equivalent to a label)
Definition: ofxOuiComponent.hpp:33
int index
index of the modified slider
Definition: ofxOuiMultiSlider.hpp:64
float min
Minimum value of each slider.
Definition: ofxOuiMultiSlider.hpp:116
ofRectangle slider_rect_
Definition: ofxOuiMultiSlider.hpp:139
virtual ~MultiSlider()
Destructor.
Definition: ofxOuiMultiSlider.cpp:33
float max
Maximum value of each slider.
Definition: ofxOuiMultiSlider.hpp:121
Definition: ofxOuiColormap.hpp:25
bool dragging_
Definition: ofxOuiMultiSlider.hpp:140
Origin origin
Origin of the slider filling.
Definition: ofxOuiMultiSlider.hpp:131
MultiSlider(int x_=0, int y_=0, int width_=0, int height_=0)
Constructor.
Definition: ofxOuiMultiSlider.cpp:22
ofVec2f previous_position_
Definition: ofxOuiMultiSlider.hpp:141
Origin
Origin of the slider filling.
Definition: ofxOuiMultiSlider.hpp:41
std::function< void(MultiSlider::ValueEvent &)> multislider_event_callback_
Definition: ofxOuiMultiSlider.hpp:142
vector< float > values
Slider values.
Definition: ofxOuiMultiSlider.hpp:111