ReXGlue SDK
Loading...
Searching...
No Matches
rex::InputEvent Struct Reference

#include <rex/input_keys.h>

Public Types

enum class  Type : u8 {
  kKeyDown , kKeyUp , kKeyChar , kButtonDown ,
  kButtonUp , kMotion , kWheel , kFocusGained ,
  kFocusLost , kResize
}

Public Attributes

Type type = Type::kKeyDown
VirtualKey key = VirtualKey::kNone
KeyModifiers modifiers = KeyModifiers::kNone
bool repeat = false
u32 character = 0
MouseButton button = MouseButton::kLeft
f32 x = 0.0f
f32 y = 0.0f
f32 dx = 0.0f
f32 dy = 0.0f
f32 scroll_x = 0.0f
f32 scroll_y = 0.0f
u32 width = 0
u32 height = 0
bool handled = false

Detailed Description

A window input event. The UI provider builds it, the UI system passes it to the listeners, overlays and binds, then forwards it to the input system.

Member Enumeration Documentation

◆ Type

enum class rex::InputEvent::Type : u8
strong
Enumerator
kKeyDown 

A key went down or repeated.

Member Data Documentation

◆ button

MouseButton rex::InputEvent::button = MouseButton::kLeft

The button of ButtonDown and ButtonUp.

◆ character

u32 rex::InputEvent::character = 0

The code point of KeyChar.

◆ dx

f32 rex::InputEvent::dx = 0.0f

Relative motion in physical pixels, valid under a relative pointer lock.

◆ dy

f32 rex::InputEvent::dy = 0.0f

Relative motion in physical pixels, valid under a relative pointer lock.

◆ handled

bool rex::InputEvent::handled = false

True once a receiver consumed the event, so later receivers skip it.

◆ height

u32 rex::InputEvent::height = 0

Window height of Resize in physical pixels.

◆ key

VirtualKey rex::InputEvent::key = VirtualKey::kNone

The key of KeyDown and KeyUp.

◆ modifiers

KeyModifiers rex::InputEvent::modifiers = KeyModifiers::kNone

The modifiers held for KeyDown and KeyUp.

◆ repeat

bool rex::InputEvent::repeat = false

True for an auto repeated KeyDown.

◆ scroll_x

f32 rex::InputEvent::scroll_x = 0.0f

Horizontal wheel turn in detents, fractional for a smooth wheel.

◆ scroll_y

f32 rex::InputEvent::scroll_y = 0.0f

Vertical wheel turn in detents, fractional for a smooth wheel, positive away from the user.

◆ width

u32 rex::InputEvent::width = 0

Window width of Resize in physical pixels.

◆ x

f32 rex::InputEvent::x = 0.0f

Pointer x in physical pixels.

◆ y

f32 rex::InputEvent::y = 0.0f

Pointer y in physical pixels.


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