CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CeresEngine::AnyUIEvent Class Reference

A variant type that can hold any UIEvent. More...

#include <CeresEngine/UI/UIEvent.hpp>

Inheritance diagram for CeresEngine::AnyUIEvent:
CeresEngine::Variant< UIKeyEvent, UIMouseEvent >

Public Member Functions

bool isKeyEvent () const noexcept
 Checks if the event is a UIKeyEvent.
 
const UIKeyEventasKeyEvent () const noexcept
 Gets the event as a UIKeyEvent.
 
UIKeyEventasKeyEvent () noexcept
 Gets the event as a UIKeyEvent.
 
bool isMouseEvent () const noexcept
 Checks if the event is a UIMouseEvent.
 
const UIMouseEventasMouseEvent () const noexcept
 Gets the event as a UIMouseEvent.
 
UIMouseEventasMouseEvent () noexcept
 Gets the event as a UIMouseEvent.
 
- Public Member Functions inherited from CeresEngine::Variant< UIKeyEvent, UIMouseEvent >
constexpr std::size_t getIndex () const noexcept
 
constexpr bool is () const noexcept
 
constexpr T & as () &
 
constexpr T && as () &&
 
constexpr const T & as () const &
 
constexpr const T && as () const &&
 
constexpr std::add_pointer_t< T > asIf () noexcept
 
constexpr std::add_pointer_t< const T > asIf () const noexcept
 
constexpr decltype(auto) visit (Visitor &&visitor) &
 
constexpr decltype(auto) visit (Visitor &&visitor) &&
 
constexpr decltype(auto) visit (Visitor &&visitor) const &
 
constexpr decltype(auto) visit (Visitor &&visitor) const &&
 

Private Types

using super = Variant< UIKeyEvent, UIMouseEvent >
 

Detailed Description

A variant type that can hold any UIEvent.

Member Typedef Documentation

◆ super

Member Function Documentation

◆ asKeyEvent() [1/2]

const UIKeyEvent & CeresEngine::AnyUIEvent::asKeyEvent ( ) const
inlinenoexcept

Gets the event as a UIKeyEvent.

◆ asKeyEvent() [2/2]

UIKeyEvent & CeresEngine::AnyUIEvent::asKeyEvent ( )
inlinenoexcept

Gets the event as a UIKeyEvent.

◆ asMouseEvent() [1/2]

const UIMouseEvent & CeresEngine::AnyUIEvent::asMouseEvent ( ) const
inlinenoexcept

Gets the event as a UIMouseEvent.

◆ asMouseEvent() [2/2]

UIMouseEvent & CeresEngine::AnyUIEvent::asMouseEvent ( )
inlinenoexcept

Gets the event as a UIMouseEvent.

◆ isKeyEvent()

bool CeresEngine::AnyUIEvent::isKeyEvent ( ) const
inlinenoexcept

Checks if the event is a UIKeyEvent.

◆ isMouseEvent()

bool CeresEngine::AnyUIEvent::isMouseEvent ( ) const
inlinenoexcept

Checks if the event is a UIMouseEvent.


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