ReactOS  0.4.11-dev-946-g431643b
tkeydef.h
Go to the documentation of this file.
1 // TkeyDef - Key Definitions class //
3 // - keeped in an array container //
5 
6 #pragma once
7 
8 //#include <windows.h>
9 
10 #ifndef __BORLANDC__ // Ioannou Dec. 8, 1998
11 // We need these for MSVC6 (Sam Robertson Oct. 8, 1998)
12 class TKeyDef;
13 bool operator==(const TKeyDef &t1, const TKeyDef &t2);
14 bool operator<(const TKeyDef &t1, const TKeyDef &t2);
16 #endif
17 
18 // Paul Brannan Feb. 5, 1999
20 
21 typedef struct {
22  char sendstr;
24 } optype;
25 
26 union KeyDefType {
27  char *szKeyDef;
29 };
30 
32  const char *szKeyDef;
33  const optype *op;
34 };
35 
36 class TKeyDef {
37 private:
41 
42 public:
43  TKeyDef();
44  TKeyDef(char *def, DWORD state, DWORD code);
46  TKeyDef(const TKeyDef &t);
47 
48  char *operator=(char *def);
50  TKeyDef& operator=(const TKeyDef &t);
51  const optype& operator=(optype op);
52 
53  ~TKeyDef();
54 
55 #ifdef __BORLANDC__
56  int operator==(TKeyDef &t);
57 #else
58  // made these into friends for compatibility with stl
59  // (Paul Brannan 5/7/98)
60  friend bool operator==(const TKeyDef &t1, const TKeyDef &t2);
61  friend bool operator<(const TKeyDef &t1, const TKeyDef &t2);
62 #endif
63 
64  const char *GetszKey() { return uKeyDef.szKeyDef; }
65  const KeyDefType GetKeyDef() { return uKeyDef; }
66  DWORD GetCodeKey() { return vk_code; }
67 
68 };
const optype * op
Definition: tkeydef.h:33
char * szKeyDef
Definition: tkeydef.h:27
optype * op
Definition: tkeydef.h:28
~TKeyDef()
Definition: tkeydef.cpp:76
const char * GetszKey()
Definition: tkeydef.h:64
GLdouble GLdouble t
Definition: gl.h:2047
tn_ops the_op
Definition: tkeydef.h:23
TKeyDef()
Definition: tkeydef.cpp:37
DWORD dwState
Definition: tkeydef.h:40
UINT op
Definition: effect.c:223
tn_ops
Definition: tkeydef.h:19
const char * szKeyDef
Definition: tkeydef.h:32
bool operator<(const TKeyDef &t1, const TKeyDef &t2)
Definition: tkeydef.cpp:126
KeyDefType uKeyDef
Definition: tkeydef.h:38
unsigned long DWORD
Definition: ntddk_ex.h:95
friend bool operator==(const TKeyDef &t1, const TKeyDef &t2)
Definition: tkeydef.cpp:122
const KeyDefType GetKeyDef()
Definition: tkeydef.h:65
static int state
Definition: maze.c:121
Definition: tkeydef.h:19
char * operator=(char *def)
Definition: tkeydef.cpp:80
char sendstr
Definition: tkeydef.h:22
DWORD vk_code
Definition: tkeydef.h:39
DWORD GetCodeKey()
Definition: tkeydef.h:66
friend bool operator<(const TKeyDef &t1, const TKeyDef &t2)
Definition: tkeydef.cpp:126
Definition: tkeydef.h:21
bool operator==(const TKeyDef &t1, const TKeyDef &t2)
Definition: tkeydef.cpp:122