KiCad PCB EDA Suite
dialog_erc_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 
8 #include "dialog_erc_listbox.h"
9 
10 #include "dialog_erc_base.h"
11 
13 
14 DIALOG_ERC_BASE::DIALOG_ERC_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( wxDefaultSize, wxDefaultSize );
17 
18  wxBoxSizer* bSizer1;
19  bSizer1 = new wxBoxSizer( wxVERTICAL );
20 
21  m_NoteBook = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
22  m_PanelERC = new wxPanel( m_NoteBook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
23  wxBoxSizer* bercSizer;
24  bercSizer = new wxBoxSizer( wxVERTICAL );
25 
26  wxBoxSizer* bupperSizer;
27  bupperSizer = new wxBoxSizer( wxHORIZONTAL );
28 
29  wxStaticBoxSizer* sdiagSizer;
30  sdiagSizer = new wxStaticBoxSizer( new wxStaticBox( m_PanelERC, wxID_ANY, _("ERC Report:") ), wxVERTICAL );
31 
32  wxGridSizer* gSizeDiag;
33  gSizeDiag = new wxGridSizer( 3, 2, 5, 5 );
34 
35  m_ErcTotalErrorsText = new wxStaticText( sdiagSizer->GetStaticBox(), wxID_ANY, _("Total:"), wxDefaultPosition, wxDefaultSize, 0 );
36  m_ErcTotalErrorsText->Wrap( -1 );
37  gSizeDiag->Add( m_ErcTotalErrorsText, 1, wxALIGN_CENTER_VERTICAL, 5 );
38 
39  m_TotalErrCount = new wxTextCtrl( sdiagSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY );
40  gSizeDiag->Add( m_TotalErrCount, 0, wxALIGN_CENTER_VERTICAL, 5 );
41 
42  m_WarnErcErrorsText = new wxStaticText( sdiagSizer->GetStaticBox(), wxID_ANY, _("Warnings:"), wxDefaultPosition, wxDefaultSize, 0 );
43  m_WarnErcErrorsText->Wrap( -1 );
44  gSizeDiag->Add( m_WarnErcErrorsText, 1, wxALIGN_CENTER_VERTICAL, 5 );
45 
46  m_LastWarningCount = new wxTextCtrl( sdiagSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY );
47  gSizeDiag->Add( m_LastWarningCount, 0, wxALIGN_CENTER_VERTICAL, 5 );
48 
49  m_LastErrCountText = new wxStaticText( sdiagSizer->GetStaticBox(), wxID_ANY, _("Errors:"), wxDefaultPosition, wxDefaultSize, 0 );
50  m_LastErrCountText->Wrap( -1 );
51  gSizeDiag->Add( m_LastErrCountText, 1, wxALIGN_CENTER_VERTICAL, 5 );
52 
53  m_LastErrCount = new wxTextCtrl( sdiagSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY );
54  gSizeDiag->Add( m_LastErrCount, 0, wxALIGN_CENTER_VERTICAL, 5 );
55 
56 
57  sdiagSizer->Add( gSizeDiag, 0, wxALL|wxEXPAND, 5 );
58 
59  m_staticline1 = new wxStaticLine( sdiagSizer->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
60  sdiagSizer->Add( m_staticline1, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
61 
62  m_WriteResultOpt = new wxCheckBox( sdiagSizer->GetStaticBox(), wxID_ANY, _("Create ERC file report"), wxDefaultPosition, wxDefaultSize, 0 );
63  sdiagSizer->Add( m_WriteResultOpt, 0, wxALL|wxBOTTOM|wxRIGHT|wxTOP, 5 );
64 
65 
66  bupperSizer->Add( sdiagSizer, 0, wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT, 5 );
67 
68  wxBoxSizer* bSizerMessages;
69  bSizerMessages = new wxBoxSizer( wxVERTICAL );
70 
71  m_titleMessages = new wxStaticText( m_PanelERC, wxID_ANY, _("Messages:"), wxDefaultPosition, wxDefaultSize, 0 );
72  m_titleMessages->Wrap( -1 );
73  m_titleMessages->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
74 
75  bSizerMessages->Add( m_titleMessages, 0, wxRIGHT|wxLEFT, 12 );
76 
77  m_MessagesList = new wxTextCtrl( m_PanelERC, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY );
78  m_MessagesList->SetMinSize( wxSize( 180,-1 ) );
79 
80  bSizerMessages->Add( m_MessagesList, 1, wxEXPAND|wxBOTTOM|wxLEFT, 5 );
81 
82 
83  bupperSizer->Add( bSizerMessages, 1, wxBOTTOM|wxEXPAND|wxRIGHT|wxTOP, 3 );
84 
85 
86  bercSizer->Add( bupperSizer, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 8 );
87 
88  m_textMarkers = new wxStaticText( m_PanelERC, wxID_ANY, _("Error List:"), wxDefaultPosition, wxDefaultSize, 0 );
89  m_textMarkers->Wrap( -1 );
90  m_textMarkers->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
91 
92  bercSizer->Add( m_textMarkers, 0, wxLEFT|wxRIGHT, 20 );
93 
94  m_MarkersList = new ERC_HTML_LISTFRAME( m_PanelERC, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHW_SCROLLBAR_AUTO|wxBORDER_SIMPLE );
95  bercSizer->Add( m_MarkersList, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 8 );
96 
97 
98  m_PanelERC->SetSizer( bercSizer );
99  m_PanelERC->Layout();
100  bercSizer->Fit( m_PanelERC );
101  m_NoteBook->AddPage( m_PanelERC, _("ERC"), true );
102  m_PanelERCOptions = new wxPanel( m_NoteBook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
103  wxBoxSizer* m_panelMatrixSizer;
104  m_panelMatrixSizer = new wxBoxSizer( wxVERTICAL );
105 
106  wxStaticBoxSizer* sbSizer2;
107  sbSizer2 = new wxStaticBoxSizer( new wxStaticBox( m_PanelERCOptions, wxID_ANY, _("Label to Label Connections") ), wxVERTICAL );
108 
109  m_cbTestSimilarLabels = new wxCheckBox( sbSizer2->GetStaticBox(), wxID_ANY, _("Test similar labels"), wxDefaultPosition, wxDefaultSize, 0 );
110  m_cbTestSimilarLabels->SetToolTip( _("Similar labels are labels (inside a sheet) which differs only by upper/lower case") );
111 
112  sbSizer2->Add( m_cbTestSimilarLabels, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
113 
114  m_cbTestUniqueGlbLabels = new wxCheckBox( sbSizer2->GetStaticBox(), wxID_ANY, _("Test single instances of global labels"), wxDefaultPosition, wxDefaultSize, 0 );
115  m_cbTestUniqueGlbLabels->SetToolTip( _("Global labels are used to connect signals across the full hierarchy.\nThey are expected to be at least two labels with the same name.") );
116 
117  sbSizer2->Add( m_cbTestUniqueGlbLabels, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
118 
119 
120  m_panelMatrixSizer->Add( sbSizer2, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
121 
122  wxStaticBoxSizer* sbSizer3;
123  sbSizer3 = new wxStaticBoxSizer( new wxStaticBox( m_PanelERCOptions, wxID_ANY, _("Pin to Pin Connections") ), wxVERTICAL );
124 
125  m_matrixPanel = new wxPanel( sbSizer3->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
126  sbSizer3->Add( m_matrixPanel, 1, wxEXPAND | wxALL, 5 );
127 
128 
129  m_panelMatrixSizer->Add( sbSizer3, 0, wxALL|wxEXPAND, 5 );
130 
131  wxStaticBoxSizer* sbSizer31;
132  sbSizer31 = new wxStaticBoxSizer( new wxStaticBox( m_PanelERCOptions, wxID_ANY, _("Bus Connections") ), wxVERTICAL );
133 
134  m_cbCheckBusToNetConflicts = new wxCheckBox( sbSizer31->GetStaticBox(), wxID_ANY, _("Check that bus wires are not connected to hierarchical net pins and vice versa"), wxDefaultPosition, wxDefaultSize, 0 );
135  sbSizer31->Add( m_cbCheckBusToNetConflicts, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
136 
137  m_cbCheckBusToBusConflicts = new wxCheckBox( sbSizer31->GetStaticBox(), wxID_ANY, _("Check that bus-to-bus connections have shared members"), wxDefaultPosition, wxDefaultSize, 0 );
138  sbSizer31->Add( m_cbCheckBusToBusConflicts, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
139 
140  m_cbCheckBusEntries = new wxCheckBox( sbSizer31->GetStaticBox(), wxID_ANY, _("Check that nets are members of buses they graphically connect to"), wxDefaultPosition, wxDefaultSize, 0 );
141  sbSizer31->Add( m_cbCheckBusEntries, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
142 
143  m_cbCheckBusDriverConflicts = new wxCheckBox( sbSizer31->GetStaticBox(), wxID_ANY, _("Check buses for conflicting drivers"), wxDefaultPosition, wxDefaultSize, 0 );
144  sbSizer31->Add( m_cbCheckBusDriverConflicts, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
145 
146 
147  m_panelMatrixSizer->Add( sbSizer31, 0, wxALL|wxEXPAND, 5 );
148 
149 
150  m_PanelERCOptions->SetSizer( m_panelMatrixSizer );
151  m_PanelERCOptions->Layout();
152  m_panelMatrixSizer->Fit( m_PanelERCOptions );
153  m_NoteBook->AddPage( m_PanelERCOptions, _("Options"), false );
154 
155  bSizer1->Add( m_NoteBook, 1, wxEXPAND | wxALL, 5 );
156 
157  m_buttonsSizer = new wxBoxSizer( wxHORIZONTAL );
158 
159  m_buttondelmarkers = new wxButton( this, ID_ERASE_DRC_MARKERS, _("Delete Markers"), wxDefaultPosition, wxDefaultSize, 0 );
160  m_buttonsSizer->Add( m_buttondelmarkers, 0, wxALL|wxEXPAND, 5 );
161 
162  m_ResetOptButton = new wxButton( this, ID_RESET_MATRIX, _("Reset to Defaults"), wxDefaultPosition, wxDefaultSize, 0 );
163  m_buttonsSizer->Add( m_ResetOptButton, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
164 
165 
166  m_buttonsSizer->Add( 0, 0, 1, wxEXPAND, 5 );
167 
168  m_sdbSizer1 = new wxStdDialogButtonSizer();
169  m_sdbSizer1OK = new wxButton( this, wxID_OK );
170  m_sdbSizer1->AddButton( m_sdbSizer1OK );
171  m_sdbSizer1Cancel = new wxButton( this, wxID_CANCEL );
172  m_sdbSizer1->AddButton( m_sdbSizer1Cancel );
173  m_sdbSizer1->Realize();
174 
175  m_buttonsSizer->Add( m_sdbSizer1, 0, wxALL|wxEXPAND, 5 );
176 
177 
178  bSizer1->Add( m_buttonsSizer, 0, wxEXPAND|wxLEFT, 10 );
179 
180 
181  this->SetSizer( bSizer1 );
182  this->Layout();
183  bSizer1->Fit( this );
184 
185  // Connect Events
186  this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_ERC_BASE::OnCloseErcDialog ) );
187  m_NoteBook->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_ERC_BASE::OnUpdateUI ), NULL, this );
188  m_MarkersList->Connect( wxEVT_COMMAND_HTML_LINK_CLICKED, wxHtmlLinkEventHandler( DIALOG_ERC_BASE::OnLeftClickMarkersList ), NULL, this );
189  m_MarkersList->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( DIALOG_ERC_BASE::OnLeftDblClickMarkersList ), NULL, this );
190  m_buttondelmarkers->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ERC_BASE::OnEraseDrcMarkersClick ), NULL, this );
191  m_ResetOptButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ERC_BASE::OnResetMatrixClick ), NULL, this );
192  m_sdbSizer1Cancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ERC_BASE::OnButtonCloseClick ), NULL, this );
193  m_sdbSizer1OK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ERC_BASE::OnErcCmpClick ), NULL, this );
194 }
195 
197 {
198  // Disconnect Events
199  this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_ERC_BASE::OnCloseErcDialog ) );
200  m_NoteBook->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_ERC_BASE::OnUpdateUI ), NULL, this );
201  m_MarkersList->Disconnect( wxEVT_COMMAND_HTML_LINK_CLICKED, wxHtmlLinkEventHandler( DIALOG_ERC_BASE::OnLeftClickMarkersList ), NULL, this );
202  m_MarkersList->Disconnect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( DIALOG_ERC_BASE::OnLeftDblClickMarkersList ), NULL, this );
203  m_buttondelmarkers->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ERC_BASE::OnEraseDrcMarkersClick ), NULL, this );
204  m_ResetOptButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ERC_BASE::OnResetMatrixClick ), NULL, this );
205  m_sdbSizer1Cancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ERC_BASE::OnButtonCloseClick ), NULL, this );
206  m_sdbSizer1OK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ERC_BASE::OnErcCmpClick ), NULL, this );
207 
208 }
wxButton * m_ResetOptButton
#define ID_ERASE_DRC_MARKERS
wxTextCtrl * m_MessagesList
wxStaticText * m_LastErrCountText
wxButton * m_buttondelmarkers
virtual void OnErcCmpClick(wxCommandEvent &event)
wxCheckBox * m_cbCheckBusEntries
wxTextCtrl * m_TotalErrCount
virtual void OnResetMatrixClick(wxCommandEvent &event)
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
Definition: dialog_shim.h:84
virtual void OnEraseDrcMarkersClick(wxCommandEvent &event)
wxButton * m_sdbSizer1Cancel
ERC_HTML_LISTFRAME * m_MarkersList
wxStaticText * m_ErcTotalErrorsText
#define NULL
wxCheckBox * m_cbCheckBusDriverConflicts
virtual void OnCloseErcDialog(wxCloseEvent &event)
wxButton * m_sdbSizer1OK
wxStdDialogButtonSizer * m_sdbSizer1
wxPanel * m_matrixPanel
virtual void OnLeftDblClickMarkersList(wxMouseEvent &event)
wxBoxSizer * m_buttonsSizer
wxStaticText * m_textMarkers
wxCheckBox * m_cbCheckBusToBusConflicts
wxNotebook * m_NoteBook
wxStaticText * m_WarnErcErrorsText
virtual void OnButtonCloseClick(wxCommandEvent &event)
wxTextCtrl * m_LastWarningCount
wxCheckBox * m_cbTestUniqueGlbLabels
DIALOG_ERC_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Electrical Rules Checker"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
wxStaticText * m_titleMessages
#define _(s)
Definition: 3d_actions.cpp:31
virtual void OnUpdateUI(wxUpdateUIEvent &event)
#define ID_RESET_MATRIX
wxCheckBox * m_WriteResultOpt
ERC_HTML_LISTFRAME is used to display a DRC_ITEM_LIST.
wxStaticLine * m_staticline1
wxTextCtrl * m_LastErrCount
virtual void OnLeftClickMarkersList(wxHtmlLinkEvent &event)
wxCheckBox * m_cbCheckBusToNetConflicts
wxPanel * m_PanelERC
wxPanel * m_PanelERCOptions
wxCheckBox * m_cbTestSimilarLabels