root / trunk / Linux / addons / ofxNCore / src / Controls / ofxGuiMatrix.h @ 59

View | Annotate | Download (1.4 KB)

1
/*
2
 *  ofxGuiMatrix.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_MATRIX
13
#define OFX_GUI_MATRIX
14
15
//        ----------------------------------------------------------------------------------------------------
16
17
#include "ofxGuiTypes.h"
18
#include "ofxGuiObject.h"
19
20
//        ----------------------------------------------------------------------------------------------------
21
22
class ofxGuiMatrix : public ofxGuiObject
23
{
24
public:
25
        
26
         ofxGuiMatrix();
27
        ~ofxGuiMatrix();
28
        
29
        void        init(int id, string name, int x, int y, int width, int height, int xGrid, int yGrid, int value, int mode, int spacing);
30
        
31
        void        setValue(int 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                mouseToPadId(ofxPoint2f point);
44
        
45
        int                mValue;
46
        int                mXGrid, mYGrid, mSpacing;
47
48
        int*        mBuffer;
49
        int                mBufferLength;
50
};
51
52
//        ----------------------------------------------------------------------------------------------------
53
54
#endif
55
56
//        ----------------------------------------------------------------------------------------------------