2013-05-26 04:36:44 +00:00
|
|
|
///////////////////////////////////////////////////////////////////////////
|
2020-08-26 01:17:40 +00:00
|
|
|
// C++ code generated with wxFormBuilder (version Oct 26 2018)
|
2013-05-26 04:36:44 +00:00
|
|
|
// http://www.wxformbuilder.org/
|
|
|
|
//
|
2018-04-06 13:46:16 +00:00
|
|
|
// PLEASE DO *NOT* EDIT THIS FILE!
|
2013-05-26 04:36:44 +00:00
|
|
|
///////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2020-08-26 01:17:40 +00:00
|
|
|
#include "widgets/infobar.h"
|
|
|
|
|
2013-05-26 04:36:44 +00:00
|
|
|
#include "dialog_erc_base.h"
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
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 )
|
|
|
|
{
|
|
|
|
this->SetSizeHints( wxDefaultSize, wxDefaultSize );
|
2020-03-10 18:46:57 +00:00
|
|
|
|
2013-05-26 04:36:44 +00:00
|
|
|
wxBoxSizer* bSizer1;
|
|
|
|
bSizer1 = new wxBoxSizer( wxVERTICAL );
|
2020-03-10 18:46:57 +00:00
|
|
|
|
2020-08-26 01:17:40 +00:00
|
|
|
m_infoBar = new WX_INFOBAR( this );
|
|
|
|
m_infoBar->SetShowHideEffects( wxSHOW_EFFECT_NONE, wxSHOW_EFFECT_NONE );
|
|
|
|
m_infoBar->SetEffectDuration( 500 );
|
|
|
|
bSizer1->Add( m_infoBar, 0, wxEXPAND, 5 );
|
|
|
|
|
2013-05-26 04:36:44 +00:00
|
|
|
wxBoxSizer* bercSizer;
|
|
|
|
bercSizer = new wxBoxSizer( wxVERTICAL );
|
2020-03-10 18:46:57 +00:00
|
|
|
|
2013-05-26 04:36:44 +00:00
|
|
|
wxBoxSizer* bupperSizer;
|
|
|
|
bupperSizer = new wxBoxSizer( wxHORIZONTAL );
|
2020-03-10 18:46:57 +00:00
|
|
|
|
2020-03-16 11:05:01 +00:00
|
|
|
wxBoxSizer* bSizerMessages;
|
|
|
|
bSizerMessages = new wxBoxSizer( wxVERTICAL );
|
2020-03-10 18:46:57 +00:00
|
|
|
|
2020-03-16 11:05:01 +00:00
|
|
|
m_titleMessages = new wxStaticText( this, wxID_ANY, _("Messages:"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
m_titleMessages->Wrap( -1 );
|
|
|
|
m_titleMessages->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
|
2020-03-10 18:46:57 +00:00
|
|
|
|
2020-03-16 11:05:01 +00:00
|
|
|
bSizerMessages->Add( m_titleMessages, 0, wxRIGHT|wxLEFT, 10 );
|
2020-03-10 18:46:57 +00:00
|
|
|
|
2020-03-16 11:05:01 +00:00
|
|
|
m_MessagesList = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY );
|
|
|
|
m_MessagesList->SetMinSize( wxSize( 180,110 ) );
|
2020-03-10 18:46:57 +00:00
|
|
|
|
2020-03-16 11:05:01 +00:00
|
|
|
bSizerMessages->Add( m_MessagesList, 1, wxEXPAND|wxLEFT, 5 );
|
2020-03-10 18:46:57 +00:00
|
|
|
|
|
|
|
|
2020-03-16 11:05:01 +00:00
|
|
|
bupperSizer->Add( bSizerMessages, 1, wxEXPAND|wxBOTTOM, 5 );
|
2020-03-10 18:46:57 +00:00
|
|
|
|
|
|
|
|
2020-03-16 11:05:01 +00:00
|
|
|
bercSizer->Add( bupperSizer, 1, wxEXPAND|wxTOP|wxRIGHT, 5 );
|
2020-03-10 18:46:57 +00:00
|
|
|
|
2020-03-16 11:05:01 +00:00
|
|
|
m_textMarkers = new wxStaticText( this, wxID_ANY, _("Violations:"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
m_textMarkers->Wrap( -1 );
|
|
|
|
m_textMarkers->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
|
2020-03-10 18:46:57 +00:00
|
|
|
|
2020-03-16 11:05:01 +00:00
|
|
|
bercSizer->Add( m_textMarkers, 0, wxTOP|wxRIGHT|wxLEFT, 10 );
|
2020-03-10 18:46:57 +00:00
|
|
|
|
2020-03-16 11:05:01 +00:00
|
|
|
m_markerDataView = new wxDataViewCtrl( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxDV_NO_HEADER );
|
|
|
|
m_markerDataView->SetToolTip( _("Click on items to highlight them on the board.") );
|
|
|
|
m_markerDataView->SetMinSize( wxSize( -1,200 ) );
|
2020-03-10 18:46:57 +00:00
|
|
|
|
2020-03-16 11:05:01 +00:00
|
|
|
bercSizer->Add( m_markerDataView, 2, wxEXPAND|wxRIGHT|wxLEFT, 5 );
|
2020-03-10 18:46:57 +00:00
|
|
|
|
2020-03-16 11:05:01 +00:00
|
|
|
wxBoxSizer* bSeveritySizer;
|
|
|
|
bSeveritySizer = new wxBoxSizer( wxHORIZONTAL );
|
2020-03-10 18:46:57 +00:00
|
|
|
|
2020-03-16 11:05:01 +00:00
|
|
|
m_showLabel = new wxStaticText( this, wxID_ANY, _("Show:"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
m_showLabel->Wrap( -1 );
|
|
|
|
bSeveritySizer->Add( m_showLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
|
2020-03-10 18:46:57 +00:00
|
|
|
|
2020-03-16 11:05:01 +00:00
|
|
|
m_showAll = new wxCheckBox( this, wxID_ANY, _("All"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
bSeveritySizer->Add( m_showAll, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
|
2020-03-10 18:46:57 +00:00
|
|
|
|
|
|
|
|
2020-03-16 11:05:01 +00:00
|
|
|
bSeveritySizer->Add( 35, 0, 0, wxEXPAND, 5 );
|
2020-03-10 18:46:57 +00:00
|
|
|
|
2020-03-16 11:05:01 +00:00
|
|
|
m_showErrors = new wxCheckBox( this, wxID_ANY, _("Errors"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
bSeveritySizer->Add( m_showErrors, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
|
2020-03-10 18:46:57 +00:00
|
|
|
|
2020-03-16 11:05:01 +00:00
|
|
|
m_errorsBadge = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
m_errorsBadge->SetMinSize( wxSize( 20,20 ) );
|
2020-03-10 18:46:57 +00:00
|
|
|
|
2020-03-16 11:05:01 +00:00
|
|
|
bSeveritySizer->Add( m_errorsBadge, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 25 );
|
2020-03-10 18:46:57 +00:00
|
|
|
|
2020-03-16 11:05:01 +00:00
|
|
|
m_showWarnings = new wxCheckBox( this, wxID_ANY, _("Warnings"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
bSeveritySizer->Add( m_showWarnings, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
|
|
|
|
|
|
|
|
m_warningsBadge = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
m_warningsBadge->SetMinSize( wxSize( 20,20 ) );
|
|
|
|
|
|
|
|
bSeveritySizer->Add( m_warningsBadge, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 25 );
|
|
|
|
|
|
|
|
m_showExclusions = new wxCheckBox( this, wxID_ANY, _("Exclusions"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
bSeveritySizer->Add( m_showExclusions, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
|
|
|
|
|
|
|
|
m_exclusionsBadge = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
bSeveritySizer->Add( m_exclusionsBadge, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 25 );
|
|
|
|
|
|
|
|
|
|
|
|
bSeveritySizer->Add( 0, 0, 1, wxEXPAND, 5 );
|
|
|
|
|
|
|
|
m_saveReport = new wxButton( this, wxID_ANY, _("Save..."), wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
bSeveritySizer->Add( m_saveReport, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
|
2020-03-10 18:46:57 +00:00
|
|
|
|
|
|
|
|
2020-03-16 11:05:01 +00:00
|
|
|
bercSizer->Add( bSeveritySizer, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
|
2020-03-10 18:46:57 +00:00
|
|
|
|
|
|
|
|
2020-03-16 11:05:01 +00:00
|
|
|
bSizer1->Add( bercSizer, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 8 );
|
2020-03-10 18:46:57 +00:00
|
|
|
|
2020-03-16 11:05:01 +00:00
|
|
|
m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
|
|
|
|
bSizer1->Add( m_staticline1, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
|
2020-03-10 18:46:57 +00:00
|
|
|
|
2019-08-07 19:01:50 +00:00
|
|
|
m_buttonsSizer = new wxBoxSizer( wxHORIZONTAL );
|
2020-03-10 18:46:57 +00:00
|
|
|
|
2019-02-10 03:16:36 +00:00
|
|
|
m_buttondelmarkers = new wxButton( this, ID_ERASE_DRC_MARKERS, _("Delete Markers"), wxDefaultPosition, wxDefaultSize, 0 );
|
2020-04-08 08:03:51 +00:00
|
|
|
m_buttonsSizer->Add( m_buttondelmarkers, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 8 );
|
2020-03-10 18:46:57 +00:00
|
|
|
|
|
|
|
|
2019-08-07 19:01:50 +00:00
|
|
|
m_buttonsSizer->Add( 0, 0, 1, wxEXPAND, 5 );
|
2020-03-10 18:46:57 +00:00
|
|
|
|
2019-02-10 03:16:36 +00:00
|
|
|
m_sdbSizer1 = new wxStdDialogButtonSizer();
|
|
|
|
m_sdbSizer1OK = new wxButton( this, wxID_OK );
|
|
|
|
m_sdbSizer1->AddButton( m_sdbSizer1OK );
|
|
|
|
m_sdbSizer1Cancel = new wxButton( this, wxID_CANCEL );
|
|
|
|
m_sdbSizer1->AddButton( m_sdbSizer1Cancel );
|
|
|
|
m_sdbSizer1->Realize();
|
2020-03-10 18:46:57 +00:00
|
|
|
|
2020-04-08 08:03:51 +00:00
|
|
|
m_buttonsSizer->Add( m_sdbSizer1, 0, wxEXPAND|wxALL, 5 );
|
2020-03-10 18:46:57 +00:00
|
|
|
|
|
|
|
|
2020-03-16 11:05:01 +00:00
|
|
|
bSizer1->Add( m_buttonsSizer, 0, wxEXPAND|wxLEFT, 5 );
|
2020-03-10 18:46:57 +00:00
|
|
|
|
|
|
|
|
2013-05-26 04:36:44 +00:00
|
|
|
this->SetSizer( bSizer1 );
|
|
|
|
this->Layout();
|
2019-08-07 19:01:50 +00:00
|
|
|
bSizer1->Fit( this );
|
2020-03-10 18:46:57 +00:00
|
|
|
|
2015-09-10 12:03:16 +00:00
|
|
|
// Connect Events
|
2018-08-06 20:30:49 +00:00
|
|
|
this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_ERC_BASE::OnCloseErcDialog ) );
|
2020-03-16 11:05:01 +00:00
|
|
|
m_markerDataView->Connect( wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED, wxDataViewEventHandler( DIALOG_ERC_BASE::OnERCItemDClick ), NULL, this );
|
|
|
|
m_markerDataView->Connect( wxEVT_COMMAND_DATAVIEW_ITEM_CONTEXT_MENU, wxDataViewEventHandler( DIALOG_ERC_BASE::OnERCItemRClick ), NULL, this );
|
|
|
|
m_markerDataView->Connect( wxEVT_COMMAND_DATAVIEW_SELECTION_CHANGED, wxDataViewEventHandler( DIALOG_ERC_BASE::OnERCItemSelected ), NULL, this );
|
|
|
|
m_showAll->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_ERC_BASE::OnSeverity ), NULL, this );
|
|
|
|
m_showErrors->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_ERC_BASE::OnSeverity ), NULL, this );
|
|
|
|
m_showWarnings->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_ERC_BASE::OnSeverity ), NULL, this );
|
|
|
|
m_showExclusions->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_ERC_BASE::OnSeverity ), NULL, this );
|
|
|
|
m_saveReport->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ERC_BASE::OnSaveReport ), NULL, this );
|
2015-09-10 12:03:16 +00:00
|
|
|
m_buttondelmarkers->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ERC_BASE::OnEraseDrcMarkersClick ), NULL, this );
|
2018-08-06 20:30:49 +00:00
|
|
|
m_sdbSizer1Cancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ERC_BASE::OnButtonCloseClick ), NULL, this );
|
2020-03-16 11:05:01 +00:00
|
|
|
m_sdbSizer1OK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ERC_BASE::OnRunERCClick ), NULL, this );
|
2013-05-26 04:36:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
DIALOG_ERC_BASE::~DIALOG_ERC_BASE()
|
|
|
|
{
|
2015-09-10 12:03:16 +00:00
|
|
|
// Disconnect Events
|
2018-08-06 20:30:49 +00:00
|
|
|
this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_ERC_BASE::OnCloseErcDialog ) );
|
2020-03-16 11:05:01 +00:00
|
|
|
m_markerDataView->Disconnect( wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED, wxDataViewEventHandler( DIALOG_ERC_BASE::OnERCItemDClick ), NULL, this );
|
|
|
|
m_markerDataView->Disconnect( wxEVT_COMMAND_DATAVIEW_ITEM_CONTEXT_MENU, wxDataViewEventHandler( DIALOG_ERC_BASE::OnERCItemRClick ), NULL, this );
|
|
|
|
m_markerDataView->Disconnect( wxEVT_COMMAND_DATAVIEW_SELECTION_CHANGED, wxDataViewEventHandler( DIALOG_ERC_BASE::OnERCItemSelected ), NULL, this );
|
|
|
|
m_showAll->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_ERC_BASE::OnSeverity ), NULL, this );
|
|
|
|
m_showErrors->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_ERC_BASE::OnSeverity ), NULL, this );
|
|
|
|
m_showWarnings->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_ERC_BASE::OnSeverity ), NULL, this );
|
|
|
|
m_showExclusions->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_ERC_BASE::OnSeverity ), NULL, this );
|
|
|
|
m_saveReport->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ERC_BASE::OnSaveReport ), NULL, this );
|
2015-09-10 12:03:16 +00:00
|
|
|
m_buttondelmarkers->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ERC_BASE::OnEraseDrcMarkersClick ), NULL, this );
|
2018-08-06 20:30:49 +00:00
|
|
|
m_sdbSizer1Cancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ERC_BASE::OnButtonCloseClick ), NULL, this );
|
2020-03-16 11:05:01 +00:00
|
|
|
m_sdbSizer1OK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ERC_BASE::OnRunERCClick ), NULL, this );
|
2020-03-10 18:46:57 +00:00
|
|
|
|
2013-05-26 04:36:44 +00:00
|
|
|
}
|