GREM 3.12.0
Game/Rendering Engine Modules for C++
Loading...
Searching...
No Matches
grem::events::Event Struct Reference

Data structure containing information about an event. More...

#include <GREM/events/Event.hpp>

Inheritance diagram for grem::events::Event:

Additional Inherited Members

Public Types inherited from grem::Variant< ApplicationQuitRequestedEvent, DisplayOrientationChangedEvent, DisplayAddedEvent, DisplayRemovedEvent, DisplayMovedEvent, DisplayDesktopModeChangedEvent, DisplayCurrentModeChangedEvent, DisplayContentScaleChangedEvent, DisplayUsableBoundsChangedEvent, WindowShownEvent, WindowHiddenEvent, WindowExposedEvent, WindowMovedEvent, WindowResizedEvent, WindowDrawableSizeChangedEvent, WindowMinimizedEvent, WindowMaximizedEvent, WindowRestoredEvent, WindowMouseFocusGainedEvent, WindowMouseFocusLostEvent, WindowKeyboardFocusGainedEvent, WindowKeyboardFocusLostEvent, WindowCloseRequestedEvent, WindowDisplayChangedEvent, WindowDisplayScaleChangedEvent, KeyPressedEvent, KeyPressRepeatedEvent, KeyReleasedEvent, TextInputEditedEvent, TextInputSubmittedEvent, MouseMovedEvent, MouseButtonPressedEvent, MouseButtonReleasedEvent, MouseWheelScrolledEvent, ControllerAddedEvent, ControllerRemovedEvent, ControllerRemappedEvent, ControllerAxisMovedEvent, ControllerButtonPressedEvent, ControllerButtonReleasedEvent, TouchMovedEvent, TouchPressedEvent, TouchReleasedEvent, PinchBeginEvent, PinchUpdateEvent, PinchEndEvent, KeymapChangedEvent, ClipboardUpdatedEvent, DroppedFileEvent, DroppedTextEvent, DropStartedEvent, DropCompletedEvent >
using index_type
 Index type used to encode the active alternative type.
Public Member Functions inherited from grem::Variant< ApplicationQuitRequestedEvent, DisplayOrientationChangedEvent, DisplayAddedEvent, DisplayRemovedEvent, DisplayMovedEvent, DisplayDesktopModeChangedEvent, DisplayCurrentModeChangedEvent, DisplayContentScaleChangedEvent, DisplayUsableBoundsChangedEvent, WindowShownEvent, WindowHiddenEvent, WindowExposedEvent, WindowMovedEvent, WindowResizedEvent, WindowDrawableSizeChangedEvent, WindowMinimizedEvent, WindowMaximizedEvent, WindowRestoredEvent, WindowMouseFocusGainedEvent, WindowMouseFocusLostEvent, WindowKeyboardFocusGainedEvent, WindowKeyboardFocusLostEvent, WindowCloseRequestedEvent, WindowDisplayChangedEvent, WindowDisplayScaleChangedEvent, KeyPressedEvent, KeyPressRepeatedEvent, KeyReleasedEvent, TextInputEditedEvent, TextInputSubmittedEvent, MouseMovedEvent, MouseButtonPressedEvent, MouseButtonReleasedEvent, MouseWheelScrolledEvent, ControllerAddedEvent, ControllerRemovedEvent, ControllerRemappedEvent, ControllerAxisMovedEvent, ControllerButtonPressedEvent, ControllerButtonReleasedEvent, TouchMovedEvent, TouchPressedEvent, TouchReleasedEvent, PinchBeginEvent, PinchUpdateEvent, PinchEndEvent, KeymapChangedEvent, ClipboardUpdatedEvent, DroppedFileEvent, DroppedTextEvent, DropStartedEvent, DropCompletedEvent >
constexpr ~Variant ()
 Destructor.
constexpr Variant & operator= (const Variant &other)=delete
 Deleted copy assignment.
constexpr T & emplace (Args &&... args)
 Construct an alternative given its type, destroying the old value.
constexpr void swap (Variant &other) noexcept(((std::is_nothrow_move_constructible_v< Ts > &&std::is_nothrow_swappable_v< Ts >) &&...))
 Swap this variant's value with that of another.
constexpr index_type index () const noexcept
 Get the alternative index of the currently active value held by the variant.
constexpr bool valueless_by_exception () const noexcept
 Check if the variant is in the valueless by exception state.
constexpr bool is () const noexcept
 Check if the variant currently holds the alternative with the given type.
constexpr T & as () &noexcept
 Access the underlying value with the given type without a safety check.
constexpr T & get () &
 Access the underlying value with the given type.
constexpr T * get_if () noexcept
 Access the underlying value with the given type if it is the currently active alternative.
Static Public Member Functions inherited from grem::Variant< ApplicationQuitRequestedEvent, DisplayOrientationChangedEvent, DisplayAddedEvent, DisplayRemovedEvent, DisplayMovedEvent, DisplayDesktopModeChangedEvent, DisplayCurrentModeChangedEvent, DisplayContentScaleChangedEvent, DisplayUsableBoundsChangedEvent, WindowShownEvent, WindowHiddenEvent, WindowExposedEvent, WindowMovedEvent, WindowResizedEvent, WindowDrawableSizeChangedEvent, WindowMinimizedEvent, WindowMaximizedEvent, WindowRestoredEvent, WindowMouseFocusGainedEvent, WindowMouseFocusLostEvent, WindowKeyboardFocusGainedEvent, WindowKeyboardFocusLostEvent, WindowCloseRequestedEvent, WindowDisplayChangedEvent, WindowDisplayScaleChangedEvent, KeyPressedEvent, KeyPressRepeatedEvent, KeyReleasedEvent, TextInputEditedEvent, TextInputSubmittedEvent, MouseMovedEvent, MouseButtonPressedEvent, MouseButtonReleasedEvent, MouseWheelScrolledEvent, ControllerAddedEvent, ControllerRemovedEvent, ControllerRemappedEvent, ControllerAxisMovedEvent, ControllerButtonPressedEvent, ControllerButtonReleasedEvent, TouchMovedEvent, TouchPressedEvent, TouchReleasedEvent, PinchBeginEvent, PinchUpdateEvent, PinchEndEvent, KeymapChangedEvent, ClipboardUpdatedEvent, DroppedFileEvent, DroppedTextEvent, DropStartedEvent, DropCompletedEvent >
static constexpr decltype(auto) visit (Visitor &&visitor, V &&variant)
 Call a visitor functor with the currently active underlying value of a variant.
static constexpr decltype(auto) visitIndex (index_type index, Visitor &&visitor)
 Call a visitor functor with the type corresponding to a variant index.
static constexpr decltype(auto) apply (Function &&function)
 Call a functor with all alternative types.
Static Public Attributes inherited from grem::Variant< ApplicationQuitRequestedEvent, DisplayOrientationChangedEvent, DisplayAddedEvent, DisplayRemovedEvent, DisplayMovedEvent, DisplayDesktopModeChangedEvent, DisplayCurrentModeChangedEvent, DisplayContentScaleChangedEvent, DisplayUsableBoundsChangedEvent, WindowShownEvent, WindowHiddenEvent, WindowExposedEvent, WindowMovedEvent, WindowResizedEvent, WindowDrawableSizeChangedEvent, WindowMinimizedEvent, WindowMaximizedEvent, WindowRestoredEvent, WindowMouseFocusGainedEvent, WindowMouseFocusLostEvent, WindowKeyboardFocusGainedEvent, WindowKeyboardFocusLostEvent, WindowCloseRequestedEvent, WindowDisplayChangedEvent, WindowDisplayScaleChangedEvent, KeyPressedEvent, KeyPressRepeatedEvent, KeyReleasedEvent, TextInputEditedEvent, TextInputSubmittedEvent, MouseMovedEvent, MouseButtonPressedEvent, MouseButtonReleasedEvent, MouseWheelScrolledEvent, ControllerAddedEvent, ControllerRemovedEvent, ControllerRemappedEvent, ControllerAxisMovedEvent, ControllerButtonPressedEvent, ControllerButtonReleasedEvent, TouchMovedEvent, TouchPressedEvent, TouchReleasedEvent, PinchBeginEvent, PinchUpdateEvent, PinchEndEvent, KeymapChangedEvent, ClipboardUpdatedEvent, DroppedFileEvent, DroppedTextEvent, DropStartedEvent, DropCompletedEvent >
static constexpr index_type npos
 Invalid alternative index, representing the valueless by exception state.

Detailed Description

Data structure containing information about an event.

Instances of this type are generated by an EventPump when certain events occur in the host environment, typically as a result of user input. These events can either be handled manually or be forwarded to subsystems such as an InputManager for processing.


The documentation for this struct was generated from the following file: