• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

xap_Menu_Layouts.h

Go to the documentation of this file.
00001 /* AbiSource Application Framework
00002  * Copyright (C) 1998 AbiSource, Inc.
00003  *
00004  * This program is free software; you can redistribute it and/or
00005  * modify it under the terms of the GNU General Public License
00006  * as published by the Free Software Foundation; either version 2
00007  * of the License, or (at your option) any later version.
00008  *
00009  * This program is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  * GNU General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU General Public License
00015  * along with this program; if not, write to the Free Software
00016  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
00017  * 02110-1301 USA.
00018  */
00019 
00020 
00021 #ifndef XAP_MENU_LAYOUTS_H
00022 #define XAP_MENU_LAYOUTS_H
00023 
00024 #include "ev_Menu_Layouts.h"
00025 /* #include "ev_Menu_Labels.h" */
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 /* XAP_MENU_LAYOUTS_H */

Generated on Sun Feb 14 2021 for AbiWord by  doxygen 1.7.1