KiCad PCB EDA Suite
Loading...
Searching...
No Matches
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-2023 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
25#ifndef DIALOG_SCH_FIND_H
26#define DIALOG_SCH_FIND_H
27
29
30#include <wx/fdrepdlg.h> // Use the wxFindReplaceDialog events, data, and enums.
31
32class SCH_EDIT_FRAME;
34struct SCH_SEARCH_DATA;
35
36
38{
39public:
41 const wxPoint& aPosition = wxDefaultPosition,
42 const wxSize& aSize = wxDefaultSize, int aStyle = 0 );
44
45 void SetFindEntries( const wxArrayString& aEntries, const wxString& aFindString );
46 wxArrayString GetFindEntries() const;
47
48 void SetReplaceEntries( const wxArrayString& aEntries );
49 wxArrayString GetReplaceEntries() const { return m_comboReplace->GetStrings(); }
50
51protected:
52 // Handlers for DIALOG_SCH_FIND_BASE events.
53 void OnClose( wxCloseEvent& aEvent ) override;
54 void OnCancel( wxCommandEvent& aEvent ) override;
55 void OnSearchForSelect( wxCommandEvent& aEvent ) override;
56 void OnSearchForText( wxCommandEvent& aEvent ) override;
57 void OnSearchForEnter( wxCommandEvent& event ) override;
58 void OnReplaceWithSelect( wxCommandEvent& aEvent ) override;
59 void OnReplaceWithText( wxCommandEvent& aEvent ) override;
60 void OnReplaceWithEnter( wxCommandEvent& event ) override;
61 void OnOptions( wxCommandEvent& event ) override;
62 void OnUpdateReplaceUI( wxUpdateUIEvent& aEvent ) override;
63 void OnUpdateReplaceAllUI( wxUpdateUIEvent& aEvent ) override;
64 void OnIdle( wxIdleEvent& event ) override;
65 void OnChar( wxKeyEvent& aEvent );
66 void OnFind( wxCommandEvent& aEvent ) override;
67 void OnReplace( wxCommandEvent& aEvent ) override;
68
69 // Rebuild the search flags from dialog settings
70 void updateFlags();
71
76
77 DECLARE_NO_COPY_CLASS( DIALOG_SCH_FIND )
78};
79
80
81#endif // DIALOG_SCH_FIND_H
Class DIALOG_SCH_FIND_BASE.
void OnSearchForSelect(wxCommandEvent &aEvent) override
SCH_EDIT_FRAME * m_frame
void OnReplaceWithEnter(wxCommandEvent &event) override
wxArrayString GetFindEntries() const
void OnIdle(wxIdleEvent &event) override
SCH_FIND_REPLACE_TOOL * m_findReplaceTool
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
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
Schematic editor (Eeschema) main window.
Handle actions specific to the schematic editor.