Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef AP_LOADBINDINGS_H
00021 #define AP_LOADBINDINGS_H
00022 #include "xap_LoadBindings.h"
00023 #include "ev_EditBits.h"
00024 #include "ut_vector.h"
00025 #include "ut_string.h"
00026
00027 class EV_EditMethodContainer;
00028 class EV_EditBindingMap;
00029 class AP_BindingSet;
00031 #if defined(PT_TEST) || defined(FMT_TEST) || defined(UT_TEST)
00032 # define FN_TEST_DUMP "Test_Dump"
00033 # define FN_TEST_FTR "Test_Ftr"
00034 #else
00035 # define FN_TEST_DUMP ""
00036 # define FN_TEST_FTR ""
00037 #endif
00038
00040
00041
00042 struct ap_bs_Mouse
00043 {
00044 EV_EditBits m_eb;
00045 const char * m_szMethod[EV_COUNT_EMO];
00046 };
00047
00048
00049 struct ap_bs_NVK
00050 {
00051 EV_EditBits m_eb;
00052 const char * m_szMethod[EV_COUNT_EMS];
00053 };
00054
00055
00056
00057 struct ap_bs_NVK_Prefix
00058 {
00059 EV_EditBits m_eb;
00060 const char * m_szMapName[EV_COUNT_EMS];
00061 };
00062
00063
00064 struct ap_bs_Char
00065 {
00066 EV_EditBits m_eb;
00067 const char * m_szMethod[EV_COUNT_EMS_NoShift];
00068 };
00069
00070
00071
00072 struct ap_bs_Char_Prefix
00073 {
00074 EV_EditBits m_eb;
00075 const char * m_szMapName[EV_COUNT_EMS_NoShift];
00076 };
00077
00078
00079 typedef bool (*ap_LoadBindings_pFn)(AP_BindingSet * pThis, EV_EditBindingMap * pebm);
00080
00081 class ABI_EXPORT c_lb
00082 {
00083 public:
00084 c_lb(c_lb * pc_lb);
00085 c_lb( bool bCycle, const char * name, ap_LoadBindings_pFn fn, EV_EditBindingMap * pebm);
00086 ~c_lb(void);
00087 bool m_bCanCycle;
00088 char * m_name;
00089 ap_LoadBindings_pFn m_fn;
00090 EV_EditBindingMap * m_pebm;
00091 };
00092
00093
00094
00095 class ABI_EXPORT AP_BindingSet : public XAP_BindingSet
00096 {
00097 public:
00098 AP_BindingSet(EV_EditMethodContainer * pemc);
00099 virtual ~AP_BindingSet(void);
00100
00101 virtual EV_EditBindingMap * getMap(const char * szName);
00102 void loadBuiltin(void);
00103 EV_EditBindingMap * createMap(const char * szName);
00104 void _loadChar( EV_EditBindingMap* pebm,
00105 const ap_bs_Char* pCharTable,
00106 UT_uint32 cCharTable,
00107 const ap_bs_Char_Prefix* pCharPrefixTable,
00108 UT_uint32 cCharPrefixTable);
00109 void _loadNVK( EV_EditBindingMap* pebm,
00110 const ap_bs_NVK* pNVK,
00111 UT_uint32 cNVK,
00112 const ap_bs_NVK_Prefix* pNVKPrefix,
00113 UT_uint32 cNVKPrefix);
00114 void _loadMouse(EV_EditBindingMap* pebm,
00115 const ap_bs_Mouse* pMouseTable,
00116 UT_uint32 cMouseTable);
00117
00118 const char * getNextInCycle(const char * szCurrent);
00119 private:
00120 UT_GenericVector<c_lb *> m_vecBindings;
00121 };
00122
00123 #endif
00124