1 ///////////////////////////////////////////////////////////////////////////
2 // C++ code generated with wxFormBuilder (version Oct 26 2018)
3 // http://www.wxformbuilder.org/
4 //
5 // PLEASE DO *NOT* EDIT THIS FILE!
6 ///////////////////////////////////////////////////////////////////////////
7 
8 #include "dialogs/wx_html_report_box.h"
9 
10 #include "dialog_drc_base.h"
11 
12 ///////////////////////////////////////////////////////////////////////////
13 
DIALOG_DRC_BASE(wxWindow * parent,wxWindowID id,const wxString & title,const wxPoint & pos,const wxSize & size,long style)14 DIALOG_DRC_BASE::DIALOG_DRC_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
15 {
16 	this->SetSizeHints( wxSize( -1,-1 ), wxDefaultSize );
17 
18 	wxBoxSizer* m_MainSizer;
19 	m_MainSizer = new wxBoxSizer( wxVERTICAL );
20 
21 	wxBoxSizer* bSizerOptions;
22 	bSizerOptions = new wxBoxSizer( wxHORIZONTAL );
23 
24 	wxBoxSizer* bSizer12;
25 	bSizer12 = new wxBoxSizer( wxVERTICAL );
26 
27 	m_cbRefillZones = new wxCheckBox( this, wxID_ANY, _("Refill all zones before performing DRC"), wxDefaultPosition, wxDefaultSize, 0 );
28 	bSizer12->Add( m_cbRefillZones, 0, wxALL, 5 );
29 
30 	m_cbReportAllTrackErrors = new wxCheckBox( this, wxID_ANY, _("Report all errors for each track"), wxDefaultPosition, wxDefaultSize, 0 );
31 	m_cbReportAllTrackErrors->SetToolTip( _("If selected, all DRC violations for tracks will be reported.  This can be slow for complicated designs.\n\nIf unselected, only the first DRC violation will be reported for each track connection.") );
32 
33 	bSizer12->Add( m_cbReportAllTrackErrors, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
34 
35 
36 	bSizerOptions->Add( bSizer12, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
37 
38 	wxBoxSizer* bSizerOptSettings;
39 	bSizerOptSettings = new wxBoxSizer( wxVERTICAL );
40 
41 	m_cbTestFootprints = new wxCheckBox( this, wxID_ANY, _("Test for parity between PCB and schematic"), wxDefaultPosition, wxDefaultSize, 0 );
42 	bSizerOptSettings->Add( m_cbTestFootprints, 0, wxALL, 5 );
43 
44 
45 	bSizerOptions->Add( bSizerOptSettings, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
46 
47 
48 	m_MainSizer->Add( bSizerOptions, 0, wxEXPAND|wxTOP|wxBOTTOM|wxLEFT, 3 );
49 
50 	m_runningResultsBook = new wxSimplebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
51 	running = new wxPanel( m_runningResultsBook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
52 	wxBoxSizer* bSizer14;
53 	bSizer14 = new wxBoxSizer( wxVERTICAL );
54 
55 	m_runningNotebook = new wxNotebook( running, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
56 	m_panelMessages = new wxPanel( m_runningNotebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
57 	wxBoxSizer* bSizer10;
58 	bSizer10 = new wxBoxSizer( wxVERTICAL );
59 
60 	m_messages = new WX_HTML_REPORT_BOX( m_panelMessages, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHW_SCROLLBAR_AUTO );
61 	bSizer10->Add( m_messages, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
62 
63 	wxBoxSizer* bGaugeMargins;
64 	bGaugeMargins = new wxBoxSizer( wxVERTICAL );
65 
66 	m_gauge = new wxGauge( m_panelMessages, wxID_ANY, 1000, wxDefaultPosition, wxDefaultSize, wxGA_HORIZONTAL );
67 	m_gauge->SetValue( 0 );
68 	bGaugeMargins->Add( m_gauge, 0, wxALL|wxEXPAND, 5 );
69 
70 
71 	bSizer10->Add( bGaugeMargins, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
72 
73 
74 	m_panelMessages->SetSizer( bSizer10 );
75 	m_panelMessages->Layout();
76 	bSizer10->Fit( m_panelMessages );
77 	m_runningNotebook->AddPage( m_panelMessages, _("Tests Running..."), true );
78 
79 	bSizer14->Add( m_runningNotebook, 1, wxEXPAND | wxALL, 5 );
80 
81 
82 	running->SetSizer( bSizer14 );
83 	running->Layout();
84 	bSizer14->Fit( running );
85 	m_runningResultsBook->AddPage( running, _("a page"), false );
86 	results = new wxPanel( m_runningResultsBook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
87 	wxBoxSizer* bSizer13;
88 	bSizer13 = new wxBoxSizer( wxVERTICAL );
89 
90 	m_Notebook = new wxNotebook( results, ID_NOTEBOOK1, wxDefaultPosition, wxDefaultSize, 0 );
91 	m_panelViolations = new wxPanel( m_Notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
92 	wxBoxSizer* bSizerViolationsBox;
93 	bSizerViolationsBox = new wxBoxSizer( wxVERTICAL );
94 
95 	bSizerViolationsBox->SetMinSize( wxSize( -1,320 ) );
96 	m_markerDataView = new wxDataViewCtrl( m_panelViolations, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxDV_NO_HEADER );
97 	m_markerDataView->SetToolTip( _("Click on items to highlight them on the board.") );
98 
99 	bSizerViolationsBox->Add( m_markerDataView, 1, wxALL|wxEXPAND, 5 );
100 
101 
102 	m_panelViolations->SetSizer( bSizerViolationsBox );
103 	m_panelViolations->Layout();
104 	bSizerViolationsBox->Fit( m_panelViolations );
105 	m_Notebook->AddPage( m_panelViolations, _("Violations (%d)"), false );
106 	m_panelUnconnectedItems = new wxPanel( m_Notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
107 	wxBoxSizer* bSizerUnconnectedBox;
108 	bSizerUnconnectedBox = new wxBoxSizer( wxVERTICAL );
109 
110 	m_unconnectedDataView = new wxDataViewCtrl( m_panelUnconnectedItems, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxDV_NO_HEADER );
111 	bSizerUnconnectedBox->Add( m_unconnectedDataView, 1, wxALL|wxEXPAND, 5 );
112 
113 
114 	m_panelUnconnectedItems->SetSizer( bSizerUnconnectedBox );
115 	m_panelUnconnectedItems->Layout();
116 	bSizerUnconnectedBox->Fit( m_panelUnconnectedItems );
117 	m_Notebook->AddPage( m_panelUnconnectedItems, _("Unconnected Items (%d)"), false );
118 	m_panelFootprintWarnings = new wxPanel( m_Notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
119 	wxBoxSizer* bSizerFootprintsBox;
120 	bSizerFootprintsBox = new wxBoxSizer( wxVERTICAL );
121 
122 	m_footprintsDataView = new wxDataViewCtrl( m_panelFootprintWarnings, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxDV_NO_HEADER );
123 	bSizerFootprintsBox->Add( m_footprintsDataView, 1, wxALL|wxEXPAND, 5 );
124 
125 
126 	m_panelFootprintWarnings->SetSizer( bSizerFootprintsBox );
127 	m_panelFootprintWarnings->Layout();
128 	bSizerFootprintsBox->Fit( m_panelFootprintWarnings );
129 	m_Notebook->AddPage( m_panelFootprintWarnings, _("Schematic Parity (%d)"), false );
130 
131 	bSizer13->Add( m_Notebook, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
132 
133 
134 	results->SetSizer( bSizer13 );
135 	results->Layout();
136 	bSizer13->Fit( results );
137 	m_runningResultsBook->AddPage( results, _("a page"), true );
138 
139 	m_MainSizer->Add( m_runningResultsBook, 1, wxEXPAND, 5 );
140 
141 	wxBoxSizer* bSizer9;
142 	bSizer9 = new wxBoxSizer( wxVERTICAL );
143 
144 	wxBoxSizer* bSeveritySizer;
145 	bSeveritySizer = new wxBoxSizer( wxHORIZONTAL );
146 
147 	m_showLabel = new wxStaticText( this, wxID_ANY, _("Show:"), wxDefaultPosition, wxDefaultSize, 0 );
148 	m_showLabel->Wrap( -1 );
149 	bSeveritySizer->Add( m_showLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
150 
151 	m_showAll = new wxCheckBox( this, wxID_ANY, _("All"), wxDefaultPosition, wxDefaultSize, 0 );
152 	bSeveritySizer->Add( m_showAll, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
153 
154 
155 	bSeveritySizer->Add( 35, 0, 0, wxEXPAND, 5 );
156 
157 	m_showErrors = new wxCheckBox( this, wxID_ANY, _("Errors"), wxDefaultPosition, wxDefaultSize, 0 );
158 	bSeveritySizer->Add( m_showErrors, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
159 
160 	m_errorsBadge = new NUMBER_BADGE( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
161 	bSeveritySizer->Add( m_errorsBadge, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 25 );
162 
163 	m_showWarnings = new wxCheckBox( this, wxID_ANY, _("Warnings"), wxDefaultPosition, wxDefaultSize, 0 );
164 	bSeveritySizer->Add( m_showWarnings, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
165 
166 	m_warningsBadge = new NUMBER_BADGE( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
167 	bSeveritySizer->Add( m_warningsBadge, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 25 );
168 
169 	m_showExclusions = new wxCheckBox( this, wxID_ANY, _("Exclusions"), wxDefaultPosition, wxDefaultSize, 0 );
170 	bSeveritySizer->Add( m_showExclusions, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
171 
172 	m_exclusionsBadge = new NUMBER_BADGE( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
173 	bSeveritySizer->Add( m_exclusionsBadge, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 25 );
174 
175 
176 	bSeveritySizer->Add( 5, 0, 1, wxEXPAND, 5 );
177 
178 	m_saveReport = new wxButton( this, wxID_ANY, _("Save..."), wxDefaultPosition, wxDefaultSize, 0 );
179 	bSeveritySizer->Add( m_saveReport, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
180 
181 
182 	bSizer9->Add( bSeveritySizer, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
183 
184 
185 	m_MainSizer->Add( bSizer9, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
186 
187 	m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
188 	m_MainSizer->Add( m_staticline1, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 10 );
189 
190 	m_sizerButtons = new wxBoxSizer( wxHORIZONTAL );
191 
192 	m_DeleteCurrentMarkerButton = new wxButton( this, wxID_ANY, _("Delete Marker"), wxDefaultPosition, wxDefaultSize, 0 );
193 	m_sizerButtons->Add( m_DeleteCurrentMarkerButton, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 10 );
194 
195 	m_DeleteAllMarkersButton = new wxButton( this, wxID_ANY, _("Delete All Markers"), wxDefaultPosition, wxDefaultSize, 0 );
196 	m_sizerButtons->Add( m_DeleteAllMarkersButton, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
197 
198 	m_sdbSizer = new wxStdDialogButtonSizer();
199 	m_sdbSizerOK = new wxButton( this, wxID_OK );
200 	m_sdbSizer->AddButton( m_sdbSizerOK );
201 	m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
202 	m_sdbSizer->AddButton( m_sdbSizerCancel );
203 	m_sdbSizer->Realize();
204 
205 	m_sizerButtons->Add( m_sdbSizer, 1, wxEXPAND|wxALL, 5 );
206 
207 
208 	m_MainSizer->Add( m_sizerButtons, 0, wxEXPAND|wxLEFT, 5 );
209 
210 
211 	this->SetSizer( m_MainSizer );
212 	this->Layout();
213 	m_MainSizer->Fit( this );
214 
215 	// Connect Events
216 	this->Connect( wxEVT_ACTIVATE, wxActivateEventHandler( DIALOG_DRC_BASE::OnActivateDlg ) );
217 	this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_DRC_BASE::OnClose ) );
218 	m_messages->Connect( wxEVT_COMMAND_HTML_LINK_CLICKED, wxHtmlLinkEventHandler( DIALOG_DRC_BASE::OnErrorLinkClicked ), NULL, this );
219 	m_Notebook->Connect( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, wxNotebookEventHandler( DIALOG_DRC_BASE::OnChangingNotebookPage ), NULL, this );
220 	m_markerDataView->Connect( wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED, wxDataViewEventHandler( DIALOG_DRC_BASE::OnDRCItemDClick ), NULL, this );
221 	m_markerDataView->Connect( wxEVT_COMMAND_DATAVIEW_ITEM_CONTEXT_MENU, wxDataViewEventHandler( DIALOG_DRC_BASE::OnDRCItemRClick ), NULL, this );
222 	m_markerDataView->Connect( wxEVT_COMMAND_DATAVIEW_SELECTION_CHANGED, wxDataViewEventHandler( DIALOG_DRC_BASE::OnDRCItemSelected ), NULL, this );
223 	m_unconnectedDataView->Connect( wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED, wxDataViewEventHandler( DIALOG_DRC_BASE::OnDRCItemDClick ), NULL, this );
224 	m_unconnectedDataView->Connect( wxEVT_COMMAND_DATAVIEW_SELECTION_CHANGED, wxDataViewEventHandler( DIALOG_DRC_BASE::OnDRCItemSelected ), NULL, this );
225 	m_footprintsDataView->Connect( wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED, wxDataViewEventHandler( DIALOG_DRC_BASE::OnDRCItemDClick ), NULL, this );
226 	m_footprintsDataView->Connect( wxEVT_COMMAND_DATAVIEW_SELECTION_CHANGED, wxDataViewEventHandler( DIALOG_DRC_BASE::OnDRCItemSelected ), NULL, this );
227 	m_showAll->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_DRC_BASE::OnSeverity ), NULL, this );
228 	m_showErrors->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_DRC_BASE::OnSeverity ), NULL, this );
229 	m_showWarnings->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_DRC_BASE::OnSeverity ), NULL, this );
230 	m_showExclusions->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_DRC_BASE::OnSeverity ), NULL, this );
231 	m_saveReport->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DRC_BASE::OnSaveReport ), NULL, this );
232 	m_DeleteCurrentMarkerButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DRC_BASE::OnDeleteOneClick ), NULL, this );
233 	m_DeleteAllMarkersButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DRC_BASE::OnDeleteAllClick ), NULL, this );
234 	m_sdbSizerCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DRC_BASE::OnCancelClick ), NULL, this );
235 	m_sdbSizerOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DRC_BASE::OnRunDRCClick ), NULL, this );
236 }
237 
~DIALOG_DRC_BASE()238 DIALOG_DRC_BASE::~DIALOG_DRC_BASE()
239 {
240 	// Disconnect Events
241 	this->Disconnect( wxEVT_ACTIVATE, wxActivateEventHandler( DIALOG_DRC_BASE::OnActivateDlg ) );
242 	this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_DRC_BASE::OnClose ) );
243 	m_messages->Disconnect( wxEVT_COMMAND_HTML_LINK_CLICKED, wxHtmlLinkEventHandler( DIALOG_DRC_BASE::OnErrorLinkClicked ), NULL, this );
244 	m_Notebook->Disconnect( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, wxNotebookEventHandler( DIALOG_DRC_BASE::OnChangingNotebookPage ), NULL, this );
245 	m_markerDataView->Disconnect( wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED, wxDataViewEventHandler( DIALOG_DRC_BASE::OnDRCItemDClick ), NULL, this );
246 	m_markerDataView->Disconnect( wxEVT_COMMAND_DATAVIEW_ITEM_CONTEXT_MENU, wxDataViewEventHandler( DIALOG_DRC_BASE::OnDRCItemRClick ), NULL, this );
247 	m_markerDataView->Disconnect( wxEVT_COMMAND_DATAVIEW_SELECTION_CHANGED, wxDataViewEventHandler( DIALOG_DRC_BASE::OnDRCItemSelected ), NULL, this );
248 	m_unconnectedDataView->Disconnect( wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED, wxDataViewEventHandler( DIALOG_DRC_BASE::OnDRCItemDClick ), NULL, this );
249 	m_unconnectedDataView->Disconnect( wxEVT_COMMAND_DATAVIEW_SELECTION_CHANGED, wxDataViewEventHandler( DIALOG_DRC_BASE::OnDRCItemSelected ), NULL, this );
250 	m_footprintsDataView->Disconnect( wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED, wxDataViewEventHandler( DIALOG_DRC_BASE::OnDRCItemDClick ), NULL, this );
251 	m_footprintsDataView->Disconnect( wxEVT_COMMAND_DATAVIEW_SELECTION_CHANGED, wxDataViewEventHandler( DIALOG_DRC_BASE::OnDRCItemSelected ), NULL, this );
252 	m_showAll->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_DRC_BASE::OnSeverity ), NULL, this );
253 	m_showErrors->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_DRC_BASE::OnSeverity ), NULL, this );
254 	m_showWarnings->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_DRC_BASE::OnSeverity ), NULL, this );
255 	m_showExclusions->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_DRC_BASE::OnSeverity ), NULL, this );
256 	m_saveReport->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DRC_BASE::OnSaveReport ), NULL, this );
257 	m_DeleteCurrentMarkerButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DRC_BASE::OnDeleteOneClick ), NULL, this );
258 	m_DeleteAllMarkersButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DRC_BASE::OnDeleteAllClick ), NULL, this );
259 	m_sdbSizerCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DRC_BASE::OnCancelClick ), NULL, this );
260 	m_sdbSizerOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DRC_BASE::OnRunDRCClick ), NULL, this );
261 
262 }
263