KiCad PCB EDA Suite
dialog_erc_base.cpp
Go to the documentation of this file.
1 // C++ code generated with wxFormBuilder (version May 21 2016)
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, 0, 0 );
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, 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, wxTOP|wxBOTTOM|wxRIGHT, 5 );
64 
65 
66  bupperSizer->Add( sdiagSizer, 0, wxEXPAND|wxTOP, 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  bSizerMessages->Add( m_titleMessages, 0, wxRIGHT|wxLEFT, 5 );
74 
75  m_MessagesList = new wxTextCtrl( m_PanelERC, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY );
76  bSizerMessages->Add( m_MessagesList, 1, wxEXPAND|wxLEFT, 5 );
77 
78 
79  bupperSizer->Add( bSizerMessages, 1, wxEXPAND, 5 );
80 
81 
82  bercSizer->Add( bupperSizer, 0, wxALL|wxEXPAND, 5 );
83 
84  m_textMarkers = new wxStaticText( m_PanelERC, wxID_ANY, _("Error list:"), wxDefaultPosition, wxDefaultSize, 0 );
85  m_textMarkers->Wrap( -1 );
86  bercSizer->Add( m_textMarkers, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
87 
88  m_MarkersList = new ERC_HTML_LISTFRAME( m_PanelERC, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHW_SCROLLBAR_AUTO|wxSUNKEN_BORDER );
89  bercSizer->Add( m_MarkersList, 1, wxEXPAND|wxALL, 5 );
90 
91  wxBoxSizer* bbuttonsSizer;
92  bbuttonsSizer = new wxBoxSizer( wxHORIZONTAL );
93 
94  m_buttondelmarkers = new wxButton( m_PanelERC, ID_ERASE_DRC_MARKERS, _("Delete Markers"), wxDefaultPosition, wxDefaultSize, 0 );
95  bbuttonsSizer->Add( m_buttondelmarkers, 0, wxALL|wxEXPAND, 5 );
96 
97  m_buttonERC = new wxButton( m_PanelERC, ID_ERC_CMP, _("Run"), wxDefaultPosition, wxDefaultSize, 0 );
98  m_buttonERC->SetDefault();
99  bbuttonsSizer->Add( m_buttonERC, 0, wxALL|wxEXPAND, 5 );
100 
101  m_buttonClose = new wxButton( m_PanelERC, wxID_CANCEL, _("Close"), wxDefaultPosition, wxDefaultSize, 0 );
102  bbuttonsSizer->Add( m_buttonClose, 0, wxALL|wxEXPAND, 5 );
103 
104 
105  bercSizer->Add( bbuttonsSizer, 0, wxALIGN_RIGHT, 5 );
106 
107 
108  m_PanelERC->SetSizer( bercSizer );
109  m_PanelERC->Layout();
110  bercSizer->Fit( m_PanelERC );
111  m_NoteBook->AddPage( m_PanelERC, _("ERC"), true );
112  m_PanelERCOptions = new wxPanel( m_NoteBook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
113  wxBoxSizer* m_panelMatrixSizer;
114  m_panelMatrixSizer = new wxBoxSizer( wxVERTICAL );
115 
116  m_ResetOptButton = new wxButton( m_PanelERCOptions, ID_RESET_MATRIX, _("Initialize to Default"), wxDefaultPosition, wxDefaultSize, 0 );
117  m_panelMatrixSizer->Add( m_ResetOptButton, 0, wxALIGN_RIGHT|wxTOP|wxRIGHT|wxLEFT, 5 );
118 
119  m_staticText8 = new wxStaticText( m_PanelERCOptions, wxID_ANY, _("Pin to pin connections"), wxDefaultPosition, wxDefaultSize, wxALIGN_CENTRE );
120  m_staticText8->Wrap( -1 );
121  m_panelMatrixSizer->Add( m_staticText8, 0, wxRIGHT|wxLEFT|wxEXPAND, 5 );
122 
123  m_matrixPanel = new wxPanel( m_PanelERCOptions, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
124  m_panelMatrixSizer->Add( m_matrixPanel, 1, wxEXPAND | wxALL, 5 );
125 
126  m_staticline2 = new wxStaticLine( m_PanelERCOptions, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
127  m_panelMatrixSizer->Add( m_staticline2, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
128 
129  m_staticText9 = new wxStaticText( m_PanelERCOptions, wxID_ANY, _("Label to label connections"), wxDefaultPosition, wxDefaultSize, wxALIGN_CENTRE );
130  m_staticText9->Wrap( -1 );
131  m_panelMatrixSizer->Add( m_staticText9, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
132 
133  m_cbTestSimilarLabels = new wxCheckBox( m_PanelERCOptions, wxID_ANY, _("Test similar labels"), wxDefaultPosition, wxDefaultSize, 0 );
134  m_cbTestSimilarLabels->SetToolTip( _("Similar labels are labels (inside a sheet) which differs only by upper/lower case") );
135 
136  m_panelMatrixSizer->Add( m_cbTestSimilarLabels, 0, wxALL, 5 );
137 
138  m_cbTestUniqueGlbLabels = new wxCheckBox( m_PanelERCOptions, wxID_ANY, _("Test unique global labels"), wxDefaultPosition, wxDefaultSize, 0 );
139  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.") );
140 
141  m_panelMatrixSizer->Add( m_cbTestUniqueGlbLabels, 0, wxALL, 5 );
142 
143 
144  m_PanelERCOptions->SetSizer( m_panelMatrixSizer );
145  m_PanelERCOptions->Layout();
146  m_panelMatrixSizer->Fit( m_PanelERCOptions );
147  m_NoteBook->AddPage( m_PanelERCOptions, _("Options"), false );
148 
149  bSizer1->Add( m_NoteBook, 1, wxEXPAND | wxALL, 5 );
150 
151 
152  this->SetSizer( bSizer1 );
153  this->Layout();
154 
155  // Connect Events
156  this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_ERC_BASE::OnCloseErcDialog ) );
157  m_MarkersList->Connect( wxEVT_COMMAND_HTML_LINK_CLICKED, wxHtmlLinkEventHandler( DIALOG_ERC_BASE::OnLeftClickMarkersList ), NULL, this );
158  m_MarkersList->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( DIALOG_ERC_BASE::OnLeftDblClickMarkersList ), NULL, this );
159  m_buttondelmarkers->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ERC_BASE::OnEraseDrcMarkersClick ), NULL, this );
160  m_buttonERC->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ERC_BASE::OnErcCmpClick ), NULL, this );
161  m_buttonClose->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ERC_BASE::OnButtonCloseClick ), NULL, this );
162  m_ResetOptButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ERC_BASE::OnResetMatrixClick ), NULL, this );
163 }
164 
166 {
167  // Disconnect Events
168  this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_ERC_BASE::OnCloseErcDialog ) );
169  m_MarkersList->Disconnect( wxEVT_COMMAND_HTML_LINK_CLICKED, wxHtmlLinkEventHandler( DIALOG_ERC_BASE::OnLeftClickMarkersList ), NULL, this );
170  m_MarkersList->Disconnect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( DIALOG_ERC_BASE::OnLeftDblClickMarkersList ), NULL, this );
171  m_buttondelmarkers->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ERC_BASE::OnEraseDrcMarkersClick ), NULL, this );
172  m_buttonERC->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ERC_BASE::OnErcCmpClick ), NULL, this );
173  m_buttonClose->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ERC_BASE::OnButtonCloseClick ), NULL, this );
174  m_ResetOptButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ERC_BASE::OnResetMatrixClick ), NULL, this );
175 
176 }
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:60
virtual void OnEraseDrcMarkersClick(wxCommandEvent &event)
wxStaticLine * m_staticline2
ERC_HTML_LISTFRAME * m_MarkersList
wxStaticText * m_ErcTotalErrorsText
wxButton * m_buttonClose
DIALOG_ERC_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Electrical Rules Checker"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(519, 464), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
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
wxStaticText * m_staticText9
wxCheckBox * m_cbTestUniqueGlbLabels
wxStaticText * m_titleMessages
wxStaticText * m_staticText8
#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