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