|
FifeGUI 0.3.0
A C++ GUI library designed for games.
|
#include <genericinput.hpp>
Public Member Functions | |
| void | _pollInput () override |
| KeyInput | dequeueKeyInput () override |
| MouseInput | dequeueMouseInput () override |
| bool | isKeyQueueEmpty () override |
| bool | isMouseQueueEmpty () override |
| void | pushKeyPressed (int unicode) |
| void | pushKeyReleased (int unicode) |
| void | pushMouseButtonPressed (int x, int y, int button) |
| void | pushMouseButtonReleased (int x, int y, int button) |
| void | pushMouseMoved (int x, int y) |
| void | pushMouseWheelMovedDown (int x, int y) |
| void | pushMouseWheelMovedLeft (int x, int y) |
| void | pushMouseWheelMovedRight (int x, int y) |
| void | pushMouseWheelMovedUp (int x, int y) |
| Public Member Functions inherited from fcn::Input | |
| virtual std::string | dequeueTextInput () |
| Input (Input &&)=delete | |
| Input (Input const &)=delete | |
| virtual bool | isTextQueueEmpty () |
| Input & | operator= (Input &&)=delete |
| Input & | operator= (Input const &)=delete |
Protected Attributes | |
| std::queue< KeyInput > | mKeyInputQueue |
| std::queue< MouseInput > | mMouseInputQueue |
A generic input implementation usable with various backends.
Definition at line 25 of file genericinput.hpp.
|
overridevirtual |
Polls all existing input.
Called when input should be polled.
Implements fcn::Input.
Definition at line 148 of file genericinput.cpp.
|
overridevirtual |
Dequeues the key input queue.
Implements fcn::Input.
Definition at line 115 of file genericinput.cpp.
References mKeyInputQueue, and fcn::throwException().
|
overridevirtual |
Dequeues the mouse input queue.
Implements fcn::Input.
Definition at line 134 of file genericinput.cpp.
References mMouseInputQueue, and fcn::throwException().
|
overridevirtual |
Checks if the key queue is empty, or not.
Implements fcn::Input.
Definition at line 110 of file genericinput.cpp.
References mKeyInputQueue.
|
overridevirtual |
Checks if the mouse queue is empyt, or not.
Implements fcn::Input.
Definition at line 129 of file genericinput.cpp.
References mMouseInputQueue.
| void fcn::GenericInput::pushKeyPressed | ( | int | unicode | ) |
Pushes a key pressed event.
| unicode | The unicode value of the key. |
Definition at line 20 of file genericinput.cpp.
References mKeyInputQueue, fcn::KeyInput::setKey(), and fcn::KeyInput::setType().
| void fcn::GenericInput::pushKeyReleased | ( | int | unicode | ) |
Pushes a key released event.
| unicode | The unicode value of the key. |
Definition at line 29 of file genericinput.cpp.
References mKeyInputQueue, fcn::KeyInput::setKey(), and fcn::KeyInput::setType().
| void fcn::GenericInput::pushMouseButtonPressed | ( | int | x, |
| int | y, | ||
| int | button ) |
Pushes a mouse button pressed event.
| x | The x coordinate of the mouse event. |
| y | The y coordinate of the mouse event. |
| button | The button of the mouse event. |
Definition at line 38 of file genericinput.cpp.
References mMouseInputQueue, fcn::MouseInput::setButton(), fcn::MouseInput::setType(), fcn::MouseInput::setX(), and fcn::MouseInput::setY().
| void fcn::GenericInput::pushMouseButtonReleased | ( | int | x, |
| int | y, | ||
| int | button ) |
Pushes a mouse button released event.
| x | The x coordinate of the mouse event. |
| y | The y coordinate of the mouse event. |
| button | The button of the mouse event. |
Definition at line 49 of file genericinput.cpp.
References mMouseInputQueue, fcn::MouseInput::setButton(), fcn::MouseInput::setType(), fcn::MouseInput::setX(), and fcn::MouseInput::setY().
| void fcn::GenericInput::pushMouseMoved | ( | int | x, |
| int | y ) |
Pushes a mouse moved event.
| x | The x coordinate of the mouse event. |
| y | The y coordinate of the mouse event. |
Definition at line 100 of file genericinput.cpp.
References mMouseInputQueue, fcn::MouseInput::setType(), fcn::MouseInput::setX(), and fcn::MouseInput::setY().
| void fcn::GenericInput::pushMouseWheelMovedDown | ( | int | x, |
| int | y ) |
Pushes a mouse wheel moved down event.
| x | The x coordinate of the mouse event. |
| y | The y coordinate of the mouse event. |
Definition at line 70 of file genericinput.cpp.
References mMouseInputQueue, fcn::MouseInput::setType(), fcn::MouseInput::setX(), and fcn::MouseInput::setY().
| void fcn::GenericInput::pushMouseWheelMovedLeft | ( | int | x, |
| int | y ) |
Pushes a mouse wheel moved left event.
| x | The x coordinate of the mouse event. |
| y | The y coordinate of the mouse event. |
Definition at line 90 of file genericinput.cpp.
References mMouseInputQueue, fcn::MouseInput::setType(), fcn::MouseInput::setX(), and fcn::MouseInput::setY().
| void fcn::GenericInput::pushMouseWheelMovedRight | ( | int | x, |
| int | y ) |
Pushes a mouse wheel moved right event.
| x | The x coordinate of the mouse event. |
| y | The y coordinate of the mouse event. |
Definition at line 80 of file genericinput.cpp.
References mMouseInputQueue, fcn::MouseInput::setType(), fcn::MouseInput::setX(), and fcn::MouseInput::setY().
| void fcn::GenericInput::pushMouseWheelMovedUp | ( | int | x, |
| int | y ) |
Pushes a mouse wheel moved up event.
| x | The x coordinate of the mouse event. |
| y | The y coordinate of the mouse event. |
Definition at line 60 of file genericinput.cpp.
References mMouseInputQueue, fcn::MouseInput::setType(), fcn::MouseInput::setX(), and fcn::MouseInput::setY().
|
protected |
Holds the key input queue.
Definition at line 128 of file genericinput.hpp.
Referenced by dequeueKeyInput(), isKeyQueueEmpty(), pushKeyPressed(), and pushKeyReleased().
|
protected |
Holds the mouse input queue.
Definition at line 133 of file genericinput.hpp.
Referenced by dequeueMouseInput(), isMouseQueueEmpty(), pushMouseButtonPressed(), pushMouseButtonReleased(), pushMouseMoved(), pushMouseWheelMovedDown(), pushMouseWheelMovedLeft(), pushMouseWheelMovedRight(), and pushMouseWheelMovedUp().