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;
34
35
37{
38public:
40 const wxPoint& aPosition = wxDefaultPosition,
41 const wxSize& aSize = wxDefaultSize, int aStyle = 0 );
43
44 void SetFindEntries( const wxArrayString& aEntries, const wxString& aFindString );
45 wxArrayString GetFindEntries() const;
46
47 void SetReplaceEntries( const wxArrayString& aEntries );
48 wxArrayString GetReplaceEntries() const { return m_comboReplace->GetStrings(); }
49
50protected:
51 // Handlers for DIALOG_SCH_FIND_BASE events.
52 void OnClose( wxCloseEvent& aEvent ) override;
53 void OnCancel( wxCommandEvent& aEvent ) override;
54 void OnSearchForSelect( wxCommandEvent& aEvent ) override;
55 void OnSearchForText( wxCommandEvent& aEvent ) override;
56 void OnSearchForEnter( wxCommandEvent& event ) override;
57 void OnReplaceWithSelect( wxCommandEvent& aEvent ) override;
58 void OnReplaceWithText( wxCommandEvent& aEvent ) override;
59 void OnReplaceWithEnter( wxCommandEvent& event ) override;
60 void OnOptions( wxCommandEvent& event ) override;
61 void OnUpdateReplaceUI( wxUpdateUIEvent& aEvent ) override;
62 void OnUpdateReplaceAllUI( wxUpdateUIEvent& aEvent ) override;
63 void OnIdle( wxIdleEvent& event ) override;
64 void OnChar( wxKeyEvent& aEvent );
65 void OnFind( wxCommandEvent& aEvent ) override;
66 void OnReplace( wxCommandEvent& aEvent ) override;
67
68 // Rebuild the search flags from dialog settings
69 void updateFlags();
70
75
76 DECLARE_NO_COPY_CLASS( DIALOG_SCH_FIND )
77};
78
79
80#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.