]> git.saurik.com Git - wxWidgets.git/blame - src/stc/scintilla/src/KeyMap.h
wxMessageBox off the main thread lost result code.
[wxWidgets.git] / src / stc / scintilla / src / KeyMap.h
CommitLineData
9ce192d4 1// Scintilla source code edit control
65ec6247
RD
2/** @file KeyMap.h
3 ** Defines a mapping between keystrokes and commands.
4 **/
5// Copyright 1998-2001 by Neil Hodgson <neilh@scintilla.org>
9ce192d4
RD
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
7e0c58e9
RD
11#ifdef SCI_NAMESPACE
12namespace Scintilla {
13#endif
14
9ce192d4 15#define SCI_NORM 0
d134f170
RD
16#define SCI_SHIFT SCMOD_SHIFT
17#define SCI_CTRL SCMOD_CTRL
18#define SCI_ALT SCMOD_ALT
1dcf666d 19#define SCI_META SCMOD_META
9ce192d4 20#define SCI_CSHIFT (SCI_CTRL | SCI_SHIFT)
f6bcfd97 21#define SCI_ASHIFT (SCI_ALT | SCI_SHIFT)
9ce192d4 22
65ec6247
RD
23/**
24 */
9ce192d4
RD
25class KeyToCommand {
26public:
27 int key;
28 int modifiers;
d134f170 29 unsigned int msg;
9ce192d4
RD
30};
31
65ec6247
RD
32/**
33 */
9ce192d4
RD
34class KeyMap {
35 KeyToCommand *kmap;
36 int len;
37 int alloc;
1a2fb4cd 38 static const KeyToCommand MapDefault[];
65ec6247 39
9ce192d4
RD
40public:
41 KeyMap();
42 ~KeyMap();
43 void Clear();
d134f170
RD
44 void AssignCmdKey(int key, int modifiers, unsigned int msg);
45 unsigned int Find(int key, int modifiers); // 0 returned on failure
9ce192d4
RD
46};
47
7e0c58e9
RD
48#ifdef SCI_NAMESPACE
49}
50#endif
51
9ce192d4 52#endif