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