Used as the main paramneter for can_execute_command/do_execute_command These functions are used to execute hotkeys but also to execute menu items, (Most menu items point to the same action as a hotkey but not all) More...
#include <command_executor.hpp>
Public Member Functions | |
ui_command (hotkey::HOTKEY_COMMAND hotkey_command, std::string_view id, int index=-1) | |
ui_command (const hotkey::hotkey_command &cmd, int index=-1) | |
ui_command (std::string_view id, int index=-1) | |
Public Attributes | |
hotkey::HOTKEY_COMMAND | hotkey_command |
The hotkey::HOTKEY_COMMAND associated with this action, HOTKEY_NULL for actions that don't allow hotkey binding. More... | |
std::string | id |
The string command, never empty, describes the action uniquely. when the action is the result of a menu click. More... | |
int | index |
When this action was the result of a menu click, this is the index of the clicked item in the menu. More... | |
Used as the main paramneter for can_execute_command/do_execute_command These functions are used to execute hotkeys but also to execute menu items, (Most menu items point to the same action as a hotkey but not all)
Definition at line 31 of file command_executor.hpp.
|
inline |
Definition at line 44 of file command_executor.hpp.
|
inlineexplicit |
Definition at line 49 of file command_executor.hpp.
|
inlineexplicit |
Definition at line 53 of file command_executor.hpp.
References hotkey::hotkey_command::command, and hotkey::get_hotkey_command().
hotkey::HOTKEY_COMMAND hotkey::ui_command::hotkey_command |
The hotkey::HOTKEY_COMMAND associated with this action, HOTKEY_NULL for actions that don't allow hotkey binding.
different actions of the ame type might have the same HOTKEY_COMMAND (like different wml menu items that allow imposible to make typos in the id and its faster, plus c++ unfortunateley doesn't allow switch statements with
Definition at line 38 of file command_executor.hpp.
Referenced by replay_controller::can_execute_command(), playsingle_controller::hotkey_handler::can_execute_command(), editor::editor_controller::can_execute_command(), play_controller::hotkey_handler::can_execute_command(), playmp_controller::hotkey_handler::can_execute_command(), hotkey::command_executor::do_execute_command(), editor::editor_controller::do_execute_command(), play_controller::hotkey_handler::get_action_state(), playsingle_controller::hotkey_handler::get_action_state(), editor::editor_controller::get_action_state(), play_controller::hotkey_handler::in_context_menu(), and editor::editor_controller::show_menu().
std::string hotkey::ui_command::id |
The string command, never empty, describes the action uniquely. when the action is the result of a menu click.
Definition at line 41 of file command_executor.hpp.
Referenced by playsingle_controller::hotkey_handler::can_execute_command(), and play_controller::hotkey_handler::do_execute_command().
int hotkey::ui_command::index |
When this action was the result of a menu click, this is the index of the clicked item in the menu.
Definition at line 43 of file command_executor.hpp.
Referenced by editor::editor_controller::can_execute_command(), editor::editor_controller::do_execute_command(), and editor::editor_controller::get_action_state().