• 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., 59 Temple Place - Suite 330, Boston, MA
00017  * 02111-1307, 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 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 /* XAP_MENU_LAYOUTS_H */

Generated on Mon May 28 2012 for AbiWord by  doxygen 1.7.1