this->m_FunctorEnabled = true;
this->Connect(wxEVT_COMMAND_LISTBOX_SELECTED,
- wxCommandEventHandler(ListWx::ListEvent));
+ wxCommandEventHandler(ListWx::OnListEvent));
if (!iVector.empty())
{
}
}
- sizer->Add(this->m_ListBox,1,wxGROW);
+ sizer->Add(this->m_ListBox, 1, wxGROW);
}
// ----------------------------------------------------------------------------------
ListWx::ListWx(wxWindow* parent, wxWindowID id, TFunctor* functor)
+ : wxPanel(parent, id)
{
+ this->m_Functor = functor;
+
+ wxBoxSizer* sizer = new wxBoxSizer(wxHORIZONTAL);
+
+ this->SetSizer(sizer);
+
+ this->m_ListBox = new wxListBox(this, -1);
+ this->m_FunctorEnabled = true;
+
+ this->Connect(wxEVT_COMMAND_LISTBOX_SELECTED,
+ wxCommandEventHandler(ListWx::OnListEvent));
+
+ sizer->Add(this->m_ListBox, 1, wxGROW);
}
// ----------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------
- void ListWx::ListEvent(wxCommandEvent& event)
+ void ListWx::OnListEvent(wxCommandEvent& event)
{
if (!this->IsFunctorEnabled())
return;
{
try
{
- std::cout << "MLER | ListWx::ListEvent( wxListEvent& event )"
+ std::cout << "MLER | ListWx::OnListEvent( wxListEvent& event )"
<< std::endl;
int iSelection;
return this->m_FunctorEnabled;
}
+ // ----------------------------------------------------------------------------------
+ wxListBox*
+ ListWx::GetListBox() const
+ {
+ return this->m_ListBox;
+ }
+
} //ecapseman
} //ecapseman