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 ButtonContainerController buttonContainerController.h "buttonContainerController.h"
50 * @brief This class contains the ButtonContainerPanel controller.
51 * @details This class describes the button events, it derives from wxEvtHandler and it is the
52 * controller in the MVC.
53 * @see <a href="http://docs.wxwidgets.org/stable/wx_wxscrolledWindow.html">wxScrolledWindow</a>
55 class ButtonContainerPanel : public wxScrolledWindow
59 // ----------------------------------------------------------------------------------
60 /*! @typedef creaButtonContainer::view::ButtonGroup ButtonGroup;
61 * @brief Defines the ButtonGroup type.
63 typedef creaButtonContainer::view::ButtonGroup ButtonGroup;
64 // ----------------------------------------------------------------------------------
65 /*! @typedef creaButtonContainer::view::GroupManager GroupManager;
66 * @brief Defines the GroupManager type.
68 typedef creaButtonContainer::view::GroupManager GroupManager;
69 // ----------------------------------------------------------------------------------
70 /*! @typedef std::list< ButtonGroup* > ButtonGroupList;
71 * @brief Defines the ButtonGroupList type.
73 typedef std::list< ButtonGroup* > ButtonGroupList;
74 // ----------------------------------------------------------------------------------
75 /*! @typedef std::map< long, GroupManager* > GroupManagerList;
76 * @brief Defines the GroupManagerList type.
78 typedef std::map< long, GroupManager* > GroupManagerList;
79 // ----------------------------------------------------------------------------------
80 /*! @typedef wxFlexGridSizer Sizer;
81 * @brief Defines the Sizer type.
83 typedef wxFlexGridSizer Sizer;
84 // ----------------------------------------------------------------------------------
85 /*! @typedef std::list< long > KeyList;
86 * @brief Defines the KeyList type.
88 typedef std::list< long > KeyList;
89 // ----------------------------------------------------------------------------------
90 /*! @typedef creaButtonContainer::model::ContainerSettings ButtonGroupSettings;
91 * @brief Defines the ButtonGroupSettings type.
93 typedef creaButtonContainer::model::ContainerSettings
95 // ----------------------------------------------------------------------------------
96 /*! @typedef creaButtonContainer::model::ButtonGroupFactory ButtonGroupFactory;
97 * @brief Defines the ButtonGroupFactory type.
99 typedef creaButtonContainer::model::ButtonGroupFactory
101 // ----------------------------------------------------------------------------------
102 /*! creaButtonContainer::controller::ButtonContainerController BCController;
103 * @brief Defines the BCController type.
105 typedef creaButtonContainer::controller::ButtonContainerController
107 // ----------------------------------------------------------------------------------
108 //end of typedef definition
110 /*! @fn ButtonContainerPanel( wxWindow* parent, ButtonGroupSettings* settings );
111 * @brief This is the parameterized constructor.
112 * @param parent wxWindow pointer to parent.
113 * @param settings ButtonGroupSettings Pointer to button container settings.
115 ButtonContainerPanel( wxWindow* parent, ButtonGroupSettings* settings );
116 // ----------------------------------------------------------------------------------
117 /*! @fn ~ButtonContainerPanel( );
118 * @brief This is the destructor.
121 ~ButtonContainerPanel( );
122 // ----------------------------------------------------------------------------------
123 /*! @fn SetGroupContainer( ButtonGroupList groupContainer );
124 * @brief This function sets the settings to the container.
125 * @param groupContainer
128 SetGroupContainer( ButtonGroupList groupContainer );
129 // ----------------------------------------------------------------------------------
130 /*! @fn PanelInit( );
131 * This function initializes the panel.
135 // ----------------------------------------------------------------------------------
137 * This function 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