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 EV_UnixMenu(XAP_UnixApp * pUnixApp,
00041 XAP_Frame * pFrame,
00042 const char * szMenuLayoutName,
00043 const char * szMenuLabelSetName);
00044 virtual ~EV_UnixMenu();
00045
00046 bool synthesizeMenu(GtkWidget * wMenuRoot, bool isPopup);
00047 bool menuEvent(XAP_Menu_Id id);
00048 virtual bool refreshMenu(AV_View * pView) = 0;
00049
00050 XAP_Frame * getFrame();
00051
00052 protected:
00053 bool _refreshMenu(AV_View * pView, GtkWidget * wMenuRoot);
00054 bool _isItemPresent(XAP_Menu_Id id) const;
00055 virtual bool _doAddMenuItem(UT_uint32 layout_pos);
00056
00057 protected:
00058 XAP_UnixApp * m_pUnixApp;
00059 XAP_Frame * m_pFrame;
00060
00061
00062 GtkAccelGroup * m_accelGroup;
00063
00064
00065 UT_GenericVector<GtkWidget*> m_vecMenuWidgets;
00066 private:
00067 void _convertStringToAccel(const char *s, guint &accel_key, GdkModifierType &ac_mods);
00068 GtkWidget * s_createNormalMenuEntry(const XAP_Menu_Id id,
00069 bool isCheckable,
00070 bool isRadio,
00071 bool isPopup,
00072 const char *szLabelName,
00073 const char *szMnemonicName);
00074 UT_Vector m_vecCallbacks;
00075 };
00076
00077 #endif