]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/model/containerSettings.h
#2507 creaMaracasVisu Feature New Normal - creaPanelButtonContainer ListPanel
[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 #include <wx/bitmap.h>
38 //EED-MLER  #include <wx/listctrl.h>
39
40 #include "structBCSettings.h"
41 #include "system.h"
42
43 /*!     @namespace <creaButtonContainer>
44  *      @brief Contains the creaButtonContainer library included in creaMaracasVisu.
45  */
46
47
48 namespace creaButtonContainer
49 {
50         /*! @namespace <creaButtonContainer::model>
51          *      @brief Contains the implementation of the model in creaButtonContainer library.
52          *      @see <a href="http://en.wikipedia.org/wiki/Model-view-controller">MVC Software Architecture</a>
53          */
54         namespace model
55         {
56                 /*! @class ContainerSettings containerSettings.h "containerSettings.h"
57                  *      @brief This class contains the settings of the button container.
58                  */
59                 class ContainerSettings
60                 {
61                         public:
62                                 //typedef definition
63                                 // ----------------------------------------------------------------------------------
64                                 /*!     @typedef creaButtonContainer::model::BCSettingsStruct BCSettingsStruct;
65                                  *      @brief Defines the BCSettingsStruct type.
66                                  */
67                                 typedef creaButtonContainer::model::BCSettingsStruct BCSettingsStruct;
68                                 // ----------------------------------------------------------------------------------
69                                 /*!     @typedef std::vector< BCPSettingsStruct* > BCStructVectorType;
70                                  *      @brief Defines the BCStructVectorType type.
71                                  */
72                                 typedef std::vector< BCSettingsStruct* > BCStructVectorType;
73                                 // ----------------------------------------------------------------------------------
74                                 //end of typedef definition
75                         public:
76                                 // ----------------------------------------------------------------------------------
77                                 /*! @fn ContainerSettings::ContainerSettings( )
78                                  *      @brief This is the constructor.
79                                  */
80                                 ContainerSettings( );
81                                 // ----------------------------------------------------------------------------------
82                                 /*! @fn virtual ContainerSettings::~ContainerSettings( )
83                                  *      @brief This is the destructor.
84                                  */
85                                 virtual
86                                 ~ContainerSettings( );
87                                 
88                                 // ----------------------------------------------------------------------------------
89                                 /*! @fn ButtonGroupMap ContainerSettings::GetButtonGroupContainer( )
90                                  *      @brief This method returns a container of buttons ordered by group.
91                                  *      @return ButtonGroupMap A container with buttons
92                                  */
93                                 ButtonGroupMap
94                                 GetButtonGroupContainer( );
95                                 // ----------------------------------------------------------------------------------
96                                 /*! @fn KeyMapList ContainerSettings::GetGroupNameList( )
97                                  *      @brief This method returns a container with the name of the groups.
98                                  *      @return KeyMapList A list with the name of the button groups.
99                                  */
100                                 KeyMapList
101                                 GetGroupNameList( );
102                                 
103                                 // ----------------------------------------------------------------------------------
104                                 /*! void ContainerSettings::SetButtonGroupContainer( ButtonGroupMap m_ButtonGroupContainer )
105                                  *      @brief This method allows to create the ButtonGroupContainer.
106                                  *      @param bgContainer The ButtonGroupMap with all buttons.
107                                  */
108                                 void
109                                 SetButtonGroupContainer( ButtonGroupMap bgContainer );
110
111
112                                 // ----------------------------------------------------------------------------------
113                                 /*! void ContainerSettings::SetGroupNameList( KeyMapList gNameList )
114                                  * @brief This method sets a container with the name of the groups.
115                                  * @param gNameList the KeyMapList with all groupNames.
116                                  */
117                                 void
118                                 SetGroupNameList( KeyMapList gNameList );
119                                 
120
121                                 // ----------------------------------------------------------------------------------
122                                 /*!
123                                  * @fn ContainerSettings::AddButton( const std::string & groupName, const std::string buttonName,
124                                  const std::string iconpath, const std::string buttonDescription,
125                                  FunctionEventType event )
126                                  * @brief This method adds a new button to the container.
127                                  * @param groupName The name of the group of buttons.
128                                  * @param buttonName The ID of the button.
129                                  * @param iconpath The path of the button icon.
130                                  * @param buttonDescription The description of the button.
131                                  * @param event The event associated to the button.
132                                  * @see class Functor, ConcreteFunctor for add an event for a button.
133                                  * @exception std::bad_alloc
134                                  */
135                                 void
136                                 AddButton( const StringType & groupName, const StringType &buttonName,
137                                     const wxBitmap &icon, const StringType &buttonDescription,
138                                     FunctionEventType event );
139                                 // ----------------------------------------------------------------------------------
140                                 /*! @fn void AddButton( BCSettingsStruct* info );
141                                  *      @brief This method adds a new button to the container using the
142                                  *      BCSettingsStruct structure.
143                                  *      @exception std::bad_alloc
144                                  *      @param info
145                                  */
146                                 void
147                                 AddButton( BCSettingsStruct* info );
148                                 // ----------------------------------------------------------------------------------
149                                 /*! @fn void AddButtons( BCStructVectorType infoList );
150                                  *      @brief This method adds new buttons to the container.
151                                  *      @exception std::bad_alloc
152                                  *      @param infoList
153                                  */
154                                 void
155                                 AddButtons( BCStructVectorType infoList );
156
157                                 // ----------------------------------------------------------------------------------
158                                 AddItems( BCStructVectorType infoList );*/
159
160                                 // ----------------------------------------------------------------------------------
161                                 // ----------------------------------------------------------------------------------
162                         private:
163                                 ButtonGroupMap m_ButtonGroupContainer; //! <The container with the group of buttons.
164                                 KeyMapList m_GroupNameList; //! <The container with the name of the groups of buttons.
165
166                                 //ListGroupMap m_ListGroupContainer; // contenedor del grupo de listas
167                 };
168         }
169 }
170
171 #endif /* BUTTONGROUPSETTINGS_H_ */