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 EV_MENU_H
00021 #define EV_MENU_H
00022
00023
00024
00025
00026
00027
00028 #include "ut_types.h"
00029 #include "xap_Types.h"
00030
00031 class EV_EditMethodContainer;
00032 class EV_EditMethod;
00033 class EV_Menu_Layout;
00034 class EV_Menu_LabelSet;
00035 class EV_Menu_Action;
00036 class EV_Menu_Label;
00037 class AV_View;
00038 class XAP_App;
00039 class XAP_Frame;
00040 class UT_String;
00041
00042 class ABI_EXPORT EV_Menu
00043 {
00044 public:
00045 EV_Menu(XAP_App* pApp,
00046 EV_EditMethodContainer * pEMC,
00047 const char * szMenuLayoutName,
00048 const char * szMenuLanguageName);
00049 virtual ~EV_Menu();
00050
00051 bool invokeMenuMethod(AV_View * pView,
00052 EV_EditMethod * pEM,
00053 UT_UCSChar * pData,
00054 UT_uint32 dataLength);
00055
00056 bool invokeMenuMethod(AV_View* pView,
00057 EV_EditMethod* pEM,
00058 const UT_String& szScriptName);
00059
00060 const EV_Menu_Layout * getLayout() const { return m_pMenuLayout; }
00061 const EV_Menu_LabelSet * getLabelSet() const { return m_pMenuLabelSet; }
00062 EV_Menu_Layout * getLayout() { return m_pMenuLayout; }
00063 EV_Menu_LabelSet * getLabelSet() { return m_pMenuLabelSet; }
00064
00065 XAP_Menu_Id addMenuItem(const UT_String& path, const UT_String& description);
00066
00067 protected:
00068 const char ** getLabelName(XAP_App * pApp,
00069 const EV_Menu_Action * pAction, const EV_Menu_Label * pLabel);
00070 XAP_App * getApp() { return m_pApp; }
00071
00072
00073 EV_EditMethodContainer * m_pEMC;
00074 EV_Menu_Layout * m_pMenuLayout;
00075 EV_Menu_LabelSet * m_pMenuLabelSet;
00076
00077 protected:
00078 virtual bool _doAddMenuItem(UT_uint32 layout_pos) = 0;
00079
00080 private:
00081 XAP_App * m_pApp;
00082 };
00083
00084 XAP_Menu_Id EV_searchMenuLabel(const EV_Menu_LabelSet* labels, const UT_String &label);
00085
00086 #endif