void DataExportDlg::on_widget_change() { wxString s = (only_a_cb->GetValue() ? wxT("if a: ") : wxT("all: ")); for (size_t i = 0; i < list->GetCount(); ++i) { if (list->IsChecked(i)) { if (!s.EndsWith(wxT(": ")) && !cv[i].empty()) s += wxT(", "); s += cv[i]; } } text->ChangeValue(s); FindWindow(wxID_OK)->Enable(true); }
bool getResults(wxArrayString& out, bool* createInfoPlistFile, bool* createIcon) { if(not m_accepted) return false; *createInfoPlistFile = m_info_plist_cb->IsChecked(); *createIcon = m_icon_cb->IsChecked(); const wxArrayString& items = m_choices_widget->GetStrings(); const int count = items.GetCount(); for(int n = 0; n < count; n++) { if(m_choices_widget->IsChecked(n)) out.Add(items[n]); } return true; }