1 /*# ---------------------------------------------------------------------
3 # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
5 # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
6 # Previous Authors : Laurent Guigues, Jean-Pierre Roux
7 # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
9 # This software is governed by the CeCILL-B license under French law and
10 # abiding by the rules of distribution of free software. You can use,
11 # modify and/ or redistribute the software under the terms of the CeCILL-B
12 # license as circulated by CEA, CNRS and INRIA at the following URL
13 # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
14 # or in the file LICENSE.txt.
16 # As a counterpart to the access to the source code and rights to copy,
17 # modify and redistribute granted by the license, users are provided only
18 # with a limited warranty and the software's author, the holder of the
19 # economic rights, and the successive licensors have only limited
22 # The fact that you are presently reading this means that you have had
23 # knowledge of the CeCILL-B license and that you accept its terms.
24 # ------------------------------------------------------------------------ */
27 * @file buttonContainerController.h
28 * @brief This contains the ButtonContainerController class
29 * @author Diego CACERES (diego.caceres[AT]creatis.insa-lyon.fr)
33 #ifndef BUTTONCONTAINERPANEL_H
34 #define BUTTONCONTAINERPANEL_H
36 #include <wx/scrolwin.h>
37 #include <wx/button.h>
44 #include "buttonGroup.h"
45 #include "groupManager.h"
46 #include "buttonGroupFactory.h"
47 #include "containerSettings.h"
48 #include "buttonContainerController.h"
49 //EED-MLER #include "listGroup.h"
50 //EED-MLER #include "listGroupFactory.h"
52 /*! @namespace <creaButtonContainer>
53 * @brief Contains the creaButtonContainer library included in creaMaracasVisu.
55 namespace creaButtonContainer
57 /*! @namespace<creaButtonContainer::controller>
58 * @brief Contains the implementation of the controller in creaButtonContainer library.
59 * @see <a href="http://en.wikipedia.org/wiki/Model-view-controller">MVC Software Architecture</a>
63 /*! @class ButtonContainerController buttonContainerController.h "buttonContainerController.h"
64 * @brief This class contains the ButtonContainerPanel controller.
65 * @details This class describes the button events, it derives from wxEvtHandler.
66 * @see <a href="http://docs.wxwidgets.org/stable/wx_wxevthandler.html">wxEvtHandler</a>
68 class ButtonContainerController;
71 /*! @namespace <creaButtonContainer::view>
72 * @brief Contains the implementation of the view in creaButtonContainer library.
73 * @see <a href="http://en.wikipedia.org/wiki/Model-view-controller">MVC Software Architecture</a>
77 /*! @class ButtonContainerPanel buttonContainerPanel.h "buttonContainerPanel.h"
78 * @brief This class is the container of the creaButtonContainer.
79 * @details This class derives from wxScrolledWindow and manages the view of the buttonContainer.
80 * @bug The scrolled it doesn't work! (to be changed soon)
81 * @see <a href="http://docs.wxwidgets.org/stable/wx_wxscrolledwindow.html">wxScrolledWindow</a>
83 class ButtonContainerPanel : public wxScrolledWindow
87 // ----------------------------------------------------------------------------------
88 /*! @typedef creaButtonContainer::view::ButtonGroup ButtonGroup;
89 * @brief Defines the ButtonGroup type.
91 typedef creaButtonContainer::view::ButtonGroup ButtonGroup;
92 // ----------------------------------------------------------------------------------
93 /*! @typedef creaButtonContainer::view::GroupManager GroupManager;
94 * @brief Defines the GroupManager type.
96 typedef creaButtonContainer::view::GroupManager GroupManager;
97 // ----------------------------------------------------------------------------------
98 /*! @typedef std::list< ButtonGroup* > ButtonGroupList;
99 * @brief Defines the ButtonGroupList type.
101 typedef std::list< ButtonGroup* > ButtonGroupList;
102 // ----------------------------------------------------------------------------------
103 /*! @typedef std::map< long, GroupManager* > GroupManagerList;
104 * @brief Defines the GroupManagerList type.
106 typedef std::map< long, GroupManager* > GroupManagerList;
107 // ----------------------------------------------------------------------------------
108 /*! @typedef wxFlexGridSizer Sizer;
109 * @brief Defines the Sizer type.
111 typedef wxFlexGridSizer Sizer;
112 // ----------------------------------------------------------------------------------
113 /*! @typedef std::list< long > KeyList;
114 * @brief Defines the KeyList type.
116 typedef std::list< long > KeyList;
117 // ----------------------------------------------------------------------------------
118 /*! @typedef creaButtonContainer::model::ContainerSettings ButtonGroupSettings;
119 * @brief Defines the ButtonGroupSettings type.
121 typedef creaButtonContainer::model::ContainerSettings
123 // ----------------------------------------------------------------------------------
124 /*! @typedef creaButtonContainer::model::ButtonGroupFactory ButtonGroupFactory;
125 * @brief Defines the ButtonGroupFactory type.
127 typedef creaButtonContainer::model::ButtonGroupFactory
129 // ----------------------------------------------------------------------------------
130 /*! creaButtonContainer::controller::ButtonContainerController BCController;
131 * @brief Defines the BCController type.
133 typedef creaButtonContainer::controller::ButtonContainerController
137 //typedef creaButtonContainer::model::ListGroupFactory ListGroupFactory;
139 //typedef creaButtonContainer::view::ListGroup ListGroup;
141 //typedef std::list< ListGroup* > ListGroupList;
143 //typedef creaButtonContainer::model::ListGroupFactory ListGroupFactory;
146 // ----------------------------------------------------------------------------------
147 //end of typedef definition
149 /*! @fn ButtonContainerPanel( wxWindow* parent, ButtonGroupSettings* settings );
150 * @brief This is the parameterized constructor.
151 * @param parent wxWindow pointer to parent.
152 * @param settings ButtonGroupSettings Pointer to button container settings.
154 ButtonContainerPanel( wxWindow* parent, ButtonGroupSettings* settings, int type );
155 // ----------------------------------------------------------------------------------
156 /*! @fn ~ButtonContainerPanel( );
157 * @brief This is the destructor.
160 ~ButtonContainerPanel( );
161 // ----------------------------------------------------------------------------------
162 /*! @fn SetGroupContainer( ButtonGroupList groupContainer );
163 * @brief This method sets the settings to the container.
164 * @param groupContainer
167 SetButtonGroupContainer( ButtonGroupList groupContainer );
168 // ----------------------------------------------------------------------------------
169 /*! @fn PanelInit( );
170 * This method initializes the panel.
171 * @exception std::bad_alloc
174 PanelInit( int type);
175 // ----------------------------------------------------------------------------------
178 //SetListGroupContainer(ListGroupList groupContainer );
179 // ----------------------------------------------------------------------------------
181 * This method fits and organizes the sizer.
185 // ----------------------------------------------------------------------------------
187 friend class creaButtonContainer::controller::ButtonContainerController;
189 GroupManagerList m_GroupManagerList; //!<The container of managers.
190 ButtonGroupList m_ButtonGroupList; //!<The list of button groups.
191 BCController* m_ButtonCController; //!<Pontier to controller.
192 Sizer* m_Sizer; //!<Pointer to wxSizer
195 //ListGroupList m_ListGroupList;
197 DECLARE_EVENT_TABLE() //!<Event Table declaration.
202 #endif // BUTTONCONTAINERPANEL_H