From 248399f771733e98d64a41cab87e6197523a65c3 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Wed, 11 Jan 2023 12:29:16 -0800 Subject: [PATCH] Standardize print/plot terms Use choice box for color/bw selection "border and title block" -> "drawing sheet" Fixes https://gitlab.com/kicad/code/kicad/issues/13128 --- common/dialogs/dialog_print_generic_base.cpp | 4 +- common/dialogs/dialog_print_generic_base.fbp | 12 +- common/dialogs/dialog_print_generic_base.h | 2 +- .../dialogs/dialog_print_using_printer.cpp | 13 +- .../dialog_print_using_printer_base.cpp | 28 +- .../dialog_print_using_printer_base.fbp | 202 +++++++--- .../dialogs/dialog_print_using_printer_base.h | 8 +- pcbnew/dialogs/dialog_plot.cpp | 8 +- pcbnew/dialogs/dialog_plot_base.cpp | 38 +- pcbnew/dialogs/dialog_plot_base.fbp | 355 ++++++++++++++---- pcbnew/dialogs/dialog_plot_base.h | 8 +- 11 files changed, 506 insertions(+), 172 deletions(-) diff --git a/common/dialogs/dialog_print_generic_base.cpp b/common/dialogs/dialog_print_generic_base.cpp index 8380348f39..1df0927604 100644 --- a/common/dialogs/dialog_print_generic_base.cpp +++ b/common/dialogs/dialog_print_generic_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b) +// C++ code generated with wxFormBuilder (version 3.10.1-254-gc2ef7767) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -38,7 +38,7 @@ DIALOG_PRINT_GENERIC_BASE::DIALOG_PRINT_GENERIC_BASE( wxWindow* parent, wxWindow m_outputMode->SetSelection( 0 ); m_gbOptionsSizer->Add( m_outputMode, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - m_titleBlock = new wxCheckBox( m_sbOptionsSizer->GetStaticBox(), wxID_FRAME_SEL, _("Print border and title block"), wxDefaultPosition, wxDefaultSize, 0 ); + m_titleBlock = new wxCheckBox( m_sbOptionsSizer->GetStaticBox(), wxID_FRAME_SEL, _("Print drawing sheet"), wxDefaultPosition, wxDefaultSize, 0 ); m_titleBlock->SetValue(true); m_titleBlock->SetToolTip( _("Print Frame references.") ); diff --git a/common/dialogs/dialog_print_generic_base.fbp b/common/dialogs/dialog_print_generic_base.fbp index 8303b5df2d..72044b749c 100644 --- a/common/dialogs/dialog_print_generic_base.fbp +++ b/common/dialogs/dialog_print_generic_base.fbp @@ -36,6 +36,7 @@ wxBOTH 1 + 0 1 impl_virtual @@ -135,6 +136,7 @@ Dock 0 Left + 0 1 1 @@ -200,6 +202,7 @@ Dock 0 Left + 0 1 1 @@ -267,6 +270,7 @@ Dock 0 Left + 0 1 1 @@ -274,7 +278,7 @@ 0 0 wxID_FRAME_SEL - Print border and title block + Print drawing sheet 0 @@ -346,6 +350,7 @@ Dock 0 Left + 0 1 1 @@ -420,6 +425,7 @@ Dock 0 Left + 0 1 1 @@ -503,6 +509,7 @@ Dock 0 Left + 0 1 1 @@ -567,6 +574,7 @@ Dock 0 Left + 0 1 1 @@ -649,6 +657,7 @@ Dock 0 Left + 0 1 1 @@ -726,6 +735,7 @@ Dock 0 Left + 0 1 1 diff --git a/common/dialogs/dialog_print_generic_base.h b/common/dialogs/dialog_print_generic_base.h index 38be135535..f37d75d5ea 100644 --- a/common/dialogs/dialog_print_generic_base.h +++ b/common/dialogs/dialog_print_generic_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b) +// C++ code generated with wxFormBuilder (version 3.10.1-254-gc2ef7767) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! diff --git a/eeschema/dialogs/dialog_print_using_printer.cpp b/eeschema/dialogs/dialog_print_using_printer.cpp index b5d5e2c9bc..e9f6f3f651 100644 --- a/eeschema/dialogs/dialog_print_using_printer.cpp +++ b/eeschema/dialogs/dialog_print_using_printer.cpp @@ -45,7 +45,7 @@ public: ~DIALOG_PRINT_USING_PRINTER() override; protected: - void OnMonochromeChecked( wxCommandEvent& event ) override; + void OnOutputChoice( wxCommandEvent& event ) override; void OnUseColorThemeChecked( wxCommandEvent& event ) override; private: @@ -173,7 +173,7 @@ bool DIALOG_PRINT_USING_PRINTER::TransferDataToWindow() } m_checkReference->SetValue( cfg->m_Printing.title_block ); - m_checkMonochrome->SetValue( cfg->m_Printing.monochrome ); + m_colorPrint->SetSelection( cfg->m_Printing.monochrome ? 1 : 0 ); m_checkBackgroundColor->SetValue( cfg->m_Printing.background ); m_checkUseColorTheme->SetValue( cfg->m_Printing.use_theme ); @@ -230,11 +230,12 @@ void DIALOG_PRINT_USING_PRINTER::OnUseColorThemeChecked( wxCommandEvent& event ) } -void DIALOG_PRINT_USING_PRINTER::OnMonochromeChecked( wxCommandEvent& event ) +void DIALOG_PRINT_USING_PRINTER::OnOutputChoice( wxCommandEvent& event ) { - m_checkBackgroundColor->Enable( !m_checkMonochrome->GetValue() ); + long sel = event.GetSelection(); + m_checkBackgroundColor->Enable( sel == 0 ); - if( m_checkMonochrome->GetValue() ) + if( sel ) m_checkBackgroundColor->SetValue( false ); else m_checkBackgroundColor->SetValue( m_parent->eeconfig()->m_Printing.background ); @@ -245,7 +246,7 @@ void DIALOG_PRINT_USING_PRINTER::SavePrintOptions() { EESCHEMA_SETTINGS* cfg = m_parent->eeconfig(); - cfg->m_Printing.monochrome = m_checkMonochrome->IsChecked(); + cfg->m_Printing.monochrome = !!m_colorPrint->GetSelection(); cfg->m_Printing.title_block = m_checkReference->IsChecked(); if( m_checkBackgroundColor->IsEnabled() ) diff --git a/eeschema/dialogs/dialog_print_using_printer_base.cpp b/eeschema/dialogs/dialog_print_using_printer_base.cpp index d43367746f..f5960bbb96 100644 --- a/eeschema/dialogs/dialog_print_using_printer_base.cpp +++ b/eeschema/dialogs/dialog_print_using_printer_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b) +// C++ code generated with wxFormBuilder (version 3.10.1-254-gc2ef7767) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -19,15 +19,29 @@ DIALOG_PRINT_USING_PRINTER_BASE::DIALOG_PRINT_USING_PRINTER_BASE( wxWindow* pare wxBoxSizer* bleftSizer; bleftSizer = new wxBoxSizer( wxVERTICAL ); - m_checkReference = new wxCheckBox( this, wxID_ANY, _("Print sheet &reference and title block"), wxDefaultPosition, wxDefaultSize, 0 ); + m_checkReference = new wxCheckBox( this, wxID_ANY, _("Print drawing sheet"), wxDefaultPosition, wxDefaultSize, 0 ); m_checkReference->SetValue(true); m_checkReference->SetToolTip( _("Print (or not) the Frame references.") ); bleftSizer->Add( m_checkReference, 0, wxALL, 5 ); - m_checkMonochrome = new wxCheckBox( this, wxID_ANY, _("Print in &black and white only"), wxDefaultPosition, wxDefaultSize, 0 ); - m_checkMonochrome->SetValue(true); - bleftSizer->Add( m_checkMonochrome, 0, wxALL, 5 ); + wxBoxSizer* bSizer41; + bSizer41 = new wxBoxSizer( wxHORIZONTAL ); + + m_staticText1 = new wxStaticText( this, wxID_ANY, _("Output mode:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText1->Wrap( -1 ); + bSizer41->Add( m_staticText1, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 30 ); + + wxString m_colorPrintChoices[] = { _("Color"), _("Black and White") }; + int m_colorPrintNChoices = sizeof( m_colorPrintChoices ) / sizeof( wxString ); + m_colorPrint = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_colorPrintNChoices, m_colorPrintChoices, 0 ); + m_colorPrint->SetSelection( 0 ); + m_colorPrint->SetMinSize( wxSize( 200,-1 ) ); + + bSizer41->Add( m_colorPrint, 0, wxLEFT, 25 ); + + + bleftSizer->Add( bSizer41, 1, wxEXPAND, 5 ); m_checkBackgroundColor = new wxCheckBox( this, wxID_ANY, _("Print background color"), wxDefaultPosition, wxDefaultSize, 0 ); bleftSizer->Add( m_checkBackgroundColor, 0, wxALL, 5 ); @@ -83,7 +97,7 @@ DIALOG_PRINT_USING_PRINTER_BASE::DIALOG_PRINT_USING_PRINTER_BASE( wxWindow* pare // Connect Events this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_PRINT_USING_PRINTER_BASE::OnCloseWindow ) ); - m_checkMonochrome->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_BASE::OnMonochromeChecked ), NULL, this ); + m_colorPrint->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_BASE::OnOutputChoice ), NULL, this ); m_checkUseColorTheme->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_BASE::OnUseColorThemeChecked ), NULL, this ); m_buttonPageSetup->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_BASE::OnPageSetup ), NULL, this ); m_sdbSizer1Apply->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_BASE::OnPrintPreview ), NULL, this ); @@ -93,7 +107,7 @@ DIALOG_PRINT_USING_PRINTER_BASE::~DIALOG_PRINT_USING_PRINTER_BASE() { // Disconnect Events this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_PRINT_USING_PRINTER_BASE::OnCloseWindow ) ); - m_checkMonochrome->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_BASE::OnMonochromeChecked ), NULL, this ); + m_colorPrint->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_BASE::OnOutputChoice ), NULL, this ); m_checkUseColorTheme->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_BASE::OnUseColorThemeChecked ), NULL, this ); m_buttonPageSetup->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_BASE::OnPageSetup ), NULL, this ); m_sdbSizer1Apply->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_BASE::OnPrintPreview ), NULL, this ); diff --git a/eeschema/dialogs/dialog_print_using_printer_base.fbp b/eeschema/dialogs/dialog_print_using_printer_base.fbp index cb849f8424..94af64bde1 100644 --- a/eeschema/dialogs/dialog_print_using_printer_base.fbp +++ b/eeschema/dialogs/dialog_print_using_printer_base.fbp @@ -36,6 +36,7 @@ 1 + 0 1 impl_virtual @@ -97,6 +98,7 @@ Dock 0 Left + 0 1 1 @@ -104,7 +106,7 @@ 0 0 wxID_ANY - Print sheet &reference and title block + Print drawing sheet 0 @@ -137,67 +139,141 @@ 5 - wxALL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Print in &black and white only - - 0 - - - 0 + wxEXPAND + 1 + - 1 - m_checkMonochrome - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - OnMonochromeChecked + bSizer41 + wxHORIZONTAL + none + + 30 + wxALIGN_CENTER_VERTICAL|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Output mode: + 0 + + 0 + + + 0 + + 1 + m_staticText1 + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + 25 + wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + "Color" "Black and White" + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + 200,-1 + 1 + m_colorPrint + 1 + + + protected + 1 + + Resizable + 0 + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + OnOutputChoice + + @@ -226,6 +302,7 @@ Dock 0 Left + 0 1 1 @@ -290,6 +367,7 @@ Dock 0 Left + 0 1 1 @@ -364,6 +442,7 @@ Dock 0 Left + 0 0 1 @@ -445,6 +524,7 @@ Dock 0 Left + 0 1 1 diff --git a/eeschema/dialogs/dialog_print_using_printer_base.h b/eeschema/dialogs/dialog_print_using_printer_base.h index ae9d7a72c7..1ce3757ebf 100644 --- a/eeschema/dialogs/dialog_print_using_printer_base.h +++ b/eeschema/dialogs/dialog_print_using_printer_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b) +// C++ code generated with wxFormBuilder (version 3.10.1-254-gc2ef7767) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -36,7 +37,8 @@ class DIALOG_PRINT_USING_PRINTER_BASE : public DIALOG_SHIM protected: wxCheckBox* m_checkReference; - wxCheckBox* m_checkMonochrome; + wxStaticText* m_staticText1; + wxChoice* m_colorPrint; wxCheckBox* m_checkBackgroundColor; wxCheckBox* m_checkUseColorTheme; wxChoice* m_colorTheme; @@ -48,7 +50,7 @@ class DIALOG_PRINT_USING_PRINTER_BASE : public DIALOG_SHIM // Virtual event handlers, override them in your derived class virtual void OnCloseWindow( wxCloseEvent& event ) { event.Skip(); } - virtual void OnMonochromeChecked( wxCommandEvent& event ) { event.Skip(); } + virtual void OnOutputChoice( wxCommandEvent& event ) { event.Skip(); } virtual void OnUseColorThemeChecked( wxCommandEvent& event ) { event.Skip(); } virtual void OnPageSetup( wxCommandEvent& event ) { event.Skip(); } virtual void OnPrintPreview( wxCommandEvent& event ) { event.Skip(); } diff --git a/pcbnew/dialogs/dialog_plot.cpp b/pcbnew/dialogs/dialog_plot.cpp index d087ef293a..34963e8d9c 100644 --- a/pcbnew/dialogs/dialog_plot.cpp +++ b/pcbnew/dialogs/dialog_plot.cpp @@ -334,8 +334,8 @@ void DIALOG_PLOT::init_Dialog() m_plotNoViaOnMaskOpt->SetValue( m_plotOpts.GetPlotViaOnMaskLayer() ); // Black and white plotting - m_SVGBlackAndWhite->SetValue( m_plotOpts.GetBlackAndWhite() ); - m_PDFBlackAndWhite->SetValue( m_plotOpts.GetBlackAndWhite() ); + m_SVGColorChoice->SetSelection( m_plotOpts.GetBlackAndWhite() ? 1 : 0 ); + m_PDFColorChoice->SetSelection( m_plotOpts.GetBlackAndWhite() ? 1 : 0 ); // Initialize a few other parameters, which can also be modified // from the drill dialog @@ -798,9 +798,9 @@ void DIALOG_PLOT::applyPlotSettings() PLOT_TEXT_MODE::NATIVE ); if( getPlotFormat() == PLOT_FORMAT::SVG ) - tempOptions.SetBlackAndWhite( m_SVGBlackAndWhite->GetValue() ); + tempOptions.SetBlackAndWhite( !!m_SVGColorChoice->GetSelection() ); else if( getPlotFormat() == PLOT_FORMAT::PDF ) - tempOptions.SetBlackAndWhite( m_PDFBlackAndWhite->GetValue() ); + tempOptions.SetBlackAndWhite( !!m_PDFColorChoice->GetSelection() ); else tempOptions.SetBlackAndWhite( true ); diff --git a/pcbnew/dialogs/dialog_plot_base.cpp b/pcbnew/dialogs/dialog_plot_base.cpp index 4e7df2cc22..5a6d89a0ae 100644 --- a/pcbnew/dialogs/dialog_plot_base.cpp +++ b/pcbnew/dialogs/dialog_plot_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b) +// C++ code generated with wxFormBuilder (version 3.10.1-254-gc2ef7767) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -72,7 +72,7 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr gbSizer1->SetFlexibleDirection( wxHORIZONTAL ); gbSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - m_plotSheetRef = new wxCheckBox( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("Plot border and title block"), wxDefaultPosition, wxDefaultSize, 0 ); + m_plotSheetRef = new wxCheckBox( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("Plot drawing sheet"), wxDefaultPosition, wxDefaultSize, 0 ); m_plotSheetRef->SetMinSize( wxSize( 280,-1 ) ); gbSizer1->Add( m_plotSheetRef, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 ); @@ -370,17 +370,22 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr svgPrecisionLabel = new wxStaticText( m_svgOptionsSizer->GetStaticBox(), wxID_ANY, _("Precision:"), wxDefaultPosition, wxDefaultSize, 0 ); svgPrecisionLabel->Wrap( -1 ); - gbSizer3->Add( svgPrecisionLabel, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALL, 5 ); + gbSizer3->Add( svgPrecisionLabel, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxALL, 5 ); m_svgPrecsision = new wxSpinCtrl( m_svgOptionsSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 3, 6, 4 ); m_svgPrecsision->SetToolTip( _("This number defines how many digits are exported that are below 1 mm.\nUser unit is 10^- mm\nChoose 4 if you are not sure.") ); gbSizer3->Add( m_svgPrecsision, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), wxALL, 5 ); - m_SVGBlackAndWhite = new wxCheckBox( m_svgOptionsSizer->GetStaticBox(), wxID_ANY, _("Plot in black and white"), wxDefaultPosition, wxDefaultSize, 0 ); - m_SVGBlackAndWhite->SetToolTip( _("When disabled, the color from the chosen layer will be used to plot.") ); + wxString m_SVGColorChoiceChoices[] = { _("Color"), _("Black and white") }; + int m_SVGColorChoiceNChoices = sizeof( m_SVGColorChoiceChoices ) / sizeof( wxString ); + m_SVGColorChoice = new wxChoice( m_svgOptionsSizer->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_SVGColorChoiceNChoices, m_SVGColorChoiceChoices, 0 ); + m_SVGColorChoice->SetSelection( 0 ); + gbSizer3->Add( m_SVGColorChoice, wxGBPosition( 1, 1 ), wxGBSpan( 1, 1 ), wxALL, 5 ); - gbSizer3->Add( m_SVGBlackAndWhite, wxGBPosition( 0, 2 ), wxGBSpan( 1, 1 ), wxALL, 5 ); + m_staticText18 = new wxStaticText( m_svgOptionsSizer->GetStaticBox(), wxID_ANY, _("Output mode:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText18->Wrap( -1 ); + gbSizer3->Add( m_staticText18, wxGBPosition( 1, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxALL, 5 ); m_svgOptionsSizer->Add( gbSizer3, 1, wxEXPAND, 5 ); @@ -388,12 +393,25 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr m_PlotOptionsSizer->Add( m_svgOptionsSizer, 1, wxEXPAND|wxALL, 5 ); - m_PDFOptionsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("PDF Options") ), wxVERTICAL ); + m_PDFOptionsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("PDF Options") ), wxHORIZONTAL ); - m_PDFBlackAndWhite = new wxCheckBox( m_PDFOptionsSizer->GetStaticBox(), wxID_ANY, _("Plot in black and white"), wxDefaultPosition, wxDefaultSize, 0 ); - m_PDFBlackAndWhite->SetToolTip( _("When disabled, the color from the chosen layer will be used to plot.") ); + wxGridBagSizer* gbSizer4; + gbSizer4 = new wxGridBagSizer( 0, 0 ); + gbSizer4->SetFlexibleDirection( wxBOTH ); + gbSizer4->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - m_PDFOptionsSizer->Add( m_PDFBlackAndWhite, 0, wxALL, 5 ); + wxString m_PDFColorChoiceChoices[] = { _("Color"), _("Black and white") }; + int m_PDFColorChoiceNChoices = sizeof( m_PDFColorChoiceChoices ) / sizeof( wxString ); + m_PDFColorChoice = new wxChoice( m_PDFOptionsSizer->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_PDFColorChoiceNChoices, m_PDFColorChoiceChoices, 0 ); + m_PDFColorChoice->SetSelection( 0 ); + gbSizer4->Add( m_PDFColorChoice, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), wxALL, 5 ); + + m_staticText19 = new wxStaticText( m_PDFOptionsSizer->GetStaticBox(), wxID_ANY, _("Output mode:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText19->Wrap( -1 ); + gbSizer4->Add( m_staticText19, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + + m_PDFOptionsSizer->Add( gbSizer4, 1, wxEXPAND, 5 ); m_PlotOptionsSizer->Add( m_PDFOptionsSizer, 1, wxALL|wxEXPAND, 5 ); diff --git a/pcbnew/dialogs/dialog_plot_base.fbp b/pcbnew/dialogs/dialog_plot_base.fbp index 3a36a596cc..e45f8a0e64 100644 --- a/pcbnew/dialogs/dialog_plot_base.fbp +++ b/pcbnew/dialogs/dialog_plot_base.fbp @@ -36,6 +36,7 @@ wxBOTH 1 + 0 1 impl_virtual @@ -97,6 +98,7 @@ Dock 0 Left + 0 1 1 @@ -159,6 +161,7 @@ Dock 0 Left + 0 1 1 @@ -233,6 +236,7 @@ Dock 0 Left + 0 1 1 @@ -294,6 +298,7 @@ Dock 0 Left + 0 1 1 @@ -363,6 +368,7 @@ Dock 0 Left + 0 1 1 @@ -456,6 +462,7 @@ Dock 0 Left + 0 1 1 @@ -561,6 +568,7 @@ Dock 0 Left + 0 1 1 @@ -568,7 +576,7 @@ 0 0 wxID_ANY - Plot border and title block + Plot drawing sheet 0 @@ -628,6 +636,7 @@ Dock 0 Left + 0 1 1 @@ -695,6 +704,7 @@ Dock 0 Left + 0 1 1 @@ -762,6 +772,7 @@ Dock 0 Left + 0 1 1 @@ -829,6 +840,7 @@ Dock 0 Left + 0 1 1 @@ -896,6 +908,7 @@ Dock 0 Left + 0 1 1 @@ -963,6 +976,7 @@ Dock 0 Left + 0 1 1 @@ -1029,6 +1043,7 @@ Dock 0 Left + 0 1 1 @@ -1094,6 +1109,7 @@ Dock 0 Left + 0 1 1 @@ -1160,6 +1176,7 @@ Dock 0 Left + 0 1 1 @@ -1225,6 +1242,7 @@ Dock 0 Left + 0 1 1 @@ -1292,6 +1310,7 @@ Dock 0 Left + 0 1 1 @@ -1357,6 +1376,7 @@ Dock 0 Left + 0 1 1 @@ -1424,6 +1444,7 @@ Dock 0 Left + 0 1 1 @@ -1491,6 +1512,7 @@ Dock 0 Left + 0 1 1 @@ -1558,6 +1580,7 @@ Dock 0 Left + 0 1 1 @@ -1635,6 +1658,7 @@ Dock 0 Left + 0 1 1 @@ -1701,6 +1725,7 @@ Dock 0 Left + 0 1 1 @@ -1762,6 +1787,7 @@ Dock 0 Left + 0 1 1 @@ -1842,6 +1868,7 @@ Dock 0 Left + 0 1 1 @@ -1943,6 +1970,7 @@ Dock 0 Left + 0 1 1 @@ -2010,6 +2038,7 @@ Dock 0 Left + 0 1 1 @@ -2077,6 +2106,7 @@ Dock 0 Left + 0 1 1 @@ -2143,6 +2173,7 @@ Dock 0 Left + 0 1 1 @@ -2208,6 +2239,7 @@ Dock 0 Left + 0 1 1 @@ -2275,6 +2307,7 @@ Dock 0 Left + 0 1 1 @@ -2343,6 +2376,7 @@ Dock 0 Left + 0 1 1 @@ -2410,6 +2444,7 @@ Dock 0 Left + 0 1 1 @@ -2489,6 +2524,7 @@ Dock 0 Left + 0 1 1 @@ -2550,6 +2586,7 @@ Dock 0 Left + 0 1 1 @@ -2614,6 +2651,7 @@ Dock 0 Left + 0 1 1 @@ -2715,6 +2753,7 @@ Dock 0 Left + 0 1 1 @@ -2776,6 +2815,7 @@ Dock 0 Left + 0 1 1 @@ -2850,6 +2890,7 @@ Dock 0 Left + 0 1 1 @@ -2911,6 +2952,7 @@ Dock 0 Left + 0 1 1 @@ -2985,6 +3027,7 @@ Dock 0 Left + 0 1 1 @@ -3046,6 +3089,7 @@ Dock 0 Left + 0 1 1 @@ -3110,6 +3154,7 @@ Dock 0 Left + 0 1 1 @@ -3174,6 +3219,7 @@ Dock 0 Left + 0 1 1 @@ -3261,6 +3307,7 @@ Dock 0 Left + 0 1 1 @@ -3326,6 +3373,7 @@ Dock 0 Left + 0 1 1 @@ -3410,6 +3458,7 @@ Dock 0 Left + 0 1 1 @@ -3472,6 +3521,7 @@ Dock 0 Left + 0 1 1 @@ -3545,7 +3595,7 @@ 5 1 0 - wxALL + wxALIGN_CENTER_VERTICAL|wxALL 0 1 @@ -3569,6 +3619,7 @@ Dock 0 Left + 0 1 1 @@ -3633,6 +3684,7 @@ Dock 0 Left + 0 1 1 @@ -3673,11 +3725,11 @@ 5 1 - 2 + 1 wxALL - 0 + 1 1 - + 1 1 1 @@ -3691,7 +3743,7 @@ 1 0 - 0 + "Color" "Black and white" 1 1 @@ -3699,6 +3751,7 @@ Dock 0 Left + 0 1 1 @@ -3706,7 +3759,6 @@ 0 0 wxID_ANY - Plot in black and white 0 @@ -3714,7 +3766,76 @@ 0 1 - m_SVGBlackAndWhite + m_SVGColorChoice + 1 + + + protected + 1 + + Resizable + 0 + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 5 + 1 + 0 + wxALIGN_CENTER_VERTICAL|wxALL + 1 + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Output mode: + 0 + + 0 + + + 0 + + 1 + m_staticText18 1 @@ -3725,16 +3846,13 @@ 1 - + ; ; forward_declare 0 - When disabled, the color from the chosen layer will be used to plot. - - wxFILTER_NONE - wxDefaultValidator - + + -1 @@ -3750,71 +3868,157 @@ PDF Options m_PDFOptionsSizer - wxVERTICAL + wxHORIZONTAL 1 protected 5 - wxALL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Plot in black and white - - 0 - - - 0 + wxEXPAND + 1 + + + wxBOTH + + + 0 - 1 - m_PDFBlackAndWhite - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - When disabled, the color from the chosen layer will be used to plot. - - wxFILTER_NONE - wxDefaultValidator - - - - + gbSizer4 + wxFLEX_GROWMODE_SPECIFIED + none + 0 + + 5 + 1 + 1 + wxALL + 0 + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + "Color" "Black and white" + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_PDFColorChoice + 1 + + + protected + 1 + + Resizable + 0 + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 5 + 1 + 0 + wxALIGN_CENTER_VERTICAL|wxALL + 0 + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Output mode: + 0 + + 0 + + + 0 + + 1 + m_staticText19 + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + @@ -3857,6 +4061,7 @@ Dock 0 Left + 0 1 1 @@ -3930,6 +4135,7 @@ Dock 0 Left + 0 1 1 @@ -3999,6 +4205,7 @@ Dock 0 Left + 0 1 1 diff --git a/pcbnew/dialogs/dialog_plot_base.h b/pcbnew/dialogs/dialog_plot_base.h index 636db4be73..90e859788d 100644 --- a/pcbnew/dialogs/dialog_plot_base.h +++ b/pcbnew/dialogs/dialog_plot_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b) +// C++ code generated with wxFormBuilder (version 3.10.1-254-gc2ef7767) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -122,9 +122,11 @@ class DIALOG_PLOT_BASE : public DIALOG_SHIM wxStaticBoxSizer* m_svgOptionsSizer; wxStaticText* svgPrecisionLabel; wxSpinCtrl* m_svgPrecsision; - wxCheckBox* m_SVGBlackAndWhite; + wxChoice* m_SVGColorChoice; + wxStaticText* m_staticText18; wxStaticBoxSizer* m_PDFOptionsSizer; - wxCheckBox* m_PDFBlackAndWhite; + wxChoice* m_PDFColorChoice; + wxStaticText* m_staticText19; WX_HTML_REPORT_PANEL* m_messagesPanel; wxBoxSizer* m_sizerButtons; wxButton* m_buttonDRC;