void CFilterConditionsDialog::ClearFilter(bool disable) { DestroyControls(); m_pListCtrl->SetLineCount(0); SetFilterCtrlState(disable); }
void CFilterConditionsDialog::EditFilter(const CFilter& filter) { DestroyControls(); // Create new controls m_currentFilter = filter; if (m_currentFilter.filters.empty()) m_currentFilter.filters.push_back(CFilterCondition()); for (unsigned int i = 0; i < m_currentFilter.filters.size(); i++) { const CFilterCondition& cond = m_currentFilter.filters[i]; MakeControls(cond); } // Get correct coordinates wxSize client_size = m_pListCtrl->GetClientSize(); wxPoint pos; m_pListCtrl->CalcScrolledPosition(client_size.GetWidth() - 5 - m_button_size.x, (m_choiceBoxHeight + 6) * m_filterControls.size() + 3, &pos.x, &pos.y); if (!m_pAdd) m_pAdd = new wxButton(m_pListCtrl, wxID_ANY, _T("+"), pos, m_button_size); else m_pAdd->SetPosition(pos); m_pListCtrl->SetLineCount(m_filterControls.size() + 1); UpdateConditionsClientSize(); XRCCTRL(*this, "ID_MATCHTYPE", wxChoice)->SetSelection(filter.matchType); SetFilterCtrlState(false); }
void Application::destroyScene() { saveSettings(); StateManager::getInstance().rollbackToState(nullptr); DestroyControls(); ScopeManager::getInstance().shutdown(); delete ScopeManager::getInstancePtr(); GridManager::getInstance().shutdown(); delete GridManager::getInstancePtr(); ColourManager::getInstance().shutdown(); delete ColourManager::getInstancePtr(); StateManager::getInstance().shutdown(); delete StateManager::getInstancePtr(); HotKeyManager::getInstance().shutdown(); delete HotKeyManager::getInstancePtr(); DialogManager::getInstance().shutdown(); delete DialogManager::getInstancePtr(); MessageBoxManager::getInstance().shutdown(); delete MessageBoxManager::getInstancePtr(); ExportManager::getInstance().shutdown(); delete ExportManager::getInstancePtr(); ActionManager::getInstance().shutdown(); delete ActionManager::getInstancePtr(); CommandManager::getInstance().shutdown(); delete CommandManager::getInstancePtr(); RecentFilesManager::getInstance().shutdown(); delete RecentFilesManager::getInstancePtr(); tools::DataSelectorManager::getInstance().shutdown(); delete tools::DataSelectorManager::getInstancePtr(); tools::DataManager::getInstance().shutdown(); delete tools::DataManager::getInstancePtr(); tools::DataTypeManager::getInstance().shutdown(); delete tools::DataTypeManager::getInstancePtr(); SettingsManager::getInstance().saveSettingsFile("SettingsResult.xml"); SettingsManager::getInstance().saveUserSettingsFile(); delete SettingsManager::getInstancePtr(); std::string subWidgetCategory = MyGUI::SubWidgetManager::getInstance().getCategoryName(); MyGUI::FactoryManager::getInstance().unregisterFactory<MyGUI::FilterNone>(subWidgetCategory); }
void CListBoxEx::OnSelchange() { if(bControlActive) { // on combobox/edit controls, save string back to data LBEXTITEMSTRUCT& lbis = Items[iControlItem]; if(lbis.iEditType == lbeChoices) { ComboCtrl.GetLBText(ComboCtrl.GetCurSel(), lbis.szDataString); lbis.iDataValue = ComboCtrl.GetCurSel(); } else if(lbis.iDataType == lbdString) { EditCtrl.GetWindowText(lbis.szDataString, 128); } else if(lbis.iDataType == lbdInteger) { EditCtrl.GetWindowText(lbis.szDataString, 128); lbis.iDataValue = atoi(lbis.szDataString); } } DestroyControls(); int iCurItem = GetCurSel(); LBEXTITEMSTRUCT& lbis = Items[iCurItem]; if(lbis.iEditType == lbeChoices) { CreateComboControl(); } else { CreateEditControl(); } }
void CTaskDialog::OnDestroy(void) { SetMsgHandled(FALSE); KillTimer(hTimer_); hTimer_ = 0; DestroyControls(); }