Salome HOME
Issue 1303 Re-ordering of Sketcher menus: additional structure for feature info to...
[modules/shaper.git] / src / XGUI / XGUI_MenuGroup.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
2
3 // File:        XGUI_MenuGroup.hxx
4 // Created:     13 Apr 2016
5 // Author:      Natalia ERMOLAEVA
6
7 #ifndef XGUI_MENUGROUP_H_
8 #define XGUI_MENUGROUP_H_
9
10 #include "XGUI.h"
11
12 #include <string>
13 #include <list>
14
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_MenuGroup
24 {
25  public:
26   /// Constructor
27   XGUI_MenuGroup(const std::string& theName);
28   virtual ~XGUI_MenuGroup() {}
29
30   /// Returns a name of the workbench
31   /// \return workbench name
32   std::string getName() const { return myName; }
33
34   /// Stores XML information for the feature kind
35   /// \param theMessage a container of the feature XML properties
36   virtual void setFeatureInfo(const std::shared_ptr<Config_FeatureMessage>& theMessage);
37
38   /// Returns container of existing features
39   /// \returns list
40   const std::list<std::shared_ptr<Config_FeatureMessage> >& featureInfo() const;
41
42 private:
43   std::string myName; /// a name of the workbench
44   std::list<std::shared_ptr<Config_FeatureMessage> > myFeatureInfo; /// container of existing features
45 };
46
47 #endif /* XGUI_MENUGROUP_H_ */