Back to index

im-sdk  12.3.91
LEMgr.hh
Go to the documentation of this file.
00001 #ifndef LEMGR_HH_
00002 #define LEMGR_HH_
00003 #include <string>
00004 #include <map>
00005 #include <vector>
00006 #include "basictype.hh"
00007 #include "IMBasicObject.hh"
00008 #include "lexmlconf.h"
00009 #include "LE.hh"
00010 #include "SunIM.h"
00011 
00012 #include "IMHotkey.hh"
00013 
00014 class IMInputContext;
00015 
00016 class LEMgr
00017 {
00018     string lepath;
00019 
00020     typedef map<string, LEBase*> LEBaseMap;
00021     typedef vector<string> LENameVec;
00022     LEBaseMap lemap;
00023     LEBase *psunim_default_lebase;
00024     LENameVec reload_les;
00025     IIIMLEXMLConf *pxmllecfg;
00026 
00027     bool ledata_inited;
00028     bool loading_preferred_les;
00029     IMLangList langlist;
00030     IMImeInfoList imeinfolist;
00031     IMDescriptorList imdesclist;
00032     IMObjectWithDescList imobjectdesclist;
00033     typedef map<iml_desktop_t *, IMLangList> LEMgrDesktopLangMap;
00034     LEMgrDesktopLangMap lemgr_dlmap;
00035     typedef map<iml_desktop_t *, IMDescriptorList> LEMgrDesktopDescMap;
00036     LEMgrDesktopDescMap lemgr_ddmap;
00037 
00038     typedef map<IMHotkeyProfileStruct*, string> LEHotkeyProfileMap;
00039     LEHotkeyProfileMap le_hotkey_profile_map;
00040 
00041     bool initialize_ledata();
00042 
00043     void check_new_LEs();
00044     void check_reloaded_LEs();
00045     void listup_LEs();
00046 
00047   public:
00048     const IMLangList* get_all_langlist(iml_desktop_t *curr_desktop);
00049     const IMDescriptorList* get_all_imdesclist(iml_desktop_t *curr_desktop);
00050     const bool update_imdesclist(IMLEName *LEname, IMLocale *Locales, int nLocales);
00051     const IMObjectWithDescList* get_all_imobjectdesclist();
00052 
00053     IMHotkeyProfileStruct *get_hotkey_profiles(int *count_profiles);
00054 
00055     LEContext *choose_LE(
00056        IMInputContext *pic
00057     );
00058     void reload();
00059     void set_nsmap_config(IMNsMapStruct *nsm, int count);
00060     LEMgr(const char* lepath);
00061     LEMgr(const char* lepath, IIIMLEXMLConf &xml);
00062     LEMgr(const char* lepath, IIIMLEXMLConf &xml, bool preferred_loading);
00063     virtual ~LEMgr();
00064 };
00065 
00066 #endif /* not IMSVRARG_HH_ */
00067 
00068 /* Local Variables: */
00069 /* c-file-style: "iiim-project" */
00070 /* End: */