32 const wxPoint& aPosition,
const wxSize& aSize,
int aStyle ) :
34 wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | aStyle ),
40 wxASSERT_MSG(
m_findReplaceData, wxT(
"can't create find dialog without data" ) );
42 if( aStyle & wxFR_REPLACEDIALOG )
44 SetTitle(
_(
"Find and Replace" ) );
81 wxString hotkeyHint = wxString::Format( wxT(
" (%s)" ),
KeyNameFromKeyCode( hotkey ) );
91 GetSizer()->SetSizeHints(
this );
94 if( aSize != wxDefaultSize )
96 wxSize bestSize = GetBestSize();
98 if( size.GetHeight() != bestSize.GetHeight() )
99 size.SetHeight( bestSize.GetHeight() );
104 GetSizer()->Fit(
this );
160 EndModal( wxID_CANCEL );
173 aEvent.Enable( HasFlag( wxFR_REPLACEDIALOG ) && !
m_comboFind->GetValue().empty()
180 aEvent.Enable( HasFlag( wxFR_REPLACEDIALOG ) && !
m_comboFind->GetValue().empty() );
196 if( aEvent.GetSelection() != 0 )
219 if( aEvent.GetSelection() != 0 )
284 if(
index == wxNOT_FOUND )
288 else if(
index != 0 )
307 if(
index == wxNOT_FOUND )
311 else if(
index != 0 )
320 if( aEvent.GetId() == wxID_REPLACE )
322 else if( aEvent.GetId() == wxID_REPLACE_ALL )
331 if(
index == wxNOT_FOUND )
335 else if(
index != 0 )
353 m_frame->GetFindHistoryList().pop_back();
357 if( !aFindString.IsEmpty() )
376 m_frame->GetFindHistoryList().pop_back();
static TOOL_ACTION replaceAll
static TOOL_ACTION updateFind
static TOOL_ACTION replaceAndFindNext
static TOOL_ACTION findNext
static TOOL_ACTION showSearch
wxCheckBox * m_cbReplaceReferences
wxStaticLine * m_staticline1
wxCheckBox * m_cbSearchHiddenFields
wxStaticText * m_staticReplace
wxRadioButton * m_radioForward
wxCheckBox * m_cbSelectedOnly
wxComboBox * m_comboReplace
wxButton * m_buttonCancel
DIALOG_SCH_FIND_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Find"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
wxHyperlinkCtrl * m_searchPanelLink
wxCheckBox * m_cbSearchPins
wxButton * m_buttonReplaceAll
wxCheckBox * m_checkMatchCase
wxRadioButton * m_radioBackward
wxCheckBox * m_cbSearchNetNames
wxButton * m_buttonReplace
wxCheckBox * m_cbCurrentSheetOnly
wxCheckBox * m_checkRegexMatch
wxCheckBox * m_checkWholeWord
void OnSearchForSelect(wxCommandEvent &aEvent) override
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
DIALOG_SCH_FIND(SCH_BASE_FRAME *aParent, SCH_SEARCH_DATA *aData, const wxPoint &aPosition=wxDefaultPosition, const wxSize &aSize=wxDefaultSize, int aStyle=0)
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
std::vector< wxWindow * > m_tabOrder
void SetInitialFocus(wxWindow *aWindow)
Sets the window (usually a wxTextCtrl) that should be focused when the dialog is shown.
A shim class between EDA_DRAW_FRAME and several derived classes: SYMBOL_EDIT_FRAME,...
Schematic editor (Eeschema) main window.
#define SCH_EDIT_FRAME_NAME
@ FRAME_SCH_SYMBOL_EDITOR
wxString KeyNameFromKeyCode(int aKeycode, bool *aIsFound)
Return the key name from the key code.
std::vector< FAB_LAYER_COLOR > dummy