KiCad PCB EDA Suite
dialog_erc_base.cpp
Go to the documentation of this file.
1 // C++ code generated with wxFormBuilder (version Oct 26 2018)
3 // http://www.wxformbuilder.org/
4 //
5 // PLEASE DO *NOT* EDIT THIS FILE!
7 
8 #include "dialog_erc_base.h"
9 
11 
12 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 )
13 {
14  this->SetSizeHints( wxDefaultSize, wxDefaultSize );
15 
16  wxBoxSizer* bSizer1;
17  bSizer1 = new wxBoxSizer( wxVERTICAL );
18 
19  wxBoxSizer* bercSizer;
20  bercSizer = new wxBoxSizer( wxVERTICAL );
21 
22  wxBoxSizer* bupperSizer;
23  bupperSizer = new wxBoxSizer( wxHORIZONTAL );
24 
25  wxBoxSizer* bSizerMessages;
26  bSizerMessages = new wxBoxSizer( wxVERTICAL );
27 
28  m_titleMessages = new wxStaticText( this, wxID_ANY, _("Messages:"), wxDefaultPosition, wxDefaultSize, 0 );
29  m_titleMessages->Wrap( -1 );
30  m_titleMessages->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
31 
32  bSizerMessages->Add( m_titleMessages, 0, wxRIGHT|wxLEFT, 10 );
33 
34  m_MessagesList = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY );
35  m_MessagesList->SetMinSize( wxSize( 180,110 ) );
36 
37  bSizerMessages->Add( m_MessagesList, 1, wxEXPAND|wxLEFT, 5 );
38 
39 
40  bupperSizer->Add( bSizerMessages, 1, wxEXPAND|wxBOTTOM, 5 );
41 
42 
43  bercSizer->Add( bupperSizer, 1, wxEXPAND|wxTOP|wxRIGHT, 5 );
44 
45  m_textMarkers = new wxStaticText( this, wxID_ANY, _("Violations:"), wxDefaultPosition, wxDefaultSize, 0 );
46  m_textMarkers->Wrap( -1 );
47  m_textMarkers->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
48 
49  bercSizer->Add( m_textMarkers, 0, wxTOP|wxRIGHT|wxLEFT, 10 );
50 
51  m_markerDataView = new wxDataViewCtrl( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxDV_NO_HEADER );
52  m_markerDataView->SetToolTip( _("Click on items to highlight them on the board.") );
53  m_markerDataView->SetMinSize( wxSize( -1,200 ) );
54 
55  bercSizer->Add( m_markerDataView, 2, wxEXPAND|wxRIGHT|wxLEFT, 5 );
56 
57  wxBoxSizer* bSeveritySizer;
58  bSeveritySizer = new wxBoxSizer( wxHORIZONTAL );
59 
60  m_showLabel = new wxStaticText( this, wxID_ANY, _("Show:"), wxDefaultPosition, wxDefaultSize, 0 );
61  m_showLabel->Wrap( -1 );
62  bSeveritySizer->Add( m_showLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
63 
64  m_showAll = new wxCheckBox( this, wxID_ANY, _("All"), wxDefaultPosition, wxDefaultSize, 0 );
65  bSeveritySizer->Add( m_showAll, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
66 
67 
68  bSeveritySizer->Add( 35, 0, 0, wxEXPAND, 5 );
69 
70  m_showErrors = new wxCheckBox( this, wxID_ANY, _("Errors"), wxDefaultPosition, wxDefaultSize, 0 );
71  bSeveritySizer->Add( m_showErrors, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
72 
73  m_errorsBadge = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
74  m_errorsBadge->SetMinSize( wxSize( 20,20 ) );
75 
76  bSeveritySizer->Add( m_errorsBadge, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 25 );
77 
78  m_showWarnings = new wxCheckBox( this, wxID_ANY, _("Warnings"), wxDefaultPosition, wxDefaultSize, 0 );
79  bSeveritySizer->Add( m_showWarnings, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
80 
81  m_warningsBadge = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
82  m_warningsBadge->SetMinSize( wxSize( 20,20 ) );
83 
84  bSeveritySizer->Add( m_warningsBadge, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 25 );
85 
86  m_showExclusions = new wxCheckBox( this, wxID_ANY, _("Exclusions"), wxDefaultPosition, wxDefaultSize, 0 );
87  bSeveritySizer->Add( m_showExclusions, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
88 
89  m_exclusionsBadge = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
90  bSeveritySizer->Add( m_exclusionsBadge, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 25 );
91 
92 
93  bSeveritySizer->Add( 0, 0, 1, wxEXPAND, 5 );
94 
95  m_saveReport = new wxButton( this, wxID_ANY, _("Save..."), wxDefaultPosition, wxDefaultSize, 0 );
96  bSeveritySizer->Add( m_saveReport, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
97 
98 
99  bercSizer->Add( bSeveritySizer, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
100 
101 
102  bSizer1->Add( bercSizer, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 8 );
103 
104  m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
105  bSizer1->Add( m_staticline1, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
106 
107  m_buttonsSizer = new wxBoxSizer( wxHORIZONTAL );
108 
109  m_buttondelmarkers = new wxButton( this, ID_ERASE_DRC_MARKERS, _("Delete Markers"), wxDefaultPosition, wxDefaultSize, 0 );
110  m_buttonsSizer->Add( m_buttondelmarkers, 0, wxEXPAND|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 8 );
111 
112 
113  m_buttonsSizer->Add( 0, 0, 1, wxEXPAND, 5 );
114 
115  m_sdbSizer1 = new wxStdDialogButtonSizer();
116  m_sdbSizer1OK = new wxButton( this, wxID_OK );
117  m_sdbSizer1->AddButton( m_sdbSizer1OK );
118  m_sdbSizer1Cancel = new wxButton( this, wxID_CANCEL );
119  m_sdbSizer1->AddButton( m_sdbSizer1Cancel );
120  m_sdbSizer1->Realize();
121 
122  m_buttonsSizer->Add( m_sdbSizer1, 0, wxEXPAND|wxTOP|wxBOTTOM|wxLEFT, 5 );
123 
124 
125  bSizer1->Add( m_buttonsSizer, 0, wxEXPAND|wxLEFT, 5 );
126 
127 
128  this->SetSizer( bSizer1 );
129  this->Layout();
130  bSizer1->Fit( this );
131 
132  // Connect Events
133  this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_ERC_BASE::OnCloseErcDialog ) );
134  m_markerDataView->Connect( wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED, wxDataViewEventHandler( DIALOG_ERC_BASE::OnERCItemDClick ), NULL, this );
135  m_markerDataView->Connect( wxEVT_COMMAND_DATAVIEW_ITEM_CONTEXT_MENU, wxDataViewEventHandler( DIALOG_ERC_BASE::OnERCItemRClick ), NULL, this );
136  m_markerDataView->Connect( wxEVT_COMMAND_DATAVIEW_SELECTION_CHANGED, wxDataViewEventHandler( DIALOG_ERC_BASE::OnERCItemSelected ), NULL, this );
137  m_showAll->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_ERC_BASE::OnSeverity ), NULL, this );
138  m_showErrors->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_ERC_BASE::OnSeverity ), NULL, this );
139  m_showWarnings->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_ERC_BASE::OnSeverity ), NULL, this );
140  m_showExclusions->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_ERC_BASE::OnSeverity ), NULL, this );
141  m_saveReport->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ERC_BASE::OnSaveReport ), NULL, this );
142  m_buttondelmarkers->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ERC_BASE::OnEraseDrcMarkersClick ), NULL, this );
143  m_sdbSizer1Cancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ERC_BASE::OnButtonCloseClick ), NULL, this );
144  m_sdbSizer1OK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ERC_BASE::OnRunERCClick ), NULL, this );
145 }
146 
148 {
149  // Disconnect Events
150  this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_ERC_BASE::OnCloseErcDialog ) );
151  m_markerDataView->Disconnect( wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED, wxDataViewEventHandler( DIALOG_ERC_BASE::OnERCItemDClick ), NULL, this );
152  m_markerDataView->Disconnect( wxEVT_COMMAND_DATAVIEW_ITEM_CONTEXT_MENU, wxDataViewEventHandler( DIALOG_ERC_BASE::OnERCItemRClick ), NULL, this );
153  m_markerDataView->Disconnect( wxEVT_COMMAND_DATAVIEW_SELECTION_CHANGED, wxDataViewEventHandler( DIALOG_ERC_BASE::OnERCItemSelected ), NULL, this );
154  m_showAll->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_ERC_BASE::OnSeverity ), NULL, this );
155  m_showErrors->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_ERC_BASE::OnSeverity ), NULL, this );
156  m_showWarnings->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_ERC_BASE::OnSeverity ), NULL, this );
157  m_showExclusions->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_ERC_BASE::OnSeverity ), NULL, this );
158  m_saveReport->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ERC_BASE::OnSaveReport ), NULL, this );
159  m_buttondelmarkers->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ERC_BASE::OnEraseDrcMarkersClick ), NULL, this );
160  m_sdbSizer1Cancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ERC_BASE::OnButtonCloseClick ), NULL, this );
161  m_sdbSizer1OK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ERC_BASE::OnRunERCClick ), NULL, this );
162 
163 }
#define ID_ERASE_DRC_MARKERS
wxTextCtrl * m_MessagesList
wxButton * m_buttondelmarkers
virtual void OnERCItemSelected(wxDataViewEvent &event)
wxCheckBox * m_showExclusions
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
virtual void OnRunERCClick(wxCommandEvent &event)
virtual void OnSaveReport(wxCommandEvent &event)
virtual void OnSeverity(wxCommandEvent &event)
wxCheckBox * m_showAll
#define NULL
virtual void OnCloseErcDialog(wxCloseEvent &event)
wxButton * m_sdbSizer1OK
wxStdDialogButtonSizer * m_sdbSizer1
wxBoxSizer * m_buttonsSizer
wxStaticText * m_textMarkers
wxStaticBitmap * m_warningsBadge
virtual void OnERCItemRClick(wxDataViewEvent &event)
virtual void OnButtonCloseClick(wxCommandEvent &event)
wxButton * m_saveReport
wxStaticBitmap * m_errorsBadge
wxCheckBox * m_showWarnings
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)
wxCheckBox * m_showErrors
wxDataViewCtrl * m_markerDataView
wxStaticText * m_titleMessages
#define _(s)
Definition: 3d_actions.cpp:33
wxStaticBitmap * m_exclusionsBadge
wxStaticText * m_showLabel
wxStaticLine * m_staticline1
virtual void OnERCItemDClick(wxDataViewEvent &event)