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 <stambaughw@verizon.net>
5  * Copyright (C) 2010-2019 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 
43 class SCH_EDIT_FRAME;
44 class SCH_EDITOR_CONTROL;
45 
46 
48 {
49 protected:
50  // Handlers for DIALOG_SCH_FIND_BASE events.
51  void OnClose( wxCloseEvent& aEvent ) override;
52  void OnCancel( wxCommandEvent& aEvent ) override;
53  void OnSearchForText( wxCommandEvent& aEvent ) override;
54  void OnTextEnter( wxCommandEvent& event ) override;
55  void OnOptions( wxCommandEvent& event ) override;
56  void OnUpdateReplaceUI( wxUpdateUIEvent& aEvent ) override;
57  void OnUpdateReplaceAllUI( wxUpdateUIEvent& aEvent ) override;
58 
59  void OnChar( wxKeyEvent& aEvent );
60  void OnFind( wxCommandEvent& aEvent ) override;
61  void OnReplace( wxCommandEvent& aEvent ) override;
62 
65  wxFindReplaceData* m_findReplaceData;
66 
67  DECLARE_NO_COPY_CLASS( DIALOG_SCH_FIND )
68 
69 public:
70  DIALOG_SCH_FIND( SCH_EDIT_FRAME* aParent, wxFindReplaceData* aData,
71  const wxPoint& aPosition = wxDefaultPosition,
72  const wxSize& aSize = wxDefaultSize, int aStyle = 0 );
73 
74  void SetFindEntries( const wxArrayString& aEntries );
75  wxArrayString GetFindEntries() const;
76 
77  void SetReplaceEntries( const wxArrayString& aEntries );
78  wxArrayString GetReplaceEntries() const { return m_comboReplace->GetStrings(); }
79 };
80 
81 
82 #endif // __dialog_schematic_find__
void OnUpdateReplaceAllUI(wxUpdateUIEvent &aEvent) override
wxArrayString GetFindEntries() const
void OnChar(wxKeyEvent &aEvent)
Class DIALOG_SCH_FIND_BASE.
void OnSearchForText(wxCommandEvent &aEvent) override
Schematic editor (Eeschema) main window.
void OnReplace(wxCommandEvent &aEvent) override
SCH_EDITOR_CONTROL.
wxFindReplaceData * m_findReplaceData
wxArrayString GetReplaceEntries() const
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
void OnClose(wxCloseEvent &aEvent) override
void OnUpdateReplaceUI(wxUpdateUIEvent &aEvent) override
void SetReplaceEntries(const wxArrayString &aEntries)
void OnOptions(wxCommandEvent &event) override
void OnTextEnter(wxCommandEvent &event) override
void SetFindEntries(const wxArrayString &aEntries)
void OnFind(wxCommandEvent &aEvent) override
SCH_EDIT_FRAME * m_frame
void OnCancel(wxCommandEvent &aEvent) override