2 * @file buttonContainerController.h
3 * @brief Contains the ButtonContainerController class
4 * @author Diego CACERES (diego.caceres[AT]creatis.insa-lyon.fr)
8 #ifndef BUTTONCONTAINERCONTROLLER_H_
9 #define BUTTONCONTAINERCONTROLLER_H_
14 #include "buttonContainerPanel.h"
16 /*! @namespace <creaButtonContainer>
17 * @brief Contains the creaButtonContainer library included in creaMaracasVisu.
19 namespace creaButtonContainer
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>
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>
33 class ButtonContainerPanel;
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>
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>
46 class ButtonContainerController : public wxEvtHandler
50 // ----------------------------------------------------------------------------------
51 /*! @typedef creaButtonContainer::view::ButtonGroup ButtonGroup
52 * @brief Defines the ButtonGroup type
54 typedef creaButtonContainer::view::ButtonGroup ButtonGroup;
55 // ----------------------------------------------------------------------------------
56 /*! @typedef typedef creaButtonContainer::view::GroupManager GroupManager
57 * @brief Defines the GroupManager type
59 typedef creaButtonContainer::view::GroupManager GroupManager;
60 // ----------------------------------------------------------------------------------
61 /*! @typedef std::list< ButtonGroup* > ButtonGroupList
62 * @brief Defines the ButtonGroupList type
64 typedef std::list< ButtonGroup* > ButtonGroupList;
65 // ----------------------------------------------------------------------------------
66 /*! @typedef std::map< long, GroupManager* > GroupManagerList
67 * @brief Defines the GroupManagerList type
69 typedef std::map< long, GroupManager* > GroupManagerList;
70 // ----------------------------------------------------------------------------------
71 /*! @typedef wxFlexGridSizer Sizer
72 * @brief Defines the Sizer type
74 typedef wxFlexGridSizer Sizer;
75 // ----------------------------------------------------------------------------------
76 /*! @typedef std::list< long > KeyList
77 * @brief Defines the KeyList type
79 typedef std::list< long > KeyList;
80 // ----------------------------------------------------------------------------------
81 /*! @typedef creaButtonContainer::model::ContainerSettings ButtonGroupSettings
82 * @brief Defines the ButtonGroupSettings type
84 typedef creaButtonContainer::model::ContainerSettings
86 // ----------------------------------------------------------------------------------
87 /*! @typedef creaButtonContainer::view::ButtonContainerPanel BCPanel
88 * @brief Defines the BCPanel type
90 typedef creaButtonContainer::view::ButtonContainerPanel BCPanel;
91 // ----------------------------------------------------------------------------------
92 //end of typedef definition
94 // ----------------------------------------------------------------------------------
95 /*! @fn ButtonContainerController( BCPanel* );
96 * @brief This is the Parameterized constructor.
97 * @param BCPanel* The connection with the view (wxPanel link).
99 ButtonContainerController( BCPanel* );
100 // ----------------------------------------------------------------------------------
101 /*! @fn ~ButtonContainerController( );
102 * @brief This is the destructor.
105 ~ButtonContainerController( );
107 // ----------------------------------------------------------------------------------
108 /*! @fn void AddEvents( );
109 * @brief This method connect every buttonEvents to the view.
110 * @exception std::bad_alloc
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.
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.
129 ButtonEvent( wxCommandEvent& event );
130 // ----------------------------------------------------------------------------------
132 BCPanel* m_BCPanel; //! <ButtonContainerPanel View pointer.
137 #endif //BUTTONCONTAINERCONTROLLER_H_