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