Revision 67 ofxTouchAPI_IO.h
| ofxTouchAPI_IO.h (revision 67) | ||
|---|---|---|
| 1 | 1 |
/*********************************************************************** |
| 2 | 2 |
|
| 3 |
Copyright (c) 2009 Dimitri Diakopoulos, http://www.dimitridiakopoulos.com/ |
|
| 4 |
=== Google Summer of Code 2009 - NUI Group === |
|
| 3 |
Copyright (c) 2009, 2010 Dimitri Diakopoulos, http://www.dimitridiakopoulos.com/ |
|
| 5 | 4 |
|
| 6 |
Portions Copyright (c) 2008, 2009 Memo Atkens, http://www.memo.tv/ |
|
| 5 |
|
|
| 6 |
Portions Copyright (c) 2008, 2009 Memo Aktens, http://www.memo.tv/ |
|
| 7 | 7 |
-> Based on ofxMSAInteractiveObject |
| 8 | 8 |
|
| 9 | 9 |
Redistribution and use in source and binary forms, with or without modification, |
| ... | ... | |
| 36 | 36 |
|
| 37 | 37 |
#include "ofMain.h" |
| 38 | 38 |
#include "ofxTouchAPI.h" |
| 39 |
#include "StateManager.h" |
|
| 39 | 40 |
|
| 40 | 41 |
class ofxTouchAPI_IO : public ofRectangle {
|
| 41 | 42 |
|
| ... | ... | |
| 51 | 52 |
void enableAllEvents(); // enable all event callbacks (default) |
| 52 | 53 |
void disableAllEvents(); // disable all event callbacks |
| 53 | 54 |
|
| 55 |
void enableAllInput(); // ... |
|
| 56 |
void disableAllInput(); // ... |
|
| 57 |
|
|
| 54 | 58 |
void enableMouseEvents(); // call this if object should receive mouse events |
| 55 | 59 |
void disableMouseEvents(); // call this if object doesn't need to receive mouse events |
| 56 | 60 |
|
| ... | ... | |
| 97 | 101 |
virtual void onRelease(int x, int y, int button) {} // called when mouse releases while over object
|
| 98 | 102 |
virtual void onReleaseOutside(int x, int y, int button) {} // called when mouse releases outside of object after being pressed on object
|
| 99 | 103 |
|
| 104 |
virtual void focusActive() {} // called when all input is disabled but we still want to focus the control
|
|
| 105 |
|
|
| 106 |
|
|
| 100 | 107 |
// ================================================================= Key States |
| 101 | 108 |
virtual void keyPressed(int key) {}
|
| 102 | 109 |
virtual void keyReleased(int key) {}
|
| ... | ... | |
| 115 | 122 |
void _draw(ofEventArgs &e); |
| 116 | 123 |
void _exit(ofEventArgs &e); |
| 117 | 124 |
|
| 125 |
void _focusActive(ofMouseEventArgs &e); |
|
| 126 |
|
|
| 118 | 127 |
void _mouseMoved(ofMouseEventArgs &e); |
| 119 | 128 |
void _mousePressed(ofMouseEventArgs &e); |
| 120 | 129 |
void _mouseDragged(ofMouseEventArgs &e); |
Also available in: Unified diff
