hotkey::hotkey_item Class Reference

#include <hotkeys.hpp>

List of all members.

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_


Detailed Description

Definition at line 74 of file hotkeys.hpp.


Member Enumeration Documentation

Enumerator:
UNBOUND 
BY_KEYCODE 
BY_CHARACTER 
CLEARED 

Definition at line 102 of file hotkeys.hpp.


Constructor & Destructor Documentation

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.


Member Function Documentation

HOTKEY_COMMAND hotkey::hotkey_item::get_id (  )  const [inline]

const std::string& hotkey::hotkey_item::get_command (  )  const [inline]

Definition at line 93 of file hotkeys.hpp.

References command_.

const std::string& hotkey::hotkey_item::get_description (  )  const [inline]

void hotkey::hotkey_item::load_from_config ( const config cfg  ) 

void hotkey::hotkey_item::set_description ( const std::string &  description  ) 

Definition at line 260 of file hotkeys.cpp.

References 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 
)

enum type hotkey::hotkey_item::get_type (  )  const [inline]

Definition at line 109 of file hotkeys.hpp.

References type_.

int hotkey::hotkey_item::get_character (  )  const [inline]

Definition at line 112 of file hotkeys.hpp.

References character_.

bool hotkey::hotkey_item::get_alt (  )  const [inline]

Definition at line 113 of file hotkeys.hpp.

References alt_.

bool hotkey::hotkey_item::get_cmd (  )  const [inline]

Definition at line 114 of file hotkeys.hpp.

References cmd_.

bool hotkey::hotkey_item::get_ctrl (  )  const [inline]

Definition at line 115 of file hotkeys.hpp.

References ctrl_.

int hotkey::hotkey_item::get_keycode (  )  const [inline]

Definition at line 118 of file hotkeys.hpp.

References keycode_.

bool hotkey::hotkey_item::get_shift (  )  const [inline]

Definition at line 119 of file hotkeys.hpp.

References shift_.

std::string hotkey::hotkey_item::get_name (  )  const

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.


Member Data Documentation

Definition at line 125 of file hotkeys.hpp.

Referenced by get_id(), and null().

std::string hotkey::hotkey_item::command_ [private]

Definition at line 128 of file hotkeys.hpp.

Referenced by get_command().

std::string hotkey::hotkey_item::description_ [private]

Definition at line 129 of file hotkeys.hpp.

Referenced by get_description(), and set_description().

Definition at line 132 of file hotkeys.hpp.

Referenced by clear_hotkey(), get_name(), get_type(), load_from_config(), and set_key().

Definition at line 135 of file hotkeys.hpp.

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

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

Definition at line 142 of file hotkeys.hpp.

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

Definition at line 143 of file hotkeys.hpp.

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

Definition at line 145 of file hotkeys.hpp.


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

Generated by doxygen 1.5.5 on 23 May 2008 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs