]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/controller/buttonContainerController.h
creaButtonContainer: exceptions added, doxygen documentation added :)
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / creaButtonContainer / controller / buttonContainerController.h
1 /************************************************************************************//*!
2  * Name:      @file buttonContainerController.h
3  * Purpose:   @brief This contains the ButtonContainerController class
4  * Author:    @author Diego CACERES (diego.caceres[AT]creatis.insa-lyon.fr)
5  * Modified:  2011-05-17
6  * Copyright:
7  * License:
8  ***************************************************************************************/
9
10 #ifndef BUTTONCONTAINERCONTROLLER_H_
11 #define BUTTONCONTAINERCONTROLLER_H_
12
13 //! @include <wx/event.h>
14 #include <wx/event.h>
15 //! @include <iostream>
16 #include <iostream>
17 //! @include <exception>
18 #include <exception>
19
20 //! @include "buttonContainerPanel.h"
21 #include "buttonContainerPanel.h"
22
23 //!     @namespace<creaButtonContainer>
24 namespace creaButtonContainer
25 {
26         //! @namespace<view>
27         namespace view
28         {
29                 //Predefinition of ButtonContainerPanel FriendClass!!
30                 //! @class ButtonContainerPanel buttonContainerPanel.h "buttonContainerPanel.h"
31
32                 class ButtonContainerPanel;
33         }
34         //!     @namespace<controller>
35         namespace controller
36         {
37                 /*! @class ButtonContainerController buttonContainerController.h "buttonContainerController.h"
38                  *      @brief This class contains the ButtonContainerPanel controller
39                  *  This class describes button events.
40                  */
41                 class ButtonContainerController : public wxEvtHandler
42                 {
43                         public:
44                                 //typedef definitions
45                                 /*!     @typedef creaButtonContainer::view::ButtonGroup ButtonGroup
46                                  *      @brief Defines the ButtonGroup type
47                                  */
48                                 typedef creaButtonContainer::view::ButtonGroup ButtonGroup;
49                                 // ----------------------------------------------------------------------------------
50                                 /*!     @typedef typedef creaButtonContainer::view::GroupManager GroupManager
51                                  *      @brief Defines the GroupManager type
52                                  */
53                                 typedef creaButtonContainer::view::GroupManager GroupManager;
54                                 // ----------------------------------------------------------------------------------
55                                 /*!     @typedef std::list< ButtonGroup* > ButtonGroupList
56                                  *      @brief Defines the ButtonGroupList type
57                                  */
58                                 typedef std::list< ButtonGroup* > ButtonGroupList;
59                                 // ----------------------------------------------------------------------------------
60                                 /*!     @typedef std::map< long, GroupManager* > GroupManagerList
61                                  * @brief Defines the GroupManagerList type
62                                  */
63                                 typedef std::map< long, GroupManager* > GroupManagerList;
64                                 // ----------------------------------------------------------------------------------
65                                 /*!     @typedef wxFlexGridSizer Sizer
66                                  *      @brief Defines the Sizer type
67                                  */
68                                 typedef wxFlexGridSizer Sizer;
69                                 // ----------------------------------------------------------------------------------
70                                 /*!     @typedef std::list< long > KeyList
71                                  *      @brief Defines the KeyList type
72                                  */
73                                 typedef std::list< long > KeyList;
74                                 // ----------------------------------------------------------------------------------
75                                 /*!     @typedef creaButtonContainer::model::ContainerSettings ButtonGroupSettings
76                                  *      @brief Defines the ButtonGroupSettings type
77                                  */
78                                 typedef creaButtonContainer::model::ContainerSettings
79                                     ButtonGroupSettings;
80                                 // ----------------------------------------------------------------------------------
81                                 /*!     @typedef creaButtonContainer::view::ButtonContainerPanel BCPanel
82                                  *      @brief Defines the BCPanel type
83                                  */
84                                 typedef creaButtonContainer::view::ButtonContainerPanel BCPanel;
85                                 //end of typedef definition
86                         public:
87                                 /*!     @fn ButtonContainerController::ButtonContainerController( BCPanel* )
88                                  *      @brief This is the Parameterized constructor.
89                                  *      @param BCPanel*
90                                  */
91                                 ButtonContainerController( BCPanel* );
92                                 // ----------------------------------------------------------------------------------
93                                 /*! @fn virtual ButtonContainerController::~ButtonContainerController( )
94                                  *      @brief This is the destructor.
95                                  */
96                                 virtual
97                                 ~ButtonContainerController( );
98                                 // ----------------------------------------------------------------------------------
99                                 /*! @fn void ButtonContainerController::AddEvents( )
100                                  *      @brief This function connect every buttonEvent to the view.
101                                  *      @exception std::bad_alloc
102                                  */
103                                 void
104                                 AddEvents( );
105                                 // ----------------------------------------------------------------------------------
106                                 /*! @fn void ButtonContainerController::ButtonExpEvent( wxCommandEvent& event )
107                                  *      @brief This function is the button group "+" "-" event.
108                                  *      @exception std::bad_alloc
109                                  *      @param event Button action event.
110                                  */
111                                 void
112                                 ButtonExpEvent( wxCommandEvent& event );
113                                 // ----------------------------------------------------------------------------------
114                                 /*! @fn void ButtonContainerController::ButtonEvent( wxCommandEvent& event )
115                                  *      @brief This function calls the events of the buttonContainer buttons
116                                  *      @exception std::bad_alloc
117                                  *      @param event Button action event.
118                                  */
119                                 void
120                                 ButtonEvent( wxCommandEvent& event );
121                                 // ----------------------------------------------------------------------------------
122                         private:
123                                 BCPanel* m_BCPanel; //! <ButtonContainerPanel View pointer.
124                 };
125         }//ecapsename
126 }//ecapsename
127
128 #endif //BUTTONCONTAINERCONTROLLER_H_