KiCad PCB EDA Suite
Loading...
Searching...
No Matches
dialog_sch_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 The 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, see <https://www.gnu.org/licenses/>.
19 */
20
21#ifndef DIALOG_SCH_FIND_H
22#define DIALOG_SCH_FIND_H
23
25
26#include <wx/fdrepdlg.h> // Use the wxFindReplaceDialog events, data, and enums.
27
28class SCH_BASE_FRAME;
30struct SCH_SEARCH_DATA;
31
32
34{
35public:
37 const wxPoint& aPosition = wxDefaultPosition,
38 const wxSize& aSize = wxDefaultSize, int aStyle = 0 );
39 ~DIALOG_SCH_FIND() override = default;
40
41 void SetFindEntries( const wxArrayString& aEntries, const wxString& aFindString );
42 wxArrayString GetFindEntries() const;
43
44 void SetReplaceEntries( const wxArrayString& aEntries );
45 wxArrayString GetReplaceEntries() const { return m_comboReplace->GetStrings(); }
46
47protected:
48 // Handlers for DIALOG_SCH_FIND_BASE events.
49 void OnClose( wxCloseEvent& aEvent ) override;
50 void OnCancel( wxCommandEvent& aEvent ) override;
51 void OnSearchForSelect( wxCommandEvent& aEvent ) override;
52 void OnSearchForText( wxCommandEvent& aEvent ) override;
53 void OnSearchForEnter( wxCommandEvent& event ) override;
54 void OnReplaceWithSelect( wxCommandEvent& aEvent ) override;
55 void OnReplaceWithText( wxCommandEvent& aEvent ) override;
56 void OnReplaceWithEnter( wxCommandEvent& event ) override;
57 void OnOptions( wxCommandEvent& event ) override;
58 void OnUpdateReplaceUI( wxUpdateUIEvent& aEvent ) override;
59 void OnUpdateReplaceAllUI( wxUpdateUIEvent& aEvent ) override;
60 void OnIdle( wxIdleEvent& event ) override;
61 void OnFind( wxCommandEvent& aEvent ) override;
62 void OnReplace( wxCommandEvent& aEvent ) override;
63 void onShowSearchPanel( wxHyperlinkEvent& event ) override;
64
65 // Rebuild the search flags from dialog settings
66 void updateFlags();
67
68protected:
73
74 DECLARE_NO_COPY_CLASS( DIALOG_SCH_FIND )
75};
76
77
78#endif // DIALOG_SCH_FIND_H
DIALOG_SCH_FIND_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Find"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
void OnSearchForSelect(wxCommandEvent &aEvent) override
void OnReplaceWithEnter(wxCommandEvent &event) override
wxArrayString GetFindEntries() const
void OnIdle(wxIdleEvent &event) override
SCH_FIND_REPLACE_TOOL * m_findReplaceTool
SCH_SEARCH_DATA * m_findReplaceData
SCH_BASE_FRAME * m_frame
wxArrayString GetReplaceEntries() const
void OnUpdateReplaceUI(wxUpdateUIEvent &aEvent) override
void SetReplaceEntries(const wxArrayString &aEntries)
void SetFindEntries(const wxArrayString &aEntries, const wxString &aFindString)
~DIALOG_SCH_FIND() override=default
void OnReplaceWithText(wxCommandEvent &aEvent) override
void OnReplaceWithSelect(wxCommandEvent &aEvent) override
DIALOG_SCH_FIND(SCH_BASE_FRAME *aParent, SCH_SEARCH_DATA *aData, const wxPoint &aPosition=wxDefaultPosition, const wxSize &aSize=wxDefaultSize, int aStyle=0)
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
void onShowSearchPanel(wxHyperlinkEvent &event) override
A shim class between EDA_DRAW_FRAME and several derived classes: SYMBOL_EDIT_FRAME,...
Handle actions specific to the schematic editor.