void console::TELLFuncList::addFunc(wxString name, void* arguments) { ArgList* arglist = static_cast<ArgList*>(arguments); wxListItem row; row.SetMask(wxLIST_MASK_DATA | wxLIST_MASK_TEXT); row.SetId(GetItemCount()); row.SetData(GetItemCount()); row.SetText((arglist->front()).c_str());arglist->pop_front(); long inum = InsertItem(row); SetColumnWidth(0, wxLIST_AUTOSIZE); // row.SetColumn(1); row.SetMask(wxLIST_MASK_TEXT); row.SetText(name.c_str()); SetItem(row); SetColumnWidth(1, wxLIST_AUTOSIZE); // std::string strlist("( "); while (!arglist->empty()) { strlist += arglist->front();arglist->pop_front(); if (arglist->size()) strlist += " , "; } strlist += " )"; // row.SetColumn(2); row.SetMask(wxLIST_MASK_TEXT); row.SetText(strlist.c_str()); SetItem(row); SetColumnWidth(2, wxLIST_AUTOSIZE); }
void console::TELLFuncList::addFunc(wxString name, void* arguments) { ArgList* arglist = static_cast<ArgList*>(arguments); wxListItem row; row.SetMask(wxLIST_MASK_DATA | wxLIST_MASK_TEXT); row.SetId(GetItemCount()); row.SetData(GetItemCount()); row.SetText( wxString((arglist->front()).c_str(), wxConvUTF8));arglist->pop_front(); InsertItem(row); SetColumnWidth(0, wxLIST_AUTOSIZE); // row.SetColumn(1); row.SetMask(wxLIST_MASK_TEXT); row.SetText(name.c_str()); SetItem(row); SetColumnWidth(1, wxLIST_AUTOSIZE); // wxString strlist(wxT("( ")); while (!arglist->empty()) { strlist << wxString(arglist->front().c_str(), wxConvUTF8);arglist->pop_front(); if (arglist->size()) strlist << wxT(" , "); } delete arglist; strlist << wxT(" )"); // row.SetColumn(2); row.SetMask(wxLIST_MASK_TEXT); row.SetText(strlist); SetItem(row); SetColumnWidth(2, wxLIST_AUTOSIZE); }