(svn r25410) -Codechange: Put all hotkeys of a window into a static HotkeyList member.

This commit is contained in:
frosch
2013-06-15 15:28:09 +00:00
parent 40c2864e4d
commit 1b8b1f3f6c
12 changed files with 123 additions and 99 deletions

View File

@@ -32,7 +32,30 @@ struct Hotkey {
#define HOTKEY_LIST_END Hotkey((uint16)0, NULL, -1)
int CheckHotkeyMatch(Hotkey *list, uint16 keycode, bool global_only = false);
struct IniFile;
/**
* List of hotkeys for a window.
*/
struct HotkeyList {
HotkeyList(const char *ini_group, Hotkey *items);
~HotkeyList();
void Load(IniFile *ini);
void Save(IniFile *ini) const;
int CheckMatch(uint16 keycode, bool global_only = false) const;
private:
const char *ini_group;
Hotkey *items;
/**
* Dummy private copy constructor to prevent compilers from
* copying the structure, which fails due to _hotkey_lists.
*/
HotkeyList(const HotkeyList &other);
};
bool IsQuitKey(uint16 keycode);