Stores all information related to functions that can be bound to hotkeys. More...
#include <hotkey_command.hpp>
Public Member Functions | |
hotkey_command () | |
the compiler want me to make a default constructor since most member are const, calling the default constructor is normally no use. More... | |
hotkey_command (hotkey::HOTKEY_COMMAND cmd, const std::string &id, const t_string &desc, bool hidden, hotkey::hk_scopes scope, const t_string &tooltip) | |
bool | null () const |
checks weather this is the null hotkey_command More... | |
Static Public Member Functions | |
static const hotkey_command & | null_command () |
returns the command that is treated as null More... | |
static const hotkey_command & | get_command_by_command (HOTKEY_COMMAND command) |
the execute_command argument was changed from HOTKEY_COMMAND to hotkey_command, to be able to call it with HOTKEY_COMMAND, this function was created More... | |
Public Attributes | |
const hotkey::HOTKEY_COMMAND | id |
the names are strange: the "hotkey::HOTKEY_COMMAND" is named id, and the string to identify the object is called "command" there is some inconstancy with that names in this file. More... | |
const std::string | command |
The command is unique. More... | |
const t_string | description |
const bool | hidden |
If hidden then don't show the command in the hotkey preferences. More... | |
const hotkey::hk_scopes | scope |
The visibility scope of the command. More... | |
const t_string | tooltip |
Stores all information related to functions that can be bound to hotkeys.
this is currently a semi struct: it haves a constructor, but only const-public members.
Definition at line 195 of file hotkey_command.hpp.
hotkey::hotkey_command::hotkey_command | ( | ) |
the compiler want me to make a default constructor since most member are const, calling the default constructor is normally no use.
Definition at line 413 of file hotkey_command.cpp.
References ERR_G.
hotkey::hotkey_command::hotkey_command | ( | hotkey::HOTKEY_COMMAND | cmd, |
const std::string & | id, | ||
const t_string & | desc, | ||
bool | hidden, | ||
hotkey::hk_scopes | scope, | ||
const t_string & | tooltip | ||
) |
Definition at line 419 of file hotkey_command.cpp.
|
static |
the execute_command argument was changed from HOTKEY_COMMAND to hotkey_command, to be able to call it with HOTKEY_COMMAND, this function was created
Definition at line 446 of file hotkey_command.cpp.
References command, ERR_G, and hotkey::get_hotkey_null().
Referenced by controller_base::handle_event(), gui2::tcontrol::signal_handler_show_tooltip(), play_controller::hotkey_handler::toggle_accelerated_speed(), and playsingle_controller::hotkey_handler::whiteboard_toggle().
bool hotkey::hotkey_command::null | ( | ) | const |
checks weather this is the null hotkey_command
Definition at line 429 of file hotkey_command.cpp.
References command, description, ERR_G, hotkey::HOTKEY_NULL, id, null_command(), and scope.
|
static |
returns the command that is treated as null
Definition at line 424 of file hotkey_command.cpp.
References hotkey::get_hotkey_null().
Referenced by null().
const std::string hotkey::hotkey_command::command |
The command is unique.
Definition at line 206 of file hotkey_command.hpp.
Referenced by gui2::tpreferences::add_hotkey_callback(), playsingle_controller::hotkey_handler::can_execute_command(), play_controller::hotkey_handler::execute_command(), get_command_by_command(), null(), and gui2::tpreferences::remove_hotkey_callback().
const t_string hotkey::hotkey_command::description |
Definition at line 208 of file hotkey_command.hpp.
Referenced by hotkey::get_description(), and null().
const bool hotkey::hotkey_command::hidden |
If hidden then don't show the command in the hotkey preferences.
Definition at line 210 of file hotkey_command.hpp.
const hotkey::HOTKEY_COMMAND hotkey::hotkey_command::id |
the names are strange: the "hotkey::HOTKEY_COMMAND" is named id, and the string to identify the object is called "command" there is some inconstancy with that names in this file.
This binds the command to a function. Does not need to be unique.
Definition at line 204 of file hotkey_command.hpp.
Referenced by help::help_button::can_execute_command(), playmp_controller::hotkey_handler::can_execute_command(), playsingle_controller::hotkey_handler::can_execute_command(), replay_controller::can_execute_command(), editor::editor_controller::can_execute_command(), play_controller::hotkey_handler::can_execute_command(), editor::editor_controller::execute_command(), play_controller::hotkey_handler::execute_command(), hotkey::command_executor::execute_command(), hotkey::execute_command(), hotkey::get_id(), hotkey::has_hotkey_command(), null(), hotkey::remove_wml_hotkey(), hotkey::command_executor_default::set_button_state(), editor::editor_controller::show_menu(), play_controller::hotkey_handler::show_menu(), and controller_base::show_menu().
const hotkey::hk_scopes hotkey::hotkey_command::scope |
The visibility scope of the command.
Definition at line 212 of file hotkey_command.hpp.
Referenced by gui2::tpreferences::add_hotkey_callback(), hotkey::hotkey_base::bindings_equal(), and null().
const t_string hotkey::hotkey_command::tooltip |
Definition at line 214 of file hotkey_command.hpp.
Referenced by hotkey::get_tooltip().