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 );
138 EndModal( wxID_CANCEL );
151 aEvent.Enable( HasFlag( wxFR_REPLACEDIALOG ) && !
m_comboFind->GetValue().empty()
158 aEvent.Enable( HasFlag( wxFR_REPLACEDIALOG ) && !
m_comboFind->GetValue().empty() );
174 if( aEvent.GetSelection() != 0 )
197 if( aEvent.GetSelection() != 0 )
262 if( index == wxNOT_FOUND )
266 else if( index != 0 )
285 if( index == wxNOT_FOUND )
289 else if( index != 0 )
298 if( aEvent.GetId() == wxID_REPLACE )
300 else if( aEvent.GetId() == wxID_REPLACE_ALL )
309 if( index == wxNOT_FOUND )
313 else if( index != 0 )
331 m_frame->GetFindHistoryList().pop_back();
335 if( !aFindString.IsEmpty() )
354 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
wxCheckBox * m_cbSelectedOnly
wxComboBox * m_comboReplace
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
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
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