The Battle for Wesnoth  1.17.0+dev
Namespaces | Macros | Functions | Variables
hotkey_command.cpp File Reference
#include "hotkey/hotkey_command.hpp"
#include "config.hpp"
#include "gettext.hpp"
#include "hotkey/hotkey_item.hpp"
#include "log.hpp"
#include "preferences/general.hpp"
#include <array>
Include dependency graph for hotkey_command.cpp:

Go to the source code of this file.


 Keyboard shortcuts for game actions.


#define GETTEXT_DOMAIN   "wesnoth-lib"
#define ERR_G   LOG_STREAM(err, lg::general())
#define LOG_G   LOG_STREAM(info, lg::general())
#define DBG_G   LOG_STREAM(debug, lg::general())
#define ERR_CF   LOG_STREAM(err, log_config)


void hotkey::deactivate_all_scopes ()
void hotkey::set_scope_active (scope s, bool set)
void hotkey::set_active_scopes (hk_scopes s)
bool hotkey::is_scope_active (scope s)
bool hotkey::is_scope_active (hk_scopes s)
const hotkey_command & hotkey::get_hotkey_command (const std::string &command)
 returns the hotkey_command with the given name More...
const std::vector< hotkey_command > & hotkey::get_hotkey_commands ()
 returns a container that contains all currently active hotkey_commands. More...
bool hotkey::remove_wml_hotkey (const std::string &id)
 removes a wml hotkey with the given id, returns true if the deletion was successful More...
bool hotkey::has_hotkey_command (const std::string &id)
void hotkey::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. More...
const hotkey_command & hotkey::get_hotkey_null ()
 returns the hotkey_command that is treated as null. More...
void hotkey::delete_all_wml_hotkeys ()
 deletes all wml hotkeys, should be called after a game has ended More...
const std::string & hotkey::get_description (const std::string &command)
const std::string & hotkey::get_tooltip (const std::string &command)
void hotkey::init_hotkey_commands ()
void hotkey::clear_hotkey_commands ()
HOTKEY_COMMAND hotkey::get_id (const std::string &command)
 returns get_hotkey_command(command).id More...
const category_name_map_t & hotkey::get_category_names ()
 Returns the map of hotkey categories and their display names. More...
std::list< HOTKEY_COMMAND > hotkey::get_hotkeys_by_category (HOTKEY_CATEGORY category)
 Returns a list of all the hotkeys belonging to the given category. More...


static lg::log_domain log_config ("config")

Macro Definition Documentation


#define DBG_G   LOG_STREAM(debug, lg::general())

Definition at line 31 of file hotkey_command.cpp.

Referenced by hotkey::add_wml_hotkey().


#define ERR_CF   LOG_STREAM(err, log_config)

Definition at line 32 of file hotkey_command.cpp.

Referenced by hotkey::add_wml_hotkey().


#define ERR_G   LOG_STREAM(err, lg::general())


#define GETTEXT_DOMAIN   "wesnoth-lib"

Definition at line 16 of file hotkey_command.cpp.


#define LOG_G   LOG_STREAM(info, lg::general())

Definition at line 30 of file hotkey_command.cpp.

Referenced by hotkey::add_wml_hotkey(), and hotkey::remove_wml_hotkey().

Variable Documentation

◆ log_config

lg::log_domain log_config("config")