root / tbeta / Windows / apps / tbeta app / Configapp / src / ofxGui / ofxGuiColor.h @ 3

View | Annotate | Download (1.3 KB)

1
/*
2
 *  ofxGuiColor.h
3
 *  openFrameworks
4
 *
5
 *  Created by Stefan Kirch on 18.06.08.
6
 *  Copyright 2008 alphakanal. All rights reserved.
7
 *
8
 */
9
10
//        ----------------------------------------------------------------------------------------------------
11
12
#ifndef OFX_GUI_COLOR
13
#define OFX_GUI_COLOR
14
15
//        ----------------------------------------------------------------------------------------------------
16
17
#include "ofxGuiTypes.h"
18
#include "ofxGuiObject.h"
19
20
//        ----------------------------------------------------------------------------------------------------
21
22
class ofxGuiColor : public ofxGuiObject
23
        {
24
                
25
        public:
26
                
27
                ofxGuiColor();
28
                
29
                void        init(int id, string name, int x, int y, int width, int height, ofRGBA value, int mode);
30
                
31
                void        setValue(ofRGBA value);
32
                
33
                bool        update(int id, int task, void* data, int length);
34
                void        draw();
35
                
36
                bool        mouseDragged(int x, int y, int button);
37
                bool        mousePressed(int x, int y, int button);
38
                bool        mouseReleased(int x, int y, int button);
39
                
40
                void        buildFromXml();
41
                void        saveToXml();
42
                
43
                int                mouseToSlider(float y);
44
45
                int                mSize, mSlider;
46
                ofRGBA        mValue;
47
};
48
49
//        ----------------------------------------------------------------------------------------------------
50
51
#endif
52
53
//        ----------------------------------------------------------------------------------------------------