9 #ifndef __HOM_hotKeys_h__
10 #define __HOM_hotKeys_h__
35 virtual std::vector<std::string>
37 const char *hotkey_symbol) = 0;
38 virtual std::vector<std::string>
42 bool resolve_refs =
true) = 0;
44 const char *hotkey_symbol) = 0;
46 const char *hotkey_symbol) = 0;
47 virtual bool isKeyMatch(
const char *key,
48 const char *hotkey_symbol) = 0;
49 virtual bool isKeycodeMatch(
int key_code,
50 const char *hotkey_symbol) = 0;
51 virtual std::vector<std::string>
52 findConflicts(
const char *hotkey_symbol,
54 virtual std::vector<std::string>
60 virtual std::vector<std::vector<std::string> >
61 resolveAssignments(
const std::vector<std::string> &contexts,
62 const std::vector<std::string> &hotkey_symbols) = 0;
64 virtual int changeIndex() = 0;
68 virtual std::vector< std::map<std::string, std::string> >
69 commandsInContext(
const char * context) = 0;
71 virtual std::vector< std::map<std::string, std::string> >
72 contextsInContext(
const char *context) = 0;
74 virtual std::vector< std::map<std::string, std::string> >
75 commandCategoriesInCategory(
76 const char *category) = 0;
78 virtual std::vector< std::map<std::string, std::string> >
80 const char *category) = 0;
82 virtual std::vector< std::map<std::string, std::string> >
83 commandBindingsInContext(
84 const char *context) = 0;
89 const char *hotkey_symbol,
91 const char *description,
92 const std::vector<std::string> &assignments = std::vector<std::string>()) = 0;
94 virtual bool addContext(
const char *hotkey_symbol,
96 const char *description) = 0;
98 virtual void installDefinitions(
100 virtual void uninstallDefinitions(
103 virtual bool addCommandBinding(
105 const char *command) = 0;
106 virtual bool removeCommandBinding(
108 const char *command) = 0;
111 virtual void removeHotkeySymbol(
112 const char* hotkey_symbol) = 0;
115 const char *english_context,
116 const char *english_command =
nullptr) = 0;
117 virtual bool clearAssignments(
118 const char *hotkey_symbol) = 0;
120 virtual bool addAssignment(
const char *hotkey_symbol,
121 const char *key) = 0;
123 virtual bool removeAssignment(
const char *hotkey_symbol,
124 const char *key) = 0;
126 virtual bool clearAssignments(
128 const char *command) = 0;
129 virtual bool addAssignment(
132 const char *key) = 0;
133 virtual bool removeAssignment(
136 const char *key) = 0;
138 virtual std::map<std::string, std::vector<std::string> >
140 const char *hotkey_symbol,
141 const std::vector<std::string> &layout_keys,
142 int modifier_mask = 0) = 0;
145 virtual std::vector<int> availableKeycodes(
146 const char *hotkey_symbol,
147 const std::vector<int> &layout_keycodes,
148 int modifier_mask = 0) = 0;
150 virtual std::vector<int> availableKeycodes(
153 const std::vector<int> &layout_keycodes,
154 int modifier_mask = 0) = 0;
159 short modifiers = 0) = 0;
160 virtual int stringToKeycode(
const char *key,
161 short modifiers = 0) = 0;
165 virtual void _createBackupTables() = 0;
166 virtual void _restoreBackupTables() = 0;
167 virtual void revertToDefaults(
168 const char *hotkey_symbol,
169 bool one_level_only) = 0;
170 virtual void revertToDefaults(
173 bool one_level_only) = 0;
174 virtual bool saveOverrides() = 0;
178 virtual bool saveAsKeymap(
180 const char *
path =
nullptr) = 0;
181 virtual bool loadKeymap(
183 const char *
path =
nullptr) = 0;
184 virtual bool importKeymap(
const char *
name,
185 const char *
path) = 0;
186 virtual std::vector<std::pair<std::string, std::string> >
GLuint GLsizei const GLchar * label
GLsizei const GLchar *const * string
GLsizei const GLchar *const * path
string __repr__(VtArray< T > const &self)
virtual void addCommand(std::string const &symbol, std::string const &label, std::string const &description)=0
virtual void addContext(std::string const &symbol, std::string const &label, std::string const &description)=0
GLuint const GLchar * name
OIIO_UTIL_API bool rename(string_view from, string_view to, std::string &err)