fw4spl
IMenuSrv.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_IMENUSRV_HPP__
8 #define __FWGUI_IMENUSRV_HPP__
9 
10 #include <fwServices/IService.hpp>
11 
12 #include "fwGui/config.hpp"
13 
14 #include "fwGui/registrar/MenuRegistrar.hpp"
16 
17 namespace fwGui
18 {
19 
27 class FWGUI_CLASS_API IMenuSrv : public ::fwServices::IService
28 {
29 
30 public:
31 
33 
35  FWGUI_API void actionServiceStopping(std::string actionSrvSID);
36 
38  FWGUI_API void actionServiceStarting(std::string actionSrvSID);
39 
41  FWGUI_API void actionServiceSetActive(std::string actionSrvSID, bool isActive);
42 
44  FWGUI_API void actionServiceSetExecutable(std::string actionSrvSID, bool isExecutable);
45 
47  FWGUI_API void actionServiceSetVisible(std::string actionSrvSID, bool isVisible);
48 
49 protected:
50 
51  FWGUI_API IMenuSrv();
52 
53  FWGUI_API virtual ~IMenuSrv();
54 
55  typedef ::fwRuntime::ConfigurationElement::sptr ConfigurationType;
56 
99  FWGUI_API void initialize();
100 
102  FWGUI_API void create();
103 
105  FWGUI_API void destroy();
106 
107 private:
108 
109  void initializeLayoutManager( ::fwRuntime::ConfigurationElement::sptr layoutConfig );
110 
111  ::fwGui::layoutManager::IMenuLayoutManager::sptr m_layoutManager;
112  ::fwGui::registrar::MenuRegistrar::sptr m_registrar;
113 
114  ConfigurationType m_registrarConfig;
115  ConfigurationType m_layoutConfig;
116 
118  bool m_hideActions;
119 };
120 
121 } // namespace fwGui
122 
123 #endif /*__FWGUI_IMENUSRV_HPP__*/
124 
125 
Base class for all services.
Definition: IService.hpp:61
This file defines the interface of the base class for managing a menu.
The namespace fwGui contains the base interface for IHM services.
Definition: SJobBar.hpp:23
Defines the service interface managing the menu.
Definition: IMenuSrv.hpp:27
#define fwCoreServiceClassDefinitionsMacro(_classinfo_)
Generate common code for services classes.