]> git.saurik.com Git - wxWidgets.git/blob - src/stc/scintilla/src/KeyMap.h
Reformatting.
[wxWidgets.git] / src / stc / scintilla / src / KeyMap.h
1 // Scintilla source code edit control
2 // KeyMap.h - defines a mapping between keystrokes and commands
3 // Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
4 // The License.txt file describes the conditions under which this software may be distributed.
5
6 #ifndef KEYTOCOMMAND_H
7 #define KEYTOCOMMAND_H
8
9 #define SCI_NORM 0
10 #define SCI_SHIFT SHIFT_PRESSED
11 #define SCI_CTRL LEFT_CTRL_PRESSED
12 #define SCI_ALT LEFT_ALT_PRESSED
13 #define SCI_CSHIFT (SCI_CTRL | SCI_SHIFT)
14 #define SCI_ASHIFT (SCI_ALT | SCI_SHIFT)
15
16 class KeyToCommand {
17 public:
18 int key;
19 int modifiers;
20 UINT msg;
21 };
22
23 class KeyMap {
24 KeyToCommand *kmap;
25 int len;
26 int alloc;
27 static KeyToCommand MapDefault[];
28 public:
29 KeyMap();
30 ~KeyMap();
31 void Clear();
32 void AssignCmdKey(int key, int modifiers, UINT msg);
33 UINT Find(int key, int modifiers); // 0 returned on failure
34 };
35
36 #endif