Salome HOME
Issue 1303 Re-ordering of Sketcher menus: separation of the current menu build functi...
[modules/shaper.git] / src / XGUI / XGUI_MenuMgr.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
2
3 // File:        XGUI_MenuMgr.hxx
4 // Created:     13 Apr 2016
5 // Author:      Natalia ERMOLAEVA
6
7 #ifndef XGUI_MENUMGR_H_
8 #define XGUI_MENUMGR_H_
9
10 #include "XGUI.h"
11
12 #include <Events_Listener.h>
13
14 class XGUI_Workshop;
15 class Config_FeatureMessage;
16
17 /**
18 * \ingroup GUI
19 * A class for management of menu actions (features). The actions should be arranged like they are
20 * in XML file. It listens the read feature of XML and fills internal structure of menu workbenches
21 * and groups of feature. After, it creates menues and tools in the module.
22 */
23 class XGUI_EXPORT XGUI_MenuMgr : public Events_Listener
24 {
25  public:
26   /// Constructor
27   /// \param the current workshop
28   XGUI_MenuMgr(XGUI_Workshop* theWorkshop);
29   virtual ~XGUI_MenuMgr() {}
30
31   //! Redefinition of Events_Listener method
32   virtual void processEvent(const std::shared_ptr<Events_Message>& theMessage);
33
34 protected:
35   /// Process event "Add a feature"
36   void addFeature(const std::shared_ptr<Config_FeatureMessage>& theMessage);
37
38 private:
39   XGUI_Workshop* myWorkshop; /// the current workshop
40 };
41
42 #endif /* XGUI_MENUMGR_H_ */