32 const wxPoint& aPosition,
const wxSize& aSize,
int aStyle ) :
34 wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | aStyle ),
37 m_findReplaceData( aData ),
40 wxASSERT_MSG(
m_findReplaceData, wxT(
"can't create find dialog without data" ) );
42 if( aStyle & wxFR_REPLACEDIALOG )
44 SetTitle(
_(
"Find and Replace" ) );
68 wxString hotkeyHint = wxString::Format( wxT(
" (%s)" ),
KeyNameFromKeyCode( hotkey ) );
78 GetSizer()->SetSizeHints(
this );
81 if( aSize != wxDefaultSize )
83 wxSize bestSize = GetBestSize();
85 if( size.GetHeight() != bestSize.GetHeight() )
86 size.SetHeight( bestSize.GetHeight() );
91 GetSizer()->Fit(
this );
128 EndModal( wxID_CANCEL );
146 aEvent.Enable( HasFlag( wxFR_REPLACEDIALOG ) && !
m_comboFind->GetValue().empty()
153 aEvent.Enable( HasFlag( wxFR_REPLACEDIALOG ) && !
m_comboFind->GetValue().empty() );
169 if( aEvent.GetSelection() != 0 )
192 if( aEvent.GetSelection() != 0 )
257 if( index == wxNOT_FOUND )
261 else if( index != 0 )
280 if( index == wxNOT_FOUND )
284 else if( index != 0 )
293 if( aEvent.GetId() == wxID_REPLACE )
295 else if( aEvent.GetId() == wxID_REPLACE_ALL )
304 if( index == wxNOT_FOUND )
308 else if( index != 0 )
330 if( !aFindString.IsEmpty() )
static TOOL_ACTION replaceAll
static TOOL_ACTION updateFind
static TOOL_ACTION replaceAndFindNext
static TOOL_ACTION findNext
static TOOL_ACTION showSearch
Class DIALOG_SCH_FIND_BASE.
wxCheckBox * m_checkReplaceReferences
wxCheckBox * m_checkAllPins
wxCheckBox * m_checkConnections
wxStaticText * m_staticReplace
wxCheckBox * m_checkCurrentSheetOnly
wxCheckBox * m_checkAllFields
wxComboBox * m_comboReplace
wxHyperlinkCtrl * m_searchPanelLink
wxButton * m_buttonReplaceAll
wxCheckBox * m_checkMatchCase
wxButton * m_buttonReplace
wxCheckBox * m_checkSelectedOnly
wxCheckBox * m_checkRegexMatch
wxCheckBox * m_checkWholeWord
void OnSearchForSelect(wxCommandEvent &aEvent) override
DIALOG_SCH_FIND(SCH_EDIT_FRAME *aParent, SCH_SEARCH_DATA *aData, const wxPoint &aPosition=wxDefaultPosition, const wxSize &aSize=wxDefaultSize, int aStyle=0)
void OnReplaceWithEnter(wxCommandEvent &event) override
wxArrayString GetFindEntries() const
void OnIdle(wxIdleEvent &event) override
SCH_FIND_REPLACE_TOOL * m_findReplaceTool
SCH_SEARCH_DATA * m_findReplaceData
void OnUpdateReplaceUI(wxUpdateUIEvent &aEvent) override
void SetReplaceEntries(const wxArrayString &aEntries)
void SetFindEntries(const wxArrayString &aEntries, const wxString &aFindString)
void OnReplaceWithText(wxCommandEvent &aEvent) override
void OnReplaceWithSelect(wxCommandEvent &aEvent) override
void OnUpdateReplaceAllUI(wxUpdateUIEvent &aEvent) override
void OnSearchForText(wxCommandEvent &aEvent) override
void OnClose(wxCloseEvent &aEvent) override
void OnReplace(wxCommandEvent &aEvent) override
void OnSearchForEnter(wxCommandEvent &event) override
void OnFind(wxCommandEvent &aEvent) override
void OnCancel(wxCommandEvent &aEvent) override
void OnOptions(wxCommandEvent &event) override
void onShowSearchPanel(wxHyperlinkEvent &event) override
void SetInitialFocus(wxWindow *aWindow)
Sets the window (usually a wxTextCtrl) that should be focused when the dialog is shown.
wxArrayString & GetFindHistoryList()
Schematic editor (Eeschema) main window.
void OnFindDialogClose()
Notification that the Find dialog has closed.
#define SCH_EDIT_FRAME_NAME
wxString KeyNameFromKeyCode(int aKeycode, bool *aIsFound)
Return the key name from the key code.
std::vector< FAB_LAYER_COLOR > dummy
EDA_SEARCH_MATCH_MODE matchMode
bool searchCurrentSheetOnly