|
FifeGUI 0.2.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 | |
| Input (Input &&)=delete | |
| Input (Input const &)=delete | |
| 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 24 of file genericinput.hpp.
|
overridevirtual |
Polls all exsisting input.
Called when input should be polled. The function exists for compatibility reason where some libraries need to poll input at a certain logic rate.
Implements fcn::Input.
Definition at line 135 of file genericinput.cpp.
|
overridevirtual |
Dequeues the key input queue.
Implements fcn::Input.
Definition at line 102 of file genericinput.cpp.
References mKeyInputQueue.
|
overridevirtual |
Dequeues the mouse input queue.
Implements fcn::Input.
Definition at line 121 of file genericinput.cpp.
References mMouseInputQueue.
|
overridevirtual |
Checks if the key queue is empty, or not.
Implements fcn::Input.
Definition at line 97 of file genericinput.cpp.
References mKeyInputQueue.
|
overridevirtual |
Checks if the mouse queue is empyt, or not.
Implements fcn::Input.
Definition at line 116 of file genericinput.cpp.
References mMouseInputQueue.
| void fcn::GenericInput::pushKeyPressed | ( | int | unicode | ) |
Pushes a key pressed event.
NOTE: If a special key is pressed, like the F1 key, the corresponding GUI key value found in the enum in Key should be pushed as the unicode value.
| unicode | The unicode value of the key. |
Definition at line 15 of file genericinput.cpp.
| void fcn::GenericInput::pushKeyReleased | ( | int | unicode | ) |
Pushes a key released event.
NOTE: If a special key is pressed, like the F1 key, the corresponding GUI key value found in the enum in Key should be pushed as the unicode value.
| unicode | The unicode value of the key. |
Definition at line 20 of file genericinput.cpp.
| 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 25 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 36 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 87 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 57 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 77 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 67 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 47 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 127 of file genericinput.hpp.
Referenced by dequeueKeyInput(), and isKeyQueueEmpty().
|
protected |
Holds the mouse input queue.
Definition at line 132 of file genericinput.hpp.
Referenced by dequeueMouseInput(), isMouseQueueEmpty(), pushMouseButtonPressed(), pushMouseButtonReleased(), pushMouseMoved(), pushMouseWheelMovedDown(), pushMouseWheelMovedLeft(), pushMouseWheelMovedRight(), and pushMouseWheelMovedUp().