]> Creatis software - creaMaracasVisu.git/blobdiff - lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/listWx.h
Code cleaning done
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / creaButtonContainer / view / listWx.h
index 346552982ff271e6ceea3dc6ef2abb329f06a990..4b682c8ad5b47d978fbe53dad2ac0020dcad5367 100644 (file)
 
 //#include <wx/bmpbuttn.h>
 #include <wx/panel.h>
-#include <wx/image.h>
 #include <wx/string.h>
-#include <wx/bitmap.h>
-//#include <wx/listctrl.h>
-#include <wx/control.h>
-#include <wx/choice.h>
 #include <wx/listbox.h>
 #include <wx/wx.h>
+#include <wx/event.h>
 
-#include <map>
 #include <string>
-#include "functor.h"
-#include <wx/event.h>
+#include <vector>
+#include <utility>
 
+#include "functor.h"
 #include "system.h"
-#include "listConfig.h"
-//#include "listConfigPanel.h"
-
-namespace creaButtonContainer {
 
-namespace view {
+namespace creaButtonContainer
+{
 
-class ListWx: public wxPanel {
-public:
+       namespace view
+       {
 
-       typedef creaButtonContainer::model::TFunctor TFunctor;
-       typedef std::map<std::string, wxPanel*> ItemsMap;
-       typedef creaButtonContainer::model::ListConfig ListConfig;
+               class ListWx: public wxPanel
+               {
+                       public:
 
-public:
+                               typedef creaButtonContainer::model::TFunctor TFunctor;
+                               typedef std::pair<std::string, wxPanel*> ListAction;
+                               typedef std::vector<ListAction> ItemsVector;
 
-       ListWx(wxWindow* parent, wxWindowID id, ItemsMap iMap, TFunctor* functor);
-       ListWx(wxWindow* parent, wxWindowID id, ItemsMap iMap, TFunctor* functor,
-                       std::string c);
-       // ----------------------------------------------------------------------------------
+                       public:
 
-       virtual
-       ~ListWx();
-       // ----------------------------------------------------------------------------------
+                               ListWx(wxWindow* parent, wxWindowID id, ItemsVector iVector,
+                                               TFunctor* functor);
+                               ListWx(wxWindow* parent, wxWindowID id, TFunctor* functor);
 
-       long
-       GetID();
+                               virtual
+                               ~ListWx();
 
-       void
-       FillList();
+                               void
+                               ListEvent(wxCommandEvent& event);
 
-       void
-       ListEvent(wxCommandEvent& event);
+                               void
+                               SetFunctorEnabled(const bool& enabled);
 
-       ItemsMap
-       GetItemsMap();
+                               bool
+                               IsFunctorEnabled() const;
 
-       TFunctor*
-       GetWxListFunctor();
+                       private:
 
-       void SetFunctorEnabled(const bool& enabled);
+                               wxListBox* m_ListBox;
 
-       void AddItemToMap(std::string key, wxPanel* panel);
+                               TFunctor* m_Functor;
+                               bool m_FunctorEnabled;
 
-       void DeleteItemFromMap(std::string key);
-
-       bool IsFunctorEnabled() const;
-
-       wxListBox*
-       GetListBox() const;
-
-       // ----------------------------------------------------------------------------------
-private:
-       ItemsMap m_itemsMap; //!
-       TFunctor* functor;
-       wxListBox* listBox;
-       wxFlexGridSizer* sizer;
-       wxButton* button;
-       bool m_functorEnabled;
-       ListConfig* m_listConfig;
-};
-} //ecapseman
+               };
+       } //ecapseman
 } //ecapseman
 
 #endif // LISTWX_H