KiCad PCB EDA Suite
Loading...
Searching...
No Matches
dialog_schematic_find_base.cpp
Go to the documentation of this file.
1
2// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6)
3// http://www.wxformbuilder.org/
4//
5// PLEASE DO *NOT* EDIT THIS FILE!
7
9
11
12DIALOG_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, 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( 220,-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 wxGridBagSizer* gbSizer2;
78 gbSizer2 = new wxGridBagSizer( 0, 20 );
79 gbSizer2->SetFlexibleDirection( wxHORIZONTAL );
80 gbSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_NONE );
81
82 m_checkMatchCase = new wxCheckBox( this, wxID_ANY, _("Match &case"), wxDefaultPosition, wxDefaultSize, 0 );
83 gbSizer2->Add( m_checkMatchCase, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
84
85 m_checkWholeWord = new wxCheckBox( this, wxID_ANY, _("Whole &words only"), wxDefaultPosition, wxDefaultSize, 0 );
86 m_checkWholeWord->SetValue(true);
87 gbSizer2->Add( m_checkWholeWord, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
88
89 m_checkWildcardMatch = new wxCheckBox( this, wxID_ANY, _("Wi&ldcards"), wxDefaultPosition, wxDefaultSize, 0 );
90 gbSizer2->Add( m_checkWildcardMatch, wxGBPosition( 0, 2 ), wxGBSpan( 1, 1 ), wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
91
92 m_checkAllPins = new wxCheckBox( this, wxID_ANY, _("Search pin &names and numbers"), wxDefaultPosition, wxDefaultSize, 0 );
93 gbSizer2->Add( m_checkAllPins, wxGBPosition( 1, 0 ), wxGBSpan( 1, 3 ), wxBOTTOM|wxRIGHT|wxLEFT, 5 );
94
95 m_checkAllFields = new wxCheckBox( this, wxID_ANY, _("Search &hidden fields"), wxDefaultPosition, wxDefaultSize, 0 );
96 gbSizer2->Add( m_checkAllFields, wxGBPosition( 2, 0 ), wxGBSpan( 1, 3 ), wxBOTTOM|wxRIGHT|wxLEFT, 5 );
97
98 m_checkCurrentSheetOnly = new wxCheckBox( this, wxID_ANY, _("Search the current &sheet only"), wxDefaultPosition, wxDefaultSize, 0 );
99 gbSizer2->Add( m_checkCurrentSheetOnly, wxGBPosition( 3, 0 ), wxGBSpan( 1, 3 ), wxBOTTOM|wxRIGHT|wxLEFT, 5 );
100
101 m_checkSelectedOnly = new wxCheckBox( this, wxID_ANY, _("Search the current selection &only"), wxDefaultPosition, wxDefaultSize, 0 );
102 gbSizer2->Add( m_checkSelectedOnly, wxGBPosition( 4, 0 ), wxGBSpan( 1, 1 ), wxBOTTOM|wxRIGHT|wxLEFT, 5 );
103
104 m_checkReplaceReferences = new wxCheckBox( this, wxID_ANY, _("Replace matches in reference designators"), wxDefaultPosition, wxDefaultSize, 0 );
106
107 gbSizer2->Add( m_checkReplaceReferences, wxGBPosition( 5, 0 ), wxGBSpan( 1, 3 ), wxBOTTOM|wxRIGHT|wxLEFT, 5 );
108
109
110 leftSizer->Add( gbSizer2, 1, wxEXPAND, 5 );
111
112
113 topSizer->Add( leftSizer, 1, wxEXPAND|wxALL, 5 );
114
115 wxBoxSizer* rightSizer;
116 rightSizer = new wxBoxSizer( wxVERTICAL );
117
118 m_buttonFind = new wxButton( this, wxID_FIND, _("Find"), wxDefaultPosition, wxDefaultSize, 0 );
119
120 m_buttonFind->SetDefault();
121 rightSizer->Add( m_buttonFind, 0, wxALL|wxEXPAND, 6 );
122
123 m_buttonReplace = new wxButton( this, wxID_REPLACE, _("Replace"), wxDefaultPosition, wxDefaultSize, 0 );
124 m_buttonReplace->Hide();
125
126 rightSizer->Add( m_buttonReplace, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 6 );
127
128 m_buttonReplaceAll = new wxButton( this, wxID_REPLACE_ALL, _("Replace All"), wxDefaultPosition, wxDefaultSize, 0 );
129 m_buttonReplaceAll->Hide();
130
131 rightSizer->Add( m_buttonReplaceAll, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 6 );
132
133 m_buttonCancel = new wxButton( this, wxID_CANCEL, _("Close"), wxDefaultPosition, wxDefaultSize, 0 );
134 rightSizer->Add( m_buttonCancel, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 6 );
135
136
137 topSizer->Add( rightSizer, 0, wxALL|wxEXPAND, 6 );
138
139
140 mainSizer->Add( topSizer, 1, wxEXPAND, 5 );
141
142
143 this->SetSizer( mainSizer );
144 this->Layout();
145 mainSizer->Fit( this );
146
147 this->Centre( wxBOTH );
148
149 // Connect Events
150 this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_SCH_FIND_BASE::OnClose ) );
151 this->Connect( wxEVT_IDLE, wxIdleEventHandler( DIALOG_SCH_FIND_BASE::OnIdle ) );
152 m_comboFind->Connect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( DIALOG_SCH_FIND_BASE::OnSearchForSelect ), NULL, this );
153 m_comboFind->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_SCH_FIND_BASE::OnSearchForText ), NULL, this );
154 m_comboFind->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_SCH_FIND_BASE::OnSearchForEnter ), NULL, this );
155 m_comboFind->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SCH_FIND_BASE::OnUpdateDrcUI ), NULL, this );
156 m_comboReplace->Connect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( DIALOG_SCH_FIND_BASE::OnReplaceWithSelect ), NULL, this );
157 m_comboReplace->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_SCH_FIND_BASE::OnReplaceWithText ), NULL, this );
158 m_comboReplace->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_SCH_FIND_BASE::OnReplaceWithEnter ), NULL, this );
159 m_comboReplace->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SCH_FIND_BASE::OnUpdateDrcUI ), NULL, this );
160 m_checkMatchCase->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_SCH_FIND_BASE::OnOptions ), NULL, this );
161 m_checkWholeWord->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_SCH_FIND_BASE::OnOptions ), NULL, this );
162 m_checkWildcardMatch->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_SCH_FIND_BASE::OnOptions ), NULL, this );
163 m_checkAllPins->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_SCH_FIND_BASE::OnOptions ), NULL, this );
164 m_checkAllFields->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_SCH_FIND_BASE::OnOptions ), NULL, this );
165 m_checkCurrentSheetOnly->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_SCH_FIND_BASE::OnOptions ), NULL, this );
166 m_checkSelectedOnly->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_SCH_FIND_BASE::OnOptions ), NULL, this );
167 m_buttonFind->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SCH_FIND_BASE::OnFind ), NULL, this );
168 m_buttonReplace->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SCH_FIND_BASE::OnReplace ), NULL, this );
169 m_buttonReplace->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SCH_FIND_BASE::OnUpdateReplaceUI ), NULL, this );
170 m_buttonReplaceAll->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SCH_FIND_BASE::OnReplace ), NULL, this );
171 m_buttonReplaceAll->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SCH_FIND_BASE::OnUpdateReplaceAllUI ), NULL, this );
172 m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SCH_FIND_BASE::OnCancel ), NULL, this );
173}
174
176{
177 // Disconnect Events
178 this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_SCH_FIND_BASE::OnClose ) );
179 this->Disconnect( wxEVT_IDLE, wxIdleEventHandler( DIALOG_SCH_FIND_BASE::OnIdle ) );
180 m_comboFind->Disconnect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( DIALOG_SCH_FIND_BASE::OnSearchForSelect ), NULL, this );
181 m_comboFind->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_SCH_FIND_BASE::OnSearchForText ), NULL, this );
182 m_comboFind->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_SCH_FIND_BASE::OnSearchForEnter ), NULL, this );
183 m_comboFind->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SCH_FIND_BASE::OnUpdateDrcUI ), NULL, this );
184 m_comboReplace->Disconnect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( DIALOG_SCH_FIND_BASE::OnReplaceWithSelect ), NULL, this );
185 m_comboReplace->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_SCH_FIND_BASE::OnReplaceWithText ), NULL, this );
186 m_comboReplace->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_SCH_FIND_BASE::OnReplaceWithEnter ), NULL, this );
187 m_comboReplace->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SCH_FIND_BASE::OnUpdateDrcUI ), NULL, this );
188 m_checkMatchCase->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_SCH_FIND_BASE::OnOptions ), NULL, this );
189 m_checkWholeWord->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_SCH_FIND_BASE::OnOptions ), NULL, this );
190 m_checkWildcardMatch->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_SCH_FIND_BASE::OnOptions ), NULL, this );
191 m_checkAllPins->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_SCH_FIND_BASE::OnOptions ), NULL, this );
192 m_checkAllFields->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_SCH_FIND_BASE::OnOptions ), NULL, this );
193 m_checkCurrentSheetOnly->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_SCH_FIND_BASE::OnOptions ), NULL, this );
194 m_checkSelectedOnly->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_SCH_FIND_BASE::OnOptions ), NULL, this );
195 m_buttonFind->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SCH_FIND_BASE::OnFind ), NULL, this );
196 m_buttonReplace->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SCH_FIND_BASE::OnReplace ), NULL, this );
197 m_buttonReplace->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SCH_FIND_BASE::OnUpdateReplaceUI ), NULL, this );
198 m_buttonReplaceAll->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SCH_FIND_BASE::OnReplace ), NULL, this );
199 m_buttonReplaceAll->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SCH_FIND_BASE::OnUpdateReplaceAllUI ), NULL, this );
200 m_buttonCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SCH_FIND_BASE::OnCancel ), NULL, this );
201
202}
virtual void OnReplaceWithSelect(wxCommandEvent &event)
virtual void OnUpdateDrcUI(wxUpdateUIEvent &event)
virtual void OnClose(wxCloseEvent &event)
virtual void OnReplaceWithText(wxCommandEvent &event)
virtual void OnSearchForSelect(wxCommandEvent &event)
virtual void OnReplace(wxCommandEvent &event)
virtual void OnOptions(wxCommandEvent &event)
virtual void OnUpdateReplaceUI(wxUpdateUIEvent &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 OnSearchForEnter(wxCommandEvent &event)
virtual void OnSearchForText(wxCommandEvent &event)
virtual void OnUpdateReplaceAllUI(wxUpdateUIEvent &event)
virtual void OnReplaceWithEnter(wxCommandEvent &event)
virtual void OnIdle(wxIdleEvent &event)
virtual void OnCancel(wxCommandEvent &event)
virtual void OnFind(wxCommandEvent &event)
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
Definition: dialog_shim.h:88
#define _(s)