]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/controller/buttonContainerController.h
creaButtonContainer & creaPanelButtonContainer: Updates in doxygen documentation...
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / creaButtonContainer / controller / buttonContainerController.h
1 /*!
2  * @file buttonContainerController.h
3  * @brief Contains the ButtonContainerController class
4  * @author Diego CACERES (diego.caceres[AT]creatis.insa-lyon.fr)
5  * @date  2011-06-02
6  */
7
8 #ifndef BUTTONCONTAINERCONTROLLER_H_
9 #define BUTTONCONTAINERCONTROLLER_H_
10
11 #include <wx/event.h>
12 #include <iostream>
13 #include <exception>
14 #include "buttonContainerPanel.h"
15
16 /*!     @namespace <creaButtonContainer>
17  *      @brief Contains the creaButtonContainer library included in creaMaracasVisu.
18  */
19 namespace creaButtonContainer
20 {
21         /*! @namespace <creaButtonContainer::view>
22          *      @brief Contains the implementation of the view in creaButtonContainer library.
23          *      @see <a href="http://en.wikipedia.org/wiki/Model-view-controller">MVC Software Architecture</a>
24          */
25         namespace view
26         {
27                 //Predefinition of ButtonContainerPanel FriendClass!!
28                 /*! @class ButtonContainerPanel buttonContainerPanel.h "buttonContainerPanel.h"
29                  *  @brief This class is the container of the creaButtonContainer.
30                  *  @details This class derives from wxScrolledWindow and manages the view of the buttonContainer.
31                  *  @see <a href="http://docs.wxwidgets.org/stable/wx_wxscrolledwindow.html">wxScrolledWindow</a>
32                  */
33                 class ButtonContainerPanel;
34         }
35         /*!     @namespace<creaButtonContainer::controller>
36          *      @brief Contains the implementation of the controller in creaButtonContainer library.
37          *      @see <a href="http://en.wikipedia.org/wiki/Model-view-controller">MVC Software Architecture</a>
38          */
39         namespace controller
40         {
41                 /*! @class ButtonContainerController buttonContainerController.h "buttonContainerController.h"
42                  *      @brief This class contains the ButtonContainerPanel controller.
43                  *  @details This class describes the button events, it derives from wxEvtHandler.
44                  *  @see <a href="http://docs.wxwidgets.org/stable/wx_wxevthandler.html">wxEvtHandler</a>
45                  */
46                 class ButtonContainerController : public wxEvtHandler
47                 {
48                         public:
49                                 //typedef definitions
50                                 // ----------------------------------------------------------------------------------
51                                 /*!     @typedef creaButtonContainer::view::ButtonGroup ButtonGroup
52                                  *      @brief Defines the ButtonGroup type
53                                  */
54                                 typedef creaButtonContainer::view::ButtonGroup ButtonGroup;
55                                 // ----------------------------------------------------------------------------------
56                                 /*!     @typedef typedef creaButtonContainer::view::GroupManager GroupManager
57                                  *      @brief Defines the GroupManager type
58                                  */
59                                 typedef creaButtonContainer::view::GroupManager GroupManager;
60                                 // ----------------------------------------------------------------------------------
61                                 /*!     @typedef std::list< ButtonGroup* > ButtonGroupList
62                                  *      @brief Defines the ButtonGroupList type
63                                  */
64                                 typedef std::list< ButtonGroup* > ButtonGroupList;
65                                 // ----------------------------------------------------------------------------------
66                                 /*!     @typedef std::map< long, GroupManager* > GroupManagerList
67                                  *      @brief Defines the GroupManagerList type
68                                  */
69                                 typedef std::map< long, GroupManager* > GroupManagerList;
70                                 // ----------------------------------------------------------------------------------
71                                 /*!     @typedef wxFlexGridSizer Sizer
72                                  *      @brief Defines the Sizer type
73                                  */
74                                 typedef wxFlexGridSizer Sizer;
75                                 // ----------------------------------------------------------------------------------
76                                 /*!     @typedef std::list< long > KeyList
77                                  *      @brief Defines the KeyList type
78                                  */
79                                 typedef std::list< long > KeyList;
80                                 // ----------------------------------------------------------------------------------
81                                 /*!     @typedef creaButtonContainer::model::ContainerSettings ButtonGroupSettings
82                                  *      @brief Defines the ButtonGroupSettings type
83                                  */
84                                 typedef creaButtonContainer::model::ContainerSettings
85                                     ButtonGroupSettings;
86                                 // ----------------------------------------------------------------------------------
87                                 /*!     @typedef creaButtonContainer::view::ButtonContainerPanel BCPanel
88                                  *      @brief Defines the BCPanel type
89                                  */
90                                 typedef creaButtonContainer::view::ButtonContainerPanel BCPanel;
91                                 // ----------------------------------------------------------------------------------
92                                 //end of typedef definition
93                         public:
94                                 // ----------------------------------------------------------------------------------
95                                 /*!     @fn ButtonContainerController( BCPanel* );
96                                  *      @brief This is the Parameterized constructor.
97                                  *      @param BCPanel* The connection with the view (wxPanel link).
98                                  */
99                                 ButtonContainerController( BCPanel* );
100                                 // ----------------------------------------------------------------------------------
101                                 /*! @fn ~ButtonContainerController( );
102                                  *      @brief This is the destructor.
103                                  */
104                                 virtual
105                                 ~ButtonContainerController( );
106
107                                 // ----------------------------------------------------------------------------------
108                                 /*! @fn void AddEvents( );
109                                  *      @brief This method connect every buttonEvents to the view.
110                                  *      @exception std::bad_alloc
111                                  */
112                                 void
113                                 AddEvents( );
114                                 // ----------------------------------------------------------------------------------
115                                 /*! @fn void ButtonExpEvent( wxCommandEvent& event );
116                                  *      @brief This method is the button group "+" "-" event.
117                                  *      @exception std::bad_alloc
118                                  *      @param event Button action event.
119                                  */
120                                 void
121                                 ButtonExpEvent( wxCommandEvent& event );
122                                 // ----------------------------------------------------------------------------------
123                                 /*! @fn void ButtonEvent( wxCommandEvent& event );
124                                  *      @brief This method calls the events of the buttonContainer buttons
125                                  *      @exception std::bad_alloc
126                                  *      @param event Button action event.
127                                  */
128                                 void
129                                 ButtonEvent( wxCommandEvent& event );
130                                 // ----------------------------------------------------------------------------------
131                         private:
132                                 BCPanel* m_BCPanel; //! <ButtonContainerPanel View pointer.
133                 };
134         }//ecapsename
135 }//ecapsename
136
137 #endif //BUTTONCONTAINERCONTROLLER_H_