diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-03-07 17:06:23 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-03-07 17:06:23 +0300 |
commit | a225638721d2bba53c15379d48ddab04d7568e24 (patch) | |
tree | 1c357290f2525a247a40fb5a887fddfe0728768d /src/events | |
parent | d2b06398ce43e1ad46078571b41d05df7c1d344b (diff) | |
download | manaplus-a225638721d2bba53c15379d48ddab04d7568e24.tar.gz manaplus-a225638721d2bba53c15379d48ddab04d7568e24.tar.bz2 manaplus-a225638721d2bba53c15379d48ddab04d7568e24.tar.xz manaplus-a225638721d2bba53c15379d48ddab04d7568e24.zip |
Remove unused events flags.
Diffstat (limited to 'src/events')
-rw-r--r-- | src/events/inputguievent.h | 69 | ||||
-rw-r--r-- | src/events/keyevent.h | 34 | ||||
-rw-r--r-- | src/events/mouseevent.h | 14 |
3 files changed, 4 insertions, 113 deletions
diff --git a/src/events/inputguievent.h b/src/events/inputguievent.h index 2e5136ea2..dbd2593d7 100644 --- a/src/events/inputguievent.h +++ b/src/events/inputguievent.h @@ -79,61 +79,14 @@ class InputGuiEvent: public Event * Constructor. * * @param source The source widget of the event. - * @param isShiftPressed True if shift is pressed, false otherwise. - * @param isControlPressed True if control is pressed, false otherwise. - * @param isAltPressed True if alt is pressed, false otherwise. * @param isMetaPressed True if meta is pressed, false otherwise. */ - InputGuiEvent(Widget *const source, - const bool shiftPressed, - const bool controlPressed, - const bool altPressed, - const bool metaPressed) : + InputGuiEvent(Widget *const source) : Event(source), - mShiftPressed(shiftPressed), - mControlPressed(controlPressed), - mAltPressed(altPressed), - mMetaPressed(metaPressed), mIsConsumed(false) { } /** - * Checks if shift is pressed. - * - * @return True if shift was pressed at the same time as the key, - * false otherwise. - */ - bool isShiftPressed() const A_WARN_UNUSED - { return mShiftPressed; } - - /** - * Checks if control is pressed. - * - * @return True if control was pressed at the same time as the key, - * false otherwise. - */ - bool isControlPressed() const A_WARN_UNUSED - { return mControlPressed; } - - /** - * Checks if alt is pressed. - * - * @return True if alt was pressed at the same time as the key, - * false otherwise. - */ - bool isAltPressed() const A_WARN_UNUSED - { return mAltPressed; } - - /** - * Checks whether meta is pressed. - * - * @return True if meta was pressed at the same time as the key, - * false otherwise. - */ - bool isMetaPressed() const A_WARN_UNUSED - { return mMetaPressed; } - - /** * Marks the event as consumed. Input event listeners may discard * consumed input or act on consumed input. An example of a widget * that discards consumed input is the ScrollArea widget that @@ -158,26 +111,6 @@ class InputGuiEvent: public Event protected: /** - * True if shift is pressed, false otherwise. - */ - bool mShiftPressed; - - /** - * True if control is pressed, false otherwise. - */ - bool mControlPressed; - - /** - * True if alt is pressed, false otherwise. - */ - bool mAltPressed; - - /** - * True if meta is pressed, false otherwise. - */ - bool mMetaPressed; - - /** * True if the input event is consumed, * false otherwise. */ diff --git a/src/events/keyevent.h b/src/events/keyevent.h index 360d229d7..16bc707c1 100644 --- a/src/events/keyevent.h +++ b/src/events/keyevent.h @@ -90,36 +90,21 @@ class KeyEvent: public InputGuiEvent * Constructor. * * @param source The source widget of the event. - * @param shiftPressed True if shift is pressed, false otherwise. - * @param controlPressed True if control is pressed, false otherwise. - * @param altPressed True if alt is pressed, false otherwise. - * @param metaPressed True if meta is pressed, false otherwise. * @param type The type of the event. A value from KeyEventType. - * @param numericPad True if the event occured on the numeric pad, * false otherwise. * @param key The key of the event. */ KeyEvent(Widget *const source, - const bool shiftPressed, - const bool controlPressed, - const bool altPressed, - const bool metaPressed, const unsigned int type, - const bool numericPad, const int actionId, const Key &key) : - InputGuiEvent(source, - shiftPressed, - controlPressed, - altPressed, - metaPressed), + InputGuiEvent(source), mKey(key), #ifdef USE_SDL2 mText(), #endif mType(type), - mActionId(actionId), - mIsNumericPad(numericPad) + mActionId(actionId) { } /** @@ -137,16 +122,6 @@ class KeyEvent: public InputGuiEvent { return mType; } /** - * Checks if the key event occured on the numeric pad. - * - * @return True if key event occured on the numeric pad, - * false otherwise. - * - */ - bool isNumericPad() const A_WARN_UNUSED - { return mIsNumericPad; } - - /** * Gets the key of the event. * * @return The key of the event. @@ -181,11 +156,6 @@ class KeyEvent: public InputGuiEvent unsigned int mType; int mActionId; - - /** - * True if the numeric pad was used, false otherwise. - */ - bool mIsNumericPad; }; #endif // EVENTS_KEYEVENT_H diff --git a/src/events/mouseevent.h b/src/events/mouseevent.h index 8ef65cca4..06b51e82a 100644 --- a/src/events/mouseevent.h +++ b/src/events/mouseevent.h @@ -86,10 +86,6 @@ class MouseEvent: public InputGuiEvent * Constructor. * * @param source The source widget of the mouse event. - * @param shiftPressed True if shift is pressed, false otherwise. - * @param controlPressed True if control is pressed, false otherwise. - * @param altPressed True if alt is pressed, false otherwise. - * @param metaPressed True if meta is pressed, false otherwise. * @param type The type of the mouse event. * @param button The button of the mouse event. * @param x The x coordinate of the event relative to the source widget. @@ -98,20 +94,12 @@ class MouseEvent: public InputGuiEvent * It's set to zero if another button is used. */ MouseEvent(Widget *const source, - const bool shiftPressed, - const bool controlPressed, - const bool altPressed, - const bool metaPressed, const unsigned int type, const unsigned int button, const int x, const int y, const int clickCount) : - InputGuiEvent(source, - shiftPressed, - controlPressed, - altPressed, - metaPressed), + InputGuiEvent(source), mType(type), mButton(button), mX(x), |