]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/listConfigDialog.h
#2516 creaMaracasVisu Feature New Normal - creaPanelButtonContainer ListPanel with...
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / creaButtonContainer / view / listConfigDialog.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 listConfigDialog.h
28  * @brief This contains the ListConfigDialog class.
29  * @author Monica ESPINOSA (espinosa[AT]creatis.insa-lyon.fr)
30  * @date  2015-01-02
31  */
32
33 #ifndef LISTCONFIGDIALOG_H
34 #define LISTCONFIGDIALOG_H
35
36 #include <wx/panel.h>
37 #include <wx/sizer.h>
38 #include <wx/gbsizer.h>
39 #include <wx/wx.h>
40 #include <wx/bmpbuttn.h>
41
42 #include <string>
43 #include <vector>
44
45 #include "functor.h"
46 #include "listWx.h"
47
48 /*!     @namespace <creaButtonContainer>
49  *      @brief Contains the creaButtonContainer library included in creaMaracasVisu.
50  */
51 namespace creaButtonContainer
52 {
53         /*! @namespace <creaButtonContainer::view>
54          *      @brief Contains the implementation of the view in creaButtonContainer library.
55          *      @see <a href="http://en.wikipedia.org/wiki/Model-view-controller">MVC Software Architecture</a>
56          */
57         namespace view
58         {
59                 /*! @class ListConfigDialog listConfigDialog.h "listConfigDialog.h"
60                  *      @brief This class contains the list in the wxDialog.
61                  *  @details This class contains the information of a Dialog with the lists, it derives from wxDialog.
62                  *  @see <a href="http://docs.wxwidgets.org/trunk/classwx_dialog.html">wxDialog</a>
63                  */
64                 class ListConfigDialog: public wxDialog
65                 {
66                         public:
67                                 //typedef definition.
68                                 // ----------------------------------------------------------------------------------
69                                 /*!     typedef creaButtonContainer::model::TFunctor TFunctor;
70                                  *      @brief Defines the TFunctor type.
71                                  */
72                                 typedef creaButtonContainer::model::TFunctor TFunctor;
73                                 /*!     typedef creaButtonContainer::view::ListWx ListWx;
74                                  *      @brief Defines the List Panel.
75                                  */
76                                 typedef creaButtonContainer::view::ListWx ListWx;
77                                 // ----------------------------------------------------------------------------------
78                                 //end of typedef definition.
79                         public:
80                                 // ----------------------------------------------------------------------------------
81                                 /*! @fn ListConfigDialog( wxWindow* parent, wxWindowID id,const wxString& title,
82                                  ListWx* modelList, ListWx* currentList );
83                                  *      @brief This is the parameterized constructor.
84                                  *      @param parent The wxWindow pointer to parent.
85                                  *      @param id The wxID of the button.
86                                  *      @param title //The title wxDialog.
87                                  *      @param modelList //The list is filled with the elements of model.
88                                  *      @param currentList //The list is filled with the events.
89                                  */
90                                 ListConfigDialog(wxWindow* parent, wxWindowID id, const wxString& title,
91                                                 ListWx* modelList, ListWx* currentList);
92                                 // ----------------------------------------------------------------------------------
93                                 /*! @fn virtual ~Button( );
94                                  *      @brief This is the destructor.
95                                  */
96                                 virtual
97                                 ~ListConfigDialog();
98                                 // ----------------------------------------------------------------------------------
99                                 /*! @fn void OnAdd( wxCommandEvent& event );
100                                  *  @brief This method add an item to current list.
101                                  *      @param event
102                                  */
103                                 void
104                                 OnAdd(wxCommandEvent& event);
105                                 // ----------------------------------------------------------------------------------
106                                 /*! @fn void OnDelete( wxCommandEvent& event );
107                                  *  @brief This method remove an item of current list.
108                                  *      @param event
109                                  */
110                                 void
111                                 OnDelete(wxCommandEvent& event);
112                                 // ----------------------------------------------------------------------------------
113                                 /*! @fn void OnMoveUp( wxCommandEvent& event );
114                                  *  @brief This method move up an item of current list.
115                                  *      @param event
116                                  */
117                                 void
118                                 OnMoveUp(wxCommandEvent& event);
119                                 // ----------------------------------------------------------------------------------
120                                 /*! @fn void OnMoveDown( wxCommandEvent& event );
121                                  *  @brief This method move down an item of current list.
122                                  *      @param event
123                                  */
124                                 void
125                                 OnMoveDown(wxCommandEvent& event);
126                                 // ----------------------------------------------------------------------------------
127                                 /*! @fn void OnOk( wxCommandEvent& event );
128                                  *  @brief This method confirm the changes of current list.
129                                  *      @param event
130                                  */
131                                 void
132                                 OnOk(wxCommandEvent& event);
133                                 // ----------------------------------------------------------------------------------
134                                 /*! @fn void OnCancel( wxCommandEvent& event );
135                                  *  @brief This method discard the changes of current list.
136                                  *      @param event
137                                  */
138                                 void
139                                 OnCancel(wxCommandEvent& event);
140                                 // ----------------------------------------------------------------------------------
141
142                         private:
143
144                                 wxBitmapButton* m_AddButton;                            //!< ">" Add button.
145                                 wxBitmapButton* m_RemoveButton;                         //!< "<" Remove button.
146                                 wxButton* m_OkButton;                           //!< "Ok" Remove button.
147                                 wxButton* m_CancelButton;                               //!< "Cancel" Remove button.
148                                 wxBitmapButton* m_UpButton;                             //!< "/\" Remove button.
149                                 wxBitmapButton* m_DownButton;                           //!< "\/" Remove button.
150
151                                 ListWx* m_OriginalListWx; //!< The Original list.
152                                 ListWx* m_CurrentListWx; //!<The Configurable list.
153                 };
154         }
155 }
156
157 #endif // LISTCONFIGDIALOGL_H