root / trunk / tbeta / Windows / addons / ofxNCore / src / Controls / ofxGuiScope.h @ 139
View | Annotate | Download (1.4 KB)
| 1 | /*
|
|---|---|
| 2 | * ofxGuiScope.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_SCOPE
|
| 13 | #define OFX_GUI_SCOPE
|
| 14 | |
| 15 | // ----------------------------------------------------------------------------------------------------
|
| 16 | |
| 17 | #include "ofxGuiTypes.h" |
| 18 | #include "ofxGuiObject.h" |
| 19 | |
| 20 | // ----------------------------------------------------------------------------------------------------
|
| 21 | |
| 22 | class ofxGuiScope : public ofxGuiObject |
| 23 | {
|
| 24 | |
| 25 | public:
|
| 26 | |
| 27 | ofxGuiScope(); |
| 28 | ~ofxGuiScope(); |
| 29 | |
| 30 | void init(int id, string name, int x, int y, int width, int height, int length, ofxPoint2f value, int mode); |
| 31 | |
| 32 | void setValue(ofxPoint2f value);
|
| 33 | |
| 34 | bool update(int id, int task, void* data, int length); |
| 35 | void draw();
|
| 36 | |
| 37 | bool mouseDragged(int x, int y, int button); |
| 38 | bool mousePressed(int x, int y, int button); |
| 39 | bool mouseReleased(int x, int y, int button); |
| 40 | |
| 41 | void buildFromXml();
|
| 42 | void saveToXml();
|
| 43 | |
| 44 | ofxPoint2f valueToFraction(ofxPoint2f value); |
| 45 | ofxPoint2f fractionToValue(ofxPoint2f fraction); |
| 46 | |
| 47 | ofxPoint2f mValue; |
| 48 | |
| 49 | float* mBuffer;
|
| 50 | int mBufferLength;
|
| 51 | }; |
| 52 | |
| 53 | // ----------------------------------------------------------------------------------------------------
|
| 54 | |
| 55 | #endif
|
| 56 | |
| 57 | // ----------------------------------------------------------------------------------------------------
|
