summaryrefslogtreecommitdiffstats
path: root/scintilla/src/KeyMap.h
diff options
context:
space:
mode:
authorXhmikosR <xhmikosr@users.sourceforge.net>2010-10-31 17:17:15 +0000
committerXhmikosR <xhmikosr@users.sourceforge.net>2010-10-31 17:17:15 +0000
commit88a9de8737ca5a2ba239d49e072660fc9c89ab25 (patch)
treeb64f81588eafd28926ffc632c01f6b3c246e218d /scintilla/src/KeyMap.h
parente5eb2fe35699c79bef11a870fd4c111c040fc22c (diff)
downloadnotepad2-mod-88a9de8737ca5a2ba239d49e072660fc9c89ab25.zip
notepad2-mod-88a9de8737ca5a2ba239d49e072660fc9c89ab25.tar.gz
notepad2-mod-88a9de8737ca5a2ba239d49e072660fc9c89ab25.tar.bz2
add scintilla v2.12 in the svn
git-svn-id: https://notepad2-mod.googlecode.com/svn/trunk@3 28bd50df-7adb-d945-0439-6e466c6a13cc
Diffstat (limited to 'scintilla/src/KeyMap.h')
-rw-r--r--scintilla/src/KeyMap.h51
1 files changed, 51 insertions, 0 deletions
diff --git a/scintilla/src/KeyMap.h b/scintilla/src/KeyMap.h
new file mode 100644
index 0000000..c1b1a10
--- /dev/null
+++ b/scintilla/src/KeyMap.h
@@ -0,0 +1,51 @@
+// Scintilla source code edit control
+/** @file KeyMap.h
+ ** Defines a mapping between keystrokes and commands.
+ **/
+// Copyright 1998-2001 by Neil Hodgson <neilh@scintilla.org>
+// The License.txt file describes the conditions under which this software may be distributed.
+
+#ifndef KEYTOCOMMAND_H
+#define KEYTOCOMMAND_H
+
+#ifdef SCI_NAMESPACE
+namespace Scintilla {
+#endif
+
+#define SCI_NORM 0
+#define SCI_SHIFT SCMOD_SHIFT
+#define SCI_CTRL SCMOD_CTRL
+#define SCI_ALT SCMOD_ALT
+#define SCI_CSHIFT (SCI_CTRL | SCI_SHIFT)
+#define SCI_ASHIFT (SCI_ALT | SCI_SHIFT)
+
+/**
+ */
+class KeyToCommand {
+public:
+ int key;
+ int modifiers;
+ unsigned int msg;
+};
+
+/**
+ */
+class KeyMap {
+ KeyToCommand *kmap;
+ int len;
+ int alloc;
+ static const KeyToCommand MapDefault[];
+
+public:
+ KeyMap();
+ ~KeyMap();
+ void Clear();
+ void AssignCmdKey(int key, int modifiers, unsigned int msg);
+ unsigned int Find(int key, int modifiers); // 0 returned on failure
+};
+
+#ifdef SCI_NAMESPACE
+}
+#endif
+
+#endif