ReXGlue SDK
Loading...
Searching...
No Matches
rex::ui::UIEvent Class Reference

#include <rex/ui/ui_event.h>

Inheritance diagram for rex::ui::UIEvent:
[legend]

Public Types

enum class  Type : u8 {
  kOpened , kDPIChanged , kMonitorUpdate , kMinimized ,
  kRestored , kClosing , kFileDrop , kResize ,
  kClose , kFocus , kTouch
}

Public Member Functions

 UIEvent (Type type)
Type GetType () const
template<typename T>
const T * As () const

Detailed Description

Base of every window event.

Member Enumeration Documentation

◆ Type

enum class rex::ui::UIEvent::Type : u8
strong
Enumerator
kOpened 

The window opened. UISetupEvent.

kDPIChanged 

The window's DPI changed. UISetupEvent.

kMonitorUpdate 

The window's monitor changed. MonitorUpdateEvent.

kMinimized 

The window was minimized. No data.

kRestored 

The window was restored. No data.

kClosing 

The window is closing after the close was accepted. No data.

kFileDrop 

A file was moved onto the window. FileDropEvent.

kResize 

The client area changed size. UISetupEvent.

kClose 

The user asked to close the window. No data.

kFocus 

The window gained or lost focus. UISetupEvent.

kTouch 

A touch point changed. TouchEvent.

Member Function Documentation

◆ As()

template<typename T>
const T * rex::ui::UIEvent::As ( ) const
inline

Casts this event to the class that carries its data.

Returns
This event as T when GetType() is one of the types T carries, otherwise null.

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