2 * @file buttonContainerController.h
3 * @brief This contains the ButtonContainerController class
4 * @author Diego CACERES (diego.caceres[AT]creatis.insa-lyon.fr)
8 #ifndef BUTTONCONTAINERPANEL_H
9 #define BUTTONCONTAINERPANEL_H
11 #include <wx/scrolwin.h>
12 #include <wx/button.h>
17 #include "buttonGroup.h"
18 #include "groupManager.h"
19 #include "buttonGroupFactory.h"
20 #include "containerSettings.h"
21 #include "buttonContainerController.h"
23 /*! @namespace <creaButtonContainer>
24 * @brief Contains the creaButtonContainer library included in creaMaracasVisu.
26 namespace creaButtonContainer
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>
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>
40 class ButtonContainerController;
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>
49 /*! @class ButtonContainerPanel buttonContainerPanel.h "buttonContainerPanel.h"
50 * @brief This class is the container of the creaButtonContainer.
51 * @details This class derives from wxScrolledWindow and manages the view of the buttonContainer.
52 * @see <a href="http://docs.wxwidgets.org/stable/wx_wxscrolledwindow.html">wxScrolledWindow</a>
54 class ButtonContainerPanel : public wxScrolledWindow
58 // ----------------------------------------------------------------------------------
59 /*! @typedef creaButtonContainer::view::ButtonGroup ButtonGroup;
60 * @brief Defines the ButtonGroup type.
62 typedef creaButtonContainer::view::ButtonGroup ButtonGroup;
63 // ----------------------------------------------------------------------------------
64 /*! @typedef creaButtonContainer::view::GroupManager GroupManager;
65 * @brief Defines the GroupManager type.
67 typedef creaButtonContainer::view::GroupManager GroupManager;
68 // ----------------------------------------------------------------------------------
69 /*! @typedef std::list< ButtonGroup* > ButtonGroupList;
70 * @brief Defines the ButtonGroupList type.
72 typedef std::list< ButtonGroup* > ButtonGroupList;
73 // ----------------------------------------------------------------------------------
74 /*! @typedef std::map< long, GroupManager* > GroupManagerList;
75 * @brief Defines the GroupManagerList type.
77 typedef std::map< long, GroupManager* > GroupManagerList;
78 // ----------------------------------------------------------------------------------
79 /*! @typedef wxFlexGridSizer Sizer;
80 * @brief Defines the Sizer type.
82 typedef wxFlexGridSizer Sizer;
83 // ----------------------------------------------------------------------------------
84 /*! @typedef std::list< long > KeyList;
85 * @brief Defines the KeyList type.
87 typedef std::list< long > KeyList;
88 // ----------------------------------------------------------------------------------
89 /*! @typedef creaButtonContainer::model::ContainerSettings ButtonGroupSettings;
90 * @brief Defines the ButtonGroupSettings type.
92 typedef creaButtonContainer::model::ContainerSettings
94 // ----------------------------------------------------------------------------------
95 /*! @typedef creaButtonContainer::model::ButtonGroupFactory ButtonGroupFactory;
96 * @brief Defines the ButtonGroupFactory type.
98 typedef creaButtonContainer::model::ButtonGroupFactory
100 // ----------------------------------------------------------------------------------
101 /*! creaButtonContainer::controller::ButtonContainerController BCController;
102 * @brief Defines the BCController type.
104 typedef creaButtonContainer::controller::ButtonContainerController
106 // ----------------------------------------------------------------------------------
107 //end of typedef definition
109 /*! @fn ButtonContainerPanel( wxWindow* parent, ButtonGroupSettings* settings );
110 * @brief This is the parameterized constructor.
111 * @param parent wxWindow pointer to parent.
112 * @param settings ButtonGroupSettings Pointer to button container settings.
114 ButtonContainerPanel( wxWindow* parent, ButtonGroupSettings* settings );
115 // ----------------------------------------------------------------------------------
116 /*! @fn ~ButtonContainerPanel( );
117 * @brief This is the destructor.
120 ~ButtonContainerPanel( );
121 // ----------------------------------------------------------------------------------
122 /*! @fn SetGroupContainer( ButtonGroupList groupContainer );
123 * @brief This method sets the settings to the container.
124 * @param groupContainer
127 SetGroupContainer( ButtonGroupList groupContainer );
128 // ----------------------------------------------------------------------------------
129 /*! @fn PanelInit( );
130 * This method initializes the panel.
131 * @exception std::bad_alloc
135 // ----------------------------------------------------------------------------------
137 * This method fits and organizes the sizer.
141 // ----------------------------------------------------------------------------------
143 friend class creaButtonContainer::controller::ButtonContainerController;
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
153 #endif // BUTTONCONTAINERPANEL_H