Back to index

im-sdk  12.3.91
IMHotkeyPrimitive.hh
Go to the documentation of this file.
00001 #ifndef IM_HOTKEY_PRIMITIVE_HH_
00002 #define IM_HOTKEY_PRIMITIVE_HH_
00003 
00004 class IMKeySpec;
00005 typedef list<IMKeySpec> IMKeySpecList;
00006 
00007 class IMHotkey
00008 {
00009   int hotkey_id;
00010   int state_flag;
00011   int action_flag;
00012   IMKeySpecList keys;
00013   u16string label;
00014 
00015 private:
00016 
00017   IMKeySpecList* get_keylist() { return &keys; }
00018 
00019 public:
00020 
00021   const int get_hotkey_id() const { return hotkey_id; }
00022   const int get_state_flag() const { return state_flag; }
00023   const int get_action_flag() const { return action_flag; }
00024   const IMKeySpecList* get_keylist() const { return &keys; } 
00025   const u16string& get_label() const { return label; }
00026 
00027   IMHotkey(
00028       int a_id,
00029       const IMHotkeyStruct& hk,
00030       const u16string& label);
00031   IMHotkey(
00032       int a_id,
00033       int sflag,
00034       int aflag,
00035       const IMKeySpecList& a_keys,
00036       const u16string& a_label
00037   ) : hotkey_id(a_id), state_flag(sflag),
00038       action_flag(aflag), keys(a_keys), label(a_label) {}
00039 
00040 friend class IIIMP_hotkey_profile;
00041 
00042 };
00043 
00044 typedef list<IMHotkey> IMHotkeyList;
00045 
00046 class IMHotkeyProfile {
00047 
00048 private:
00049 
00050   IMHotkeyList hklist;
00051   int profile_id;
00052   const IMHotkeyProfileStruct *hotkey_profile_struct;
00053 
00054 private:
00055 
00056   IMHotkeyList *get_hotkey_list() { return &hklist; }
00057 
00058 public:
00059 
00060   const int get_profile_id() const
00061   { return profile_id; }
00062   const IMHotkeyList *get_hotkey_list() const
00063   { return &hklist; }
00064   const IMHotkeyProfileStruct *get_hotkey_profile_struct() const
00065   { return hotkey_profile_struct; }
00066 
00067   IMHotkeyProfile(
00068       int a_id,
00069       int hk_id, 
00070       const IMHotkeyProfileStruct *imhkp
00071   );
00072   IMHotkeyProfile(
00073       int a_id, 
00074       const IMHotkeyList& a_hklist
00075   ) : profile_id(a_id), hklist(a_hklist), hotkey_profile_struct(NULL) {}
00076 
00077 
00078 friend class IIIMP_hotkey_profile;
00079 };
00080 
00081 typedef list<IMHotkeyProfile> IMHotkeyProfileList ;
00082 
00083 #endif