]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/model/buttonGroupFactory.h
#2520 creaMaracasVisu Bug New Normal - Color Layer with double images
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / creaButtonContainer / model / buttonGroupFactory.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 buttonGroupFactory.h
28  * @brief Contains ButtonGroupFactory class
29  * @author Diego CACERES (diego.caceres[AT]creatis.insa-lyon.fr)
30  * @date  2011-06-02
31  */
32
33 #ifndef BUTTONGROUPFACTORY_H
34 #define BUTTONGROUPFACTORY_H
35
36 #include <wx/window.h>
37
38 #include "system.h"
39 #include "button.h"
40 #include "buttonGroup.h"
41 #include "containerSettings.h"
42
43 /*!     @namespace <creaButtonContainer>
44  *      @brief Contains the creaButtonContainer library included in creaMaracasVisu.
45  */
46 namespace creaButtonContainer
47 {
48         /*! @namespace <creaButtonContainer::model>
49          *      @brief Contains the implementation of the model in creaButtonContainer library.
50          *      @see <a href="http://en.wikipedia.org/wiki/Model-view-controller">MVC Software Architecture</a>
51          */
52         namespace model
53         {
54                 /*! @class ButtonGroupFactory buttonGroupFactory.h "buttonGroupFactory.h"
55                  *      @brief This class contains the ButtonGroup factory.
56                  *  @details This class creates a container of group of buttons.
57                  *  @see <a href="http://en.wikipedia.org/wiki/Factory_method_pattern">Factory Pattern</a>
58                  */
59                 class ButtonGroupFactory
60                 {
61                         public:
62                                 //typedef definition
63                                 // ----------------------------------------------------------------------------------
64                                 /*!     @typedef creaButtonContainer::view::Button Button;
65                                  *      @brief Defines the Button type.
66                                  */
67                                 typedef creaButtonContainer::view::Button Button;
68                                 // ----------------------------------------------------------------------------------
69                                 /*!     @typedef creaButtonContainer::view::ButtonGroup ButtonGroup;
70                                  *      @brief Defines the ButtonGroup type.
71                                  */
72                                 typedef creaButtonContainer::view::ButtonGroup ButtonGroup;
73                                 // ----------------------------------------------------------------------------------
74                                 /*!     @typedef creaButtonContainer::model::ContainerSettings ButtonGroupModel;
75                                  *      @brief Defines the ButtonGroupModel type.
76                                  */
77                                 typedef creaButtonContainer::model::ContainerSettings ButtonGroupModel;
78                                 // ----------------------------------------------------------------------------------
79                                 /*!     @typedef std::list< ButtonGroup* > ButtonGroupContainer;
80                                  *      @brief Defines the ButtonGroupContainer type.
81                                  */
82                                 typedef std::list< ButtonGroup* > ButtonGroupContainer;
83                                 // ----------------------------------------------------------------------------------
84                                 /*!     @typedef std::map< long, Button* > ButtonContainer;
85                                  *      @brief Defines the ButtonContainer type.
86                                  */
87                                 typedef std::map< long, Button* > ButtonContainer;
88                                 // ----------------------------------------------------------------------------------
89                                 //end of typedef definition
90                         public:
91                                 /*!     @fn ButtonGroupFactory::ButtonGroupFactory( );
92                                  *      @brief This is the default constructor.
93                                  */
94                                 ButtonGroupFactory( );
95                                 // -------------------------------------------------------------------------------
96                                 /*!     @fn virtual ButtonGroupFactory::~ButtonGroupFactory( );
97                                  *      @brief This is the destructor.
98                                  */
99                                 virtual
100                                 ~ButtonGroupFactory( );
101                                 
102                                 /*! @fn ButtonGroupContainer ButtonGroupFactory::CreateButtonGroupContainer( wxWindow* parent, ButtonGroupModel* settings );
103                                  * @brief This method creates the ButtonGroupContainer.
104                                  * @param parent the wxWindow* parent to be attached.
105                                  * @param settings The Container settings.
106                                  * @exception std::bad_alloc
107                                  * @return ButtonGroupContainer The wx button group container.
108                                  */
109                                 ButtonGroupContainer
110                                 CreateButtonGroupContainer( wxWindow* parent,
111                                     ButtonGroupModel* settings );
112                         private:
113                                 
114
115                                 /*! @fn ButtonContainer ButtonGroupFactory::GetButtons( wxWindow* parent, ButtonList buttonModel );
116                                  * @brief  This method creates a wx button container for a group.
117                                  * @param parent the wxWindow* parent to be attached.
118                                  * @param buttonModel The button list with its own information.
119                                  * @exception std::bad_alloc
120                                  * @return ButtonContainer The wx button container.
121                                  */
122                                 ButtonContainer
123                                 GetButtons( wxWindow* parent, ButtonList buttonModel );
124                 };
125         }//ecapseman
126 }//ecapseman
127
128 #endif // CARTOBUTTONFACTORY_H