"Fossies" - the Fresh Open Source Software Archive 
As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style:
standard) with prefixed line numbers and
code folding option.
Alternatively you can here
view or
download the uninterpreted source code file.
For more information about "Hotkey.h" see the
Fossies "Dox" file reference documentation.
1 /*
2 Derived from source code of TrueCrypt 7.1a, which is
3 Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
4 by the TrueCrypt License 3.0.
5
6 Modifications and additions to the original source code (contained in this file)
7 and all other portions of this file are Copyright (c) 2013-2017 IDRIX
8 and are governed by the Apache License 2.0 the full text of which is
9 contained in the file License.txt included in VeraCrypt binary and source
10 code distribution packages.
11 */
12
13 #ifndef TC_HEADER_Main_Hotkey
14 #define TC_HEADER_Main_Hotkey
15
16 #include "System.h"
17 #include "Main.h"
18
19 namespace VeraCrypt
20 {
21 struct Hotkey;
22 typedef list < shared_ptr <Hotkey> > HotkeyList;
23
24 struct Hotkey
25 {
26 public:
27 struct Id
28 {
29 enum
30 {
31 CloseAllSecurityTokenSessions = 0,
32 DismountAll,
33 DismountAllWipeCache,
34 ForceDismountAllWipeCache,
35 ForceDismountAllWipeCacheExit,
36 MountAllDevices,
37 MountAllFavorites,
38 ShowHideApplication,
39 WipeCache
40 };
41 };
42
43 Hotkey (int id, const wstring &name, const wxString &description, int virtualKeyCode = 0, int virtualKeyModifiers = 0)
44 : Description (description), Id (id), Name (name), VirtualKeyCode (virtualKeyCode), VirtualKeyModifiers (virtualKeyModifiers) { }
45
46 virtual ~Hotkey () { }
47
48 static HotkeyList GetAvailableHotkeys ();
49 wxString GetShortcutString () const;
50 static wxString GetVirtualKeyCodeString (int virtualKeyCode);
51 static HotkeyList LoadList ();
52 static void RegisterList (wxWindow *handler, const HotkeyList &hotkeys);
53 static void SaveList (const HotkeyList &hotkeys);
54 static void UnregisterList (wxWindow *handler, const HotkeyList &hotkeys);
55
56 wxString Description;
57 int Id;
58 wstring Name;
59 int VirtualKeyCode;
60 int VirtualKeyModifiers;
61
62 protected:
63 static wxString GetFileName () { return L"Hotkeys.xml"; }
64 };
65 }
66
67 #endif // TC_HEADER_Main_Hotkey