fw4spl
MenuBarRegistrar.hpp
1 /* ***** BEGIN LICENSE BLOCK *****
2  * FW4SPL - Copyright (C) IRCAD, 2009-2016.
3  * Distributed under the terms of the GNU Lesser General Public License (LGPL) as
4  * published by the Free Software Foundation.
5  * ****** END LICENSE BLOCK ****** */
6 
7 #ifndef __FWGUI_REGISTRAR_MENUBARREGISTRAR_HPP__
8 #define __FWGUI_REGISTRAR_MENUBARREGISTRAR_HPP__
9 
10 #include <fwRuntime/ConfigurationElement.hpp>
11 
12 #include "fwGui/GuiBaseObject.hpp"
13 #include "fwGui/container/fwMenuBar.hpp"
14 #include "fwGui/container/fwMenu.hpp"
15 #include "fwGui/config.hpp"
16 
17 namespace fwGui
18 {
19 namespace registrar
20 {
21 
29 class FWGUI_CLASS_API MenuBarRegistrar : public ::fwGui::GuiBaseObject
30 {
31 
32 public:
33 
36 
38  FWGUI_API MenuBarRegistrar( const std::string &sid);
39 
41  FWGUI_API virtual ~MenuBarRegistrar();
42 
44  FWGUI_API virtual ::fwGui::container::fwMenuBar::sptr getParent();
45 
51  FWGUI_API virtual ::fwGui::container::fwMenu::sptr getFwMenu(std::string menuSid,
52  std::vector< ::fwGui::container::fwMenu::sptr > menus);
53 
78  FWGUI_API virtual void initialize( ::fwRuntime::ConfigurationElement::sptr configuration);
79 
87  FWGUI_API virtual void manage(std::vector< ::fwGui::container::fwMenu::sptr > menus );
88 
93  FWGUI_API virtual void unmanage();
94 
95 protected:
96 
97  typedef ::fwRuntime::ConfigurationElement::sptr ConfigurationType;
98  typedef std::map< std::string, std::pair<unsigned int, bool> > SIDMenuMapType;
99 
104  SIDMenuMapType m_menuSids;
105 
107  std::string m_sid;
108 };
109 
110 } // namespace registrar
111 } // namespace fwGui
112 
113 #endif /*__FWGUI_REGISTRAR_MENUBARREGISTRAR_HPP__*/
114 
115 
The namespace fwGui contains the base interface for IHM services.
Definition: SJobBar.hpp:23
SIDMenuMapType m_menuSids
All menu services ID managed and associated with pair containing: menu&#39;s index vector and boolean des...
#define fwCoreClassDefinitionsWithFactoryMacro(_classinfo_, _parameters_, _factory_)
Generate common construction methods for classes with one factory.
Defines the menuBar registrar for IHM.
std::string m_sid
Main service ID associate with this MenuBarRegistrar.
Base class for all fwGui&#39;s classes.