Support more folding icon styles: arrows, +/- and no lines
[geany-mirror.git] / scintilla / KeyMap.h
blobfd9005de84854963453484f67425a2ee0b5f1228
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.
8 #ifndef KEYTOCOMMAND_H
9 #define KEYTOCOMMAND_H
11 #ifdef SCI_NAMESPACE
12 namespace Scintilla {
13 #endif
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_CSHIFT (SCI_CTRL | SCI_SHIFT)
20 #define SCI_ASHIFT (SCI_ALT | SCI_SHIFT)
22 /**
24 class KeyToCommand {
25 public:
26 int key;
27 int modifiers;
28 unsigned int msg;
31 /**
33 class KeyMap {
34 KeyToCommand *kmap;
35 int len;
36 int alloc;
37 static const KeyToCommand MapDefault[];
39 public:
40 KeyMap();
41 ~KeyMap();
42 void Clear();
43 void AssignCmdKey(int key, int modifiers, unsigned int msg);
44 unsigned int Find(int key, int modifiers); // 0 returned on failure
47 #ifdef SCI_NAMESPACE
49 #endif
51 #endif