30#ifndef FINDREPLACEPANE_H
31#define FINDREPLACEPANE_H
34#include <wx/fdrepdlg.h>
37#include <wx/radiobut.h>
38#include <wx/checkbox.h>
39#include <wx/stattext.h>
40#include <wx/textctrl.h>
41#include <wx/combobox.h>
54 bool GetRegexSearch()
const {
return m_regexSearch;}
55 void SetRegexSearch(
bool regexSearch) {m_regexSearch = regexSearch;}
68 static constexpr int m_historyLength = 15;
70 wxComboBox *m_searchText;
71 wxComboBox *m_replaceText;
74 void LoadHistory(wxComboBox *combo,
const wxString &
key);
77 void AddToHistory(wxComboBox *combo,
const wxString &
key,
const wxString &value);
78 wxButton *m_searchButton;
79 wxButton *m_replaceButton;
80 wxButton *m_replaceAllButton;
81 wxRadioButton *m_forward;
82 wxRadioButton *m_backwards;
83 wxRadioButton *m_regexSearch;
84 wxRadioButton *m_simpleSearch;
85 wxCheckBox *m_matchCase;
86 wxCheckBox *m_searchInInput;
87 wxCheckBox *m_searchInOutput;
88 wxStaticText *m_replaceLabel;
90 wxEvtHandler *m_eventTarget =
nullptr;
92 void QueueSearchEvent(wxFindDialogEvent *event)
const;
114 void SetFocus()
override;
116 bool GetRegexSearch()
const {
return m_findReplaceData->GetRegexSearch();}
118 wxString GetFindString()
const
119 {
return m_findReplaceData->GetFindString(); }
121 void SetFindString(wxString strng);
123 wxFindReplaceData *GetData()
const
124 {
return m_findReplaceData; }
127 wxFR_SEARCH_IN_INPUT = 0x10,
128 wxFR_SEARCH_IN_OUTPUT = 0x20
132 void OnSearch(wxCommandEvent &event);
134 void OnReplace(wxCommandEvent &event);
136 void OnReplaceAll(wxCommandEvent &event);
138 void OnReplaceStringChange(wxCommandEvent &event);
140 void OnFindStringChange(wxCommandEvent &event);
142 void OnDirectionChange(wxCommandEvent &event);
144 void OnRegexSimpleChange(wxCommandEvent &event);
146 void OnMatchCase(wxCommandEvent &event);
148 void OnSearchIn(wxCommandEvent &event);
150 void OnKeyDown(wxKeyEvent &event);
Definition: FindReplacePane.h:51
void LoadFromConfig()
Seed the find flags from wxConfig, with the same defaults regardless of whether the resulting object ...
Definition: FindReplacePane.cpp:175
The find+replace pane.
Definition: FindReplacePane.h:47
void SetEventTarget(wxEvtHandler *target)
Send the search events to this handler instead of the outermost window.
Definition: FindReplacePane.h:112