void NewFromTemplateDlg::BuildList() { BuildListFor(totProject, XRCCTRL(*this, "listProjects", wxListCtrl), XRCCTRL(*this, "cmbProjectCategories", wxChoice)); BuildListFor(totTarget, XRCCTRL(*this, "listTargets", wxListCtrl), XRCCTRL(*this, "cmbTargetCategories", wxChoice)); BuildListFor(totFiles, XRCCTRL(*this, "listFiles", wxListCtrl), XRCCTRL(*this, "cmbFileCategories", wxChoice)); BuildListFor(totCustom, XRCCTRL(*this, "listCustoms", wxListCtrl), XRCCTRL(*this, "cmbCustomCategories", wxChoice)); }
void NewFromTemplateDlg::ChangeView() { int sel = XRCCTRL(*this, "rbView", wxRadioBox)->GetSelection(); int style = sel == 0 ? wxLC_ICON : wxLC_LIST; XRCCTRL(*this, "listProjects", wxListCtrl)->SetSingleStyle(style); XRCCTRL(*this, "listFiles", wxListCtrl)->SetSingleStyle(style); XRCCTRL(*this, "listCustoms", wxListCtrl)->SetSingleStyle(style); // in non-windows platforms, the above clears the control contents too // so rebuild them #ifndef __WXMSW__ BuildListFor(totProject, XRCCTRL(*this, "listProjects", wxListCtrl), XRCCTRL(*this, "cmbProjectCategories", wxChoice)); BuildListFor(totFiles, XRCCTRL(*this, "listFiles", wxListCtrl), XRCCTRL(*this, "cmbFileCategories", wxChoice)); BuildListFor(totCustom, XRCCTRL(*this, "listCustoms", wxListCtrl), XRCCTRL(*this, "cmbCustomCategories", wxChoice)); #endif }
void NewFromTemplateDlg::OnCategoryChanged(cb_unused wxCommandEvent& event) { BuildListFor(GetVisibleOutputType(), GetVisibleListCtrl(), GetVisibleCategory()); }