Editor API
UnigineEditor public API
|
This class is used to manage shortcuts (hotkeys). The shortcut can be set up to contain all the key presses necessary to describe a keyboard and mouse input combination, including the states of modifier keys such as Shift, Ctrl, Alt, Cmd as well as mouse buttons. More...
Inherits APIInterface.
Public Member Functions | |
const char * | getID () const |
Returns the ID of the shortcut, that is used to refer to it (e.g., from the ShortcutManager). More... | |
void | setEnabled (bool enabled) |
Sets the value indicating if the shortcut is enabled (taken into account in the framework of input processing). You can set this value to 'false' to temporarily ignore a specific shortcut without disabling the whole context (ShortcutContext::setEnabled). More... | |
bool | isEnabled () const |
Returns the value indicating if the shortcut is enabled (taken into account in the framework of input processing). You can set this value to 'false' to temporarily ignore a specific shortcut without disabling the whole context (ShortcutContext::setEnabled). More... | |
void | setTitle (const char *title) |
Sets the title to be displayed for the shortcut in UnigineEditor. More... | |
const char * | getTitle () const |
Returns the title to be displayed for the shortcut in UnigineEditor. More... | |
void | setTooltip (const char *tooltip) |
Sets the tooltip to be displayed for the shortcut in UnigineEditor. More... | |
const char * | getTooltip () const |
Returns the tooltip to be displayed for the shortcut in UnigineEditor. More... | |
void | setKey (Unigine::Input::KEY key) |
Sets the key for the shortcut. More... | |
Unigine::Input::KEY | getKey () const |
Returns the key for the shortcut. More... | |
void | setMouseButtonMask (int mask) |
Sets the mask that defines mouse inputs combination for the shortcut. More... | |
int | getMouseButtonMask () const |
Returns the mask that defines mouse inputs combination for the shortcut. More... | |
void | setMouseWheel (Shortcut::MOUSE_WHEEL wheel) |
Sets the mask that defines the mouse wheel combination for the shortcut MOUSE_WHEEL. More... | |
Shortcut::MOUSE_WHEEL | getMouseWheel () const |
Returns the mask that defines the mouse wheel combination for the shortcut MOUSE_WHEEL. More... | |
void | setModifierMask (int mask) |
Sets the modifier mask that defines the set of modifiers to be used for the shortcut MODIFIER_MASK. More... | |
int | getModifierMask () const |
Returns the modifier mask that defines the set of modifiers to be used for the shortcut MODIFIER_MASK. More... | |
void | setModifierMatchType (Shortcut::MODIFIER_MATCH_TYPE type) |
Sets the modifier match type to be used for the shortcut (see MODIFIER_MATCH_TYPE). It defines whether the shortcut is tolerant to other keys, modifiers, and buttons (will be activated even if they are pressed in addition to the shortcut combination). For example, the 'Shift' modifier combined with arrow keys increases movement speed in UnigineEditor, but you can also press RMB to rotate the camera (because these shortcuts use the PARTIAL type). The default type is EXACT (to activate a shortcut nothing else should be pressed in addition to its combination). More... | |
Shortcut::MODIFIER_MATCH_TYPE | getModifierMatchType () const |
Returns the modifier match type to be used for the shortcut (see MODIFIER_MATCH_TYPE). It defines whether the shortcut is tolerant to other keys, modifiers, and buttons (will be activated even if they are pressed in addition to the shortcut combination). For example, the 'Shift' modifier combined with arrow keys increases movement speed in UnigineEditor, but you can also press RMB to rotate the camera (because these shortcuts use the PARTIAL type). The default type is EXACT (to activate a shortcut nothing else should be pressed in addition to its combination). More... | |
void | setTransparent (bool transparent) |
Sets the value indicating if the shortcut is 'transparent' for input events that have triggered it (passes them further through the Input system). The default value is 'false'. More... | |
bool | isTransparent () const |
Returns the value indicating if the shortcut is 'transparent' for input events that have triggered it (passes them further through the Input system). The default value is 'false'. More... | |
void | setVisible (bool visible) |
Sets the value indicating if the shortcut is to be displayed in UnigineEditor (Windows - Settings - Hotkeys). The default value is 'true'. More... | |
bool | isVisible () const |
Returns the value indicating if the shortcut is to be displayed in UnigineEditor (Windows - Settings - Hotkeys). The default value is 'true'. More... | |
void | setModeModifierEnabled (bool enabled) |
Sets the value indicating if the shortcut is to act like a modifier (e.g., can be used to define how to interpret the 'Ctrl' key). More... | |
bool | isModeModifierEnabled () const |
Returns the value indicating if the shortcut is to act like a modifier (e.g., can be used to define how to interpret the 'Ctrl' key). More... | |
bool | addFriend (const Unigine::Ptr< Shortcut > &friend_shortcut) |
Adds a shortcut with the specified ID as a friend for the shortcut. Friends can be activated together with the shortcut (in case of identical concurrent shortcuts the context priority decides - see ShortcutContext::setPriority). More... | |
bool | removeFriend (const Unigine::Ptr< Shortcut > &friend_shortcut) |
Removes a shortcut with the specified ID from the list of friends. Friends can be activated together with the shortcut (in case of identical concurrent shortcuts the context priority decides - see ShortcutContext::setPriority). More... | |
Unigine::String | toString () const |
Returns the shortcut combination as a text string (e.g., 'Ctrl + A'). More... | |
bool | isPressed () const |
Returns a value indicating if the shortcut is currently pressed and held down. More... | |
bool | isDown () const |
Returns a value indicating if the shortcut has been pressed. More... | |
bool | isUp () const |
Returns a value indicating if the shortcut has been released. More... | |
Unigine::Event & | getEventChanged () |
Event triggered on changing the shortcut (e.g., setting a new combination in UnigineEditor). More... | |
Unigine::Event & | getEventPressed () |
Event triggered when the shortcut is pressed. More... | |
Unigine::Event & | getEventDown () |
Event triggered on pressing the shortcut combination. More... | |
Unigine::Event & | getEventUp () |
Event triggered on releasing the shortcut combination. More... | |
This class is used to manage shortcuts (hotkeys). The shortcut can be set up to contain all the key presses necessary to describe a keyboard and mouse input combination, including the states of modifier keys such as Shift, Ctrl, Alt, Cmd as well as mouse buttons.
Modifier mask used to identify a set of modifiers.
Modifier match type to be used to activate a shortcut (hotkey combination).
Mouse mask used to identify mouse buttons currently pressed.
bool UnigineEditor::Shortcut::addFriend | ( | const Unigine::Ptr< Shortcut > & | friend_shortcut | ) |
Adds a shortcut with the specified ID as a friend for the shortcut. Friends can be activated together with the shortcut (in case of identical concurrent shortcuts the context priority decides - see ShortcutContext::setPriority).
friend_shortcut | ID of the friend shortcut to be added as a friend. |
Unigine::Event& UnigineEditor::Shortcut::getEventChanged | ( | ) |
Event triggered on changing the shortcut (e.g., setting a new combination in UnigineEditor).
Unigine::Event& UnigineEditor::Shortcut::getEventDown | ( | ) |
Event triggered on pressing the shortcut combination.
Unigine::Event& UnigineEditor::Shortcut::getEventPressed | ( | ) |
Event triggered when the shortcut is pressed.
Unigine::Event& UnigineEditor::Shortcut::getEventUp | ( | ) |
Event triggered on releasing the shortcut combination.
const char* UnigineEditor::Shortcut::getID | ( | ) | const |
Returns the ID of the shortcut, that is used to refer to it (e.g., from the ShortcutManager).
Unigine::Input::KEY UnigineEditor::Shortcut::getKey | ( | ) | const |
Returns the key for the shortcut.
int UnigineEditor::Shortcut::getModifierMask | ( | ) | const |
Returns the modifier mask that defines the set of modifiers to be used for the shortcut MODIFIER_MASK.
Shortcut::MODIFIER_MATCH_TYPE UnigineEditor::Shortcut::getModifierMatchType | ( | ) | const |
Returns the modifier match type to be used for the shortcut (see MODIFIER_MATCH_TYPE). It defines whether the shortcut is tolerant to other keys, modifiers, and buttons (will be activated even if they are pressed in addition to the shortcut combination). For example, the 'Shift' modifier combined with arrow keys increases movement speed in UnigineEditor, but you can also press RMB to rotate the camera (because these shortcuts use the PARTIAL type). The default type is EXACT (to activate a shortcut nothing else should be pressed in addition to its combination).
int UnigineEditor::Shortcut::getMouseButtonMask | ( | ) | const |
Returns the mask that defines mouse inputs combination for the shortcut.
Shortcut::MOUSE_WHEEL UnigineEditor::Shortcut::getMouseWheel | ( | ) | const |
Returns the mask that defines the mouse wheel combination for the shortcut MOUSE_WHEEL.
const char* UnigineEditor::Shortcut::getTitle | ( | ) | const |
Returns the title to be displayed for the shortcut in UnigineEditor.
const char* UnigineEditor::Shortcut::getTooltip | ( | ) | const |
Returns the tooltip to be displayed for the shortcut in UnigineEditor.
bool UnigineEditor::Shortcut::isDown | ( | ) | const |
Returns a value indicating if the shortcut has been pressed.
bool UnigineEditor::Shortcut::isEnabled | ( | ) | const |
Returns the value indicating if the shortcut is enabled (taken into account in the framework of input processing). You can set this value to 'false' to temporarily ignore a specific shortcut without disabling the whole context (ShortcutContext::setEnabled).
bool UnigineEditor::Shortcut::isModeModifierEnabled | ( | ) | const |
Returns the value indicating if the shortcut is to act like a modifier (e.g., can be used to define how to interpret the 'Ctrl' key).
bool UnigineEditor::Shortcut::isPressed | ( | ) | const |
Returns a value indicating if the shortcut is currently pressed and held down.
bool UnigineEditor::Shortcut::isTransparent | ( | ) | const |
Returns the value indicating if the shortcut is 'transparent' for input events that have triggered it (passes them further through the Input system). The default value is 'false'.
bool UnigineEditor::Shortcut::isUp | ( | ) | const |
Returns a value indicating if the shortcut has been released.
bool UnigineEditor::Shortcut::isVisible | ( | ) | const |
Returns the value indicating if the shortcut is to be displayed in UnigineEditor (Windows - Settings - Hotkeys). The default value is 'true'.
bool UnigineEditor::Shortcut::removeFriend | ( | const Unigine::Ptr< Shortcut > & | friend_shortcut | ) |
Removes a shortcut with the specified ID from the list of friends. Friends can be activated together with the shortcut (in case of identical concurrent shortcuts the context priority decides - see ShortcutContext::setPriority).
friend_shortcut | ID of the friend shortcut to be removed. |
void UnigineEditor::Shortcut::setEnabled | ( | bool | enabled | ) |
Sets the value indicating if the shortcut is enabled (taken into account in the framework of input processing). You can set this value to 'false' to temporarily ignore a specific shortcut without disabling the whole context (ShortcutContext::setEnabled).
enabled | true to enable the shortcut; false - to make it ignored. |
void UnigineEditor::Shortcut::setKey | ( | Unigine::Input::KEY | key | ) |
Sets the key for the shortcut.
key | Key to be set. |
void UnigineEditor::Shortcut::setModeModifierEnabled | ( | bool | enabled | ) |
Sets the value indicating if the shortcut is to act like a modifier (e.g., can be used to define how to interpret the 'Ctrl' key).
enabled | true to make the shortcut act like a modifier; false - to make it act like a shortcut. |
void UnigineEditor::Shortcut::setModifierMask | ( | int | mask | ) |
Sets the modifier mask that defines the set of modifiers to be used for the shortcut MODIFIER_MASK.
mask | Mask to be set. |
void UnigineEditor::Shortcut::setModifierMatchType | ( | Shortcut::MODIFIER_MATCH_TYPE | type | ) |
Sets the modifier match type to be used for the shortcut (see MODIFIER_MATCH_TYPE). It defines whether the shortcut is tolerant to other keys, modifiers, and buttons (will be activated even if they are pressed in addition to the shortcut combination). For example, the 'Shift' modifier combined with arrow keys increases movement speed in UnigineEditor, but you can also press RMB to rotate the camera (because these shortcuts use the PARTIAL type). The default type is EXACT (to activate a shortcut nothing else should be pressed in addition to its combination).
type | Match type to be set. |
void UnigineEditor::Shortcut::setMouseButtonMask | ( | int | mask | ) |
Sets the mask that defines mouse inputs combination for the shortcut.
mask | Mouse mask to be set (see MOUSE_MASK). |
void UnigineEditor::Shortcut::setMouseWheel | ( | Shortcut::MOUSE_WHEEL | wheel | ) |
Sets the mask that defines the mouse wheel combination for the shortcut MOUSE_WHEEL.
wheel | Mask to be set. |
void UnigineEditor::Shortcut::setTitle | ( | const char * | title | ) |
Sets the title to be displayed for the shortcut in UnigineEditor.
title | Title text to be set. |
void UnigineEditor::Shortcut::setTooltip | ( | const char * | tooltip | ) |
Sets the tooltip to be displayed for the shortcut in UnigineEditor.
tooltip | Tooltip text to be set. |
void UnigineEditor::Shortcut::setTransparent | ( | bool | transparent | ) |
Sets the value indicating if the shortcut is 'transparent' for input events that have triggered it (passes them further through the Input system). The default value is 'false'.
transparent | true to make the shortcut 'transparent' for input events (pass them further); false - to make the shortcut consume input events without passing them further. |
void UnigineEditor::Shortcut::setVisible | ( | bool | visible | ) |
Sets the value indicating if the shortcut is to be displayed in UnigineEditor (Windows - Settings - Hotkeys). The default value is 'true'.
visible | true to make it displayed in UnigineEditor (Windows - Settings - Hotkeys); false - to make it hidden. |
Unigine::String UnigineEditor::Shortcut::toString | ( | ) | const |
Returns the shortcut combination as a text string (e.g., 'Ctrl + A').