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  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 
104  bbuttonsSizer->Add( 0, 0, 1, wxEXPAND, 5 );
105 
106  m_sdbSizer1 = new wxStdDialogButtonSizer();
107  m_sdbSizer1OK = new wxButton( m_PanelERC, wxID_OK );
108  m_sdbSizer1->AddButton( m_sdbSizer1OK );
109  m_sdbSizer1Cancel = new wxButton( m_PanelERC, wxID_CANCEL );
110  m_sdbSizer1->AddButton( m_sdbSizer1Cancel );
111  m_sdbSizer1->Realize();
112 
113  bbuttonsSizer->Add( m_sdbSizer1, 0, wxALL|wxEXPAND, 5 );
114 
115 
116  bercSizer->Add( bbuttonsSizer, 0, wxEXPAND|wxLEFT, 5 );
117 
118 
119  m_PanelERC->SetSizer( bercSizer );
120  m_PanelERC->Layout();
121  bercSizer->Fit( m_PanelERC );
122  m_NoteBook->AddPage( m_PanelERC, _("ERC"), true );
123  m_PanelERCOptions = new wxPanel( m_NoteBook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
124  wxBoxSizer* m_panelMatrixSizer;
125  m_panelMatrixSizer = new wxBoxSizer( wxVERTICAL );
126 
127  wxStaticBoxSizer* sbSizer2;
128  sbSizer2 = new wxStaticBoxSizer( new wxStaticBox( m_PanelERCOptions, wxID_ANY, _("Label to Label Connections") ), wxVERTICAL );
129 
130  m_cbTestSimilarLabels = new wxCheckBox( sbSizer2->GetStaticBox(), wxID_ANY, _("Test similar labels"), wxDefaultPosition, wxDefaultSize, 0 );
131  m_cbTestSimilarLabels->SetToolTip( _("Similar labels are labels (inside a sheet) which differs only by upper/lower case") );
132 
133  sbSizer2->Add( m_cbTestSimilarLabels, 0, wxALL, 5 );
134 
135  m_cbTestUniqueGlbLabels = new wxCheckBox( sbSizer2->GetStaticBox(), wxID_ANY, _("Test single instances of global labels"), wxDefaultPosition, wxDefaultSize, 0 );
136  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.") );
137 
138  sbSizer2->Add( m_cbTestUniqueGlbLabels, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
139 
140 
141  m_panelMatrixSizer->Add( sbSizer2, 0, wxALL|wxEXPAND, 5 );
142 
143  wxStaticBoxSizer* sbSizer3;
144  sbSizer3 = new wxStaticBoxSizer( new wxStaticBox( m_PanelERCOptions, wxID_ANY, _("Pin to Pin Connections") ), wxVERTICAL );
145 
146  m_matrixPanel = new wxPanel( sbSizer3->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
147  sbSizer3->Add( m_matrixPanel, 1, wxEXPAND | wxALL, 5 );
148 
149  m_ResetOptButton = new wxButton( sbSizer3->GetStaticBox(), ID_RESET_MATRIX, _("Reset to Defaults"), wxDefaultPosition, wxDefaultSize, 0 );
150  sbSizer3->Add( m_ResetOptButton, 0, wxALL, 5 );
151 
152 
153  m_panelMatrixSizer->Add( sbSizer3, 0, wxALL|wxEXPAND, 5 );
154 
155 
156  m_PanelERCOptions->SetSizer( m_panelMatrixSizer );
157  m_PanelERCOptions->Layout();
158  m_panelMatrixSizer->Fit( m_PanelERCOptions );
159  m_NoteBook->AddPage( m_PanelERCOptions, _("Options"), false );
160 
161  bSizer1->Add( m_NoteBook, 1, wxEXPAND | wxALL, 5 );
162 
163 
164  this->SetSizer( bSizer1 );
165  this->Layout();
166 
167  // Connect Events
168  this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_ERC_BASE::OnCloseErcDialog ) );
169  m_MarkersList->Connect( wxEVT_COMMAND_HTML_LINK_CLICKED, wxHtmlLinkEventHandler( DIALOG_ERC_BASE::OnLeftClickMarkersList ), NULL, this );
170  m_MarkersList->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( DIALOG_ERC_BASE::OnLeftDblClickMarkersList ), NULL, this );
171  m_buttondelmarkers->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ERC_BASE::OnEraseDrcMarkersClick ), NULL, this );
172  m_sdbSizer1Cancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ERC_BASE::OnButtonCloseClick ), NULL, this );
173  m_sdbSizer1OK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ERC_BASE::OnErcCmpClick ), NULL, this );
174  m_ResetOptButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ERC_BASE::OnResetMatrixClick ), NULL, this );
175 }
176 
178 {
179  // Disconnect Events
180  this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_ERC_BASE::OnCloseErcDialog ) );
181  m_MarkersList->Disconnect( wxEVT_COMMAND_HTML_LINK_CLICKED, wxHtmlLinkEventHandler( DIALOG_ERC_BASE::OnLeftClickMarkersList ), NULL, this );
182  m_MarkersList->Disconnect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( DIALOG_ERC_BASE::OnLeftDblClickMarkersList ), NULL, this );
183  m_buttondelmarkers->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ERC_BASE::OnEraseDrcMarkersClick ), NULL, this );
184  m_sdbSizer1Cancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ERC_BASE::OnButtonCloseClick ), NULL, this );
185  m_sdbSizer1OK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ERC_BASE::OnErcCmpClick ), NULL, this );
186  m_ResetOptButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ERC_BASE::OnResetMatrixClick ), NULL, this );
187 
188 }
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:82
virtual void OnEraseDrcMarkersClick(wxCommandEvent &event)
wxButton * m_sdbSizer1Cancel
ERC_HTML_LISTFRAME * m_MarkersList
wxStaticText * m_ErcTotalErrorsText
DIALOG_ERC_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Electrical Rules Checker"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(483, 420), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
virtual void OnCloseErcDialog(wxCloseEvent &event)
wxButton * m_sdbSizer1OK
wxStdDialogButtonSizer * m_sdbSizer1
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
wxStaticText * m_titleMessages
#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