//#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