SCV
4.2.1
Simple Components for Visual
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Groups
Pages
Keyboard.h
Go to the documentation of this file.
1
#ifndef __SCV_KEYBOARD_H__
2
#define __SCV_KEYBOARD_H__
3
4
#ifndef DOXYGEN_SKIP_THIS
5
#include "
Singleton.h
"
6
#include "
KeyEvent.h
"
7
#endif // DOXYGEN_SKIP_THIS
8
9
#define GLUT_KEY_BACK_SPACE 8
10
#define GLUT_KEY_TAB 9
11
#define GLUT_KEY_ENTER 13
12
#define GLUT_KEY_ESC 27
13
#define GLUT_KEY_SPACE 32
14
#define GLUT_KEY_DEL 127
15
16
namespace
scv {
17
22
class
Keyboard
:
public
Singleton
<Keyboard> {
23
friend
class
Singleton
<
Keyboard
>;
24
public
:
25
30
class
KeyboardControl
{
31
public
:
32
KeyboardControl
(
int
key
,
bool
special
) {
33
this->key =
key
; this->special =
special
;
34
}
35
bool
operator==
(
const
KeyboardControl
& rhs)
const
{
36
return
(
key
== rhs.
key
&&
special
== rhs.
special
)?
true
:
false
;
37
}
38
int
key
;
39
bool
special
;
40
};
41
42
bool
isEmpty
(
void
);
43
44
std::deque<KeyboardControl>
clear
(
void
);
45
void
pop
(
int
key,
bool
special);
46
void
push
(
int
key,
bool
special);
47
48
protected
:
49
Keyboard
(
void
) {}
50
51
private
:
52
std::deque<KeyboardControl> _keyPressed;
53
};
54
55
}
// namespace scv
56
57
#endif // __SCV_KEYBOARD_H__
include
SCV
Keyboard.h
Generated on Fri Dec 14 2012 09:44:49 for SCV by
1.8.2