]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/interface/wxWindows/widgets/creaPanelButtonContainer/creaPanelButtonContainer.h
#2516 creaMaracasVisu Feature New Normal - creaPanelButtonContainer ListPanel with...
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / creaPanelButtonContainer / creaPanelButtonContainer.h
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 #include <wx/gdicmn.h>
40
41 #include "listConfigDialog.h"
42 #include "containerSettings.h"
43 #include "buttonContainerPanel.h"
44 #include "buttonContainerSettings.h"
45 #include "functor.h"
46 #include "listWx.h"
47
48 /*!     @namespace <creaPanelButtonContainer>
49  *      @brief Contains the creaPanelButtonContainer library included in creaMaracasVisu.
50  */
51 namespace creaPanelButtonContainer
52 {
53         /*! @class PanelButtonContainer panelButtonContainer.h "panelButtonContainer.h"
54          *      @brief This class contains the PanelButtonContainer. It derives from wxPanel.
55          *  @see <a href="http://docs.wxwidgets.org/stable/wx_wxpanel.html">wxPanel</a>
56          */
57         class PanelButtonContainer: public wxPanel
58         {
59                 public:
60                         //typedef definition.
61                         // ----------------------------------------------------------------------------------
62                         /*!     typedef creaPanelButtonContainer::ButtonContainerSettings ButtonContainerSettings;
63                          *      @brief Defines the ButtonContainerSettings type.
64                          */
65                         typedef creaPanelButtonContainer::ButtonContainerSettings ButtonContainerSettings;
66                         /*!     typedef creaButtonContainer::view::ButtonContainerPanel ButtonContainerPanel;
67                          *      @brief Defines the ButtonContainerPanel type.
68                          */
69                         typedef creaButtonContainer::view::ButtonContainerPanel ButtonContainerPanel;
70
71                         //MLER
72                         /*!     typedef creaButtonContainer::view::ListWx ListWx;
73                          *      @brief Defines a ListWx for (Configurable) List Container.
74                          *      This class inherits from wxPanel and contains a wxListBox
75                          */
76                         typedef creaButtonContainer::view::ListWx ListWx;
77                         /*!     typedef creaPanelButtonContainer::ListConfigDialog ListConfigDialog;
78                          *      @brief Defines a ListConfigPanel to configure
79                          */
80                         typedef creaButtonContainer::view::ListConfigDialog ListConfigDialog;
81                         //End MLER
82
83                         // ----------------------------------------------------------------------------------
84                         //end of typedef definition.
85                 public:
86                         // ----------------------------------------------------------------------------------
87                         /*! @fn PanelButtonContainer( wxWindow* parent, ButtonContainerSettings* bcSettings );
88                          *      @brief This is the parameterized constructor.
89                          *      @param parent The wxWindow pointer to parent
90                          *      @param bcSettings //The buttonContainerSettings
91                          */
92                         PanelButtonContainer(wxWindow* parent,
93                                         ButtonContainerSettings* bcSettings, int type);
94                         // ----------------------------------------------------------------------------------
95                         /*! @fn virtual PanelButtonContainer( );
96                          *      @brief This is the destructor.
97                          */
98                         virtual
99                         ~PanelButtonContainer();
100                         // ----------------------------------------------------------------------------------
101                         /*! @fn void UpdatePanel( const std::string &buttonName );
102                          *  @brief This method Updates the m_ButtonPanel to a panel
103                          *  of the clicked button in creaButtonContainer.
104                          *      @param buttonName
105                          */
106                         void
107                         UpdatePanel(const std::string &buttonName);
108                         // ----------------------------------------------------------------------------------
109                         /*! @fn void GenericButtonEvent( const std::string &buttonName );
110                          *      @brief This method is the function that calls the panels contained in the buttons
111                          *      (in creaButtonContainer is the function contained in the functors to be called back.
112                          *      @param buttonName The name of the button
113                          */
114                         void
115                         GenericButtonEvent(const std::string &buttonName);
116                         // ----------------------------------------------------------------------------------
117                         //MLER
118                         void
119                         GenericListEvent(const std::string &buttonName);
120
121                         void
122                         UpdateListPanel(const std::string &buttonName);
123                         void
124                         OnConfigButton(wxCommandEvent& event);
125
126                         // ----------------------------------------------------------------------------------
127                 private:
128                         //Settings
129                         ButtonContainerSettings* m_ButtonContainerSettings; //!<This is the buttonContainer settings.
130                         //Panel
131                         ButtonContainerPanel* m_ButtonContainerPanel; //!<This is the panel with de buttons (creaButtonContainer)
132                         wxAuiManager* m_AuiManager; //!<The AUI Manager for the panels.
133                         wxPanel* m_EventPanel; //!<This is the panel used to contain the panels of the buttons. (it changes with the buttonAction)
134
135                         //MLER
136                         ListWx* m_ListWxPanel;
137                         ListConfigDialog* m_ListConfigDialog;
138                         //
139                         wxPanel* m_PanelUp;
140                         ListWx* m_CurrentWxPanel;
141                         //todo change to bitmap
142                         wxButton* m_ConfigButton;DECLARE_EVENT_TABLE()
143                         //!<Event Table declaration.
144         };
145 } //ecapseman
146
147 #endif // PANELBUTTONCONTAINER_H_