]> Creatis software - creaMaracasVisu.git/blob
deb21348fde8ac24fe1d83c087ff5addf715ed9a
[creaMaracasVisu.git] /
1 /*# ---------------------------------------------------------------------
2 #
3 # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
4 #                        pour la Sant�)
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
8 #
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.
15 #
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
20 #  liability.
21 #
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 # ------------------------------------------------------------------------ */
25
26 /*!
27  * @file PanelButtonContainer
28  * @brief This contains the ButtonContainerSettings class.
29  * @author Diego CACERES (diego.caceres[AT]creatis.insa-lyon.fr)
30  * @date  2011-06-02
31  */
32
33 #ifndef PANELBUTTONCONTAINER_H_
34 #define PANELBUTTONCONTAINER_H_
35
36 #include <wx/panel.h>
37 #include <wx/aui/aui.h>
38 #include <string>
39
40 #include "containerSettings.h"
41 #include "buttonContainerPanel.h"
42 #include "buttonContainerSettings.h"
43 #include "functor.h"
44
45 /*!     @namespace <creaPanelButtonContainer>
46  *      @brief Contains the creaPanelButtonContainer library included in creaMaracasVisu.
47  */
48 namespace creaPanelButtonContainer
49 {
50         /*! @class PanelButtonContainer panelButtonContainer.h "panelButtonContainer.h"
51          *      @brief This class contains the PanelButtonContainer. It derives from wxPanel.
52          *  @see <a href="http://docs.wxwidgets.org/stable/wx_wxpanel.html">wxPanel</a>
53          */
54         class PanelButtonContainer : public wxPanel
55         {
56                 public:
57                         //typedef definition.
58                         // ----------------------------------------------------------------------------------
59                         /*!     typedef creaPanelButtonContainer::ButtonContainerSettings ButtonContainerSettings;
60                          *      @brief Defines the ButtonContainerSettings type.
61                          */
62                         typedef creaPanelButtonContainer::ButtonContainerSettings
63                             ButtonContainerSettings;
64                         /*!     typedef creaButtonContainer::view::ButtonContainerPanel ButtonContainerPanel;
65                          *      @brief Defines the ButtonContainerPanel type.
66                          */
67                         typedef creaButtonContainer::view::ButtonContainerPanel
68                             ButtonContainerPanel;
69                         // ----------------------------------------------------------------------------------
70                         //end of typedef definition.
71                 public:
72                         // ----------------------------------------------------------------------------------
73                         /*! @fn PanelButtonContainer( wxWindow* parent, ButtonContainerSettings* bcSettings );
74                          *      @brief This is the parameterized constructor.
75                          *      @param parent The wxWindow pointer to parent
76                          *      @param bcSettings //The buttonContainerSettings
77                          */
78                         PanelButtonContainer( wxWindow* parent,
79                             ButtonContainerSettings* bcSettings, std::string type );
80                         // ----------------------------------------------------------------------------------
81                         /*! @fn virtual PanelButtonContainer( );
82                          *      @brief This is the destructor.
83                          */
84                         virtual
85                         ~PanelButtonContainer( );
86                         // ----------------------------------------------------------------------------------
87                         /*! @fn void UpdatePanel( const std::string &buttonName );
88                          *  @brief This method Updates the m_ButtonPanel to a panel
89                          *  of the clicked button in creaButtonContainer.
90                          *      @param buttonName
91                          */
92                         void
93                         UpdatePanel( const std::string &buttonName );
94                         // ----------------------------------------------------------------------------------
95                         /*! @fn void GenericButtonEvent( const std::string &buttonName );
96                          *      @brief This method is the function that calls the panels contained in the buttons
97                          *      (in creaButtonContainer is the function contained in the functors to be called back.
98                          *      @param buttonName The name of the button
99                          */
100                         void
101                         GenericButtonEvent( const std::string &buttonName );
102                         // ----------------------------------------------------------------------------------
103                 private:
104                         //Settings
105                         ButtonContainerSettings* m_ButtonContainerSettings; //!<This is the buttonContainer settings.
106                         //Panel
107                         ButtonContainerPanel* m_ButtonContainerPanel; //!<This is the panel with de buttons (creaButtonContainer)
108                         wxAuiManager* m_AuiManager; //!<The AUI Manager for the panels.
109                         wxPanel* m_ButtonPanel; //!<This is the panel used to contain the panels of the buttons. (it changes with the buttonAction)
110                 DECLARE_EVENT_TABLE() //!<Event Table declaration.
111         };
112 }//ecapseman
113
114 #endif // PANELBUTTONCONTAINER_H_