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>
19 #include "buttonGroup.h"
20 #include "groupManager.h"
21 #include "buttonGroupFactory.h"
22 #include "containerSettings.h"
23 #include "buttonContainerController.h"
25 /*! @namespace <creaButtonContainer>
26 * @brief Contains the creaButtonContainer library included in creaMaracasVisu.
28 namespace creaButtonContainer
30 /*! @namespace<creaButtonContainer::controller>
31 * @brief Contains the implementation of the controller in creaButtonContainer library.
32 * @see <a href="http://en.wikipedia.org/wiki/Model-view-controller">MVC Software Architecture</a>
36 /*! @class ButtonContainerController buttonContainerController.h "buttonContainerController.h"
37 * @brief This class contains the ButtonContainerPanel controller.
38 * @details This class describes the button events, it derives from wxEvtHandler.
39 * @see <a href="http://docs.wxwidgets.org/stable/wx_wxevthandler.html">wxEvtHandler</a>
41 class ButtonContainerController;
44 /*! @namespace <creaButtonContainer::view>
45 * @brief Contains the implementation of the view in creaButtonContainer library.
46 * @see <a href="http://en.wikipedia.org/wiki/Model-view-controller">MVC Software Architecture</a>
50 /*! @class ButtonContainerPanel buttonContainerPanel.h "buttonContainerPanel.h"
51 * @brief This class is the container of the creaButtonContainer.
52 * @details This class derives from wxScrolledWindow and manages the view of the buttonContainer.
53 * @bug The scrolled it doesn't work! (to be changed soon)
54 * @see <a href="http://docs.wxwidgets.org/stable/wx_wxscrolledwindow.html">wxScrolledWindow</a>
56 class ButtonContainerPanel : public wxScrolledWindow
60 // ----------------------------------------------------------------------------------
61 /*! @typedef creaButtonContainer::view::ButtonGroup ButtonGroup;
62 * @brief Defines the ButtonGroup type.
64 typedef creaButtonContainer::view::ButtonGroup ButtonGroup;
65 // ----------------------------------------------------------------------------------
66 /*! @typedef creaButtonContainer::view::GroupManager GroupManager;
67 * @brief Defines the GroupManager type.
69 typedef creaButtonContainer::view::GroupManager GroupManager;
70 // ----------------------------------------------------------------------------------
71 /*! @typedef std::list< ButtonGroup* > ButtonGroupList;
72 * @brief Defines the ButtonGroupList type.
74 typedef std::list< ButtonGroup* > ButtonGroupList;
75 // ----------------------------------------------------------------------------------
76 /*! @typedef std::map< long, GroupManager* > GroupManagerList;
77 * @brief Defines the GroupManagerList type.
79 typedef std::map< long, GroupManager* > GroupManagerList;
80 // ----------------------------------------------------------------------------------
81 /*! @typedef wxFlexGridSizer Sizer;
82 * @brief Defines the Sizer type.
84 typedef wxFlexGridSizer Sizer;
85 // ----------------------------------------------------------------------------------
86 /*! @typedef std::list< long > KeyList;
87 * @brief Defines the KeyList type.
89 typedef std::list< long > KeyList;
90 // ----------------------------------------------------------------------------------
91 /*! @typedef creaButtonContainer::model::ContainerSettings ButtonGroupSettings;
92 * @brief Defines the ButtonGroupSettings type.
94 typedef creaButtonContainer::model::ContainerSettings
96 // ----------------------------------------------------------------------------------
97 /*! @typedef creaButtonContainer::model::ButtonGroupFactory ButtonGroupFactory;
98 * @brief Defines the ButtonGroupFactory type.
100 typedef creaButtonContainer::model::ButtonGroupFactory
102 // ----------------------------------------------------------------------------------
103 /*! creaButtonContainer::controller::ButtonContainerController BCController;
104 * @brief Defines the BCController type.
106 typedef creaButtonContainer::controller::ButtonContainerController
108 // ----------------------------------------------------------------------------------
109 //end of typedef definition
111 /*! @fn ButtonContainerPanel( wxWindow* parent, ButtonGroupSettings* settings );
112 * @brief This is the parameterized constructor.
113 * @param parent wxWindow pointer to parent.
114 * @param settings ButtonGroupSettings Pointer to button container settings.
116 ButtonContainerPanel( wxWindow* parent, ButtonGroupSettings* settings );
117 // ----------------------------------------------------------------------------------
118 /*! @fn ~ButtonContainerPanel( );
119 * @brief This is the destructor.
122 ~ButtonContainerPanel( );
123 // ----------------------------------------------------------------------------------
124 /*! @fn SetGroupContainer( ButtonGroupList groupContainer );
125 * @brief This method sets the settings to the container.
126 * @param groupContainer
129 SetGroupContainer( ButtonGroupList groupContainer );
130 // ----------------------------------------------------------------------------------
131 /*! @fn PanelInit( );
132 * This method initializes the panel.
133 * @exception std::bad_alloc
137 // ----------------------------------------------------------------------------------
139 * This method fits and organizes the sizer.
143 // ----------------------------------------------------------------------------------
145 friend class creaButtonContainer::controller::ButtonContainerController;
147 GroupManagerList m_GroupManagerList; //!<The container of managers.
148 ButtonGroupList m_ButtonGroupList; //!<The list of button groups.
149 BCController* m_ButtonCController; //!<Pontier to controller.
150 Sizer* m_Sizer; //!<Pointer to wxSizer
151 DECLARE_EVENT_TABLE() //!<Event Table declaration.
156 #endif // BUTTONCONTAINERPANEL_H