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"
50 /*! @namespace <creaButtonContainer>
51 * @brief Contains the creaButtonContainer library included in creaMaracasVisu.
53 namespace creaButtonContainer
55 /*! @namespace<creaButtonContainer::controller>
56 * @brief Contains the implementation of the controller in creaButtonContainer library.
57 * @see <a href="http://en.wikipedia.org/wiki/Model-view-controller">MVC Software Architecture</a>
61 /*! @class ButtonContainerController buttonContainerController.h "buttonContainerController.h"
62 * @brief This class contains the ButtonContainerPanel controller.
63 * @details This class describes the button events, it derives from wxEvtHandler.
64 * @see <a href="http://docs.wxwidgets.org/stable/wx_wxevthandler.html">wxEvtHandler</a>
66 class ButtonContainerController;
69 /*! @namespace <creaButtonContainer::view>
70 * @brief Contains the implementation of the view in creaButtonContainer library.
71 * @see <a href="http://en.wikipedia.org/wiki/Model-view-controller">MVC Software Architecture</a>
75 /*! @class ButtonContainerPanel buttonContainerPanel.h "buttonContainerPanel.h"
76 * @brief This class is the container of the creaButtonContainer.
77 * @details This class derives from wxScrolledWindow and manages the view of the buttonContainer.
78 * @bug The scrolled it doesn't work! (to be changed soon)
79 * @see <a href="http://docs.wxwidgets.org/stable/wx_wxscrolledwindow.html">wxScrolledWindow</a>
81 class ButtonContainerPanel: public wxScrolledWindow
85 // ----------------------------------------------------------------------------------
86 /*! @typedef creaButtonContainer::view::ButtonGroup ButtonGroup;
87 * @brief Defines the ButtonGroup type.
89 typedef creaButtonContainer::view::ButtonGroup ButtonGroup;
90 // ----------------------------------------------------------------------------------
91 /*! @typedef creaButtonContainer::view::GroupManager GroupManager;
92 * @brief Defines the GroupManager type.
94 typedef creaButtonContainer::view::GroupManager GroupManager;
95 // ----------------------------------------------------------------------------------
96 /*! @typedef std::list< ButtonGroup* > ButtonGroupList;
97 * @brief Defines the ButtonGroupList type.
99 typedef std::list<ButtonGroup*> ButtonGroupList;
100 // ----------------------------------------------------------------------------------
101 /*! @typedef std::map< long, GroupManager* > GroupManagerList;
102 * @brief Defines the GroupManagerList type.
104 typedef std::map<long, GroupManager*> GroupManagerList;
105 // ----------------------------------------------------------------------------------
106 /*! @typedef wxFlexGridSizer Sizer;
107 * @brief Defines the Sizer type.
109 typedef wxFlexGridSizer Sizer;
110 // ----------------------------------------------------------------------------------
111 /*! @typedef std::list< long > KeyList;
112 * @brief Defines the KeyList type.
114 typedef std::list<long> KeyList;
115 // ----------------------------------------------------------------------------------
116 /*! @typedef creaButtonContainer::model::ContainerSettings ButtonGroupSettings;
117 * @brief Defines the ButtonGroupSettings type.
119 typedef creaButtonContainer::model::ContainerSettings ButtonGroupSettings;
120 // ----------------------------------------------------------------------------------
121 /*! @typedef creaButtonContainer::model::ButtonGroupFactory ButtonGroupFactory;
122 * @brief Defines the ButtonGroupFactory type.
124 typedef creaButtonContainer::model::ButtonGroupFactory ButtonGroupFactory;
125 // ----------------------------------------------------------------------------------
126 /*! creaButtonContainer::controller::ButtonContainerController BCController;
127 * @brief Defines the BCController type.
129 typedef creaButtonContainer::controller::ButtonContainerController BCController;
131 // ----------------------------------------------------------------------------------
132 //end of typedef definition
134 /*! @fn ButtonContainerPanel( wxWindow* parent, ButtonGroupSettings* settings );
135 * @brief This is the parameterized constructor.
136 * @param parent wxWindow pointer to parent.
137 * @param settings ButtonGroupSettings Pointer to button container settings.
139 ButtonContainerPanel(wxWindow* parent, ButtonGroupSettings* settings);
140 // ----------------------------------------------------------------------------------
141 /*! @fn ~ButtonContainerPanel( );
142 * @brief This is the destructor.
145 ~ButtonContainerPanel();
146 // ----------------------------------------------------------------------------------
147 /*! @fn SetGroupContainer( ButtonGroupList groupContainer );
148 * @brief This method sets the settings to the container.
149 * @param groupContainer
152 SetButtonGroupContainer(ButtonGroupList groupContainer);
153 // ----------------------------------------------------------------------------------
154 /*! @fn PanelInit( );
155 * This method initializes the panel.
156 * @exception std::bad_alloc
160 // ----------------------------------------------------------------------------------
163 //SetListGroupContainer(ListGroupList groupContainer );
164 // ----------------------------------------------------------------------------------
166 * This method fits and organizes the sizer.
170 // ----------------------------------------------------------------------------------
172 friend class creaButtonContainer::controller::ButtonContainerController;
174 GroupManagerList m_GroupManagerList; //!<The container of managers.
175 ButtonGroupList m_ButtonGroupList; //!<The list of button groups.
176 BCController* m_ButtonCController; //!<Pontier to controller.
177 Sizer* m_Sizer; //!<Pointer to wxSizer
179 DECLARE_EVENT_TABLE()
180 //!<Event Table declaration.
185 #endif // BUTTONCONTAINERPANEL_H