HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
HOM_hotkeys.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * COMMENTS:
7  */
8 
9 #ifndef __HOM_hotKeys_h__
10 #define __HOM_hotKeys_h__
11 
12 #include "HOM_API.h"
13 #include "HOM_Defines.h"
14 #include "HOM_Module.h"
15 #include "HOM_EnumValue.h"
16 #include "HOM_EnumModules.h"
17 #include "HOM_Errors.h"
18 #include <vector>
19 #include <map>
20 #include <hboost/tuple/tuple.hpp>
21 
22 SWIGOUT(%rename(hotkeys) HOM_hotkeys;)
24 {
25 public:
26  virtual ~HOM_hotkeys()
27  {}
28 
29  virtual std::string __repr__() = 0;
30 
31  virtual std::vector<std::string> hotkeys(const char *hotkey_symbol) = 0;
32  virtual std::string hotkeyDescription(const char *hotkey_symbol) = 0;
33  virtual bool isKeyMatch(const char *key, const char *hotkey_symbol) = 0;
34 
35  // quick and dirty functions for manager UI
36  virtual std::vector< std::map<std::string, std::string> >
37  getCommands(const char *english_context) = 0;
38 
39  virtual std::vector< std::map<std::string, std::string> >
40  getContexts(const char *english_context) = 0;
41 
42 
43  virtual std::vector<std::string> getCommandNames(const char *parent) = 0;
44 
45  virtual std::vector<std::string> getContextNames(const char *parent) = 0;
46 
47 
48  virtual std::string hotkeySymbol(const char *english_context,
49  const char *english_command = nullptr) = 0;
50  virtual bool clearAssignments(const char *hotkey_symbol) = 0;
51  virtual bool addAssignment(const char *hotkey_symbol, const char *key) = 0;
52  virtual bool removeAssignment(const char *hotkey_symbol, const char *key) = 0;
53 
54  virtual std::vector<std::string> findConflicts(const char *hotkey_symbol,
55  const char *key) = 0;
56 
57  virtual int getChangeIndex() = 0;
58 
59  // key utilities
60  virtual std::map<std::string, std::vector<std::string> >
61  getHotkeysStatus(const char *hotkey_symbol,
62  int modifier_mask = 0) = 0;
63 
64  virtual std::vector<int>
65  getHotkeycodesStatus(const char *hotkey_symbol,
66  int modifier_mask = 0) = 0;
67 
68  virtual std::string uikeyToString(int uikey, short modifiers = 0) = 0;
69  virtual int stringToUikey(const char *key, short modifiers = 0) = 0;
70 
71  virtual std::string keycodeToString(int keycode, short modifiers = 0) = 0;
72  virtual int stringToKeycode(const char *key, short modifiers = 0) = 0;
73 
74  virtual std::map<std::string, std::string> getKeyStateStrings(const char *key) = 0;
75 
76 
77  // backup/restore/save
78  virtual void createBackupTables() = 0;
79  virtual void restoreBackupTables() = 0;
80  virtual void revertToDefaults(const char *englishContext,
81  const char *englishCommand,
82  bool oneLevelOnly) = 0;
83  virtual bool saveOverrides() = 0;
84 
85  // Keymaps
86  virtual bool saveAsKeymap(const char *name, const char *path = nullptr) = 0;
87  virtual bool loadKeymap(const char *name, const char *path = nullptr) = 0;
88  virtual bool importKeymap(const char *name, const char *path) = 0;
89  virtual std::vector<std::pair<std::string, std::string> > keymaps() = 0;
90  virtual std::string currentKeymap() = 0;
91 };
92 
93 #endif
virtual ~HOM_hotkeys()
Definition: HOM_hotkeys.h:26
GLsizei const GLchar *const * string
Definition: glcorearb.h:813
GLsizei const GLchar *const * path
Definition: glcorearb.h:3340
#define SWIGOUT(x)
Definition: HOM_Defines.h:24
#define HOM_API
Definition: HOM_API.h:13
GLuint const GLchar * name
Definition: glcorearb.h:785
std::string __repr__()