]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/model/listGroupFactory.h
#2497 creaMaracasVisu Feature New Normal - In container button add the list option
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / creaButtonContainer / model / listGroupFactory.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 LISTGROUPFACTORY_H
34 #define LISTGROUPFACTORY_H
35
36 #include <wx/window.h>
37
38 #include <wx/listctrl.h>
39 #include "listWx.h"
40
41 #include "system.h"
42 #include "listGroup.h"
43 #include "containerSettings.h"
44
45 /*!     @namespace <creaButtonContainer>
46  *      @brief Contains the creaButtonContainer library included in creaMaracasVisu.
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 ButtonGroupFactory buttonGroupFactory.h "buttonGroupFactory.h"
57                  *      @brief This class contains the ButtonGroup factory.
58                  *  @details This class creates a container of group of buttons.
59                  *  @see <a href="http://en.wikipedia.org/wiki/Factory_method_pattern">Factory Pattern</a>
60                  */
61                 class ListGroupFactory
62                 {
63                         public:
64
65                                 typedef creaButtonContainer::view::ListWx List;
66
67                                 typedef creaButtonContainer::view::ListGroup ListGroup;
68                                 // ----------------------------------------------------------------------------------
69                                 /*!     @typedef creaButtonContainer::model::ContainerSettings ButtonGroupModel;
70                                  *      @brief Defines the ButtonGroupModel type.
71                                  */
72                                 typedef creaButtonContainer::model::ContainerSettings ListModel;
73                                 // ----------------------------------------------------------------------------------
74                                 /*!     @typedef std::list< ButtonGroup* > ButtonGroupContainer;
75                                  *      @brief Defines the ButtonGroupContainer type.
76                                  */
77                                 typedef std::list< ListGroup* > ListGroupContainer;
78                                 // ----------------------------------------------------------------------------------
79                                 /*!     @typedef std::map< long, Button* > ButtonContainer;
80                                  *      @brief Defines the ButtonContainer type.
81                                  */
82                                 typedef std::list<ListWx> ListContainer;
83
84                                 // ----------------------------------------------------------------------------------
85                                 //end of typedef definition
86                         public:
87                                 /*!     @fn ListGroupFactory::ListGroupFactory( );
88                                  *      @brief This is the default constructor.
89                                  */
90                                 ListGroupFactory( );
91                                 // -------------------------------------------------------------------------------
92                                 /*!     @fn virtual ButtonGroupFactory::~ButtonGroupFactory( );
93                                  *      @brief This is the destructor.
94                                  */
95                                 virtual
96                                 ~ListGroupFactory( );
97
98                                 /*! @fn ButtonGroupContainer ListGroupFactory::CreateListContainer( wxWindow* parent, ButtonGroupModel* settings );
99                                  * @brief This method creates the ButtonGroupContainer.
100                                  * @param parent the wxWindow* parent to be attached.
101                                  * @param settings The Container settings.
102                                  * @exception std::bad_alloc
103                                  * @return ButtonGroupContainer The wx button group container.
104                                  */
105                                 ListGroupContainer
106                                 CreateListGroupContainer( wxWindow* parent,
107                                     ListModel* settings );
108                         private:
109
110
111                                 /*! @fn ButtonContainer ButtonGroupFactory::GetButtons( wxWindow* parent, ButtonList buttonModel );
112                                  * @brief  This method creates a wx button container for a group.
113                                  * @param parent the wxWindow* parent to be attached.
114                                  * @param buttonModel The button list with its own information.
115                                  * @exception std::bad_alloc
116                                  * @return ButtonContainer The wx button container.
117                                  */
118                                 ListGroupContainer
119                                 GetList( wxWindow* parent, ListWx lst );
120                 };
121         }//ecapseman
122 }//ecapseman
123
124 #endif // CARTOBUTTONFACTORY_H