Editor API
UnigineEditor public API
|
This class is used to manage a shortcut context (add, remove shortcuts, define interaction with other contexts). More...
Inherits APIInterface.
Public Types | |
enum | TYPE { TYPE_SHARED = 0, TYPE_EXCLUSIVE } |
Context type, defines the way the shortcuts of this and other contexts are processed when this context is active. More... | |
Public Member Functions | |
Unigine::Ptr< Shortcut > | createShortcut (const char *shortcut_id) |
Creates a new shortcut with the given ID in the context and returns the created shortcut. More... | |
bool | removeShortcut (const char *shortcut_id) |
Removes the shortcut with the given ID from the context. More... | |
bool | hasShortcut (const char *shortcut_id) |
Returns a value indicating if a shortcut with the given ID exists in the context. More... | |
Unigine::Ptr< Shortcut > | getShortcut (const char *shortcut_id) |
Returns the shortcut with the given ID. More... | |
void | getShortcuts (Unigine::Vector< Unigine::Ptr< Shortcut >> &shortcuts) |
Collects all shortcuts of the context and puts them to the specified output vector. More... | |
void | setEnabled (bool enabled) |
Sets the value indicating if the context is enabled and can become active. This parameter (unlike the setActive) can be changed from anywhere (not only by the context creator). For example, from a plugin to use the same shortcuts as the Editor by simply disabling the unwanted context (you can also disable unwanted shortcuts individually via Shortcut::setEnabled). More... | |
bool | isEnabled () const |
Returns the value indicating if the context is enabled and can become active. This parameter (unlike the setActive) can be changed from anywhere (not only by the context creator). For example, from a plugin to use the same shortcuts as the Editor by simply disabling the unwanted context (you can also disable unwanted shortcuts individually via Shortcut::setEnabled). More... | |
void | setActive (bool active) |
Sets the value indicating if the context is currently active (its shortcuts are taken into account in the framework of input processing). This parameter can only be changed by the context creator. More... | |
bool | isActive () const |
Returns the value indicating if the context is currently active (its shortcuts are taken into account in the framework of input processing). This parameter can only be changed by the context creator. More... | |
const char * | getID () const |
Returns the ID of the context. More... | |
const char * | getTitle () const |
Returns the title of the context to be displayed in UnigineEditor. More... | |
ShortcutContext::TYPE | getType () const |
Returns the type of the context, defining the way the shortcuts of this and other contexts are processed when this context is active. More... | |
int | getPriority () const |
Returns the priority of the context. The priority defines which of the identical shortcuts of several active concurring contexts are to be processed (a context with a higher priority value takes precedence over others). More... | |
This class is used to manage a shortcut context (add, remove shortcuts, define interaction with other contexts).
Context type, defines the way the shortcuts of this and other contexts are processed when this context is active.
Unigine::Ptr<Shortcut> UnigineEditor::ShortcutContext::createShortcut | ( | const char * | shortcut_id | ) |
Creates a new shortcut with the given ID in the context and returns the created shortcut.
shortcut_id | ID of the shortcut to be created. |
const char* UnigineEditor::ShortcutContext::getID | ( | ) | const |
Returns the ID of the context.
int UnigineEditor::ShortcutContext::getPriority | ( | ) | const |
Returns the priority of the context. The priority defines which of the identical shortcuts of several active concurring contexts are to be processed (a context with a higher priority value takes precedence over others).
Unigine::Ptr<Shortcut> UnigineEditor::ShortcutContext::getShortcut | ( | const char * | shortcut_id | ) |
Returns the shortcut with the given ID.
shortcut_id | ID of the shortcut to be retrieved. |
void UnigineEditor::ShortcutContext::getShortcuts | ( | Unigine::Vector< Unigine::Ptr< Shortcut >> & | shortcuts | ) |
Collects all shortcuts of the context and puts them to the specified output vector.
shortcuts | Output vector, to receive the list of shortcuts. |
const char* UnigineEditor::ShortcutContext::getTitle | ( | ) | const |
Returns the title of the context to be displayed in UnigineEditor.
ShortcutContext::TYPE UnigineEditor::ShortcutContext::getType | ( | ) | const |
Returns the type of the context, defining the way the shortcuts of this and other contexts are processed when this context is active.
bool UnigineEditor::ShortcutContext::hasShortcut | ( | const char * | shortcut_id | ) |
Returns a value indicating if a shortcut with the given ID exists in the context.
shortcut_id | ID of the shortcut to be checked. |
bool UnigineEditor::ShortcutContext::isActive | ( | ) | const |
Returns the value indicating if the context is currently active (its shortcuts are taken into account in the framework of input processing). This parameter can only be changed by the context creator.
bool UnigineEditor::ShortcutContext::isEnabled | ( | ) | const |
Returns the value indicating if the context is enabled and can become active. This parameter (unlike the setActive) can be changed from anywhere (not only by the context creator). For example, from a plugin to use the same shortcuts as the Editor by simply disabling the unwanted context (you can also disable unwanted shortcuts individually via Shortcut::setEnabled).
bool UnigineEditor::ShortcutContext::removeShortcut | ( | const char * | shortcut_id | ) |
Removes the shortcut with the given ID from the context.
shortcut_id | ID of the shortcut to be removed. |
void UnigineEditor::ShortcutContext::setActive | ( | bool | active | ) |
Sets the value indicating if the context is currently active (its shortcuts are taken into account in the framework of input processing). This parameter can only be changed by the context creator.
active | Value indicating if the context is active. |
void UnigineEditor::ShortcutContext::setEnabled | ( | bool | enabled | ) |
Sets the value indicating if the context is enabled and can become active. This parameter (unlike the setActive) can be changed from anywhere (not only by the context creator). For example, from a plugin to use the same shortcuts as the Editor by simply disabling the unwanted context (you can also disable unwanted shortcuts individually via Shortcut::setEnabled).
enabled | Value indicating if the context is enabled. |