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 Contains the ButtonContainerController class
29 * @author Diego CACERES (diego.caceres[AT]creatis.insa-lyon.fr)
33 #ifndef BUTTONCONTAINERCONTROLLER_H_
34 #define BUTTONCONTAINERCONTROLLER_H_
39 #include "buttonContainerPanel.h"
41 /*! @namespace <creaButtonContainer>
42 * @brief Contains the creaButtonContainer library included in creaMaracasVisu.
44 namespace creaButtonContainer
46 /*! @namespace <creaButtonContainer::view>
47 * @brief Contains the implementation of the view in creaButtonContainer library.
48 * @see <a href="http://en.wikipedia.org/wiki/Model-view-controller">MVC Software Architecture</a>
52 //Predefinition of ButtonContainerPanel FriendClass!!
53 /*! @class ButtonContainerPanel buttonContainerPanel.h "buttonContainerPanel.h"
54 * @brief This class is the container of the creaButtonContainer.
55 * @details This class derives from wxScrolledWindow and manages the view of the buttonContainer.
56 * @see <a href="http://docs.wxwidgets.org/stable/wx_wxscrolledwindow.html">wxScrolledWindow</a>
58 class ButtonContainerPanel;
60 /*! @namespace<creaButtonContainer::controller>
61 * @brief Contains the implementation of the controller in creaButtonContainer library.
62 * @see <a href="http://en.wikipedia.org/wiki/Model-view-controller">MVC Software Architecture</a>
66 /*! @class ButtonContainerController buttonContainerController.h "buttonContainerController.h"
67 * @brief This class contains the ButtonContainerPanel controller.
68 * @details This class describes the button events, it derives from wxEvtHandler.
69 * @see <a href="http://docs.wxwidgets.org/stable/wx_wxevthandler.html">wxEvtHandler</a>
71 class ButtonContainerController : public wxEvtHandler
75 // ----------------------------------------------------------------------------------
76 /*! @typedef creaButtonContainer::view::ButtonGroup ButtonGroup
77 * @brief Defines the ButtonGroup type
79 typedef creaButtonContainer::view::ButtonGroup ButtonGroup;
80 // ----------------------------------------------------------------------------------
81 /*! @typedef typedef creaButtonContainer::view::GroupManager GroupManager
82 * @brief Defines the GroupManager type
84 typedef creaButtonContainer::view::GroupManager GroupManager;
85 // ----------------------------------------------------------------------------------
86 /*! @typedef std::list< ButtonGroup* > ButtonGroupList
87 * @brief Defines the ButtonGroupList type
89 typedef std::list< ButtonGroup* > ButtonGroupList;
90 // ----------------------------------------------------------------------------------
91 /*! @typedef std::map< long, GroupManager* > GroupManagerList
92 * @brief Defines the GroupManagerList type
94 typedef std::map< long, GroupManager* > GroupManagerList;
95 // ----------------------------------------------------------------------------------
96 /*! @typedef wxFlexGridSizer Sizer
97 * @brief Defines the Sizer type
99 typedef wxFlexGridSizer Sizer;
100 // ----------------------------------------------------------------------------------
101 /*! @typedef std::list< long > KeyList
102 * @brief Defines the KeyList type
104 typedef std::list< long > KeyList;
105 // ----------------------------------------------------------------------------------
106 /*! @typedef creaButtonContainer::model::ContainerSettings ButtonGroupSettings
107 * @brief Defines the ButtonGroupSettings type
109 typedef creaButtonContainer::model::ContainerSettings
111 // ----------------------------------------------------------------------------------
112 /*! @typedef creaButtonContainer::view::ButtonContainerPanel BCPanel
113 * @brief Defines the BCPanel type
115 typedef creaButtonContainer::view::ButtonContainerPanel BCPanel;
116 // ----------------------------------------------------------------------------------
117 //end of typedef definition
119 // ----------------------------------------------------------------------------------
120 /*! @fn ButtonContainerController( BCPanel* );
121 * @brief This is the Parameterized constructor.
122 * @param BCPanel* The connection with the view (wxPanel link).
124 ButtonContainerController( BCPanel* );
125 // ----------------------------------------------------------------------------------
126 /*! @fn ~ButtonContainerController( );
127 * @brief This is the destructor.
130 ~ButtonContainerController( );
132 // ----------------------------------------------------------------------------------
133 /*! @fn void AddEvents( );
134 * @brief This method connect every buttonEvents to the view.
135 * @exception std::bad_alloc
139 // ----------------------------------------------------------------------------------
140 /*! @fn void ButtonExpEvent( wxCommandEvent& event );
141 * @brief This method is the button group "+" "-" event.
142 * @exception std::bad_alloc
143 * @param event Button action event.
146 ButtonExpEvent( wxCommandEvent& event );
147 // ----------------------------------------------------------------------------------
148 /*! @fn void ButtonEvent( wxCommandEvent& event );
149 * @brief This method calls the events of the buttonContainer buttons
150 * @exception std::bad_alloc
151 * @param event Button action event.
154 ButtonEvent( wxCommandEvent& event );
155 // ----------------------------------------------------------------------------------
157 BCPanel* m_BCPanel; //! <ButtonContainerPanel View pointer.
162 #endif //BUTTONCONTAINERCONTROLLER_H_