Code::Blocks
SVN r11506
|
#include <find_replace.h>
Public Member Functions | |
FindReplace () | |
~FindReplace () | |
void | CreateSearchLog () |
int | ShowFindDialog (bool replace, bool explicitly_find_in_files=false) |
int | FindNext (bool goingDown, cbStyledTextCtrl *control, cbFindReplaceData *data, bool selected) |
int | FindSelectedText (bool goingDown) |
Private Member Functions | |
void | LogSearch (const wxString &file, int line, const wxString &lineText) |
void | CalculateFindReplaceStartEnd (cbStyledTextCtrl *control, cbFindReplaceData *data, bool replace=false) |
int | Find (cbStyledTextCtrl *control, cbFindReplaceData *data) |
int | FindInFiles (cbFindReplaceData *data) |
int | Replace (cbStyledTextCtrl *control, cbFindReplaceData *data) |
int | ReplaceInFiles (cbFindReplaceData *data) |
Private Attributes | |
cbFindReplaceData * | m_LastFindReplaceData |
cbSearchResultsLog * | m_pSearchLog |
Definition at line 9 of file find_replace.h.
FindReplace::FindReplace | ( | ) |
Definition at line 105 of file find_replace.cpp.
FindReplace::~FindReplace | ( | ) |
Definition at line 110 of file find_replace.cpp.
References m_LastFindReplaceData.
|
private |
Definition at line 303 of file find_replace.cpp.
References cbFindReplaceData::directionDown, cbFindReplaceData::end, cbFindReplaceData::findInFiles, cbFindReplaceData::findText, wxScintilla::GetCurrentPos(), wxScintilla::GetLength(), wxScintilla::GetSelectionEnd(), wxScintilla::GetSelectionStart(), cbFindReplaceData::initialreplacing, wxString::Len(), cbFindReplaceData::NewSearch, cbFindReplaceData::originEntireScope, cbFindReplaceData::scope, cbFindReplaceData::SearchInSelectionEnd, cbFindReplaceData::SearchInSelectionStart, cbFindReplaceData::start, and cbFindReplaceData::startFile.
Referenced by Find(), Replace(), and ReplaceInFiles().
void FindReplace::CreateSearchLog | ( | ) |
Definition at line 115 of file find_replace.cpp.
References _(), _T, wxArrayString::Add(), cbEVT_ADD_LOG_WINDOW, cbLoadBitmap(), Manager::Get(), ConfigManager::GetDataFolder(), Manager::IsBatchBuild(), m_pSearchLog, Manager::ProcessEvent(), Manager::SetSearchResultLogger(), and wxBITMAP_TYPE_PNG.
|
private |
Definition at line 1117 of file find_replace.cpp.
References _(), _T, cbFindReplaceData::autoWrapSearch, wxString::c_str(), CalculateFindReplaceStartEnd(), cbMessageBox(), wxRegEx::Compile(), cbFindReplaceData::ConvertEOLs(), cbFindReplaceData::directionDown, InfoWindow::Display(), cbFindReplaceData::end, wxScintilla::EnsureVisible(), cbFindReplaceData::findInFiles, cbFindReplaceData::findText, wxScintilla::FindText(), Manager::Get(), Manager::GetConfigManager(), wxScintilla::GetEOLMode(), wxScintilla::GetLength(), wxRegEx::GetMatch(), wxScintilla::GetTextRange(), wxScintilla::GotoLine(), cbFindReplaceData::IsMultiLine(), wxScintilla::LineFromPosition(), wxScintilla::LinesOnScreen(), cbFindReplaceData::matchCase, wxRegEx::Matches(), cbFindReplaceData::matchWord, wxString::Mid(), wxString::Printf(), ConfigManager::ReadBool(), cbFindReplaceData::regEx, cbFindReplaceData::scope, cbFindReplaceData::SearchInSelectionEnd, cbFindReplaceData::SearchInSelectionStart, wxScintilla::SetSCIFocus(), wxScintilla::SetSelectionVoid(), cbFindReplaceData::start, cbFindReplaceData::startWord, wxBell(), wxCANCEL, wxICON_INFORMATION, wxICON_QUESTION, wxID_OK, wxOK, wxRE_ADVANCED, wxRE_ICASE, wxRE_NEWLINE, wxSCI_FIND_MATCHCASE, wxSCI_FIND_POSIX, wxSCI_FIND_REGEXP, wxSCI_FIND_WHOLEWORD, and wxSCI_FIND_WORDSTART.
Referenced by FindInFiles(), FindNext(), and ShowFindDialog().
|
private |
Definition at line 1304 of file find_replace.cpp.
References _(), _T, wxArrayString::Add(), ProjectFile::buildTargets, wxString::c_str(), cbEVT_SHOW_LOG_MANAGER, cbEVT_SWITCH_TO_LOG_WINDOW, cbMessageBox(), ListCtrlLogger::Clear(), cbFindReplaceData::delOldSearches, ProjectFile::file, Find(), FindNext(), cbFindReplaceData::findText, cbSearchResultsLog::FocusEntry(), Manager::Get(), wxDir::GetAllFiles(), Manager::GetAppWindow(), GetArrayFromString(), cbProject::GetBuildTarget(), EditorManager::GetBuiltinActiveEditor(), EditorManager::GetBuiltinEditor(), cbEditor::GetControl(), wxArrayString::GetCount(), Manager::GetEditorManager(), EditorManager::GetEditorsCount(), EditorBase::GetFilename(), cbProject::GetFilesList(), wxFileName::GetFullPath(), ListCtrlLogger::GetItemsCount(), wxScintilla::GetLine(), EditorManager::GetNotebook(), Manager::GetProjectManager(), ProjectManager::GetProjects(), wxScintilla::GetSelectionStart(), wxScintilla::GetText(), CompileTargetBase::GetTitle(), EncodingDetector::GetWxStr(), cbFindReplaceData::hiddenSearch, wxArrayString::Index(), EditorManager::IsBuiltinOpen(), wxString::IsEmpty(), EncodingDetector::IsOK(), wxScintilla::LineFromPosition(), LogSearch(), m_LastFindReplaceData, m_pSearchLog, wxFileName::MakeRelativeTo(), PlaceWindow(), wxString::Printf(), Manager::ProcessEvent(), cbFindReplaceData::recursiveSearch, cbFindReplaceData::scope, cbFindReplaceData::searchMask, cbFindReplaceData::searchPath, cbFindReplaceData::searchProject, cbFindReplaceData::searchTarget, cbSearchResultsLog::SetBasePath(), wxScintilla::SetSCIFocus(), wxScintilla::SetText(), wxArrayString::Sort(), cbFindReplaceData::sortSearchResult, cbFindReplaceData::startFile, wxString::StartsWith(), wxGenericProgressDialog::Update(), wxDefaultPosition, wxDIR_DIRS, wxDIR_FILES, wxDIR_HIDDEN, wxEmptyString, wxFileExists(), wxICON_INFORMATION, wxICON_WARNING, wxPD_APP_MODAL, wxPD_AUTO_HIDE, and wxPD_CAN_ABORT.
Referenced by ShowFindDialog().
int FindReplace::FindNext | ( | bool | goingDown, |
cbStyledTextCtrl * | control, | ||
cbFindReplaceData * | data, | ||
bool | selected | ||
) |
Definition at line 1553 of file find_replace.cpp.
References cbFindReplaceData::directionDown, cbFindReplaceData::end, cbFindReplaceData::eolMode, Find(), cbFindReplaceData::findInFiles, cbFindReplaceData::findText, cbFindReplaceData::findUsesSelectedText, cbFindReplaceData::fixEOLs, Manager::Get(), EditorManager::GetBuiltinActiveEditor(), cbEditor::GetControl(), Manager::GetEditorManager(), wxScintilla::GetSelectedText(), cbFindReplaceData::hiddenSearch, cbFindReplaceData::initialreplacing, wxString::IsEmpty(), m_LastFindReplaceData, cbFindReplaceData::matchCase, cbFindReplaceData::matchWord, cbFindReplaceData::multiLine, cbFindReplaceData::NewSearch, cbFindReplaceData::originEntireScope, cbFindReplaceData::recursiveSearch, cbFindReplaceData::regEx, cbFindReplaceData::replaceText, cbFindReplaceData::scope, cbFindReplaceData::searchMask, cbFindReplaceData::searchPath, cbFindReplaceData::searchProject, cbFindReplaceData::searchTarget, ShowFindDialog(), cbFindReplaceData::start, cbFindReplaceData::startFile, cbFindReplaceData::startWord, wxEmptyString, and wxSCI_EOL_LF.
Referenced by FindInFiles(), and FindSelectedText().
int FindReplace::FindSelectedText | ( | bool | goingDown | ) |
Definition at line 1636 of file find_replace.cpp.
References FindNext(), Manager::Get(), EditorManager::GetBuiltinActiveEditor(), cbEditor::GetControl(), wxScintilla::GetCurrentPos(), Manager::GetEditorManager(), wxScintilla::GetSelectedText(), wxScintilla::SetSelectionEnd(), wxScintilla::SetSelectionStart(), wxString::size(), wxScintilla::WordEndPosition(), and wxScintilla::WordStartPosition().
Definition at line 138 of file find_replace.cpp.
References _T, wxArrayString::Add(), ListCtrlLogger::Append(), Logger::caption, Logger::info, wxString::Length(), m_pSearchLog, wxString::Printf(), wxString::Replace(), wxString::Trim(), and wxString::Truncate().
Referenced by FindInFiles().
|
private |
Definition at line 409 of file find_replace.cpp.
References _(), _T, cbFindReplaceData::autoWrapSearch, wxScintilla::BeginUndoAction(), ConfirmReplaceDlg::CalcPosition(), CalculateFindReplaceStartEnd(), cbMessageBox(), wxRegEx::Compile(), cbFindReplaceData::ConvertEOLs(), wxScintilla::ConvertEOLs(), crAll, crCancel, crNo, crYes, cbFindReplaceData::directionDown, InfoWindow::Display(), cbFindReplaceData::end, wxScintilla::EndUndoAction(), wxScintilla::EnsureVisible(), cbFindReplaceData::findText, wxScintilla::FindText(), cbFindReplaceData::fixEOLs, Manager::Get(), Manager::GetConfigManager(), wxScintilla::GetEOLMode(), wxScintilla::GetLength(), wxRegEx::GetMatch(), wxScintilla::GetReadOnly(), wxScintilla::GetSelectedText(), wxScintilla::GetSelectionEnd(), wxScintilla::GetSelectionStart(), wxScintilla::GetTextRange(), wxScintilla::GotoPos(), cbFindReplaceData::initialreplacing, cbFindReplaceData::IsMultiLine(), wxString::Len(), wxString::Length(), wxScintilla::LineFromPosition(), cbFindReplaceData::matchCase, wxRegEx::Matches(), cbFindReplaceData::matchWord, wxString::Mid(), wxString::Printf(), ConfigManager::ReadBool(), cbFindReplaceData::regEx, wxRegEx::Replace(), wxScintilla::ReplaceSelection(), wxScintilla::ReplaceTargetRE(), cbFindReplaceData::replaceText, cbFindReplaceData::scope, wxScintilla::SetChangeCollection(), wxScintilla::SetSCIFocus(), wxScintilla::SetSelectionVoid(), wxScintilla::SetTargetEnd(), wxScintilla::SetTargetStart(), wxDialog::ShowModal(), cbFindReplaceData::start, cbFindReplaceData::startFile, cbFindReplaceData::startWord, wxBell(), wxCANCEL, wxICON_EXCLAMATION, wxICON_INFORMATION, wxICON_QUESTION, wxID_OK, wxOK, wxRE_ADVANCED, wxRE_ICASE, wxRE_NEWLINE, wxSCI_FIND_MATCHCASE, wxSCI_FIND_POSIX, wxSCI_FIND_REGEXP, wxSCI_FIND_WHOLEWORD, and wxSCI_FIND_WORDSTART.
Referenced by ShowFindDialog().
|
private |
Definition at line 678 of file find_replace.cpp.
References _(), _T, wxArrayString::Add(), wxScintilla::BeginUndoAction(), ProjectFile::buildTargets, ConfirmReplaceDlg::CalcPosition(), CalculateFindReplaceStartEnd(), cbMessageBox(), cbReadFileContents(), EditorManager::Close(), wxRegEx::Compile(), cbFindReplaceData::ConvertEOLs(), wxScintilla::ConvertEOLs(), crAll, crAllInFile, crCancel, crNo, crSkipFile, crYes, cbFindReplaceData::directionDown, InfoWindow::Display(), cbFindReplaceData::end, wxScintilla::EndUndoAction(), wxScintilla::EnsureVisible(), ProjectFile::file, wxString::Find(), cbFindReplaceData::findText, wxScintilla::FindText(), cbFindReplaceData::fixEOLs, Manager::Get(), wxDir::GetAllFiles(), Manager::GetAppWindow(), GetArrayFromString(), cbProject::GetBuildTarget(), EditorManager::GetBuiltinEditor(), Manager::GetConfigManager(), cbEditor::GetControl(), wxArrayString::GetCount(), Manager::GetEditorManager(), EditorManager::GetEditorsCount(), wxFontMapper::GetEncodingFromName(), wxScintilla::GetEOLMode(), EditorBase::GetFilename(), cbProject::GetFilesList(), wxFileName::GetFullPath(), wxRegEx::GetMatch(), Manager::GetProjectManager(), ProjectManager::GetProjects(), wxScintilla::GetReadOnly(), wxScintilla::GetSelectedText(), wxScintilla::GetSelectionEnd(), wxScintilla::GetSelectionStart(), wxLocale::GetSystemEncodingName(), wxScintilla::GetTextRange(), CompileTargetBase::GetTitle(), wxScintilla::GotoPos(), cbFindReplaceData::hiddenSearch, wxArrayString::Index(), cbFindReplaceData::initialreplacing, wxString::IsEmpty(), cbFindReplaceData::IsMultiLine(), EditorManager::IsOpen(), wxFile::IsOpened(), wxString::Len(), wxString::Length(), wxScintilla::LineFromPosition(), cbFindReplaceData::matchCase, wxRegEx::Matches(), cbFindReplaceData::matchWord, wxString::Mid(), NULL, AnnoyingDialog::OK, EditorManager::Open(), PlaceWindow(), wxString::Printf(), ConfigManager::Read(), ConfigManager::ReadBool(), cbFindReplaceData::recursiveSearch, cbFindReplaceData::regEx, wxRegEx::Replace(), wxScintilla::ReplaceSelection(), wxScintilla::ReplaceTargetRE(), cbFindReplaceData::replaceText, wxGenericProgressDialog::Resume(), cbFindReplaceData::scope, cbFindReplaceData::searchMask, cbFindReplaceData::searchPath, cbFindReplaceData::searchProject, cbFindReplaceData::searchTarget, EditorManager::SetActiveEditor(), wxScintilla::SetChangeCollection(), wxScintilla::SetSelectionVoid(), wxScintilla::SetTargetEnd(), wxScintilla::SetTargetStart(), wxDialog::ShowModal(), AnnoyingDialog::ShowModal(), cbFindReplaceData::start, cbFindReplaceData::startFile, cbFindReplaceData::startWord, wxGenericProgressDialog::Update(), wxString::Upper(), wxART_INFORMATION, wxDIR_DIRS, wxDIR_FILES, wxDIR_HIDDEN, wxEmptyString, wxFileExists(), wxICON_QUESTION, wxICON_WARNING, wxID_YES, wxPD_APP_MODAL, wxPD_AUTO_HIDE, wxPD_CAN_ABORT, wxRE_ADVANCED, wxRE_ICASE, wxRE_NEWLINE, wxSCI_FIND_MATCHCASE, wxSCI_FIND_POSIX, wxSCI_FIND_REGEXP, wxSCI_FIND_WHOLEWORD, wxSCI_FIND_WORDSTART, and wxYES_NO.
Referenced by ShowFindDialog().
int FindReplace::ShowFindDialog | ( | bool | replace, |
bool | explicitly_find_in_files = false |
||
) |
Definition at line 166 of file find_replace.cpp.
References _(), _T, cbFindReplaceData::autoWrapSearch, cbMessageBox(), cbFindReplaceData::delOldSearches, cbFindReplaceData::directionDown, wxString::empty(), cbFindReplaceData::end, cbFindReplaceData::eolMode, Find(), FindInFiles(), cbFindReplaceData::findInFiles, cbFindReplaceData::findText, cbFindReplaceData::findUsesSelectedText, cbFindReplaceData::fixEOLs, Manager::Get(), EditorManager::GetActiveEditor(), FindReplaceBase::GetAutoWrapSearch(), EditorManager::GetBuiltinEditor(), cbEditor::GetControl(), wxScintilla::GetCurrentPos(), FindReplaceBase::GetDeleteOldSearches(), FindReplaceBase::GetDirection(), Manager::GetEditorManager(), FindReplaceBase::GetFindString(), FindReplaceBase::GetFindUsesSelectedText(), FindReplaceBase::GetFixEOLs(), FindReplaceBase::GetHidden(), FindReplaceBase::GetMatchCase(), FindReplaceBase::GetMatchWord(), FindReplaceBase::GetMultiLine(), FindReplaceBase::GetOrigin(), FindReplaceBase::GetProject(), FindReplaceBase::GetRecursive(), FindReplaceBase::GetRegEx(), FindReplaceBase::GetReplaceString(), FindReplaceBase::GetScope(), FindReplaceBase::GetSearchMask(), FindReplaceBase::GetSearchPath(), wxScintilla::GetSelectedText(), wxScintilla::GetSelectionEnd(), wxScintilla::GetSelectionStart(), FindReplaceBase::GetSortSearchResult(), FindReplaceBase::GetStartFile(), FindReplaceBase::GetStartWord(), FindReplaceBase::GetTarget(), wxScintilla::GetTextRange(), cbFindReplaceData::hiddenSearch, cbFindReplaceData::initialreplacing, wxString::IsEmpty(), FindReplaceBase::IsFindInFiles(), wxString::IsSameAs(), wxScintilla::LineFromPosition(), m_LastFindReplaceData, cbFindReplaceData::matchCase, cbFindReplaceData::matchWord, cbFindReplaceData::multiLine, cbFindReplaceData::NewSearch, cbFindReplaceData::originEntireScope, PlaceWindow(), cbFindReplaceData::recursiveSearch, cbFindReplaceData::regEx, Replace(), ReplaceInFiles(), cbFindReplaceData::replaceText, cbFindReplaceData::scope, cbFindReplaceData::SearchInSelectionEnd, cbFindReplaceData::SearchInSelectionStart, cbFindReplaceData::searchMask, cbFindReplaceData::searchPath, cbFindReplaceData::searchProject, cbFindReplaceData::searchTarget, wxDialog::ShowModal(), cbFindReplaceData::sortSearchResult, cbFindReplaceData::start, cbFindReplaceData::startFile, cbFindReplaceData::startWord, wxScintilla::WordEndPosition(), wxScintilla::WordStartPosition(), wxEmptyString, wxICON_ERROR, wxICON_EXCLAMATION, wxID_CANCEL, wxOK, and wxSCI_EOL_LF.
Referenced by FindNext().
|
private |
Definition at line 31 of file find_replace.h.
Referenced by FindInFiles(), FindNext(), ShowFindDialog(), and ~FindReplace().
|
private |
Definition at line 32 of file find_replace.h.
Referenced by CreateSearchLog(), FindInFiles(), and LogSearch().