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
00022 #ifndef EV_UNIXMENU_H
00023 #define EV_UNIXMENU_H
00024
00025 #include "ut_types.h"
00026 #include "ut_vector.h"
00027 #include "xap_Types.h"
00028 #include "ev_Menu.h"
00029
00030 class AV_View;
00031 class XAP_UnixApp;
00032 class XAP_UnixFrameImpl;
00033 class XAP_Frame;
00034
00035
00036
00037 class EV_UnixMenu : public EV_Menu
00038 {
00039 public:
00040 class _wd;
00041
00042 EV_UnixMenu(XAP_UnixApp * pUnixApp,
00043 XAP_Frame * pFrame,
00044 const char * szMenuLayoutName,
00045 const char * szMenuLabelSetName);
00046 virtual ~EV_UnixMenu();
00047
00048 bool synthesizeMenu(GtkWidget * wMenuRoot, bool isPopup);
00049 bool menuEvent(XAP_Menu_Id id);
00050 virtual bool refreshMenu(AV_View * pView) = 0;
00051
00052 XAP_Frame * getFrame();
00053
00054 protected:
00055 bool _refreshMenu(AV_View * pView, GtkWidget * wMenuRoot);
00056 bool _isItemPresent(XAP_Menu_Id id) const;
00057 virtual bool _doAddMenuItem(UT_uint32 layout_pos);
00058
00059 protected:
00060 XAP_UnixApp * m_pUnixApp;
00061 XAP_Frame * m_pFrame;
00062
00063
00064 GtkAccelGroup * m_accelGroup;
00065
00066
00067 UT_GenericVector<GtkWidget*> m_vecMenuWidgets;
00068 private:
00069 void _convertStringToAccel(const char *s, guint &accel_key, GdkModifierType &ac_mods);
00070 GtkWidget * s_createNormalMenuEntry(const XAP_Menu_Id id,
00071 bool isCheckable,
00072 bool isRadio,
00073 bool isPopup,
00074 const char *szLabelName,
00075 const char *szMnemonicName);
00076 UT_GenericVector<_wd*> m_vecCallbacks;
00077 };
00078
00079 #endif