]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/model/containerSettings.h
Support #1768 CREATIS Licence insertion
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / creaButtonContainer / model / containerSettings.h
1 /*# ---------------------------------------------------------------------
2 #
3 # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
4 #                        pour la Sant�)
5 # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
6 # Previous Authors : Laurent Guigues, Jean-Pierre Roux
7 # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
8 #
9 #  This software is governed by the CeCILL-B license under French law and
10 #  abiding by the rules of distribution of free software. You can  use,
11 #  modify and/ or redistribute the software under the terms of the CeCILL-B
12 #  license as circulated by CEA, CNRS and INRIA at the following URL
13 #  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
14 #  or in the file LICENSE.txt.
15 #
16 #  As a counterpart to the access to the source code and  rights to copy,
17 #  modify and redistribute granted by the license, users are provided only
18 #  with a limited warranty  and the software's author,  the holder of the
19 #  economic rights,  and the successive licensors  have only  limited
20 #  liability.
21 #
22 #  The fact that you are presently reading this means that you have had
23 #  knowledge of the CeCILL-B license and that you accept its terms.
24 # ------------------------------------------------------------------------ */
25
26 /*!
27  * @file containerSettings.h
28  * @brief Contains the ContainerSettings class
29  * @author Diego CACERES (diego.caceres[AT]creatis.insa-lyon.fr)
30  * @date  2011-06-02
31  */
32
33 #ifndef BUTTONGROUPSETTINGS_H_
34 #define BUTTONGROUPSETTINGS_H_
35
36 #include <vector>
37
38 #include "structBCSettings.h"
39 #include "system.h"
40
41 /*!     @namespace <creaButtonContainer>
42  *      @brief Contains the creaButtonContainer library included in creaMaracasVisu.
43  */
44 namespace creaButtonContainer
45 {
46         /*! @namespace <creaButtonContainer::model>
47          *      @brief Contains the implementation of the model in creaButtonContainer library.
48          *      @see <a href="http://en.wikipedia.org/wiki/Model-view-controller">MVC Software Architecture</a>
49          */
50         namespace model
51         {
52                 /*! @class ContainerSettings containerSettings.h "containerSettings.h"
53                  *      @brief This class contains the settings of the button container.
54                  */
55                 class ContainerSettings
56                 {
57                         public:
58                                 //typedef definition
59                                 // ----------------------------------------------------------------------------------
60                                 /*!     @typedef creaButtonContainer::model::BCSettingsStruct BCSettingsStruct;
61                                  *      @brief Defines the BCSettingsStruct type.
62                                  */
63                                 typedef creaButtonContainer::model::BCSettingsStruct BCSettingsStruct;
64                                 // ----------------------------------------------------------------------------------
65                                 /*!     @typedef std::vector< BCPSettingsStruct* > BCStructVectorType;
66                                  *      @brief Defines the BCStructVectorType type.
67                                  */
68                                 typedef std::vector< BCSettingsStruct* > BCStructVectorType;
69                                 // ----------------------------------------------------------------------------------
70                                 //end of typedef definition
71                         public:
72                                 // ----------------------------------------------------------------------------------
73                                 /*! @fn ContainerSettings::ContainerSettings( )
74                                  *      @brief This is the constructor.
75                                  */
76                                 ContainerSettings( );
77                                 // ----------------------------------------------------------------------------------
78                                 /*! @fn virtual ContainerSettings::~ContainerSettings( )
79                                  *      @brief This is the destructor.
80                                  */
81                                 virtual
82                                 ~ContainerSettings( );
83                                 // ----------------------------------------------------------------------------------
84                                 /*! @fn ButtonGroupMap ContainerSettings::GetButtonGroupContainer( )
85                                  *      @brief This method returns a container of buttons ordered by group.
86                                  *      @return ButtonGroupMap A container with buttons
87                                  */
88                                 ButtonGroupMap
89                                 GetButtonGroupContainer( );
90                                 // ----------------------------------------------------------------------------------
91                                 /*! @fn KeyMapList ContainerSettings::GetGroupNameList( )
92                                  *      @brief This method returns a container with the name of the groups.
93                                  *      @return KeyMapList A list with the name of the button groups.
94                                  */
95                                 KeyMapList
96                                 GetGroupNameList( );
97                                 // ----------------------------------------------------------------------------------
98                                 /*! void ContainerSettings::SetButtonGroupContainer( ButtonGroupMap m_ButtonGroupContainer )
99                                  *      @brief This method allows to create the ButtonGroupContainer.
100                                  *      @param bgContainer The ButtonGroupMap with all buttons.
101                                  */
102                                 void
103                                 SetButtonGroupContainer( ButtonGroupMap bgContainer );
104                                 // ----------------------------------------------------------------------------------
105                                 /*! void ContainerSettings::SetGroupNameList( KeyMapList gNameList )
106                                  * @brief This method sets a container with the name of the groups.
107                                  * @param gNameList the KeyMapList with all groupNames.
108                                  */
109                                 void
110                                 SetGroupNameList( KeyMapList gNameList );
111                                 // ----------------------------------------------------------------------------------
112                                 /*!
113                                  * @fn ContainerSettings::AddButton( const std::string & groupName, const std::string buttonName,
114                                  const std::string iconpath, const std::string buttonDescription,
115                                  FunctionEventType event )
116                                  * @brief This method adds a new button to the container.
117                                  * @param groupName The name of the group of buttons.
118                                  * @param buttonName The ID of the button.
119                                  * @param iconpath The path of the button icon.
120                                  * @param buttonDescription The description of the button.
121                                  * @param event The event associated to the button.
122                                  * @see class Functor, ConcreteFunctor for add an event for a button.
123                                  * @exception std::bad_alloc
124                                  */
125                                 void
126                                 AddButton( const StringType & groupName, const StringType &buttonName,
127                                     const StringType &iconpath, const StringType &buttonDescription,
128                                     FunctionEventType event );
129                                 // ----------------------------------------------------------------------------------
130                                 /*! @fn void AddButton( BCSettingsStruct* info );
131                                  *      @brief This method adds a new button to the container using the
132                                  *      BCSettingsStruct structure.
133                                  *      @exception std::bad_alloc
134                                  *      @param info
135                                  */
136                                 void
137                                 AddButton( BCSettingsStruct* info );
138                                 // ----------------------------------------------------------------------------------
139                                 /*! @fn void AddButtons( BCStructVectorType infoList );
140                                  *      @brief This method adds new buttons to the container.
141                                  *      @exception std::bad_alloc
142                                  *      @param infoList
143                                  */
144                                 void
145                                 AddButtons( BCStructVectorType infoList );
146                                 // ----------------------------------------------------------------------------------
147                         private:
148                                 ButtonGroupMap m_ButtonGroupContainer; //! <The container with the group of buttons.
149                                 KeyMapList m_GroupNameList; //! <The container with the name of the groups of buttons.
150                 };
151         }
152 }
153
154 #endif /* BUTTONGROUPSETTINGS_H_ */