ADDED: Enable color themes for schematic printing

This commit is contained in:
Jon Evans 2020-05-16 10:47:43 -04:00
parent fca3fb0e11
commit d599648ec7
9 changed files with 590 additions and 330 deletions

View File

@ -66,10 +66,19 @@ APP_SETTINGS_BASE::APP_SETTINGS_BASE( std::string aFilename, int aSchemaVersion
m_params.emplace_back(
new PARAM<int>( "lib_tree.column_width", &m_LibTree.column_width, 360 ) );
m_params.emplace_back(
new PARAM<bool>( "printing.background", &m_Printing.background, false ) );
m_params.emplace_back( new PARAM<bool>( "printing.monochrome", &m_Printing.monochrome, true ) );
m_params.emplace_back( new PARAM<double>( "printing.scale", &m_Printing.scale, 1.0 ) );
m_params.emplace_back(
new PARAM<bool>( "printing.use_theme", &m_Printing.use_theme, false ) );
m_params.emplace_back(
new PARAM<wxString>( "printing.color_theme", &m_Printing.color_theme, "" ) );
m_params.emplace_back( new PARAM<bool>( "printing.title_block",
&m_Printing.title_block, false ) );

View File

@ -30,6 +30,8 @@
#include <sch_edit_frame.h>
#include <base_units.h>
#include <general.h>
#include <settings/color_settings.h>
#include <settings/settings_manager.h>
#include <sch_sheet.h>
#include <sch_sheet_path.h>
#include <dialog_print_using_printer_base.h>
@ -41,6 +43,10 @@ public:
DIALOG_PRINT_USING_PRINTER( SCH_EDIT_FRAME* aParent );
~DIALOG_PRINT_USING_PRINTER() override;
protected:
void OnMonochromeChecked( wxCommandEvent& event ) override;
void OnUseColorThemeChecked( wxCommandEvent& event ) override;
private:
bool TransferDataToWindow() override;
bool TransferDataFromWindow() override;
@ -48,7 +54,7 @@ private:
void OnPageSetup( wxCommandEvent& event ) override;
void OnPrintPreview( wxCommandEvent& event ) override;
void GetPrintOptions();
void SavePrintOptions();
SCH_EDIT_FRAME* m_parent;
};
@ -132,10 +138,7 @@ DIALOG_PRINT_USING_PRINTER::DIALOG_PRINT_USING_PRINTER( SCH_EDIT_FRAME* aParent
DIALOG_PRINT_USING_PRINTER_BASE( aParent ),
m_parent( aParent )
{
wxASSERT( aParent != NULL );
m_checkReference->SetValue( aParent->GetPrintSheetReference() );
m_checkMonochrome->SetValue( aParent->GetPrintMonochrome() );
wxASSERT( aParent );
// We use a sdbSizer to get platform-dependent ordering of the action buttons, but
// that requires us to correct the button labels here.
@ -159,12 +162,43 @@ DIALOG_PRINT_USING_PRINTER::DIALOG_PRINT_USING_PRINTER( SCH_EDIT_FRAME* aParent
DIALOG_PRINT_USING_PRINTER::~DIALOG_PRINT_USING_PRINTER()
{
GetPrintOptions();
SavePrintOptions();
}
bool DIALOG_PRINT_USING_PRINTER::TransferDataToWindow()
{
EESCHEMA_SETTINGS* cfg = m_parent->eeconfig();
m_checkReference->SetValue( cfg->m_Printing.title_block );
m_checkMonochrome->SetValue( cfg->m_Printing.monochrome );
m_checkBackgroundColor->SetValue( cfg->m_Printing.background );
m_checkUseColorTheme->SetValue( cfg->m_Printing.use_theme );
m_colorTheme->Clear();
int width = 0;
int height = 0;
int minwidth = width;
wxString target = cfg->m_Printing.use_theme ? cfg->m_Printing.color_theme : cfg->m_ColorTheme;
for( COLOR_SETTINGS* settings : Pgm().GetSettingsManager().GetColorSettingsList() )
{
int pos = m_colorTheme->Append( settings->GetName(), static_cast<void*>( settings ) );
if( settings->GetFilename() == target )
m_colorTheme->SetSelection( pos );
m_colorTheme->GetTextExtent( settings->GetName(), &width, &height );
minwidth = std::max( minwidth, width );
}
m_colorTheme->SetMinSize( wxSize( minwidth + 50, -1 ) );
m_lblTheme->Enable( cfg->m_Printing.use_theme );
m_colorTheme->Enable( cfg->m_Printing.use_theme );
// Initialize page specific print setup dialog settings.
const PAGE_INFO& pageInfo = m_parent->GetScreen()->GetPageSettings();
wxPageSetupDialogData& pageSetupDialogData = m_parent->GetPageSetupData();
@ -183,14 +217,44 @@ bool DIALOG_PRINT_USING_PRINTER::TransferDataToWindow()
pageSetupDialogData.GetPrintData().SetOrientation( pageInfo.GetWxOrientation() );
Layout();
return true;
}
void DIALOG_PRINT_USING_PRINTER::GetPrintOptions()
void DIALOG_PRINT_USING_PRINTER::OnUseColorThemeChecked( wxCommandEvent& event )
{
m_parent->SetPrintMonochrome( m_checkMonochrome->IsChecked() );
m_parent->SetPrintSheetReference( m_checkReference->IsChecked() );
m_lblTheme->Enable( m_checkUseColorTheme->GetValue() );
m_colorTheme->Enable( m_checkUseColorTheme->GetValue() );
}
void DIALOG_PRINT_USING_PRINTER::OnMonochromeChecked( wxCommandEvent& event )
{
m_checkBackgroundColor->Enable( !m_checkMonochrome->GetValue() );
if( m_checkMonochrome->GetValue() )
m_checkBackgroundColor->SetValue( false );
else
m_checkBackgroundColor->SetValue( m_parent->eeconfig()->m_Printing.background );
}
void DIALOG_PRINT_USING_PRINTER::SavePrintOptions()
{
EESCHEMA_SETTINGS* cfg = m_parent->eeconfig();
cfg->m_Printing.monochrome = m_checkMonochrome->IsChecked();
cfg->m_Printing.title_block = m_checkReference->IsChecked();
cfg->m_Printing.background = m_checkBackgroundColor->IsChecked();
cfg->m_Printing.use_theme = m_checkUseColorTheme->IsChecked();
COLOR_SETTINGS* theme = static_cast<COLOR_SETTINGS*>(
m_colorTheme->GetClientData( m_colorTheme->GetSelection() ) );
if( theme && m_checkUseColorTheme->IsChecked() )
cfg->m_Printing.color_theme = theme->GetFilename();
}
@ -209,7 +273,7 @@ void DIALOG_PRINT_USING_PRINTER::OnPageSetup( wxCommandEvent& event )
*/
void DIALOG_PRINT_USING_PRINTER::OnPrintPreview( wxCommandEvent& event )
{
GetPrintOptions();
SavePrintOptions();
// Pass two printout objects: for preview, and possible printing.
wxString title = _( "Preview" );
@ -253,7 +317,7 @@ bool DIALOG_PRINT_USING_PRINTER::TransferDataFromWindow()
return false;
}
GetPrintOptions();
SavePrintOptions();
wxPrintDialogData printDialogData( m_parent->GetPageSetupData().GetPrintData() );
printDialogData.SetMaxPage( g_RootSheet->CountSheets() );
@ -331,13 +395,15 @@ bool SCH_PRINTOUT::OnBeginDocument( int startPage, int endPage )
return false;
#ifdef DEBUG
EESCHEMA_SETTINGS* cfg = m_parent->eeconfig();
wxLogDebug( wxT( "Printer name: " ) +
m_parent->GetPageSetupData().GetPrintData().GetPrinterName() );
wxLogDebug( wxT( "Paper ID: %d" ),
m_parent->GetPageSetupData().GetPrintData().GetPaperId() );
wxLogDebug( wxT( "Color: %d" ),
(int)m_parent->GetPageSetupData().GetPrintData().GetColour() );
wxLogDebug( wxT( "Monochrome: %d" ), m_parent->GetPrintMonochrome() );
wxLogDebug( wxT( "Monochrome: %d" ), cfg->m_Printing.monochrome );
wxLogDebug( wxT( "Orientation: %d:" ),
m_parent->GetPageSetupData().GetPrintData().GetOrientation() );
wxLogDebug( wxT( "Quality: %d"),
@ -367,8 +433,12 @@ void SCH_PRINTOUT::PrintPage( SCH_SCREEN* aScreen )
oldZoom = aScreen->GetZoom();
old_org = aScreen->m_DrawOrg;
SETTINGS_MANAGER& mgr = Pgm().GetSettingsManager();
EESCHEMA_SETTINGS* cfg = m_parent->eeconfig();
COLOR_SETTINGS* theme = mgr.GetColorSettings( cfg->m_Printing.color_theme );
// Change scale factor and offset to print the whole page.
bool printReference = m_parent->GetPrintSheetReference();
bool printReference = cfg->m_Printing.title_block;
pageSizeIU = aScreen->GetPageSettings().GetSizeIU();
FitThisSizeToPaper( pageSizeIU );
@ -415,17 +485,33 @@ void SCH_PRINTOUT::PrintPage( SCH_SCREEN* aScreen )
aScreen->m_IsPrinting = true;
COLOR4D bgColor = m_parent->GetDrawBgColor();
m_parent->SetDrawBgColor( COLOR4D::WHITE );
COLOR4D savedBgColor = m_parent->GetDrawBgColor();
COLOR4D bgColor = m_parent->GetColorSettings()->GetColor( LAYER_SCHEMATIC_BACKGROUND );
if( cfg->m_Printing.background )
{
if( cfg->m_Printing.use_theme && theme )
bgColor = theme->GetColor( LAYER_SCHEMATIC_BACKGROUND );
}
else
{
bgColor = COLOR4D::WHITE;
}
m_parent->SetDrawBgColor( bgColor );
GRSFilledRect( nullptr, dc, fitRect.GetX(), fitRect.GetY(), fitRect.GetRight(),
fitRect.GetBottom(), 0, COLOR4D::WHITE, COLOR4D::WHITE );
fitRect.GetBottom(), 0, bgColor, bgColor );
if( m_parent->GetPrintMonochrome() )
if( cfg->m_Printing.monochrome )
GRForceBlackPen( true );
KIGFX::SCH_RENDER_SETTINGS renderSettings( *m_parent->GetRenderSettings() );
renderSettings.SetPrintDC( dc );
if( cfg->m_Printing.use_theme && theme )
renderSettings.LoadColors( theme );
// The worksheet item print code is shared between PCBNew and EESchema, so it's easier
// if they just use the PCB layer.
renderSettings.SetLayerColor( LAYER_WORKSHEET,
@ -439,7 +525,7 @@ void SCH_PRINTOUT::PrintPage( SCH_SCREEN* aScreen )
aScreen->Print( &renderSettings );
m_parent->SetDrawBgColor( bgColor );
m_parent->SetDrawBgColor( savedBgColor );
aScreen->m_IsPrinting = false;
GRForceBlackPen( false );

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Dec 30 2017)
// C++ code generated with wxFormBuilder (version Oct 26 2018)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@ -12,38 +12,64 @@
DIALOG_PRINT_USING_PRINTER_BASE::DIALOG_PRINT_USING_PRINTER_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
{
this->SetSizeHints( wxSize( -1,-1 ), wxDefaultSize );
wxBoxSizer* bMainSizer;
bMainSizer = new wxBoxSizer( wxVERTICAL );
wxBoxSizer* bleftSizer;
bleftSizer = new wxBoxSizer( wxVERTICAL );
m_checkReference = new wxCheckBox( this, wxID_ANY, _("Print sheet &reference and title block"), wxDefaultPosition, wxDefaultSize, 0 );
m_checkReference->SetValue(true);
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, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_checkMonochrome->SetValue(true);
bleftSizer->Add( m_checkMonochrome, 0, wxALL, 5 );
m_checkBackgroundColor = new wxCheckBox( this, wxID_ANY, _("Print background color"), wxDefaultPosition, wxDefaultSize, 0 );
bleftSizer->Add( m_checkBackgroundColor, 0, wxALL, 5 );
m_checkUseColorTheme = new wxCheckBox( this, wxID_ANY, _("Use a different color theme for printing"), wxDefaultPosition, wxDefaultSize, 0 );
m_checkUseColorTheme->SetValue(true);
bleftSizer->Add( m_checkUseColorTheme, 0, wxALL, 5 );
wxBoxSizer* bSizer4;
bSizer4 = new wxBoxSizer( wxHORIZONTAL );
m_lblTheme = new wxStaticText( this, wxID_ANY, _("Color theme:"), wxDefaultPosition, wxDefaultSize, 0 );
m_lblTheme->Wrap( -1 );
m_lblTheme->Enable( false );
bSizer4->Add( m_lblTheme, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
wxArrayString m_colorThemeChoices;
m_colorTheme = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_colorThemeChoices, 0 );
m_colorTheme->SetSelection( 0 );
m_colorTheme->Enable( false );
bSizer4->Add( m_colorTheme, 0, wxALL, 5 );
bleftSizer->Add( bSizer4, 1, wxEXPAND|wxLEFT, 5 );
bMainSizer->Add( bleftSizer, 1, wxEXPAND|wxTOP|wxBOTTOM|wxLEFT, 10 );
m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
bMainSizer->Add( m_staticline1, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
wxBoxSizer* bbuttonsSizer;
bbuttonsSizer = new wxBoxSizer( wxHORIZONTAL );
m_buttonPageSetup = new wxButton( this, wxID_ANY, _("Page Setup..."), wxDefaultPosition, wxDefaultSize, 0 );
bbuttonsSizer->Add( m_buttonPageSetup, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
bbuttonsSizer->Add( 40, 0, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
m_sdbSizer1 = new wxStdDialogButtonSizer();
m_sdbSizer1OK = new wxButton( this, wxID_OK );
m_sdbSizer1->AddButton( m_sdbSizer1OK );
@ -52,19 +78,21 @@ DIALOG_PRINT_USING_PRINTER_BASE::DIALOG_PRINT_USING_PRINTER_BASE( wxWindow* pare
m_sdbSizer1Cancel = new wxButton( this, wxID_CANCEL );
m_sdbSizer1->AddButton( m_sdbSizer1Cancel );
m_sdbSizer1->Realize();
bbuttonsSizer->Add( m_sdbSizer1, 0, wxALL, 5 );
bMainSizer->Add( bbuttonsSizer, 0, wxEXPAND|wxLEFT, 10 );
this->SetSizer( bMainSizer );
this->Layout();
bMainSizer->Fit( this );
// 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_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 );
}
@ -73,7 +101,9 @@ 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_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 );
}

View File

@ -2,7 +2,7 @@
<wxFormBuilder_Project>
<FileVersion major="1" minor="15" />
<object class="Project" expanded="1">
<property name="class_decoration" />
<property name="class_decoration"></property>
<property name="code_generation">C++</property>
<property name="disconnect_events">1</property>
<property name="disconnect_mode">source_name</property>
@ -14,11 +14,12 @@
<property name="file">dialog_print_using_printer_base</property>
<property name="first_id">1000</property>
<property name="help_provider">none</property>
<property name="indent_with_spaces"></property>
<property name="internationalize">1</property>
<property name="name">dialog_print_schematic</property>
<property name="namespace" />
<property name="namespace"></property>
<property name="path">.</property>
<property name="precompiled_header" />
<property name="precompiled_header"></property>
<property name="relative_path">1</property>
<property name="skip_lua_events">1</property>
<property name="skip_php_events">1</property>
@ -29,67 +30,32 @@
<object class="Dialog" expanded="1">
<property name="aui_managed">0</property>
<property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
<property name="bg" />
<property name="center" />
<property name="context_help" />
<property name="bg"></property>
<property name="center"></property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="enabled">1</property>
<property name="event_handler">impl_virtual</property>
<property name="extra_style" />
<property name="fg" />
<property name="font" />
<property name="extra_style"></property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="maximum_size" />
<property name="maximum_size"></property>
<property name="minimum_size">-1,-1</property>
<property name="name">DIALOG_PRINT_USING_PRINTER_BASE</property>
<property name="pos" />
<property name="pos"></property>
<property name="size">-1,-1</property>
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
<property name="subclass">DIALOG_SHIM; dialog_shim.h</property>
<property name="title">Print</property>
<property name="tooltip" />
<property name="window_extra_style" />
<property name="window_name" />
<property name="window_style" />
<event name="OnActivate" />
<event name="OnActivateApp" />
<event name="OnAuiFindManager" />
<event name="OnAuiPaneButton" />
<event name="OnAuiPaneClose" />
<event name="OnAuiPaneMaximize" />
<event name="OnAuiPaneRestore" />
<event name="OnAuiRender" />
<event name="OnChar" />
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnClose">OnCloseWindow</event>
<event name="OnEnterWindow" />
<event name="OnEraseBackground" />
<event name="OnHibernate" />
<event name="OnIconize" />
<event name="OnIdle" />
<event name="OnInitDialog" />
<event name="OnKeyDown" />
<event name="OnKeyUp" />
<event name="OnKillFocus" />
<event name="OnLeaveWindow" />
<event name="OnLeftDClick" />
<event name="OnLeftDown" />
<event name="OnLeftUp" />
<event name="OnMiddleDClick" />
<event name="OnMiddleDown" />
<event name="OnMiddleUp" />
<event name="OnMotion" />
<event name="OnMouseEvents" />
<event name="OnMouseWheel" />
<event name="OnPaint" />
<event name="OnRightDClick" />
<event name="OnRightDown" />
<event name="OnRightUp" />
<event name="OnSetFocus" />
<event name="OnSize" />
<event name="OnUpdateUI" />
<object class="wxBoxSizer" expanded="1">
<property name="minimum_size" />
<property name="minimum_size"></property>
<property name="name">bMainSizer</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">none</property>
@ -98,7 +64,7 @@
<property name="flag">wxEXPAND|wxTOP|wxBOTTOM|wxLEFT</property>
<property name="proportion">1</property>
<object class="wxBoxSizer" expanded="1">
<property name="minimum_size" />
<property name="minimum_size"></property>
<property name="name">bleftSizer</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">none</property>
@ -111,171 +77,389 @@
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer" />
<property name="aui_name" />
<property name="aui_position" />
<property name="aui_row" />
<property name="best_size" />
<property name="bg" />
<property name="caption" />
<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 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 name="fg"></property>
<property name="floatable">1</property>
<property name="font" />
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Print sheet &amp;reference and title block</property>
<property name="max_size" />
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size" />
<property name="min_size" />
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size" />
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_checkReference</property>
<property name="pane_border">1</property>
<property name="pane_position" />
<property name="pane_size" />
<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 name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size" />
<property name="style" />
<property name="subclass" />
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="toolbar_pane">0</property>
<property name="tooltip">Print (or not) the Frame references.</property>
<property name="validator_data_type" />
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable" />
<property name="window_extra_style" />
<property name="window_name" />
<property name="window_style" />
<event name="OnChar" />
<event name="OnCheckBox" />
<event name="OnEnterWindow" />
<event name="OnEraseBackground" />
<event name="OnKeyDown" />
<event name="OnKeyUp" />
<event name="OnKillFocus" />
<event name="OnLeaveWindow" />
<event name="OnLeftDClick" />
<event name="OnLeftDown" />
<event name="OnLeftUp" />
<event name="OnMiddleDClick" />
<event name="OnMiddleDown" />
<event name="OnMiddleUp" />
<event name="OnMotion" />
<event name="OnMouseEvents" />
<event name="OnMouseWheel" />
<event name="OnPaint" />
<event name="OnRightDClick" />
<event name="OnRightDown" />
<event name="OnRightUp" />
<event name="OnSetFocus" />
<event name="OnSize" />
<event name="OnUpdateUI" />
<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="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT</property>
<property name="flag">wxALL</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 name="aui_name" />
<property name="aui_position" />
<property name="aui_row" />
<property name="best_size" />
<property name="bg" />
<property name="caption" />
<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 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 name="fg"></property>
<property name="floatable">1</property>
<property name="font" />
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Print in &amp;black and white only</property>
<property name="max_size" />
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size" />
<property name="min_size" />
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size" />
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_checkMonochrome</property>
<property name="pane_border">1</property>
<property name="pane_position" />
<property name="pane_size" />
<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 name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size" />
<property name="style" />
<property name="subclass" />
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="toolbar_pane">0</property>
<property name="tooltip" />
<property name="validator_data_type" />
<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 name="window_extra_style" />
<property name="window_name" />
<property name="window_style" />
<event name="OnChar" />
<event name="OnCheckBox" />
<event name="OnEnterWindow" />
<event name="OnEraseBackground" />
<event name="OnKeyDown" />
<event name="OnKeyUp" />
<event name="OnKillFocus" />
<event name="OnLeaveWindow" />
<event name="OnLeftDClick" />
<event name="OnLeftDown" />
<event name="OnLeftUp" />
<event name="OnMiddleDClick" />
<event name="OnMiddleDown" />
<event name="OnMiddleUp" />
<event name="OnMotion" />
<event name="OnMouseEvents" />
<event name="OnMouseWheel" />
<event name="OnPaint" />
<event name="OnRightDClick" />
<event name="OnRightDown" />
<event name="OnRightUp" />
<event name="OnSetFocus" />
<event name="OnSize" />
<event name="OnUpdateUI" />
<property name="validator_variable"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnCheckBox">OnMonochromeChecked</event>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL</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">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">Print 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_checkBackgroundColor</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 class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL</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">Use a different color theme for printing</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_checkUseColorTheme</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>
<event name="OnCheckBox">OnUseColorThemeChecked</event>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND|wxLEFT</property>
<property name="proportion">1</property>
<object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property>
<property name="name">bSizer4</property>
<property name="orient">wxHORIZONTAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property>
<property name="proportion">0</property>
<object class="wxStaticText" 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="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">0</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">Color theme:</property>
<property name="markup">0</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_lblTheme</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="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<property name="wrap">-1</property>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="proportion">0</property>
<object class="wxChoice" 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="choices"></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">0</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="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_colorTheme</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="selection">0</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>
@ -289,76 +473,53 @@
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer" />
<property name="aui_name" />
<property name="aui_position" />
<property name="aui_row" />
<property name="best_size" />
<property name="bg" />
<property name="caption" />
<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="close_button">1</property>
<property name="context_help" />
<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 name="fg"></property>
<property name="floatable">1</property>
<property name="font" />
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="max_size" />
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size" />
<property name="min_size" />
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size" />
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_staticline1</property>
<property name="pane_border">1</property>
<property name="pane_position" />
<property name="pane_size" />
<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 name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size" />
<property name="size"></property>
<property name="style">wxLI_HORIZONTAL</property>
<property name="subclass">; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip" />
<property name="window_extra_style" />
<property name="window_name" />
<property name="window_style" />
<event name="OnChar" />
<event name="OnEnterWindow" />
<event name="OnEraseBackground" />
<event name="OnKeyDown" />
<event name="OnKeyUp" />
<event name="OnKillFocus" />
<event name="OnLeaveWindow" />
<event name="OnLeftDClick" />
<event name="OnLeftDown" />
<event name="OnLeftUp" />
<event name="OnMiddleDClick" />
<event name="OnMiddleDown" />
<event name="OnMiddleUp" />
<event name="OnMotion" />
<event name="OnMouseEvents" />
<event name="OnMouseWheel" />
<event name="OnPaint" />
<event name="OnRightDClick" />
<event name="OnRightDown" />
<event name="OnRightUp" />
<event name="OnSetFocus" />
<event name="OnSize" />
<event name="OnUpdateUI" />
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
</object>
</object>
<object class="sizeritem" expanded="1">
@ -366,7 +527,7 @@
<property name="flag">wxEXPAND|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxBoxSizer" expanded="1">
<property name="minimum_size" />
<property name="minimum_size"></property>
<property name="name">bbuttonsSizer</property>
<property name="orient">wxHORIZONTAL</property>
<property name="permission">none</property>
@ -379,83 +540,68 @@
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer" />
<property name="aui_name" />
<property name="aui_position" />
<property name="aui_row" />
<property name="best_size" />
<property name="bg" />
<property name="caption" />
<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="bitmap"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="context_help" />
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="current"></property>
<property name="default">0</property>
<property name="default_pane">0</property>
<property name="disabled"></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 name="fg"></property>
<property name="floatable">1</property>
<property name="font" />
<property name="focus"></property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Page Setup...</property>
<property name="max_size" />
<property name="margins"></property>
<property name="markup">0</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size" />
<property name="min_size" />
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size" />
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_buttonPageSetup</property>
<property name="pane_border">1</property>
<property name="pane_position" />
<property name="pane_size" />
<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 name="pos"></property>
<property name="position"></property>
<property name="pressed"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size" />
<property name="style" />
<property name="subclass" />
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="toolbar_pane">0</property>
<property name="tooltip" />
<property name="validator_data_type" />
<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 name="window_extra_style" />
<property name="window_name" />
<property name="window_style" />
<property name="validator_variable"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnButtonClick">OnPageSetup</event>
<event name="OnChar" />
<event name="OnEnterWindow" />
<event name="OnEraseBackground" />
<event name="OnKeyDown" />
<event name="OnKeyUp" />
<event name="OnKillFocus" />
<event name="OnLeaveWindow" />
<event name="OnLeftDClick" />
<event name="OnLeftDown" />
<event name="OnLeftUp" />
<event name="OnMiddleDClick" />
<event name="OnMiddleDown" />
<event name="OnMiddleUp" />
<event name="OnMotion" />
<event name="OnMouseEvents" />
<event name="OnMouseWheel" />
<event name="OnPaint" />
<event name="OnRightDClick" />
<event name="OnRightDown" />
<event name="OnRightUp" />
<event name="OnSetFocus" />
<event name="OnSize" />
<event name="OnUpdateUI" />
</object>
</object>
<object class="sizeritem" expanded="1">
@ -481,17 +627,10 @@
<property name="OK">1</property>
<property name="Save">0</property>
<property name="Yes">0</property>
<property name="minimum_size" />
<property name="minimum_size"></property>
<property name="name">m_sdbSizer1</property>
<property name="permission">protected</property>
<event name="OnApplyButtonClick">OnPrintPreview</event>
<event name="OnCancelButtonClick" />
<event name="OnContextHelpButtonClick" />
<event name="OnHelpButtonClick" />
<event name="OnNoButtonClick" />
<event name="OnOKButtonClick" />
<event name="OnSaveButtonClick" />
<event name="OnYesButtonClick" />
</object>
</object>
</object>

View File

@ -1,12 +1,11 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Dec 30 2017)
// C++ code generated with wxFormBuilder (version Oct 26 2018)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#ifndef __DIALOG_PRINT_USING_PRINTER_BASE_H__
#define __DIALOG_PRINT_USING_PRINTER_BASE_H__
#pragma once
#include <wx/artprov.h>
#include <wx/xrc/xmlres.h>
@ -18,8 +17,13 @@
#include <wx/font.h>
#include <wx/colour.h>
#include <wx/settings.h>
#include <wx/stattext.h>
#include <wx/choice.h>
#include <wx/sizer.h>
#include <wx/statline.h>
#include <wx/bitmap.h>
#include <wx/image.h>
#include <wx/icon.h>
#include <wx/button.h>
#include <wx/dialog.h>
@ -31,28 +35,33 @@
class DIALOG_PRINT_USING_PRINTER_BASE : public DIALOG_SHIM
{
private:
protected:
wxCheckBox* m_checkReference;
wxCheckBox* m_checkMonochrome;
wxCheckBox* m_checkBackgroundColor;
wxCheckBox* m_checkUseColorTheme;
wxStaticText* m_lblTheme;
wxChoice* m_colorTheme;
wxStaticLine* m_staticline1;
wxButton* m_buttonPageSetup;
wxStdDialogButtonSizer* m_sdbSizer1;
wxButton* m_sdbSizer1OK;
wxButton* m_sdbSizer1Apply;
wxButton* m_sdbSizer1Cancel;
// Virtual event handlers, overide them in your derived class
virtual void OnCloseWindow( wxCloseEvent& event ) { event.Skip(); }
virtual void OnMonochromeChecked( 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(); }
public:
DIALOG_PRINT_USING_PRINTER_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Print"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
DIALOG_PRINT_USING_PRINTER_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Print"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_PRINT_USING_PRINTER_BASE();
};
#endif //__DIALOG_PRINT_USING_PRINTER_BASE_H__

View File

@ -430,16 +430,9 @@ void SCH_EDIT_FRAME::SaveSettings( APP_SETTINGS_BASE* aCfg )
{
SCH_BASE_FRAME::SaveSettings( eeconfig() );
// TODO(JE) do most of these need to live as class members here, or can the sites that need
// the setting just grab a pointer to the EESCHEMA_SETTINGS and look them up directly?
// TODO(JE) do we need to keep m_userUnits around?
if( eeconfig() )
{
eeconfig()->m_Appearance.print_sheet_reference = m_printSheetReference;
eeconfig()->m_Printing.monochrome = m_printMonochrome;
eeconfig()->m_System.units = static_cast<int>( m_userUnits );
}
eeconfig()->m_System.units = static_cast<int>( m_userUnits );
}

View File

@ -215,8 +215,6 @@ SCH_EDIT_FRAME::SCH_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ):
g_ErcSettings = new ERC_SETTINGS();
m_showBorderAndTitleBlock = true; // true to show sheet references
m_printMonochrome = true;
m_printSheetReference = true;
m_hasAutoSave = true;
m_AboutTitle = "Eeschema";

View File

@ -126,8 +126,6 @@ private:
std::vector<PARAM_CFG*> m_projectFileParams;
std::vector<PARAM_CFG*> m_configSettings;
wxPageSetupDialogData m_pageSetupData;
bool m_printMonochrome; ///< Print monochrome instead of grey scale.
bool m_printSheetReference;
SCH_ITEM* m_item_to_repeat; ///< Last item to insert by the repeat command.
wxString m_netListerCommand; ///< Command line to call a custom net list
///< generator.
@ -560,11 +558,6 @@ public:
wxPageSetupDialogData& GetPageSetupData() { return m_pageSetupData; }
bool GetPrintMonochrome() { return m_printMonochrome; }
void SetPrintMonochrome( bool aMonochrome ) { m_printMonochrome = aMonochrome; }
bool GetPrintSheetReference() { return m_printSheetReference; }
void SetPrintSheetReference( bool aShow ) { m_printSheetReference = aShow; }
void NewProject();
void LoadProject();

View File

@ -98,10 +98,13 @@ public:
struct PRINTING
{
bool monochrome;
double scale;
bool title_block;
std::vector<int> layers; ///< List of enabled layers for printing
bool background; ///< Whether or not to print background color
bool monochrome; ///< Whether or not to print in monochrome
double scale; ///< Printout scale
bool use_theme; ///< If false, display color theme will be used
wxString color_theme; ///< Color theme to use for printing
bool title_block; ///< Whether or not to print title block
std::vector<int> layers; ///< List of enabled layers for printing
};
struct SYSTEM