|
stmm-games-doc
0.32.0
|
Event generated when scrolling the pointer. More...

Public Types | |
| enum | POINTER_SCROLL_DIR { SCROLL_UP = 1, SCROLL_DOWN = 2, SCROLL_LEFT = 3, SCROLL_RIGHT = 4 } |
| The direction of the scroll. More... | |
Public Types inherited from stmi::XYEvent | |
| enum | XY_GRAB_INPUT_TYPE { XY_HOVER = 0, XY_GRAB = 1, XY_MOVE = 2, XY_UNGRAB = 3, XY_UNGRAB_CANCEL = 4 } |
| The type of grab the event represents. More... | |
Public Types inherited from stmi::Event | |
| enum | AS_KEY_INPUT_TYPE { AS_KEY_PRESS = 1, AS_KEY_RELEASE = 2, AS_KEY_RELEASE_CANCEL = 3 } |
| Key simulation type. More... | |
Public Member Functions | |
| PointerScrollEvent (int64_t nTimeUsec, const shared_ptr< Accessor > &refAccessor, const shared_ptr< PointerCapability > &refPointerCapability, POINTER_SCROLL_DIR eScrollDir, double fX, double fY, bool bAnyButtonPressed) noexcept | |
| Constructor. More... | |
| POINTER_SCROLL_DIR | getScrollDir () const noexcept |
| The direction of the scroll. More... | |
| shared_ptr< PointerCapability > | getPointerCapability () const noexcept |
| The pointer capability that generated the event. More... | |
| shared_ptr< Capability > | getCapability () const noexcept override |
| Returns the capability that generated this event. More... | |
| bool | getAsKey (HARDWARE_KEY &eKey, AS_KEY_INPUT_TYPE &eType, bool &bMoreThanOne) const noexcept override |
| The first (press) of two simulated key actions (press and release). More... | |
| std::vector< std::pair< HARDWARE_KEY, AS_KEY_INPUT_TYPE > > | getAsKeys () const noexcept override |
| The simulated keys (press and release). More... | |
Public Member Functions inherited from stmi::XYEvent | |
| double | getX () const noexcept |
| The main X coordinate. More... | |
| double | getY () const noexcept |
| The main Y coordinate. More... | |
| bool | getIsModified () const noexcept |
| Whether the event coordinates were modified. More... | |
| XY_GRAB_INPUT_TYPE | getXYGrabType () const noexcept |
| Get the grab type of the event. More... | |
| int64_t | getXYGrabId () const noexcept |
| Identifies what is grabbed. More... | |
| virtual void | translateXY (double fDX, double fDY) noexcept |
| Translates the xy coordinates. More... | |
| virtual void | scaleXY (double fSX, double fSY) noexcept |
| Scales the xy coordinates. More... | |
Public Member Functions inherited from stmi::Event | |
| virtual | ~Event () noexcept=default |
| int64_t | getTimeUsec () const noexcept |
| Returns the time this event originated. More... | |
| int32_t | getCapabilityId () const noexcept |
| Returns the id of the capability that generated this event. More... | |
| const shared_ptr< Accessor > & | getAccessor () const noexcept |
| Returns the accessor that helped generate this event. More... | |
| const Class & | getEventClass () const noexcept |
| Get the registered class of the event instance. More... | |
Static Public Member Functions | |
| static const Event::Class & | getClass () noexcept |
Static Public Member Functions inherited from stmi::Event | |
| static bool | isEventClassIdRegistered (const std::string &sEventClassId) noexcept |
| Tells whether the given event class id is registered. More... | |
| static Class | getEventClassIdClass (const std::string &sEventClassId) noexcept |
| Gets the event class with given class id. More... | |
Static Public Attributes | |
| static const char *const | s_sClassId |
Protected Member Functions | |
| void | setPointerScroll (POINTER_SCROLL_DIR eScrollDir, bool bAnyButtonPressed) noexcept |
| Sets scroll and grab fields. More... | |
| void | setPointerCapability (const shared_ptr< PointerCapability > &refPointerCapability) noexcept |
| Sets the capability. More... | |
Protected Member Functions inherited from stmi::XYEvent | |
| XYEvent (const Class &oClass, int64_t nTimeUsec, int32_t nCapabilityId, const shared_ptr< Accessor > &refAccessor, double fX, double fY) noexcept | |
| Constructor without grab info. More... | |
| XYEvent (const Class &oClass, int64_t nTimeUsec, int32_t nCapabilityId, const shared_ptr< Accessor > &refAccessor, double fX, double fY, XY_GRAB_INPUT_TYPE eXYGrabType, int64_t nGrabId) noexcept | |
| Constructor. More... | |
| void | setX (double fX) noexcept |
| Sets X. More... | |
| void | setY (double fY) noexcept |
| Sets Y. More... | |
| void | setIsModified (bool bIsModified) noexcept |
| Sets the modified flag. More... | |
| void | setXYGrab (XY_GRAB_INPUT_TYPE eXYGrabType, int64_t nGrabId) noexcept |
| Sets the grab type and id. More... | |
Protected Member Functions inherited from stmi::Event | |
| Event (const Class &oClass, int64_t nTimeUsec, int32_t nCapabilityId, const shared_ptr< Accessor > &refAccessor) noexcept | |
| Constructor to be called from subclasses. More... | |
| Event (const Class &oClass, int64_t nTimeUsec, int32_t nCapabilityId) noexcept | |
| Constructor to be called from subclasses (with empty accessor). More... | |
| void | setTimeUsec (int64_t nTimeUsec) noexcept |
| Set the event time. More... | |
| void | setCapabilityId (int32_t nCapabilityId) noexcept |
| Set the capability id. More... | |
| void | setAccessor (const shared_ptr< Accessor > &refAccessor) noexcept |
| Set the accessor. More... | |
Additional Inherited Members | |
Static Protected Member Functions inherited from stmi::Event | |
| static bool | isEventTypeRegistered (const std::type_info &oEventType) noexcept |
| Tells whether an event type was registered. More... | |
| static const std::type_info & | getEventClassIdType (const std::string &sEventClassId, bool &bRegistered) noexcept |
| Gets the type of the registered event subclass associated with class id. More... | |
| static std::string | getEventTypeClassId (const std::type_info &oType) noexcept |
| Gets the class id of the given type. More... | |
Event generated when scrolling the pointer.
Note that the reference to the capability that generated this event is weak.
|
noexcept |
Constructor.
Parameter bAnyButtonPressed is used to determine the current grab state.
| nTimeUsec | Time from epoch in microseconds. |
| refAccessor | The accessor used to generate the event. Can be null. |
| refPointerCapability | The capability that generated this event. Cannot be null. |
| eScrollDir | The direction of the scroll. |
| fX | The X position of the pointer. |
| fY | The Y position of the pointer. |
| bAnyButtonPressed | Whether any button is pressed. |
|
overridevirtualnoexcept |
The first (press) of two simulated key actions (press and release).
To get both actions call getAsKeys(). The simulated keys are stmi::HK_SCROLLUP, stmi::HK_SCROLLDOWN, stmi::HK_X_SCROLL_LEFT, stmi::HK_X_SCROLL_RIGHT.
| eKey | The key that is simulated by this event. |
| eType | Always AS_KEY_PRESS. |
| bMoreThanOne | Always true |
true. Reimplemented from stmi::Event.
|
overridevirtualnoexcept |
The simulated keys (press and release).
The returned vector is vector{ pair(key, AS_KEY_PRESS), pair(key, AS_KEY_RELEASE) }.
Reimplemented from stmi::Event.
|
inlineoverridevirtualnoexcept |
Returns the capability that generated this event.
The Event subclass implementation keeps only a weak_ptr on the capability to avoid reference cycles.
Implements stmi::Event.
|
inlinestaticnoexcept |
|
inlinenoexcept |
The pointer capability that generated the event.
|
inlinenoexcept |
The direction of the scroll.
|
inlineprotectednoexcept |
Sets the capability.
| refPointerCapability | The capability that generated this event. Cannot be null. |
|
protectednoexcept |
Sets scroll and grab fields.
This method also calls XYEvent::setXYGrab().
| eScrollDir | The direction of the scroll. |
| bAnyButtonPressed | Whether any button is pressed. |
|
static |
1.8.13