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" ) );
60 if( !( flags & wxFR_WHOLEWORD ) )
76 GetSizer()->SetSizeHints(
this );
79 if( aSize != wxDefaultSize )
81 wxSize bestSize = GetBestSize();
83 if( size.GetHeight() != bestSize.GetHeight() )
84 size.SetHeight( bestSize.GetHeight() );
89 GetSizer()->Fit(
this );
121 aEvent.Enable( HasFlag( wxFR_REPLACEDIALOG ) && !
m_comboFind->GetValue().empty() &&
128 aEvent.Enable( HasFlag( wxFR_REPLACEDIALOG ) && !
m_comboFind->GetValue().empty() );
134 if( aEvent.GetKeyCode() == WXK_RETURN )
136 wxCommandEvent dummyCommand;
154 if( aEvent.GetSelection() != 0 )
177 if( aEvent.GetSelection() != 0 )
207 flags |= wxFR_MATCHCASE;
210 flags |= wxFR_WHOLEWORD;
236 if( index == wxNOT_FOUND )
240 else if( index != 0 )
257 if( index == wxNOT_FOUND )
261 else if( index != 0 )
270 if( aEvent.GetId() == wxID_REPLACE )
272 else if( aEvent.GetId() == wxID_REPLACE_ALL )
281 if( index == wxNOT_FOUND )
285 else if( index != 0 )
void OnUpdateReplaceAllUI(wxUpdateUIEvent &aEvent) override
wxArrayString GetFindEntries() const
wxCheckBox * m_checkMatchCase
void OnChar(wxKeyEvent &aEvent)
Class DIALOG_SCH_FIND_BASE.
void OnReplaceWithEnter(wxCommandEvent &event) override
void OnSearchForText(wxCommandEvent &aEvent) override
wxRadioButton * m_radioForward
static TOOL_ACTION replaceAll
int ReplaceAndFindNext(const TOOL_EVENT &aEvent)
void OnIdle(wxIdleEvent &event) override
static LIB_PART * dummy()
Used to draw a dummy shape when a LIB_PART is not found in library.
Schematic editor (Eeschema) main window.
int FindNext(const TOOL_EVENT &aEvent)
void OnReplace(wxCommandEvent &aEvent) override
void OnFindDialogClose()
Notification that the Find dialog has closed.
void SetInitialFocus(wxWindow *aWindow)
Sets the window (usually a wxTextCtrl) that should be focused when the dialog is shown.
static TOOL_ACTION updateFind
Handle actions specific to the schematic editor.
wxFindReplaceData * m_findReplaceData
wxButton * m_buttonReplaceAll
wxCheckBox * m_checkAllFields
DIALOG_SCH_FIND(SCH_EDIT_FRAME *aParent, wxFindReplaceData *aData, const wxPoint &aPosition=wxDefaultPosition, const wxSize &aSize=wxDefaultSize, int aStyle=0)
SCH_EDITOR_CONTROL * m_editorControl
wxCheckBox * m_checkWildcardMatch
void OnReplaceWithSelect(wxCommandEvent &aEvent) override
void OnSearchForEnter(wxCommandEvent &event) override
void SetPosition(const wxPoint &aNewPosition)
Force the position of the dialog to a new position.
wxCheckBox * m_checkReplaceReferences
int ReplaceAll(const TOOL_EVENT &aEvent)
Subclass of DIALOG_SCH_FIND_BASE, which is generated by wxFormBuilder.
void OnReplaceWithText(wxCommandEvent &aEvent) override
void OnSearchForSelect(wxCommandEvent &aEvent) override
int UpdateFind(const TOOL_EVENT &aEvent)
Notifies pcbnew about the selected item.
void OnClose(wxCloseEvent &aEvent) override
wxButton * m_buttonReplace
void OnUpdateReplaceUI(wxUpdateUIEvent &aEvent) override
static TOOL_ACTION replaceAndFindNext
wxRadioButton * m_radioBackward
void SetReplaceEntries(const wxArrayString &aEntries)
void OnOptions(wxCommandEvent &event) override
wxCheckBox * m_checkWholeWord
void SetFindEntries(const wxArrayString &aEntries)
wxComboBox * m_comboReplace
void OnFind(wxCommandEvent &aEvent) override
void OnCancel(wxCommandEvent &aEvent) override
wxStaticText * m_staticReplace
static TOOL_ACTION findNext
wxCheckBox * m_checkAllPins
wxCheckBox * m_checkCurrentSheetOnly