Public Types | Public Member Functions | Private Attributes

hotkey::hotkey_item Class Reference

#include <hotkeys.hpp>

Collaboration diagram for hotkey::hotkey_item:
Collaboration graph
[legend]

List of all members.

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_stringget_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_

Detailed Description

Definition at line 128 of file hotkeys.hpp.


Member Enumeration Documentation

Enumerator:
UNBOUND 
BY_KEYCODE 
BY_CHARACTER 
CLEARED 
BUTTON 
HAT 

Definition at line 168 of file hotkeys.hpp.


Constructor & Destructor Documentation

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.


Member Function Documentation

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().

Here is the caller graph for this function:

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]
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().

Here is the caller graph for this function:

scope hotkey::hotkey_item::get_scope (  )  const [inline]
Returns:
the scope of this hotkey

Definition at line 181 of file hotkeys.hpp.

References scope_.

Referenced by is_in_active_scope().

Here is the caller graph for this function:

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().

Here is the call graph for this function:

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_.

Here is the call graph for this function:

bool hotkey::hotkey_item::null (  )  const [inline]
void hotkey::hotkey_item::set_button ( int  button,
int  joystick 
)

Definition at line 500 of file hotkeys.cpp.

References button_, joystick_, and type_.

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 
)

Definition at line 507 of file hotkeys.cpp.

References hat_, joystick_, type_, and 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_.

Here is the call graph for this function:


Member Data Documentation

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().

Definition at line 226 of file hotkeys.hpp.

Referenced by get_button(), get_name(), load_from_config(), and set_button().

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().

Definition at line 216 of file hotkeys.hpp.

Referenced by get_ctrl(), get_name(), load_from_config(), and set_key().

Definition at line 207 of file hotkeys.hpp.

Referenced by get_description(), and set_description().

Definition at line 228 of file hotkeys.hpp.

Referenced by get_hat(), get_name(), load_from_config(), and set_hat().

Definition at line 231 of file hotkeys.hpp.

Definition at line 203 of file hotkeys.hpp.

Referenced by get_id(), and null().

Definition at line 227 of file hotkeys.hpp.

Referenced by get_joystick(), get_name(), load_from_config(), set_button(), and set_hat().

Definition at line 223 of file hotkeys.hpp.

Referenced by get_keycode(), get_name(), load_from_config(), and set_key().

Definition at line 208 of file hotkeys.hpp.

Referenced by get_scope().

Definition at line 222 of file hotkeys.hpp.

Referenced by get_name(), get_shift(), load_from_config(), and set_key().

Definition at line 229 of file hotkeys.hpp.

Referenced by get_name(), get_value(), load_from_config(), and set_hat().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated by doxygen 1.7.1 on Thu May 24 2012 01:24:26 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs