15 #ifndef HOTKEY_COMMAND_HPP_INCLUDED
16 #define HOTKEY_COMMAND_HPP_INCLUDED
20 #include <boost/ptr_container/ptr_vector.hpp>
bool null() const
checks weather this is the null hotkey_command
void set(CURSOR_TYPE type)
Use the default parameter to reset cursors.
boost::ptr_vector< hotkey_command > t_hotkey_command_list
scope
Available hotkey scopes.
void set_scope_active(scope s, bool set)
void add_wml_hotkey(const std::string &id, const t_string &description, const config &default_hotkey)
adds a new wml hotkey to the list, but only if there is no hotkey with that id yet on the list...
static const hotkey_command & null_command()
returns the command that is treated as null
bool is_scope_active(hk_scopes s)
Stores all information related to functions that can be bound to hotkeys.
void clear_hotkey_commands()
void set_active_scopes(hk_scopes s)
Keyboard shortcuts for game actions.
const std::string & get_tooltip(const std::string &command)
const t_string description
std::bitset< SCOPE_COUNT > hk_scopes
const char * description
description, tooltip are untranslated
void init_hotkey_commands()
const boost::ptr_vector< hotkey_command > & get_hotkey_commands()
returns a container that contains all currently active hotkey_commands.
const hotkey::hk_scopes scope
The visibility scope of the command.
void deactivate_all_scopes()
Do not use this outside hotkeys.cpp.
const std::string command
The command is unique.
hotkey_command()
the compiler want me to make a default constructor since most member are const, calling the default c...
const std::string & get_description(const std::string &command)
const hotkey_command & get_hotkey_null()
returns the hotkey_command that is treated as null.
hk_scopes prev_scope_active_
const hotkey::HOTKEY_COMMAND id
the names are strange: the "hotkey::HOTKEY_COMMAND" is named id, and the string to identify the objec...
bool has_hotkey_command(const std::string &id)
hotkey::HOTKEY_COMMAND id
const bool hidden
If hidden then don't show the command in the hotkey preferences.
A config object defines a single node in a WML file, with access to child nodes.
const hotkey_command & get_hotkey_command(const std::string &command)
returns the hotkey_command with the given name
void delete_all_wml_hotkeys()
deletes all wml hotkeys, should be called after a game has ended
bool remove_wml_hotkey(const std::string &id)
removes a wml hotkey with the given id, returns true if the deletion was successful ...
GLsizei const GLcharARB ** string
HOTKEY_COMMAND get_id(const std::string &command)
returns get_hotkey_command(command).id
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...