.. index:: pair: class; EE::UI::UICommandShortcutBinding .. _doxid-class_e_e_1_1_u_i_1_1_u_i_command_shortcut_binding: template class EE::UI::UICommandShortcutBinding =============================================== .. toctree:: :hidden: struct_EE_UI_UICommandShortcutBinding_State.rst Overview ~~~~~~~~ Scoped binding of a command to a shortcut consumed by :ref:`UISceneNode ` or :ref:`UIWindow `. :ref:`More...` .. ref-code-block:: cpp :class: doxyrest-overview-code-block #include template class UICommandShortcutBinding { public: // structs struct :ref:`State`; // construction :target:`UICommandShortcutBinding`(); :ref:`UICommandShortcutBinding`(:ref:`UICommand`& command, Target& target, const :ref:`KeyBindings::Shortcut`& shortcut); :target:`UICommandShortcutBinding`(const UICommandShortcutBinding&); :target:`UICommandShortcutBinding`(UICommandShortcutBinding&& other); :target:`~UICommandShortcutBinding`(); // methods UICommandShortcutBinding& :target:`operator=`(const UICommandShortcutBinding&); UICommandShortcutBinding& :target:`operator=`(UICommandShortcutBinding&& other); void :ref:`disconnect`(); :target:`operator bool`() const; }; .. _details-class_e_e_1_1_u_i_1_1_u_i_command_shortcut_binding: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ Scoped binding of a command to a shortcut consumed by :ref:`UISceneNode ` or :ref:`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 ------------ .. index:: pair: function; UICommandShortcutBinding .. _doxid-class_e_e_1_1_u_i_1_1_u_i_command_shortcut_binding_1ac678c992be6cfeeb8648c276651f88ea: .. ref-code-block:: cpp :class: doxyrest-title-code-block UICommandShortcutBinding(:ref:`UICommand`& command, Target& target, const :ref:`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 ------- .. index:: pair: function; disconnect .. _doxid-class_e_e_1_1_u_i_1_1_u_i_command_shortcut_binding_1a3862f0354a6c834d6fec66c217daad45: .. ref-code-block:: cpp :class: doxyrest-title-code-block void disconnect() Removes this shortcut endpoint and restores any previous mapping.