#include <hotkeys.hpp>
Public Types | |
enum | type { UNBOUND, BY_KEYCODE, BY_CHARACTER, CLEARED } |
Public Member Functions | |
hotkey_item () | |
hotkey_item (HOTKEY_COMMAND id, const std::string &command, const std::string &description, bool hidden=false) | |
HOTKEY_COMMAND | get_id () const |
const std::string & | get_command () const |
const std::string & | get_description () const |
void | load_from_config (const config &cfg) |
void | set_description (const std::string &description) |
void | clear_hotkey () |
void | set_key (int character, int keycode, bool shift, bool ctrl, bool alt, bool cmd) |
enum type | get_type () const |
int | get_character () const |
bool | get_alt () const |
bool | get_cmd () const |
bool | get_ctrl () const |
int | get_keycode () const |
bool | get_shift () const |
std::string | get_name () const |
bool | null () const |
bool | hidden () const |
Private Attributes | |
HOTKEY_COMMAND | id_ |
std::string | command_ |
std::string | description_ |
enum type | type_ |
int | character_ |
bool | ctrl_ |
bool | alt_ |
bool | cmd_ |
int | keycode_ |
bool | shift_ |
bool | hidden_ |
Definition at line 74 of file hotkeys.hpp.
hotkey::hotkey_item::hotkey_item | ( | ) | [inline] |
Definition at line 76 of file hotkeys.hpp.
hotkey::hotkey_item::hotkey_item | ( | HOTKEY_COMMAND | id, | |
const std::string & | command, | |||
const std::string & | description, | |||
bool | hidden = false | |||
) |
Definition at line 163 of file hotkeys.cpp.
HOTKEY_COMMAND hotkey::hotkey_item::get_id | ( | ) | const [inline] |
Definition at line 92 of file hotkeys.hpp.
References id_.
Referenced by hotkey::command_executor::get_menu_images(), hotkey::key_event_execute(), hotkey::load_hotkeys(), preferences::show_hotkeys_dialog(), and hotkey::command_executor::show_menu().
const std::string& hotkey::hotkey_item::get_command | ( | ) | const [inline] |
const std::string& hotkey::hotkey_item::get_description | ( | ) | const [inline] |
Definition at line 94 of file hotkeys.hpp.
References description_.
Referenced by hotkey::command_executor::get_menu_images(), and preferences::show_hotkeys_dialog().
void hotkey::hotkey_item::load_from_config | ( | const config & | cfg | ) |
Definition at line 186 of file hotkeys.cpp.
References alt_, BY_CHARACTER, BY_KEYCODE, character_, CLEARED, hotkey::CLEARED_TEXT, cmd_, ctrl_, ERR_CONFIG, keycode_, sdl_keysym_from_name(), shift_, utils::string_bool(), and type_.
Referenced by hotkey::load_hotkeys().
void hotkey::hotkey_item::set_description | ( | const std::string & | description | ) |
void hotkey::hotkey_item::clear_hotkey | ( | ) |
Definition at line 264 of file hotkeys.cpp.
References CLEARED, and type_.
Referenced by preferences::show_hotkeys_dialog().
void hotkey::hotkey_item::set_key | ( | int | character, | |
int | keycode, | |||
bool | shift, | |||
bool | ctrl, | |||
bool | alt, | |||
bool | cmd | |||
) |
Definition at line 269 of file hotkeys.cpp.
References alt_, BY_CHARACTER, BY_KEYCODE, character_, cmd_, ctrl_, keycode_, lexical_cast(), LOG_G, shift_, and type_.
Referenced by preferences::show_hotkeys_dialog().
enum type hotkey::hotkey_item::get_type | ( | ) | const [inline] |
int hotkey::hotkey_item::get_character | ( | ) | const [inline] |
bool hotkey::hotkey_item::get_alt | ( | ) | const [inline] |
bool hotkey::hotkey_item::get_cmd | ( | ) | const [inline] |
bool hotkey::hotkey_item::get_ctrl | ( | ) | const [inline] |
int hotkey::hotkey_item::get_keycode | ( | ) | const [inline] |
bool hotkey::hotkey_item::get_shift | ( | ) | const [inline] |
std::string hotkey::hotkey_item::get_name | ( | ) | const |
Definition at line 235 of file hotkeys.cpp.
References alt_, BY_CHARACTER, BY_KEYCODE, character_, cmd_, ctrl_, keycode_, shift_, and type_.
Referenced by hotkey::command_executor::get_menu_images(), move_unit(), and preferences::show_hotkeys_dialog().
bool hotkey::hotkey_item::null | ( | ) | const [inline] |
Definition at line 124 of file hotkeys.hpp.
References hotkey::HOTKEY_NULL, and id_.
Referenced by hotkey::key_event_execute(), move_unit(), and preferences::show_hotkeys_dialog().
bool hotkey::hotkey_item::hidden | ( | ) | const [inline] |
Definition at line 125 of file hotkeys.hpp.
HOTKEY_COMMAND hotkey::hotkey_item::id_ [private] |
std::string hotkey::hotkey_item::command_ [private] |
std::string hotkey::hotkey_item::description_ [private] |
enum type hotkey::hotkey_item::type_ [private] |
Definition at line 132 of file hotkeys.hpp.
Referenced by clear_hotkey(), get_name(), get_type(), load_from_config(), and set_key().
int hotkey::hotkey_item::character_ [private] |
Definition at line 135 of file hotkeys.hpp.
Referenced by get_character(), get_name(), load_from_config(), and set_key().
bool hotkey::hotkey_item::ctrl_ [private] |
Definition at line 136 of file hotkeys.hpp.
Referenced by get_ctrl(), get_name(), load_from_config(), and set_key().
bool hotkey::hotkey_item::alt_ [private] |
Definition at line 137 of file hotkeys.hpp.
Referenced by get_alt(), get_name(), load_from_config(), and set_key().
bool hotkey::hotkey_item::cmd_ [private] |
Definition at line 138 of file hotkeys.hpp.
Referenced by get_cmd(), get_name(), load_from_config(), and set_key().
int hotkey::hotkey_item::keycode_ [private] |
Definition at line 142 of file hotkeys.hpp.
Referenced by get_keycode(), get_name(), load_from_config(), and set_key().
bool hotkey::hotkey_item::shift_ [private] |
Definition at line 143 of file hotkeys.hpp.
Referenced by get_name(), get_shift(), load_from_config(), and set_key().
bool hotkey::hotkey_item::hidden_ [private] |
Definition at line 145 of file hotkeys.hpp.
Generated by doxygen 1.5.5 on 23 May 2008 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |