~ubuntu-branches/ubuntu/wily/apparmor/wily

« back to all changes in this revision

Viewing changes to deprecated/management/profile-editor/src/wxStyledTextCtrl/KeyMap.h

  • Committer: Bazaar Package Importer
  • Author(s): Kees Cook
  • Date: 2011-04-27 10:38:07 UTC
  • mfrom: (5.1.118 natty)
  • Revision ID: james.westby@ubuntu.com-20110427103807-ym3rhwys6o84ith0
Tags: 2.6.1-2
debian/copyright: clarify for some full organization names.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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.
 
7
 
 
8
#ifndef KEYTOCOMMAND_H
 
9
#define KEYTOCOMMAND_H
 
10
 
 
11
#define SCI_NORM 0
 
12
#define SCI_SHIFT SCMOD_SHIFT
 
13
#define SCI_CTRL SCMOD_CTRL
 
14
#define SCI_ALT SCMOD_ALT
 
15
#define SCI_CSHIFT (SCI_CTRL | SCI_SHIFT)
 
16
#define SCI_ASHIFT (SCI_ALT | SCI_SHIFT)
 
17
 
 
18
/**
 
19
 */
 
20
class KeyToCommand {
 
21
public:
 
22
        int key;
 
23
        int modifiers;
 
24
        unsigned int msg;
 
25
};
 
26
 
 
27
/**
 
28
 */
 
29
class KeyMap {
 
30
        KeyToCommand *kmap;
 
31
        int len;
 
32
        int alloc;
 
33
        static const KeyToCommand MapDefault[];
 
34
 
 
35
public:
 
36
        KeyMap();
 
37
        ~KeyMap();
 
38
        void Clear();
 
39
        void AssignCmdKey(int key, int modifiers, unsigned int msg);
 
40
        unsigned int Find(int key, int modifiers);      // 0 returned on failure
 
41
};
 
42
 
 
43
#endif