]> git.saurik.com Git - wxWidgets.git/blob - src/stc/scintilla/src/KeyMap.h
Initial version of wxStyledTextCtrl, a Scintilla wrapper. There is
[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
15 class KeyToCommand {
16 public:
17 int key;
18 int modifiers;
19 UINT msg;
20 };
21
22 class KeyMap {
23 KeyToCommand *kmap;
24 int len;
25 int alloc;
26 static KeyToCommand MapDefault[];
27 public:
28 KeyMap();
29 ~KeyMap();
30 void Clear();
31 void AssignCmdKey(int key, int modifiers, UINT msg);
32 UINT Find(int key, int modifiers); // 0 returned on failure
33 };
34
35 #endif