|
HDK
|
Definition of a modifier key context. More...
#include <DM_ModifierKeys.h>
Public Member Functions | |
| int | findMatch (const UI_Event *event) const |
| bool | match (const UI_Event *event, int modifier_id) const |
| void | append (int modifier_id) |
| void | append (int modifier_id, short modifier_key_flags) |
| void | append (const DM_ModifierKeys &src_context) |
| void | update () |
| Call after appending any modifier(s). More... | |
| void | clear () |
| exint | entries () const |
| bool | resolveDescription (int modifier_id, UT_WorkBuffer &buffer) const |
Static Public Member Functions | |
| static int | registerModifier (const char *modifier_token) |
| static int | addModifier (const char *modifier_token, UT_Array< UT_StringHolder > const &key_assigments) |
| static void | removeModifier (const char *modifier_token) |
| Remove a modifier previously added with addModifier. More... | |
Definition of a modifier key context.
A modifier key context consists of a list of modifier key states, each mapping to an integer identifier. A UI_Event can then be mapped to the appropriate identifier by its myAltFlags member.
Definition at line 33 of file DM_ModifierKeys.h.
|
static |
Add and register a new modifier definition along with its assigment keys. Returns a new modifier id or -1 if the operation failed.
Append a modifier. The order these modifiers are appended is what determines their relative priorities. When modifier_key_flags is supplied, that value overrides any loaded from the configuration files.
TODO: Specify whether the modifier can be combined with other modifiers or must stand alone.
| void DM_ModifierKeys::append | ( | const DM_ModifierKeys & | src_context | ) |
|
inline |
Definition at line 58 of file DM_ModifierKeys.h.
|
inline |
Definition at line 60 of file DM_ModifierKeys.h.
Returns the identifier for the modifier matching the event, if any. In the event of no matching modifier, a value of -1 is returned.
Returns whether the event matches the specified modifier identifier. An event with multiple modifier keys set can match multiple modifier identifiers when the matched modifiers are proper subsets.
|
static |
Register a new modifier token and return the corresponding identifier to use in instances of this class.
|
static |
Remove a modifier previously added with addModifier.
| bool DM_ModifierKeys::resolveDescription | ( | int | modifier_id, |
| UT_WorkBuffer & | buffer | ||
| ) | const |
Query the description string for the specified modifier. Returns false if the modifier is not found or is in conflict with a higher priority modifier.
| void DM_ModifierKeys::update | ( | ) |
Call after appending any modifier(s).