2013-05-26 04:36:44 +00:00
|
|
|
///////////////////////////////////////////////////////////////////////////
|
2018-02-28 09:44:22 +00:00
|
|
|
// C++ code generated with wxFormBuilder (version Dec 30 2017)
|
2013-05-26 04:36:44 +00:00
|
|
|
// http://www.wxformbuilder.org/
|
|
|
|
//
|
2018-02-09 18:00:13 +00:00
|
|
|
// PLEASE DO *NOT* EDIT THIS FILE!
|
2013-05-26 04:36:44 +00:00
|
|
|
///////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2015-06-16 12:20:42 +00:00
|
|
|
#include "wx_html_report_panel.h"
|
|
|
|
|
2013-05-26 04:36:44 +00:00
|
|
|
#include "dialog_plot_schematic_base.h"
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
DIALOG_PLOT_SCHEMATIC_BASE::DIALOG_PLOT_SCHEMATIC_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( wxSize( -1,-1 ), wxDefaultSize );
|
|
|
|
|
|
|
|
wxBoxSizer* bMainSizer;
|
|
|
|
bMainSizer = new wxBoxSizer( wxVERTICAL );
|
|
|
|
|
2015-12-21 15:08:37 +00:00
|
|
|
wxBoxSizer* bSizerDir;
|
|
|
|
bSizerDir = new wxBoxSizer( wxHORIZONTAL );
|
2014-10-26 13:59:01 +00:00
|
|
|
|
2017-07-20 09:55:50 +00:00
|
|
|
m_staticTextOutputDirectory = new wxStaticText( this, wxID_ANY, _("Output directory:"), wxDefaultPosition, wxDefaultSize, 0 );
|
2014-10-26 13:59:01 +00:00
|
|
|
m_staticTextOutputDirectory->Wrap( -1 );
|
2015-12-21 15:08:37 +00:00
|
|
|
bSizerDir->Add( m_staticTextOutputDirectory, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
|
2014-10-26 13:59:01 +00:00
|
|
|
|
|
|
|
m_outputDirectoryName = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
2014-11-02 16:25:04 +00:00
|
|
|
m_outputDirectoryName->SetToolTip( _("Target directory for plot files. Can be absolute or relative to the schematic main file location.") );
|
2014-10-26 13:59:01 +00:00
|
|
|
|
2018-02-09 18:00:13 +00:00
|
|
|
bSizerDir->Add( m_outputDirectoryName, 1, wxALIGN_CENTER_VERTICAL|wxLEFT, 4 );
|
2014-10-26 13:59:01 +00:00
|
|
|
|
2018-02-09 18:00:13 +00:00
|
|
|
m_browseButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW );
|
2018-02-28 09:44:22 +00:00
|
|
|
m_browseButton->SetMinSize( wxSize( 30,28 ) );
|
|
|
|
|
2018-02-09 18:00:13 +00:00
|
|
|
bSizerDir->Add( m_browseButton, 0, wxRIGHT, 5 );
|
2014-10-26 13:59:01 +00:00
|
|
|
|
|
|
|
|
2018-02-28 09:44:22 +00:00
|
|
|
bMainSizer->Add( bSizerDir, 0, wxALL|wxEXPAND, 7 );
|
2014-10-26 13:59:01 +00:00
|
|
|
|
2013-05-26 04:36:44 +00:00
|
|
|
m_optionsSizer = new wxBoxSizer( wxHORIZONTAL );
|
|
|
|
|
2015-12-21 15:08:37 +00:00
|
|
|
wxString m_plotFormatOptChoices[] = { _("Postscript"), _("PDF"), _("SVG"), _("DXF"), _("HPGL") };
|
|
|
|
int m_plotFormatOptNChoices = sizeof( m_plotFormatOptChoices ) / sizeof( wxString );
|
2018-02-28 09:44:22 +00:00
|
|
|
m_plotFormatOpt = new wxRadioBox( this, wxID_ANY, _("Output Format"), wxDefaultPosition, wxDefaultSize, m_plotFormatOptNChoices, m_plotFormatOptChoices, 1, wxRA_SPECIFY_COLS );
|
2018-02-09 18:00:13 +00:00
|
|
|
m_plotFormatOpt->SetSelection( 2 );
|
2018-02-28 09:44:22 +00:00
|
|
|
m_optionsSizer->Add( m_plotFormatOpt, 0, wxALIGN_TOP|wxEXPAND|wxLEFT|wxRIGHT, 5 );
|
2013-05-26 04:36:44 +00:00
|
|
|
|
2018-02-28 09:44:22 +00:00
|
|
|
wxStaticBoxSizer* sbOptions;
|
|
|
|
sbOptions = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Options") ), wxVERTICAL );
|
2013-05-26 04:36:44 +00:00
|
|
|
|
2018-02-28 09:44:22 +00:00
|
|
|
wxGridBagSizer* gbSizer1;
|
|
|
|
gbSizer1 = new wxGridBagSizer( 0, 0 );
|
|
|
|
gbSizer1->SetFlexibleDirection( wxBOTH );
|
|
|
|
gbSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
2013-05-26 04:36:44 +00:00
|
|
|
|
2018-02-28 09:44:22 +00:00
|
|
|
m_staticText4 = new wxStaticText( sbOptions->GetStaticBox(), wxID_ANY, _("Page size:"), wxDefaultPosition, wxDefaultSize, 0 );
|
2013-05-26 04:36:44 +00:00
|
|
|
m_staticText4->Wrap( -1 );
|
2018-02-28 09:44:22 +00:00
|
|
|
gbSizer1->Add( m_staticText4, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT, 5 );
|
2013-05-26 04:36:44 +00:00
|
|
|
|
2018-02-28 09:44:22 +00:00
|
|
|
wxString m_paperSizeOptionChoices[] = { _("Schematic size"), _("A4"), _("A") };
|
|
|
|
int m_paperSizeOptionNChoices = sizeof( m_paperSizeOptionChoices ) / sizeof( wxString );
|
|
|
|
m_paperSizeOption = new wxChoice( sbOptions->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_paperSizeOptionNChoices, m_paperSizeOptionChoices, 0 );
|
|
|
|
m_paperSizeOption->SetSelection( 0 );
|
|
|
|
gbSizer1->Add( m_paperSizeOption, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), wxEXPAND|wxRIGHT|wxLEFT, 5 );
|
2013-05-26 04:36:44 +00:00
|
|
|
|
2018-02-28 09:44:22 +00:00
|
|
|
m_PlotFrameRefOpt = new wxCheckBox( sbOptions->GetStaticBox(), wxID_ANY, _("Plot border and title block"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
m_PlotFrameRefOpt->SetValue(true);
|
|
|
|
m_PlotFrameRefOpt->SetToolTip( _("Print the frame references.") );
|
2013-05-26 04:36:44 +00:00
|
|
|
|
2018-02-28 09:44:22 +00:00
|
|
|
gbSizer1->Add( m_PlotFrameRefOpt, wxGBPosition( 1, 0 ), wxGBSpan( 1, 2 ), wxALL, 5 );
|
2013-05-26 04:36:44 +00:00
|
|
|
|
2018-02-28 09:44:22 +00:00
|
|
|
wxStaticText* bOutputModeLabel;
|
|
|
|
bOutputModeLabel = new wxStaticText( sbOptions->GetStaticBox(), wxID_ANY, _("Output mode:"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
bOutputModeLabel->Wrap( -1 );
|
|
|
|
gbSizer1->Add( bOutputModeLabel, wxGBPosition( 2, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
|
2013-05-26 04:36:44 +00:00
|
|
|
|
2018-02-28 09:44:22 +00:00
|
|
|
wxString m_ModeColorOptionChoices[] = { _("Color"), _("Black and White") };
|
|
|
|
int m_ModeColorOptionNChoices = sizeof( m_ModeColorOptionChoices ) / sizeof( wxString );
|
|
|
|
m_ModeColorOption = new wxChoice( sbOptions->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_ModeColorOptionNChoices, m_ModeColorOptionChoices, 0 );
|
|
|
|
m_ModeColorOption->SetSelection( 0 );
|
|
|
|
gbSizer1->Add( m_ModeColorOption, wxGBPosition( 2, 1 ), wxGBSpan( 1, 1 ), wxALL, 5 );
|
2013-05-26 04:36:44 +00:00
|
|
|
|
2018-02-28 09:44:22 +00:00
|
|
|
m_defaultLineWidthTitle = new wxStaticText( sbOptions->GetStaticBox(), wxID_ANY, _("Default line thickness:"), wxDefaultPosition, wxDefaultSize, 0 );
|
2013-05-26 04:36:44 +00:00
|
|
|
m_defaultLineWidthTitle->Wrap( -1 );
|
2018-02-28 09:44:22 +00:00
|
|
|
gbSizer1->Add( m_defaultLineWidthTitle, wxGBPosition( 3, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
|
2013-05-26 04:36:44 +00:00
|
|
|
|
2018-02-28 09:44:22 +00:00
|
|
|
m_DefaultLineSizeCtrl = new wxTextCtrl( sbOptions->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
2013-05-26 04:36:44 +00:00
|
|
|
m_DefaultLineSizeCtrl->SetToolTip( _("Selection of the default pen thickness used to draw items, when their thickness is set to 0.") );
|
|
|
|
|
2018-02-28 09:44:22 +00:00
|
|
|
gbSizer1->Add( m_DefaultLineSizeCtrl, wxGBPosition( 3, 1 ), wxGBSpan( 1, 1 ), wxEXPAND|wxRIGHT|wxLEFT, 5 );
|
2013-05-26 04:36:44 +00:00
|
|
|
|
|
|
|
|
2018-02-28 09:44:22 +00:00
|
|
|
gbSizer1->AddGrowableCol( 1 );
|
2013-05-26 04:36:44 +00:00
|
|
|
|
2018-02-28 09:44:22 +00:00
|
|
|
sbOptions->Add( gbSizer1, 1, wxEXPAND, 5 );
|
|
|
|
|
|
|
|
|
|
|
|
m_optionsSizer->Add( sbOptions, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
|
2013-05-26 04:36:44 +00:00
|
|
|
|
2018-02-28 09:44:22 +00:00
|
|
|
m_HPGLOptionsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("HPGL Options") ), wxVERTICAL );
|
2013-05-26 04:36:44 +00:00
|
|
|
|
2018-02-28 09:44:22 +00:00
|
|
|
wxGridBagSizer* gbSizer2;
|
|
|
|
gbSizer2 = new wxGridBagSizer( 0, 0 );
|
|
|
|
gbSizer2->SetFlexibleDirection( wxBOTH );
|
|
|
|
gbSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
2013-05-26 04:36:44 +00:00
|
|
|
|
2018-02-28 09:44:22 +00:00
|
|
|
wxStaticText* sPositionLabel;
|
|
|
|
sPositionLabel = new wxStaticText( m_HPGLOptionsSizer->GetStaticBox(), wxID_ANY, _("Position:"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
sPositionLabel->Wrap( -1 );
|
|
|
|
gbSizer2->Add( sPositionLabel, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT, 5 );
|
2013-05-26 04:36:44 +00:00
|
|
|
|
2018-02-28 09:44:22 +00:00
|
|
|
wxString m_plotOriginOptChoices[] = { _("Bottom left"), _("Center on page") };
|
|
|
|
int m_plotOriginOptNChoices = sizeof( m_plotOriginOptChoices ) / sizeof( wxString );
|
|
|
|
m_plotOriginOpt = new wxChoice( m_HPGLOptionsSizer->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_plotOriginOptNChoices, m_plotOriginOptChoices, 0 );
|
|
|
|
m_plotOriginOpt->SetSelection( 0 );
|
|
|
|
gbSizer2->Add( m_plotOriginOpt, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
2013-05-26 04:36:44 +00:00
|
|
|
|
2018-02-28 09:44:22 +00:00
|
|
|
m_penHPLGWidthTitle = new wxStaticText( m_HPGLOptionsSizer->GetStaticBox(), wxID_ANY, _("Pen width:"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
m_penHPLGWidthTitle->Wrap( -1 );
|
|
|
|
gbSizer2->Add( m_penHPLGWidthTitle, wxGBPosition( 1, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT, 5 );
|
2018-02-09 18:00:13 +00:00
|
|
|
|
2018-02-28 09:44:22 +00:00
|
|
|
m_penHPGLWidthCtrl = new wxTextCtrl( m_HPGLOptionsSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
gbSizer2->Add( m_penHPGLWidthCtrl, wxGBPosition( 1, 1 ), wxGBSpan( 1, 1 ), wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
2018-02-09 18:00:13 +00:00
|
|
|
|
2013-05-26 04:36:44 +00:00
|
|
|
|
2018-02-28 09:44:22 +00:00
|
|
|
gbSizer2->AddGrowableCol( 1 );
|
2013-05-26 04:36:44 +00:00
|
|
|
|
2018-02-28 09:44:22 +00:00
|
|
|
m_HPGLOptionsSizer->Add( gbSizer2, 1, wxEXPAND, 5 );
|
2013-05-26 04:36:44 +00:00
|
|
|
|
|
|
|
|
2018-02-28 09:44:22 +00:00
|
|
|
m_optionsSizer->Add( m_HPGLOptionsSizer, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
|
2013-05-26 04:36:44 +00:00
|
|
|
|
|
|
|
|
2018-02-28 09:44:22 +00:00
|
|
|
bMainSizer->Add( m_optionsSizer, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
|
2013-05-26 04:36:44 +00:00
|
|
|
|
2015-12-21 15:08:37 +00:00
|
|
|
wxBoxSizer* bSizerMsgPanel;
|
|
|
|
bSizerMsgPanel = new wxBoxSizer( wxVERTICAL );
|
2013-05-26 04:36:44 +00:00
|
|
|
|
2015-06-16 12:20:42 +00:00
|
|
|
m_MessagesBox = new WX_HTML_REPORT_PANEL( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
|
|
|
|
m_MessagesBox->SetMinSize( wxSize( 300,150 ) );
|
2013-05-26 04:36:44 +00:00
|
|
|
|
2015-12-21 15:08:37 +00:00
|
|
|
bSizerMsgPanel->Add( m_MessagesBox, 1, wxEXPAND | wxALL, 5 );
|
2013-05-26 04:36:44 +00:00
|
|
|
|
|
|
|
|
2018-02-28 09:44:22 +00:00
|
|
|
bMainSizer->Add( bSizerMsgPanel, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
|
|
|
|
|
|
|
|
m_sdbSizer1 = new wxStdDialogButtonSizer();
|
|
|
|
m_sdbSizer1OK = new wxButton( this, wxID_OK );
|
|
|
|
m_sdbSizer1->AddButton( m_sdbSizer1OK );
|
|
|
|
m_sdbSizer1Apply = new wxButton( this, wxID_APPLY );
|
|
|
|
m_sdbSizer1->AddButton( m_sdbSizer1Apply );
|
|
|
|
m_sdbSizer1Cancel = new wxButton( this, wxID_CANCEL );
|
|
|
|
m_sdbSizer1->AddButton( m_sdbSizer1Cancel );
|
|
|
|
m_sdbSizer1->Realize();
|
|
|
|
|
|
|
|
bMainSizer->Add( m_sdbSizer1, 0, wxALL|wxEXPAND, 5 );
|
2013-05-26 04:36:44 +00:00
|
|
|
|
|
|
|
|
|
|
|
this->SetSizer( bMainSizer );
|
|
|
|
this->Layout();
|
|
|
|
bMainSizer->Fit( this );
|
|
|
|
|
|
|
|
// Connect Events
|
|
|
|
this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_PLOT_SCHEMATIC_BASE::OnCloseWindow ) );
|
2018-02-28 09:44:22 +00:00
|
|
|
this->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_PLOT_SCHEMATIC_BASE::OnUpdateUI ) );
|
2014-10-26 13:59:01 +00:00
|
|
|
m_browseButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_SCHEMATIC_BASE::OnOutputDirectoryBrowseClicked ), NULL, this );
|
2013-05-26 04:36:44 +00:00
|
|
|
m_plotFormatOpt->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_PLOT_SCHEMATIC_BASE::OnPlotFormatSelection ), NULL, this );
|
2018-02-28 09:44:22 +00:00
|
|
|
m_paperSizeOption->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_PLOT_SCHEMATIC_BASE::OnPageSizeSelected ), NULL, this );
|
|
|
|
m_sdbSizer1Apply->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_SCHEMATIC_BASE::OnPlotCurrent ), NULL, this );
|
|
|
|
m_sdbSizer1OK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_SCHEMATIC_BASE::OnPlotAll ), NULL, this );
|
2013-05-26 04:36:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
DIALOG_PLOT_SCHEMATIC_BASE::~DIALOG_PLOT_SCHEMATIC_BASE()
|
|
|
|
{
|
|
|
|
// Disconnect Events
|
|
|
|
this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_PLOT_SCHEMATIC_BASE::OnCloseWindow ) );
|
2018-02-28 09:44:22 +00:00
|
|
|
this->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_PLOT_SCHEMATIC_BASE::OnUpdateUI ) );
|
2014-10-26 13:59:01 +00:00
|
|
|
m_browseButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_SCHEMATIC_BASE::OnOutputDirectoryBrowseClicked ), NULL, this );
|
2013-05-26 04:36:44 +00:00
|
|
|
m_plotFormatOpt->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_PLOT_SCHEMATIC_BASE::OnPlotFormatSelection ), NULL, this );
|
2018-02-28 09:44:22 +00:00
|
|
|
m_paperSizeOption->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_PLOT_SCHEMATIC_BASE::OnPageSizeSelected ), NULL, this );
|
|
|
|
m_sdbSizer1Apply->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_SCHEMATIC_BASE::OnPlotCurrent ), NULL, this );
|
|
|
|
m_sdbSizer1OK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_SCHEMATIC_BASE::OnPlotAll ), NULL, this );
|
2013-05-26 04:36:44 +00:00
|
|
|
|
|
|
|
}
|