template class EE::UI::UICommandShortcutBinding¶
Overview¶
Scoped binding of a command to a shortcut consumed by UISceneNode or UIWindow. More…
#include <uicommand.hpp> template <typename Target> class UICommandShortcutBinding { public: // structs struct State; // construction UICommandShortcutBinding(); UICommandShortcutBinding(UICommand& command, Target& target, const KeyBindings::Shortcut& shortcut); UICommandShortcutBinding(const UICommandShortcutBinding&); UICommandShortcutBinding(UICommandShortcutBinding&& other); ~UICommandShortcutBinding(); // methods UICommandShortcutBinding& operator=(const UICommandShortcutBinding&); UICommandShortcutBinding& operator=(UICommandShortcutBinding&& other); void disconnect(); operator bool() const; };
Detailed Documentation¶
Scoped binding of a command to a shortcut consumed by UISceneNode or UIWindow.
The previous command mapped to the shortcut is restored when this binding disconnects. The generated command registration and shortcut are removed safely when the target closes first.
Construction¶
UICommandShortcutBinding(UICommand& command, Target& target, const KeyBindings::Shortcut& shortcut)
Registers shortcut on target as another endpoint for command.
If the shortcut was already mapped, that mapping is restored when this binding disconnects.
Methods¶
void disconnect()
Removes this shortcut endpoint and restores any previous mapping.