1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
3 // File: XGUI_MenuWorkbench.hxx
4 // Created: 13 Apr 2016
5 // Author: Natalia ERMOLAEVA
7 #ifndef XGUI_MENUWORKBENCH_H_
8 #define XGUI_MENUWORKBENCH_H_
20 * A class for management of menu actions (features). The actions should be arranged like they are
21 * in XML file. It listens the read feature of XML and fills internal structure of menu workbenches
22 * and groups of feature. After, it creates menues and tools in the module.
24 class XGUI_EXPORT XGUI_MenuWorkbench
28 XGUI_MenuWorkbench(const std::string& theName);
30 virtual ~XGUI_MenuWorkbench() {}
32 /// Returns a name of the workbench
33 /// \return workbench name
34 std::string getName() const { return myName; }
36 /// Finds or creates a group for the given name
37 /// \param theGroupName a name defined in XML
38 /// \return an instance of group
39 std::shared_ptr<XGUI_MenuGroup> findGroup(const std::string& theGroupName);
41 /// Returns container of existing groups
43 const std::list<std::shared_ptr<XGUI_MenuGroup> >& groups() const;
46 std::string myName; /// a name of the workbench
47 std::list<std::shared_ptr<XGUI_MenuGroup> > myGroups; /// container of existing groups
50 #endif /* XGUI_MENUWORKBENCH_H_ */