]> git.saurik.com Git - wxWidgets.git/blob - src/stc/scintilla/src/KeyMap.h
Add wxTEST_DIALOG for testing of modal dialogs.
[wxWidgets.git] / src / stc / scintilla / src / KeyMap.h
1 // Scintilla source code edit control
2 /** @file KeyMap.h
3 ** Defines a mapping between keystrokes and commands.
4 **/
5 // Copyright 1998-2001 by Neil Hodgson <neilh@scintilla.org>
6 // The License.txt file describes the conditions under which this software may be distributed.
7
8 #ifndef KEYTOCOMMAND_H
9 #define KEYTOCOMMAND_H
10
11 #ifdef SCI_NAMESPACE
12 namespace Scintilla {
13 #endif
14
15 #define SCI_NORM 0
16 #define SCI_SHIFT SCMOD_SHIFT
17 #define SCI_CTRL SCMOD_CTRL
18 #define SCI_ALT SCMOD_ALT
19 #define SCI_META SCMOD_META
20 #define SCI_CSHIFT (SCI_CTRL | SCI_SHIFT)
21 #define SCI_ASHIFT (SCI_ALT | SCI_SHIFT)
22
23 /**
24 */
25 class KeyToCommand {
26 public:
27 int key;
28 int modifiers;
29 unsigned int msg;
30 };
31
32 /**
33 */
34 class KeyMap {
35 KeyToCommand *kmap;
36 int len;
37 int alloc;
38 static const KeyToCommand MapDefault[];
39
40 public:
41 KeyMap();
42 ~KeyMap();
43 void Clear();
44 void AssignCmdKey(int key, int modifiers, unsigned int msg);
45 unsigned int Find(int key, int modifiers); // 0 returned on failure
46 };
47
48 #ifdef SCI_NAMESPACE
49 }
50 #endif
51
52 #endif