]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/model/buttonGroupFactory.h
42b41866c73838639d25ec77de6727bb7ecd811b
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / creaButtonContainer / model / buttonGroupFactory.h
1 /*!
2  * @file buttonGroupFactory.h
3  * @brief Contains ButtonGroupFactory class
4  * @author Diego CACERES (diego.caceres[AT]creatis.insa-lyon.fr)
5  * @date  2011-06-02
6  */
7
8 #ifndef BUTTONGROUPFACTORY_H
9 #define BUTTONGROUPFACTORY_H
10
11 #include <wx/window.h>
12
13 #include "system.h"
14 #include "button.h"
15 #include "buttonGroup.h"
16 #include "containerSettings.h"
17
18 /*!     @namespace <creaButtonContainer>
19  *      @brief Contains the creaButtonContainer library included in creaMaracasVisu.
20  */
21 namespace creaButtonContainer
22 {
23         /*! @namespace <creaButtonContainer::model>
24          *      @brief Contains the implementation of the model in creaButtonContainer library.
25          *      @see <a href="http://en.wikipedia.org/wiki/Model-view-controller">MVC Software Architecture</a>
26          */
27         namespace model
28         {
29                 /*! @class ButtonGroupFactory buttonGroupFactory.h "buttonGroupFactory.h"
30                  *      @brief This class contains the ButtonGroup factory.
31                  *  @details This class creates a container of group of buttons.
32                  *  @see <a href="http://en.wikipedia.org/wiki/Factory_method_pattern">Factory Pattern</a>
33                  */
34                 class ButtonGroupFactory
35                 {
36                         public:
37                                 //typedef definition
38                                 // ----------------------------------------------------------------------------------
39                                 /*!     @typedef creaButtonContainer::view::Button Button;
40                                  *      @brief Defines the Button type.
41                                  */
42                                 typedef creaButtonContainer::view::Button Button;
43                                 // ----------------------------------------------------------------------------------
44                                 /*!     @typedef creaButtonContainer::view::ButtonGroup ButtonGroup;
45                                  *      @brief Defines the ButtonGroup type.
46                                  */
47                                 typedef creaButtonContainer::view::ButtonGroup ButtonGroup;
48                                 // ----------------------------------------------------------------------------------
49                                 /*!     @typedef creaButtonContainer::model::ContainerSettings ButtonGroupModel;
50                                  *      @brief Defines the ButtonGroupModel type.
51                                  */
52                                 typedef creaButtonContainer::model::ContainerSettings ButtonGroupModel;
53                                 // ----------------------------------------------------------------------------------
54                                 /*!     @typedef std::list< ButtonGroup* > ButtonGroupContainer;
55                                  *      @brief Defines the ButtonGroupContainer type.
56                                  */
57                                 typedef std::list< ButtonGroup* > ButtonGroupContainer;
58                                 // ----------------------------------------------------------------------------------
59                                 /*!     @typedef std::map< long, Button* > ButtonContainer;
60                                  *      @brief Defines the ButtonContainer type.
61                                  */
62                                 typedef std::map< long, Button* > ButtonContainer;
63                                 // ----------------------------------------------------------------------------------
64                                 //end of typedef definition
65                         public:
66                                 /*!     @fn ButtonGroupFactory::ButtonGroupFactory( );
67                                  *      @brief This is the default constructor.
68                                  */
69                                 ButtonGroupFactory( );
70                                 // -------------------------------------------------------------------------------
71                                 /*!     @fn virtual ButtonGroupFactory::~ButtonGroupFactory( );
72                                  *      @brief This is the destructor.
73                                  */
74                                 virtual
75                                 ~ButtonGroupFactory( );
76                                 /*! @fn ButtonGroupContainer ButtonGroupFactory::CreateButtonGroupContainer( wxWindow* parent, ButtonGroupModel* settings );
77                                  * @brief This method creates the ButtonGroupContainer.
78                                  * @param parent the wxWindow* parent to be attached.
79                                  * @param settings The Container settings.
80                                  * @exception std::bad_alloc
81                                  * @return ButtonGroupContainer The wx button group container.
82                                  */
83                                 ButtonGroupContainer
84                                 CreateButtonGroupContainer( wxWindow* parent,
85                                     ButtonGroupModel* settings );
86                         private:
87                                 /*! @fn ButtonContainer ButtonGroupFactory::GetButtons( wxWindow* parent, ButtonList buttonModel );
88                                  * @brief  This method creates a wx button container for a group.
89                                  * @param parent the wxWindow* parent to be attached.
90                                  * @param buttonModel The button list with its own information.
91                                  * @exception std::bad_alloc
92                                  * @return ButtonContainer The wx button container.
93                                  */
94                                 ButtonContainer
95                                 GetButtons( wxWindow* parent, ButtonList buttonModel );
96                 };
97         }//ecapseman
98 }//ecapseman
99
100 #endif // CARTOBUTTONFACTORY_H