Sleeping Wombat GUI  0.100
swGUI
KeyEventArgs.h
Go to the documentation of this file.
1 #pragma once
2 
11 
12 
13 namespace sw {
14 namespace gui
15 {
16 
17 
22 {
23  RTTR_ENABLE( KeyboardEventArgs )
24 public:
25 
28  bool IsUp;
29  bool IsDown;
30 
31 public:
32 
34  : KeyboardEventArgs( device )
35  , State( device->GetState()[ key ] )
36  , Key( key )
37  , IsUp( device->GetState()[ key ].IsUp() )
38  , IsDown( device->GetState()[ key ].IsPressed() )
39  {}
40 
41 };
42 DEFINE_OPTR_TYPE( KeyEventArgs );
43 
44 
45 } // gui
46 } // sw
bool IsUp
Definition: KeyEventArgs.h:28
Definition: DirectInputModule.cpp:11
Key state changed event.
Definition: KeyEventArgs.h:21
Base class for keyboard events.
Definition: KeyboardEventArgs.h:15
Keyboard state and events.
Definition: KeyboardDevice.h:40
KeyEventArgs(input::KeyboardDevice *device, input::Keyboard::PhysicalKeys key)
Definition: KeyEventArgs.h:33
const input::KeyState & State
Definition: KeyEventArgs.h:26
Button state structure..
Definition: KeyState.h:26
input::Keyboard::PhysicalKeys Key
Definition: KeyEventArgs.h:27
DEFINE_OPTR_TYPE(UIElement)
bool IsDown
Definition: KeyEventArgs.h:29
PhysicalKeys
Physical keys numbers. Numbers are the same as in DirectInput.
Definition: InputDeviceEvent.h:29