KiCad PCB EDA Suite
dialog_erc_base.cpp
Go to the documentation of this file.
1 // C++ code generated with wxFormBuilder (version Apr 19 2018)
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( 11, 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( 11, 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|wxSUNKEN_BORDER );
95  bercSizer->Add( m_MarkersList, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 8 );
96 
97  wxBoxSizer* bbuttonsSizer;
98  bbuttonsSizer = new wxBoxSizer( wxHORIZONTAL );
99 
100  m_buttondelmarkers = new wxButton( m_PanelERC, ID_ERASE_DRC_MARKERS, _("Delete Markers"), wxDefaultPosition, wxDefaultSize, 0 );
101  bbuttonsSizer->Add( m_buttondelmarkers, 0, wxALL|wxEXPAND, 5 );
102 
103  m_buttonERC = new wxButton( m_PanelERC, ID_ERC_CMP, _("Run"), wxDefaultPosition, wxDefaultSize, 0 );
104  m_buttonERC->SetDefault();
105  bbuttonsSizer->Add( m_buttonERC, 0, wxALL|wxEXPAND, 5 );
106 
107  m_buttonClose = new wxButton( m_PanelERC, wxID_CANCEL, _("Close"), wxDefaultPosition, wxDefaultSize, 0 );
108  bbuttonsSizer->Add( m_buttonClose, 0, wxALL|wxEXPAND, 5 );
109 
110 
111  bercSizer->Add( bbuttonsSizer, 0, wxALIGN_RIGHT|wxRIGHT|wxLEFT, 5 );
112 
113 
114  m_PanelERC->SetSizer( bercSizer );
115  m_PanelERC->Layout();
116  bercSizer->Fit( m_PanelERC );
117  m_NoteBook->AddPage( m_PanelERC, _("ERC"), true );
118  m_PanelERCOptions = new wxPanel( m_NoteBook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
119  wxBoxSizer* m_panelMatrixSizer;
120  m_panelMatrixSizer = new wxBoxSizer( wxVERTICAL );
121 
122  wxStaticBoxSizer* sbSizer2;
123  sbSizer2 = new wxStaticBoxSizer( new wxStaticBox( m_PanelERCOptions, wxID_ANY, _("Label to Label Connections:") ), wxVERTICAL );
124 
125  m_cbTestSimilarLabels = new wxCheckBox( sbSizer2->GetStaticBox(), wxID_ANY, _("Test similar labels"), wxDefaultPosition, wxDefaultSize, 0 );
126  m_cbTestSimilarLabels->SetToolTip( _("Similar labels are labels (inside a sheet) which differs only by upper/lower case") );
127 
128  sbSizer2->Add( m_cbTestSimilarLabels, 0, wxALL, 5 );
129 
130  m_cbTestUniqueGlbLabels = new wxCheckBox( sbSizer2->GetStaticBox(), wxID_ANY, _("Test single instances of global labels"), wxDefaultPosition, wxDefaultSize, 0 );
131  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.") );
132 
133  sbSizer2->Add( m_cbTestUniqueGlbLabels, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
134 
135 
136  m_panelMatrixSizer->Add( sbSizer2, 0, wxALL|wxEXPAND, 5 );
137 
138  wxStaticBoxSizer* sbSizer3;
139  sbSizer3 = new wxStaticBoxSizer( new wxStaticBox( m_PanelERCOptions, wxID_ANY, _("Pin to Pin Connections:") ), wxVERTICAL );
140 
141  m_matrixPanel = new wxPanel( sbSizer3->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
142  sbSizer3->Add( m_matrixPanel, 1, wxEXPAND | wxALL, 5 );
143 
144  m_ResetOptButton = new wxButton( sbSizer3->GetStaticBox(), ID_RESET_MATRIX, _("Initialize to Default"), wxDefaultPosition, wxDefaultSize, 0 );
145  sbSizer3->Add( m_ResetOptButton, 0, wxALIGN_RIGHT|wxTOP|wxRIGHT|wxLEFT, 5 );
146 
147 
148  m_panelMatrixSizer->Add( sbSizer3, 0, wxALL|wxEXPAND, 5 );
149 
150 
151  m_PanelERCOptions->SetSizer( m_panelMatrixSizer );
152  m_PanelERCOptions->Layout();
153  m_panelMatrixSizer->Fit( m_PanelERCOptions );
154  m_NoteBook->AddPage( m_PanelERCOptions, _("Options"), false );
155 
156  bSizer1->Add( m_NoteBook, 1, wxEXPAND | wxALL, 5 );
157 
158 
159  this->SetSizer( bSizer1 );
160  this->Layout();
161  bSizer1->Fit( this );
162 
163  // Connect Events
164  this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_ERC_BASE::OnCloseErcDialog ) );
165  m_MarkersList->Connect( wxEVT_COMMAND_HTML_LINK_CLICKED, wxHtmlLinkEventHandler( DIALOG_ERC_BASE::OnLeftClickMarkersList ), NULL, this );
166  m_MarkersList->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( DIALOG_ERC_BASE::OnLeftDblClickMarkersList ), NULL, this );
167  m_buttondelmarkers->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ERC_BASE::OnEraseDrcMarkersClick ), NULL, this );
168  m_buttonERC->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ERC_BASE::OnErcCmpClick ), NULL, this );
169  m_buttonClose->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ERC_BASE::OnButtonCloseClick ), NULL, this );
170  m_ResetOptButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ERC_BASE::OnResetMatrixClick ), NULL, this );
171 }
172 
174 {
175  // Disconnect Events
176  this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_ERC_BASE::OnCloseErcDialog ) );
177  m_MarkersList->Disconnect( wxEVT_COMMAND_HTML_LINK_CLICKED, wxHtmlLinkEventHandler( DIALOG_ERC_BASE::OnLeftClickMarkersList ), NULL, this );
178  m_MarkersList->Disconnect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( DIALOG_ERC_BASE::OnLeftDblClickMarkersList ), NULL, this );
179  m_buttondelmarkers->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ERC_BASE::OnEraseDrcMarkersClick ), NULL, this );
180  m_buttonERC->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ERC_BASE::OnErcCmpClick ), NULL, this );
181  m_buttonClose->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ERC_BASE::OnButtonCloseClick ), NULL, this );
182  m_ResetOptButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ERC_BASE::OnResetMatrixClick ), NULL, this );
183 
184 }
wxButton * m_ResetOptButton
#define ID_ERASE_DRC_MARKERS
wxTextCtrl * m_MessagesList
wxStaticText * m_LastErrCountText
wxButton * m_buttondelmarkers
virtual void OnErcCmpClick(wxCommandEvent &event)
wxTextCtrl * m_TotalErrCount
virtual void OnResetMatrixClick(wxCommandEvent &event)
Class DIALOG_SHIM may sit in the inheritance tree between wxDialog and any class written by wxFormBui...
Definition: dialog_shim.h:70
virtual void OnEraseDrcMarkersClick(wxCommandEvent &event)
ERC_HTML_LISTFRAME * m_MarkersList
wxStaticText * m_ErcTotalErrorsText
wxButton * m_buttonClose
virtual void OnCloseErcDialog(wxCloseEvent &event)
wxButton * m_buttonERC
wxPanel * m_matrixPanel
virtual void OnLeftDblClickMarkersList(wxMouseEvent &event)
wxStaticText * m_textMarkers
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 ID_ERC_CMP
#define ID_RESET_MATRIX
wxCheckBox * m_WriteResultOpt
Class ERC_HTML_LISTFRAME is used to display a DRC_ITEM_LIST.
wxStaticLine * m_staticline1
wxTextCtrl * m_LastErrCount
virtual void OnLeftClickMarkersList(wxHtmlLinkEvent &event)
wxPanel * m_PanelERC
wxPanel * m_PanelERCOptions
wxCheckBox * m_cbTestSimilarLabels