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
00021 #ifndef XAP_MENU_LAYOUTS_H
00022 #define XAP_MENU_LAYOUTS_H
00023
00024 #include "ev_Menu_Layouts.h"
00025
00026 #include "ev_EditBits.h"
00027 #include "xap_Features.h"
00028
00029 class EV_Menu_LabelSet;
00030
00031 class XAP_App;
00032 class XAP_StringSet;
00033
00034 class _vectt;
00035
00036 class ABI_EXPORT XAP_Menu_Factory
00037 {
00038 public:
00039
00040 XAP_Menu_Factory(XAP_App * pApp);
00041 ~XAP_Menu_Factory(void);
00042 EV_Menu_Layout * CreateMenuLayout(const char * szName);
00043 const char * FindContextMenu(EV_EditMouseContext emc);
00044 XAP_Menu_Id addNewMenuAfter(const char * szMenu,
00045 const char * szLanguage,
00046 const XAP_Menu_Id afterID,
00047 EV_Menu_LayoutFlags flags,
00048 XAP_Menu_Id newID = 0);
00049 XAP_Menu_Id addNewMenuAfter(const char * szMenu,
00050 const char * szLanguage,
00051 const char * szAfter,
00052 EV_Menu_LayoutFlags flags,
00053 XAP_Menu_Id menuID = 0);
00054 XAP_Menu_Id addNewMenuBefore(const char * szMenu,
00055 const char * szLanguage,
00056 const XAP_Menu_Id beforeID,
00057 EV_Menu_LayoutFlags flags,
00058 XAP_Menu_Id newID = 0);
00059 XAP_Menu_Id addNewMenuBefore(const char * szMenu,
00060 const char * szLanguage,
00061 const char * szBefore,
00062 EV_Menu_LayoutFlags flags, XAP_Menu_Id menuID = 0);
00063 XAP_Menu_Id getNewID(void);
00064 XAP_Menu_Id removeMenuItem(const char * szMenu,
00065 const char * szLanguage,
00066 XAP_Menu_Id nukeID);
00067 XAP_Menu_Id removeMenuItem(const char * szMenu,
00068 const char * szLanguage,
00069 const char * szNuke);
00070 void resetMenusToDefault(void);
00071 UT_uint32 GetMenuLabelSetLanguageCount(void);
00072 const char * GetNthMenuLabelLanguageName(UT_uint32 ndx);
00073 EV_Menu_LabelSet * CreateMenuLabelSet(const char * szLanguage_);
00074 bool buildMenuLabelSet(const char * szLanguage_);
00075 bool buildBuiltInMenuLabelSet( EV_Menu_LabelSet *& pLabelSet);
00076 bool addNewLabel(const char * szMenu,
00077 XAP_Menu_Id newID,
00078 const char * szNewLabel,
00079 const char * szNewTooltip);
00080 bool removeLabel(const char * szMenu,
00081 XAP_Menu_Id nukeID);
00082
00083 void resetLabelsToDefault(void);
00084
00085 EV_EditMouseContext createContextMenu(const char * szMenu);
00086 void removeContextMenu(EV_EditMouseContext menuID);
00087
00088 private:
00089
00090 UT_GenericVector<_vectt *> m_vecTT;
00091 XAP_App * m_pApp;
00092 EV_Menu_LabelSet * m_pLabelSet;
00093 EV_Menu_LabelSet * m_pEnglishLabelSet;
00094 XAP_Menu_Id m_maxID;
00095 XAP_StringSet * m_pBSS;
00096 EV_EditMouseContext m_NextContext;
00097 };
00098 #endif