|
FifeGUI 0.2.0
A C++ GUI library designed for games.
|
#include <keyevent.hpp>
Public Types | |
| enum class | Type : std::uint8_t { Pressed = 0 , Released } |
Public Member Functions | |
| Key const & | getKey () const |
| Type | getType () const |
| bool | isNumericPad () const |
| KeyEvent (Widget *source, Widget *distributor, bool isShiftPressed, bool isControlPressed, bool isAltPressed, bool isMetaPressed, Type type, bool isNumericPad, Key const &key) | |
| Public Member Functions inherited from fcn::InputEvent | |
| void | consume () |
| Widget * | getDistributor () const |
| InputEvent (Widget *source, Widget *distributor, bool isShiftPressed, bool isControlPressed, bool isAltPressed, bool isMetaPressed) | |
| bool | isAltPressed () const |
| bool | isConsumed () const |
| bool | isControlPressed () const |
| bool | isMetaPressed () const |
| bool | isShiftPressed () const |
| Public Member Functions inherited from fcn::Event | |
| Event (Widget *source) | |
| Widget * | getSource () const |
Protected Attributes | |
| bool | mIsNumericPad |
| Key | mKey |
| Type | mType |
| Protected Attributes inherited from fcn::InputEvent | |
| bool | mAltPressed |
| bool | mControlPressed |
| Widget * | mDistributor |
| bool | mIsConsumed |
| bool | mMetaPressed |
| bool | mShiftPressed |
| Protected Attributes inherited from fcn::Event | |
| Widget * | mSource {nullptr} |
Represents a key event.
Definition at line 21 of file keyevent.hpp.
|
strong |
Key event types.
Definition at line 27 of file keyevent.hpp.
| fcn::KeyEvent::KeyEvent | ( | Widget * | source, |
| Widget * | distributor, | ||
| bool | isShiftPressed, | ||
| bool | isControlPressed, | ||
| bool | isAltPressed, | ||
| bool | isMetaPressed, | ||
| Type | type, | ||
| bool | isNumericPad, | ||
| Key const & | key ) |
Constructor.
| source | The widget the event concerns.. |
| distributor | The distributor of the event. |
| isShiftPressed | True if shift is pressed, false otherwise. |
| isControlPressed | True if control is pressed, false otherwise. |
| isAltPressed | True if alt is pressed, false otherwise. |
| isMetaPressed | True if meta is pressed, false otherwise. |
| type | The type of the event. A value from KeyEventType. |
| isNumericPad | True if the event occurred on the numeric pad, false otherwise. |
| key | The key of the event. |
Definition at line 12 of file keyevent.cpp.
References fcn::InputEvent::InputEvent(), fcn::InputEvent::isAltPressed(), fcn::InputEvent::isControlPressed(), fcn::InputEvent::isMetaPressed(), isNumericPad(), fcn::InputEvent::isShiftPressed(), mIsNumericPad, mKey, and mType.
| Key const & fcn::KeyEvent::getKey | ( | ) | const |
Gets the key of the event.
Definition at line 39 of file keyevent.cpp.
References mKey.
Referenced by fcn::Button::keyPressed(), fcn::CheckBox::keyPressed(), fcn::DropDown::keyPressed(), fcn::ListBox::keyPressed(), fcn::PasswordField::keyPressed(), fcn::Slider::keyPressed(), fcn::TabbedArea::keyPressed(), fcn::TextBox::keyPressed(), fcn::TextField::keyPressed(), fcn::Button::keyReleased(), fcn::CheckBox::keyReleased(), and fcn::ToggleButton::keyReleased().
| KeyEvent::Type fcn::KeyEvent::getType | ( | ) | const |
Gets the type of the event.
Definition at line 29 of file keyevent.cpp.
References mType.
Referenced by fcn::Gui::distributeKeyEvent(), and fcn::Gui::distributeKeyEventToGlobalKeyListeners().
| bool fcn::KeyEvent::isNumericPad | ( | ) | const |
Checks if the key event occurred on the numeric pad.
Definition at line 34 of file keyevent.cpp.
References mIsNumericPad.
Referenced by KeyEvent().
|
protected |
True if the numeric pad was used, false otherwise.
Definition at line 90 of file keyevent.hpp.
Referenced by isNumericPad(), and KeyEvent().
|
protected |
Holds the key of the key event.
Definition at line 95 of file keyevent.hpp.
Referenced by getKey(), and KeyEvent().
|
protected |
Holds the type of the key event.
Definition at line 85 of file keyevent.hpp.
Referenced by getType(), and KeyEvent().