KiCad PCB EDA Suite
dialog_schematic_find.h
Go to the documentation of this file.
1/*
2 * This program source code file is part of KiCad, a free EDA CAD application.
3 *
4 * Copyright (C) 2010 Wayne Stambaugh <[email protected]>
5 * Copyright (C) 2010-2021 KiCad Developers, see AUTHORS.txt for contributors.
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2
10 * of the License, or (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, you may find one here:
19 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
20 * or you may search the http://www.gnu.org website for the version 2 license,
21 * or you may write to the Free Software Foundation, Inc.,
22 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
23 */
24
36#ifndef __dialog_schematic_find__
37#define __dialog_schematic_find__
38
40
41#include <wx/fdrepdlg.h> // Use the wxFindReplaceDialog events, data, and enums.
42
43class SCH_EDIT_FRAME;
45
46
48{
49public:
51 const wxPoint& aPosition = wxDefaultPosition,
52 const wxSize& aSize = wxDefaultSize, int aStyle = 0 );
53
54 void SetFindEntries( const wxArrayString& aEntries, const wxString& aFindString );
55 wxArrayString GetFindEntries() const;
56
57 void SetReplaceEntries( const wxArrayString& aEntries );
58 wxArrayString GetReplaceEntries() const { return m_comboReplace->GetStrings(); }
59
60protected:
61 // Handlers for DIALOG_SCH_FIND_BASE events.
62 void OnClose( wxCloseEvent& aEvent ) override;
63 void OnCancel( wxCommandEvent& aEvent ) override;
64 void OnSearchForSelect( wxCommandEvent& aEvent ) override;
65 void OnSearchForText( wxCommandEvent& aEvent ) override;
66 void OnSearchForEnter( wxCommandEvent& event ) override;
67 void OnReplaceWithSelect( wxCommandEvent& aEvent ) override;
68 void OnReplaceWithText( wxCommandEvent& aEvent ) override;
69 void OnReplaceWithEnter( wxCommandEvent& event ) override;
70 void OnOptions( wxCommandEvent& event ) override;
71 void OnUpdateReplaceUI( wxUpdateUIEvent& aEvent ) override;
72 void OnUpdateReplaceAllUI( wxUpdateUIEvent& aEvent ) override;
73 void OnIdle( wxIdleEvent& event ) override;
74 void OnChar( wxKeyEvent& aEvent );
75 void OnFind( wxCommandEvent& aEvent ) override;
76 void OnReplace( wxCommandEvent& aEvent ) override;
77
78 // Rebuild the search flags from dialog settings
79 void updateFlags();
80
85
86 DECLARE_NO_COPY_CLASS( DIALOG_SCH_FIND )
87};
88
89
90#endif // __dialog_schematic_find__
Class DIALOG_SCH_FIND_BASE.
void OnSearchForSelect(wxCommandEvent &aEvent) override
SCH_EDIT_FRAME * m_frame
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_SEARCH_DATA * m_findReplaceData
wxArrayString GetReplaceEntries() const
void OnUpdateReplaceUI(wxUpdateUIEvent &aEvent) override
void SetReplaceEntries(const wxArrayString &aEntries)
void SetFindEntries(const wxArrayString &aEntries, const wxString &aFindString)
void OnChar(wxKeyEvent &aEvent)
void OnReplaceWithText(wxCommandEvent &aEvent) override
SCH_EDITOR_CONTROL * m_editorControl
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
Handle actions specific to the schematic editor.
Schematic editor (Eeschema) main window.