ofxOui - UI Components for OpenFrameworks

ofxOuiSlider.hpp
Go to the documentation of this file.
1 /*
2  * ofxOuiSlider.hpp
3  *
4  * Slider (inherits Numbox)
5  *
6  * This code has been authored by Jules Francoise <jfrancoi@sfu.ca>
7  * during his postdoc contract at Simon Fraser University (MovingStories
8  * project).
9  * See:
10  * http://julesfrancoise.com/
11  * http://movingstories.ca/
12  *
13  * Copyright (C) 2016 Jules Francoise.
14  *
15  * This Source Code Form is subject to the terms of the Mozilla Public
16  * License, v. 2.0. If a copy of the MPL was not distributed with this
17  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
18  */
19 
20 #ifndef ofxOuiSlider_hpp
21 #define ofxOuiSlider_hpp
22 
23 #include "ofxOuiNumbox.hpp"
24 
25 namespace ofxOui {
26 
31 class Slider : public Numbox {
32  public:
36  enum class Layout { Horizontal, Vertical };
37 
41  enum class Origin { Lower, Upper, Zero };
42 
50  Slider(int x_ = 0, int y_ = 0, int width_ = 0, int height_ = 0);
51 
55  virtual ~Slider();
56 
60  virtual void update();
61 
66 
71 
72  protected:
73  virtual void drawLabel();
74  virtual void mouseDragged(ofMouseEventArgs &e);
75  virtual void mousePressed(ofMouseEventArgs &e);
76 
77  ofRectangle slider_rect_;
78 };
79 }
80 
81 #endif
virtual ~Slider()
Destructor.
Definition: ofxOuiSlider.cpp:29
ofRectangle slider_rect_
Definition: ofxOuiSlider.hpp:77
Layout
Display Layout.
Definition: ofxOuiSlider.hpp:36
virtual void mousePressed(ofMouseEventArgs &e)
Definition: ofxOuiSlider.cpp:86
Origin origin
Origin of the slider filling.
Definition: ofxOuiSlider.hpp:70
virtual void update()
OF-like update function.
Definition: ofxOuiSlider.cpp:31
Layout layout
Display Layout.
Definition: ofxOuiSlider.hpp:65
virtual void mouseDragged(ofMouseEventArgs &e)
Definition: ofxOuiSlider.cpp:114
Number box (with mouse + keyboard interaction, C74 max style)
Definition: ofxOuiNumbox.hpp:31
Slider(int x_=0, int y_=0, int width_=0, int height_=0)
Constructor.
Definition: ofxOuiSlider.cpp:22
Definition: ofxOuiColormap.hpp:25
Slider controller.
Definition: ofxOuiSlider.hpp:31
virtual void drawLabel()
Definition: ofxOuiSlider.cpp:39
Origin
Origin of the slider filling.
Definition: ofxOuiSlider.hpp:41