KiCad PCB EDA Suite
dialog_schematic_find_base.cpp
Go to the documentation of this file.
1 // C++ code generated with wxFormBuilder (version Dec 30 2017)
3 // http://www.wxformbuilder.org/
4 //
5 // PLEASE DO *NOT* EDIT THIS FILE!
7 
9 
11 
12 DIALOG_SCH_FIND_BASE::DIALOG_SCH_FIND_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
13 {
14  this->SetSizeHints( wxDefaultSize, wxDefaultSize );
15 
16  wxBoxSizer* mainSizer;
17  mainSizer = new wxBoxSizer( wxVERTICAL );
18 
19  wxBoxSizer* topSizer;
20  topSizer = new wxBoxSizer( wxHORIZONTAL );
21 
22  wxBoxSizer* leftSizer;
23  leftSizer = new wxBoxSizer( wxVERTICAL );
24 
25  wxFlexGridSizer* leftGridSizer;
26  leftGridSizer = new wxFlexGridSizer( 3, 2, 3, 3 );
27  leftGridSizer->AddGrowableCol( 1 );
28  leftGridSizer->SetFlexibleDirection( wxBOTH );
29  leftGridSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
30 
31  m_staticText1 = new wxStaticText( this, wxID_ANY, _("&Search for:"), wxDefaultPosition, wxDefaultSize, 0 );
32  m_staticText1->Wrap( -1 );
33  leftGridSizer->Add( m_staticText1, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 6 );
34 
35  m_comboFind = new wxComboBox( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, wxCB_DROPDOWN|wxTE_PROCESS_ENTER );
36  m_comboFind->SetToolTip( _("Text with optional wildcards") );
37  m_comboFind->SetMinSize( wxSize( 200,-1 ) );
38 
39  leftGridSizer->Add( m_comboFind, 0, wxEXPAND, 6 );
40 
41  m_staticReplace = new wxStaticText( this, wxID_ANY, _("Replace &with:"), wxDefaultPosition, wxDefaultSize, 0 );
42  m_staticReplace->Wrap( -1 );
43  m_staticReplace->Hide();
44 
45  leftGridSizer->Add( m_staticReplace, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
46 
47  m_comboReplace = new wxComboBox( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, wxTE_PROCESS_ENTER );
48  m_comboReplace->Hide();
49 
50  leftGridSizer->Add( m_comboReplace, 0, wxEXPAND, 5 );
51 
52  m_staticDirection = new wxStaticText( this, wxID_ANY, _("Direction:"), wxDefaultPosition, wxDefaultSize, 0 );
53  m_staticDirection->Wrap( -1 );
54  m_staticDirection->Hide();
55 
56  leftGridSizer->Add( m_staticDirection, 0, 0, 5 );
57 
58  wxBoxSizer* directionSizer;
59  directionSizer = new wxBoxSizer( wxVERTICAL );
60 
61  m_radioForward = new wxRadioButton( this, wxID_ANY, _("F&orward"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
62  m_radioForward->Hide();
63 
64  directionSizer->Add( m_radioForward, 0, wxALL, 3 );
65 
66  m_radioBackward = new wxRadioButton( this, wxID_ANY, _("&Backward"), wxDefaultPosition, wxDefaultSize, 0 );
67  m_radioBackward->Hide();
68 
69  directionSizer->Add( m_radioBackward, 0, wxALL, 3 );
70 
71 
72  leftGridSizer->Add( directionSizer, 1, wxEXPAND, 5 );
73 
74 
75  leftSizer->Add( leftGridSizer, 0, wxALL|wxEXPAND, 5 );
76 
77  wxBoxSizer* checkBoxes;
78  checkBoxes = new wxBoxSizer( wxVERTICAL );
79 
80  m_checkWholeWord = new wxCheckBox( this, wxID_ANY, _("Match whole wor&d"), wxDefaultPosition, wxDefaultSize, 0 );
81  m_checkWholeWord->SetValue(true);
82  checkBoxes->Add( m_checkWholeWord, 0, wxALL, 3 );
83 
84  m_checkMatchCase = new wxCheckBox( this, wxID_ANY, _("&Match case"), wxDefaultPosition, wxDefaultSize, 0 );
85  checkBoxes->Add( m_checkMatchCase, 0, wxBOTTOM|wxLEFT|wxRIGHT, 3 );
86 
87  m_checkWildcardMatch = new wxCheckBox( this, wxID_ANY, _("Search &using simple wildcard matching"), wxDefaultPosition, wxDefaultSize, 0 );
88  checkBoxes->Add( m_checkWildcardMatch, 0, wxBOTTOM|wxLEFT|wxRIGHT, 3 );
89 
90  m_checkWrap = new wxCheckBox( this, wxID_ANY, _("Wrap around &end of search list"), wxDefaultPosition, wxDefaultSize, 0 );
91  m_checkWrap->SetValue(true);
92  checkBoxes->Add( m_checkWrap, 0, wxBOTTOM|wxLEFT|wxRIGHT, 3 );
93 
94  m_checkAllFields = new wxCheckBox( this, wxID_ANY, _("Search all com&ponent fields"), wxDefaultPosition, wxDefaultSize, 0 );
95  checkBoxes->Add( m_checkAllFields, 0, wxBOTTOM|wxLEFT|wxRIGHT, 3 );
96 
97  m_checkAllPins = new wxCheckBox( this, wxID_ANY, _("Search all pin &names and numbers"), wxDefaultPosition, wxDefaultSize, 0 );
98  checkBoxes->Add( m_checkAllPins, 0, wxBOTTOM|wxRIGHT|wxLEFT, 3 );
99 
100  m_checkCurrentSheetOnly = new wxCheckBox( this, wxID_ANY, _("Search the current &sheet only"), wxDefaultPosition, wxDefaultSize, 0 );
101  checkBoxes->Add( m_checkCurrentSheetOnly, 0, wxBOTTOM|wxLEFT|wxRIGHT, 3 );
102 
103  m_checkReplaceReferences = new wxCheckBox( this, wxID_ANY, _("Replace componen&t reference designators"), wxDefaultPosition, wxDefaultSize, 0 );
104  m_checkReplaceReferences->Hide();
105 
106  checkBoxes->Add( m_checkReplaceReferences, 0, wxBOTTOM|wxLEFT|wxRIGHT, 3 );
107 
108  m_checkNoWarpCursor = new wxCheckBox( this, wxID_ANY, _("D&o not warp cursor to found item"), wxDefaultPosition, wxDefaultSize, 0 );
109  checkBoxes->Add( m_checkNoWarpCursor, 0, wxBOTTOM|wxLEFT|wxRIGHT, 3 );
110 
111 
112  leftSizer->Add( checkBoxes, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
113 
114 
115  topSizer->Add( leftSizer, 1, wxEXPAND|wxALL, 5 );
116 
117  wxBoxSizer* rightSizer;
118  rightSizer = new wxBoxSizer( wxVERTICAL );
119 
120  m_buttonFind = new wxButton( this, wxID_FIND, _("&Find"), wxDefaultPosition, wxDefaultSize, 0 );
121  m_buttonFind->SetDefault();
122  rightSizer->Add( m_buttonFind, 0, wxALL|wxEXPAND, 6 );
123 
124  m_buttonReplace = new wxButton( this, wxID_REPLACE, _("&Replace"), wxDefaultPosition, wxDefaultSize, 0 );
125  m_buttonReplace->Hide();
126 
127  rightSizer->Add( m_buttonReplace, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 6 );
128 
129  m_buttonReplaceAll = new wxButton( this, wxID_REPLACE_ALL, _("Replace &All"), wxDefaultPosition, wxDefaultSize, 0 );
130  m_buttonReplaceAll->Hide();
131 
132  rightSizer->Add( m_buttonReplaceAll, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 6 );
133 
134  m_buttonCancel = new wxButton( this, wxID_CANCEL, _("Close"), wxDefaultPosition, wxDefaultSize, 0 );
135  rightSizer->Add( m_buttonCancel, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 6 );
136 
137 
138  topSizer->Add( rightSizer, 0, wxALL|wxEXPAND, 6 );
139 
140 
141  mainSizer->Add( topSizer, 1, wxEXPAND, 5 );
142 
143  wxBoxSizer* statusSizer;
144  statusSizer = new wxBoxSizer( wxVERTICAL );
145 
146  m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
147  statusSizer->Add( m_staticline1, 0, wxEXPAND|wxALL, 3 );
148 
149  m_statusLine = new wxStaticText( this, wxID_ANY, _("Status..."), wxDefaultPosition, wxDefaultSize, 0 );
150  m_statusLine->Wrap( -1 );
151  m_statusLine->SetFont( wxFont( 10, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
152 
153  statusSizer->Add( m_statusLine, 0, wxBOTTOM|wxRIGHT|wxLEFT, 7 );
154 
155 
156  mainSizer->Add( statusSizer, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
157 
158 
159  this->SetSizer( mainSizer );
160  this->Layout();
161  mainSizer->Fit( this );
162 
163  this->Centre( wxBOTH );
164 
165  // Connect Events
166  this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_SCH_FIND_BASE::OnClose ) );
167  m_comboFind->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_SCH_FIND_BASE::OnTextEnter ), NULL, this );
168  m_comboFind->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SCH_FIND_BASE::OnUpdateDrcUI ), NULL, this );
169  m_comboReplace->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_SCH_FIND_BASE::OnTextEnter ), NULL, this );
170  m_comboReplace->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SCH_FIND_BASE::OnUpdateDrcUI ), NULL, this );
171  m_checkWholeWord->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SCH_FIND_BASE::OnUpdateWholeWordUI ), NULL, this );
172  m_checkWildcardMatch->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SCH_FIND_BASE::OnUpdateWildcardUI ), NULL, this );
173  m_buttonFind->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SCH_FIND_BASE::OnFind ), NULL, this );
174  m_buttonFind->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SCH_FIND_BASE::OnUpdateFindUI ), NULL, this );
175  m_buttonReplace->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SCH_FIND_BASE::OnReplace ), NULL, this );
176  m_buttonReplace->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SCH_FIND_BASE::OnUpdateReplaceUI ), NULL, this );
177  m_buttonReplaceAll->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SCH_FIND_BASE::OnReplace ), NULL, this );
178  m_buttonReplaceAll->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SCH_FIND_BASE::OnUpdateReplaceAllUI ), NULL, this );
179  m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SCH_FIND_BASE::OnCancel ), NULL, this );
180 }
181 
183 {
184  // Disconnect Events
185  this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_SCH_FIND_BASE::OnClose ) );
186  m_comboFind->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_SCH_FIND_BASE::OnTextEnter ), NULL, this );
187  m_comboFind->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SCH_FIND_BASE::OnUpdateDrcUI ), NULL, this );
188  m_comboReplace->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_SCH_FIND_BASE::OnTextEnter ), NULL, this );
189  m_comboReplace->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SCH_FIND_BASE::OnUpdateDrcUI ), NULL, this );
190  m_checkWholeWord->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SCH_FIND_BASE::OnUpdateWholeWordUI ), NULL, this );
191  m_checkWildcardMatch->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SCH_FIND_BASE::OnUpdateWildcardUI ), NULL, this );
192  m_buttonFind->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SCH_FIND_BASE::OnFind ), NULL, this );
193  m_buttonFind->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SCH_FIND_BASE::OnUpdateFindUI ), NULL, this );
194  m_buttonReplace->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SCH_FIND_BASE::OnReplace ), NULL, this );
195  m_buttonReplace->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SCH_FIND_BASE::OnUpdateReplaceUI ), NULL, this );
196  m_buttonReplaceAll->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SCH_FIND_BASE::OnReplace ), NULL, this );
197  m_buttonReplaceAll->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SCH_FIND_BASE::OnUpdateReplaceAllUI ), NULL, this );
198  m_buttonCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SCH_FIND_BASE::OnCancel ), NULL, this );
199 
200 }
virtual void OnUpdateReplaceAllUI(wxUpdateUIEvent &event)
virtual void OnCancel(wxCommandEvent &event)
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)
virtual void OnUpdateWildcardUI(wxUpdateUIEvent &event)
Class DIALOG_SHIM may sit in the inheritance tree between wxDialog and any class written by wxFormBui...
Definition: dialog_shim.h:82
virtual void OnTextEnter(wxCommandEvent &event)
virtual void OnUpdateReplaceUI(wxUpdateUIEvent &event)
virtual void OnReplace(wxCommandEvent &event)
virtual void OnUpdateWholeWordUI(wxUpdateUIEvent &event)
virtual void OnFind(wxCommandEvent &event)
virtual void OnClose(wxCloseEvent &event)
virtual void OnUpdateFindUI(wxUpdateUIEvent &event)
virtual void OnUpdateDrcUI(wxUpdateUIEvent &event)