UNIT_BINDERize print and plot dialogs.
Fixes: lp:1778560 * https://bugs.launchpad.net/kicad/+bug/1778560 Fixes: lp:1392991 * https://bugs.launchpad.net/kicad/+bug/1392991 Fixes: lp:1780362 * https://bugs.launchpad.net/kicad/+bug/1780362 (cherry picked from commit 9df9743)
This commit is contained in:
parent
ff34c7a948
commit
0358aee89e
|
@ -32,10 +32,9 @@
|
|||
#include <kiface_i.h>
|
||||
#include <bitmaps.h>
|
||||
#include <worksheet.h>
|
||||
#include <base_units.h>
|
||||
#include <sch_sheet.h>
|
||||
#include <dialog_plot_schematic.h>
|
||||
#include <wx_html_report_panel.h>
|
||||
|
||||
|
||||
// Keys for configuration
|
||||
#define PLOT_FORMAT_KEY wxT( "PlotFormat" )
|
||||
|
@ -46,7 +45,6 @@
|
|||
#define PLOT_HPGL_PEN_SIZE_KEY wxT( "PlotHPGLPenSize" )
|
||||
|
||||
|
||||
|
||||
// static members (static to remember last state):
|
||||
int DIALOG_PLOT_SCHEMATIC::m_pageSizeSelect = PAGE_SIZE_AUTO;
|
||||
|
||||
|
@ -64,7 +62,9 @@ void SCH_EDIT_FRAME::PlotSchematic( wxCommandEvent& event )
|
|||
|
||||
|
||||
DIALOG_PLOT_SCHEMATIC::DIALOG_PLOT_SCHEMATIC( SCH_EDIT_FRAME* parent ) :
|
||||
DIALOG_PLOT_SCHEMATIC_BASE( parent )
|
||||
DIALOG_PLOT_SCHEMATIC_BASE( parent ),
|
||||
m_defaultLineWidth( parent, m_lineWidthLabel, m_lineWidthCtrl, m_lineWidthUnits, true ),
|
||||
m_penWidth( parent, m_penWidthLabel, m_penWidthCtrl, m_penWidthUnits, true )
|
||||
{
|
||||
m_parent = parent;
|
||||
m_configChanged = false;
|
||||
|
@ -125,11 +125,10 @@ void DIALOG_PLOT_SCHEMATIC::initDlg()
|
|||
|
||||
// Set the default line width (pen width which should be used for
|
||||
// items that do not have a pen size defined (like frame ref)
|
||||
int defaultLineSize = GetDefaultLineThickness();
|
||||
m_DefaultLineSizeCtrl->SetValue( StringFromValue( m_units, defaultLineSize, true, true ) );
|
||||
m_defaultLineWidth.SetValue( GetDefaultLineThickness() );
|
||||
|
||||
// Initialize HPGL specific widgets
|
||||
m_penHPGLWidthCtrl->SetValue( StringFromValue( m_units, m_HPGLPenSize, true, true ) );
|
||||
m_penWidth.SetValue( m_HPGLPenSize );
|
||||
|
||||
// Plot directory
|
||||
wxString path = m_parent->GetPlotDirectoryName();
|
||||
|
@ -154,9 +153,7 @@ void DIALOG_PLOT_SCHEMATIC::OnOutputDirectoryBrowseClicked( wxCommandEvent& even
|
|||
wxDirDialog dirDialog( this, _( "Select Output Directory" ), path );
|
||||
|
||||
if( dirDialog.ShowModal() == wxID_CANCEL )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
wxFileName dirName = wxFileName::DirName( dirDialog.GetPath() );
|
||||
|
||||
|
@ -238,19 +235,19 @@ void DIALOG_PLOT_SCHEMATIC::OnUpdateUI( wxUpdateUIEvent& event )
|
|||
m_paperSizeOption->Set( paperSizes );
|
||||
m_paperSizeOption->SetSelection( selection );
|
||||
|
||||
bool enable = fmt == PLOT_FORMAT_POST || fmt == PLOT_FORMAT_PDF || fmt == PLOT_FORMAT_SVG;
|
||||
m_defaultLineWidthTitle->Enable( enable );
|
||||
m_DefaultLineSizeCtrl->Enable( enable );
|
||||
m_defaultLineWidth.Enable( fmt == PLOT_FORMAT_POST || fmt == PLOT_FORMAT_PDF
|
||||
|| fmt == PLOT_FORMAT_SVG );
|
||||
|
||||
m_plotOriginTitle->Enable( fmt == PLOT_FORMAT_HPGL );
|
||||
m_plotOriginOpt->Enable( fmt == PLOT_FORMAT_HPGL );
|
||||
m_penHPGLWidthTitle->Enable( fmt == PLOT_FORMAT_HPGL );
|
||||
m_penHPGLWidthCtrl->Enable( fmt == PLOT_FORMAT_HPGL );
|
||||
m_penWidth.Enable( fmt == PLOT_FORMAT_HPGL );
|
||||
}
|
||||
|
||||
|
||||
void DIALOG_PLOT_SCHEMATIC::getPlotOptions()
|
||||
{
|
||||
m_HPGLPenSize = m_penWidth.GetValue();
|
||||
|
||||
m_config->Write( PLOT_MODECOLOR_KEY, getModeColor() );
|
||||
m_config->Write( PLOT_FRAME_REFERENCE_KEY, getPlotFrameRef() );
|
||||
m_config->Write( PLOT_FORMAT_KEY, (long) GetPlotFileFormat() );
|
||||
|
@ -260,8 +257,7 @@ void DIALOG_PLOT_SCHEMATIC::getPlotOptions()
|
|||
// HPGL Pen Size is stored in mm in config
|
||||
m_config->Write( PLOT_HPGL_PEN_SIZE_KEY, m_HPGLPenSize/IU_PER_MM );
|
||||
|
||||
int thickness = ValueFromString( GetUserUnits(), m_DefaultLineSizeCtrl->GetValue(), true );
|
||||
SetDefaultLineThickness( thickness );
|
||||
SetDefaultLineThickness( m_defaultLineWidth.GetValue() );
|
||||
|
||||
// Plot directory
|
||||
wxString path = m_outputDirectoryName->GetValue();
|
||||
|
@ -314,9 +310,8 @@ wxFileName DIALOG_PLOT_SCHEMATIC::createPlotFileName( wxTextCtrl* aOutputDirecto
|
|||
|
||||
if( !EnsureFileDirectoryExists( &outputDir, plotFileName, aReporter ) )
|
||||
{
|
||||
wxString msg;
|
||||
msg.Printf( _( "Could not write plot files to folder \"%s\"." ),
|
||||
GetChars( outputDir.GetPath() ) );
|
||||
wxString msg = wxString::Format( _( "Could not write plot files to folder \"%s\"." ),
|
||||
outputDir.GetPath() );
|
||||
aReporter->Report( msg, REPORTER::RPT_ERROR );
|
||||
}
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
#include <sch_edit_frame.h>
|
||||
#include <dialog_plot_schematic_base.h>
|
||||
#include <reporter.h>
|
||||
|
||||
#include <widgets/unit_binder.h>
|
||||
|
||||
enum PageFormatReq {
|
||||
PAGE_SIZE_AUTO,
|
||||
|
@ -55,6 +55,9 @@ private:
|
|||
int m_HPGLPaperSizeSelect; // for HPGL format only: last selected paper size
|
||||
double m_HPGLPenSize; // for HPGL format only: pen size
|
||||
|
||||
UNIT_BINDER m_defaultLineWidth;
|
||||
UNIT_BINDER m_penWidth;
|
||||
|
||||
public:
|
||||
// / Constructors
|
||||
DIALOG_PLOT_SCHEMATIC( SCH_EDIT_FRAME* parent );
|
||||
|
|
|
@ -81,14 +81,18 @@ DIALOG_PLOT_SCHEMATIC_BASE::DIALOG_PLOT_SCHEMATIC_BASE( wxWindow* parent, wxWind
|
|||
m_ModeColorOption->SetSelection( 0 );
|
||||
gbSizer1->Add( m_ModeColorOption, wxGBPosition( 2, 1 ), wxGBSpan( 1, 1 ), wxALL, 5 );
|
||||
|
||||
m_defaultLineWidthTitle = new wxStaticText( sbOptions->GetStaticBox(), wxID_ANY, _("Default line thickness:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_defaultLineWidthTitle->Wrap( -1 );
|
||||
gbSizer1->Add( m_defaultLineWidthTitle, wxGBPosition( 3, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
|
||||
m_lineWidthLabel = new wxStaticText( sbOptions->GetStaticBox(), wxID_ANY, _("Default line width:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_lineWidthLabel->Wrap( -1 );
|
||||
gbSizer1->Add( m_lineWidthLabel, wxGBPosition( 3, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
|
||||
|
||||
m_DefaultLineSizeCtrl = new wxTextCtrl( sbOptions->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_DefaultLineSizeCtrl->SetToolTip( _("Selection of the default pen thickness used to draw items, when their thickness is set to 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.") );
|
||||
|
||||
gbSizer1->Add( m_DefaultLineSizeCtrl, wxGBPosition( 3, 1 ), wxGBSpan( 1, 1 ), wxEXPAND|wxRIGHT|wxLEFT, 5 );
|
||||
gbSizer1->Add( m_lineWidthCtrl, wxGBPosition( 3, 1 ), wxGBSpan( 1, 1 ), wxEXPAND|wxALL, 5 );
|
||||
|
||||
m_lineWidthUnits = new wxStaticText( sbOptions->GetStaticBox(), wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_lineWidthUnits->Wrap( -1 );
|
||||
gbSizer1->Add( m_lineWidthUnits, wxGBPosition( 3, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxTOP, 5 );
|
||||
|
||||
|
||||
gbSizer1->AddGrowableCol( 1 );
|
||||
|
@ -115,12 +119,16 @@ DIALOG_PLOT_SCHEMATIC_BASE::DIALOG_PLOT_SCHEMATIC_BASE( wxWindow* parent, wxWind
|
|||
m_plotOriginOpt->SetSelection( 0 );
|
||||
gbSizer2->Add( m_plotOriginOpt, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_penHPGLWidthTitle = new wxStaticText( m_HPGLOptionsSizer->GetStaticBox(), wxID_ANY, _("Pen width:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_penHPGLWidthTitle->Wrap( -1 );
|
||||
gbSizer2->Add( m_penHPGLWidthTitle, wxGBPosition( 1, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT, 5 );
|
||||
m_penWidthLabel = new wxStaticText( m_HPGLOptionsSizer->GetStaticBox(), wxID_ANY, _("Pen width:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_penWidthLabel->Wrap( -1 );
|
||||
gbSizer2->Add( m_penWidthLabel, wxGBPosition( 1, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
|
||||
|
||||
m_penHPGLWidthCtrl = new wxTextCtrl( m_HPGLOptionsSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
gbSizer2->Add( m_penHPGLWidthCtrl, wxGBPosition( 1, 1 ), wxGBSpan( 1, 1 ), wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
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 );
|
||||
|
||||
m_penWidthUnits = new wxStaticText( m_HPGLOptionsSizer->GetStaticBox(), wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_penWidthUnits->Wrap( -1 );
|
||||
gbSizer2->Add( m_penWidthUnits, wxGBPosition( 1, 2 ), wxGBSpan( 1, 1 ), wxTOP|wxBOTTOM|wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
|
||||
gbSizer2->AddGrowableCol( 1 );
|
||||
|
|
|
@ -470,11 +470,11 @@
|
|||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticBoxSizer" expanded="1">
|
||||
<object class="wxStaticBoxSizer" expanded="0">
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Options</property>
|
||||
<property name="minimum_size"></property>
|
||||
|
@ -483,11 +483,11 @@
|
|||
<property name="parent">1</property>
|
||||
<property name="permission">none</property>
|
||||
<event name="OnUpdateUI"></event>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxGridBagSizer" expanded="1">
|
||||
<object class="wxGridBagSizer" expanded="0">
|
||||
<property name="empty_cell_size"></property>
|
||||
<property name="flexible_direction">wxBOTH</property>
|
||||
<property name="growablecols">1</property>
|
||||
|
@ -498,7 +498,7 @@
|
|||
<property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
|
||||
<property name="permission">none</property>
|
||||
<property name="vgap">0</property>
|
||||
<object class="gbsizeritem" expanded="1">
|
||||
<object class="gbsizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="colspan">1</property>
|
||||
<property name="column">0</property>
|
||||
|
@ -584,7 +584,7 @@
|
|||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="gbsizeritem" expanded="1">
|
||||
<object class="gbsizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="colspan">1</property>
|
||||
<property name="column">1</property>
|
||||
|
@ -675,7 +675,7 @@
|
|||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="gbsizeritem" expanded="1">
|
||||
<object class="gbsizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="colspan">2</property>
|
||||
<property name="column">0</property>
|
||||
|
@ -766,14 +766,14 @@
|
|||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="gbsizeritem" expanded="1">
|
||||
<object class="gbsizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="colspan">1</property>
|
||||
<property name="column">0</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT</property>
|
||||
<property name="row">2</property>
|
||||
<property name="rowspan">1</property>
|
||||
<object class="wxStaticText" expanded="1">
|
||||
<object class="wxStaticText" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
|
@ -852,14 +852,14 @@
|
|||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="gbsizeritem" expanded="1">
|
||||
<object class="gbsizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="colspan">1</property>
|
||||
<property name="column">1</property>
|
||||
<property name="flag">wxALL</property>
|
||||
<property name="row">2</property>
|
||||
<property name="rowspan">1</property>
|
||||
<object class="wxChoice" expanded="1">
|
||||
<object class="wxChoice" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
|
@ -943,7 +943,7 @@
|
|||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="gbsizeritem" expanded="1">
|
||||
<object class="gbsizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="colspan">1</property>
|
||||
<property name="column">0</property>
|
||||
|
@ -978,7 +978,7 @@
|
|||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Default line thickness:</property>
|
||||
<property name="label">Default line width:</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
|
@ -986,7 +986,7 @@
|
|||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_defaultLineWidthTitle</property>
|
||||
<property name="name">m_lineWidthLabel</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
|
@ -1029,11 +1029,11 @@
|
|||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="gbsizeritem" expanded="1">
|
||||
<object class="gbsizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="colspan">1</property>
|
||||
<property name="column">1</property>
|
||||
<property name="flag">wxEXPAND|wxRIGHT|wxLEFT</property>
|
||||
<property name="flag">wxEXPAND|wxALL</property>
|
||||
<property name="row">3</property>
|
||||
<property name="rowspan">1</property>
|
||||
<object class="wxTextCtrl" expanded="0">
|
||||
|
@ -1072,7 +1072,7 @@
|
|||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_DefaultLineSizeCtrl</property>
|
||||
<property name="name">m_lineWidthCtrl</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
|
@ -1123,15 +1123,101 @@
|
|||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="gbsizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="colspan">1</property>
|
||||
<property name="column">2</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxTOP</property>
|
||||
<property name="row">3</property>
|
||||
<property name="rowspan">1</property>
|
||||
<object class="wxStaticText" expanded="0">
|
||||
<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">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">mm</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_lineWidthUnits</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>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticBoxSizer" expanded="1">
|
||||
<object class="wxStaticBoxSizer" expanded="0">
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">HPGL Options</property>
|
||||
<property name="minimum_size"></property>
|
||||
|
@ -1140,11 +1226,11 @@
|
|||
<property name="parent">1</property>
|
||||
<property name="permission">protected</property>
|
||||
<event name="OnUpdateUI"></event>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxGridBagSizer" expanded="1">
|
||||
<object class="wxGridBagSizer" expanded="0">
|
||||
<property name="empty_cell_size"></property>
|
||||
<property name="flexible_direction">wxBOTH</property>
|
||||
<property name="growablecols">1</property>
|
||||
|
@ -1155,14 +1241,14 @@
|
|||
<property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
|
||||
<property name="permission">none</property>
|
||||
<property name="vgap">0</property>
|
||||
<object class="gbsizeritem" expanded="1">
|
||||
<object class="gbsizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="colspan">1</property>
|
||||
<property name="column">0</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT</property>
|
||||
<property name="row">0</property>
|
||||
<property name="rowspan">1</property>
|
||||
<object class="wxStaticText" expanded="1">
|
||||
<object class="wxStaticText" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
|
@ -1241,14 +1327,14 @@
|
|||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="gbsizeritem" expanded="1">
|
||||
<object class="gbsizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="colspan">1</property>
|
||||
<property name="column">1</property>
|
||||
<property name="flag">wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT</property>
|
||||
<property name="row">0</property>
|
||||
<property name="rowspan">1</property>
|
||||
<object class="wxChoice" expanded="1">
|
||||
<object class="wxChoice" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
|
@ -1332,11 +1418,11 @@
|
|||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="gbsizeritem" expanded="1">
|
||||
<object class="gbsizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="colspan">1</property>
|
||||
<property name="column">0</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT</property>
|
||||
<property name="row">1</property>
|
||||
<property name="rowspan">1</property>
|
||||
<object class="wxStaticText" expanded="0">
|
||||
|
@ -1375,7 +1461,7 @@
|
|||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_penHPGLWidthTitle</property>
|
||||
<property name="name">m_penWidthLabel</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
|
@ -1418,11 +1504,11 @@
|
|||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="gbsizeritem" expanded="1">
|
||||
<object class="gbsizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="colspan">1</property>
|
||||
<property name="column">1</property>
|
||||
<property name="flag">wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT</property>
|
||||
<property name="flag">wxEXPAND|wxALL</property>
|
||||
<property name="row">1</property>
|
||||
<property name="rowspan">1</property>
|
||||
<object class="wxTextCtrl" expanded="0">
|
||||
|
@ -1461,7 +1547,7 @@
|
|||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_penHPGLWidthCtrl</property>
|
||||
<property name="name">m_penWidthCtrl</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
|
@ -1512,6 +1598,92 @@
|
|||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="gbsizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="colspan">1</property>
|
||||
<property name="column">2</property>
|
||||
<property name="flag">wxTOP|wxBOTTOM|wxRIGHT|wxALIGN_CENTER_VERTICAL</property>
|
||||
<property name="row">1</property>
|
||||
<property name="rowspan">1</property>
|
||||
<object class="wxStaticText" expanded="0">
|
||||
<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">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">mm</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_penWidthUnits</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>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
|
|
|
@ -54,13 +54,15 @@ class DIALOG_PLOT_SCHEMATIC_BASE : public DIALOG_SHIM
|
|||
wxChoice* m_paperSizeOption;
|
||||
wxCheckBox* m_PlotFrameRefOpt;
|
||||
wxChoice* m_ModeColorOption;
|
||||
wxStaticText* m_defaultLineWidthTitle;
|
||||
wxTextCtrl* m_DefaultLineSizeCtrl;
|
||||
wxStaticText* m_lineWidthLabel;
|
||||
wxTextCtrl* m_lineWidthCtrl;
|
||||
wxStaticText* m_lineWidthUnits;
|
||||
wxStaticBoxSizer* m_HPGLOptionsSizer;
|
||||
wxStaticText* m_plotOriginTitle;
|
||||
wxChoice* m_plotOriginOpt;
|
||||
wxStaticText* m_penHPGLWidthTitle;
|
||||
wxTextCtrl* m_penHPGLWidthCtrl;
|
||||
wxStaticText* m_penWidthLabel;
|
||||
wxTextCtrl* m_penWidthCtrl;
|
||||
wxStaticText* m_penWidthUnits;
|
||||
WX_HTML_REPORT_PANEL* m_MessagesBox;
|
||||
wxStdDialogButtonSizer* m_sdbSizer1;
|
||||
wxButton* m_sdbSizer1OK;
|
||||
|
|
|
@ -72,7 +72,7 @@ static const wxChar* plot_sheet_list( int aSize )
|
|||
|
||||
void DIALOG_PLOT_SCHEMATIC::SetHPGLPenWidth()
|
||||
{
|
||||
m_HPGLPenSize = ValueFromTextCtrl( *m_penHPGLWidthCtrl );
|
||||
m_HPGLPenSize = m_penWidth.GetValue();
|
||||
|
||||
if( m_HPGLPenSize > Millimeter2iu( 2 ) )
|
||||
m_HPGLPenSize = Millimeter2iu( 2 );
|
||||
|
|
|
@ -51,8 +51,6 @@ include_directories(
|
|||
)
|
||||
|
||||
set( PCBNEW_DIALOGS
|
||||
dialogs/dialog_SVG_print.cpp
|
||||
dialogs/dialog_SVG_print_base.cpp
|
||||
dialogs/dialog_block_options.cpp
|
||||
dialogs/dialog_block_options_base.cpp
|
||||
dialogs/dialog_cleaning_options.cpp
|
||||
|
@ -77,6 +75,8 @@ set( PCBNEW_DIALOGS
|
|||
dialogs/dialog_export_idf_base.cpp
|
||||
dialogs/dialog_export_step.cpp
|
||||
dialogs/dialog_export_step_base.cpp
|
||||
dialogs/dialog_export_svg.cpp
|
||||
dialogs/dialog_export_svg_base.cpp
|
||||
dialogs/dialog_export_vrml.cpp
|
||||
dialogs/dialog_export_vrml_base.cpp
|
||||
dialogs/dialog_find.cpp
|
||||
|
|
|
@ -1,7 +1,3 @@
|
|||
/**
|
||||
* @file pcbnew/dialogs/dialog_SVG_print.cpp
|
||||
*/
|
||||
|
||||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
|
@ -31,32 +27,27 @@
|
|||
#include <kiface_i.h>
|
||||
#include <common.h>
|
||||
#include <pcb_base_frame.h>
|
||||
//#include <pcb_screen.h>
|
||||
#include <base_units.h>
|
||||
#include <convert_to_biu.h>
|
||||
#include <wildcards_and_files_ext.h>
|
||||
#include <macros.h>
|
||||
#include <reporter.h>
|
||||
#include <confirm.h>
|
||||
|
||||
#include <pcbnew.h>
|
||||
#include <pcbplot.h>
|
||||
#include <printout_controler.h>
|
||||
#include <class_board.h>
|
||||
#include <dialog_SVG_print_base.h>
|
||||
#include <dialog_export_svg_base.h>
|
||||
#include <invoke_pcb_dialog.h>
|
||||
#include <wx_html_report_panel.h>
|
||||
#include <bitmaps.h>
|
||||
#include <widgets/unit_binder.h>
|
||||
|
||||
|
||||
class DIALOG_SVG_PRINT : public DIALOG_SVG_PRINT_base
|
||||
class DIALOG_EXPORT_SVG : public DIALOG_EXPORT_SVG_BASE
|
||||
{
|
||||
public:
|
||||
DIALOG_SVG_PRINT( wxTopLevelWindow* aParent, BOARD* aBoard, PCB_PLOT_PARAMS* aSettings );
|
||||
DIALOG_EXPORT_SVG( PCB_BASE_FRAME* aParent, BOARD* aBoard );
|
||||
~DIALOG_EXPORT_SVG() override;
|
||||
|
||||
private:
|
||||
bool m_did_print;
|
||||
BOARD* m_board;
|
||||
PCB_PLOT_PARAMS* m_callers_params;
|
||||
wxConfigBase* m_config;
|
||||
LSET m_printMaskLayer;
|
||||
// the list of existing board layers in wxCheckListBox, with the
|
||||
|
@ -66,96 +57,117 @@ private:
|
|||
wxString m_outputDirectory;
|
||||
bool m_printMirror;
|
||||
bool m_oneFileOnly;
|
||||
UNIT_BINDER m_defaultPenWidth;
|
||||
|
||||
void initDialog();
|
||||
|
||||
void OnCloseWindow( wxCloseEvent& event ) override;
|
||||
void OnButtonPlot( wxCommandEvent& event ) override;
|
||||
|
||||
void OnButtonCloseClick( wxCommandEvent& event ) override;
|
||||
|
||||
void OnOutputDirectoryBrowseClicked( wxCommandEvent& event ) override;
|
||||
void SetPenWidth();
|
||||
void ExportSVGFile( bool aOnlyOneFile );
|
||||
|
||||
bool PageIsBoardBoundarySize()
|
||||
{
|
||||
return m_rbSvgPageSizeOpt->GetSelection() == 2;
|
||||
}
|
||||
|
||||
bool PrintPageRef()
|
||||
{
|
||||
return m_rbSvgPageSizeOpt->GetSelection() == 0;
|
||||
}
|
||||
|
||||
bool CreateSVGFile( const wxString& FullFileName );
|
||||
|
||||
LSET getCheckBoxSelectedLayers() const;
|
||||
};
|
||||
|
||||
|
||||
|
||||
// Keys for configuration
|
||||
#define PLOTSVGMODECOLOR_KEY wxT( "PlotSVGModeColor" )
|
||||
#define PLOTSVGMODEMIRROR_KEY wxT( "PlotSVGModeMirror" )
|
||||
#define PLOTSVGMODEONEFILE_KEY wxT( "PlotSVGModeOneFile" )
|
||||
#define PLOTSVGPAGESIZEOPT_KEY wxT( "PlotSVGPageOpt" )
|
||||
#define PLOTSVGPLOT_BRD_EDGE_KEY wxT( "PlotSVGBrdEdge" )
|
||||
#define PLOTSVG_LAYERBASE wxT( "PlotSVGLayer_%d" )
|
||||
#define PLOTSVG_DIR_KEY wxT( "PlotSVGDirectory" )
|
||||
|
||||
// reasonable values for default pen width
|
||||
#define WIDTH_MAX_VALUE (2 * IU_PER_MM)
|
||||
#define WIDTH_MIN_VALUE (0.05 * IU_PER_MM)
|
||||
|
||||
// Local variables:
|
||||
static LSET s_SelectedLayers( 4, B_Cu, F_Cu, F_SilkS, B_SilkS );
|
||||
|
||||
/*
|
||||
* DIALOG_SVG_PRINT functions
|
||||
* DIALOG_EXPORT_SVG functions
|
||||
*/
|
||||
DIALOG_SVG_PRINT::DIALOG_SVG_PRINT( wxTopLevelWindow* aParent, BOARD* aBoard, PCB_PLOT_PARAMS* aSettings ) :
|
||||
DIALOG_SVG_PRINT_base( aParent ),
|
||||
m_did_print( false ),
|
||||
m_callers_params( aSettings )
|
||||
DIALOG_EXPORT_SVG::DIALOG_EXPORT_SVG( PCB_BASE_FRAME* aParent, BOARD* aBoard ) :
|
||||
DIALOG_EXPORT_SVG_BASE( aParent ),
|
||||
m_defaultPenWidth( aParent, m_penWidthLabel, m_penWidthCtrl, m_penWidthUnits, true,
|
||||
WIDTH_MIN_VALUE, WIDTH_MAX_VALUE)
|
||||
{
|
||||
m_board = aBoard;
|
||||
m_config = Kiface().KifaceSettings();
|
||||
|
||||
memset( m_boxSelectLayer, 0, sizeof( m_boxSelectLayer ) );
|
||||
|
||||
m_browseButton->SetBitmap( KiBitmap( folder_xpm ) );
|
||||
|
||||
initDialog();
|
||||
|
||||
GetSizer()->Fit( this );
|
||||
GetSizer()->SetSizeHints( this );
|
||||
Centre();
|
||||
// We use a sdbSizer to get platform-dependent ordering of the action buttons, but
|
||||
// that requires us to correct the button labels here.
|
||||
m_sdbSizer1OK->SetLabel( _( "Export" ) );
|
||||
m_sdbSizer1Cancel->SetLabel( _( "Close" ) );
|
||||
m_sdbSizer1->Layout();
|
||||
|
||||
FinishDialogSettings();
|
||||
}
|
||||
|
||||
|
||||
void DIALOG_SVG_PRINT::initDialog()
|
||||
DIALOG_EXPORT_SVG::~DIALOG_EXPORT_SVG()
|
||||
{
|
||||
g_DrawDefaultLineThickness = m_defaultPenWidth.GetValue();
|
||||
m_printBW = m_ModeColorOption->GetSelection();
|
||||
m_oneFileOnly = m_rbFileOpt->GetSelection() == 1;
|
||||
m_outputDirectory = m_outputDirectoryName->GetValue();
|
||||
m_outputDirectory.Replace( wxT( "\\" ), wxT( "/" ) );
|
||||
|
||||
if( m_config )
|
||||
{
|
||||
m_config->Write( PLOTSVG_DIR_KEY, m_outputDirectory );
|
||||
m_config->Write( PLOTSVGMODECOLOR_KEY, m_printBW );
|
||||
m_config->Write( PLOTSVGMODEMIRROR_KEY, m_printMirror );
|
||||
m_config->Write( PLOTSVGMODEONEFILE_KEY, m_oneFileOnly );
|
||||
m_config->Write( PLOTSVGPAGESIZEOPT_KEY, m_rbSvgPageSizeOpt->GetSelection() );
|
||||
m_config->Write( PLOTSVGPLOT_BRD_EDGE_KEY, m_PrintBoardEdgesCtrl->GetValue() );
|
||||
|
||||
wxString layerKey;
|
||||
|
||||
for( unsigned layer = 0; layer < DIM(m_boxSelectLayer); ++layer )
|
||||
{
|
||||
if( !m_boxSelectLayer[layer].first )
|
||||
continue;
|
||||
|
||||
layerKey.Printf( PLOTSVG_LAYERBASE, layer );
|
||||
m_config->Write( layerKey, m_boxSelectLayer[layer].first->IsChecked( m_boxSelectLayer[layer].second ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void DIALOG_EXPORT_SVG::initDialog()
|
||||
{
|
||||
if( m_config )
|
||||
{
|
||||
m_config->Read( PLOTSVG_DIR_KEY, &m_outputDirectory, wxEmptyString );
|
||||
m_config->Read( PLOTSVGMODECOLOR_KEY, &m_printBW, false );
|
||||
long ltmp;
|
||||
m_config->Read( PLOTSVGPAGESIZEOPT_KEY, <mp, 0 );
|
||||
m_rbSvgPageSizeOpt->SetSelection( ltmp );
|
||||
m_config->Read( PLOTSVGMODEMIRROR_KEY, &m_printMirror, false );
|
||||
m_config->Read( PLOTSVGMODEONEFILE_KEY, &m_oneFileOnly, false);
|
||||
m_rbSvgPageSizeOpt->SetSelection( ltmp );
|
||||
m_config->Read( PLOTSVGPLOT_BRD_EDGE_KEY, <mp, 1 );
|
||||
m_PrintBoardEdgesCtrl->SetValue( ltmp );
|
||||
}
|
||||
|
||||
m_outputDirectory = m_callers_params->GetOutputDirectory();
|
||||
m_outputDirectoryName->SetValue( m_outputDirectory );
|
||||
|
||||
m_ModeColorOption->SetSelection( m_printBW ? 1 : 0 );
|
||||
m_printMirrorOpt->SetValue( m_printMirror );
|
||||
m_rbFileOpt->SetSelection( m_oneFileOnly ? 1 : 0 );
|
||||
|
||||
m_DialogDefaultPenSize->SetValue( StringFromValue( g_UserUnit, g_DrawDefaultLineThickness, true ) );
|
||||
m_defaultPenWidth.SetValue( g_DrawDefaultLineThickness );
|
||||
|
||||
LSEQ seq = m_board->GetEnabledLayers().UIOrder();
|
||||
|
||||
for( ; seq; ++seq )
|
||||
for( LSEQ seq = m_board->GetEnabledLayers().UIOrder(); seq; ++seq )
|
||||
{
|
||||
PCB_LAYER_ID layer = *seq;
|
||||
int checkIndex;
|
||||
|
@ -174,7 +186,7 @@ void DIALOG_SVG_PRINT::initDialog()
|
|||
if( m_config )
|
||||
{
|
||||
wxString layerKey;
|
||||
layerKey.Printf( OPTKEY_LAYERBASE, layer );
|
||||
layerKey.Printf( PLOTSVG_LAYERBASE, layer );
|
||||
bool option;
|
||||
|
||||
if( m_config && m_config->Read( layerKey, &option ) )
|
||||
|
@ -184,7 +196,7 @@ void DIALOG_SVG_PRINT::initDialog()
|
|||
}
|
||||
|
||||
|
||||
LSET DIALOG_SVG_PRINT::getCheckBoxSelectedLayers() const
|
||||
LSET DIALOG_EXPORT_SVG::getCheckBoxSelectedLayers() const
|
||||
{
|
||||
LSET ret;
|
||||
|
||||
|
@ -201,7 +213,7 @@ LSET DIALOG_SVG_PRINT::getCheckBoxSelectedLayers() const
|
|||
}
|
||||
|
||||
|
||||
void DIALOG_SVG_PRINT::OnOutputDirectoryBrowseClicked( wxCommandEvent& event )
|
||||
void DIALOG_EXPORT_SVG::OnOutputDirectoryBrowseClicked( wxCommandEvent& event )
|
||||
{
|
||||
// Build the absolute path of current output plot directory
|
||||
// to preselect it when opening the dialog.
|
||||
|
@ -215,8 +227,7 @@ void DIALOG_SVG_PRINT::OnOutputDirectoryBrowseClicked( wxCommandEvent& event )
|
|||
|
||||
wxFileName dirName = wxFileName::DirName( dirDialog.GetPath() );
|
||||
|
||||
wxMessageDialog dialog( this, _( "Use a relative path?" ),
|
||||
_( "Plot Output Directory" ),
|
||||
wxMessageDialog dialog( this, _( "Use a relative path?" ), _( "Plot Output Directory" ),
|
||||
wxYES_NO | wxICON_QUESTION | wxYES_DEFAULT );
|
||||
|
||||
if( dialog.ShowModal() == wxID_YES )
|
||||
|
@ -235,26 +246,7 @@ void DIALOG_SVG_PRINT::OnOutputDirectoryBrowseClicked( wxCommandEvent& event )
|
|||
}
|
||||
|
||||
|
||||
void DIALOG_SVG_PRINT::SetPenWidth()
|
||||
{
|
||||
int pensize = ValueFromTextCtrl( *m_DialogDefaultPenSize );
|
||||
|
||||
if( pensize > WIDTH_MAX_VALUE )
|
||||
{
|
||||
pensize = WIDTH_MAX_VALUE;
|
||||
}
|
||||
|
||||
if( pensize < WIDTH_MIN_VALUE )
|
||||
{
|
||||
pensize = WIDTH_MIN_VALUE;
|
||||
}
|
||||
|
||||
g_DrawDefaultLineThickness = pensize;
|
||||
m_DialogDefaultPenSize->SetValue( StringFromValue( g_UserUnit, pensize ) );
|
||||
}
|
||||
|
||||
|
||||
void DIALOG_SVG_PRINT::ExportSVGFile( bool aOnlyOneFile )
|
||||
void DIALOG_EXPORT_SVG::ExportSVGFile( bool aOnlyOneFile )
|
||||
{
|
||||
m_outputDirectory = m_outputDirectoryName->GetValue();
|
||||
|
||||
|
@ -267,45 +259,40 @@ void DIALOG_SVG_PRINT::ExportSVGFile( bool aOnlyOneFile )
|
|||
|
||||
if( !EnsureFileDirectoryExists( &outputDir, boardFilename, &reporter ) )
|
||||
{
|
||||
wxString msg = wxString::Format(
|
||||
_( "Could not write plot files to folder \"%s\"." ),
|
||||
GetChars( outputDir.GetPath() )
|
||||
);
|
||||
wxString msg = wxString::Format( _( "Could not write plot files to folder \"%s\"." ),
|
||||
outputDir.GetPath() );
|
||||
DisplayError( this, msg );
|
||||
return;
|
||||
}
|
||||
|
||||
m_printMirror = m_printMirrorOpt->GetValue();
|
||||
m_printBW = m_ModeColorOption->GetSelection();
|
||||
SetPenWidth();
|
||||
g_DrawDefaultLineThickness = m_defaultPenWidth.GetValue();
|
||||
|
||||
LSET all_selected = getCheckBoxSelectedLayers();
|
||||
|
||||
for( LSEQ seq = all_selected.Seq(); seq; ++seq )
|
||||
{
|
||||
PCB_LAYER_ID layer = *seq;
|
||||
|
||||
wxFileName fn( boardFilename );
|
||||
|
||||
wxString suffix = aOnlyOneFile ? wxT( "brd" ) : m_board->GetStandardLayerName( layer );
|
||||
|
||||
BuildPlotFileName( &fn, outputDir.GetPath(), suffix, SVGFileExtension );
|
||||
wxString path = fn.GetFullPath();
|
||||
|
||||
m_printMaskLayer = aOnlyOneFile ? all_selected : LSET( layer );
|
||||
|
||||
if( m_PrintBoardEdgesCtrl->IsChecked() )
|
||||
m_printMaskLayer.set( Edge_Cuts );
|
||||
|
||||
if( CreateSVGFile( fn.GetFullPath() ) )
|
||||
if( CreateSVGFile( path ) )
|
||||
{
|
||||
reporter.Report (
|
||||
wxString::Format( _( "Plot: \"%s\" OK." ), GetChars( fn.GetFullPath() ) ),
|
||||
reporter.Report( wxString::Format( _( "Exported \"%s\"." ), path ),
|
||||
REPORTER::RPT_ACTION );
|
||||
}
|
||||
else // Error
|
||||
{
|
||||
reporter.Report (
|
||||
wxString::Format( _( "Unable to create file \"%s\"." ), GetChars( fn.GetFullPath() ) ),
|
||||
reporter.Report( wxString::Format( _( "Unable to create file \"%s\"." ), path ),
|
||||
REPORTER::RPT_ERROR );
|
||||
}
|
||||
|
||||
|
@ -316,11 +303,11 @@ void DIALOG_SVG_PRINT::ExportSVGFile( bool aOnlyOneFile )
|
|||
|
||||
|
||||
// Actual SVG file export function.
|
||||
bool DIALOG_SVG_PRINT::CreateSVGFile( const wxString& aFullFileName )
|
||||
bool DIALOG_EXPORT_SVG::CreateSVGFile( const wxString& aFullFileName )
|
||||
{
|
||||
PCB_PLOT_PARAMS plot_opts;
|
||||
|
||||
plot_opts.SetPlotFrameRef( PrintPageRef() );
|
||||
plot_opts.SetPlotFrameRef( m_rbSvgPageSizeOpt->GetSelection() == 0 );
|
||||
|
||||
// Adding drill marks, for copper layers
|
||||
if( ( m_printMaskLayer & LSET::AllCuMask() ).any() )
|
||||
|
@ -336,7 +323,7 @@ bool DIALOG_SVG_PRINT::CreateSVGFile( const wxString& aFullFileName )
|
|||
PAGE_INFO pageInfo = m_board->GetPageSettings();
|
||||
wxPoint axisorigin = m_board->GetAuxOrigin();
|
||||
|
||||
if( PageIsBoardBoundarySize() )
|
||||
if( m_rbSvgPageSizeOpt->GetSelection() == 2 ) // Page is board boundary size
|
||||
{
|
||||
EDA_RECT bbox = m_board->ComputeBoundingBox();
|
||||
PAGE_INFO currpageInfo = m_board->GetPageSettings();
|
||||
|
@ -351,8 +338,8 @@ bool DIALOG_SVG_PRINT::CreateSVGFile( const wxString& aFullFileName )
|
|||
|
||||
LOCALE_IO toggle;
|
||||
|
||||
SVG_PLOTTER* plotter = (SVG_PLOTTER*) StartPlotBoard( m_board,
|
||||
&plot_opts, UNDEFINED_LAYER, aFullFileName, wxEmptyString );
|
||||
SVG_PLOTTER* plotter = (SVG_PLOTTER*) StartPlotBoard( m_board, &plot_opts, UNDEFINED_LAYER,
|
||||
aFullFileName, wxEmptyString );
|
||||
|
||||
if( plotter )
|
||||
{
|
||||
|
@ -373,67 +360,18 @@ bool DIALOG_SVG_PRINT::CreateSVGFile( const wxString& aFullFileName )
|
|||
}
|
||||
|
||||
|
||||
void DIALOG_SVG_PRINT::OnButtonPlot( wxCommandEvent& event )
|
||||
void DIALOG_EXPORT_SVG::OnButtonPlot( wxCommandEvent& event )
|
||||
{
|
||||
m_oneFileOnly = m_rbFileOpt->GetSelection() == 1;
|
||||
ExportSVGFile( m_oneFileOnly );
|
||||
|
||||
m_did_print = true;
|
||||
}
|
||||
|
||||
|
||||
void DIALOG_SVG_PRINT::OnButtonCloseClick( wxCommandEvent& event )
|
||||
bool InvokeExportSVG( PCB_BASE_FRAME* aCaller, BOARD* aBoard )
|
||||
{
|
||||
Close();
|
||||
}
|
||||
|
||||
|
||||
void DIALOG_SVG_PRINT::OnCloseWindow( wxCloseEvent& event )
|
||||
{
|
||||
if( m_did_print ) // unless output was created, this is tantamount to a cancel.
|
||||
{
|
||||
SetPenWidth();
|
||||
m_printBW = m_ModeColorOption->GetSelection();
|
||||
m_oneFileOnly = m_rbFileOpt->GetSelection() == 1;
|
||||
|
||||
// Why are SVG layer choices co-mingled with other plot layer choices in the config file?
|
||||
// The string OPTKEY_LAYERBASE is used in multiple places.
|
||||
// fix this.
|
||||
|
||||
wxString dirStr = m_outputDirectoryName->GetValue();
|
||||
dirStr.Replace( wxT( "\\" ), wxT( "/" ) );
|
||||
|
||||
m_callers_params->SetOutputDirectory( dirStr );
|
||||
|
||||
if( m_config )
|
||||
{
|
||||
m_config->Write( PLOTSVGMODECOLOR_KEY, m_printBW );
|
||||
m_config->Write( PLOTSVGMODEMIRROR_KEY, m_printMirror );
|
||||
m_config->Write( PLOTSVGMODEONEFILE_KEY, m_oneFileOnly );
|
||||
m_config->Write( PLOTSVGPAGESIZEOPT_KEY, m_rbSvgPageSizeOpt->GetSelection() );
|
||||
m_config->Write( PLOTSVGPLOT_BRD_EDGE_KEY, m_PrintBoardEdgesCtrl->GetValue() );
|
||||
|
||||
wxString layerKey;
|
||||
|
||||
for( unsigned layer = 0; layer < DIM(m_boxSelectLayer); ++layer )
|
||||
{
|
||||
if( !m_boxSelectLayer[layer].first )
|
||||
continue;
|
||||
|
||||
layerKey.Printf( OPTKEY_LAYERBASE, layer );
|
||||
m_config->Write( layerKey,
|
||||
m_boxSelectLayer[layer].first->IsChecked( m_boxSelectLayer[layer].second ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
EndModal( m_did_print ? wxID_OK : wxID_CANCEL );
|
||||
}
|
||||
|
||||
|
||||
bool InvokeSVGPrint( wxTopLevelWindow* aCaller, BOARD* aBoard, PCB_PLOT_PARAMS* aSettings )
|
||||
{
|
||||
DIALOG_SVG_PRINT dlg( aCaller, aBoard, aSettings );
|
||||
|
||||
return dlg.ShowModal() == wxID_OK;
|
||||
DIALOG_EXPORT_SVG dlg( aCaller, aBoard );
|
||||
|
||||
dlg.ShowModal();
|
||||
|
||||
return true;
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Apr 19 2018)
|
||||
// C++ code generated with wxFormBuilder (version Dec 30 2017)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
|
@ -7,48 +7,50 @@
|
|||
|
||||
#include "wx_html_report_panel.h"
|
||||
|
||||
#include "dialog_SVG_print_base.h"
|
||||
#include "dialog_export_svg_base.h"
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
DIALOG_SVG_PRINT_base::DIALOG_SVG_PRINT_base( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
|
||||
DIALOG_EXPORT_SVG_BASE::DIALOG_EXPORT_SVG_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,350 ), wxDefaultSize );
|
||||
|
||||
wxBoxSizer* bMainSizer;
|
||||
bMainSizer = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
m_staticTextDir = new wxStaticText( this, wxID_ANY, _("Output directory:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextDir->Wrap( -1 );
|
||||
bMainSizer->Add( m_staticTextDir, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
wxBoxSizer* bSizer4;
|
||||
bSizer4 = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
m_staticTextDir = new wxStaticText( this, wxID_ANY, _("Output directory:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextDir->Wrap( -1 );
|
||||
bSizer4->Add( m_staticTextDir, 0, wxALL, 5 );
|
||||
|
||||
m_outputDirectoryName = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_outputDirectoryName->SetToolTip( _("Enter a filename if you do not want to use default file names\nCan be used only when printing the current sheet") );
|
||||
m_outputDirectoryName->SetMinSize( wxSize( 450,-1 ) );
|
||||
|
||||
bSizer4->Add( m_outputDirectoryName, 1, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
bSizer4->Add( m_outputDirectoryName, 1, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
|
||||
|
||||
m_browseButton = new wxButton( this, wxID_ANY, _("Browse..."), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bSizer4->Add( m_browseButton, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
m_browseButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW );
|
||||
m_browseButton->SetMinSize( wxSize( 30,30 ) );
|
||||
|
||||
bSizer4->Add( m_browseButton, 0, 0, 5 );
|
||||
|
||||
|
||||
bMainSizer->Add( bSizer4, 0, wxEXPAND|wxBOTTOM, 5 );
|
||||
bMainSizer->Add( bSizer4, 0, wxEXPAND|wxALL, 10 );
|
||||
|
||||
wxBoxSizer* bUpperSizer;
|
||||
bUpperSizer = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
wxStaticBoxSizer* sbLayersSizer;
|
||||
sbLayersSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Layers:") ), wxHORIZONTAL );
|
||||
sbLayersSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Layers") ), wxHORIZONTAL );
|
||||
|
||||
wxBoxSizer* bSizerCopper;
|
||||
bSizerCopper = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
m_staticTextCopperLayers = new wxStaticText( sbLayersSizer->GetStaticBox(), wxID_ANY, _("Copper layers:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextCopperLayers->Wrap( -1 );
|
||||
bSizerCopper->Add( m_staticTextCopperLayers, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
bSizerCopper->Add( m_staticTextCopperLayers, 0, wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
wxArrayString m_CopperLayersListChoices;
|
||||
m_CopperLayersList = new wxCheckListBox( sbLayersSizer->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_CopperLayersListChoices, 0 );
|
||||
|
@ -62,7 +64,7 @@ DIALOG_SVG_PRINT_base::DIALOG_SVG_PRINT_base( wxWindow* parent, wxWindowID id, c
|
|||
|
||||
m_staticTextTechLayers = new wxStaticText( sbLayersSizer->GetStaticBox(), wxID_ANY, _("Technical layers:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextTechLayers->Wrap( -1 );
|
||||
bSizerTech->Add( m_staticTextTechLayers, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
bSizerTech->Add( m_staticTextTechLayers, 0, wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
wxArrayString m_TechnicalLayersListChoices;
|
||||
m_TechnicalLayersList = new wxCheckListBox( sbLayersSizer->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_TechnicalLayersListChoices, 0 );
|
||||
|
@ -72,31 +74,41 @@ DIALOG_SVG_PRINT_base::DIALOG_SVG_PRINT_base( wxWindow* parent, wxWindowID id, c
|
|||
sbLayersSizer->Add( bSizerTech, 1, wxEXPAND, 5 );
|
||||
|
||||
|
||||
bUpperSizer->Add( sbLayersSizer, 1, wxALL|wxEXPAND, 5 );
|
||||
bUpperSizer->Add( sbLayersSizer, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
wxStaticBoxSizer* sbOptionsSizer;
|
||||
sbOptionsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Print SVG Options:") ), wxVERTICAL );
|
||||
sbOptionsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Options") ), wxVERTICAL );
|
||||
|
||||
m_TextPenWidth = new wxStaticText( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("Default pen size:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_TextPenWidth->Wrap( -1 );
|
||||
m_TextPenWidth->SetToolTip( _("Selection of the pen size used to draw items which have no pen size specified.") );
|
||||
wxBoxSizer* bSizer8;
|
||||
bSizer8 = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
sbOptionsSizer->Add( m_TextPenWidth, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
m_penWidthLabel = new wxStaticText( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("Default pen size:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_penWidthLabel->Wrap( -1 );
|
||||
m_penWidthLabel->SetToolTip( _("Selection of the pen size used to draw items which have no pen size specified.") );
|
||||
|
||||
m_DialogDefaultPenSize = new wxTextCtrl( sbOptionsSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
sbOptionsSizer->Add( m_DialogDefaultPenSize, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
|
||||
bSizer8->Add( m_penWidthLabel, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_penWidthCtrl = new wxTextCtrl( sbOptionsSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bSizer8->Add( m_penWidthCtrl, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
|
||||
|
||||
m_penWidthUnits = new wxStaticText( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_penWidthUnits->Wrap( -1 );
|
||||
bSizer8->Add( m_penWidthUnits, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
|
||||
|
||||
|
||||
sbOptionsSizer->Add( bSizer8, 1, wxEXPAND, 5 );
|
||||
|
||||
wxString m_ModeColorOptionChoices[] = { _("Color"), _("Black and white") };
|
||||
int m_ModeColorOptionNChoices = sizeof( m_ModeColorOptionChoices ) / sizeof( wxString );
|
||||
m_ModeColorOption = new wxRadioBox( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("Print Mode:"), wxDefaultPosition, wxDefaultSize, m_ModeColorOptionNChoices, m_ModeColorOptionChoices, 1, wxRA_SPECIFY_COLS );
|
||||
m_ModeColorOption = new wxRadioBox( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("Print Mode"), wxDefaultPosition, wxDefaultSize, m_ModeColorOptionNChoices, m_ModeColorOptionChoices, 1, wxRA_SPECIFY_COLS );
|
||||
m_ModeColorOption->SetSelection( 1 );
|
||||
m_ModeColorOption->SetToolTip( _("Choose if you want to draw the sheet like it appears on screen,\nor in black and white mode, better to print it when using black and white printers") );
|
||||
|
||||
sbOptionsSizer->Add( m_ModeColorOption, 0, wxEXPAND|wxALL, 5 );
|
||||
|
||||
wxString m_rbSvgPageSizeOptChoices[] = { _("Full page with frame ref"), _("Current page size"), _("Board area only") };
|
||||
wxString m_rbSvgPageSizeOptChoices[] = { _("Page with frame and title block"), _("Current page size"), _("Board area only") };
|
||||
int m_rbSvgPageSizeOptNChoices = sizeof( m_rbSvgPageSizeOptChoices ) / sizeof( wxString );
|
||||
m_rbSvgPageSizeOpt = new wxRadioBox( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("SVG Page Size:"), wxDefaultPosition, wxDefaultSize, m_rbSvgPageSizeOptNChoices, m_rbSvgPageSizeOptChoices, 1, wxRA_SPECIFY_COLS );
|
||||
m_rbSvgPageSizeOpt = new wxRadioBox( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("SVG Page Size"), wxDefaultPosition, wxDefaultSize, m_rbSvgPageSizeOptNChoices, m_rbSvgPageSizeOptChoices, 1, wxRA_SPECIFY_COLS );
|
||||
m_rbSvgPageSizeOpt->SetSelection( 0 );
|
||||
sbOptionsSizer->Add( m_rbSvgPageSizeOpt, 0, wxEXPAND|wxALL, 5 );
|
||||
|
||||
|
@ -111,29 +123,17 @@ DIALOG_SVG_PRINT_base::DIALOG_SVG_PRINT_base( wxWindow* parent, wxWindowID id, c
|
|||
|
||||
sbOptionsSizer->Add( m_printMirrorOpt, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
|
||||
|
||||
|
||||
bUpperSizer->Add( sbOptionsSizer, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
wxBoxSizer* bButtonsSizer;
|
||||
bButtonsSizer = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
wxString m_rbFileOptChoices[] = { _("One file per layer"), _("All in one file") };
|
||||
wxString m_rbFileOptChoices[] = { _("One file per layer"), _("All layers in a single file") };
|
||||
int m_rbFileOptNChoices = sizeof( m_rbFileOptChoices ) / sizeof( wxString );
|
||||
m_rbFileOpt = new wxRadioBox( this, wxID_ANY, _("File Option:"), wxDefaultPosition, wxDefaultSize, m_rbFileOptNChoices, m_rbFileOptChoices, 1, wxRA_SPECIFY_COLS );
|
||||
m_rbFileOpt = new wxRadioBox( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("Pagination"), wxDefaultPosition, wxDefaultSize, m_rbFileOptNChoices, m_rbFileOptChoices, 1, wxRA_SPECIFY_COLS );
|
||||
m_rbFileOpt->SetSelection( 0 );
|
||||
bButtonsSizer->Add( m_rbFileOpt, 0, wxALL, 5 );
|
||||
|
||||
m_buttonCreateFile = new wxButton( this, wxID_PRINT_BOARD, _("Plot"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bButtonsSizer->Add( m_buttonCreateFile, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
m_buttonQuit = new wxButton( this, wxID_CANCEL, _("Close"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bButtonsSizer->Add( m_buttonQuit, 0, wxALL|wxEXPAND, 5 );
|
||||
sbOptionsSizer->Add( m_rbFileOpt, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
|
||||
bUpperSizer->Add( bButtonsSizer, 0, wxEXPAND, 5 );
|
||||
bUpperSizer->Add( sbOptionsSizer, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
bMainSizer->Add( bUpperSizer, 0, wxEXPAND, 5 );
|
||||
bMainSizer->Add( bUpperSizer, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
wxBoxSizer* bSizer5;
|
||||
bSizer5 = new wxBoxSizer( wxVERTICAL );
|
||||
|
@ -146,24 +146,29 @@ DIALOG_SVG_PRINT_base::DIALOG_SVG_PRINT_base( wxWindow* parent, wxWindowID id, c
|
|||
|
||||
bMainSizer->Add( bSizer5, 1, wxEXPAND, 5 );
|
||||
|
||||
m_sdbSizer1 = new wxStdDialogButtonSizer();
|
||||
m_sdbSizer1OK = new wxButton( this, wxID_OK );
|
||||
m_sdbSizer1->AddButton( m_sdbSizer1OK );
|
||||
m_sdbSizer1Cancel = new wxButton( this, wxID_CANCEL );
|
||||
m_sdbSizer1->AddButton( m_sdbSizer1Cancel );
|
||||
m_sdbSizer1->Realize();
|
||||
|
||||
bMainSizer->Add( m_sdbSizer1, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
|
||||
this->SetSizer( bMainSizer );
|
||||
this->Layout();
|
||||
bMainSizer->Fit( this );
|
||||
|
||||
// Connect Events
|
||||
this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_SVG_PRINT_base::OnCloseWindow ) );
|
||||
m_browseButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SVG_PRINT_base::OnOutputDirectoryBrowseClicked ), NULL, this );
|
||||
m_buttonCreateFile->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SVG_PRINT_base::OnButtonPlot ), NULL, this );
|
||||
m_buttonQuit->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SVG_PRINT_base::OnButtonCloseClick ), NULL, this );
|
||||
m_browseButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXPORT_SVG_BASE::OnOutputDirectoryBrowseClicked ), NULL, this );
|
||||
m_sdbSizer1OK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXPORT_SVG_BASE::OnButtonPlot ), NULL, this );
|
||||
}
|
||||
|
||||
DIALOG_SVG_PRINT_base::~DIALOG_SVG_PRINT_base()
|
||||
DIALOG_EXPORT_SVG_BASE::~DIALOG_EXPORT_SVG_BASE()
|
||||
{
|
||||
// Disconnect Events
|
||||
this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_SVG_PRINT_base::OnCloseWindow ) );
|
||||
m_browseButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SVG_PRINT_base::OnOutputDirectoryBrowseClicked ), NULL, this );
|
||||
m_buttonCreateFile->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SVG_PRINT_base::OnButtonPlot ), NULL, this );
|
||||
m_buttonQuit->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SVG_PRINT_base::OnButtonCloseClick ), NULL, this );
|
||||
m_browseButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXPORT_SVG_BASE::OnOutputDirectoryBrowseClicked ), NULL, this );
|
||||
m_sdbSizer1OK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXPORT_SVG_BASE::OnButtonPlot ), NULL, this );
|
||||
|
||||
}
|
|
@ -11,12 +11,11 @@
|
|||
<property name="embedded_files_path">res</property>
|
||||
<property name="encoding">UTF-8</property>
|
||||
<property name="event_generation">connect</property>
|
||||
<property name="file">dialog_SVG_print_base</property>
|
||||
<property name="file">dialog_export_svg_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">DialogSVGPrint_base</property>
|
||||
<property name="name">dialog_export_svg</property>
|
||||
<property name="namespace"></property>
|
||||
<property name="path">.</property>
|
||||
<property name="precompiled_header"></property>
|
||||
|
@ -43,7 +42,7 @@
|
|||
<property name="id">wxID_ANY</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="minimum_size">-1,350</property>
|
||||
<property name="name">DIALOG_SVG_PRINT_base</property>
|
||||
<property name="name">DIALOG_EXPORT_SVG_BASE</property>
|
||||
<property name="pos"></property>
|
||||
<property name="size">-1,-1</property>
|
||||
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
|
||||
|
@ -62,7 +61,7 @@
|
|||
<event name="OnAuiPaneRestore"></event>
|
||||
<event name="OnAuiRender"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnClose">OnCloseWindow</event>
|
||||
<event name="OnClose"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnHibernate"></event>
|
||||
|
@ -94,9 +93,18 @@
|
|||
<property name="name">bMainSizer</property>
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">10</property>
|
||||
<property name="flag">wxEXPAND|wxALL</property>
|
||||
<property name="proportion">0</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="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxTOP|wxRIGHT|wxLEFT</property>
|
||||
<property name="flag">wxALL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
|
@ -177,18 +185,9 @@
|
|||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxBOTTOM</property>
|
||||
<property name="proportion">0</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="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxTextCtrl" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
|
@ -277,11 +276,11 @@
|
|||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL</property>
|
||||
<property name="flag"></property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxButton" expanded="0">
|
||||
<object class="wxBitmapButton" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
|
@ -292,6 +291,7 @@
|
|||
<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>
|
||||
|
@ -300,23 +300,26 @@
|
|||
<property name="context_menu">1</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>
|
||||
<property name="floatable">1</property>
|
||||
<property name="focus"></property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="hover"></property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Browse...</property>
|
||||
<property name="label">MyButton</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="minimum_size">30,30</property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_browseButton</property>
|
||||
<property name="pane_border">1</property>
|
||||
|
@ -326,10 +329,11 @@
|
|||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="selected"></property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="style">wxBU_AUTODRAW</property>
|
||||
<property name="subclass">; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
|
@ -369,7 +373,7 @@
|
|||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="flag">wxEXPAND|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size"></property>
|
||||
|
@ -378,11 +382,11 @@
|
|||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL|wxEXPAND</property>
|
||||
<property name="flag">wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxStaticBoxSizer" expanded="1">
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Layers:</property>
|
||||
<property name="label">Layers</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">sbLayersSizer</property>
|
||||
<property name="orient">wxHORIZONTAL</property>
|
||||
|
@ -400,7 +404,7 @@
|
|||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxTOP|wxRIGHT|wxLEFT</property>
|
||||
<property name="flag">wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
|
@ -583,7 +587,7 @@
|
|||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxTOP|wxRIGHT|wxLEFT</property>
|
||||
<property name="flag">wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
|
@ -759,20 +763,29 @@
|
|||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL|wxEXPAND</property>
|
||||
<property name="flag">wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticBoxSizer" expanded="1">
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Print SVG Options:</property>
|
||||
<property name="label">Options</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">sbOptionsSizer</property>
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
<property name="parent">1</property>
|
||||
<property name="permission">none</property>
|
||||
<event name="OnUpdateUI"></event>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">bSizer8</property>
|
||||
<property name="orient">wxHORIZONTAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxTOP|wxRIGHT|wxLEFT</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
|
@ -810,7 +823,7 @@
|
|||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_TextPenWidth</property>
|
||||
<property name="name">m_penWidthLabel</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
|
@ -893,7 +906,7 @@
|
|||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_DialogDefaultPenSize</property>
|
||||
<property name="name">m_penWidthCtrl</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
|
@ -944,6 +957,91 @@
|
|||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT</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">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">mm</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_penWidthUnits</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>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxALL</property>
|
||||
|
@ -977,7 +1075,7 @@
|
|||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Print Mode:</property>
|
||||
<property name="label">Print Mode</property>
|
||||
<property name="majorDimension">1</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
|
@ -1052,7 +1150,7 @@
|
|||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="choices">"Full page with frame ref" "Current page size" "Board area only"</property>
|
||||
<property name="choices">"Page with frame and title block" "Current page size" "Board area only"</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
|
@ -1067,7 +1165,7 @@
|
|||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">SVG Page Size:</property>
|
||||
<property name="label">SVG Page Size</property>
|
||||
<property name="majorDimension">1</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
|
@ -1300,20 +1398,9 @@
|
|||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">bButtonsSizer</property>
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL</property>
|
||||
<property name="flag">wxALL|wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxRadioBox" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
|
@ -1329,7 +1416,7 @@
|
|||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="choices">"One file per layer" "All in one file"</property>
|
||||
<property name="choices">"One file per layer" "All layers in a single file"</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
|
@ -1344,7 +1431,7 @@
|
|||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">File Option:</property>
|
||||
<property name="label">Pagination</property>
|
||||
<property name="majorDimension">1</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
|
@ -1401,182 +1488,6 @@
|
|||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL|wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxButton" expanded="0">
|
||||
<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">0</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_PRINT_BOARD</property>
|
||||
<property name="label">Plot</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_buttonCreateFile</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"></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="OnButtonClick">OnButtonPlot</event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL|wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxButton" expanded="0">
|
||||
<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">0</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_CANCEL</property>
|
||||
<property name="label">Close</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_buttonQuit</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"></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="OnButtonClick">OnButtonCloseClick</event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
|
@ -1672,6 +1583,32 @@
|
|||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL|wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStdDialogButtonSizer" expanded="1">
|
||||
<property name="Apply">0</property>
|
||||
<property name="Cancel">1</property>
|
||||
<property name="ContextHelp">0</property>
|
||||
<property name="Help">0</property>
|
||||
<property name="No">0</property>
|
||||
<property name="OK">1</property>
|
||||
<property name="Save">0</property>
|
||||
<property name="Yes">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">m_sdbSizer1</property>
|
||||
<property name="permission">protected</property>
|
||||
<event name="OnApplyButtonClick"></event>
|
||||
<event name="OnCancelButtonClick"></event>
|
||||
<event name="OnContextHelpButtonClick"></event>
|
||||
<event name="OnHelpButtonClick"></event>
|
||||
<event name="OnNoButtonClick"></event>
|
||||
<event name="OnOKButtonClick">OnButtonPlot</event>
|
||||
<event name="OnSaveButtonClick"></event>
|
||||
<event name="OnYesButtonClick"></event>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
|
@ -1,12 +1,12 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Apr 19 2018)
|
||||
// C++ code generated with wxFormBuilder (version Dec 30 2017)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __DIALOG_SVG_PRINT_BASE_H__
|
||||
#define __DIALOG_SVG_PRINT_BASE_H__
|
||||
#ifndef __DIALOG_EXPORT_SVG_BASE_H__
|
||||
#define __DIALOG_EXPORT_SVG_BASE_H__
|
||||
|
||||
#include <wx/artprov.h>
|
||||
#include <wx/xrc/xmlres.h>
|
||||
|
@ -21,6 +21,10 @@ class WX_HTML_REPORT_PANEL;
|
|||
#include <wx/colour.h>
|
||||
#include <wx/settings.h>
|
||||
#include <wx/textctrl.h>
|
||||
#include <wx/bitmap.h>
|
||||
#include <wx/image.h>
|
||||
#include <wx/icon.h>
|
||||
#include <wx/bmpbuttn.h>
|
||||
#include <wx/button.h>
|
||||
#include <wx/sizer.h>
|
||||
#include <wx/checklst.h>
|
||||
|
@ -33,48 +37,43 @@ class WX_HTML_REPORT_PANEL;
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Class DIALOG_SVG_PRINT_base
|
||||
/// Class DIALOG_EXPORT_SVG_BASE
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class DIALOG_SVG_PRINT_base : public DIALOG_SHIM
|
||||
class DIALOG_EXPORT_SVG_BASE : public DIALOG_SHIM
|
||||
{
|
||||
private:
|
||||
|
||||
protected:
|
||||
enum
|
||||
{
|
||||
wxID_PRINT_BOARD = 1000
|
||||
};
|
||||
|
||||
wxStaticText* m_staticTextDir;
|
||||
wxTextCtrl* m_outputDirectoryName;
|
||||
wxButton* m_browseButton;
|
||||
wxBitmapButton* m_browseButton;
|
||||
wxStaticText* m_staticTextCopperLayers;
|
||||
wxCheckListBox* m_CopperLayersList;
|
||||
wxStaticText* m_staticTextTechLayers;
|
||||
wxCheckListBox* m_TechnicalLayersList;
|
||||
wxStaticText* m_TextPenWidth;
|
||||
wxTextCtrl* m_DialogDefaultPenSize;
|
||||
wxStaticText* m_penWidthLabel;
|
||||
wxTextCtrl* m_penWidthCtrl;
|
||||
wxStaticText* m_penWidthUnits;
|
||||
wxRadioBox* m_ModeColorOption;
|
||||
wxRadioBox* m_rbSvgPageSizeOpt;
|
||||
wxCheckBox* m_PrintBoardEdgesCtrl;
|
||||
wxCheckBox* m_printMirrorOpt;
|
||||
wxRadioBox* m_rbFileOpt;
|
||||
wxButton* m_buttonCreateFile;
|
||||
wxButton* m_buttonQuit;
|
||||
WX_HTML_REPORT_PANEL* m_messagesPanel;
|
||||
wxStdDialogButtonSizer* m_sdbSizer1;
|
||||
wxButton* m_sdbSizer1OK;
|
||||
wxButton* m_sdbSizer1Cancel;
|
||||
|
||||
// Virtual event handlers, overide them in your derived class
|
||||
virtual void OnCloseWindow( wxCloseEvent& event ) { event.Skip(); }
|
||||
virtual void OnOutputDirectoryBrowseClicked( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnButtonPlot( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnButtonCloseClick( wxCommandEvent& event ) { event.Skip(); }
|
||||
|
||||
|
||||
public:
|
||||
|
||||
DIALOG_SVG_PRINT_base( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Export SVG File"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
|
||||
~DIALOG_SVG_PRINT_base();
|
||||
DIALOG_EXPORT_SVG_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Export SVG File"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
|
||||
~DIALOG_EXPORT_SVG_BASE();
|
||||
|
||||
};
|
||||
|
||||
#endif //__DIALOG_SVG_PRINT_BASE_H__
|
||||
#endif //__DIALOG_EXPORT_SVG_BASE_H__
|
|
@ -42,10 +42,12 @@
|
|||
|
||||
|
||||
DIALOG_PLOT::DIALOG_PLOT( PCB_EDIT_FRAME* aParent ) :
|
||||
DIALOG_PLOT_BASE( aParent ), m_parent( aParent )
|
||||
DIALOG_PLOT_BASE( aParent ), m_parent( aParent ),
|
||||
m_defaultLineWidth( aParent, m_lineWidthLabel, m_lineWidthCtrl, m_lineWidthUnits, true, 0 ),
|
||||
m_defaultPenSize( aParent, m_hpglPenLabel, m_hpglPenCtrl, m_hpglPenUnits, true, 0 ),
|
||||
m_trackWidthCorrection( aParent, m_widthAdjustLabel, m_widthAdjustCtrl, m_widthAdjustUnits, true )
|
||||
{
|
||||
SetName( DLG_WINDOW_NAME );
|
||||
m_userUnits = g_UserUnit;
|
||||
m_config = Kiface().KifaceSettings();
|
||||
m_plotOpts = aParent->GetPlotSettings();
|
||||
init_Dialog();
|
||||
|
@ -67,7 +69,6 @@ DIALOG_PLOT::DIALOG_PLOT( PCB_EDIT_FRAME* aParent ) :
|
|||
void DIALOG_PLOT::init_Dialog()
|
||||
{
|
||||
BOARD* board = m_parent->GetBoard();
|
||||
wxString msg;
|
||||
wxFileName fileName;
|
||||
|
||||
m_config->Read( OPTKEY_PLOT_X_FINESCALE_ADJ, &m_XScaleAdjust );
|
||||
|
@ -100,30 +101,24 @@ void DIALOG_PLOT::init_Dialog()
|
|||
case PLOT_FORMAT_PDF: m_plotFormatOpt->SetSelection( 5 ); break;
|
||||
}
|
||||
|
||||
msg = StringFromValue( m_userUnits, board->GetDesignSettings().m_SolderMaskMargin, true );
|
||||
m_SolderMaskMarginCurrValue->SetLabel( msg );
|
||||
msg = StringFromValue( m_userUnits, board->GetDesignSettings().m_SolderMaskMinWidth, true );
|
||||
m_SolderMaskMinWidthCurrValue->SetLabel( msg );
|
||||
|
||||
// Set units and value for HPGL pen size (this param is in mils).
|
||||
msg = StringFromValue( m_userUnits, m_plotOpts.GetHPGLPenDiameter() * IU_PER_MILS, true );
|
||||
m_HPGLPenSizeOpt->SetValue( msg );
|
||||
m_defaultPenSize.SetValue( m_plotOpts.GetHPGLPenDiameter() * IU_PER_MILS );
|
||||
|
||||
m_linesWidth->SetValue( StringFromValue( m_userUnits, m_plotOpts.GetLineWidth(), true ) );
|
||||
m_defaultLineWidth.SetValue( m_plotOpts.GetLineWidth() );
|
||||
|
||||
// Test for a reasonable scale value. Set to 1 if problem
|
||||
if( m_XScaleAdjust < PLOT_MIN_SCALE || m_YScaleAdjust < PLOT_MIN_SCALE
|
||||
|| m_XScaleAdjust > PLOT_MAX_SCALE || m_YScaleAdjust > PLOT_MAX_SCALE )
|
||||
m_XScaleAdjust = m_YScaleAdjust = 1.0;
|
||||
|
||||
m_fineAdjustXscaleOpt->SetValue( StringFromValue( UNSCALED_UNITS, m_XScaleAdjust ) );
|
||||
m_fineAdjustYscaleOpt->SetValue( StringFromValue( UNSCALED_UNITS, m_YScaleAdjust ) );
|
||||
m_fineAdjustXCtrl->SetValue( StringFromValue( UNSCALED_UNITS, m_XScaleAdjust ) );
|
||||
m_fineAdjustYCtrl->SetValue( StringFromValue( UNSCALED_UNITS, m_YScaleAdjust ) );
|
||||
|
||||
// Test for a reasonable PS width correction value. Set to 0 if problem.
|
||||
if( m_PSWidthAdjust < m_widthAdjustMinValue || m_PSWidthAdjust > m_widthAdjustMaxValue )
|
||||
m_PSWidthAdjust = 0.;
|
||||
|
||||
m_PSFineAdjustWidthOpt->SetValue( StringFromValue( m_userUnits, m_PSWidthAdjust, true ) );
|
||||
m_trackWidthCorrection.SetValue( m_PSWidthAdjust );
|
||||
|
||||
m_plotPSNegativeOpt->SetValue( m_plotOpts.GetNegative() );
|
||||
m_forcePSA4OutputOpt->SetValue( m_plotOpts.GetA4Output() );
|
||||
|
@ -158,7 +153,7 @@ void DIALOG_PLOT::init_Dialog()
|
|||
m_generateGerberJobFile->SetValue( m_plotOpts.GetCreateGerberJobFile() );
|
||||
|
||||
// Gerber precision for coordinates
|
||||
m_rbGerberFormat->SetSelection( m_plotOpts.GetGerberPrecision() == 5 ? 0 : 1 );
|
||||
m_coordFormatCtrl->SetSelection( m_plotOpts.GetGerberPrecision() == 5 ? 0 : 1 );
|
||||
|
||||
// Option for excluding contents of "Edges Pcb" layer
|
||||
m_excludeEdgeLayerOpt->SetValue( m_plotOpts.GetExcludeEdgeLayer() );
|
||||
|
@ -221,20 +216,6 @@ void DIALOG_PLOT::reInitDialog()
|
|||
}
|
||||
|
||||
|
||||
void DIALOG_PLOT::OnQuit( wxCommandEvent& event )
|
||||
{
|
||||
event.Skip();
|
||||
|
||||
Destroy();
|
||||
}
|
||||
|
||||
|
||||
void DIALOG_PLOT::OnClose( wxCloseEvent& event )
|
||||
{
|
||||
Destroy();
|
||||
}
|
||||
|
||||
|
||||
// A helper function to show a popup menu, when the dialog is right clicked.
|
||||
void DIALOG_PLOT::OnRightClick( wxMouseEvent& event )
|
||||
{
|
||||
|
@ -400,14 +381,14 @@ void DIALOG_PLOT::SetPlotFormat( wxCommandEvent& event )
|
|||
m_plotMirrorOpt->Enable( true );
|
||||
m_useAuxOriginCheckBox->Enable( false );
|
||||
m_useAuxOriginCheckBox->SetValue( false );
|
||||
m_linesWidth->Enable( true );
|
||||
m_HPGLPenSizeOpt->Enable( false );
|
||||
m_defaultLineWidth.Enable( true );
|
||||
m_defaultPenSize.Enable( false );
|
||||
m_excludeEdgeLayerOpt->Enable( true );
|
||||
m_scaleOpt->Enable( false );
|
||||
m_scaleOpt->SetSelection( 1 );
|
||||
m_fineAdjustXscaleOpt->Enable( false );
|
||||
m_fineAdjustYscaleOpt->Enable( false );
|
||||
m_PSFineAdjustWidthOpt->Enable( false );
|
||||
m_fineAdjustXCtrl->Enable( false );
|
||||
m_fineAdjustYCtrl->Enable( false );
|
||||
m_trackWidthCorrection.Enable( false );
|
||||
m_plotPSNegativeOpt->Enable( true );
|
||||
m_forcePSA4OutputOpt->Enable( false );
|
||||
m_forcePSA4OutputOpt->SetValue( false );
|
||||
|
@ -424,13 +405,13 @@ void DIALOG_PLOT::SetPlotFormat( wxCommandEvent& event )
|
|||
m_plotMirrorOpt->Enable( true );
|
||||
m_useAuxOriginCheckBox->Enable( false );
|
||||
m_useAuxOriginCheckBox->SetValue( false );
|
||||
m_linesWidth->Enable( true );
|
||||
m_HPGLPenSizeOpt->Enable( false );
|
||||
m_defaultLineWidth.Enable( true );
|
||||
m_defaultPenSize.Enable( false );
|
||||
m_excludeEdgeLayerOpt->Enable( true );
|
||||
m_scaleOpt->Enable( true );
|
||||
m_fineAdjustXscaleOpt->Enable( true );
|
||||
m_fineAdjustYscaleOpt->Enable( true );
|
||||
m_PSFineAdjustWidthOpt->Enable( true );
|
||||
m_fineAdjustXCtrl->Enable( true );
|
||||
m_fineAdjustYCtrl->Enable( true );
|
||||
m_trackWidthCorrection.Enable( true );
|
||||
m_plotPSNegativeOpt->Enable( true );
|
||||
m_forcePSA4OutputOpt->Enable( true );
|
||||
|
||||
|
@ -448,14 +429,14 @@ void DIALOG_PLOT::SetPlotFormat( wxCommandEvent& event )
|
|||
m_plotMirrorOpt->Enable( false );
|
||||
m_plotMirrorOpt->SetValue( false );
|
||||
m_useAuxOriginCheckBox->Enable( true );
|
||||
m_linesWidth->Enable( true );
|
||||
m_HPGLPenSizeOpt->Enable( false );
|
||||
m_defaultLineWidth.Enable( true );
|
||||
m_defaultPenSize.Enable( false );
|
||||
m_excludeEdgeLayerOpt->Enable( true );
|
||||
m_scaleOpt->Enable( false );
|
||||
m_scaleOpt->SetSelection( 1 );
|
||||
m_fineAdjustXscaleOpt->Enable( false );
|
||||
m_fineAdjustYscaleOpt->Enable( false );
|
||||
m_PSFineAdjustWidthOpt->Enable( false );
|
||||
m_fineAdjustXCtrl->Enable( false );
|
||||
m_fineAdjustYCtrl->Enable( false );
|
||||
m_trackWidthCorrection.Enable( false );
|
||||
m_plotPSNegativeOpt->Enable( false );
|
||||
m_plotPSNegativeOpt->SetValue( false );
|
||||
m_forcePSA4OutputOpt->Enable( false );
|
||||
|
@ -473,13 +454,13 @@ void DIALOG_PLOT::SetPlotFormat( wxCommandEvent& event )
|
|||
m_plotMirrorOpt->Enable( true );
|
||||
m_useAuxOriginCheckBox->Enable( false );
|
||||
m_useAuxOriginCheckBox->SetValue( false );
|
||||
m_linesWidth->Enable( false );
|
||||
m_HPGLPenSizeOpt->Enable( true );
|
||||
m_defaultLineWidth.Enable( false );
|
||||
m_defaultPenSize.Enable( true );
|
||||
m_excludeEdgeLayerOpt->Enable( true );
|
||||
m_scaleOpt->Enable( true );
|
||||
m_fineAdjustXscaleOpt->Enable( false );
|
||||
m_fineAdjustYscaleOpt->Enable( false );
|
||||
m_PSFineAdjustWidthOpt->Enable( false );
|
||||
m_fineAdjustXCtrl->Enable( false );
|
||||
m_fineAdjustYCtrl->Enable( false );
|
||||
m_trackWidthCorrection.Enable( false );
|
||||
m_plotPSNegativeOpt->SetValue( false );
|
||||
m_plotPSNegativeOpt->Enable( false );
|
||||
m_forcePSA4OutputOpt->Enable( true );
|
||||
|
@ -497,14 +478,14 @@ void DIALOG_PLOT::SetPlotFormat( wxCommandEvent& event )
|
|||
m_plotMirrorOpt->Enable( false );
|
||||
m_plotMirrorOpt->SetValue( false );
|
||||
m_useAuxOriginCheckBox->Enable( true );
|
||||
m_linesWidth->Enable( false );
|
||||
m_HPGLPenSizeOpt->Enable( false );
|
||||
m_defaultLineWidth.Enable( false );
|
||||
m_defaultPenSize.Enable( false );
|
||||
m_excludeEdgeLayerOpt->Enable( true );
|
||||
m_scaleOpt->Enable( false );
|
||||
m_scaleOpt->SetSelection( 1 );
|
||||
m_fineAdjustXscaleOpt->Enable( false );
|
||||
m_fineAdjustYscaleOpt->Enable( false );
|
||||
m_PSFineAdjustWidthOpt->Enable( false );
|
||||
m_fineAdjustXCtrl->Enable( false );
|
||||
m_fineAdjustYCtrl->Enable( false );
|
||||
m_trackWidthCorrection.Enable( false );
|
||||
m_plotPSNegativeOpt->Enable( false );
|
||||
m_plotPSNegativeOpt->SetValue( false );
|
||||
m_forcePSA4OutputOpt->Enable( false );
|
||||
|
@ -603,15 +584,11 @@ void DIALOG_PLOT::applyPlotSettings()
|
|||
// However, due to issues when converting this value from or to mm
|
||||
// that can slightly change the value, update this param only if it
|
||||
// is in use
|
||||
if( m_HPGLPenSizeOpt->IsEnabled() )
|
||||
if( getPlotFormat() == PLOT_FORMAT_HPGL )
|
||||
{
|
||||
msg = m_HPGLPenSizeOpt->GetValue();
|
||||
double dtmp = DoubleValueFromString( m_userUnits, msg ) / IU_PER_MILS;
|
||||
|
||||
if( !tempOptions.SetHPGLPenDiameter( dtmp ) )
|
||||
if( !tempOptions.SetHPGLPenDiameter( m_defaultPenSize.GetValue() / IU_PER_MILS ) )
|
||||
{
|
||||
msg = StringFromValue( m_userUnits, tempOptions.GetHPGLPenDiameter() * IU_PER_MILS );
|
||||
m_HPGLPenSizeOpt->SetValue( msg );
|
||||
m_defaultPenSize.SetValue( tempOptions.GetHPGLPenDiameter() * IU_PER_MILS );
|
||||
msg.Printf( _( "HPGL pen size constrained." ) );
|
||||
reporter.Report( msg, REPORTER::RPT_INFO );
|
||||
}
|
||||
|
@ -620,26 +597,22 @@ void DIALOG_PLOT::applyPlotSettings()
|
|||
tempOptions.SetHPGLPenDiameter( m_plotOpts.GetHPGLPenDiameter() );
|
||||
|
||||
// Default linewidth
|
||||
msg = m_linesWidth->GetValue();
|
||||
int tmp = ValueFromString( m_userUnits, msg );
|
||||
|
||||
if( !tempOptions.SetLineWidth( tmp ) )
|
||||
if( !tempOptions.SetLineWidth( m_defaultLineWidth.GetValue() ) )
|
||||
{
|
||||
msg = StringFromValue( m_userUnits, tempOptions.GetLineWidth() );
|
||||
m_linesWidth->SetValue( msg );
|
||||
m_defaultLineWidth.SetValue( tempOptions.GetLineWidth() );
|
||||
msg.Printf( _( "Default line width constrained." ) );
|
||||
reporter.Report( msg, REPORTER::RPT_INFO );
|
||||
}
|
||||
|
||||
// X scale
|
||||
double tmpDouble;
|
||||
msg = m_fineAdjustXscaleOpt->GetValue();
|
||||
msg = m_fineAdjustXCtrl->GetValue();
|
||||
msg.ToDouble( &tmpDouble );
|
||||
|
||||
if( !setDouble( &m_XScaleAdjust, tmpDouble, PLOT_MIN_SCALE, PLOT_MAX_SCALE ) )
|
||||
{
|
||||
msg.Printf( wxT( "%f" ), m_XScaleAdjust );
|
||||
m_fineAdjustXscaleOpt->SetValue( msg );
|
||||
m_fineAdjustXCtrl->SetValue( msg );
|
||||
msg.Printf( _( "X scale constrained." ) );
|
||||
reporter.Report( msg, REPORTER::RPT_INFO );
|
||||
}
|
||||
|
@ -647,13 +620,13 @@ void DIALOG_PLOT::applyPlotSettings()
|
|||
ConfigBaseWriteDouble( m_config, OPTKEY_PLOT_X_FINESCALE_ADJ, m_XScaleAdjust );
|
||||
|
||||
// Y scale
|
||||
msg = m_fineAdjustYscaleOpt->GetValue();
|
||||
msg = m_fineAdjustYCtrl->GetValue();
|
||||
msg.ToDouble( &tmpDouble );
|
||||
|
||||
if( !setDouble( &m_YScaleAdjust, tmpDouble, PLOT_MIN_SCALE, PLOT_MAX_SCALE ) )
|
||||
{
|
||||
msg.Printf( wxT( "%f" ), m_YScaleAdjust );
|
||||
m_fineAdjustYscaleOpt->SetValue( msg );
|
||||
m_fineAdjustYCtrl->SetValue( msg );
|
||||
msg.Printf( _( "Y scale constrained." ) );
|
||||
reporter.Report( msg, REPORTER::RPT_INFO );
|
||||
}
|
||||
|
@ -663,19 +636,16 @@ void DIALOG_PLOT::applyPlotSettings()
|
|||
m_config->Write( OPTKEY_PLOT_CHECK_ZONES, m_zoneFillCheck->GetValue() );
|
||||
|
||||
// PS Width correction
|
||||
msg = m_PSFineAdjustWidthOpt->GetValue();
|
||||
int itmp = ValueFromString( m_userUnits, msg );
|
||||
|
||||
if( !setInt( &m_PSWidthAdjust, itmp, m_widthAdjustMinValue, m_widthAdjustMaxValue ) )
|
||||
if( !setInt( &m_PSWidthAdjust, m_trackWidthCorrection.GetValue(),
|
||||
m_widthAdjustMinValue, m_widthAdjustMaxValue ) )
|
||||
{
|
||||
msg = StringFromValue( m_userUnits, m_PSWidthAdjust );
|
||||
m_PSFineAdjustWidthOpt->SetValue( msg );
|
||||
m_trackWidthCorrection.SetValue( m_PSWidthAdjust );
|
||||
msg.Printf( _( "Width correction constrained. "
|
||||
"The reasonable width correction value must be in a range of "
|
||||
" [%+f; %+f] (%s) for current design rules." ),
|
||||
To_User_Unit( m_userUnits, m_widthAdjustMinValue ),
|
||||
To_User_Unit( m_userUnits, m_widthAdjustMaxValue ),
|
||||
( m_userUnits == INCHES ) ? wxT( "\"" ) : wxT( "mm" ) );
|
||||
" [%s; %s] (%s) for current design rules." ),
|
||||
StringFromValue( GetUserUnits(), m_widthAdjustMinValue, false, true ),
|
||||
StringFromValue( GetUserUnits(), m_widthAdjustMaxValue, false, true ),
|
||||
GetAbbreviatedUnitsLabel( GetUserUnits(), true ) );
|
||||
reporter.Report( msg, REPORTER::RPT_WARNING );
|
||||
}
|
||||
|
||||
|
@ -690,7 +660,7 @@ void DIALOG_PLOT::applyPlotSettings()
|
|||
tempOptions.SetIncludeGerberNetlistInfo( m_useGerberNetAttributes->GetValue() );
|
||||
tempOptions.SetCreateGerberJobFile( m_generateGerberJobFile->GetValue() );
|
||||
|
||||
tempOptions.SetGerberPrecision( m_rbGerberFormat->GetSelection() == 0 ? 5 : 6 );
|
||||
tempOptions.SetGerberPrecision( m_coordFormatCtrl->GetSelection() == 0 ? 5 : 6 );
|
||||
|
||||
LSET selectedLayers;
|
||||
for( unsigned i = 0; i < m_layerList.size(); i++ )
|
||||
|
@ -806,14 +776,16 @@ void DIALOG_PLOT::Plot( wxCommandEvent& event )
|
|||
* the default scale adjust is initialized to 0 and saved in program
|
||||
* settings resulting in a divide by zero fault.
|
||||
*/
|
||||
if( m_fineAdjustXscaleOpt->IsEnabled() && m_XScaleAdjust != 0.0 )
|
||||
if( getPlotFormat() == PLOT_FORMAT_POST )
|
||||
{
|
||||
if( m_XScaleAdjust != 0.0 )
|
||||
m_plotOpts.SetFineScaleAdjustX( m_XScaleAdjust );
|
||||
|
||||
if( m_fineAdjustYscaleOpt->IsEnabled() && m_YScaleAdjust != 0.0 )
|
||||
if( m_YScaleAdjust != 0.0 )
|
||||
m_plotOpts.SetFineScaleAdjustY( m_YScaleAdjust );
|
||||
|
||||
if( m_PSFineAdjustWidthOpt->IsEnabled() )
|
||||
m_plotOpts.SetWidthAdjust( m_PSWidthAdjust );
|
||||
}
|
||||
|
||||
wxString file_ext( GetDefaultPlotExtension( m_plotOpts.GetFormat() ) );
|
||||
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
#include <class_board.h>
|
||||
#include <dialog_plot_base.h>
|
||||
#include <pcb_plot_params.h>
|
||||
#include <widgets/unit_binder.h>
|
||||
|
||||
// the plot dialog window name, used by wxWidgets
|
||||
#define DLG_WINDOW_NAME "plot_dialog-window"
|
||||
|
@ -43,7 +44,6 @@ public:
|
|||
|
||||
private:
|
||||
PCB_EDIT_FRAME* m_parent;
|
||||
EDA_UNITS_T m_userUnits; // units used when creating the dialog
|
||||
wxConfigBase* m_config;
|
||||
LSEQ m_layerList; // List to hold CheckListBox layer numbers
|
||||
double m_XScaleAdjust; // X scale factor adjust to compensate
|
||||
|
@ -57,13 +57,14 @@ private:
|
|||
int m_widthAdjustMinValue; // Global track width limits
|
||||
int m_widthAdjustMaxValue; // tracks width will be "clipped" whenever the
|
||||
// m_PSWidthAdjust to these limits.
|
||||
UNIT_BINDER m_defaultLineWidth;
|
||||
UNIT_BINDER m_defaultPenSize;
|
||||
UNIT_BINDER m_trackWidthCorrection;
|
||||
|
||||
PCB_PLOT_PARAMS m_plotOpts;
|
||||
|
||||
// Event called functions
|
||||
void Plot( wxCommandEvent& event ) override;
|
||||
void OnQuit( wxCommandEvent& event ) override;
|
||||
void OnClose( wxCloseEvent& event ) override;
|
||||
void OnOutputDirectoryBrowseClicked( wxCommandEvent& event ) override;
|
||||
void OnRightClick( wxMouseEvent& event ) override;
|
||||
void OnPopUpLayers( wxCommandEvent& event ) override;
|
||||
|
@ -78,7 +79,6 @@ private:
|
|||
void init_Dialog(); // main initialization
|
||||
void reInitDialog(); // initialization after calling drill dialog
|
||||
void applyPlotSettings();
|
||||
void doPlot( bool aCheckZones );
|
||||
PlotFormat getPlotFormat();
|
||||
|
||||
void setPlotModeChoiceSelection( EDA_DRAW_MODE_T aPlotMode )
|
||||
|
|
|
@ -20,50 +20,35 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr
|
|||
wxBoxSizer* bupperSizer;
|
||||
bupperSizer = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
wxBoxSizer* bSizerPlotFmt;
|
||||
bSizerPlotFmt = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
m_staticTextPlotFmt = new wxStaticText( this, wxID_ANY, _("Plot format:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextPlotFmt->Wrap( -1 );
|
||||
bSizerPlotFmt->Add( m_staticTextPlotFmt, 0, wxTOP, 5 );
|
||||
bupperSizer->Add( m_staticTextPlotFmt, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
|
||||
|
||||
wxString m_plotFormatOptChoices[] = { _("Gerber"), _("Postscript"), _("SVG"), _("DXF"), _("HPGL"), _("PDF") };
|
||||
int m_plotFormatOptNChoices = sizeof( m_plotFormatOptChoices ) / sizeof( wxString );
|
||||
m_plotFormatOpt = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_plotFormatOptNChoices, m_plotFormatOptChoices, 0 );
|
||||
m_plotFormatOpt->SetSelection( 0 );
|
||||
bSizerPlotFmt->Add( m_plotFormatOpt, 0, wxTOP, 6 );
|
||||
bupperSizer->Add( m_plotFormatOpt, 0, wxALL, 6 );
|
||||
|
||||
|
||||
bupperSizer->Add( bSizerPlotFmt, 0, wxEXPAND|wxRIGHT|wxLEFT, 10 );
|
||||
|
||||
wxBoxSizer* bSizerOutDir;
|
||||
bSizerOutDir = new wxBoxSizer( wxVERTICAL );
|
||||
bupperSizer->Add( 0, 0, 0, wxEXPAND|wxRIGHT|wxLEFT, 10 );
|
||||
|
||||
m_staticTextDir = new wxStaticText( this, wxID_ANY, _("Output directory:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextDir->Wrap( -1 );
|
||||
bSizerOutDir->Add( m_staticTextDir, 0, wxEXPAND|wxTOP, 5 );
|
||||
|
||||
wxBoxSizer* bSizer29;
|
||||
bSizer29 = new wxBoxSizer( wxHORIZONTAL );
|
||||
bupperSizer->Add( m_staticTextDir, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_outputDirectoryName = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_outputDirectoryName->SetToolTip( _("Target directory for plot files. Can be absolute or relative to the board file location.") );
|
||||
|
||||
bSizer29->Add( m_outputDirectoryName, 1, wxBOTTOM|wxEXPAND|wxTOP, 5 );
|
||||
bupperSizer->Add( m_outputDirectoryName, 1, wxEXPAND|wxTOP|wxBOTTOM, 5 );
|
||||
|
||||
m_browseButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW );
|
||||
m_browseButton->SetMinSize( wxSize( 29,29 ) );
|
||||
|
||||
bSizer29->Add( m_browseButton, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
|
||||
bupperSizer->Add( m_browseButton, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
|
||||
|
||||
|
||||
bSizerOutDir->Add( bSizer29, 1, wxEXPAND, 5 );
|
||||
|
||||
|
||||
bupperSizer->Add( bSizerOutDir, 1, wxLEFT|wxRIGHT, 5 );
|
||||
|
||||
|
||||
m_MainSizer->Add( bupperSizer, 0, wxEXPAND|wxLEFT|wxTOP, 5 );
|
||||
m_MainSizer->Add( bupperSizer, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
wxBoxSizer* bmiddleSizer;
|
||||
bmiddleSizer = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
@ -84,267 +69,238 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr
|
|||
wxStaticBoxSizer* sbOptionsSizer;
|
||||
sbOptionsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("General Options") ), wxVERTICAL );
|
||||
|
||||
wxBoxSizer* bSizer192;
|
||||
bSizer192 = new wxBoxSizer( wxHORIZONTAL );
|
||||
wxGridBagSizer* gbSizer1;
|
||||
gbSizer1 = new wxGridBagSizer( 3, 0 );
|
||||
gbSizer1->SetFlexibleDirection( wxHORIZONTAL );
|
||||
gbSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
||||
|
||||
wxBoxSizer* bSizerPlotItems;
|
||||
bSizerPlotItems = new wxBoxSizer( wxVERTICAL );
|
||||
m_plotSheetRef = new wxCheckBox( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("Plot border and title block"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_plotSheetRef->SetMinSize( wxSize( 280,-1 ) );
|
||||
|
||||
m_plotSheetRef = new wxCheckBox( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("Plot sheet reference on all layers"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bSizerPlotItems->Add( m_plotSheetRef, 0, wxTOP|wxRIGHT|wxLEFT, 2 );
|
||||
gbSizer1->Add( m_plotSheetRef, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_plotModuleValueOpt = new wxCheckBox( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("Plot footprint values"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_plotModuleValueOpt->SetValue(true);
|
||||
bSizerPlotItems->Add( m_plotModuleValueOpt, 0, wxTOP|wxRIGHT|wxLEFT, 2 );
|
||||
gbSizer1->Add( m_plotModuleValueOpt, wxGBPosition( 1, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_plotModuleRefOpt = new wxCheckBox( sbOptionsSizer->GetStaticBox(), ID_PRINT_REF, _("Plot footprint references"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_plotModuleRefOpt->SetValue(true);
|
||||
bSizerPlotItems->Add( m_plotModuleRefOpt, 0, wxTOP|wxRIGHT|wxLEFT, 2 );
|
||||
gbSizer1->Add( m_plotModuleRefOpt, wxGBPosition( 2, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_plotInvisibleText = new wxCheckBox( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("Force plotting of invisible values/references"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_plotInvisibleText = new wxCheckBox( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("Force plotting of invisible values / refs"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_plotInvisibleText->SetToolTip( _("Force plot invisible values and/or references") );
|
||||
|
||||
bSizerPlotItems->Add( m_plotInvisibleText, 0, wxALL, 2 );
|
||||
|
||||
m_plotNoViaOnMaskOpt = new wxCheckBox( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("Do not tent vias"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_plotNoViaOnMaskOpt->SetToolTip( _("Remove soldermask on vias") );
|
||||
|
||||
bSizerPlotItems->Add( m_plotNoViaOnMaskOpt, 0, wxALL, 2 );
|
||||
gbSizer1->Add( m_plotInvisibleText, wxGBPosition( 3, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_excludeEdgeLayerOpt = new wxCheckBox( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("Exclude PCB edge layer from other layers"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_excludeEdgeLayerOpt->SetToolTip( _("Do not plot the contents of the PCB edge layer on any other layers.") );
|
||||
|
||||
bSizerPlotItems->Add( m_excludeEdgeLayerOpt, 0, wxALL, 2 );
|
||||
gbSizer1->Add( m_excludeEdgeLayerOpt, wxGBPosition( 4, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_excludePadsFromSilkscreen = new wxCheckBox( sbOptionsSizer->GetStaticBox(), ID_ALLOW_PRINT_PAD_ON_SILKSCREEN, _("Exclude pads from silkscreen"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_excludePadsFromSilkscreen->SetToolTip( _("Do not plot pads on silkscreen layers, even when they are assigned to them.\nUncheck this if you wish to create assembly drawings from silkscreen layers.") );
|
||||
|
||||
bSizerPlotItems->Add( m_excludePadsFromSilkscreen, 0, wxALL, 2 );
|
||||
gbSizer1->Add( m_excludePadsFromSilkscreen, wxGBPosition( 5, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_plotMirrorOpt = new wxCheckBox( sbOptionsSizer->GetStaticBox(), ID_MIROR_OPT, _("Mirrored plot"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bSizerPlotItems->Add( m_plotMirrorOpt, 0, wxALL, 2 );
|
||||
m_plotNoViaOnMaskOpt = new wxCheckBox( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("Do not tent vias"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_plotNoViaOnMaskOpt->SetToolTip( _("Remove soldermask on vias") );
|
||||
|
||||
m_plotPSNegativeOpt = new wxCheckBox( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("Negative plot"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bSizerPlotItems->Add( m_plotPSNegativeOpt, 0, wxALL, 2 );
|
||||
gbSizer1->Add( m_plotNoViaOnMaskOpt, wxGBPosition( 6, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_useAuxOriginCheckBox = new wxCheckBox( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("Use auxiliary axis as origin"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_useAuxOriginCheckBox->SetToolTip( _("Use auxiliary axis as coordinates origin in plot files") );
|
||||
|
||||
bSizerPlotItems->Add( m_useAuxOriginCheckBox, 0, wxALL, 2 );
|
||||
gbSizer1->Add( m_useAuxOriginCheckBox, wxGBPosition( 7, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_zoneFillCheck = new wxCheckBox( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("Check zone fills before plotting"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bSizerPlotItems->Add( m_zoneFillCheck, 0, wxALL, 2 );
|
||||
|
||||
|
||||
bSizer192->Add( bSizerPlotItems, 0, wxEXPAND, 5 );
|
||||
|
||||
wxBoxSizer* bSizer14;
|
||||
bSizer14 = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
m_staticText11 = new wxStaticText( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("Drill marks:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText11->Wrap( -1 );
|
||||
bSizer14->Add( m_staticText11, 0, wxRIGHT|wxLEFT, 5 );
|
||||
drillMarksLabel = new wxStaticText( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("Drill marks:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
drillMarksLabel->Wrap( -1 );
|
||||
gbSizer1->Add( drillMarksLabel, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 30 );
|
||||
|
||||
wxString m_drillShapeOptChoices[] = { _("None"), _("Small"), _("Actual size") };
|
||||
int m_drillShapeOptNChoices = sizeof( m_drillShapeOptChoices ) / sizeof( wxString );
|
||||
m_drillShapeOpt = new wxChoice( sbOptionsSizer->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_drillShapeOptNChoices, m_drillShapeOptChoices, 0 );
|
||||
m_drillShapeOpt->SetSelection( 0 );
|
||||
bSizer14->Add( m_drillShapeOpt, 0, wxEXPAND|wxLEFT, 5 );
|
||||
gbSizer1->Add( m_drillShapeOpt, wxGBPosition( 0, 2 ), wxGBSpan( 1, 1 ), wxEXPAND|wxLEFT, 5 );
|
||||
|
||||
m_staticText12 = new wxStaticText( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("Scaling:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText12->Wrap( -1 );
|
||||
bSizer14->Add( m_staticText12, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
scalingLabel = new wxStaticText( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("Scaling:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
scalingLabel->Wrap( -1 );
|
||||
gbSizer1->Add( scalingLabel, wxGBPosition( 1, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 30 );
|
||||
|
||||
wxString m_scaleOptChoices[] = { _("Auto"), _("1:1"), _("3:2"), _("2:1"), _("3:1") };
|
||||
int m_scaleOptNChoices = sizeof( m_scaleOptChoices ) / sizeof( wxString );
|
||||
m_scaleOpt = new wxChoice( sbOptionsSizer->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_scaleOptNChoices, m_scaleOptChoices, 0 );
|
||||
m_scaleOpt->SetSelection( 1 );
|
||||
bSizer14->Add( m_scaleOpt, 0, wxEXPAND|wxLEFT, 5 );
|
||||
gbSizer1->Add( m_scaleOpt, wxGBPosition( 1, 2 ), wxGBSpan( 1, 1 ), wxEXPAND|wxLEFT, 5 );
|
||||
|
||||
m_staticText13 = new wxStaticText( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("Plot mode:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText13->Wrap( -1 );
|
||||
bSizer14->Add( m_staticText13, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
plotModeLabel = new wxStaticText( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("Plot mode:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
plotModeLabel->Wrap( -1 );
|
||||
gbSizer1->Add( plotModeLabel, wxGBPosition( 2, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 30 );
|
||||
|
||||
wxString m_plotModeOptChoices[] = { _("Filled"), _("Sketch") };
|
||||
int m_plotModeOptNChoices = sizeof( m_plotModeOptChoices ) / sizeof( wxString );
|
||||
m_plotModeOpt = new wxChoice( sbOptionsSizer->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_plotModeOptNChoices, m_plotModeOptChoices, 0 );
|
||||
m_plotModeOpt->SetSelection( 0 );
|
||||
bSizer14->Add( m_plotModeOpt, 0, wxEXPAND|wxLEFT, 5 );
|
||||
gbSizer1->Add( m_plotModeOpt, wxGBPosition( 2, 2 ), wxGBSpan( 1, 1 ), wxEXPAND|wxLEFT, 5 );
|
||||
|
||||
m_textDefaultPenSize = new wxStaticText( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("Line width:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_textDefaultPenSize->Wrap( -1 );
|
||||
m_textDefaultPenSize->SetToolTip( _("Pen size used to draw items that have no pen size specified.\nUsed mainly to draw items in sketch mode.") );
|
||||
m_lineWidthLabel = new wxStaticText( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("Default line width:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_lineWidthLabel->Wrap( -1 );
|
||||
m_lineWidthLabel->SetToolTip( _("Pen size used to draw items that have no pen size specified.\nUsed mainly to draw items in sketch mode.") );
|
||||
|
||||
bSizer14->Add( m_textDefaultPenSize, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
gbSizer1->Add( m_lineWidthLabel, wxGBPosition( 3, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 30 );
|
||||
|
||||
m_linesWidth = new wxTextCtrl( sbOptionsSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_linesWidth->SetToolTip( _("Line width for, e.g., sheet references.") );
|
||||
m_lineWidthCtrl = new wxTextCtrl( sbOptionsSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_lineWidthCtrl->SetToolTip( _("Line width for, e.g., sheet references.") );
|
||||
m_lineWidthCtrl->SetMinSize( wxSize( 120,-1 ) );
|
||||
|
||||
bSizer14->Add( m_linesWidth, 0, wxBOTTOM|wxEXPAND|wxLEFT, 5 );
|
||||
gbSizer1->Add( m_lineWidthCtrl, wxGBPosition( 3, 2 ), wxGBSpan( 1, 1 ), wxLEFT, 5 );
|
||||
|
||||
m_lineWidthUnits = new wxStaticText( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_lineWidthUnits->Wrap( -1 );
|
||||
gbSizer1->Add( m_lineWidthUnits, wxGBPosition( 3, 3 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
|
||||
|
||||
m_plotMirrorOpt = new wxCheckBox( sbOptionsSizer->GetStaticBox(), ID_MIROR_OPT, _("Mirrored plot"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
gbSizer1->Add( m_plotMirrorOpt, wxGBPosition( 4, 1 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 30 );
|
||||
|
||||
m_plotPSNegativeOpt = new wxCheckBox( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("Negative plot"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
gbSizer1->Add( m_plotPSNegativeOpt, wxGBPosition( 5, 1 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 30 );
|
||||
|
||||
m_zoneFillCheck = new wxCheckBox( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("Check zone fills before plotting"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
gbSizer1->Add( m_zoneFillCheck, wxGBPosition( 7, 1 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 30 );
|
||||
|
||||
|
||||
bSizer192->Add( bSizer14, 1, wxRIGHT|wxLEFT, 3 );
|
||||
gbSizer1->AddGrowableCol( 0 );
|
||||
gbSizer1->AddGrowableCol( 2 );
|
||||
|
||||
sbOptionsSizer->Add( gbSizer1, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
sbOptionsSizer->Add( bSizer192, 0, wxEXPAND, 5 );
|
||||
|
||||
|
||||
m_PlotOptionsSizer->Add( sbOptionsSizer, 0, wxALL|wxEXPAND, 3 );
|
||||
|
||||
wxStaticBoxSizer* sbSizerSoldMaskLayerOpt;
|
||||
sbSizerSoldMaskLayerOpt = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Solder Mask Settings") ), wxVERTICAL );
|
||||
|
||||
wxFlexGridSizer* fgSizerSoldMaskOpts;
|
||||
fgSizerSoldMaskOpts = new wxFlexGridSizer( 2, 2, 0, 0 );
|
||||
fgSizerSoldMaskOpts->SetFlexibleDirection( wxBOTH );
|
||||
fgSizerSoldMaskOpts->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
||||
|
||||
m_SolderMaskMarginLabel = new wxStaticText( sbSizerSoldMaskLayerOpt->GetStaticBox(), wxID_ANY, _("Clearance:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_SolderMaskMarginLabel->Wrap( -1 );
|
||||
m_SolderMaskMarginLabel->SetToolTip( _("Margin between pads and solder mask") );
|
||||
|
||||
fgSizerSoldMaskOpts->Add( m_SolderMaskMarginLabel, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
|
||||
|
||||
m_SolderMaskMarginCurrValue = new wxStaticText( sbSizerSoldMaskLayerOpt->GetStaticBox(), wxID_ANY, _("val"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_SolderMaskMarginCurrValue->Wrap( -1 );
|
||||
fgSizerSoldMaskOpts->Add( m_SolderMaskMarginCurrValue, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
|
||||
|
||||
m_solderMaskMinWidthLabel = new wxStaticText( sbSizerSoldMaskLayerOpt->GetStaticBox(), wxID_ANY, _("Minimum width:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_solderMaskMinWidthLabel->Wrap( -1 );
|
||||
m_solderMaskMinWidthLabel->SetToolTip( _("Minimum distance between 2 pad areas.\nTwo pad areas nearer than this value will be merged during plotting") );
|
||||
|
||||
fgSizerSoldMaskOpts->Add( m_solderMaskMinWidthLabel, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_SolderMaskMinWidthCurrValue = new wxStaticText( sbSizerSoldMaskLayerOpt->GetStaticBox(), wxID_ANY, _("val"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_SolderMaskMinWidthCurrValue->Wrap( -1 );
|
||||
fgSizerSoldMaskOpts->Add( m_SolderMaskMinWidthCurrValue, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
sbSizerSoldMaskLayerOpt->Add( fgSizerSoldMaskOpts, 1, wxEXPAND, 5 );
|
||||
|
||||
|
||||
m_PlotOptionsSizer->Add( sbSizerSoldMaskLayerOpt, 1, wxEXPAND|wxALL, 3 );
|
||||
m_PlotOptionsSizer->Add( sbOptionsSizer, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
m_GerberOptionsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Gerber Options") ), wxHORIZONTAL );
|
||||
|
||||
wxBoxSizer* bSizerGbrOpt;
|
||||
bSizerGbrOpt = new wxBoxSizer( wxVERTICAL );
|
||||
wxGridBagSizer* gbSizer2;
|
||||
gbSizer2 = new wxGridBagSizer( 3, 0 );
|
||||
gbSizer2->SetFlexibleDirection( wxHORIZONTAL );
|
||||
gbSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
||||
|
||||
m_useGerberExtensions = new wxCheckBox( m_GerberOptionsSizer->GetStaticBox(), wxID_ANY, _("Use Protel filename extensions"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_useGerberExtensions->SetToolTip( _("Use Protel Gerber extensions (.GBL, .GTL, etc...)\nNo longer recommended. The official extension is .gbr") );
|
||||
m_useGerberExtensions->SetMinSize( wxSize( 280,-1 ) );
|
||||
|
||||
bSizerGbrOpt->Add( m_useGerberExtensions, 0, wxALL, 2 );
|
||||
|
||||
m_useGerberX2Attributes = new wxCheckBox( m_GerberOptionsSizer->GetStaticBox(), wxID_ANY, _("Include extended (X2) attributes"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_useGerberX2Attributes->SetToolTip( _("Include extended attributes (X2 Gerber files format) in the Gerber file.\nMainly File Format attributes.") );
|
||||
|
||||
bSizerGbrOpt->Add( m_useGerberX2Attributes, 0, wxALL, 2 );
|
||||
|
||||
m_useGerberNetAttributes = new wxCheckBox( m_GerberOptionsSizer->GetStaticBox(), wxID_ANY, _("Include advanced X2 features"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_useGerberNetAttributes->SetToolTip( _("Only available in X2 Gerber files format.\nInclude netlist metadata and aperture attributes.") );
|
||||
|
||||
bSizerGbrOpt->Add( m_useGerberNetAttributes, 0, wxALL, 2 );
|
||||
gbSizer2->Add( m_useGerberExtensions, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_generateGerberJobFile = new wxCheckBox( m_GerberOptionsSizer->GetStaticBox(), wxID_ANY, _("Generate Gerber job file"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_generateGerberJobFile->SetToolTip( _("Generate a Gerber job file that contains info about the board,\nand the list of generated Gerber plot files") );
|
||||
|
||||
bSizerGbrOpt->Add( m_generateGerberJobFile, 0, wxALL, 2 );
|
||||
gbSizer2->Add( m_generateGerberJobFile, wxGBPosition( 1, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_subtractMaskFromSilk = new wxCheckBox( m_GerberOptionsSizer->GetStaticBox(), wxID_ANY, _("Subtract soldermask from silkscreen"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_subtractMaskFromSilk->SetToolTip( _("Remove silkscreen from areas without soldermask") );
|
||||
|
||||
bSizerGbrOpt->Add( m_subtractMaskFromSilk, 0, wxALL, 2 );
|
||||
gbSizer2->Add( m_subtractMaskFromSilk, wxGBPosition( 2, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
coordFormatLabel = new wxStaticText( m_GerberOptionsSizer->GetStaticBox(), wxID_ANY, _("Coordinate format:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
coordFormatLabel->Wrap( -1 );
|
||||
gbSizer2->Add( coordFormatLabel, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 30 );
|
||||
|
||||
wxString m_coordFormatCtrlChoices[] = { _("4.5, unit mm"), _("4.6, unit mm") };
|
||||
int m_coordFormatCtrlNChoices = sizeof( m_coordFormatCtrlChoices ) / sizeof( wxString );
|
||||
m_coordFormatCtrl = new wxChoice( m_GerberOptionsSizer->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_coordFormatCtrlNChoices, m_coordFormatCtrlChoices, 0 );
|
||||
m_coordFormatCtrl->SetSelection( 0 );
|
||||
gbSizer2->Add( m_coordFormatCtrl, wxGBPosition( 0, 2 ), wxGBSpan( 1, 1 ), wxEXPAND|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_useGerberX2Attributes = new wxCheckBox( m_GerberOptionsSizer->GetStaticBox(), wxID_ANY, _("Include extended (X2) attributes"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_useGerberX2Attributes->SetToolTip( _("Include extended attributes (X2 Gerber files format) in the Gerber file.\nMainly File Format attributes.") );
|
||||
|
||||
gbSizer2->Add( m_useGerberX2Attributes, wxGBPosition( 1, 1 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 30 );
|
||||
|
||||
m_useGerberNetAttributes = new wxCheckBox( m_GerberOptionsSizer->GetStaticBox(), wxID_ANY, _("Include advanced X2 features"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_useGerberNetAttributes->SetToolTip( _("Only available in X2 Gerber files format.\nInclude netlist metadata and aperture attributes.") );
|
||||
|
||||
gbSizer2->Add( m_useGerberNetAttributes, wxGBPosition( 2, 1 ), wxGBSpan( 1, 2 ), wxLEFT|wxALIGN_CENTER_VERTICAL, 30 );
|
||||
|
||||
|
||||
m_GerberOptionsSizer->Add( bSizerGbrOpt, 1, wxALIGN_CENTER_VERTICAL, 5 );
|
||||
gbSizer2->AddGrowableCol( 2 );
|
||||
|
||||
wxString m_rbGerberFormatChoices[] = { _("4.5, unit mm"), _("4.6, unit mm") };
|
||||
int m_rbGerberFormatNChoices = sizeof( m_rbGerberFormatChoices ) / sizeof( wxString );
|
||||
m_rbGerberFormat = new wxRadioBox( m_GerberOptionsSizer->GetStaticBox(), wxID_ANY, _("Coordinate Format"), wxDefaultPosition, wxDefaultSize, m_rbGerberFormatNChoices, m_rbGerberFormatChoices, 1, wxRA_SPECIFY_COLS );
|
||||
m_rbGerberFormat->SetSelection( 0 );
|
||||
m_rbGerberFormat->SetToolTip( _("Resolution of coordinates in Gerber files.\nUse the higher value if possible.") );
|
||||
|
||||
m_GerberOptionsSizer->Add( m_rbGerberFormat, 0, wxALIGN_LEFT|wxALIGN_TOP|wxALL, 5 );
|
||||
m_GerberOptionsSizer->Add( gbSizer2, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
m_PlotOptionsSizer->Add( m_GerberOptionsSizer, 0, wxALL|wxEXPAND, 3 );
|
||||
m_PlotOptionsSizer->Add( m_GerberOptionsSizer, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
m_HPGLOptionsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("HPGL Options") ), wxVERTICAL );
|
||||
m_HPGLOptionsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("HPGL Options") ), wxHORIZONTAL );
|
||||
|
||||
wxBoxSizer* bSizerHPGL_options;
|
||||
bSizerHPGL_options = new wxBoxSizer( wxVERTICAL );
|
||||
m_hpglPenLabel = new wxStaticText( m_HPGLOptionsSizer->GetStaticBox(), wxID_ANY, _("Default pen size:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_hpglPenLabel->Wrap( -1 );
|
||||
m_HPGLOptionsSizer->Add( m_hpglPenLabel, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_textPenSize = new wxStaticText( m_HPGLOptionsSizer->GetStaticBox(), wxID_ANY, _("Pen size:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_textPenSize->Wrap( -1 );
|
||||
bSizerHPGL_options->Add( m_textPenSize, 0, wxRIGHT|wxLEFT, 5 );
|
||||
m_hpglPenCtrl = new wxTextCtrl( m_HPGLOptionsSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_HPGLOptionsSizer->Add( m_hpglPenCtrl, 5, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_HPGLPenSizeOpt = new wxTextCtrl( m_HPGLOptionsSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bSizerHPGL_options->Add( m_HPGLPenSizeOpt, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
|
||||
m_hpglPenUnits = new wxStaticText( m_HPGLOptionsSizer->GetStaticBox(), wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_hpglPenUnits->Wrap( -1 );
|
||||
m_HPGLOptionsSizer->Add( m_hpglPenUnits, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 );
|
||||
|
||||
|
||||
m_HPGLOptionsSizer->Add( bSizerHPGL_options, 1, wxEXPAND, 5 );
|
||||
m_HPGLOptionsSizer->Add( 0, 0, 11, wxEXPAND, 5 );
|
||||
|
||||
|
||||
m_PlotOptionsSizer->Add( m_HPGLOptionsSizer, 0, wxALL|wxEXPAND, 3 );
|
||||
m_PlotOptionsSizer->Add( m_HPGLOptionsSizer, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
m_PSOptionsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Postscript Options") ), wxVERTICAL );
|
||||
|
||||
wxBoxSizer* bSizer17;
|
||||
bSizer17 = new wxBoxSizer( wxHORIZONTAL );
|
||||
wxFlexGridSizer* fgSizer2;
|
||||
fgSizer2 = new wxFlexGridSizer( 0, 6, 3, 0 );
|
||||
fgSizer2->AddGrowableCol( 1 );
|
||||
fgSizer2->AddGrowableCol( 4 );
|
||||
fgSizer2->SetFlexibleDirection( wxBOTH );
|
||||
fgSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
||||
|
||||
wxBoxSizer* bSizer18;
|
||||
bSizer18 = new wxBoxSizer( wxVERTICAL );
|
||||
fgSizer2->SetMinSize( wxSize( 60,-1 ) );
|
||||
m_fineAdjustXLabel = new wxStaticText( m_PSOptionsSizer->GetStaticBox(), wxID_ANY, _("X scale factor:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_fineAdjustXLabel->Wrap( -1 );
|
||||
fgSizer2->Add( m_fineAdjustXLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
|
||||
|
||||
m_staticText7 = new wxStaticText( m_PSOptionsSizer->GetStaticBox(), wxID_ANY, _("X scale:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText7->Wrap( -1 );
|
||||
bSizer18->Add( m_staticText7, 0, wxRIGHT|wxLEFT, 5 );
|
||||
m_fineAdjustXCtrl = new wxTextCtrl( m_PSOptionsSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_fineAdjustXCtrl->SetToolTip( _("Set global X scale adjust for exact scale postscript output.") );
|
||||
|
||||
m_fineAdjustXscaleOpt = new wxTextCtrl( m_PSOptionsSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_fineAdjustXscaleOpt->SetToolTip( _("Set global X scale adjust for exact scale postscript output.") );
|
||||
|
||||
bSizer18->Add( m_fineAdjustXscaleOpt, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
fgSizer2->Add( m_fineAdjustXCtrl, 0, wxEXPAND|wxRIGHT, 5 );
|
||||
|
||||
|
||||
bSizer17->Add( bSizer18, 1, wxEXPAND, 5 );
|
||||
fgSizer2->Add( 0, 0, 1, wxEXPAND, 5 );
|
||||
|
||||
wxBoxSizer* bSizer19;
|
||||
bSizer19 = new wxBoxSizer( wxVERTICAL );
|
||||
m_fineAdjustYLabel = new wxStaticText( m_PSOptionsSizer->GetStaticBox(), wxID_ANY, _("Y scale factor:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_fineAdjustYLabel->Wrap( -1 );
|
||||
fgSizer2->Add( m_fineAdjustYLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 30 );
|
||||
|
||||
m_staticText8 = new wxStaticText( m_PSOptionsSizer->GetStaticBox(), wxID_ANY, _("Y scale:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText8->Wrap( -1 );
|
||||
bSizer19->Add( m_staticText8, 0, wxRIGHT|wxLEFT, 5 );
|
||||
m_fineAdjustYCtrl = new wxTextCtrl( m_PSOptionsSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_fineAdjustYCtrl->SetToolTip( _("Set global Y scale adjust for exact scale postscript output.") );
|
||||
|
||||
m_fineAdjustYscaleOpt = new wxTextCtrl( m_PSOptionsSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_fineAdjustYscaleOpt->SetToolTip( _("Set global Y scale adjust for exact scale postscript output.") );
|
||||
|
||||
bSizer19->Add( m_fineAdjustYscaleOpt, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
fgSizer2->Add( m_fineAdjustYCtrl, 0, wxEXPAND|wxRIGHT|wxLEFT, 30 );
|
||||
|
||||
|
||||
bSizer17->Add( bSizer19, 1, wxEXPAND, 5 );
|
||||
fgSizer2->Add( 0, 0, 1, wxEXPAND|wxRIGHT|wxLEFT, 10 );
|
||||
|
||||
wxBoxSizer* bSizer191;
|
||||
bSizer191 = new wxBoxSizer( wxVERTICAL );
|
||||
m_widthAdjustLabel = new wxStaticText( m_PSOptionsSizer->GetStaticBox(), wxID_ANY, _("Track width correction:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_widthAdjustLabel->Wrap( -1 );
|
||||
fgSizer2->Add( m_widthAdjustLabel, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
|
||||
|
||||
m_textPSFineAdjustWidth = new wxStaticText( m_PSOptionsSizer->GetStaticBox(), wxID_ANY, _("Width correction:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_textPSFineAdjustWidth->Wrap( -1 );
|
||||
bSizer191->Add( m_textPSFineAdjustWidth, 0, wxRIGHT|wxLEFT, 5 );
|
||||
m_widthAdjustCtrl = new wxTextCtrl( m_PSOptionsSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_widthAdjustCtrl->SetToolTip( _("Set global width correction for exact width postscript output.\nThese width correction is intended to compensate tracks width and also pads and vias size errors.\nThe reasonable width correction value must be in a range of [-(MinTrackWidth-1), +(MinClearanceValue-1)] in decimils.") );
|
||||
|
||||
m_PSFineAdjustWidthOpt = new wxTextCtrl( m_PSOptionsSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_PSFineAdjustWidthOpt->SetToolTip( _("Set global width correction for exact width postscript output.\nThese width correction is intended to compensate tracks width and also pads and vias size errors.\nThe reasonable width correction value must be in a range of [-(MinTrackWidth-1), +(MinClearanceValue-1)] in decimils.") );
|
||||
fgSizer2->Add( m_widthAdjustCtrl, 0, wxEXPAND|wxBOTTOM|wxRIGHT, 5 );
|
||||
|
||||
bSizer191->Add( m_PSFineAdjustWidthOpt, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
|
||||
m_widthAdjustUnits = new wxStaticText( m_PSOptionsSizer->GetStaticBox(), wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_widthAdjustUnits->Wrap( -1 );
|
||||
fgSizer2->Add( m_widthAdjustUnits, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 );
|
||||
|
||||
|
||||
bSizer17->Add( bSizer191, 1, wxEXPAND, 5 );
|
||||
|
||||
|
||||
m_PSOptionsSizer->Add( bSizer17, 1, wxEXPAND, 5 );
|
||||
m_PSOptionsSizer->Add( fgSizer2, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_forcePSA4OutputOpt = new wxCheckBox( m_PSOptionsSizer->GetStaticBox(), wxID_ANY, _("Force A4 output"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_PSOptionsSizer->Add( m_forcePSA4OutputOpt, 0, wxALL, 2 );
|
||||
m_PSOptionsSizer->Add( m_forcePSA4OutputOpt, 0, wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
m_PlotOptionsSizer->Add( m_PSOptionsSizer, 0, wxALL|wxEXPAND, 3 );
|
||||
m_PlotOptionsSizer->Add( m_PSOptionsSizer, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
m_SizerDXF_options = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("DXF Options") ), wxVERTICAL );
|
||||
|
||||
|
@ -352,15 +308,15 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr
|
|||
m_DXF_plotModeOpt->SetValue(true);
|
||||
m_DXF_plotModeOpt->SetToolTip( _("DXF only:\nCheck to plot all layers in polygon mode.\nUncheck to plot in sketch mode layers that don't support polygons (*.SilkS, *_User, Edge.Cuts, Margin, *.CrtYd, *.Fab)\nand plot in polygon mode other layers (*.Cu, *.Adhes, *.Paste, *.Mask)") );
|
||||
|
||||
m_SizerDXF_options->Add( m_DXF_plotModeOpt, 0, wxBOTTOM|wxRIGHT|wxLEFT, 2 );
|
||||
m_SizerDXF_options->Add( m_DXF_plotModeOpt, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_DXF_plotTextStrokeFontOpt = new wxCheckBox( m_SizerDXF_options->GetStaticBox(), wxID_ANY, _("Use Pcbnew font to plot texts"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_DXF_plotTextStrokeFontOpt->SetToolTip( _("Check to use Pcbnew stroke font\nUncheck to plot oneline ASCII texts as editable text (using DXF font)") );
|
||||
|
||||
m_SizerDXF_options->Add( m_DXF_plotTextStrokeFontOpt, 0, wxALL, 2 );
|
||||
m_SizerDXF_options->Add( m_DXF_plotTextStrokeFontOpt, 0, wxALL, 5 );
|
||||
|
||||
|
||||
m_PlotOptionsSizer->Add( m_SizerDXF_options, 0, wxEXPAND|wxALL, 3 );
|
||||
m_PlotOptionsSizer->Add( m_SizerDXF_options, 0, wxEXPAND|wxALL, 5 );
|
||||
|
||||
|
||||
bmiddleSizer->Add( m_PlotOptionsSizer, 0, 0, 5 );
|
||||
|
@ -429,7 +385,6 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr
|
|||
this->Centre( wxBOTH );
|
||||
|
||||
// Connect Events
|
||||
this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_PLOT_BASE::OnClose ) );
|
||||
this->Connect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_PLOT_BASE::OnInitDialog ) );
|
||||
this->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( DIALOG_PLOT_BASE::OnRightClick ) );
|
||||
m_plotFormatOpt->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_PLOT_BASE::SetPlotFormat ), NULL, this );
|
||||
|
@ -440,7 +395,6 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr
|
|||
m_DXF_plotModeOpt->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::OnChangeDXFPlotMode ), NULL, this );
|
||||
m_buttonDRC->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::onRunDRC ), NULL, this );
|
||||
m_sdbSizer1Apply->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::CreateDrillFile ), NULL, this );
|
||||
m_sdbSizer1Cancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::OnQuit ), NULL, this );
|
||||
m_sdbSizer1OK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::Plot ), NULL, this );
|
||||
this->Connect( m_menuItem1->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( DIALOG_PLOT_BASE::OnPopUpLayers ) );
|
||||
this->Connect( m_menuItem2->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( DIALOG_PLOT_BASE::OnPopUpLayers ) );
|
||||
|
@ -452,7 +406,6 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr
|
|||
DIALOG_PLOT_BASE::~DIALOG_PLOT_BASE()
|
||||
{
|
||||
// Disconnect Events
|
||||
this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_PLOT_BASE::OnClose ) );
|
||||
this->Disconnect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_PLOT_BASE::OnInitDialog ) );
|
||||
this->Disconnect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( DIALOG_PLOT_BASE::OnRightClick ) );
|
||||
m_plotFormatOpt->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_PLOT_BASE::SetPlotFormat ), NULL, this );
|
||||
|
@ -463,7 +416,6 @@ DIALOG_PLOT_BASE::~DIALOG_PLOT_BASE()
|
|||
m_DXF_plotModeOpt->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::OnChangeDXFPlotMode ), NULL, this );
|
||||
m_buttonDRC->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::onRunDRC ), NULL, this );
|
||||
m_sdbSizer1Apply->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::CreateDrillFile ), NULL, this );
|
||||
m_sdbSizer1Cancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::OnQuit ), NULL, this );
|
||||
m_sdbSizer1OK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::Plot ), NULL, this );
|
||||
this->Disconnect( ID_LAYER_FAB, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( DIALOG_PLOT_BASE::OnPopUpLayers ) );
|
||||
this->Disconnect( ID_SELECT_COPPER_LAYERS, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( DIALOG_PLOT_BASE::OnPopUpLayers ) );
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -21,17 +21,17 @@ class WX_HTML_REPORT_PANEL;
|
|||
#include <wx/colour.h>
|
||||
#include <wx/settings.h>
|
||||
#include <wx/choice.h>
|
||||
#include <wx/sizer.h>
|
||||
#include <wx/textctrl.h>
|
||||
#include <wx/bitmap.h>
|
||||
#include <wx/image.h>
|
||||
#include <wx/icon.h>
|
||||
#include <wx/bmpbuttn.h>
|
||||
#include <wx/button.h>
|
||||
#include <wx/sizer.h>
|
||||
#include <wx/checklst.h>
|
||||
#include <wx/statbox.h>
|
||||
#include <wx/checkbox.h>
|
||||
#include <wx/radiobox.h>
|
||||
#include <wx/gbsizer.h>
|
||||
#include <wx/panel.h>
|
||||
#include <wx/menu.h>
|
||||
#include <wx/dialog.h>
|
||||
|
@ -71,42 +71,42 @@ class DIALOG_PLOT_BASE : public DIALOG_SHIM
|
|||
wxCheckBox* m_plotModuleValueOpt;
|
||||
wxCheckBox* m_plotModuleRefOpt;
|
||||
wxCheckBox* m_plotInvisibleText;
|
||||
wxCheckBox* m_plotNoViaOnMaskOpt;
|
||||
wxCheckBox* m_excludeEdgeLayerOpt;
|
||||
wxCheckBox* m_excludePadsFromSilkscreen;
|
||||
wxCheckBox* m_plotNoViaOnMaskOpt;
|
||||
wxCheckBox* m_useAuxOriginCheckBox;
|
||||
wxStaticText* drillMarksLabel;
|
||||
wxChoice* m_drillShapeOpt;
|
||||
wxStaticText* scalingLabel;
|
||||
wxChoice* m_scaleOpt;
|
||||
wxStaticText* plotModeLabel;
|
||||
wxChoice* m_plotModeOpt;
|
||||
wxStaticText* m_lineWidthLabel;
|
||||
wxTextCtrl* m_lineWidthCtrl;
|
||||
wxStaticText* m_lineWidthUnits;
|
||||
wxCheckBox* m_plotMirrorOpt;
|
||||
wxCheckBox* m_plotPSNegativeOpt;
|
||||
wxCheckBox* m_useAuxOriginCheckBox;
|
||||
wxCheckBox* m_zoneFillCheck;
|
||||
wxStaticText* m_staticText11;
|
||||
wxChoice* m_drillShapeOpt;
|
||||
wxStaticText* m_staticText12;
|
||||
wxChoice* m_scaleOpt;
|
||||
wxStaticText* m_staticText13;
|
||||
wxChoice* m_plotModeOpt;
|
||||
wxStaticText* m_textDefaultPenSize;
|
||||
wxTextCtrl* m_linesWidth;
|
||||
wxStaticText* m_SolderMaskMarginLabel;
|
||||
wxStaticText* m_SolderMaskMarginCurrValue;
|
||||
wxStaticText* m_solderMaskMinWidthLabel;
|
||||
wxStaticText* m_SolderMaskMinWidthCurrValue;
|
||||
wxStaticBoxSizer* m_GerberOptionsSizer;
|
||||
wxCheckBox* m_useGerberExtensions;
|
||||
wxCheckBox* m_useGerberX2Attributes;
|
||||
wxCheckBox* m_useGerberNetAttributes;
|
||||
wxCheckBox* m_generateGerberJobFile;
|
||||
wxCheckBox* m_subtractMaskFromSilk;
|
||||
wxRadioBox* m_rbGerberFormat;
|
||||
wxStaticText* coordFormatLabel;
|
||||
wxChoice* m_coordFormatCtrl;
|
||||
wxCheckBox* m_useGerberX2Attributes;
|
||||
wxCheckBox* m_useGerberNetAttributes;
|
||||
wxStaticBoxSizer* m_HPGLOptionsSizer;
|
||||
wxStaticText* m_textPenSize;
|
||||
wxTextCtrl* m_HPGLPenSizeOpt;
|
||||
wxStaticText* m_hpglPenLabel;
|
||||
wxTextCtrl* m_hpglPenCtrl;
|
||||
wxStaticText* m_hpglPenUnits;
|
||||
wxStaticBoxSizer* m_PSOptionsSizer;
|
||||
wxStaticText* m_staticText7;
|
||||
wxTextCtrl* m_fineAdjustXscaleOpt;
|
||||
wxStaticText* m_staticText8;
|
||||
wxTextCtrl* m_fineAdjustYscaleOpt;
|
||||
wxStaticText* m_textPSFineAdjustWidth;
|
||||
wxTextCtrl* m_PSFineAdjustWidthOpt;
|
||||
wxStaticText* m_fineAdjustXLabel;
|
||||
wxTextCtrl* m_fineAdjustXCtrl;
|
||||
wxStaticText* m_fineAdjustYLabel;
|
||||
wxTextCtrl* m_fineAdjustYCtrl;
|
||||
wxStaticText* m_widthAdjustLabel;
|
||||
wxTextCtrl* m_widthAdjustCtrl;
|
||||
wxStaticText* m_widthAdjustUnits;
|
||||
wxCheckBox* m_forcePSA4OutputOpt;
|
||||
wxStaticBoxSizer* m_SizerDXF_options;
|
||||
wxCheckBox* m_DXF_plotModeOpt;
|
||||
|
@ -121,7 +121,6 @@ class DIALOG_PLOT_BASE : public DIALOG_SHIM
|
|||
wxMenu* m_popMenu;
|
||||
|
||||
// Virtual event handlers, overide them in your derived class
|
||||
virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
|
||||
virtual void OnInitDialog( wxInitDialogEvent& event ) { event.Skip(); }
|
||||
virtual void OnRightClick( wxMouseEvent& event ) { event.Skip(); }
|
||||
virtual void SetPlotFormat( wxCommandEvent& event ) { event.Skip(); }
|
||||
|
@ -131,7 +130,6 @@ class DIALOG_PLOT_BASE : public DIALOG_SHIM
|
|||
virtual void OnChangeDXFPlotMode( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void onRunDRC( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void CreateDrillFile( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnQuit( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void Plot( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnPopUpLayers( wxCommandEvent& event ) { event.Skip(); }
|
||||
|
||||
|
|
|
@ -31,16 +31,14 @@
|
|||
#include <confirm.h>
|
||||
#include <pcb_edit_frame.h>
|
||||
#include <base_units.h>
|
||||
|
||||
#include <printout_controler.h>
|
||||
#include <pcbnew.h>
|
||||
#include <pcbplot.h>
|
||||
|
||||
#include <class_board.h>
|
||||
#include <enabler.h>
|
||||
#include <widgets/unit_binder.h>
|
||||
|
||||
#include <dialog_print_using_printer_base.h>
|
||||
#include <enabler.h>
|
||||
|
||||
|
||||
#define PEN_WIDTH_MAX_VALUE ( KiROUND( 5 * IU_PER_MM ) )
|
||||
#define PEN_WIDTH_MIN_VALUE ( KiROUND( 0.005 * IU_PER_MM ) )
|
||||
|
@ -49,8 +47,7 @@
|
|||
extern int g_DrawDefaultLineThickness;
|
||||
|
||||
// Local variables
|
||||
static double s_ScaleList[] =
|
||||
{ 0, 0.5, 0.7, 0.999, 1.0, 1.4, 2.0, 3.0, 4.0 };
|
||||
static double s_ScaleList[] = { 0, 0.5, 0.7, 0.999, 1.0, 1.4, 2.0, 3.0, 4.0 };
|
||||
|
||||
// Define min et max reasonable values for print scale
|
||||
#define MIN_SCALE 0.01
|
||||
|
@ -71,42 +68,27 @@ class DIALOG_PRINT_USING_PRINTER : public DIALOG_PRINT_USING_PRINTER_BASE
|
|||
{
|
||||
public:
|
||||
DIALOG_PRINT_USING_PRINTER( PCB_EDIT_FRAME* parent );
|
||||
|
||||
bool IsMirrored() { return m_Print_Mirror->IsChecked(); }
|
||||
bool ExcludeEdges() { return m_Exclude_Edges_Pcb->IsChecked(); }
|
||||
bool PrintUsingSinglePage() { return m_PagesOption->GetSelection(); }
|
||||
int SetLayerSetFromListSelection();
|
||||
|
||||
~DIALOG_PRINT_USING_PRINTER() override;
|
||||
|
||||
private:
|
||||
|
||||
PCB_EDIT_FRAME* m_parent;
|
||||
wxConfigBase* m_config;
|
||||
// the list of existing board layers in wxCheckListBox, with the
|
||||
// board layers id:
|
||||
std::pair<wxCheckListBox*, int> m_boxSelectLayer[PCB_LAYER_ID_COUNT];
|
||||
// the list of existing board layers in wxCheckListBox, with the board layers id:
|
||||
std::pair<wxCheckListBox*, int> m_layers[PCB_LAYER_ID_COUNT];
|
||||
static bool m_ExcludeEdgeLayer;
|
||||
|
||||
void OnCloseWindow( wxCloseEvent& event ) override;
|
||||
UNIT_BINDER m_defaultPenWidth;
|
||||
|
||||
bool TransferDataToWindow() override;
|
||||
|
||||
void OnPageSetup( wxCommandEvent& event ) override;
|
||||
void OnPrintPreview( wxCommandEvent& event ) override;
|
||||
void OnPrintButtonClick( wxCommandEvent& event ) override;
|
||||
void OnScaleSelectionClick( wxCommandEvent& event ) override;
|
||||
|
||||
void OnButtonCancelClick( wxCommandEvent& event ) override { Close(); }
|
||||
|
||||
void OnInitDlg( wxInitDialogEvent& event ) override
|
||||
{
|
||||
// Call the default wxDialog handler of a wxInitDialogEvent
|
||||
TransferDataToWindow();
|
||||
|
||||
// Now all widgets have the size fixed, call FinishDialogSettings
|
||||
FinishDialogSettings();
|
||||
}
|
||||
|
||||
void SetPrintParameters();
|
||||
void SetPenWidth();
|
||||
void initValues();
|
||||
int SetLayerSetFromListSelection();
|
||||
};
|
||||
|
||||
|
||||
|
@ -122,9 +104,8 @@ void PCB_EDIT_FRAME::ToPrinter( wxCommandEvent& event )
|
|||
s_PrintData = new wxPrintData();
|
||||
|
||||
if( !s_PrintData->Ok() )
|
||||
{
|
||||
DisplayError( this, _( "Error Init Printer info" ) );
|
||||
}
|
||||
|
||||
s_PrintData->SetQuality( wxPRINT_QUALITY_HIGH ); // Default resolution = HIGH;
|
||||
}
|
||||
|
||||
|
@ -153,21 +134,60 @@ void PCB_EDIT_FRAME::ToPrinter( wxCommandEvent& event )
|
|||
|
||||
|
||||
DIALOG_PRINT_USING_PRINTER::DIALOG_PRINT_USING_PRINTER( PCB_EDIT_FRAME* parent ) :
|
||||
DIALOG_PRINT_USING_PRINTER_BASE( parent )
|
||||
DIALOG_PRINT_USING_PRINTER_BASE( parent ),
|
||||
m_parent( parent ),
|
||||
m_defaultPenWidth( parent, m_penWidthLabel, m_penWidthCtrl, m_penWidthUnits, true,
|
||||
PEN_WIDTH_MIN_VALUE, PEN_WIDTH_MAX_VALUE )
|
||||
{
|
||||
m_parent = parent;
|
||||
m_config = Kiface().KifaceSettings();
|
||||
memset( m_boxSelectLayer, 0, sizeof( m_boxSelectLayer ) );
|
||||
memset( m_layers, 0, sizeof( m_layers ) );
|
||||
|
||||
// We use a sdbSizer to get platform-dependent ordering of the action buttons, but
|
||||
// that requires us to correct the button labels here.
|
||||
m_sdbSizer1OK->SetLabel( _( "Print" ) );
|
||||
m_sdbSizer1Apply->SetLabel( _( "Print Preview" ) );
|
||||
m_sdbSizer1Cancel->SetLabel( _( "Close" ) );
|
||||
m_sdbSizer1->Layout();
|
||||
|
||||
m_sdbSizer1OK->SetDefault();
|
||||
|
||||
initValues( );
|
||||
#ifdef __WXMAC__
|
||||
/* Problems with modal on wx-2.9 - Anyway preview is standard for OSX */
|
||||
m_buttonPreview->Hide();
|
||||
m_sdbSizer1Apply->Hide();
|
||||
#endif
|
||||
|
||||
FinishDialogSettings();
|
||||
}
|
||||
|
||||
|
||||
void DIALOG_PRINT_USING_PRINTER::initValues( )
|
||||
DIALOG_PRINT_USING_PRINTER::~DIALOG_PRINT_USING_PRINTER()
|
||||
{
|
||||
SetPrintParameters();
|
||||
|
||||
if( m_config )
|
||||
{
|
||||
ConfigBaseWriteDouble( m_config, OPTKEY_PRINT_X_FINESCALE_ADJ, s_Parameters.m_XScaleAdjust );
|
||||
ConfigBaseWriteDouble( m_config, OPTKEY_PRINT_Y_FINESCALE_ADJ, s_Parameters.m_YScaleAdjust );
|
||||
m_config->Write( OPTKEY_PRINT_SCALE, m_ScaleOption->GetSelection() );
|
||||
m_config->Write( OPTKEY_PRINT_PAGE_FRAME, s_Parameters.m_Print_Sheet_Ref);
|
||||
m_config->Write( OPTKEY_PRINT_MONOCHROME_MODE, s_Parameters.m_Print_Black_and_White);
|
||||
m_config->Write( OPTKEY_PRINT_PAGE_PER_LAYER, s_Parameters.m_OptionPrintPage );
|
||||
m_config->Write( OPTKEY_PRINT_PADS_DRILL, (long) s_Parameters.m_DrillShapeOpt );
|
||||
|
||||
for( unsigned layer = 0; layer < DIM(m_layers); ++layer )
|
||||
{
|
||||
if( m_layers[layer].first )
|
||||
{
|
||||
wxString key = wxString::Format( OPTKEY_LAYERBASE, layer );
|
||||
bool value = m_layers[layer].first->IsChecked( m_layers[layer].second );
|
||||
m_config->Write( key, value );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool DIALOG_PRINT_USING_PRINTER::TransferDataToWindow()
|
||||
{
|
||||
wxString msg;
|
||||
BOARD* board = m_parent->GetBoard();
|
||||
|
@ -175,9 +195,7 @@ void DIALOG_PRINT_USING_PRINTER::initValues( )
|
|||
s_Parameters.m_PageSetupData = s_pageSetupData;
|
||||
|
||||
// Create layer list.
|
||||
LSEQ seq = board->GetEnabledLayers().UIOrder();
|
||||
|
||||
for( ; seq; ++seq )
|
||||
for( LSEQ seq = board->GetEnabledLayers().UIOrder(); seq; ++seq )
|
||||
{
|
||||
PCB_LAYER_ID layer = *seq;
|
||||
int checkIndex;
|
||||
|
@ -185,12 +203,12 @@ void DIALOG_PRINT_USING_PRINTER::initValues( )
|
|||
if( IsCopperLayer( layer ) )
|
||||
{
|
||||
checkIndex = m_CopperLayersList->Append( board->GetLayerName( layer ) );
|
||||
m_boxSelectLayer[layer] = std::make_pair( m_CopperLayersList, checkIndex );
|
||||
m_layers[layer] = std::make_pair( m_CopperLayersList, checkIndex );
|
||||
}
|
||||
else
|
||||
{
|
||||
checkIndex = m_TechnicalLayersList->Append( board->GetLayerName( layer ) );
|
||||
m_boxSelectLayer[layer] = std::make_pair( m_TechnicalLayersList, checkIndex );
|
||||
m_layers[layer] = std::make_pair( m_TechnicalLayersList, checkIndex );
|
||||
}
|
||||
|
||||
if( m_config )
|
||||
|
@ -200,7 +218,7 @@ void DIALOG_PRINT_USING_PRINTER::initValues( )
|
|||
bool option;
|
||||
|
||||
if( m_config->Read( layerKey, &option ) )
|
||||
m_boxSelectLayer[layer].first->Check( checkIndex, option );
|
||||
m_layers[layer].first->Check( checkIndex, option );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -223,10 +241,8 @@ void DIALOG_PRINT_USING_PRINTER::initValues( )
|
|||
s_Parameters.m_DrillShapeOpt = (PRINT_PARAMETERS::DrillShapeOptT) tmp;
|
||||
|
||||
// Test for a reasonable scale value. Set to 1 if problem
|
||||
if( s_Parameters.m_XScaleAdjust < MIN_SCALE ||
|
||||
s_Parameters.m_YScaleAdjust < MIN_SCALE ||
|
||||
s_Parameters.m_XScaleAdjust > MAX_SCALE ||
|
||||
s_Parameters.m_YScaleAdjust > MAX_SCALE )
|
||||
if( s_Parameters.m_XScaleAdjust < MIN_SCALE || s_Parameters.m_XScaleAdjust > MAX_SCALE ||
|
||||
s_Parameters.m_YScaleAdjust < MIN_SCALE || s_Parameters.m_YScaleAdjust > MAX_SCALE )
|
||||
s_Parameters.m_XScaleAdjust = s_Parameters.m_YScaleAdjust = 1.0;
|
||||
}
|
||||
|
||||
|
@ -238,18 +254,13 @@ void DIALOG_PRINT_USING_PRINTER::initValues( )
|
|||
m_Print_Sheet_Ref->SetValue( s_Parameters.m_Print_Sheet_Ref );
|
||||
|
||||
// Options to plot pads and vias holes
|
||||
m_Drill_Shape_Opt->SetSelection( s_Parameters.m_DrillShapeOpt );
|
||||
m_drillMarksChoice->SetSelection( s_Parameters.m_DrillShapeOpt );
|
||||
|
||||
if( s_Parameters.m_Print_Black_and_White )
|
||||
m_ModeColorOption->SetSelection( 1 );
|
||||
else
|
||||
m_ModeColorOption->SetSelection( 0 );
|
||||
m_outputMode->SetSelection( s_Parameters.m_Print_Black_and_White ? 1 : 0 );
|
||||
|
||||
m_PagesOption->SetSelection(s_Parameters.m_OptionPrintPage);
|
||||
s_Parameters.m_PenDefaultSize = g_DrawDefaultLineThickness;
|
||||
AddUnitSymbol( *m_TextPenWidth, g_UserUnit );
|
||||
m_DialogPenWidth->SetValue(
|
||||
StringFromValue( g_UserUnit, s_Parameters.m_PenDefaultSize ) );
|
||||
m_defaultPenWidth.SetValue( s_Parameters.m_PenDefaultSize );
|
||||
|
||||
// Create scale adjust option
|
||||
msg.Printf( wxT( "%f" ), s_Parameters.m_XScaleAdjust );
|
||||
|
@ -258,9 +269,11 @@ void DIALOG_PRINT_USING_PRINTER::initValues( )
|
|||
msg.Printf( wxT( "%f" ), s_Parameters.m_YScaleAdjust );
|
||||
m_FineAdjustYscaleOpt->SetValue( msg );
|
||||
|
||||
bool enable = (s_Parameters.m_PrintScale == 1.0);
|
||||
bool enable = ( s_Parameters.m_PrintScale == 1.0 );
|
||||
m_FineAdjustXscaleOpt->Enable(enable);
|
||||
m_FineAdjustYscaleOpt->Enable(enable);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
@ -270,26 +283,20 @@ int DIALOG_PRINT_USING_PRINTER::SetLayerSetFromListSelection()
|
|||
|
||||
s_Parameters.m_PrintMaskLayer = LSET();
|
||||
|
||||
for( unsigned ii = 0; ii < DIM(m_boxSelectLayer); ++ii )
|
||||
for( unsigned layer = 0; layer < DIM(m_layers); ++layer )
|
||||
{
|
||||
if( !m_boxSelectLayer[ii].first )
|
||||
continue;
|
||||
|
||||
if( m_boxSelectLayer[ii].first->IsChecked( m_boxSelectLayer[ii].second ) )
|
||||
if( m_layers[layer].first && m_layers[layer].first->IsChecked( m_layers[layer].second ) )
|
||||
{
|
||||
page_count++;
|
||||
s_Parameters.m_PrintMaskLayer.set( ii );
|
||||
s_Parameters.m_PrintMaskLayer.set( layer );
|
||||
}
|
||||
}
|
||||
|
||||
// In Pcbnew force the EDGE layer to be printed or not with the other layers
|
||||
m_ExcludeEdgeLayer = m_Exclude_Edges_Pcb->IsChecked();
|
||||
if( m_ExcludeEdgeLayer )
|
||||
s_Parameters.m_Flags = 0;
|
||||
else
|
||||
s_Parameters.m_Flags = 1;
|
||||
s_Parameters.m_Flags = m_ExcludeEdgeLayer ? 0 : 1;
|
||||
|
||||
if( PrintUsingSinglePage() )
|
||||
if( m_PagesOption->GetSelection() != 0 )
|
||||
page_count = 1;
|
||||
|
||||
s_Parameters.m_PageCount = page_count;
|
||||
|
@ -298,49 +305,16 @@ int DIALOG_PRINT_USING_PRINTER::SetLayerSetFromListSelection()
|
|||
}
|
||||
|
||||
|
||||
void DIALOG_PRINT_USING_PRINTER::OnCloseWindow( wxCloseEvent& event )
|
||||
{
|
||||
SetPrintParameters();
|
||||
|
||||
if( m_config )
|
||||
{
|
||||
ConfigBaseWriteDouble( m_config, OPTKEY_PRINT_X_FINESCALE_ADJ,
|
||||
s_Parameters.m_XScaleAdjust );
|
||||
ConfigBaseWriteDouble( m_config, OPTKEY_PRINT_Y_FINESCALE_ADJ,
|
||||
s_Parameters.m_YScaleAdjust );
|
||||
m_config->Write( OPTKEY_PRINT_SCALE, m_ScaleOption->GetSelection() );
|
||||
m_config->Write( OPTKEY_PRINT_PAGE_FRAME, s_Parameters.m_Print_Sheet_Ref);
|
||||
m_config->Write( OPTKEY_PRINT_MONOCHROME_MODE, s_Parameters.m_Print_Black_and_White);
|
||||
m_config->Write( OPTKEY_PRINT_PAGE_PER_LAYER, s_Parameters.m_OptionPrintPage );
|
||||
m_config->Write( OPTKEY_PRINT_PADS_DRILL, (long) s_Parameters.m_DrillShapeOpt );
|
||||
wxString layerKey;
|
||||
|
||||
for( unsigned layer = 0; layer < DIM(m_boxSelectLayer); ++layer )
|
||||
{
|
||||
if( !m_boxSelectLayer[layer].first )
|
||||
continue;
|
||||
|
||||
layerKey.Printf( OPTKEY_LAYERBASE, layer );
|
||||
m_config->Write( layerKey,
|
||||
m_boxSelectLayer[layer].first->IsChecked( m_boxSelectLayer[layer].second ) );
|
||||
}
|
||||
}
|
||||
|
||||
EndModal( 0 );
|
||||
}
|
||||
|
||||
|
||||
void DIALOG_PRINT_USING_PRINTER::SetPrintParameters( )
|
||||
void DIALOG_PRINT_USING_PRINTER::SetPrintParameters()
|
||||
{
|
||||
PCB_PLOT_PARAMS plot_opts = m_parent->GetPlotSettings();
|
||||
|
||||
s_Parameters.m_PrintMirror = m_Print_Mirror->GetValue();
|
||||
s_Parameters.m_Print_Sheet_Ref = m_Print_Sheet_Ref->GetValue();
|
||||
s_Parameters.m_Print_Black_and_White =
|
||||
m_ModeColorOption->GetSelection() != 0;
|
||||
s_Parameters.m_Print_Black_and_White = m_outputMode->GetSelection() != 0;
|
||||
|
||||
s_Parameters.m_DrillShapeOpt =
|
||||
(PRINT_PARAMETERS::DrillShapeOptT) m_Drill_Shape_Opt->GetSelection();
|
||||
(PRINT_PARAMETERS::DrillShapeOptT) m_drillMarksChoice->GetSelection();
|
||||
|
||||
s_Parameters.m_OptionPrintPage = m_PagesOption->GetSelection() != 0;
|
||||
|
||||
|
@ -352,8 +326,7 @@ void DIALOG_PRINT_USING_PRINTER::SetPrintParameters( )
|
|||
|
||||
if( m_FineAdjustXscaleOpt )
|
||||
{
|
||||
if( s_Parameters.m_XScaleAdjust > MAX_SCALE ||
|
||||
s_Parameters.m_YScaleAdjust > MAX_SCALE )
|
||||
if( s_Parameters.m_XScaleAdjust > MAX_SCALE || s_Parameters.m_YScaleAdjust > MAX_SCALE )
|
||||
DisplayInfoMessage( NULL, _( "Warning: Scale option set to a very large value" ) );
|
||||
|
||||
m_FineAdjustXscaleOpt->GetValue().ToDouble( &s_Parameters.m_XScaleAdjust );
|
||||
|
@ -362,8 +335,7 @@ void DIALOG_PRINT_USING_PRINTER::SetPrintParameters( )
|
|||
if( m_FineAdjustYscaleOpt )
|
||||
{
|
||||
// Test for a reasonable scale value
|
||||
if( s_Parameters.m_XScaleAdjust < MIN_SCALE ||
|
||||
s_Parameters.m_YScaleAdjust < MIN_SCALE )
|
||||
if( s_Parameters.m_XScaleAdjust < MIN_SCALE || s_Parameters.m_YScaleAdjust < MIN_SCALE )
|
||||
DisplayInfoMessage( NULL, _( "Warning: Scale option set to a very small value" ) );
|
||||
|
||||
m_FineAdjustYscaleOpt->GetValue().ToDouble( &s_Parameters.m_YScaleAdjust );
|
||||
|
@ -374,33 +346,11 @@ void DIALOG_PRINT_USING_PRINTER::SetPrintParameters( )
|
|||
|
||||
m_parent->SetPlotSettings( plot_opts );
|
||||
|
||||
SetPenWidth();
|
||||
}
|
||||
|
||||
|
||||
void DIALOG_PRINT_USING_PRINTER::SetPenWidth()
|
||||
{
|
||||
// Get the new pen width value, and verify min et max value
|
||||
// NOTE: s_Parameters.m_PenDefaultSize is in internal units
|
||||
|
||||
s_Parameters.m_PenDefaultSize = ValueFromTextCtrl( *m_DialogPenWidth );
|
||||
|
||||
if( s_Parameters.m_PenDefaultSize > PEN_WIDTH_MAX_VALUE )
|
||||
{
|
||||
s_Parameters.m_PenDefaultSize = PEN_WIDTH_MAX_VALUE;
|
||||
}
|
||||
|
||||
if( s_Parameters.m_PenDefaultSize < PEN_WIDTH_MIN_VALUE )
|
||||
{
|
||||
s_Parameters.m_PenDefaultSize = PEN_WIDTH_MIN_VALUE;
|
||||
}
|
||||
|
||||
s_Parameters.m_PenDefaultSize = m_defaultPenWidth.GetValue();
|
||||
g_DrawDefaultLineThickness = s_Parameters.m_PenDefaultSize;
|
||||
|
||||
m_DialogPenWidth->SetValue(
|
||||
StringFromValue( g_UserUnit, s_Parameters.m_PenDefaultSize ) );
|
||||
}
|
||||
|
||||
|
||||
void DIALOG_PRINT_USING_PRINTER::OnScaleSelectionClick( wxCommandEvent& event )
|
||||
{
|
||||
double scale = s_ScaleList[m_ScaleOption->GetSelection()];
|
||||
|
@ -442,19 +392,10 @@ void DIALOG_PRINT_USING_PRINTER::OnPrintPreview( wxCommandEvent& event )
|
|||
new BOARD_PRINTOUT_CONTROLLER( s_Parameters, m_parent, title ),
|
||||
s_PrintData );
|
||||
|
||||
if( preview == NULL )
|
||||
{
|
||||
DisplayError( this, wxT( "An error occurred attempting to show the print preview window." ) );
|
||||
return;
|
||||
}
|
||||
|
||||
// Uses the parent position and size.
|
||||
wxPoint WPos = m_parent->GetPosition();
|
||||
wxSize WSize = m_parent->GetSize();
|
||||
|
||||
preview->SetZoom( 100 );
|
||||
|
||||
wxPreviewFrame* frame = new wxPreviewFrame( preview, this, title, WPos, WSize );
|
||||
wxPreviewFrame* frame = new wxPreviewFrame( preview, this, title, m_parent->GetPosition(),
|
||||
m_parent->GetSize() );
|
||||
frame->SetMinSize( wxSize( 550, 350 ) );
|
||||
frame->Center();
|
||||
|
||||
|
@ -497,7 +438,7 @@ void DIALOG_PRINT_USING_PRINTER::OnPrintButtonClick( wxCommandEvent& event )
|
|||
|
||||
// Disable 'Print' button to prevent issuing another print
|
||||
// command before the previous one is finished (causes problems on Windows)
|
||||
ENABLER printBtnDisable( *m_buttonPrint, false );
|
||||
ENABLER printBtnDisable( *m_sdbSizer1OK, false );
|
||||
|
||||
if( !printer.Print( this, &printout, true ) )
|
||||
{
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Apr 19 2018)
|
||||
// C++ code generated with wxFormBuilder (version Dec 30 2017)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
|
@ -14,44 +14,47 @@ DIALOG_PRINT_USING_PRINTER_BASE::DIALOG_PRINT_USING_PRINTER_BASE( wxWindow* pare
|
|||
this->SetSizeHints( wxSize( -1,-1 ), wxDefaultSize );
|
||||
|
||||
wxBoxSizer* bMainSizer;
|
||||
bMainSizer = new wxBoxSizer( wxHORIZONTAL );
|
||||
bMainSizer = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
wxBoxSizer* bUpperSizer;
|
||||
bUpperSizer = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
wxStaticBoxSizer* sbLayersSizer;
|
||||
sbLayersSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Included Layers:") ), wxVERTICAL );
|
||||
sbLayersSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Included Layers") ), wxVERTICAL );
|
||||
|
||||
wxBoxSizer* bleftSizer;
|
||||
bleftSizer = new wxBoxSizer( wxHORIZONTAL );
|
||||
wxBoxSizer* bLayerListsSizer;
|
||||
bLayerListsSizer = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
wxBoxSizer* bSizer6;
|
||||
bSizer6 = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
m_staticText4 = new wxStaticText( sbLayersSizer->GetStaticBox(), wxID_ANY, _("Copper layers:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText4->Wrap( -1 );
|
||||
bSizer6->Add( m_staticText4, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
bSizer6->Add( m_staticText4, 0, wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
wxArrayString m_CopperLayersListChoices;
|
||||
m_CopperLayersList = new wxCheckListBox( sbLayersSizer->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_CopperLayersListChoices, 0 );
|
||||
bSizer6->Add( m_CopperLayersList, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
bleftSizer->Add( bSizer6, 1, wxEXPAND, 5 );
|
||||
bLayerListsSizer->Add( bSizer6, 1, wxEXPAND, 5 );
|
||||
|
||||
wxBoxSizer* bSizer7;
|
||||
bSizer7 = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
m_staticText5 = new wxStaticText( sbLayersSizer->GetStaticBox(), wxID_ANY, _("Technical layers:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText5->Wrap( -1 );
|
||||
bSizer7->Add( m_staticText5, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
bSizer7->Add( m_staticText5, 0, wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
wxArrayString m_TechnicalLayersListChoices;
|
||||
m_TechnicalLayersList = new wxCheckListBox( sbLayersSizer->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_TechnicalLayersListChoices, 0 );
|
||||
bSizer7->Add( m_TechnicalLayersList, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
bleftSizer->Add( bSizer7, 1, wxEXPAND, 5 );
|
||||
bLayerListsSizer->Add( bSizer7, 1, wxEXPAND, 5 );
|
||||
|
||||
|
||||
sbLayersSizer->Add( bleftSizer, 1, wxEXPAND, 5 );
|
||||
sbLayersSizer->Add( bLayerListsSizer, 1, wxEXPAND, 5 );
|
||||
|
||||
m_Exclude_Edges_Pcb = new wxCheckBox( sbLayersSizer->GetStaticBox(), wxID_ANY, _("Exclude PCB edge layer"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_Exclude_Edges_Pcb->SetToolTip( _("Exclude contents of Edges_Pcb layer from all other layers") );
|
||||
|
@ -59,112 +62,135 @@ DIALOG_PRINT_USING_PRINTER_BASE::DIALOG_PRINT_USING_PRINTER_BASE( wxWindow* pare
|
|||
sbLayersSizer->Add( m_Exclude_Edges_Pcb, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
|
||||
bMainSizer->Add( sbLayersSizer, 1, wxEXPAND|wxALL, 5 );
|
||||
bUpperSizer->Add( sbLayersSizer, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
wxBoxSizer* bmiddleLeftSizer;
|
||||
bmiddleLeftSizer = new wxBoxSizer( wxVERTICAL );
|
||||
wxBoxSizer* bScaleSizer;
|
||||
bScaleSizer = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
wxString m_ScaleOptionChoices[] = { _("Fit to page"), _("Scale 0.5"), _("Scale 0.7"), _("Approx. scale 1"), _("Accurate scale 1"), _("Scale 1.4"), _("Scale 2"), _("Scale 3"), _("Scale 4") };
|
||||
int m_ScaleOptionNChoices = sizeof( m_ScaleOptionChoices ) / sizeof( wxString );
|
||||
m_ScaleOption = new wxRadioBox( this, wxID_ANY, _("Approximate Scale:"), wxDefaultPosition, wxDefaultSize, m_ScaleOptionNChoices, m_ScaleOptionChoices, 1, wxRA_SPECIFY_COLS );
|
||||
m_ScaleOption->SetSelection( 3 );
|
||||
bmiddleLeftSizer->Add( m_ScaleOption, 0, wxALL, 5 );
|
||||
m_ScaleOption = new wxRadioBox( this, wxID_ANY, _("Approximate Scale"), wxDefaultPosition, wxDefaultSize, m_ScaleOptionNChoices, m_ScaleOptionChoices, 1, wxRA_SPECIFY_COLS );
|
||||
m_ScaleOption->SetSelection( 0 );
|
||||
bScaleSizer->Add( m_ScaleOption, 0, wxALL, 5 );
|
||||
|
||||
m_FineAdjustXscaleTitle = new wxStaticText( this, wxID_ANY, _("X scale adjust:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_FineAdjustXscaleTitle->Wrap( -1 );
|
||||
bmiddleLeftSizer->Add( m_FineAdjustXscaleTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
bScaleSizer->Add( m_FineAdjustXscaleTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_FineAdjustXscaleOpt = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_FineAdjustXscaleOpt->SetToolTip( _("Set X scale adjust for exact scale plotting") );
|
||||
|
||||
bmiddleLeftSizer->Add( m_FineAdjustXscaleOpt, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
|
||||
bScaleSizer->Add( m_FineAdjustXscaleOpt, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
|
||||
|
||||
m_FineAdjustYscaleTitle = new wxStaticText( this, wxID_ANY, _("Y scale adjust:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_FineAdjustYscaleTitle->Wrap( -1 );
|
||||
bmiddleLeftSizer->Add( m_FineAdjustYscaleTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
bScaleSizer->Add( m_FineAdjustYscaleTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_FineAdjustYscaleOpt = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_FineAdjustYscaleOpt->SetToolTip( _("Set Y scale adjust for exact scale plotting") );
|
||||
|
||||
bmiddleLeftSizer->Add( m_FineAdjustYscaleOpt, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
|
||||
bScaleSizer->Add( m_FineAdjustYscaleOpt, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
|
||||
|
||||
|
||||
bMainSizer->Add( bmiddleLeftSizer, 0, wxEXPAND, 5 );
|
||||
bUpperSizer->Add( bScaleSizer, 0, wxEXPAND, 5 );
|
||||
|
||||
wxBoxSizer* bmiddleRightSizer;
|
||||
bmiddleRightSizer = new wxBoxSizer( wxVERTICAL );
|
||||
wxBoxSizer* bOptionsSizer;
|
||||
bOptionsSizer = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
wxStaticBoxSizer* sbOptionsSizer;
|
||||
sbOptionsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Generic Options:") ), wxVERTICAL );
|
||||
sbOptionsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Options") ), wxVERTICAL );
|
||||
|
||||
m_TextPenWidth = new wxStaticText( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("Default pen size:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_TextPenWidth->Wrap( -1 );
|
||||
m_TextPenWidth->SetToolTip( _("Pen size used to draw items that have no pen size specified.\nUsed mainly to draw items in sketch mode.") );
|
||||
wxGridBagSizer* gbSizer1;
|
||||
gbSizer1 = new wxGridBagSizer( 2, 0 );
|
||||
gbSizer1->SetFlexibleDirection( wxBOTH );
|
||||
gbSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
||||
|
||||
sbOptionsSizer->Add( m_TextPenWidth, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
m_penWidthLabel = new wxStaticText( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("Default pen size:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_penWidthLabel->Wrap( -1 );
|
||||
m_penWidthLabel->SetToolTip( _("Pen size used to draw items that have no pen size specified.\nUsed mainly to draw items in sketch mode.") );
|
||||
|
||||
m_DialogPenWidth = new wxTextCtrl( sbOptionsSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
sbOptionsSizer->Add( m_DialogPenWidth, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
|
||||
gbSizer1->Add( m_penWidthLabel, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT, 5 );
|
||||
|
||||
m_Print_Sheet_Ref = new wxCheckBox( sbOptionsSizer->GetStaticBox(), wxID_FRAME_SEL, _("Print frame ref"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_penWidthCtrl = new wxTextCtrl( sbOptionsSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
gbSizer1->Add( m_penWidthCtrl, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
|
||||
|
||||
m_penWidthUnits = new wxStaticText( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_penWidthUnits->Wrap( -1 );
|
||||
gbSizer1->Add( m_penWidthUnits, wxGBPosition( 0, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
|
||||
|
||||
m_drillMarksLabel = new wxStaticText( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("Drill marks:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_drillMarksLabel->Wrap( -1 );
|
||||
gbSizer1->Add( m_drillMarksLabel, wxGBPosition( 1, 0 ), wxGBSpan( 1, 1 ), wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
wxString m_drillMarksChoiceChoices[] = { _("No drill mark"), _("Small mark"), _("Real drill") };
|
||||
int m_drillMarksChoiceNChoices = sizeof( m_drillMarksChoiceChoices ) / sizeof( wxString );
|
||||
m_drillMarksChoice = new wxChoice( sbOptionsSizer->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_drillMarksChoiceNChoices, m_drillMarksChoiceChoices, 0 );
|
||||
m_drillMarksChoice->SetSelection( 0 );
|
||||
gbSizer1->Add( m_drillMarksChoice, wxGBPosition( 1, 1 ), wxGBSpan( 1, 1 ), wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
|
||||
|
||||
m_outputModeLabel = new wxStaticText( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("Output mode:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_outputModeLabel->Wrap( -1 );
|
||||
gbSizer1->Add( m_outputModeLabel, wxGBPosition( 2, 0 ), wxGBSpan( 1, 1 ), wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
wxString m_outputModeChoices[] = { _("Color"), _("Black and white") };
|
||||
int m_outputModeNChoices = sizeof( m_outputModeChoices ) / sizeof( wxString );
|
||||
m_outputMode = new wxChoice( sbOptionsSizer->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_outputModeNChoices, m_outputModeChoices, 0 );
|
||||
m_outputMode->SetSelection( 0 );
|
||||
gbSizer1->Add( m_outputMode, wxGBPosition( 2, 1 ), wxGBSpan( 1, 1 ), wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
|
||||
|
||||
m_Print_Sheet_Ref = new wxCheckBox( sbOptionsSizer->GetStaticBox(), wxID_FRAME_SEL, _("Print border and title block"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_Print_Sheet_Ref->SetValue(true);
|
||||
m_Print_Sheet_Ref->SetToolTip( _("Print Frame references.") );
|
||||
|
||||
sbOptionsSizer->Add( m_Print_Sheet_Ref, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
gbSizer1->Add( m_Print_Sheet_Ref, wxGBPosition( 3, 0 ), wxGBSpan( 1, 3 ), wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_Print_Mirror = new wxCheckBox( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("Mirror"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
sbOptionsSizer->Add( m_Print_Mirror, 0, wxALL, 5 );
|
||||
m_Print_Mirror = new wxCheckBox( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("Print mirrored"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
gbSizer1->Add( m_Print_Mirror, wxGBPosition( 4, 0 ), wxGBSpan( 1, 3 ), wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
bmiddleRightSizer->Add( sbOptionsSizer, 0, wxEXPAND|wxALL, 5 );
|
||||
gbSizer1->AddGrowableCol( 1 );
|
||||
|
||||
wxString m_Drill_Shape_OptChoices[] = { _("No drill mark"), _("Small mark"), _("Real drill") };
|
||||
int m_Drill_Shape_OptNChoices = sizeof( m_Drill_Shape_OptChoices ) / sizeof( wxString );
|
||||
m_Drill_Shape_Opt = new wxRadioBox( this, wxID_ANY, _("Pads Drill Options:"), wxDefaultPosition, wxDefaultSize, m_Drill_Shape_OptNChoices, m_Drill_Shape_OptChoices, 1, wxRA_SPECIFY_COLS );
|
||||
m_Drill_Shape_Opt->SetSelection( 1 );
|
||||
bmiddleRightSizer->Add( m_Drill_Shape_Opt, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
wxString m_ModeColorOptionChoices[] = { _("Color"), _("Black and white") };
|
||||
int m_ModeColorOptionNChoices = sizeof( m_ModeColorOptionChoices ) / sizeof( wxString );
|
||||
m_ModeColorOption = new wxRadioBox( this, wxID_PRINT_MODE, _("Print Mode:"), wxDefaultPosition, wxDefaultSize, m_ModeColorOptionNChoices, m_ModeColorOptionChoices, 1, wxRA_SPECIFY_COLS );
|
||||
m_ModeColorOption->SetSelection( 1 );
|
||||
m_ModeColorOption->SetToolTip( _("Choose if you want to draw the sheet like it appears on screen,\nor in black and white mode, better to print it when using black and white printers") );
|
||||
|
||||
bmiddleRightSizer->Add( m_ModeColorOption, 0, wxALL|wxEXPAND, 5 );
|
||||
sbOptionsSizer->Add( gbSizer1, 1, wxEXPAND, 5 );
|
||||
|
||||
|
||||
bMainSizer->Add( bmiddleRightSizer, 0, wxEXPAND, 5 );
|
||||
bOptionsSizer->Add( sbOptionsSizer, 1, wxEXPAND|wxALL, 5 );
|
||||
|
||||
wxBoxSizer* bbuttonsSizer;
|
||||
bbuttonsSizer = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
wxString m_PagesOptionChoices[] = { _("1 Page per layer"), _("Single page") };
|
||||
wxString m_PagesOptionChoices[] = { _("One page per layer"), _("All layers on single page") };
|
||||
int m_PagesOptionNChoices = sizeof( m_PagesOptionChoices ) / sizeof( wxString );
|
||||
m_PagesOption = new wxRadioBox( this, wxID_PAGE_MODE, _("Page Print:"), wxDefaultPosition, wxDefaultSize, m_PagesOptionNChoices, m_PagesOptionChoices, 1, wxRA_SPECIFY_COLS );
|
||||
m_PagesOption = new wxRadioBox( this, wxID_PAGE_MODE, _("Pagination"), wxDefaultPosition, wxDefaultSize, m_PagesOptionNChoices, m_PagesOptionChoices, 1, wxRA_SPECIFY_COLS );
|
||||
m_PagesOption->SetSelection( 0 );
|
||||
bbuttonsSizer->Add( m_PagesOption, 0, wxALL|wxEXPAND, 5 );
|
||||
bOptionsSizer->Add( m_PagesOption, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
bbuttonsSizer->Add( 0, 0, 1, wxEXPAND, 5 );
|
||||
|
||||
m_buttonOption = new wxButton( this, wxID_PRINT_OPTIONS, _("Page Options"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bbuttonsSizer->Add( m_buttonOption, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
m_buttonPreview = new wxButton( this, wxID_PREVIEW, _("Preview"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bbuttonsSizer->Add( m_buttonPreview, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
m_buttonPrint = new wxButton( this, wxID_PRINT_ALL, _("Print"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bbuttonsSizer->Add( m_buttonPrint, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
m_buttonQuit = new wxButton( this, wxID_CANCEL, _("Close"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_buttonQuit->SetDefault();
|
||||
bbuttonsSizer->Add( m_buttonQuit, 0, wxALL|wxEXPAND, 5 );
|
||||
bUpperSizer->Add( bOptionsSizer, 0, wxEXPAND, 5 );
|
||||
|
||||
|
||||
bbuttonsSizer->Add( 0, 0, 1, wxEXPAND, 5 );
|
||||
bMainSizer->Add( bUpperSizer, 1, wxEXPAND|wxALL, 5 );
|
||||
|
||||
m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
|
||||
bMainSizer->Add( m_staticline1, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 10 );
|
||||
|
||||
wxBoxSizer* bButtonsSizer;
|
||||
bButtonsSizer = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
m_buttonOption = new wxButton( this, wxID_PRINT_OPTIONS, _("Page Setup..."), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_buttonOption->SetMinSize( wxSize( 120,-1 ) );
|
||||
|
||||
bButtonsSizer->Add( m_buttonOption, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
m_sdbSizer1 = new wxStdDialogButtonSizer();
|
||||
m_sdbSizer1OK = new wxButton( this, wxID_OK );
|
||||
m_sdbSizer1->AddButton( m_sdbSizer1OK );
|
||||
m_sdbSizer1Apply = new wxButton( this, wxID_APPLY );
|
||||
m_sdbSizer1->AddButton( m_sdbSizer1Apply );
|
||||
m_sdbSizer1Cancel = new wxButton( this, wxID_CANCEL );
|
||||
m_sdbSizer1->AddButton( m_sdbSizer1Cancel );
|
||||
m_sdbSizer1->Realize();
|
||||
|
||||
bButtonsSizer->Add( m_sdbSizer1, 1, wxALL|wxEXPAND, 5 );
|
||||
|
||||
|
||||
bMainSizer->Add( bbuttonsSizer, 0, wxEXPAND, 5 );
|
||||
bMainSizer->Add( bButtonsSizer, 0, wxEXPAND|wxLEFT, 10 );
|
||||
|
||||
|
||||
this->SetSizer( bMainSizer );
|
||||
|
@ -174,24 +200,18 @@ DIALOG_PRINT_USING_PRINTER_BASE::DIALOG_PRINT_USING_PRINTER_BASE( wxWindow* pare
|
|||
this->Centre( wxBOTH );
|
||||
|
||||
// Connect Events
|
||||
this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_PRINT_USING_PRINTER_BASE::OnCloseWindow ) );
|
||||
this->Connect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_PRINT_USING_PRINTER_BASE::OnInitDlg ) );
|
||||
m_ScaleOption->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_BASE::OnScaleSelectionClick ), NULL, this );
|
||||
m_buttonOption->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_BASE::OnPageSetup ), NULL, this );
|
||||
m_buttonPreview->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_BASE::OnPrintPreview ), NULL, this );
|
||||
m_buttonPrint->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_BASE::OnPrintButtonClick ), NULL, this );
|
||||
m_buttonQuit->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_BASE::OnButtonCancelClick ), NULL, this );
|
||||
m_sdbSizer1Apply->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_BASE::OnPrintPreview ), NULL, this );
|
||||
m_sdbSizer1OK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_BASE::OnPrintButtonClick ), NULL, this );
|
||||
}
|
||||
|
||||
DIALOG_PRINT_USING_PRINTER_BASE::~DIALOG_PRINT_USING_PRINTER_BASE()
|
||||
{
|
||||
// Disconnect Events
|
||||
this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_PRINT_USING_PRINTER_BASE::OnCloseWindow ) );
|
||||
this->Disconnect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_PRINT_USING_PRINTER_BASE::OnInitDlg ) );
|
||||
m_ScaleOption->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_BASE::OnScaleSelectionClick ), NULL, this );
|
||||
m_buttonOption->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_BASE::OnPageSetup ), NULL, this );
|
||||
m_buttonPreview->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_BASE::OnPrintPreview ), NULL, this );
|
||||
m_buttonPrint->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_BASE::OnPrintButtonClick ), NULL, this );
|
||||
m_buttonQuit->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_BASE::OnButtonCancelClick ), NULL, this );
|
||||
m_sdbSizer1Apply->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_BASE::OnPrintPreview ), NULL, this );
|
||||
m_sdbSizer1OK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_BASE::OnPrintButtonClick ), NULL, this );
|
||||
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,5 +1,5 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Apr 19 2018)
|
||||
// C++ code generated with wxFormBuilder (version Dec 30 2017)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
|
@ -24,6 +24,9 @@
|
|||
#include <wx/statbox.h>
|
||||
#include <wx/radiobox.h>
|
||||
#include <wx/textctrl.h>
|
||||
#include <wx/choice.h>
|
||||
#include <wx/gbsizer.h>
|
||||
#include <wx/statline.h>
|
||||
#include <wx/button.h>
|
||||
#include <wx/dialog.h>
|
||||
|
||||
|
@ -40,10 +43,8 @@ class DIALOG_PRINT_USING_PRINTER_BASE : public DIALOG_SHIM
|
|||
enum
|
||||
{
|
||||
wxID_FRAME_SEL = 1000,
|
||||
wxID_PRINT_MODE,
|
||||
wxID_PAGE_MODE,
|
||||
wxID_PRINT_OPTIONS,
|
||||
wxID_PRINT_ALL
|
||||
wxID_PRINT_OPTIONS
|
||||
};
|
||||
|
||||
wxStaticText* m_staticText4;
|
||||
|
@ -56,26 +57,28 @@ class DIALOG_PRINT_USING_PRINTER_BASE : public DIALOG_SHIM
|
|||
wxTextCtrl* m_FineAdjustXscaleOpt;
|
||||
wxStaticText* m_FineAdjustYscaleTitle;
|
||||
wxTextCtrl* m_FineAdjustYscaleOpt;
|
||||
wxStaticText* m_TextPenWidth;
|
||||
wxTextCtrl* m_DialogPenWidth;
|
||||
wxStaticText* m_penWidthLabel;
|
||||
wxTextCtrl* m_penWidthCtrl;
|
||||
wxStaticText* m_penWidthUnits;
|
||||
wxStaticText* m_drillMarksLabel;
|
||||
wxChoice* m_drillMarksChoice;
|
||||
wxStaticText* m_outputModeLabel;
|
||||
wxChoice* m_outputMode;
|
||||
wxCheckBox* m_Print_Sheet_Ref;
|
||||
wxCheckBox* m_Print_Mirror;
|
||||
wxRadioBox* m_Drill_Shape_Opt;
|
||||
wxRadioBox* m_ModeColorOption;
|
||||
wxRadioBox* m_PagesOption;
|
||||
wxStaticLine* m_staticline1;
|
||||
wxButton* m_buttonOption;
|
||||
wxButton* m_buttonPreview;
|
||||
wxButton* m_buttonPrint;
|
||||
wxButton* m_buttonQuit;
|
||||
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 OnInitDlg( wxInitDialogEvent& event ) { event.Skip(); }
|
||||
virtual void OnScaleSelectionClick( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnPageSetup( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnPrintPreview( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnPrintButtonClick( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnButtonCancelClick( wxCommandEvent& event ) { event.Skip(); }
|
||||
|
||||
|
||||
public:
|
||||
|
|
|
@ -127,13 +127,12 @@ bool InvokeDXFDialogModuleImport( PCB_BASE_FRAME* aCaller, MODULE* aModule );
|
|||
bool InvokeLayerSetup( PCB_EDIT_FRAME* aCaller, BOARD* aBoard );
|
||||
|
||||
/**
|
||||
* Function InvokeSVGPrint
|
||||
* shows the SVG print dialog
|
||||
* @param aCaller is the wxTopLevelWindow which is invoking the dialog.
|
||||
* Function InvokeExportSVG
|
||||
* shows the Export SVG dialog
|
||||
* @param aCaller is the PCB_BASE_FRAME which is invoking the dialog.
|
||||
* @param aBoard is the currently edited board.
|
||||
* @param aSettings is the current pcb plot parameters.
|
||||
* @return bool - true if user pressed OK (did not abort), else false.
|
||||
*/
|
||||
bool InvokeSVGPrint( wxTopLevelWindow* aCaller, BOARD* aBoard, PCB_PLOT_PARAMS* aSettings );
|
||||
bool InvokeExportSVG( PCB_BASE_FRAME* aCaller, BOARD* aBoard );
|
||||
|
||||
#endif // INVOKE_A_DIALOG_H_
|
||||
|
|
|
@ -198,7 +198,7 @@ BEGIN_EVENT_TABLE( PCB_EDIT_FRAME, PCB_BASE_FRAME )
|
|||
EVT_TOOL( wxID_UNDO, PCB_BASE_EDIT_FRAME::RestoreCopyFromUndoList )
|
||||
EVT_TOOL( wxID_REDO, PCB_BASE_EDIT_FRAME::RestoreCopyFromRedoList )
|
||||
EVT_TOOL( wxID_PRINT, PCB_EDIT_FRAME::ToPrinter )
|
||||
EVT_TOOL( ID_GEN_PLOT_SVG, PCB_EDIT_FRAME::SVG_Print )
|
||||
EVT_TOOL( ID_GEN_PLOT_SVG, PCB_EDIT_FRAME::ExportSVG )
|
||||
EVT_TOOL( ID_GEN_PLOT, PCB_EDIT_FRAME::Process_Special_Functions )
|
||||
EVT_TOOL( ID_FIND_ITEMS, PCB_EDIT_FRAME::Process_Special_Functions )
|
||||
EVT_TOOL( ID_GET_NETLIST, PCB_EDIT_FRAME::Process_Special_Functions )
|
||||
|
@ -1070,24 +1070,9 @@ void PCB_EDIT_FRAME::OnModify( )
|
|||
}
|
||||
|
||||
|
||||
void PCB_EDIT_FRAME::SVG_Print( wxCommandEvent& event )
|
||||
void PCB_EDIT_FRAME::ExportSVG( wxCommandEvent& event )
|
||||
{
|
||||
PCB_PLOT_PARAMS plot_prms = GetPlotSettings();
|
||||
|
||||
// we don't want dialogs knowing about complex wxFrame functions so
|
||||
// pass everything the dialog needs without reference to *this frame's class.
|
||||
if( InvokeSVGPrint( this, GetBoard(), &plot_prms ) )
|
||||
{
|
||||
if( !plot_prms.IsSameAs( GetPlotSettings(), false ) )
|
||||
{
|
||||
// First, mark board as modified only for parameters saved in file
|
||||
if( !plot_prms.IsSameAs( GetPlotSettings(), true ) )
|
||||
OnModify();
|
||||
|
||||
// Now, save any change, for the session
|
||||
SetPlotSettings( plot_prms );
|
||||
}
|
||||
}
|
||||
InvokeExportSVG( this, GetBoard() );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -317,7 +317,7 @@ public:
|
|||
* Function SVG_Print
|
||||
* shows the print SVG file dialog.
|
||||
*/
|
||||
void SVG_Print( wxCommandEvent& event );
|
||||
void ExportSVG( wxCommandEvent& event );
|
||||
|
||||
// User interface update command event handlers.
|
||||
void OnUpdateSave( wxUpdateUIEvent& aEvent );
|
||||
|
|
Loading…
Reference in New Issue