ASW Lib
A.D.S. Games SDL Wrapper Library. A library targeted at Allegro4 users who want to switch to SDL3 and use modern c++.
Loading...
Searching...
No Matches
asw::ui::UIEvent Struct Reference

Event structure for UI interactions. More...

#include <event.h>

Collaboration diagram for asw::ui::UIEvent:
[legend]

Public Types

enum class  Type {
  KeyDown , KeyUp , TextInput , PointerDown ,
  PointerUp , PointerMove , PointerEnter , PointerLeave ,
  Activate , Back
}
 Enumeration of UI event types. More...
 

Public Attributes

Type type {}
 The type of the event.
 
asw::input::Key key {}
 The key associated with the event.
 
bool shift = false
 Whether the shift key is held.
 
int pointer_id = 0
 The pointer identifier.
 
asw::Vec2< float > pointer_pos
 The pointer position.
 
asw::input::MouseButton mouse_button {}
 The mouse button associated with the event.
 
std::string text
 The text associated with a TextInput event.
 

Detailed Description

Event structure for UI interactions.

Definition at line 21 of file event.h.

Member Enumeration Documentation

◆ Type

enum class asw::ui::UIEvent::Type
strong

Enumeration of UI event types.

Enumerator
KeyDown 
KeyUp 
TextInput 
PointerDown 
PointerUp 
PointerMove 
PointerEnter 
PointerLeave 
Activate 
Back 

Definition at line 23 of file event.h.

Member Data Documentation

◆ key

asw::input::Key asw::ui::UIEvent::key {}

The key associated with the event.

Definition at line 40 of file event.h.

◆ mouse_button

asw::input::MouseButton asw::ui::UIEvent::mouse_button {}

The mouse button associated with the event.

Definition at line 52 of file event.h.

◆ pointer_id

int asw::ui::UIEvent::pointer_id = 0

The pointer identifier.

Definition at line 46 of file event.h.

◆ pointer_pos

asw::Vec2<float> asw::ui::UIEvent::pointer_pos

The pointer position.

Definition at line 49 of file event.h.

◆ shift

bool asw::ui::UIEvent::shift = false

Whether the shift key is held.

Definition at line 43 of file event.h.

◆ text

std::string asw::ui::UIEvent::text

The text associated with a TextInput event.

Definition at line 55 of file event.h.

◆ type

Type asw::ui::UIEvent::type {}

The type of the event.

Definition at line 37 of file event.h.


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