]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/interface/wxWindows/widgets/creaPanelButtonContainer/listConfigPanel.h
5e03947fb4583da6c20842017f266d5633c07c8f
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / creaPanelButtonContainer / listConfigPanel.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 #ifndef LISTCONFIGPANEL_H
27 #define LISTCONFIGPANEL_H
28
29 #include <wx/panel.h>
30 #include <wx/sizer.h>
31 #include <wx/wx.h>
32
33
34 #include <map>
35 #include <string>
36 #include <vector>
37
38 #include "functor.h"
39 #include "listConfig.h"
40 #include "listWx.h"
41
42
43 namespace creaPanelButtonContainer
44 {
45         /*namespace controller
46         {
47                 //class ButtonContainerController;
48         }*/
49
50
51                 class ListConfigPanel : public wxDialog
52                 {
53                         public:
54
55                                 typedef std::map<std::string, wxPanel*> ItemsMap;
56                                 typedef creaButtonContainer::model::TFunctor TFunctor;
57                                 typedef creaButtonContainer::model::ListConfig ListConfig;
58                                 typedef creaButtonContainer::view::ListWx ListWx;
59                                 //typedef std::vector<std::string> NomItem;
60
61
62                                 ListConfigPanel(wxWindow* parent, wxWindowID id,const wxString& title, ListWx* modelList, ListWx* currentList);
63
64                                 ~ListConfigPanel();
65
66                                 ItemsMap
67                                 GetFinalItemsMap();
68
69                                 void
70                                 SetFinalItems(ItemsMap finalItems);
71
72                                 void
73                                 FillList(int i);
74
75                                 void
76                                 OnQuit(wxCommandEvent& event);
77
78                                 void
79                                 ListItemEvent(wxCommandEvent& event);
80
81                                 void
82                                 OnAdd(wxCommandEvent& event);
83
84                                 void
85                                 OnDelete(wxCommandEvent& event);
86
87                                 void
88                                 OkEvent(wxCommandEvent& event);
89
90                                 void
91                                 UpEvent(wxCommandEvent& event);
92
93                                 void
94                                 DownEvent(wxCommandEvent& event);
95
96                                 void
97                                 RefreshViewEvent(wxCommandEvent& event);
98
99                                 ListWx*
100                                 GetFinalListWx();
101
102
103                         //public:
104                                 //friend class creaButtonContainer::controller::ButtonContainerController;
105
106                         private:
107                                 ItemsMap m_itemsMap;
108                                 //TFunctor* functor;
109                                 ItemsMap m_finalItems;
110                                 //NomItem m_itemsVector;
111
112                                 wxButton* buttonAdd;
113                                 wxButton* buttonDel;
114
115                                 wxButton* okButton;
116                                 wxButton* cancelButton;
117
118                                 wxButton* upButton;
119                                 wxButton* downButton;
120
121                                 ListWx* m_listWx;
122                                 ListWx* m_finalListWx;
123                                 ListConfig* m_listConfig;
124
125                 };
126
127
128 }
129
130 #endif // LISTCONFIGPANEL_H