The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
hotkey::hotkey_command Struct Reference

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_commandnull_command ()
 returns the command that is treated as null More...
 
static const hotkey_commandget_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
 

Detailed Description

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.

Constructor & Destructor Documentation

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.

Member Function Documentation

const hotkey_command & hotkey::hotkey_command::get_command_by_command ( hotkey::HOTKEY_COMMAND  command)
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.

const hotkey_command & hotkey::hotkey_command::null_command ( )
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().

Member Data Documentation

const std::string hotkey::hotkey_command::command
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
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().


The documentation for this struct was generated from the following files: