Sleeping Wombat GUI  0.100
swGUI
MouseEventArgs.h
Go to the documentation of this file.
1 #pragma once
2 
9 #include "InputEventArgs.h"
10 
12 
13 
14 
15 namespace sw {
16 namespace gui
17 {
18 
19 
23 {
24  RTTR_ENABLE( InputEventArgs )
25 public:
26 
33 
34  float WindowPosX;
35  float WindowPosY;
36 
37 public:
38  explicit MouseEventArgs( input::MouseDevice* device )
39  : InputEventArgs( device )
40  , Mouse( device )
41  , RightButton( device->GetState().RightButton() )
42  , LeftButton( device->GetState().LeftButton() )
43  , MiddleButton( device->GetState().MiddleButton() )
44  , XButton1( device->GetState().XButton1() )
45  , XButton2( device->GetState().XButton2() )
46  , WindowPosX( device->GetState().GetPositionX() )
47  , WindowPosY( device->GetState().GetPositionY() )
48  {}
49 };
50 
51 } // gui
52 } // sw
53 
const input::KeyState * MiddleButton
State of middle button in moment of sending this event.
Definition: MouseEventArgs.h:30
Definition: DirectInputModule.cpp:11
const input::KeyState * XButton2
State of second extended button in moment of sending this event.
Definition: MouseEventArgs.h:32
Base class for mouse input events.
Definition: MouseEventArgs.h:22
input::MouseDevice * Mouse
Mouse device. You can get current mouse state here.
Definition: MouseEventArgs.h:27
MouseEventArgs(input::MouseDevice *device)
Definition: MouseEventArgs.h:38
Mouse state and events.
Definition: MouseDevice.h:27
Button state structure..
Definition: KeyState.h:26
const input::KeyState * RightButton
State of right button in moment of sending this event.
Definition: MouseEventArgs.h:28
const input::KeyState * XButton1
State of first extended button in moment of sending this event.
Definition: MouseEventArgs.h:31
float WindowPosY
Position of mouse in window space.
Definition: MouseEventArgs.h:35
const input::KeyState * LeftButton
State of left button in moment of sending this event.
Definition: MouseEventArgs.h:29
float WindowPosX
Position of mouse in window space.
Definition: MouseEventArgs.h:34
Base class for input events.
Definition: InputEventArgs.h:22