fw4spl
SModifyLayout.hpp
1 /* ***** BEGIN LICENSE BLOCK *****
2  * FW4SPL - Copyright (C) IRCAD, 2009-2017.
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 __GUI_ACTION_SMODIFYLAYOUT_HPP__
8 #define __GUI_ACTION_SMODIFYLAYOUT_HPP__
9 
10 #include "gui/config.hpp"
11 
12 #include <fwGui/IActionSrv.hpp>
13 
14 #include <fwServices/IService.hpp>
15 
16 #include <boost/logic/tribool.hpp>
17 
18 #include <vector>
19 
20 namespace gui
21 {
22 namespace action
23 {
24 
28 class GUI_CLASS_API SModifyLayout : public ::fwGui::IActionSrv
29 {
30 
31 public:
32 
34  typedef ::fwRuntime::ConfigurationElement::sptr ConfigurationType;
35 
39  GUI_API SModifyLayout() noexcept;
40 
44  GUI_API virtual ~SModifyLayout() noexcept;
45 
46 protected:
47 
48  enum ActionType
49  {
50  MOVE,
51  SHOW,
52  HIDE,
53  SHOW_OR_HIDE,
54  ENABLE,
55  DISABLE,
56  DO_NOTHING
57  };
58 
62  GUI_API virtual void info(std::ostream& _sstream ) override;
63 
67  GUI_API void updating() override;
68 
94  GUI_API void configuring() override;
95 
96  GUI_API virtual void starting() override;
97 
98  GUI_API virtual void stopping() override;
99 
100 private:
101 
103  typedef std::vector< std::pair< std::string, std::string > > MoveSrvVectType;
105  MoveSrvVectType m_moveSrv;
106 
108  typedef std::vector< std::pair< std::string, ::boost::logic::tribool > > ShowSrvVectType;
110  ShowSrvVectType m_showSrvWid;
111 
113  ShowSrvVectType m_showSrvSid;
114 
116  typedef std::vector< std::pair< std::string, bool > > EnableSrvVectType;
118  EnableSrvVectType m_enableSrv;
119 };
120 
121 } // namespace action
122 } // namespace gui
123 
124 #endif /*__GUI_ACTION_SMODIFYLAYOUT_HPP__*/
The namespace gui contains the basic services to build the application IHM.
This action is used to modify the layout configuration.
Defines the service interface managing the menu items.
Definition: IActionSrv.hpp:24
#define fwCoreServiceClassDefinitionsMacro(_classinfo_)
Generate common code for services classes.