#include <archon/util/mouse.H>
Inheritance diagram for Archon::Utilities::MouseEvents::Dispatcher:
Public Member Functions | |
Dispatcher (unsigned numberOfButtons=3, unsigned numberOfModes=1, unsigned maxMulticlickLimit=1, unsigned long multiclickMaxDelay=200) | |
'multiclickMaxDelay' is mesured in milliseconds and is the maximum delay between two successive clicks on the same mouse button for the second click to belong to the same multiclick sequence as the first click. | |
virtual | ~Dispatcher () |
void | setMulticlickLimit (unsigned button, unsigned limit) |
'limit' must not be greater than 'maxMulticlickLimit' | |
void | setButtonHandler (unsigned button, ButtonHandler *, unsigned mode=0, unsigned multiclickCardinality=1) |
void | setMotionHandler (MotionHandler *, unsigned mode=0) |
void | setMode (unsigned) |
unsigned | getMode () const |
Classes | |
struct | ButtonAccount |
To deal with the need for changing the meaning of mouse buttons according to the mode or context of the application, you may initially configure a set of modes. Then at any time you may change the mode of the dispacher, efectively substituting the meanings of all the buttons with new ones. This is similar in spirit to the well known idea of changing the meaning of the keys of the keyboard by pressing the shift key.
Multiple clicks on a button:
The phrase 'multiclick' is in this context used to describe a sequence of rapid clicks on the same button. That is, you may assign a special handler for the event of eg. a double click on the left mouse button. Note however, that you cannot completely discriminate between single and bouble clicks on some button. You will always get the single-click-handler called upon the first click. Then if a second click is encountered within the maximum allowed period your double-click-handler will be called.
Definition at line 217 of file mouse.H.