]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/buttonContainerPanel.h
creaButtonContainer: doxygen 90%
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / creaButtonContainer / view / buttonContainerPanel.h
1 /*!
2  * @file buttonContainerController.h
3  * @brief This contains the ButtonContainerController class
4  * @author Diego CACERES (diego.caceres[AT]creatis.insa-lyon.fr)
5  * @date  2011-05-19
6  */
7
8 #ifndef BUTTONCONTAINERPANEL_H
9 #define BUTTONCONTAINERPANEL_H
10
11 #include <wx/scrolwin.h>
12 #include <wx/button.h>
13 #include <wx/sizer.h>
14 #include <list>
15 #include <map>
16
17 #include "buttonGroup.h"
18 #include "groupManager.h"
19 #include "buttonGroupFactory.h"
20 #include "containerSettings.h"
21 #include "buttonContainerController.h"
22
23 /*!     @namespace <creaButtonContainer>
24  *      @brief Contains the creaButtonContainer library included in creaMaracasVisu.
25  */
26 namespace creaButtonContainer
27 {
28         /*!     @namespace<creaButtonContainer::controller>
29          *      @brief Contains the implementation of the controller in creaButtonContainer library.
30          *      @see <a href="http://en.wikipedia.org/wiki/Model-view-controller">MVC Software Architecture</a>
31          */
32         namespace controller
33         {
34                 /*! @class ButtonContainerController buttonContainerController.h "buttonContainerController.h"
35                  *      @brief This class contains the ButtonContainerPanel controller.
36                  *  @details This class describes the button events, it derives from wxEvtHandler and it is the
37                  *  controller in the MVC.
38                  *  @see <a href="http://docs.wxwidgets.org/stable/wx_wxevthandler.html">wxEvtHandler</a>
39                  */
40                 class ButtonContainerController;
41         }
42
43         /*! @namespace <creaButtonContainer::view>
44          *      @brief Contains the implementation of the view in creaButtonContainer library.
45          *      @see <a href="http://en.wikipedia.org/wiki/Model-view-controller">MVC Software Architecture</a>
46          */
47         namespace view
48         {
49                 /*! @class ButtonContainerController buttonContainerController.h "buttonContainerController.h"
50                  *      @brief This class contains the ButtonContainerPanel controller.
51                  *  @details This class describes the button events, it derives from wxEvtHandler and it is the
52                  *  controller in the MVC.
53                  *  @see <a href="http://docs.wxwidgets.org/stable/wx_wxscrolledWindow.html">wxScrolledWindow</a>
54                  */
55                 class ButtonContainerPanel : public wxScrolledWindow
56                 {
57                         public:
58                                 //typedef definition
59                                 // ----------------------------------------------------------------------------------
60                                 /*!     @typedef creaButtonContainer::view::ButtonGroup ButtonGroup;
61                                  *      @brief Defines the ButtonGroup type.
62                                  */
63                                 typedef creaButtonContainer::view::ButtonGroup ButtonGroup;
64                                 // ----------------------------------------------------------------------------------
65                                 /*!     @typedef creaButtonContainer::view::GroupManager GroupManager;
66                                  *      @brief Defines the GroupManager type.
67                                  */
68                                 typedef creaButtonContainer::view::GroupManager GroupManager;
69                                 // ----------------------------------------------------------------------------------
70                                 /*!     @typedef std::list< ButtonGroup* > ButtonGroupList;
71                                  *      @brief Defines the ButtonGroupList type.
72                                  */
73                                 typedef std::list< ButtonGroup* > ButtonGroupList;
74                                 // ----------------------------------------------------------------------------------
75                                 /*!     @typedef std::map< long, GroupManager* > GroupManagerList;
76                                  *      @brief Defines the GroupManagerList type.
77                                  */
78                                 typedef std::map< long, GroupManager* > GroupManagerList;
79                                 // ----------------------------------------------------------------------------------
80                                 /*!     @typedef wxFlexGridSizer Sizer;
81                                  *      @brief Defines the Sizer type.
82                                  */
83                                 typedef wxFlexGridSizer Sizer;
84                                 // ----------------------------------------------------------------------------------
85                                 /*!     @typedef std::list< long > KeyList;
86                                  *      @brief Defines the KeyList type.
87                                  */
88                                 typedef std::list< long > KeyList;
89                                 // ----------------------------------------------------------------------------------
90                                 /*!     @typedef creaButtonContainer::model::ContainerSettings ButtonGroupSettings;
91                                  *      @brief Defines the ButtonGroupSettings type.
92                                  */
93                                 typedef creaButtonContainer::model::ContainerSettings
94                                     ButtonGroupSettings;
95                                 // ----------------------------------------------------------------------------------
96                                 /*!     @typedef creaButtonContainer::model::ButtonGroupFactory ButtonGroupFactory;
97                                  *      @brief Defines the ButtonGroupFactory type.
98                                  */
99                                 typedef creaButtonContainer::model::ButtonGroupFactory
100                                     ButtonGroupFactory;
101                                 // ----------------------------------------------------------------------------------
102                                 /*!     creaButtonContainer::controller::ButtonContainerController BCController;
103                                  *      @brief Defines the BCController type.
104                                  */
105                                 typedef creaButtonContainer::controller::ButtonContainerController
106                                     BCController;
107                                 // ----------------------------------------------------------------------------------
108                                 //end of typedef definition
109                         public:
110                                 /*! @fn ButtonContainerPanel( wxWindow* parent, ButtonGroupSettings* settings );
111                                  * @brief This is the parameterized constructor.
112                                  * @param parent wxWindow pointer to parent.
113                                  * @param settings ButtonGroupSettings Pointer to button container settings.
114                                  */
115                                 ButtonContainerPanel( wxWindow* parent, ButtonGroupSettings* settings );
116                                 // ----------------------------------------------------------------------------------
117                                 /*! @fn ~ButtonContainerPanel( );
118                                  * @brief This is the destructor.
119                                  */
120                                 virtual
121                                 ~ButtonContainerPanel( );
122                                 // ----------------------------------------------------------------------------------
123                                 /*! @fn SetGroupContainer( ButtonGroupList groupContainer );
124                                  * @brief This function sets the settings to the container.
125                                  * @param groupContainer
126                                  */
127                                 void
128                                 SetGroupContainer( ButtonGroupList groupContainer );
129                                 // ----------------------------------------------------------------------------------
130                                 /*! @fn PanelInit( );
131                                  *      This function initializes the panel.
132                                  */
133                                 void
134                                 PanelInit( );
135                                 // ----------------------------------------------------------------------------------
136                                 /*! @fn FitSizer( );
137                                  * This function fits and organizes the sizer.
138                                  */
139                                 void
140                                 FitSizer( );
141                                 // ----------------------------------------------------------------------------------
142                         public:
143                                 friend class creaButtonContainer::controller::ButtonContainerController;
144                         private:
145                                 GroupManagerList m_GroupManagerList; //!<The container of managers.
146                                 ButtonGroupList m_ButtonGroupList; //!<The list of button groups.
147                                 BCController* m_ButtonCController; //!<Pontier to controller.
148                                 Sizer* m_Sizer; //!<Pointer to wxSizer
149                 };
150         }//ecapseman
151 }//ecapseman
152
153 #endif // BUTTONCONTAINERPANEL_H