|
Robot Devastation
|
Allows to simulate input from a user programatically (mainly for test purposes)
#include <MockInputManager.hpp>
Public Member Functions | |
| bool | sendKeyPress (const Key &key) |
| bool | sendKeyUp (const Key &key) |
| bool | sendKeyDown (const Key &key) |
| bool | sendWindowEvent (const WindowEvent &event) |
| virtual bool | start () |
| Start to capture input events. More... | |
| virtual bool | stop () |
| Stop capturing input events. | |
| virtual bool | isStopped () const |
| True if the manager is not active. | |
| int | getNumListeners () |
Public Member Functions inherited from rd::InputManager | |
| bool | addInputEventListener (InputEventListener *listener) |
| Adds a InputEventListener to the list of observers to be notified of events. | |
| bool | removeInputEventListeners () |
| Unregisters all the InputEventListener stored. | |
| virtual bool | configure (const std::string ¶meter, const std::string &value) |
| Configures a parameter with a value. | |
| virtual bool | refreshEvents () |
| Get system info about input events. | |
Static Public Member Functions | |
| static bool | RegisterManager () |
| Register this manager in the InputManager registry so that can be used. More... | |
Static Public Member Functions inherited from rd::InputManager | |
| static InputManager * | getInputManager () |
| Get a reference to the InputManager. More... | |
| static InputManager * | getInputManager (const std::string &id) |
| Get a reference to the InputManager. More... | |
| static bool | destroyInputManager () |
| Deallocate all the registered InputManager. | |
Static Public Attributes | |
| static const std::string | id = "MOCK" |
| String that identifies this manager. | |
Private Member Functions | |
| MockInputManager () | |
| Constructor. More... | |
| MockInputManager (const MockInputManager &) | |
| MockInputManager & | operator= (const MockInputManager &) |
Private Attributes | |
| bool | stopped |
Static Private Attributes | |
| static MockInputManager * | uniqueInstance = NULL |
| Reference to this manager (unique instance) | |
Additional Inherited Members | |
Static Protected Member Functions inherited from rd::InputManager | |
| static bool | Register (InputManager *manager, const std::string &id) |
| This function allows subclasses to install their unique instances in the singleton register to be selected later by the user. | |
Protected Attributes inherited from rd::InputManager | |
| std::vector< InputEventListener * > | listeners |
| Observers registered to be notified of input events. | |
|
private |
Constructor for this class is private, since the singleton can only be instantiated once, and the instantiation is done at the RegisterManager() method.
|
static |
It ensures that only one manager of this type is created (unique instance).
|
virtual |
This function is supposed to be called after InputManager configuration.
Implements rd::InputManager.
1.8.17