- this->m_ButtonPair = pair;
- StringType wXbuttonName = this->m_ButtonPair->first->first;
- BitmapType wXicon = this->m_ButtonPair->first->second;
- StringType wXdescription = this->m_ButtonPair->second->first;
- wxString buttonName( wXbuttonName.c_str( ), wxConvUTF8 );
- wxString description( wXdescription.c_str( ), wxConvUTF8 );
- //creating the button.
- //this->Create( parent, id,
- // wXicon,
- //wxDefaultPosition, wxDefaultSize,wxBU_AUTODRAW, wxDefaultValidator,
- //buttonName );
- this->Create( parent, id,
- wxDefaultPosition, wxDefaultSize,wxLC_LIST, wxDefaultValidator,
- buttonName );
- this->SetToolTip( description );
-
-
- long index = this->InsertItem(0, _("John Smith"));
- this->SetItem(index, 1, _("jsmith"));
-
- index = this->InsertItem(1, _("Monica"));
- this->SetItem(index, 1, _("monica"));
-
- index = this->InsertItem(2, _("Momo"));
- this->SetItem(index, 2, _("momo"));
-
-
-
+ this->m_itemsMap = iMap;
+ this->functor = functor;
+ for (ItemsMap::iterator it=this->m_itemsMap.begin(); it!=this->m_itemsMap.end(); ++it)
+ {
+ std::string key = it->first;
+ long index = this->InsertItem(0, wxString::From8BitData(key.c_str()));
+ //this->Connect( index, wxEVT_LIST_ITEM_SELECTED,
+ // (wxObjectEventFunction) &ListWx::ButtonEvent );
+ }