Make plotting of PDF property popups optional.

This commit is contained in:
Jeff Young 2023-10-21 21:52:51 +01:00
parent f708c7d962
commit f50de028fb
37 changed files with 376 additions and 244 deletions

View File

@ -110,6 +110,8 @@ void DIALOG_PLOT_SCHEMATIC::initDlg()
setOpenFileAfterPlot( cfg->m_PlotPanel.open_file_after_plot ); setOpenFileAfterPlot( cfg->m_PlotPanel.open_file_after_plot );
m_plotPDFPropertyPopups->SetValue( cfg->m_PlotPanel.pdf_property_popups );
// HPGL plot origin and unit system configuration // HPGL plot origin and unit system configuration
m_plotOriginOpt->SetSelection( cfg->m_PlotPanel.hpgl_origin ); m_plotOriginOpt->SetSelection( cfg->m_PlotPanel.hpgl_origin );
@ -304,6 +306,7 @@ void DIALOG_PLOT_SCHEMATIC::getPlotOptions( RENDER_SETTINGS* aSettings )
cfg->m_PlotPanel.format = static_cast<int>( GetPlotFileFormat() ); cfg->m_PlotPanel.format = static_cast<int>( GetPlotFileFormat() );
cfg->m_PlotPanel.hpgl_origin = m_plotOriginOpt->GetSelection(); cfg->m_PlotPanel.hpgl_origin = m_plotOriginOpt->GetSelection();
cfg->m_PlotPanel.hpgl_paper_size = static_cast<int>( m_HPGLPaperSizeSelect ); cfg->m_PlotPanel.hpgl_paper_size = static_cast<int>( m_HPGLPaperSizeSelect );
cfg->m_PlotPanel.pdf_property_popups = m_plotPDFPropertyPopups->GetValue();
cfg->m_PlotPanel.open_file_after_plot = getOpenFileAfterPlot(); cfg->m_PlotPanel.open_file_after_plot = getOpenFileAfterPlot();
// HPGL Pen Size is stored in mm in config // HPGL Pen Size is stored in mm in config
@ -377,10 +380,11 @@ void DIALOG_PLOT_SCHEMATIC::plotSchematic( bool aPlotAll )
plotSettings.m_blackAndWhite = !getModeColor(); plotSettings.m_blackAndWhite = !getModeColor();
plotSettings.m_useBackgroundColor = m_plotBackgroundColor->GetValue(); plotSettings.m_useBackgroundColor = m_plotBackgroundColor->GetValue();
plotSettings.m_theme = colors->GetFilename(); plotSettings.m_theme = colors->GetFilename();
plotSettings.m_HPGLPenSize = m_HPGLPenSize; plotSettings.m_PDFPropertyPopups = m_plotPDFPropertyPopups->GetValue();
plotSettings.m_HPGLPaperSizeSelect = static_cast<HPGL_PAGE_SIZE>( m_HPGLPaperSizeSelect ); plotSettings.m_HPGLPaperSizeSelect = static_cast<HPGL_PAGE_SIZE>( m_HPGLPaperSizeSelect );
plotSettings.m_HPGLPlotOrigin = plotSettings.m_HPGLPlotOrigin =
static_cast<HPGL_PLOT_ORIGIN_AND_UNITS>( m_plotOriginOpt->GetSelection() ); static_cast<HPGL_PLOT_ORIGIN_AND_UNITS>( m_plotOriginOpt->GetSelection() );
plotSettings.m_HPGLPenSize = m_HPGLPenSize;
plotSettings.m_outputDirectory = getOutputPath(); plotSettings.m_outputDirectory = getOutputPath();
plotSettings.m_pageSizeSelect = m_pageSizeSelect; plotSettings.m_pageSizeSelect = m_pageSizeSelect;

View File

@ -49,73 +49,74 @@ DIALOG_PLOT_SCHEMATIC_BASE::DIALOG_PLOT_SCHEMATIC_BASE( wxWindow* parent, wxWind
sbOptions = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Options") ), wxVERTICAL ); sbOptions = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Options") ), wxVERTICAL );
wxGridBagSizer* gbSizer1; wxGridBagSizer* gbSizer1;
gbSizer1 = new wxGridBagSizer( 0, 0 ); gbSizer1 = new wxGridBagSizer( 5, 3 );
gbSizer1->SetFlexibleDirection( wxBOTH ); gbSizer1->SetFlexibleDirection( wxBOTH );
gbSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); gbSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
gbSizer1->SetEmptyCellSize( wxSize( -1,10 ) );
m_staticText4 = new wxStaticText( sbOptions->GetStaticBox(), wxID_ANY, _("Page size:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText4 = new wxStaticText( sbOptions->GetStaticBox(), wxID_ANY, _("Page size:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText4->Wrap( -1 ); m_staticText4->Wrap( -1 );
gbSizer1->Add( m_staticText4, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT, 5 ); gbSizer1->Add( m_staticText4, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
wxString m_paperSizeOptionChoices[] = { _("Schematic size"), _("A4"), _("A") }; wxString m_paperSizeOptionChoices[] = { _("Schematic size"), _("A4"), _("A") };
int m_paperSizeOptionNChoices = sizeof( m_paperSizeOptionChoices ) / sizeof( wxString ); 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 = new wxChoice( sbOptions->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_paperSizeOptionNChoices, m_paperSizeOptionChoices, 0 );
m_paperSizeOption->SetSelection( 0 ); m_paperSizeOption->SetSelection( 0 );
gbSizer1->Add( m_paperSizeOption, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), wxEXPAND|wxRIGHT|wxLEFT, 5 ); gbSizer1->Add( m_paperSizeOption, wxGBPosition( 0, 1 ), wxGBSpan( 1, 2 ), wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
m_plotDrawingSheet = new wxCheckBox( sbOptions->GetStaticBox(), wxID_ANY, _("Plot drawing sheet"), wxDefaultPosition, wxDefaultSize, 0 ); m_plotDrawingSheet = new wxCheckBox( sbOptions->GetStaticBox(), wxID_ANY, _("Plot drawing sheet"), wxDefaultPosition, wxDefaultSize, 0 );
m_plotDrawingSheet->SetValue(true); m_plotDrawingSheet->SetValue(true);
m_plotDrawingSheet->SetToolTip( _("Plot the drawing sheet border and title block") ); m_plotDrawingSheet->SetToolTip( _("Plot the drawing sheet border and title block") );
gbSizer1->Add( m_plotDrawingSheet, wxGBPosition( 1, 0 ), wxGBSpan( 1, 2 ), wxALL, 5 ); gbSizer1->Add( m_plotDrawingSheet, wxGBPosition( 1, 0 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL, 5 );
wxStaticText* bOutputModeLabel; wxStaticText* bOutputModeLabel;
bOutputModeLabel = new wxStaticText( sbOptions->GetStaticBox(), wxID_ANY, _("Output mode:"), wxDefaultPosition, wxDefaultSize, 0 ); bOutputModeLabel = new wxStaticText( sbOptions->GetStaticBox(), wxID_ANY, _("Output mode:"), wxDefaultPosition, wxDefaultSize, 0 );
bOutputModeLabel->Wrap( -1 ); bOutputModeLabel->Wrap( -1 );
gbSizer1->Add( bOutputModeLabel, wxGBPosition( 2, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); gbSizer1->Add( bOutputModeLabel, wxGBPosition( 3, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
wxString m_ModeColorOptionChoices[] = { _("Color"), _("Black and White") }; wxString m_ModeColorOptionChoices[] = { _("Color"), _("Black and White") };
int m_ModeColorOptionNChoices = sizeof( m_ModeColorOptionChoices ) / sizeof( wxString ); 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 = new wxChoice( sbOptions->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_ModeColorOptionNChoices, m_ModeColorOptionChoices, 0 );
m_ModeColorOption->SetSelection( 0 ); m_ModeColorOption->SetSelection( 0 );
gbSizer1->Add( m_ModeColorOption, wxGBPosition( 2, 1 ), wxGBSpan( 1, 1 ), wxALL, 5 ); gbSizer1->Add( m_ModeColorOption, wxGBPosition( 3, 1 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
m_plotBackgroundColor = new wxCheckBox( sbOptions->GetStaticBox(), wxID_ANY, _("Plot background color"), wxDefaultPosition, wxDefaultSize, 0 );
m_plotBackgroundColor->SetToolTip( _("Plot the background color if the output format supports it") );
gbSizer1->Add( m_plotBackgroundColor, wxGBPosition( 3, 0 ), wxGBSpan( 1, 3 ), wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 5 );
m_staticText9 = new wxStaticText( sbOptions->GetStaticBox(), wxID_ANY, _("Color theme:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText9 = new wxStaticText( sbOptions->GetStaticBox(), wxID_ANY, _("Color theme:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText9->Wrap( -1 ); m_staticText9->Wrap( -1 );
gbSizer1->Add( m_staticText9, wxGBPosition( 4, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxALL, 5 ); gbSizer1->Add( m_staticText9, wxGBPosition( 4, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
wxArrayString m_colorThemeChoices; wxArrayString m_colorThemeChoices;
m_colorTheme = new wxChoice( sbOptions->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_colorThemeChoices, 0 ); m_colorTheme = new wxChoice( sbOptions->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_colorThemeChoices, 0 );
m_colorTheme->SetSelection( 0 ); m_colorTheme->SetSelection( 0 );
m_colorTheme->SetToolTip( _("Select the color theme to use for plotting") ); m_colorTheme->SetToolTip( _("Select the color theme to use for plotting") );
gbSizer1->Add( m_colorTheme, wxGBPosition( 4, 1 ), wxGBSpan( 1, 1 ), wxALL|wxEXPAND, 5 ); gbSizer1->Add( m_colorTheme, wxGBPosition( 4, 1 ), wxGBSpan( 1, 2 ), wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
m_plotBackgroundColor = new wxCheckBox( sbOptions->GetStaticBox(), wxID_ANY, _("Plot background color"), wxDefaultPosition, wxDefaultSize, 0 );
m_plotBackgroundColor->SetToolTip( _("Plot the background color if the output format supports it") );
gbSizer1->Add( m_plotBackgroundColor, wxGBPosition( 5, 0 ), wxGBSpan( 1, 3 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
m_lineWidthLabel = new wxStaticText( sbOptions->GetStaticBox(), wxID_ANY, _("Minimum line width:"), wxDefaultPosition, wxDefaultSize, 0 ); m_lineWidthLabel = new wxStaticText( sbOptions->GetStaticBox(), wxID_ANY, _("Minimum line width:"), wxDefaultPosition, wxDefaultSize, 0 );
m_lineWidthLabel->Wrap( -1 ); m_lineWidthLabel->Wrap( -1 );
gbSizer1->Add( m_lineWidthLabel, wxGBPosition( 5, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); gbSizer1->Add( m_lineWidthLabel, wxGBPosition( 7, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
m_lineWidthCtrl = new wxTextCtrl( sbOptions->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); m_lineWidthCtrl = new wxTextCtrl( sbOptions->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_lineWidthCtrl->SetToolTip( _("Selection of the default pen thickness used to draw items, when their thickness is set to 0.") ); m_lineWidthCtrl->SetToolTip( _("Selection of the default pen thickness used to draw items, when their thickness is set to 0.") );
gbSizer1->Add( m_lineWidthCtrl, wxGBPosition( 5, 1 ), wxGBSpan( 1, 1 ), wxEXPAND|wxALL, 5 ); gbSizer1->Add( m_lineWidthCtrl, wxGBPosition( 7, 1 ), wxGBSpan( 1, 1 ), wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
m_lineWidthUnits = new wxStaticText( sbOptions->GetStaticBox(), wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 ); m_lineWidthUnits = new wxStaticText( sbOptions->GetStaticBox(), wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
m_lineWidthUnits->Wrap( -1 ); m_lineWidthUnits->Wrap( -1 );
gbSizer1->Add( m_lineWidthUnits, wxGBPosition( 5, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxTOP, 5 ); gbSizer1->Add( m_lineWidthUnits, wxGBPosition( 7, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
gbSizer1->AddGrowableCol( 1 ); gbSizer1->AddGrowableCol( 1 );
sbOptions->Add( gbSizer1, 1, wxEXPAND, 5 ); sbOptions->Add( gbSizer1, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
m_optionsSizer->Add( sbOptions, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); m_optionsSizer->Add( sbOptions, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
wxBoxSizer* bOptionsRight; wxBoxSizer* bOptionsRight;
bOptionsRight = new wxBoxSizer( wxVERTICAL ); bOptionsRight = new wxBoxSizer( wxVERTICAL );
@ -123,49 +124,59 @@ DIALOG_PLOT_SCHEMATIC_BASE::DIALOG_PLOT_SCHEMATIC_BASE( wxWindow* parent, wxWind
m_HPGLOptionsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("HPGL Options") ), wxVERTICAL ); m_HPGLOptionsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("HPGL Options") ), wxVERTICAL );
wxGridBagSizer* gbSizer2; wxGridBagSizer* gbSizer2;
gbSizer2 = new wxGridBagSizer( 0, 0 ); gbSizer2 = new wxGridBagSizer( 3, 3 );
gbSizer2->SetFlexibleDirection( wxBOTH ); gbSizer2->SetFlexibleDirection( wxBOTH );
gbSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); gbSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
m_plotOriginTitle = new wxStaticText( m_HPGLOptionsSizer->GetStaticBox(), wxID_ANY, _("Position and units:"), wxDefaultPosition, wxDefaultSize, 0 ); m_plotOriginTitle = new wxStaticText( m_HPGLOptionsSizer->GetStaticBox(), wxID_ANY, _("Position and units:"), wxDefaultPosition, wxDefaultSize, 0 );
m_plotOriginTitle->Wrap( -1 ); m_plotOriginTitle->Wrap( -1 );
gbSizer2->Add( m_plotOriginTitle, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT, 5 ); gbSizer2->Add( m_plotOriginTitle, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
wxString m_plotOriginOptChoices[] = { _("Bottom left, plotter units"), _("Centered, plotter units"), _("Page fit, user units"), _("Content fit, user units") }; wxString m_plotOriginOptChoices[] = { _("Bottom left, plotter units"), _("Centered, plotter units"), _("Page fit, user units"), _("Content fit, user units") };
int m_plotOriginOptNChoices = sizeof( m_plotOriginOptChoices ) / sizeof( wxString ); 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 = new wxChoice( m_HPGLOptionsSizer->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_plotOriginOptNChoices, m_plotOriginOptChoices, 0 );
m_plotOriginOpt->SetSelection( 0 ); m_plotOriginOpt->SetSelection( 0 );
gbSizer2->Add( m_plotOriginOpt, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); gbSizer2->Add( m_plotOriginOpt, wxGBPosition( 0, 1 ), wxGBSpan( 1, 2 ), wxEXPAND, 5 );
m_penWidthLabel = new wxStaticText( m_HPGLOptionsSizer->GetStaticBox(), wxID_ANY, _("Pen width:"), wxDefaultPosition, wxDefaultSize, 0 ); m_penWidthLabel = new wxStaticText( m_HPGLOptionsSizer->GetStaticBox(), wxID_ANY, _("Pen width:"), wxDefaultPosition, wxDefaultSize, 0 );
m_penWidthLabel->Wrap( -1 ); m_penWidthLabel->Wrap( -1 );
gbSizer2->Add( m_penWidthLabel, wxGBPosition( 1, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 ); gbSizer2->Add( m_penWidthLabel, wxGBPosition( 1, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
m_penWidthCtrl = new wxTextCtrl( m_HPGLOptionsSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); m_penWidthCtrl = new wxTextCtrl( m_HPGLOptionsSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
gbSizer2->Add( m_penWidthCtrl, wxGBPosition( 1, 1 ), wxGBSpan( 1, 1 ), wxEXPAND|wxALL, 5 ); gbSizer2->Add( m_penWidthCtrl, wxGBPosition( 1, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
m_penWidthUnits = new wxStaticText( m_HPGLOptionsSizer->GetStaticBox(), wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 ); m_penWidthUnits = new wxStaticText( m_HPGLOptionsSizer->GetStaticBox(), wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
m_penWidthUnits->Wrap( -1 ); m_penWidthUnits->Wrap( -1 );
gbSizer2->Add( m_penWidthUnits, wxGBPosition( 1, 2 ), wxGBSpan( 1, 1 ), wxTOP|wxBOTTOM|wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 ); gbSizer2->Add( m_penWidthUnits, wxGBPosition( 1, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
gbSizer2->AddGrowableCol( 1 ); gbSizer2->AddGrowableCol( 1 );
m_HPGLOptionsSizer->Add( gbSizer2, 1, wxEXPAND, 5 ); m_HPGLOptionsSizer->Add( gbSizer2, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
bOptionsRight->Add( m_HPGLOptionsSizer, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); bOptionsRight->Add( m_HPGLOptionsSizer, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
wxStaticBoxSizer* sbSizer4;
sbSizer4 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("PDF Options") ), wxVERTICAL );
m_plotPDFPropertyPopups = new wxCheckBox( sbSizer4->GetStaticBox(), wxID_ANY, _("Generate property popups"), wxDefaultPosition, wxDefaultSize, 0 );
m_plotPDFPropertyPopups->SetValue(true);
sbSizer4->Add( m_plotPDFPropertyPopups, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
bOptionsRight->Add( sbSizer4, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
m_otherOptions = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Other options") ), wxVERTICAL ); m_otherOptions = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Other options") ), wxVERTICAL );
m_openFileAfterPlot = new wxCheckBox( m_otherOptions->GetStaticBox(), wxID_ANY, _("Open file after plot"), wxDefaultPosition, wxDefaultSize, 0 ); m_openFileAfterPlot = new wxCheckBox( m_otherOptions->GetStaticBox(), wxID_ANY, _("Open file after plot"), wxDefaultPosition, wxDefaultSize, 0 );
m_openFileAfterPlot->Enable( false ); m_openFileAfterPlot->Enable( false );
m_openFileAfterPlot->SetToolTip( _("Open output file with associated application after successful plot") ); m_openFileAfterPlot->SetToolTip( _("Open output file with associated application after successful plot") );
m_otherOptions->Add( m_openFileAfterPlot, 0, wxALL, 5 ); m_otherOptions->Add( m_openFileAfterPlot, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
bOptionsRight->Add( m_otherOptions, 1, wxEXPAND|wxLEFT|wxRIGHT, 5 ); bOptionsRight->Add( m_otherOptions, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
m_optionsSizer->Add( bOptionsRight, 1, wxEXPAND, 5 ); m_optionsSizer->Add( bOptionsRight, 1, wxEXPAND, 5 );

View File

@ -352,7 +352,7 @@
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxEXPAND|wxRIGHT|wxLEFT</property> <property name="flag">wxEXPAND|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property> <property name="proportion">1</property>
<object class="wxStaticBoxSizer" expanded="1"> <object class="wxStaticBoxSizer" expanded="1">
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="label">Options</property> <property name="label">Options</property>
@ -363,24 +363,24 @@
<property name="permission">none</property> <property name="permission">none</property>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxEXPAND</property> <property name="flag">wxEXPAND|wxRIGHT|wxLEFT</property>
<property name="proportion">1</property> <property name="proportion">1</property>
<object class="wxGridBagSizer" expanded="1"> <object class="wxGridBagSizer" expanded="1">
<property name="empty_cell_size"></property> <property name="empty_cell_size">-1,10</property>
<property name="flexible_direction">wxBOTH</property> <property name="flexible_direction">wxBOTH</property>
<property name="growablecols">1</property> <property name="growablecols">1</property>
<property name="growablerows"></property> <property name="growablerows"></property>
<property name="hgap">0</property> <property name="hgap">3</property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">gbSizer1</property> <property name="name">gbSizer1</property>
<property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property> <property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
<property name="permission">none</property> <property name="permission">none</property>
<property name="vgap">0</property> <property name="vgap">5</property>
<object class="gbsizeritem" expanded="0"> <object class="gbsizeritem" expanded="0">
<property name="border">5</property> <property name="border">5</property>
<property name="colspan">1</property> <property name="colspan">1</property>
<property name="column">0</property> <property name="column">0</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT</property> <property name="flag">wxALIGN_CENTER_VERTICAL</property>
<property name="row">0</property> <property name="row">0</property>
<property name="rowspan">1</property> <property name="rowspan">1</property>
<object class="wxStaticText" expanded="0"> <object class="wxStaticText" expanded="0">
@ -442,9 +442,9 @@
</object> </object>
<object class="gbsizeritem" expanded="0"> <object class="gbsizeritem" expanded="0">
<property name="border">5</property> <property name="border">5</property>
<property name="colspan">1</property> <property name="colspan">2</property>
<property name="column">1</property> <property name="column">1</property>
<property name="flag">wxEXPAND|wxRIGHT|wxLEFT</property> <property name="flag">wxEXPAND|wxALIGN_CENTER_VERTICAL</property>
<property name="row">0</property> <property name="row">0</property>
<property name="rowspan">1</property> <property name="rowspan">1</property>
<object class="wxChoice" expanded="0"> <object class="wxChoice" expanded="0">
@ -512,7 +512,7 @@
<property name="border">5</property> <property name="border">5</property>
<property name="colspan">2</property> <property name="colspan">2</property>
<property name="column">0</property> <property name="column">0</property>
<property name="flag">wxALL</property> <property name="flag">wxALIGN_CENTER_VERTICAL</property>
<property name="row">1</property> <property name="row">1</property>
<property name="rowspan">1</property> <property name="rowspan">1</property>
<object class="wxCheckBox" expanded="0"> <object class="wxCheckBox" expanded="0">
@ -579,8 +579,8 @@
<property name="border">5</property> <property name="border">5</property>
<property name="colspan">1</property> <property name="colspan">1</property>
<property name="column">0</property> <property name="column">0</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT</property> <property name="flag">wxALIGN_CENTER_VERTICAL</property>
<property name="row">2</property> <property name="row">3</property>
<property name="rowspan">1</property> <property name="rowspan">1</property>
<object class="wxStaticText" expanded="0"> <object class="wxStaticText" expanded="0">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
@ -641,10 +641,10 @@
</object> </object>
<object class="gbsizeritem" expanded="0"> <object class="gbsizeritem" expanded="0">
<property name="border">5</property> <property name="border">5</property>
<property name="colspan">1</property> <property name="colspan">2</property>
<property name="column">1</property> <property name="column">1</property>
<property name="flag">wxALL</property> <property name="flag">wxALIGN_CENTER_VERTICAL|wxEXPAND</property>
<property name="row">2</property> <property name="row">3</property>
<property name="rowspan">1</property> <property name="rowspan">1</property>
<object class="wxChoice" expanded="0"> <object class="wxChoice" expanded="0">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
@ -706,78 +706,11 @@
<property name="window_style"></property> <property name="window_style"></property>
</object> </object>
</object> </object>
<object class="gbsizeritem" expanded="1">
<property name="border">5</property>
<property name="colspan">3</property>
<property name="column">0</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND</property>
<property name="row">3</property>
<property name="rowspan">1</property>
<object class="wxCheckBox" expanded="1">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="checked">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Plot background color</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_plotBackgroundColor</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass">; ; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip">Plot the background color if the output format supports it</property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
</object>
</object>
<object class="gbsizeritem" expanded="1"> <object class="gbsizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="colspan">1</property> <property name="colspan">1</property>
<property name="column">0</property> <property name="column">0</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property> <property name="flag">wxALIGN_CENTER_VERTICAL</property>
<property name="row">4</property> <property name="row">4</property>
<property name="rowspan">1</property> <property name="rowspan">1</property>
<object class="wxStaticText" expanded="1"> <object class="wxStaticText" expanded="1">
@ -839,9 +772,9 @@
</object> </object>
<object class="gbsizeritem" expanded="1"> <object class="gbsizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="colspan">1</property> <property name="colspan">2</property>
<property name="column">1</property> <property name="column">1</property>
<property name="flag">wxALL|wxEXPAND</property> <property name="flag">wxEXPAND|wxALIGN_CENTER_VERTICAL</property>
<property name="row">4</property> <property name="row">4</property>
<property name="rowspan">1</property> <property name="rowspan">1</property>
<object class="wxChoice" expanded="1"> <object class="wxChoice" expanded="1">
@ -904,12 +837,79 @@
<property name="window_style"></property> <property name="window_style"></property>
</object> </object>
</object> </object>
<object class="gbsizeritem" expanded="1">
<property name="border">5</property>
<property name="colspan">3</property>
<property name="column">0</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxEXPAND</property>
<property name="row">5</property>
<property name="rowspan">1</property>
<object class="wxCheckBox" expanded="1">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="checked">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Plot background color</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_plotBackgroundColor</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass">; ; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip">Plot the background color if the output format supports it</property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
</object>
</object>
<object class="gbsizeritem" expanded="0"> <object class="gbsizeritem" expanded="0">
<property name="border">5</property> <property name="border">5</property>
<property name="colspan">1</property> <property name="colspan">1</property>
<property name="column">0</property> <property name="column">0</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT</property> <property name="flag">wxALIGN_CENTER_VERTICAL</property>
<property name="row">5</property> <property name="row">7</property>
<property name="rowspan">1</property> <property name="rowspan">1</property>
<object class="wxStaticText" expanded="0"> <object class="wxStaticText" expanded="0">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
@ -972,8 +972,8 @@
<property name="border">5</property> <property name="border">5</property>
<property name="colspan">1</property> <property name="colspan">1</property>
<property name="column">1</property> <property name="column">1</property>
<property name="flag">wxEXPAND|wxALL</property> <property name="flag">wxEXPAND|wxALIGN_CENTER_VERTICAL</property>
<property name="row">5</property> <property name="row">7</property>
<property name="rowspan">1</property> <property name="rowspan">1</property>
<object class="wxTextCtrl" expanded="0"> <object class="wxTextCtrl" expanded="0">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
@ -1039,8 +1039,8 @@
<property name="border">5</property> <property name="border">5</property>
<property name="colspan">1</property> <property name="colspan">1</property>
<property name="column">2</property> <property name="column">2</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxTOP</property> <property name="flag">wxALIGN_CENTER_VERTICAL</property>
<property name="row">5</property> <property name="row">7</property>
<property name="rowspan">1</property> <property name="rowspan">1</property>
<object class="wxStaticText" expanded="0"> <object class="wxStaticText" expanded="0">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
@ -1126,24 +1126,24 @@
<property name="permission">protected</property> <property name="permission">protected</property>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxEXPAND</property> <property name="flag">wxEXPAND|wxRIGHT|wxLEFT</property>
<property name="proportion">1</property> <property name="proportion">1</property>
<object class="wxGridBagSizer" expanded="1"> <object class="wxGridBagSizer" expanded="1">
<property name="empty_cell_size"></property> <property name="empty_cell_size"></property>
<property name="flexible_direction">wxBOTH</property> <property name="flexible_direction">wxBOTH</property>
<property name="growablecols">1</property> <property name="growablecols">1</property>
<property name="growablerows"></property> <property name="growablerows"></property>
<property name="hgap">0</property> <property name="hgap">3</property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">gbSizer2</property> <property name="name">gbSizer2</property>
<property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property> <property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
<property name="permission">none</property> <property name="permission">none</property>
<property name="vgap">0</property> <property name="vgap">3</property>
<object class="gbsizeritem" expanded="0"> <object class="gbsizeritem" expanded="0">
<property name="border">5</property> <property name="border">5</property>
<property name="colspan">1</property> <property name="colspan">1</property>
<property name="column">0</property> <property name="column">0</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT</property> <property name="flag">wxALIGN_CENTER_VERTICAL</property>
<property name="row">0</property> <property name="row">0</property>
<property name="rowspan">1</property> <property name="rowspan">1</property>
<object class="wxStaticText" expanded="0"> <object class="wxStaticText" expanded="0">
@ -1205,9 +1205,9 @@
</object> </object>
<object class="gbsizeritem" expanded="0"> <object class="gbsizeritem" expanded="0">
<property name="border">5</property> <property name="border">5</property>
<property name="colspan">1</property> <property name="colspan">2</property>
<property name="column">1</property> <property name="column">1</property>
<property name="flag">wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT</property> <property name="flag">wxEXPAND</property>
<property name="row">0</property> <property name="row">0</property>
<property name="rowspan">1</property> <property name="rowspan">1</property>
<object class="wxChoice" expanded="0"> <object class="wxChoice" expanded="0">
@ -1274,7 +1274,7 @@
<property name="border">5</property> <property name="border">5</property>
<property name="colspan">1</property> <property name="colspan">1</property>
<property name="column">0</property> <property name="column">0</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT</property> <property name="flag">wxALIGN_CENTER_VERTICAL</property>
<property name="row">1</property> <property name="row">1</property>
<property name="rowspan">1</property> <property name="rowspan">1</property>
<object class="wxStaticText" expanded="0"> <object class="wxStaticText" expanded="0">
@ -1338,7 +1338,7 @@
<property name="border">5</property> <property name="border">5</property>
<property name="colspan">1</property> <property name="colspan">1</property>
<property name="column">1</property> <property name="column">1</property>
<property name="flag">wxEXPAND|wxALL</property> <property name="flag">wxALIGN_CENTER_VERTICAL|wxEXPAND</property>
<property name="row">1</property> <property name="row">1</property>
<property name="rowspan">1</property> <property name="rowspan">1</property>
<object class="wxTextCtrl" expanded="0"> <object class="wxTextCtrl" expanded="0">
@ -1405,7 +1405,7 @@
<property name="border">5</property> <property name="border">5</property>
<property name="colspan">1</property> <property name="colspan">1</property>
<property name="column">2</property> <property name="column">2</property>
<property name="flag">wxTOP|wxBOTTOM|wxRIGHT|wxALIGN_CENTER_VERTICAL</property> <property name="flag">wxALIGN_CENTER_VERTICAL</property>
<property name="row">1</property> <property name="row">1</property>
<property name="rowspan">1</property> <property name="rowspan">1</property>
<object class="wxStaticText" expanded="0"> <object class="wxStaticText" expanded="0">
@ -1471,7 +1471,85 @@
</object> </object>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxEXPAND|wxLEFT|wxRIGHT</property> <property name="flag">wxEXPAND|wxTOP|wxRIGHT|wxLEFT</property>
<property name="proportion">1</property>
<object class="wxStaticBoxSizer" expanded="1">
<property name="id">wxID_ANY</property>
<property name="label">PDF Options</property>
<property name="minimum_size"></property>
<property name="name">sbSizer4</property>
<property name="orient">wxVERTICAL</property>
<property name="parent">1</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxCheckBox" expanded="1">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="checked">1</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Generate property popups</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_plotPDFPropertyPopups</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass">; ; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
</object>
</object>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND|wxTOP|wxRIGHT|wxLEFT</property>
<property name="proportion">1</property> <property name="proportion">1</property>
<object class="wxStaticBoxSizer" expanded="1"> <object class="wxStaticBoxSizer" expanded="1">
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
@ -1483,7 +1561,7 @@
<property name="permission">protected</property> <property name="permission">protected</property>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALL</property> <property name="flag">wxBOTTOM|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxCheckBox" expanded="1"> <object class="wxCheckBox" expanded="1">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>

View File

@ -54,9 +54,9 @@ class DIALOG_PLOT_SCHEMATIC_BASE : public DIALOG_SHIM
wxChoice* m_paperSizeOption; wxChoice* m_paperSizeOption;
wxCheckBox* m_plotDrawingSheet; wxCheckBox* m_plotDrawingSheet;
wxChoice* m_ModeColorOption; wxChoice* m_ModeColorOption;
wxCheckBox* m_plotBackgroundColor;
wxStaticText* m_staticText9; wxStaticText* m_staticText9;
wxChoice* m_colorTheme; wxChoice* m_colorTheme;
wxCheckBox* m_plotBackgroundColor;
wxStaticText* m_lineWidthLabel; wxStaticText* m_lineWidthLabel;
wxTextCtrl* m_lineWidthCtrl; wxTextCtrl* m_lineWidthCtrl;
wxStaticText* m_lineWidthUnits; wxStaticText* m_lineWidthUnits;
@ -66,6 +66,7 @@ class DIALOG_PLOT_SCHEMATIC_BASE : public DIALOG_SHIM
wxStaticText* m_penWidthLabel; wxStaticText* m_penWidthLabel;
wxTextCtrl* m_penWidthCtrl; wxTextCtrl* m_penWidthCtrl;
wxStaticText* m_penWidthUnits; wxStaticText* m_penWidthUnits;
wxCheckBox* m_plotPDFPropertyPopups;
wxStaticBoxSizer* m_otherOptions; wxStaticBoxSizer* m_otherOptions;
wxCheckBox* m_openFileAfterPlot; wxCheckBox* m_openFileAfterPlot;
WX_HTML_REPORT_PANEL* m_MessagesBox; WX_HTML_REPORT_PANEL* m_MessagesBox;

View File

@ -480,6 +480,9 @@ EESCHEMA_SETTINGS::EESCHEMA_SETTINGS() :
m_params.emplace_back( new PARAM<bool>( "plot.frame_reference", m_params.emplace_back( new PARAM<bool>( "plot.frame_reference",
&m_PlotPanel.frame_reference, true ) ); &m_PlotPanel.frame_reference, true ) );
m_params.emplace_back( new PARAM<bool>( "plot.pdf_property_popups",
&m_PlotPanel.pdf_property_popups, true ) );
m_params.emplace_back( new PARAM<int>( "plot.hpgl_paper_size", m_params.emplace_back( new PARAM<int>( "plot.hpgl_paper_size",
&m_PlotPanel.hpgl_paper_size, 0 ) ); &m_PlotPanel.hpgl_paper_size, 0 ) );

View File

@ -249,6 +249,7 @@ public:
int hpgl_paper_size; int hpgl_paper_size;
double hpgl_pen_size; double hpgl_pen_size;
int hpgl_origin; int hpgl_origin;
bool pdf_property_popups;
bool open_file_after_plot; bool open_file_after_plot;
}; };

View File

@ -203,13 +203,14 @@ bool SCH_BITMAP::HitTest( const BOX2I& aRect, bool aContained, int aAccuracy ) c
} }
void SCH_BITMAP::Plot( PLOTTER* aPlotter, bool aBackground ) const void SCH_BITMAP::Plot( PLOTTER* aPlotter, bool aBackground,
const SCH_PLOT_SETTINGS& aPlotSettings ) const
{ {
if( aBackground ) if( aBackground )
{ {
m_bitmapBase->PlotImage( aPlotter, m_pos, m_bitmapBase->PlotImage( aPlotter, m_pos,
aPlotter->RenderSettings()->GetLayerColor( GetLayer() ), aPlotter->RenderSettings()->GetLayerColor( GetLayer() ),
aPlotter->RenderSettings()->GetDefaultPenWidth() ); aPlotter->RenderSettings()->GetDefaultPenWidth() );
} }
} }

View File

@ -150,7 +150,8 @@ public:
bool HitTest( const VECTOR2I& aPosition, int aAccuracy = 0 ) const override; bool HitTest( const VECTOR2I& aPosition, int aAccuracy = 0 ) const override;
bool HitTest( const BOX2I& aRect, bool aContained, int aAccuracy = 0 ) const override; bool HitTest( const BOX2I& aRect, bool aContained, int aAccuracy = 0 ) const override;
void Plot( PLOTTER* aPlotter, bool aBackground ) const override; void Plot( PLOTTER* aPlotter, bool aBackground,
const SCH_PLOT_SETTINGS& aPlotSettings ) const override;
EDA_ITEM* Clone() const override; EDA_ITEM* Clone() const override;

View File

@ -468,7 +468,8 @@ bool SCH_BUS_ENTRY_BASE::HitTest( const BOX2I& aRect, bool aContained, int aAccu
} }
void SCH_BUS_ENTRY_BASE::Plot( PLOTTER* aPlotter, bool aBackground ) const void SCH_BUS_ENTRY_BASE::Plot( PLOTTER* aPlotter, bool aBackground,
const SCH_PLOT_SETTINGS& aPlotSettings ) const
{ {
if( aBackground ) if( aBackground )
return; return;

View File

@ -122,7 +122,8 @@ public:
bool HitTest( const BOX2I& aRect, bool aContained, int aAccuracy = 0 ) const override; bool HitTest( const BOX2I& aRect, bool aContained, int aAccuracy = 0 ) const override;
void Plot( PLOTTER* aPlotter, bool aBackground ) const override; void Plot( PLOTTER* aPlotter, bool aBackground,
const SCH_PLOT_SETTINGS& aPlotSettings ) const override;
void GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>& aList ) override; void GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>& aList ) override;

View File

@ -1125,7 +1125,8 @@ bool SCH_FIELD::HitTest( const BOX2I& aRect, bool aContained, int aAccuracy ) co
} }
void SCH_FIELD::Plot( PLOTTER* aPlotter, bool aBackground ) const void SCH_FIELD::Plot( PLOTTER* aPlotter, bool aBackground,
const SCH_PLOT_SETTINGS& aPlotSettings ) const
{ {
if( GetShownText( true ).IsEmpty() || aBackground ) if( GetShownText( true ).IsEmpty() || aBackground )
return; return;

View File

@ -269,7 +269,8 @@ public:
bool HitTest( const VECTOR2I& aPosition, int aAccuracy = 0 ) const override; bool HitTest( const VECTOR2I& aPosition, int aAccuracy = 0 ) const override;
bool HitTest( const BOX2I& aRect, bool aContained, int aAccuracy = 0 ) const override; bool HitTest( const BOX2I& aRect, bool aContained, int aAccuracy = 0 ) const override;
void Plot( PLOTTER* aPlotter, bool aBackground ) const override; void Plot( PLOTTER* aPlotter, bool aBackground,
const SCH_PLOT_SETTINGS& aPlotSettings ) const override;
EDA_ITEM* Clone() const override; EDA_ITEM* Clone() const override;

View File

@ -349,7 +349,8 @@ bool SCH_ITEM::RenderAsBitmap( double aWorldScale ) const
} }
void SCH_ITEM::Plot( PLOTTER* aPlotter, bool aBackground ) const void SCH_ITEM::Plot( PLOTTER* aPlotter, bool aBackground,
const SCH_PLOT_SETTINGS& aPlotSettings ) const
{ {
wxFAIL_MSG( wxT( "Plot() method not implemented for class " ) + GetClass() ); wxFAIL_MSG( wxT( "Plot() method not implemented for class " ) + GetClass() );
} }

View File

@ -43,6 +43,7 @@ class SCHEMATIC;
class LINE_READER; class LINE_READER;
class SCH_EDIT_FRAME; class SCH_EDIT_FRAME;
class PLOTTER; class PLOTTER;
struct SCH_PLOT_SETTINGS;
class NETLIST_OBJECT_LIST; class NETLIST_OBJECT_LIST;
class PLOTTER; class PLOTTER;
@ -493,7 +494,8 @@ public:
* @param aBackground a poor-man's Z-order. The routine will get called twice, first with * @param aBackground a poor-man's Z-order. The routine will get called twice, first with
* aBackground true and then with aBackground false. * aBackground true and then with aBackground false.
*/ */
virtual void Plot( PLOTTER* aPlotter, bool aBackground ) const; virtual void Plot( PLOTTER* aPlotter, bool aBackground,
const SCH_PLOT_SETTINGS& aPlotSettings ) const;
virtual bool operator <( const SCH_ITEM& aItem ) const; virtual bool operator <( const SCH_ITEM& aItem ) const;

View File

@ -237,7 +237,8 @@ bool SCH_JUNCTION::doIsConnected( const VECTOR2I& aPosition ) const
} }
void SCH_JUNCTION::Plot( PLOTTER* aPlotter, bool aBackground ) const void SCH_JUNCTION::Plot( PLOTTER* aPlotter, bool aBackground,
const SCH_PLOT_SETTINGS& aPlotSettings ) const
{ {
if( aBackground ) if( aBackground )
return; return;

View File

@ -121,7 +121,8 @@ public:
bool HitTest( const VECTOR2I& aPosition, int aAccuracy = 0 ) const override; bool HitTest( const VECTOR2I& aPosition, int aAccuracy = 0 ) const override;
bool HitTest( const BOX2I& aRect, bool aContained, int aAccuracy = 0 ) const override; bool HitTest( const BOX2I& aRect, bool aContained, int aAccuracy = 0 ) const override;
void Plot( PLOTTER* aPlotter, bool aBackground ) const override; void Plot( PLOTTER* aPlotter, bool aBackground,
const SCH_PLOT_SETTINGS& aPlotSettings ) const override;
EDA_ITEM* Clone() const override; EDA_ITEM* Clone() const override;

View File

@ -26,7 +26,7 @@
#include <base_units.h> #include <base_units.h>
#include <pgm_base.h> #include <pgm_base.h>
#include <sch_edit_frame.h> #include <sch_edit_frame.h>
#include <plotters/plotter.h> #include <sch_plotter.h>
#include <widgets/msgpanel.h> #include <widgets/msgpanel.h>
#include <bitmaps.h> #include <bitmaps.h>
#include <string_utils.h> #include <string_utils.h>
@ -1240,7 +1240,8 @@ void SCH_LABEL_BASE::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PA
} }
void SCH_LABEL_BASE::Plot( PLOTTER* aPlotter, bool aBackground ) const void SCH_LABEL_BASE::Plot( PLOTTER* aPlotter, bool aBackground,
const SCH_PLOT_SETTINGS& aPlotSettings ) const
{ {
static std::vector<VECTOR2I> s_poly; static std::vector<VECTOR2I> s_poly;
@ -1301,26 +1302,29 @@ void SCH_LABEL_BASE::Plot( PLOTTER* aPlotter, bool aBackground ) const
} }
// Plot attributes to a hypertext menu // Plot attributes to a hypertext menu
std::vector<wxString> properties; if( aPlotSettings.m_PDFPropertyPopups )
if( connection )
{ {
properties.emplace_back( wxString::Format( wxT( "!%s = %s" ), _( "Net" ), std::vector<wxString> properties;
connection->Name() ) );
properties.emplace_back( wxString::Format( wxT( "!%s = %s" ), _( "Resolved netclass" ), if( connection )
GetEffectiveNetClass()->GetName() ) ); {
properties.emplace_back( wxString::Format( wxT( "!%s = %s" ), _( "Net" ),
connection->Name() ) );
properties.emplace_back( wxString::Format( wxT( "!%s = %s" ), _( "Resolved netclass" ),
GetEffectiveNetClass()->GetName() ) );
}
for( const SCH_FIELD& field : GetFields() )
{
properties.emplace_back( wxString::Format( wxT( "!%s = %s" ), field.GetName(),
field.GetShownText( false ) ) );
}
if( !properties.empty() )
aPlotter->HyperlinkMenu( GetBodyBoundingBox(), properties );
} }
for( const SCH_FIELD& field : GetFields() )
{
properties.emplace_back( wxString::Format( wxT( "!%s = %s" ), field.GetName(),
field.GetShownText( false ) ) );
}
if( !properties.empty() )
aPlotter->HyperlinkMenu( GetBodyBoundingBox(), properties );
if( Type() == SCH_HIER_LABEL_T ) if( Type() == SCH_HIER_LABEL_T )
{ {
aPlotter->Bookmark( GetBodyBoundingBox(), GetShownText( false ), aPlotter->Bookmark( GetBodyBoundingBox(), GetShownText( false ),
@ -1329,7 +1333,7 @@ void SCH_LABEL_BASE::Plot( PLOTTER* aPlotter, bool aBackground ) const
} }
for( const SCH_FIELD& field : m_fields ) for( const SCH_FIELD& field : m_fields )
field.Plot( aPlotter, aBackground ); field.Plot( aPlotter, aBackground, aPlotSettings );
} }

View File

@ -287,7 +287,8 @@ public:
void GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>& aList ) override; void GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>& aList ) override;
void Plot( PLOTTER* aPlotter, bool aBackground ) const override; void Plot( PLOTTER* aPlotter, bool aBackground,
const SCH_PLOT_SETTINGS& aPlotSettings ) const override;
void Print( const RENDER_SETTINGS* aSettings, const VECTOR2I& offset ) override; void Print( const RENDER_SETTINGS* aSettings, const VECTOR2I& offset ) override;

View File

@ -27,7 +27,7 @@
#include <string_utils.h> #include <string_utils.h>
#include <core/mirror.h> #include <core/mirror.h>
#include <sch_painter.h> #include <sch_painter.h>
#include <plotters/plotter.h> #include <sch_plotter.h>
#include <geometry/shape_segment.h> #include <geometry/shape_segment.h>
#include <sch_line.h> #include <sch_line.h>
#include <sch_edit_frame.h> #include <sch_edit_frame.h>
@ -860,7 +860,8 @@ bool SCH_LINE::doIsConnected( const VECTOR2I& aPosition ) const
} }
void SCH_LINE::Plot( PLOTTER* aPlotter, bool aBackground ) const void SCH_LINE::Plot( PLOTTER* aPlotter, bool aBackground,
const SCH_PLOT_SETTINGS& aPlotSettings ) const
{ {
if( aBackground ) if( aBackground )
return; return;
@ -887,31 +888,34 @@ void SCH_LINE::Plot( PLOTTER* aPlotter, bool aBackground ) const
BOX2I bbox = GetBoundingBox(); BOX2I bbox = GetBoundingBox();
bbox.Inflate( GetPenWidth() * 3 ); bbox.Inflate( GetPenWidth() * 3 );
if( GetLayer() == LAYER_WIRE ) if( aPlotSettings.m_PDFPropertyPopups )
{ {
if( SCH_CONNECTION* connection = Connection() ) if( GetLayer() == LAYER_WIRE )
{ {
properties.emplace_back( wxString::Format( wxT( "!%s = %s" ), if( SCH_CONNECTION* connection = Connection() )
_( "Net" ), {
connection->Name() ) ); properties.emplace_back( wxString::Format( wxT( "!%s = %s" ),
_( "Net" ),
connection->Name() ) );
properties.emplace_back( wxString::Format( wxT( "!%s = %s" ), properties.emplace_back( wxString::Format( wxT( "!%s = %s" ),
_( "Resolved netclass" ), _( "Resolved netclass" ),
GetEffectiveNetClass()->GetName() ) ); GetEffectiveNetClass()->GetName() ) );
}
} }
} else if( GetLayer() == LAYER_BUS )
else if( GetLayer() == LAYER_BUS )
{
if( SCH_CONNECTION* connection = Connection() )
{ {
for( const std::shared_ptr<SCH_CONNECTION>& member : connection->Members() ) if( SCH_CONNECTION* connection = Connection() )
properties.emplace_back( wxT( "!" ) + member->Name() ); {
for( const std::shared_ptr<SCH_CONNECTION>& member : connection->Members() )
properties.emplace_back( wxT( "!" ) + member->Name() );
}
} }
if( !properties.empty() )
aPlotter->HyperlinkMenu( bbox, properties );
} }
if( !properties.empty() )
aPlotter->HyperlinkMenu( bbox, properties );
} }

View File

@ -290,7 +290,8 @@ public:
bool HitTest( const VECTOR2I& aPosition, int aAccuracy = 0 ) const override; bool HitTest( const VECTOR2I& aPosition, int aAccuracy = 0 ) const override;
bool HitTest( const BOX2I& aRect, bool aContained, int aAccuracy = 0 ) const override; bool HitTest( const BOX2I& aRect, bool aContained, int aAccuracy = 0 ) const override;
void Plot( PLOTTER* aPlotter, bool aBackground ) const override; void Plot( PLOTTER* aPlotter, bool aBackground,
const SCH_PLOT_SETTINGS& aPlotSettings ) const override;
EDA_ITEM* Clone() const override; EDA_ITEM* Clone() const override;

View File

@ -64,7 +64,8 @@ public:
void Print( const RENDER_SETTINGS* aSettings, const VECTOR2I& aOffset ) override; void Print( const RENDER_SETTINGS* aSettings, const VECTOR2I& aOffset ) override;
void Plot( PLOTTER* /* aPlotter */, bool /* aBackground */ ) const override void Plot( PLOTTER* /* aPlotter */, bool /* aBackground */,
const SCH_PLOT_SETTINGS& /* aPlotSettings */ ) const override
{ {
// SCH_MARKERs should not be plotted. However, SCH_ITEM will fail an assertion if we // SCH_MARKERs should not be plotted. However, SCH_ITEM will fail an assertion if we
// do not confirm this by locally implementing a no-op Plot(). // do not confirm this by locally implementing a no-op Plot().

View File

@ -172,7 +172,8 @@ bool SCH_NO_CONNECT::HitTest( const BOX2I& aRect, bool aContained, int aAccuracy
} }
void SCH_NO_CONNECT::Plot( PLOTTER* aPlotter, bool aBackground ) const void SCH_NO_CONNECT::Plot( PLOTTER* aPlotter, bool aBackground,
const SCH_PLOT_SETTINGS& aPlotSettings ) const
{ {
if( aBackground ) if( aBackground )
return; return;

View File

@ -105,7 +105,8 @@ public:
bool HitTest( const VECTOR2I& aPosition, int aAccuracy = 0 ) const override; bool HitTest( const VECTOR2I& aPosition, int aAccuracy = 0 ) const override;
bool HitTest( const BOX2I& aRect, bool aContained, int aAccuracy = 0 ) const override; bool HitTest( const BOX2I& aRect, bool aContained, int aAccuracy = 0 ) const override;
void Plot( PLOTTER* aPlotter, bool aBackground ) const override; void Plot( PLOTTER* aPlotter, bool aBackground,
const SCH_PLOT_SETTINGS& aPlotSettings ) const override;
EDA_ITEM* Clone() const override; EDA_ITEM* Clone() const override;

View File

@ -250,7 +250,7 @@ void SCH_PLOTTER::plotOneSheetPDF( PLOTTER* aPlotter, SCH_SCREEN* aScreen,
aScreen->GetFileName(), color, aScreen->GetVirtualPageNumber() == 1 ); aScreen->GetFileName(), color, aScreen->GetVirtualPageNumber() == 1 );
} }
aScreen->Plot( aPlotter ); aScreen->Plot( aPlotter, aPlotSettings );
} }
@ -455,7 +455,7 @@ bool SCH_PLOTTER::plotOneSheetPS( const wxString& aFileName, SCH_SCREEN* aScreen
aScreen->GetVirtualPageNumber() == 1 ); aScreen->GetVirtualPageNumber() == 1 );
} }
aScreen->Plot( plotter ); aScreen->Plot( plotter, aPlotSettings );
plotter->EndPlot(); plotter->EndPlot();
delete plotter; delete plotter;
@ -630,7 +630,7 @@ bool SCH_PLOTTER::plotOneSheetSVG( const wxString& aFileName, SCH_SCREEN* aScree
aScreen->GetVirtualPageNumber() == 1 ); aScreen->GetVirtualPageNumber() == 1 );
} }
aScreen->Plot( plotter ); aScreen->Plot( plotter, aPlotSettings );
plotter->EndPlot(); plotter->EndPlot();
delete plotter; delete plotter;
@ -819,7 +819,7 @@ bool SCH_PLOTTER::plotOneSheetHpgl( const wxString& aFileName,
COLOR4D::BLACK, aScreen->GetVirtualPageNumber() == 1 ); COLOR4D::BLACK, aScreen->GetVirtualPageNumber() == 1 );
} }
aScreen->Plot( plotter ); aScreen->Plot( plotter, aPlotSettings );
plotter->EndPlot(); plotter->EndPlot();
@ -970,7 +970,7 @@ bool SCH_PLOTTER::plotOneSheetDXF( const wxString& aFileName, SCH_SCREEN* aScree
aScreen->GetVirtualPageNumber() == 1 ); aScreen->GetVirtualPageNumber() == 1 );
} }
aScreen->Plot( plotter ); aScreen->Plot( plotter, aPlotSettings );
// finish // finish
plotter->EndPlot(); plotter->EndPlot();

View File

@ -82,15 +82,16 @@ struct SCH_PLOT_SETTINGS
bool m_plotDrawingSheet; bool m_plotDrawingSheet;
std::vector<wxString> m_plotPages; std::vector<wxString> m_plotPages;
bool m_blackAndWhite; bool m_blackAndWhite;
int m_pageSizeSelect; int m_pageSizeSelect;
bool m_useBackgroundColor; bool m_useBackgroundColor;
double m_HPGLPenSize; // for HPGL format only: pen size double m_HPGLPenSize; // for HPGL format only: pen size
HPGL_PAGE_SIZE m_HPGLPaperSizeSelect; HPGL_PAGE_SIZE m_HPGLPaperSizeSelect;
wxString m_theme; bool m_PDFPropertyPopups;
wxString m_theme;
wxString m_outputDirectory; wxString m_outputDirectory;
wxString m_outputFile; wxString m_outputFile;
HPGL_PLOT_ORIGIN_AND_UNITS m_HPGLPlotOrigin; HPGL_PLOT_ORIGIN_AND_UNITS m_HPGLPlotOrigin;

View File

@ -32,17 +32,16 @@
#include <string_utils.h> #include <string_utils.h>
#include <kiway.h> #include <kiway.h>
#include <plotters/plotter.h> #include <plotters/plotter.h>
#include <sch_plotter.h>
#include <project.h> #include <project.h>
#include <project_sch.h> #include <project_sch.h>
#include <reporter.h> #include <reporter.h>
#include <sch_draw_panel.h>
#include <sch_edit_frame.h> #include <sch_edit_frame.h>
#include <sch_item.h> #include <sch_item.h>
#include <symbol_library.h> #include <symbol_library.h>
#include <connection_graph.h> #include <connection_graph.h>
#include <lib_pin.h> #include <lib_pin.h>
#include <lib_shape.h>
#include <sch_symbol.h> #include <sch_symbol.h>
#include <sch_junction.h> #include <sch_junction.h>
#include <sch_line.h> #include <sch_line.h>
@ -54,7 +53,6 @@
#include <symbol_lib_table.h> #include <symbol_lib_table.h>
#include <tool/common_tools.h> #include <tool/common_tools.h>
#include <sim/sim_model.h> // For V6 to V7 simulation model migration. #include <sim/sim_model.h> // For V6 to V7 simulation model migration.
#include <sim/sim_value.h> //
#include <locale_io.h> #include <locale_io.h>
#include <algorithm> #include <algorithm>
@ -62,7 +60,6 @@
// TODO(JE) Debugging only // TODO(JE) Debugging only
#include <core/profile.h> #include <core/profile.h>
#include "sch_bus_entry.h" #include "sch_bus_entry.h"
#include "sim/sim_model_ideal.h"
/* /*
* Flag to enable profiling of the TestDanglingEnds() function. * Flag to enable profiling of the TestDanglingEnds() function.
@ -1110,7 +1107,7 @@ void SCH_SCREEN::Print( const RENDER_SETTINGS* aSettings )
} }
void SCH_SCREEN::Plot( PLOTTER* aPlotter ) const void SCH_SCREEN::Plot( PLOTTER* aPlotter, const SCH_PLOT_SETTINGS& aPlotSettings ) const
{ {
// Ensure links are up to date, even if a library was reloaded for some reason: // Ensure links are up to date, even if a library was reloaded for some reason:
std::vector<SCH_ITEM*> junctions; std::vector<SCH_ITEM*> junctions;
@ -1165,21 +1162,21 @@ void SCH_SCREEN::Plot( PLOTTER* aPlotter ) const
for( const SCH_ITEM* item : bitmaps ) for( const SCH_ITEM* item : bitmaps )
{ {
aPlotter->SetCurrentLineWidth( std::max( item->GetPenWidth(), defaultPenWidth ) ); aPlotter->SetCurrentLineWidth( std::max( item->GetPenWidth(), defaultPenWidth ) );
item->Plot( aPlotter, background ); item->Plot( aPlotter, background, aPlotSettings );
} }
// Plot the background items // Plot the background items
for( const SCH_ITEM* item : other ) for( const SCH_ITEM* item : other )
{ {
aPlotter->SetCurrentLineWidth( std::max( item->GetPenWidth(), defaultPenWidth ) ); aPlotter->SetCurrentLineWidth( std::max( item->GetPenWidth(), defaultPenWidth ) );
item->Plot( aPlotter, background ); item->Plot( aPlotter, background, aPlotSettings );
} }
// Plot the foreground items // Plot the foreground items
for( const SCH_ITEM* item : other ) for( const SCH_ITEM* item : other )
{ {
aPlotter->SetCurrentLineWidth( std::max( item->GetPenWidth(), defaultPenWidth ) ); aPlotter->SetCurrentLineWidth( std::max( item->GetPenWidth(), defaultPenWidth ) );
item->Plot( aPlotter, !background ); item->Plot( aPlotter, !background, aPlotSettings );
} }
// After plotting the symbols as a group above (in `other`), we need to overplot the pins // After plotting the symbols as a group above (in `other`), we need to overplot the pins
@ -1191,7 +1188,7 @@ void SCH_SCREEN::Plot( PLOTTER* aPlotter ) const
for( SCH_FIELD field : sym->GetFields() ) for( SCH_FIELD field : sym->GetFields() )
{ {
field.ClearRenderCache(); field.ClearRenderCache();
field.Plot( aPlotter, false ); field.Plot( aPlotter, false, aPlotSettings );
} }
sym->PlotPins( aPlotter ); sym->PlotPins( aPlotter );
@ -1203,7 +1200,7 @@ void SCH_SCREEN::Plot( PLOTTER* aPlotter ) const
for( const SCH_ITEM* item : junctions ) for( const SCH_ITEM* item : junctions )
{ {
aPlotter->SetCurrentLineWidth( std::max( item->GetPenWidth(), defaultPenWidth ) ); aPlotter->SetCurrentLineWidth( std::max( item->GetPenWidth(), defaultPenWidth ) );
item->Plot( aPlotter, !background ); item->Plot( aPlotter, !background, aPlotSettings );
} }
} }

View File

@ -256,7 +256,7 @@ public:
* *
* @param[in] aPlotter The plotter object to plot to. * @param[in] aPlotter The plotter object to plot to.
*/ */
void Plot( PLOTTER* aPlotter ) const; void Plot( PLOTTER* aPlotter, const SCH_PLOT_SETTINGS& aPlotSettings ) const;
/** /**
* Remove \a aItem from the schematic associated with this screen. * Remove \a aItem from the schematic associated with this screen.

View File

@ -111,7 +111,8 @@ void SCH_SHAPE::Rotate( const VECTOR2I& aCenter )
} }
void SCH_SHAPE::Plot( PLOTTER* aPlotter, bool aBackground ) const void SCH_SHAPE::Plot( PLOTTER* aPlotter, bool aBackground,
const SCH_PLOT_SETTINGS& aPlotSettings ) const
{ {
int pen_size = GetPenWidth(); int pen_size = GetPenWidth();

View File

@ -95,7 +95,8 @@ public:
void AddPoint( const VECTOR2I& aPosition ); void AddPoint( const VECTOR2I& aPosition );
void Plot( PLOTTER* aPlotter, bool aBackground ) const override; void Plot( PLOTTER* aPlotter, bool aBackground,
const SCH_PLOT_SETTINGS& aPlotSettings ) const override;
void GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>& aList ) override; void GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>& aList ) override;

View File

@ -1102,7 +1102,8 @@ bool SCH_SHEET::HitTest( const BOX2I& aRect, bool aContained, int aAccuracy ) co
} }
void SCH_SHEET::Plot( PLOTTER* aPlotter, bool aBackground ) const void SCH_SHEET::Plot( PLOTTER* aPlotter, bool aBackground,
const SCH_PLOT_SETTINGS& aPlotSettings ) const
{ {
if( aBackground && !aPlotter->GetColorMode() ) if( aBackground && !aPlotter->GetColorMode() )
return; return;
@ -1147,11 +1148,11 @@ void SCH_SHEET::Plot( PLOTTER* aPlotter, bool aBackground ) const
// Plot sheet pins // Plot sheet pins
for( SCH_SHEET_PIN* sheetPin : m_pins ) for( SCH_SHEET_PIN* sheetPin : m_pins )
sheetPin->Plot( aPlotter, aBackground ); sheetPin->Plot( aPlotter, aBackground, aPlotSettings );
// Plot the fields // Plot the fields
for( const SCH_FIELD& field : m_fields ) for( const SCH_FIELD& field : m_fields )
field.Plot( aPlotter, aBackground ); field.Plot( aPlotter, aBackground, aPlotSettings );
} }

View File

@ -381,7 +381,8 @@ public:
bool HitTest( const VECTOR2I& aPosition, int aAccuracy ) const override; bool HitTest( const VECTOR2I& aPosition, int aAccuracy ) const override;
bool HitTest( const BOX2I& aRect, bool aContained, int aAccuracy = 0 ) const override; bool HitTest( const BOX2I& aRect, bool aContained, int aAccuracy = 0 ) const override;
void Plot( PLOTTER* aPlotter, bool aBackground ) const override; void Plot( PLOTTER* aPlotter, bool aBackground,
const SCH_PLOT_SETTINGS& aPlotSettings ) const override;
EDA_ITEM* Clone() const override; EDA_ITEM* Clone() const override;

View File

@ -38,10 +38,10 @@
#include <refdes_utils.h> #include <refdes_utils.h>
#include <wx/log.h> #include <wx/log.h>
#include <settings/settings_manager.h> #include <settings/settings_manager.h>
#include <sch_plotter.h>
#include <string_utils.h> #include <string_utils.h>
#include <utility> #include <utility>
#include "plotters/plotter.h"
std::unordered_map<TRANSFORM, int> SCH_SYMBOL::s_transformToOrientationCache; std::unordered_map<TRANSFORM, int> SCH_SYMBOL::s_transformToOrientationCache;
@ -2313,7 +2313,8 @@ bool SCH_SYMBOL::IsInNetlist() const
} }
void SCH_SYMBOL::Plot( PLOTTER* aPlotter, bool aBackground ) const void SCH_SYMBOL::Plot( PLOTTER* aPlotter, bool aBackground,
const SCH_PLOT_SETTINGS& aPlotSettings ) const
{ {
if( aBackground ) if( aBackground )
return; return;
@ -2364,39 +2365,41 @@ void SCH_SYMBOL::Plot( PLOTTER* aPlotter, bool aBackground ) const
for( SCH_FIELD field : m_fields ) for( SCH_FIELD field : m_fields )
{ {
field.ClearRenderCache(); field.ClearRenderCache();
field.Plot( aPlotter, local_background ); field.Plot( aPlotter, local_background, aPlotSettings );
} }
} }
if( m_DNP ) if( m_DNP )
PlotDNP( aPlotter ); PlotDNP( aPlotter );
SCH_SHEET_PATH* sheet = &Schematic()->CurrentSheet();
// Plot attributes to a hypertext menu // Plot attributes to a hypertext menu
std::vector<wxString> properties; if( aPlotSettings.m_PDFPropertyPopups )
SCH_SHEET_PATH* sheet = &Schematic()->CurrentSheet();
for( const SCH_FIELD& field : GetFields() )
{ {
wxString text_field = field.GetShownText( sheet, false); std::vector<wxString> properties;
if( text_field.IsEmpty() ) for( const SCH_FIELD& field : GetFields() )
continue; {
wxString text_field = field.GetShownText( sheet, false);
properties.emplace_back( wxString::Format( wxT( "!%s = %s" ), if( text_field.IsEmpty() )
field.GetName(), text_field ) ); continue;
properties.emplace_back( wxString::Format( wxT( "!%s = %s" ),
field.GetName(), text_field ) );
}
if( !m_part->GetKeyWords().IsEmpty() )
{
properties.emplace_back( wxString::Format( wxT( "!%s = %s" ),
_( "Keywords" ),
m_part->GetKeyWords() ) );
}
aPlotter->HyperlinkMenu( GetBoundingBox(), properties );
} }
if( !m_part->GetKeyWords().IsEmpty() )
{
properties.emplace_back( wxString::Format( wxT( "!%s = %s" ),
_( "Keywords" ),
m_part->GetKeyWords() ) );
}
aPlotter->HyperlinkMenu( GetBoundingBox(), properties );
aPlotter->EndBlock( nullptr ); aPlotter->EndBlock( nullptr );
if( !m_part->IsPower() ) if( !m_part->IsPower() )

View File

@ -706,7 +706,8 @@ public:
bool HitTest( const VECTOR2I& aPosition, int aAccuracy = 0 ) const override; bool HitTest( const VECTOR2I& aPosition, int aAccuracy = 0 ) const override;
bool HitTest( const BOX2I& aRect, bool aContained, int aAccuracy = 0 ) const override; bool HitTest( const BOX2I& aRect, bool aContained, int aAccuracy = 0 ) const override;
void Plot( PLOTTER* aPlotter, bool aBackground ) const override; void Plot( PLOTTER* aPlotter, bool aBackground,
const SCH_PLOT_SETTINGS& aPlotSettings ) const override;
/** /**
* Plot just the symbol pins. This is separated to match the GAL display order. The pins * Plot just the symbol pins. This is separated to match the GAL display order. The pins

View File

@ -26,7 +26,7 @@
#include <base_units.h> #include <base_units.h>
#include <pgm_base.h> #include <pgm_base.h>
#include <sch_edit_frame.h> #include <sch_edit_frame.h>
#include <plotters/plotter.h> #include <sch_plotter.h>
#include <widgets/msgpanel.h> #include <widgets/msgpanel.h>
#include <bitmaps.h> #include <bitmaps.h>
#include <string_utils.h> #include <string_utils.h>
@ -351,7 +351,8 @@ void SCH_TEXT::ViewGetLayers( int aLayers[], int& aCount ) const
} }
void SCH_TEXT::Plot( PLOTTER* aPlotter, bool aBackground ) const void SCH_TEXT::Plot( PLOTTER* aPlotter, bool aBackground,
const SCH_PLOT_SETTINGS& aPlotSettings ) const
{ {
if( aBackground ) if( aBackground )
return; return;

View File

@ -129,7 +129,8 @@ public:
bool HitTest( const VECTOR2I& aPosition, int aAccuracy = 0 ) const override; bool HitTest( const VECTOR2I& aPosition, int aAccuracy = 0 ) const override;
bool HitTest( const BOX2I& aRect, bool aContained, int aAccuracy = 0 ) const override; bool HitTest( const BOX2I& aRect, bool aContained, int aAccuracy = 0 ) const override;
void Plot( PLOTTER* aPlotter, bool aBackground ) const override; void Plot( PLOTTER* aPlotter, bool aBackground,
const SCH_PLOT_SETTINGS& aPlotSettings ) const override;
EDA_ITEM* Clone() const override EDA_ITEM* Clone() const override
{ {

View File

@ -375,11 +375,12 @@ BITMAPS SCH_TEXTBOX::GetMenuImage() const
} }
void SCH_TEXTBOX::Plot( PLOTTER* aPlotter, bool aBackground ) const void SCH_TEXTBOX::Plot( PLOTTER* aPlotter, bool aBackground,
const SCH_PLOT_SETTINGS& aPlotSettings ) const
{ {
if( aBackground ) if( aBackground )
{ {
SCH_SHAPE::Plot( aPlotter, aBackground ); SCH_SHAPE::Plot( aPlotter, aBackground, aPlotSettings );
return; return;
} }

View File

@ -111,7 +111,8 @@ public:
BITMAPS GetMenuImage() const override; BITMAPS GetMenuImage() const override;
void Plot( PLOTTER* aPlotter, bool aBackground ) const override; void Plot( PLOTTER* aPlotter, bool aBackground,
const SCH_PLOT_SETTINGS& aPlotSettings ) const override;
EDA_ITEM* Clone() const override EDA_ITEM* Clone() const override
{ {