#include <hotkeys.hpp>

Public Types | |
| enum | type { UNBOUND, BY_KEYCODE, BY_CHARACTER, CLEARED, BUTTON, HAT } |
Public Member Functions | |
| hotkey_item () | |
| hotkey_item (HOTKEY_COMMAND id, const std::string &command, const t_string &description, bool hidden=false, scope s=SCOPE_GENERAL) | |
| HOTKEY_COMMAND | get_id () const |
| const std::string & | get_command () const |
| const t_string & | get_description () const |
| void | load_from_config (const config &cfg) |
| void | set_description (const t_string &description) |
| void | clear_hotkey () |
| void | set_button (int button, int joystick) |
| void | set_hat (int joystick, int hat, int value) |
| void | set_key (int character, int keycode, bool shift, bool ctrl, bool alt, bool cmd) |
| enum type | get_type () const |
| scope | get_scope () const |
| bool | is_in_active_scope () const |
| int | get_character () const |
| int | get_button () const |
| int | get_joystick () const |
| int | get_hat () const |
| int | get_value () 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_ |
| t_string | description_ |
| scope | scope_ |
| enum type | type_ |
| int | character_ |
| bool | ctrl_ |
| bool | alt_ |
| bool | cmd_ |
| bool | shift_ |
| int | keycode_ |
| int | button_ |
| int | joystick_ |
| int | hat_ |
| int | value_ |
| bool | hidden_ |
Definition at line 128 of file hotkeys.hpp.
Definition at line 168 of file hotkeys.hpp.
| hotkey::hotkey_item::hotkey_item | ( | ) | [inline] |
Definition at line 131 of file hotkeys.hpp.
| hotkey::hotkey_item::hotkey_item | ( | HOTKEY_COMMAND | id, | |
| const std::string & | command, | |||
| const t_string & | description, | |||
| bool | hidden = false, |
|||
| scope | s = SCOPE_GENERAL | |||
| ) |
Definition at line 335 of file hotkeys.cpp.
| void hotkey::hotkey_item::clear_hotkey | ( | ) |
Definition at line 495 of file hotkeys.cpp.
References type_.
| bool hotkey::hotkey_item::get_alt | ( | ) | const [inline] |
Definition at line 191 of file hotkeys.hpp.
References alt_.
| int hotkey::hotkey_item::get_button | ( | ) | const [inline] |
Definition at line 187 of file hotkeys.hpp.
References button_.
| int hotkey::hotkey_item::get_character | ( | ) | const [inline] |
Definition at line 186 of file hotkeys.hpp.
References character_.
| bool hotkey::hotkey_item::get_cmd | ( | ) | const [inline] |
Definition at line 192 of file hotkeys.hpp.
References cmd_.
| const std::string& hotkey::hotkey_item::get_command | ( | ) | const [inline] |
Definition at line 155 of file hotkeys.hpp.
References command_.
| bool hotkey::hotkey_item::get_ctrl | ( | ) | const [inline] |
Definition at line 193 of file hotkeys.hpp.
References ctrl_.
| const t_string& hotkey::hotkey_item::get_description | ( | ) | const [inline] |
Definition at line 156 of file hotkeys.hpp.
References description_.
Referenced by hotkey::command_executor::get_menu_images().

| int hotkey::hotkey_item::get_hat | ( | ) | const [inline] |
Definition at line 189 of file hotkeys.hpp.
References hat_.
| HOTKEY_COMMAND hotkey::hotkey_item::get_id | ( | ) | const [inline] |
Definition at line 154 of file hotkeys.hpp.
References id_.
Referenced by hotkey::button_event_execute(), hotkey::command_executor::get_menu_images(), hotkey::hat_event_execute(), gui2::event::thandler::hotkey_pressed(), hotkey::key_event_execute(), and hotkey::command_executor::show_menu().

| int hotkey::hotkey_item::get_joystick | ( | ) | const [inline] |
Definition at line 188 of file hotkeys.hpp.
References joystick_.
| int hotkey::hotkey_item::get_keycode | ( | ) | const [inline] |
Definition at line 196 of file hotkeys.hpp.
References keycode_.
| std::string hotkey::hotkey_item::get_name | ( | ) | const |
Definition at line 430 of file hotkeys.cpp.
References alt_, BUTTON, button_, BY_CHARACTER, BY_KEYCODE, character_, cmd_, ctrl_, HAT, hat_, joystick_, keycode_, shift_, type_, and value_.
Referenced by hotkey::command_executor::get_menu_images().

| scope hotkey::hotkey_item::get_scope | ( | ) | const [inline] |
Definition at line 181 of file hotkeys.hpp.
References scope_.
Referenced by is_in_active_scope().

| bool hotkey::hotkey_item::get_shift | ( | ) | const [inline] |
Definition at line 197 of file hotkeys.hpp.
References shift_.
| enum type hotkey::hotkey_item::get_type | ( | ) | const [inline] |
Definition at line 177 of file hotkeys.hpp.
References type_.
| int hotkey::hotkey_item::get_value | ( | ) | const [inline] |
Definition at line 190 of file hotkeys.hpp.
References value_.
| bool hotkey::hotkey_item::hidden | ( | ) | const [inline] |
Definition at line 203 of file hotkeys.hpp.
| bool hotkey::hotkey_item::is_in_active_scope | ( | ) | const [inline] |
Definition at line 183 of file hotkeys.hpp.
References get_scope(), and hotkey::is_scope_active().

| void hotkey::hotkey_item::load_from_config | ( | const config & | cfg | ) |
Definition at line 364 of file hotkeys.cpp.
References alt_, button_, character_, hotkey::CLEARED_TEXT, cmd_, ctrl_, ERR_CF, hat_, joystick_, keycode_, sdl_keysym_from_name(), shift_, utils::string_to_wstring(), type_, and value_.

| bool hotkey::hotkey_item::null | ( | ) | const [inline] |
Definition at line 202 of file hotkeys.hpp.
References id_.
Referenced by gui2::event::thandler::button_down(), hotkey::button_event_execute(), hotkey::hat_event_execute(), gui2::event::thandler::hat_motion(), gui2::event::thandler::key_down(), and hotkey::key_event_execute().

| void hotkey::hotkey_item::set_button | ( | int | button, | |
| int | joystick | |||
| ) |
Definition at line 500 of file hotkeys.cpp.
| void hotkey::hotkey_item::set_description | ( | const t_string & | description | ) |
Definition at line 491 of file hotkeys.cpp.
References description_.
| void hotkey::hotkey_item::set_hat | ( | int | joystick, | |
| int | hat, | |||
| int | value | |||
| ) |
| void hotkey::hotkey_item::set_key | ( | int | character, | |
| int | keycode, | |||
| bool | shift, | |||
| bool | ctrl, | |||
| bool | alt, | |||
| bool | cmd | |||
| ) |
Definition at line 515 of file hotkeys.cpp.
References alt_, character_, cmd_, ctrl_, keycode_, lexical_cast(), LOG_G, shift_, and type_.

bool hotkey::hotkey_item::alt_ [private] |
Definition at line 217 of file hotkeys.hpp.
Referenced by get_alt(), get_name(), load_from_config(), and set_key().
int hotkey::hotkey_item::button_ [private] |
Definition at line 226 of file hotkeys.hpp.
Referenced by get_button(), get_name(), load_from_config(), and set_button().
int hotkey::hotkey_item::character_ [private] |
Definition at line 215 of file hotkeys.hpp.
Referenced by get_character(), get_name(), load_from_config(), and set_key().
bool hotkey::hotkey_item::cmd_ [private] |
Definition at line 218 of file hotkeys.hpp.
Referenced by get_cmd(), get_name(), load_from_config(), and set_key().
std::string hotkey::hotkey_item::command_ [private] |
Definition at line 206 of file hotkeys.hpp.
Referenced by get_command().
bool hotkey::hotkey_item::ctrl_ [private] |
Definition at line 216 of file hotkeys.hpp.
Referenced by get_ctrl(), get_name(), load_from_config(), and set_key().
t_string hotkey::hotkey_item::description_ [private] |
Definition at line 207 of file hotkeys.hpp.
Referenced by get_description(), and set_description().
int hotkey::hotkey_item::hat_ [private] |
Definition at line 228 of file hotkeys.hpp.
Referenced by get_hat(), get_name(), load_from_config(), and set_hat().
bool hotkey::hotkey_item::hidden_ [private] |
Definition at line 231 of file hotkeys.hpp.
HOTKEY_COMMAND hotkey::hotkey_item::id_ [private] |
Definition at line 203 of file hotkeys.hpp.
int hotkey::hotkey_item::joystick_ [private] |
Definition at line 227 of file hotkeys.hpp.
Referenced by get_joystick(), get_name(), load_from_config(), set_button(), and set_hat().
int hotkey::hotkey_item::keycode_ [private] |
Definition at line 223 of file hotkeys.hpp.
Referenced by get_keycode(), get_name(), load_from_config(), and set_key().
scope hotkey::hotkey_item::scope_ [private] |
Definition at line 208 of file hotkeys.hpp.
Referenced by get_scope().
bool hotkey::hotkey_item::shift_ [private] |
Definition at line 222 of file hotkeys.hpp.
Referenced by get_name(), get_shift(), load_from_config(), and set_key().
enum type hotkey::hotkey_item::type_ [private] |
Definition at line 212 of file hotkeys.hpp.
Referenced by clear_hotkey(), get_name(), get_type(), load_from_config(), set_button(), set_hat(), and set_key().
int hotkey::hotkey_item::value_ [private] |
Definition at line 229 of file hotkeys.hpp.
Referenced by get_name(), get_value(), load_from_config(), and set_hat().
| Generated by doxygen 1.7.1 on Thu May 24 2012 01:24:26 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |