Gainput
v1.0.0
lib
include
gainput
gestures
GainputSimultaneouslyDownGesture.h
1
2
#ifndef GAINPUTSIMULTANEOUSLYDOWNGESTURE_H_
3
#define GAINPUTSIMULTANEOUSLYDOWNGESTURE_H_
4
5
#ifdef GAINPUT_ENABLE_SIMULTANEOUSLY_DOWN_GESTURE
6
7
namespace
gainput
8
{
9
11
enum
SimultaneouslyDownAction
12
{
13
SimultaneouslyDownTriggered
14
};
15
17
31
class
GAINPUT_LIBEXPORT
SimultaneouslyDownGesture
:
public
InputGesture
32
{
33
public
:
35
SimultaneouslyDownGesture
(
InputManager
& manager,
DeviceId
device,
unsigned
index,
DeviceVariant
variant);
37
~
SimultaneouslyDownGesture
();
38
40
44
void
AddButton(
DeviceId
device,
DeviceButtonId
button);
45
47
void
ClearButtons();
48
49
bool
IsValidButtonId
(
DeviceButtonId
deviceButton)
const
{
return
deviceButton ==
SimultaneouslyDownTriggered
; }
50
51
ButtonType
GetButtonType
(
DeviceButtonId
deviceButton)
const
{ GAINPUT_UNUSED(deviceButton); GAINPUT_ASSERT(IsValidButtonId(deviceButton));
return
BT_BOOL
; }
52
53
protected
:
54
void
InternalUpdate(
InputDeltaState
* delta);
55
56
private
:
57
Array<DeviceButtonSpec>
buttons_;
58
59
};
60
61
}
62
63
#endif
64
65
#endif
66
gainput::Array
A std::vector-like data container for POD-types.
Definition:
GainputContainers.h:96
gainput::InputManager
Manages all input devices and some other helpful stuff.
Definition:
GainputInputManager.h:24
gainput::BT_BOOL
A boolean value button, either down (true) or up (false).
Definition:
GainputInputDevice.h:12
gainput::ButtonType
ButtonType
Type of an input device button.
Definition:
GainputInputDevice.h:10
gainput::SimultaneouslyDownGesture::IsValidButtonId
bool IsValidButtonId(DeviceButtonId deviceButton) const
Returns if the given button is valid for this device.
Definition:
GainputSimultaneouslyDownGesture.h:49
gainput::InputDeltaState
Stores a list of input state changes.
Definition:
GainputInputDeltaState.h:9
gainput::DeviceId
unsigned int DeviceId
ID of an input device.
Definition:
gainput.h:107
gainput::InputDevice::DeviceVariant
DeviceVariant
Variant of an input device type.
Definition:
GainputInputDevice.h:51
gainput::SimultaneouslyDownAction
SimultaneouslyDownAction
Buttons provided by the SimultaneouslyDownGesture.
Definition:
GainputSimultaneouslyDownGesture.h:11
gainput::InputGesture
Base class for all input gestures.
Definition:
GainputGestures.h:41
gainput::SimultaneouslyDownGesture
A gesture that tracks if a number of buttons is down simultaneously.
Definition:
GainputSimultaneouslyDownGesture.h:31
gainput::SimultaneouslyDownGesture::GetButtonType
ButtonType GetButtonType(DeviceButtonId deviceButton) const
Returns the type of the given button.
Definition:
GainputSimultaneouslyDownGesture.h:51
gainput::SimultaneouslyDownTriggered
The button triggered by double-clicking.
Definition:
GainputSimultaneouslyDownGesture.h:13
gainput::DeviceButtonId
unsigned int DeviceButtonId
ID of a specific button unique to an input device.
Definition:
gainput.h:109
gainput
Contains all Gainput related classes, types, and functions.
Definition:
gainput.h:103
Generated on Wed Sep 6 2017 20:47:59 for Gainput by
1.8.13