void ThreadSearchView::OnQuickOptions(wxCommandEvent &event) { ThreadSearchFindData findData = m_ThreadSearchPlugin.GetFindData(); bool hasChange = false; if (event.GetId() == controlIDs.Get(ControlIDs::idOptionWholeWord)) { findData.SetMatchWord(event.IsChecked()); hasChange = true; } else if (event.GetId() == controlIDs.Get(ControlIDs::idOptionStartWord)) { findData.SetStartWord(event.IsChecked()); hasChange = true; } else if (event.GetId() == controlIDs.Get(ControlIDs::idOptionMatchCase)) { findData.SetMatchCase(event.IsChecked()); hasChange = true; } else if (event.GetId() == controlIDs.Get(ControlIDs::idOptionRegEx)) { findData.SetRegEx(event.IsChecked()); hasChange = true; } if (hasChange) { m_ThreadSearchPlugin.SetFindData(findData); UpdateOptionsButtonImage(findData); } }
void ThreadSearch::RunThreadSearch(const wxString& text, bool isCtxSearch/*=false*/) { if ( !IsAttached() ) return; ThreadSearchFindData findData = m_FindData; // User may prefer to set default options for contextual search if ( (isCtxSearch == true) && (m_UseDefValsForThreadSearch == true) ) { findData.SetMatchCase(true); findData.SetMatchWord(true); findData.SetStartWord(false); findData.SetRegEx (false); } // m_SearchedWord was set in BuildModuleMenu findData.SetFindText(text); // Displays m_pThreadSearchView in manager m_pViewManager->ShowView(true); // Runs the search through a worker thread m_pThreadSearchView->ThreadedSearch(findData); }