Lars Martin Hambro <lars_martin4 AT hotmail DOT com>
[reactos.git] / reactos / base / applications / network / telnet / src / tkeymap.h
1 #ifndef __TKEYMAP_H
2 #define __TKEYMAP_H
3
4 #ifdef __BORLANDC__
5 #include <classlib\arrays.h>
6 #else
7 #include <string>
8 #include "stl_bids.h"
9 #endif
10
11 #include "tkeydef.h"
12
13 //AVS
14 typedef TArrayAsVector<TKeyDef> keyArray;
15
16 //AVS
17 // representation of keymap
18 struct KeyMap {
19 keyArray map; // keymap
20 string orig; // original string from .cfg file
21 TKeyDef key; // 'switch to' key
22
23 KeyMap(DWORD state, DWORD code);
24 KeyMap(): map(0,0,sizeof(TKeyDef)){};
25 KeyMap(TKeyDef&tk);
26 KeyMap(TKeyDef&tk, string&);
27 KeyMap(const string&t): map(0,0,sizeof(TKeyDef)), orig(t) {};
28 int operator==(const KeyMap & t) const;
29 KeyMap& operator = (const KeyMap& t);
30
31 #ifndef __BORLANDC__
32 // The STL needs this (Paul Brannan 5/25/98)
33 friend bool operator<(const KeyMap &t1, const KeyMap &t2);
34 #endif
35
36 ~KeyMap();
37 };
38
39 #endif