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