TGUI  0.9-beta
tgui::Event Struct Reference

Classes

struct  KeyEvent
 KeyPressed event parameters. More...
 
struct  MouseButtonEvent
 MouseButtonPressed/MouseButtonReleased events parameters. More...
 
struct  MouseMoveEvent
 MouseMoved event parameters. More...
 
struct  MouseWheelEvent
 MouseWheelScrolled events parameters. More...
 
struct  SizeEvent
 Resized events parameters. More...
 
struct  TextEvent
 TextEntered event parameters. More...
 

Public Types

enum  KeyboardKey {
  KeyboardKey::Unknown = -1, KeyboardKey::A = 0, KeyboardKey::B, KeyboardKey::C,
  KeyboardKey::D, KeyboardKey::E, KeyboardKey::F, KeyboardKey::G,
  KeyboardKey::H, KeyboardKey::I, KeyboardKey::J, KeyboardKey::K,
  KeyboardKey::L, KeyboardKey::M, KeyboardKey::N, KeyboardKey::O,
  KeyboardKey::P, KeyboardKey::Q, KeyboardKey::R, KeyboardKey::S,
  KeyboardKey::T, KeyboardKey::U, KeyboardKey::V, KeyboardKey::W,
  KeyboardKey::X, KeyboardKey::Y, KeyboardKey::Z, KeyboardKey::Num0,
  KeyboardKey::Num1, KeyboardKey::Num2, KeyboardKey::Num3, KeyboardKey::Num4,
  KeyboardKey::Num5, KeyboardKey::Num6, KeyboardKey::Num7, KeyboardKey::Num8,
  KeyboardKey::Num9, KeyboardKey::Escape, KeyboardKey::LControl, KeyboardKey::LShift,
  KeyboardKey::LAlt, KeyboardKey::LSystem, KeyboardKey::RControl, KeyboardKey::RShift,
  KeyboardKey::RAlt, KeyboardKey::RSystem, KeyboardKey::Menu, KeyboardKey::LBracket,
  KeyboardKey::RBracket, KeyboardKey::Semicolon, KeyboardKey::Comma, KeyboardKey::Period,
  KeyboardKey::Quote, KeyboardKey::Slash, KeyboardKey::Backslash, KeyboardKey::Tilde,
  KeyboardKey::Equal, KeyboardKey::Minus, KeyboardKey::Space, KeyboardKey::Enter,
  KeyboardKey::Backspace, KeyboardKey::Tab, KeyboardKey::PageUp, KeyboardKey::PageDown,
  KeyboardKey::End, KeyboardKey::Home, KeyboardKey::Insert, KeyboardKey::Delete,
  KeyboardKey::Add, KeyboardKey::Subtract, KeyboardKey::Multiply, KeyboardKey::Divide,
  KeyboardKey::Left, KeyboardKey::Right, KeyboardKey::Up, KeyboardKey::Down,
  KeyboardKey::Numpad0, KeyboardKey::Numpad1, KeyboardKey::Numpad2, KeyboardKey::Numpad3,
  KeyboardKey::Numpad4, KeyboardKey::Numpad5, KeyboardKey::Numpad6, KeyboardKey::Numpad7,
  KeyboardKey::Numpad8, KeyboardKey::Numpad9, KeyboardKey::F1, KeyboardKey::F2,
  KeyboardKey::F3, KeyboardKey::F4, KeyboardKey::F5, KeyboardKey::F6,
  KeyboardKey::F7, KeyboardKey::F8, KeyboardKey::F9, KeyboardKey::F10,
  KeyboardKey::F11, KeyboardKey::F12, KeyboardKey::F13, KeyboardKey::F14,
  KeyboardKey::F15, KeyboardKey::Pause
}
 Keyboard key codes. More...
 
enum  MouseButton { MouseButton::Left, MouseButton::Right, MouseButton::Middle }
 Mouse buttons. More...
 
enum  KeyModifier
 Modifiers keys.
 
enum  Type {
  Type::LostFocus, Type::GainedFocus, Type::TextEntered, Type::KeyPressed,
  Type::MouseWheelScrolled, Type::MouseButtonPressed, Type::MouseButtonReleased, Type::MouseMoved,
  Type::Resized
}
 Enumeration of the different types of events. More...
 

Public Attributes

Type type
 Type of the event.
 
KeyEvent key
 Key event parameters (Event::KeyPressed)
 
TextEvent text
 Text event parameters (Event::TextEntered)
 
MouseMoveEvent mouseMove
 Mouse move event parameters (Event::MouseMoved)
 
MouseButtonEvent mouseButton
 Mouse button event parameters (Event::MouseButtonPressed, Event::MouseButtonReleased)
 
MouseWheelEvent mouseWheel
 Mouse wheel event parameters (Event::MouseWheelScrolled)
 
SizeEvent size
 Size event parameters (Event::Resized)
 

Member Enumeration Documentation

◆ KeyboardKey

Keyboard key codes.

Enumerator
Unknown 

Unhandled key.

The A key.

The B key.

The C key.

The D key.

The E key.

The F key.

The G key.

The H key.

The I key.

The J key.

The K key.

The L key.

The M key.

The N key.

The O key.

The P key.

The Q key.

The R key.

The S key.

The T key.

The U key.

The V key.

The W key.

The X key.

The Y key.

The Z key.

Num0 

The 0 key.

Num1 

The 1 key.

Num2 

The 2 key.

Num3 

The 3 key.

Num4 

The 4 key.

Num5 

The 5 key.

Num6 

The 6 key.

Num7 

The 7 key.

Num8 

The 8 key.

Num9 

The 9 key.

Escape 

The Escape key.

LControl 

The left Control key.

LShift 

The left Shift key.

LAlt 

The left Alt key.

LSystem 

The left OS specific key: window (Windows and Linux), apple (MacOS X), ...

RControl 

The right Control key.

RShift 

The right Shift key.

RAlt 

The right Alt key.

RSystem 

The right OS specific key: window (Windows and Linux), apple (MacOS X), ...

Menu 

The Menu key.

LBracket 

The [ key.

RBracket 

The ] key.

Semicolon 

The ; key.

Comma 

The , key.

Period 

The . key.

Quote 

The ' key.

Slash 

The / key.

Backslash 

The \ key.

Tilde 

The ~ key.

Equal 

The = key.

Minus 

The - key (hyphen)

Space 

The Space key.

Enter 

The Enter/Return keys.

Backspace 

The Backspace key.

Tab 

The Tabulation key.

PageUp 

The Page up key.

PageDown 

The Page down key.

End 

The End key.

Home 

The Home key.

Insert 

The Insert key.

Delete 

The Delete key.

Add 

The + key.

Subtract 

The - key (minus from numpad)

Multiply 

The * key.

Divide 

The / key.

Left 

Left arrow.

Right 

Right arrow.

Up 

Up arrow.

Down 

Down arrow.

Numpad0 

The numpad 0 key.

Numpad1 

The numpad 1 key.

Numpad2 

The numpad 2 key.

Numpad3 

The numpad 3 key.

Numpad4 

The numpad 4 key.

Numpad5 

The numpad 5 key.

Numpad6 

The numpad 6 key.

Numpad7 

The numpad 7 key.

Numpad8 

The numpad 8 key.

Numpad9 

The numpad 9 key.

F1 

The F1 key.

F2 

The F2 key.

F3 

The F3 key.

F4 

The F4 key.

F5 

The F5 key.

F6 

The F6 key.

F7 

The F7 key.

F8 

The F8 key.

F9 

The F9 key.

F10 

The F10 key.

F11 

The F11 key.

F12 

The F12 key.

F13 

The F13 key.

F14 

The F14 key.

F15 

The F15 key.

Pause 

The Pause key.

◆ MouseButton

Mouse buttons.

Enumerator
Left 

The left mouse button.

Right 

The right mouse button.

Middle 

The middle (wheel) mouse button.

◆ Type

enum tgui::Event::Type
strong

Enumeration of the different types of events.

Enumerator
LostFocus 

The window lost the focus (no data)

GainedFocus 

The window gained the focus (no data)

TextEntered 

A character was entered (data in event.text)

KeyPressed 

A key was pressed (data in event.key)

MouseWheelScrolled 

The mouse wheel was scrolled (data in event.mouseWheel)

MouseButtonPressed 

A mouse button was pressed (data in event.mouseButton)

MouseButtonReleased 

A mouse button was released (data in event.mouseButton)

MouseMoved 

The mouse cursor moved (data in event.mouseMove)

Resized 

The window was resized (data in event.size)


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