Commit 5daccd29 authored by jean-pierre charras's avatar jean-pierre charras

Pcbnew plot functions: code cleanup, coding and UI policy fixes and minor enhancements

parents 9e8fb761 6964a4b6
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
#endif #endif
#ifndef KICAD_BUILD_VERSION #ifndef KICAD_BUILD_VERSION
#define KICAD_BUILD_VERSION "(2010-04-19 BZR 23xx)" #define KICAD_BUILD_VERSION "(2010-12-10 BZR 26xx)"
#endif #endif
//#define VERSION_STABILITY "stable" //#define VERSION_STABILITY "stable"
......
...@@ -28,7 +28,7 @@ PLOTTER::PLOTTER( PlotFormat aPlotType ) ...@@ -28,7 +28,7 @@ PLOTTER::PLOTTER( PlotFormat aPlotType )
default_pen_width = 0; default_pen_width = 0;
current_pen_width = -1; /* To-be-set marker */ current_pen_width = -1; /* To-be-set marker */
pen_state = 'Z'; /* End-of-path idle */ pen_state = 'Z'; /* End-of-path idle */
plot_orient_options = 0; /* Mirror flag */ plotMirror = 0; /* Mirror flag */
output_file = 0; output_file = 0;
color_mode = false; /* Start as a BW plot */ color_mode = false; /* Start as a BW plot */
negative_mode = false; negative_mode = false;
...@@ -43,7 +43,7 @@ void PLOTTER::user_to_device_coordinates( wxPoint& pos ) ...@@ -43,7 +43,7 @@ void PLOTTER::user_to_device_coordinates( wxPoint& pos )
{ {
pos.x = (int) ( (pos.x - plot_offset.x) * plot_scale * device_scale ); pos.x = (int) ( (pos.x - plot_offset.x) * plot_scale * device_scale );
if( plot_orient_options == PLOT_MIROIR ) if( plotMirror )
pos.y = (int) ( ( pos.y - plot_offset.y ) * plot_scale * device_scale ); pos.y = (int) ( ( pos.y - plot_offset.y ) * plot_scale * device_scale );
else else
pos.y = (int) ( ( paper_size.y - ( pos.y - plot_offset.y ) pos.y = (int) ( ( paper_size.y - ( pos.y - plot_offset.y )
......
...@@ -14,15 +14,14 @@ ...@@ -14,15 +14,14 @@
/* Set the plot offset for the current plotting /* Set the plot offset for the current plotting
*/ */
void DXF_PLOTTER::set_viewport( wxPoint offset, void DXF_PLOTTER::set_viewport( wxPoint aOffset, double aScale, bool aMirror )
double aScale, int orient )
{ {
wxASSERT( !output_file ); wxASSERT( !output_file );
plot_offset = offset; plot_offset = aOffset;
plot_scale = aScale; plot_scale = aScale;
device_scale = 1; device_scale = 1;
set_default_line_width( 0 ); /* No line width on DXF */ set_default_line_width( 0 ); /* No line width on DXF */
plot_orient_options = 0; /* No mirroring on DXF */ plotMirror = false; /* No mirroring on DXF */
current_color = BLACK; current_color = BLACK;
} }
......
...@@ -21,13 +21,12 @@ ...@@ -21,13 +21,12 @@
* @param aOffset = plot offset * @param aOffset = plot offset
* @param aScale = coordinate scale (scale coefficient for coordinates) * @param aScale = coordinate scale (scale coefficient for coordinates)
*/ */
void GERBER_PLOTTER::set_viewport( wxPoint offset, void GERBER_PLOTTER::set_viewport( wxPoint aOffset, double aScale, bool aMirror )
double aScale, int orient )
{ {
wxASSERT( !output_file ); wxASSERT( !output_file );
wxASSERT( orient == 0 ); wxASSERT( aMirror == false );
plot_orient_options = 0; plotMirror = false;
plot_offset = offset; plot_offset = aOffset;
wxASSERT( aScale == 1 ); wxASSERT( aScale == 1 );
plot_scale = 1; plot_scale = 1;
device_scale = 1; device_scale = 1;
......
...@@ -17,14 +17,14 @@ const double SCALE_HPGL = 0.102041; ...@@ -17,14 +17,14 @@ const double SCALE_HPGL = 0.102041;
/* Set the plot offset for the current plotting /* Set the plot offset for the current plotting
*/ */
void HPGL_PLOTTER::set_viewport( wxPoint offset, double aScale, int orient ) void HPGL_PLOTTER::set_viewport( wxPoint aOffset, double aScale, bool aMirror )
{ {
wxASSERT( !output_file ); wxASSERT( !output_file );
plot_offset = offset; plot_offset = aOffset;
plot_scale = aScale; plot_scale = aScale;
device_scale = SCALE_HPGL; device_scale = SCALE_HPGL;
set_default_line_width( 100 ); /* default line width in 1 / 1000 inch */ set_default_line_width( 100 ); /* default line width in 1 / 1000 inch */
plot_orient_options = orient; plotMirror = aMirror;
} }
...@@ -213,7 +213,7 @@ void HPGL_PLOTTER::arc( wxPoint centre, int StAngle, int EndAngle, int rayon, ...@@ -213,7 +213,7 @@ void HPGL_PLOTTER::arc( wxPoint centre, int StAngle, int EndAngle, int rayon,
cpos = centre; cpos = centre;
user_to_device_coordinates( cpos ); user_to_device_coordinates( cpos );
if( plot_orient_options == PLOT_MIROIR ) if( plotMirror )
angle = (StAngle - EndAngle) / 10.0; angle = (StAngle - EndAngle) / 10.0;
else else
angle = (EndAngle - StAngle) / 10.0; angle = (EndAngle - StAngle) / 10.0;
......
...@@ -13,11 +13,11 @@ ...@@ -13,11 +13,11 @@
/* Set the plot offset for the current plotting */ /* Set the plot offset for the current plotting */
void PS_PLOTTER::set_viewport( wxPoint offset, double aScale, int orient ) void PS_PLOTTER::set_viewport( wxPoint aOffset, double aScale, bool aMirror )
{ {
wxASSERT( !output_file ); wxASSERT( !output_file );
plot_orient_options = orient; plotMirror = aMirror;
plot_offset = offset; plot_offset = aOffset;
plot_scale = aScale; plot_scale = aScale;
device_scale = 1; /* PS references in decimals */ device_scale = 1; /* PS references in decimals */
set_default_line_width( 100 ); /* default line width in 1/1000 inch */ set_default_line_width( 100 ); /* default line width in 1/1000 inch */
...@@ -157,7 +157,7 @@ void PS_PLOTTER::arc( wxPoint centre, int StAngle, int EndAngle, int radius, ...@@ -157,7 +157,7 @@ void PS_PLOTTER::arc( wxPoint centre, int StAngle, int EndAngle, int radius,
// Calculate start point. // Calculate start point.
user_to_device_coordinates( centre ); user_to_device_coordinates( centre );
radius = wxRound( user_to_device_size( radius ) ); radius = wxRound( user_to_device_size( radius ) );
if( plot_orient_options == PLOT_MIROIR ) if( plotMirror )
fprintf( output_file, "%d %d %d %g %g arc%d\n", centre.x, centre.y, fprintf( output_file, "%d %d %d %g %g arc%d\n", centre.x, centre.y,
radius, (double) -EndAngle / 10, (double) -StAngle / 10, radius, (double) -EndAngle / 10, (double) -StAngle / 10,
fill ); fill );
......
...@@ -27,14 +27,11 @@ enum PlotFormat { ...@@ -27,14 +27,11 @@ enum PlotFormat {
PLOT_FORMAT_DXF PLOT_FORMAT_DXF
}; };
const int PLOT_MIROIR = 1;
class PLOTTER class PLOTTER
{ {
public: public:
PlotFormat m_PlotType; // type of plot PlotFormat m_PlotType; // type of plot
public: public: PLOTTER( PlotFormat aPlotType );
PLOTTER( PlotFormat aPlotType );
virtual ~PLOTTER() virtual ~PLOTTER()
{ {
...@@ -92,8 +89,7 @@ public: ...@@ -92,8 +89,7 @@ public:
} }
virtual void set_viewport( wxPoint offset, virtual void set_viewport( wxPoint aOffset, double aScale, bool aMirror ) = 0;
double scale, int orient ) = 0;
// Standard primitives // Standard primitives
virtual void rect( wxPoint p1, wxPoint p2, FILL_T fill, virtual void rect( wxPoint p1, wxPoint p2, FILL_T fill,
...@@ -121,6 +117,7 @@ public: ...@@ -121,6 +117,7 @@ public:
GRTraceMode trace_mode ) = 0; GRTraceMode trace_mode ) = 0;
virtual void flash_pad_rect( wxPoint pos, wxSize size, virtual void flash_pad_rect( wxPoint pos, wxSize size,
int orient, GRTraceMode trace_mode ) = 0; int orient, GRTraceMode trace_mode ) = 0;
/** virtual function flash_pad_trapez /** virtual function flash_pad_trapez
* flash a trapezoidal pad * flash a trapezoidal pad
* @param aPadPos = the position of the shape * @param aPadPos = the position of the shape
...@@ -176,7 +173,7 @@ public: ...@@ -176,7 +173,7 @@ public:
* by writing \%LPD*\% or \%LPC*\% to the Gerber file, respectively. * by writing \%LPD*\% or \%LPC*\% to the Gerber file, respectively.
* @param aPositive is the layer polarity and true for positive. * @param aPositive is the layer polarity and true for positive.
*/ */
virtual void SetLayerPolarity( bool aPositive ) = 0; virtual void SetLayerPolarity( bool aPositive ) = 0;
protected: protected:
// These are marker subcomponents // These are marker subcomponents
...@@ -206,8 +203,7 @@ protected: ...@@ -206,8 +203,7 @@ protected:
int current_pen_width; int current_pen_width;
char pen_state; char pen_state;
wxPoint pen_lastpos; wxPoint pen_lastpos;
// Other stuff bool plotMirror;
int plot_orient_options; // For now, mirror plot
wxString creator; wxString creator;
wxString filename; wxString filename;
Ki_PageDescr* sheet; Ki_PageDescr* sheet;
...@@ -216,11 +212,11 @@ protected: ...@@ -216,11 +212,11 @@ protected:
class HPGL_PLOTTER : public PLOTTER class HPGL_PLOTTER : public PLOTTER
{ {
public: public: HPGL_PLOTTER() : PLOTTER( PLOT_FORMAT_HPGL )
HPGL_PLOTTER() : PLOTTER(PLOT_FORMAT_HPGL)
{ {
} }
virtual bool start_plot( FILE* fout ); virtual bool start_plot( FILE* fout );
virtual bool end_plot(); virtual bool end_plot();
...@@ -262,8 +258,7 @@ public: ...@@ -262,8 +258,7 @@ public:
} }
virtual void set_viewport( wxPoint offset, virtual void set_viewport( wxPoint aOffset, double aScale, bool aMirror );
double scale, int orient );
virtual void rect( wxPoint p1, wxPoint p2, FILL_T fill, int width = -1 ); virtual void rect( wxPoint p1, wxPoint p2, FILL_T fill, int width = -1 );
virtual void circle( wxPoint pos, int diametre, FILL_T fill, int width = -1 ); virtual void circle( wxPoint pos, int diametre, FILL_T fill, int width = -1 );
virtual void poly( int nb_segm, int* coord, FILL_T fill, int width = -1 ); virtual void poly( int nb_segm, int* coord, FILL_T fill, int width = -1 );
...@@ -278,13 +273,14 @@ public: ...@@ -278,13 +273,14 @@ public:
GRTraceMode trace_mode ); GRTraceMode trace_mode );
virtual void flash_pad_rect( wxPoint pos, wxSize size, virtual void flash_pad_rect( wxPoint pos, wxSize size,
int orient, GRTraceMode trace_mode ); int orient, GRTraceMode trace_mode );
virtual void flash_pad_trapez( wxPoint aPadPos, wxPoint aCorners[4], virtual void flash_pad_trapez( wxPoint aPadPos, wxPoint aCorners[4],
int aPadOrient, GRTraceMode aTrace_Mode ); int aPadOrient, GRTraceMode aTrace_Mode );
virtual void SetLayerPolarity( bool aPositive ) {} virtual void SetLayerPolarity( bool aPositive ) {}
protected: protected:
void pen_control( int plume ); void pen_control( int plume );
int pen_speed; int pen_speed;
int pen_number; int pen_number;
...@@ -295,13 +291,13 @@ protected: ...@@ -295,13 +291,13 @@ protected:
class PS_PLOTTER : public PLOTTER class PS_PLOTTER : public PLOTTER
{ {
public: public: PS_PLOTTER() : PLOTTER( PLOT_FORMAT_POST )
PS_PLOTTER() : PLOTTER(PLOT_FORMAT_POST)
{ {
plot_scale_adjX = 1; plot_scale_adjX = 1;
plot_scale_adjY = 1; plot_scale_adjY = 1;
} }
virtual bool start_plot( FILE* fout ); virtual bool start_plot( FILE* fout );
virtual bool end_plot(); virtual bool end_plot();
virtual void set_current_line_width( int width ); virtual void set_current_line_width( int width );
...@@ -316,8 +312,7 @@ public: ...@@ -316,8 +312,7 @@ public:
} }
virtual void set_viewport( wxPoint offset, virtual void set_viewport( wxPoint aOffset, double aScale, bool aMirror );
double scale, int orient );
virtual void rect( wxPoint p1, wxPoint p2, FILL_T fill, int width = -1 ); virtual void rect( wxPoint p1, wxPoint p2, FILL_T fill, int width = -1 );
virtual void circle( wxPoint pos, int diametre, FILL_T fill, int width = -1 ); virtual void circle( wxPoint pos, int diametre, FILL_T fill, int width = -1 );
virtual void arc( wxPoint centre, int StAngle, int EndAngle, int rayon, virtual void arc( wxPoint centre, int StAngle, int EndAngle, int rayon,
...@@ -330,6 +325,7 @@ public: ...@@ -330,6 +325,7 @@ public:
GRTraceMode trace_mode ); GRTraceMode trace_mode );
virtual void flash_pad_rect( wxPoint pos, wxSize size, virtual void flash_pad_rect( wxPoint pos, wxSize size,
int orient, GRTraceMode trace_mode ); int orient, GRTraceMode trace_mode );
virtual void flash_pad_trapez( wxPoint aPadPos, wxPoint aCorners[4], virtual void flash_pad_trapez( wxPoint aPadPos, wxPoint aCorners[4],
int aPadOrient, GRTraceMode aTrace_Mode ); int aPadOrient, GRTraceMode aTrace_Mode );
...@@ -362,39 +358,37 @@ struct APERTURE ...@@ -362,39 +358,37 @@ struct APERTURE
class GERBER_PLOTTER : public PLOTTER class GERBER_PLOTTER : public PLOTTER
{ {
public: public: GERBER_PLOTTER() : PLOTTER( PLOT_FORMAT_GERBER )
GERBER_PLOTTER() : PLOTTER(PLOT_FORMAT_GERBER)
{ {
work_file = 0; work_file = 0;
final_file = 0; final_file = 0;
current_aperture = apertures.end(); current_aperture = apertures.end();
} }
virtual bool start_plot( FILE* fout );
virtual bool end_plot();
virtual void set_current_line_width( int width );
virtual void set_default_line_width( int width );
/* RS274X has no dashing, nor colours */
virtual void set_dash( bool dashed ) {};
virtual void set_color( int color ) {};
virtual void set_viewport( wxPoint aOffset, double aScale, bool aMirror );
virtual void rect( wxPoint p1, wxPoint p2, FILL_T fill, int width = -1 );
virtual void circle( wxPoint pos, int diametre, FILL_T fill, int width = -1 );
virtual void poly( int nb_segm, int* coord, FILL_T fill, int width = -1 );
virtual void pen_to( wxPoint pos, char plume );
virtual void flash_pad_circle( wxPoint pos, int diametre,
GRTraceMode trace_mode );
virtual void flash_pad_oval( wxPoint pos, wxSize size, int orient,
GRTraceMode trace_mode );
virtual void flash_pad_rect( wxPoint pos, wxSize size,
int orient, GRTraceMode trace_mode );
virtual void flash_pad_trapez( wxPoint aPadPos, wxPoint aCorners[4],
int aPadOrient, GRTraceMode aTrace_Mode );
virtual bool start_plot( FILE* fout ); virtual void SetLayerPolarity( bool aPositive );
virtual bool end_plot();
virtual void set_current_line_width( int width );
virtual void set_default_line_width( int width );
// RS274X has no dashing, nor colours
virtual void set_dash( bool dashed ) {}
virtual void set_color( int color ) {}
virtual void set_viewport( wxPoint offset,
double scale, int orient );
virtual void rect( wxPoint p1, wxPoint p2, FILL_T fill, int width = -1 );
virtual void circle( wxPoint pos, int diametre, FILL_T fill, int width = -1 );
virtual void poly( int nb_segm, int* coord, FILL_T fill, int width = -1 );
virtual void pen_to( wxPoint pos, char plume );
virtual void flash_pad_circle( wxPoint pos, int diametre,
GRTraceMode trace_mode );
virtual void flash_pad_oval( wxPoint pos, wxSize size, int orient,
GRTraceMode trace_mode );
virtual void flash_pad_rect( wxPoint pos, wxSize size,
int orient, GRTraceMode trace_mode );
virtual void flash_pad_trapez( wxPoint aPadPos, wxPoint aCorners[4],
int aPadOrient, GRTraceMode aTrace_Mode );
virtual void SetLayerPolarity( bool aPositive );
protected: protected:
void select_aperture( const wxSize& size, void select_aperture( const wxSize& size,
...@@ -403,10 +397,10 @@ protected: ...@@ -403,10 +397,10 @@ protected:
std::vector<APERTURE>::iterator std::vector<APERTURE>::iterator
get_aperture( const wxSize& size, APERTURE::Aperture_Type type ); get_aperture( const wxSize& size, APERTURE::Aperture_Type type );
FILE* work_file, * final_file; FILE* work_file, * final_file;
wxString m_workFilename; wxString m_workFilename;
void write_aperture_list(); void write_aperture_list();
std::vector<APERTURE> apertures; std::vector<APERTURE> apertures;
std::vector<APERTURE>::iterator current_aperture; std::vector<APERTURE>::iterator current_aperture;
...@@ -414,11 +408,11 @@ protected: ...@@ -414,11 +408,11 @@ protected:
class DXF_PLOTTER : public PLOTTER class DXF_PLOTTER : public PLOTTER
{ {
public: public: DXF_PLOTTER() : PLOTTER( PLOT_FORMAT_DXF )
DXF_PLOTTER() : PLOTTER(PLOT_FORMAT_DXF)
{ {
} }
virtual bool start_plot( FILE* fout ); virtual bool start_plot( FILE* fout );
virtual bool end_plot(); virtual bool end_plot();
...@@ -439,8 +433,7 @@ public: ...@@ -439,8 +433,7 @@ public:
virtual void set_color( int color ); virtual void set_color( int color );
virtual void set_viewport( wxPoint offset, virtual void set_viewport( wxPoint aOffset, double aScale, bool aMirror );
double scale, int orient );
virtual void rect( wxPoint p1, wxPoint p2, FILL_T fill, int width = -1 ); virtual void rect( wxPoint p1, wxPoint p2, FILL_T fill, int width = -1 );
virtual void circle( wxPoint pos, int diametre, FILL_T fill, int width = -1 ); virtual void circle( wxPoint pos, int diametre, FILL_T fill, int width = -1 );
virtual void poly( int nb_segm, int* coord, FILL_T fill, int width = -1 ); virtual void poly( int nb_segm, int* coord, FILL_T fill, int width = -1 );
...@@ -455,6 +448,7 @@ public: ...@@ -455,6 +448,7 @@ public:
GRTraceMode trace_mode ); GRTraceMode trace_mode );
virtual void flash_pad_rect( wxPoint pos, wxSize size, virtual void flash_pad_rect( wxPoint pos, wxSize size,
int orient, GRTraceMode trace_mode ); int orient, GRTraceMode trace_mode );
virtual void flash_pad_trapez( wxPoint aPadPos, wxPoint aCorners[4], virtual void flash_pad_trapez( wxPoint aPadPos, wxPoint aCorners[4],
int aPadOrient, GRTraceMode aTrace_Mode ); int aPadOrient, GRTraceMode aTrace_Mode );
......
...@@ -133,11 +133,11 @@ void DIALOG_GENDRILL::InitDisplayParams( void ) ...@@ -133,11 +133,11 @@ void DIALOG_GENDRILL::InitDisplayParams( void )
m_MicroViaDrillValue->SetLabel( _( "Use Netclasses values" ) ); m_MicroViaDrillValue->SetLabel( _( "Use Netclasses values" ) );
msg.Empty(); msg.Empty();
msg << g_pcb_plot_options.HPGL_Pen_Num; msg << g_PcbPlotOptions.m_HPGLPenNum;
m_PenNum->SetValue( msg ); m_PenNum->SetValue( msg );
msg.Empty(); msg.Empty();
msg << g_pcb_plot_options.HPGL_Pen_Speed; msg << g_PcbPlotOptions.m_HPGLPenSpeed;
m_PenSpeed->SetValue( msg ); m_PenSpeed->SetValue( msg );
// See if we have some buried vias or/and microvias, and display // See if we have some buried vias or/and microvias, and display
...@@ -290,11 +290,11 @@ void DIALOG_GENDRILL::SetParams( void ) ...@@ -290,11 +290,11 @@ void DIALOG_GENDRILL::SetParams( void )
msg = m_PenSpeed->GetValue(); msg = m_PenSpeed->GetValue();
if( msg.ToLong( &ltmp ) ) if( msg.ToLong( &ltmp ) )
g_pcb_plot_options.HPGL_Pen_Speed = ltmp; g_PcbPlotOptions.m_HPGLPenSpeed = ltmp;
msg = m_PenNum->GetValue(); msg = m_PenNum->GetValue();
if( msg.ToLong( &ltmp ) ) if( msg.ToLong( &ltmp ) )
g_pcb_plot_options.HPGL_Pen_Num = ltmp; g_PcbPlotOptions.m_HPGLPenNum = ltmp;
if( m_Choice_Drill_Offset->GetSelection() == 0 ) if( m_Choice_Drill_Offset->GetSelection() == 0 )
m_FileDrillOffset = wxPoint( 0, 0 ); m_FileDrillOffset = wxPoint( 0, 0 );
else else
......
...@@ -35,84 +35,84 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr ...@@ -35,84 +35,84 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr
bLeftSizer->Add( sbLayersSizer, 1, wxEXPAND, 5 ); bLeftSizer->Add( sbLayersSizer, 1, wxEXPAND, 5 );
m_Use_Gerber_Extensions = new wxCheckBox( this, ID_USE_GERBER_EXTENSIONS, _("Use Proper Gerber Extensions"), wxDefaultPosition, wxDefaultSize, 0 ); m_useGerberExtensions = new wxCheckBox( this, wxID_ANY, _("Use proper Gerber extensions"), wxDefaultPosition, wxDefaultSize, 0 );
m_Use_Gerber_Extensions->SetToolTip( _("Use Proper Gerber Extensions - .GBL, .GTL, etc...") ); m_useGerberExtensions->SetToolTip( _("Use Proper Gerber Extensions - .GBL, .GTL, etc...") );
bLeftSizer->Add( m_Use_Gerber_Extensions, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); bLeftSizer->Add( m_useGerberExtensions, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_Exclude_Edges_Pcb = new wxCheckBox( this, wxID_ANY, _("Exclude pcb edge layer"), wxDefaultPosition, wxDefaultSize, 0 ); m_excludeEdgeLayerOpt = new wxCheckBox( this, wxID_ANY, _("Exclude pcb edge layer"), wxDefaultPosition, wxDefaultSize, 0 );
m_Exclude_Edges_Pcb->SetToolTip( _("Exclude contents of the pcb edge layer from all other layers") ); m_excludeEdgeLayerOpt->SetToolTip( _("Exclude contents of the pcb edge layer from all other layers") );
bLeftSizer->Add( m_Exclude_Edges_Pcb, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); bLeftSizer->Add( m_excludeEdgeLayerOpt, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_SubtractMaskFromSilk = new wxCheckBox( this, wxID_ANY, _("Subtract Mask from Silk"), wxDefaultPosition, wxDefaultSize, 0 ); m_subtractMaskFromSilk = new wxCheckBox( this, wxID_ANY, _("Subtract mask from silk"), wxDefaultPosition, wxDefaultSize, 0 );
m_SubtractMaskFromSilk->SetToolTip( _("Remove silkscreen from areas without soldermask") ); m_subtractMaskFromSilk->SetToolTip( _("Remove silkscreen from areas without soldermask") );
bLeftSizer->Add( m_SubtractMaskFromSilk, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); bLeftSizer->Add( m_subtractMaskFromSilk, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_Plot_Sheet_Ref = new wxCheckBox( this, wxID_ANY, _("Print sheet reference"), wxDefaultPosition, wxDefaultSize, 0 ); m_plotSheetRef = new wxCheckBox( this, wxID_ANY, _("Plot sheet reference"), wxDefaultPosition, wxDefaultSize, 0 );
bLeftSizer->Add( m_Plot_Sheet_Ref, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); bLeftSizer->Add( m_plotSheetRef, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_Plot_Pads_on_Silkscreen = new wxCheckBox( this, ID_ALLOW_PRINT_PAD_ON_SILKSCREEN, _("Print pads on silkscreen"), wxDefaultPosition, wxDefaultSize, 0 ); m_plotPads_on_Silkscreen = new wxCheckBox( this, ID_ALLOW_PRINT_PAD_ON_SILKSCREEN, _("Plot pads on silkscreen"), wxDefaultPosition, wxDefaultSize, 0 );
m_Plot_Pads_on_Silkscreen->SetToolTip( _("Enable/disable print/plot pads on silkscreen layers\nWhen disable, pads are never potted on silkscreen layers\nWhen enable, pads are potted only if they appear on silkscreen layers") ); m_plotPads_on_Silkscreen->SetToolTip( _("Enable/disable print/plot pads on silkscreen layers\nWhen disable, pads are never potted on silkscreen layers\nWhen enable, pads are potted only if they appear on silkscreen layers") );
bLeftSizer->Add( m_Plot_Pads_on_Silkscreen, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); bLeftSizer->Add( m_plotPads_on_Silkscreen, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_Plot_Text_Value = new wxCheckBox( this, ID_PRINT_VALUE, _("Print module value"), wxDefaultPosition, wxDefaultSize, 0 ); m_plotModuleValueOpt = new wxCheckBox( this, wxID_ANY, _("Plot module value"), wxDefaultPosition, wxDefaultSize, 0 );
bLeftSizer->Add( m_Plot_Text_Value, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); bLeftSizer->Add( m_plotModuleValueOpt, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_Plot_Text_Ref = new wxCheckBox( this, ID_PRINT_REF, _("Print module reference"), wxDefaultPosition, wxDefaultSize, 0 ); m_plotModuleRefOpt = new wxCheckBox( this, ID_PRINT_REF, _("Plot module reference"), wxDefaultPosition, wxDefaultSize, 0 );
bLeftSizer->Add( m_Plot_Text_Ref, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); bLeftSizer->Add( m_plotModuleRefOpt, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_Plot_Text_Div = new wxCheckBox( this, ID_PRINT_MODULE_TEXTS, _("Print other module texts"), wxDefaultPosition, wxDefaultSize, 0 ); m_plotTextOther = new wxCheckBox( this, wxID_ANY, _("Plot other module texts"), wxDefaultPosition, wxDefaultSize, 0 );
m_Plot_Text_Div->SetToolTip( _("Enable/disable print/plot module field texts on silkscreen layers") ); m_plotTextOther->SetToolTip( _("Enable/disable print/plot module field texts on silkscreen layers") );
bLeftSizer->Add( m_Plot_Text_Div, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); bLeftSizer->Add( m_plotTextOther, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_Plot_Invisible_Text = new wxCheckBox( this, ID_FORCE_PRINT_INVISIBLE_TEXT, _("Force print invisible texts"), wxDefaultPosition, wxDefaultSize, 0 ); m_plotInvisibleText = new wxCheckBox( this, wxID_ANY, _("Force plot invisible texts"), wxDefaultPosition, wxDefaultSize, 0 );
m_Plot_Invisible_Text->SetToolTip( _("Force print/plot module invisible texts on silkscreen layers") ); m_plotInvisibleText->SetToolTip( _("Force print/plot module invisible texts on silkscreen layers") );
bLeftSizer->Add( m_Plot_Invisible_Text, 0, wxALL, 5 ); bLeftSizer->Add( m_plotInvisibleText, 0, wxALL, 5 );
bUpperSizer->Add( bLeftSizer, 2, wxEXPAND, 5 ); bUpperSizer->Add( bLeftSizer, 2, wxEXPAND, 5 );
wxBoxSizer* bPlotOptionsSizer; wxBoxSizer* bPlotOptionsSizer;
bPlotOptionsSizer = new wxBoxSizer( wxVERTICAL ); bPlotOptionsSizer = new wxBoxSizer( wxVERTICAL );
wxString m_Drill_Shape_OptChoices[] = { _("No drill mark"), _("Small mark"), _("Real drill") }; wxString m_drillShapeOptChoices[] = { _("No drill mark"), _("Small mark"), _("Actual hole") };
int m_Drill_Shape_OptNChoices = sizeof( m_Drill_Shape_OptChoices ) / sizeof( wxString ); int m_drillShapeOptNChoices = sizeof( m_drillShapeOptChoices ) / sizeof( wxString );
m_Drill_Shape_Opt = new wxRadioBox( this, ID_DRILL_SHAPE_OPT, _("Pads Drill Opt"), wxDefaultPosition, wxDefaultSize, m_Drill_Shape_OptNChoices, m_Drill_Shape_OptChoices, 1, wxRA_SPECIFY_COLS ); m_drillShapeOpt = new wxRadioBox( this, wxID_ANY, _("Holes Options"), wxDefaultPosition, wxDefaultSize, m_drillShapeOptNChoices, m_drillShapeOptChoices, 1, wxRA_SPECIFY_COLS );
m_Drill_Shape_Opt->SetSelection( 1 ); m_drillShapeOpt->SetSelection( 2 );
bPlotOptionsSizer->Add( m_Drill_Shape_Opt, 0, wxALL|wxEXPAND, 5 ); bPlotOptionsSizer->Add( m_drillShapeOpt, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
wxString m_Scale_OptChoices[] = { _("Auto scale"), _("Scale 1"), _("Scale 1.5"), _("Scale 2"), _("Scale 3") }; wxString m_scaleOptChoices[] = { _("Auto scale"), _("Scale 1"), _("Scale 1.5"), _("Scale 2"), _("Scale 3") };
int m_Scale_OptNChoices = sizeof( m_Scale_OptChoices ) / sizeof( wxString ); int m_scaleOptNChoices = sizeof( m_scaleOptChoices ) / sizeof( wxString );
m_Scale_Opt = new wxRadioBox( this, wxID_ANY, _("Scale Opt"), wxDefaultPosition, wxDefaultSize, m_Scale_OptNChoices, m_Scale_OptChoices, 1, wxRA_SPECIFY_COLS ); m_scaleOpt = new wxRadioBox( this, wxID_ANY, _("Scale Opt"), wxDefaultPosition, wxDefaultSize, m_scaleOptNChoices, m_scaleOptChoices, 1, wxRA_SPECIFY_COLS );
m_Scale_Opt->SetSelection( 0 ); m_scaleOpt->SetSelection( 0 );
bPlotOptionsSizer->Add( m_Scale_Opt, 0, wxALL|wxEXPAND, 5 ); bPlotOptionsSizer->Add( m_scaleOpt, 0, wxEXPAND|wxALL, 5 );
wxString m_PlotModeOptChoices[] = { _("Line"), _("Filled"), _("Sketch") }; wxString m_plotModeOptChoices[] = { _("Line"), _("Filled"), _("Sketch") };
int m_PlotModeOptNChoices = sizeof( m_PlotModeOptChoices ) / sizeof( wxString ); int m_plotModeOptNChoices = sizeof( m_plotModeOptChoices ) / sizeof( wxString );
m_PlotModeOpt = new wxRadioBox( this, wxID_ANY, _("Plot Mode"), wxDefaultPosition, wxDefaultSize, m_PlotModeOptNChoices, m_PlotModeOptChoices, 1, wxRA_SPECIFY_COLS ); m_plotModeOpt = new wxRadioBox( this, wxID_ANY, _("Plot Mode"), wxDefaultPosition, wxDefaultSize, m_plotModeOptNChoices, m_plotModeOptChoices, 1, wxRA_SPECIFY_COLS );
m_PlotModeOpt->SetSelection( 0 ); m_plotModeOpt->SetSelection( 0 );
bPlotOptionsSizer->Add( m_PlotModeOpt, 0, wxALL|wxEXPAND, 5 ); bPlotOptionsSizer->Add( m_plotModeOpt, 0, wxALL|wxEXPAND, 5 );
wxString m_Choice_Plot_OffsetChoices[] = { _("Absolute"), _("Auxiliary axis") }; wxString m_choicePlotOffsetChoices[] = { _("Absolute"), _("Auxiliary axis") };
int m_Choice_Plot_OffsetNChoices = sizeof( m_Choice_Plot_OffsetChoices ) / sizeof( wxString ); int m_choicePlotOffsetNChoices = sizeof( m_choicePlotOffsetChoices ) / sizeof( wxString );
m_Choice_Plot_Offset = new wxRadioBox( this, wxID_ANY, _("Plot Origin"), wxDefaultPosition, wxDefaultSize, m_Choice_Plot_OffsetNChoices, m_Choice_Plot_OffsetChoices, 1, wxRA_SPECIFY_COLS ); m_choicePlotOffset = new wxRadioBox( this, wxID_ANY, _("Plot Origin"), wxDefaultPosition, wxDefaultSize, m_choicePlotOffsetNChoices, m_choicePlotOffsetChoices, 1, wxRA_SPECIFY_COLS );
m_Choice_Plot_Offset->SetSelection( 0 ); m_choicePlotOffset->SetSelection( 0 );
bPlotOptionsSizer->Add( m_Choice_Plot_Offset, 0, wxALL|wxEXPAND, 5 ); bPlotOptionsSizer->Add( m_choicePlotOffset, 0, wxALL|wxEXPAND, 5 );
bUpperSizer->Add( bPlotOptionsSizer, 1, 0, 5 ); bUpperSizer->Add( bPlotOptionsSizer, 0, wxEXPAND, 5 );
wxBoxSizer* bSizerFmtPlot; wxBoxSizer* bSizerFmtPlot;
bSizerFmtPlot = new wxBoxSizer( wxVERTICAL ); bSizerFmtPlot = new wxBoxSizer( wxVERTICAL );
wxString m_PlotFormatOptChoices[] = { _("HPGL"), _("Gerber"), _("Postscript"), _("Postscript A4"), _("DXF Export") }; wxString m_plotFormatOptChoices[] = { _("HPGL"), _("Gerber"), _("Postscript"), _("Postscript A4"), _("DXF export") };
int m_PlotFormatOptNChoices = sizeof( m_PlotFormatOptChoices ) / sizeof( wxString ); int m_plotFormatOptNChoices = sizeof( m_plotFormatOptChoices ) / sizeof( wxString );
m_PlotFormatOpt = new wxRadioBox( this, wxID_ANY, _("Plot Format"), wxDefaultPosition, wxDefaultSize, m_PlotFormatOptNChoices, m_PlotFormatOptChoices, 1, wxRA_SPECIFY_COLS ); m_plotFormatOpt = new wxRadioBox( this, wxID_ANY, _("Plot Format"), wxDefaultPosition, wxDefaultSize, m_plotFormatOptNChoices, m_plotFormatOptChoices, 1, wxRA_SPECIFY_COLS );
m_PlotFormatOpt->SetSelection( 1 ); m_plotFormatOpt->SetSelection( 4 );
bSizerFmtPlot->Add( m_PlotFormatOpt, 0, wxALL|wxEXPAND, 5 ); bSizerFmtPlot->Add( m_plotFormatOpt, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
wxStaticBoxSizer* m_HPGL_OptionsBox; wxStaticBoxSizer* m_HPGL_OptionsBox;
m_HPGL_OptionsBox = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("HPGL Options:") ), wxVERTICAL ); m_HPGL_OptionsBox = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("HPGL Options:") ), wxVERTICAL );
...@@ -142,39 +142,28 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr ...@@ -142,39 +142,28 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr
m_HPGL_OptionsBox->Add( m_HPGLPenOverlayOpt, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); m_HPGL_OptionsBox->Add( m_HPGLPenOverlayOpt, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
bSizerFmtPlot->Add( m_HPGL_OptionsBox, 1, wxEXPAND, 5 ); bSizerFmtPlot->Add( m_HPGL_OptionsBox, 0, wxEXPAND, 5 );
wxStaticBoxSizer* sbSizerPSOpt; bUpperSizer->Add( bSizerFmtPlot, 0, wxEXPAND, 5 );
sbSizerPSOpt = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("PS Options:") ), wxVERTICAL );
m_Plot_PS_Negative = new wxCheckBox( this, wxID_ANY, _("Plot negative"), wxDefaultPosition, wxDefaultSize, 0 ); wxBoxSizer* bButtonsSizer;
sbSizerPSOpt->Add( m_Plot_PS_Negative, 0, wxALL, 5 ); bButtonsSizer = new wxBoxSizer( wxVERTICAL );
bSizerFmtPlot->Add( sbSizerPSOpt, 0, wxEXPAND, 5 );
wxStaticBoxSizer* sbSizerOutputDir;
sbSizerOutputDir = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Output Directory:") ), wxVERTICAL );
m_OutputDirectory = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
sbSizerOutputDir->Add( m_OutputDirectory, 0, wxALIGN_LEFT|wxEXPAND, 5 );
m_BrowseButton = new wxButton( this, ID_BROWSE_OUTPUT_DIRECTORY, _("Browse..."), wxDefaultPosition, wxDefaultSize, 0 );
sbSizerOutputDir->Add( m_BrowseButton, 0, wxALL, 5 );
bSizerFmtPlot->Add( sbSizerOutputDir, 0, wxEXPAND, 5 ); wxStaticBoxSizer* sbSizerPlotOpt;
sbSizerPlotOpt = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Plot Options:") ), wxVERTICAL );
bUpperSizer->Add( bSizerFmtPlot, 1, wxEXPAND, 5 ); m_plotPSNegativeOpt = new wxCheckBox( this, wxID_ANY, _("Plot negative"), wxDefaultPosition, wxDefaultSize, 0 );
sbSizerPlotOpt->Add( m_plotPSNegativeOpt, 0, wxALL, 5 );
wxBoxSizer* bButtonsSizer; m_plotMirrorOpt = new wxCheckBox( this, ID_MIROR_OPT, _("Plot mirror"), wxDefaultPosition, wxDefaultSize, 0 );
bButtonsSizer = new wxBoxSizer( wxVERTICAL ); sbSizerPlotOpt->Add( m_plotMirrorOpt, 0, wxALL, 5 );
m_PlotMirorOpt = new wxCheckBox( this, ID_MIROR_OPT, _("Plot mirror"), wxDefaultPosition, wxDefaultSize, 0 ); m_plotNoViaOnMaskOpt = new wxCheckBox( this, wxID_ANY, _("Vias on mask"), wxDefaultPosition, wxDefaultSize, 0 );
bButtonsSizer->Add( m_PlotMirorOpt, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); m_plotNoViaOnMaskOpt->SetToolTip( _("Print/plot vias on mask layers. They are in this case not protected") );
m_PlotNoViaOnMaskOpt = new wxCheckBox( this, ID_MASKVIA_OPT, _("Vias on mask"), wxDefaultPosition, wxDefaultSize, 0 ); sbSizerPlotOpt->Add( m_plotNoViaOnMaskOpt, 0, wxALL, 5 );
m_PlotNoViaOnMaskOpt->SetToolTip( _("Print/plot vias on mask layers. They are in this case not protected") );
bButtonsSizer->Add( m_PlotNoViaOnMaskOpt, 0, wxALL, 5 ); bButtonsSizer->Add( sbSizerPlotOpt, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_staticText6 = new wxStaticText( this, wxID_ANY, _("Default pen size"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText6 = new wxStaticText( this, wxID_ANY, _("Default pen size"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText6->Wrap( -1 ); m_staticText6->Wrap( -1 );
...@@ -182,8 +171,8 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr ...@@ -182,8 +171,8 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr
bButtonsSizer->Add( m_staticText6, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); bButtonsSizer->Add( m_staticText6, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_LinesWidth = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); m_linesWidth = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
bButtonsSizer->Add( m_LinesWidth, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); bButtonsSizer->Add( m_linesWidth, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
bButtonsSizer->Add( 0, 20, 1, wxEXPAND, 5 ); bButtonsSizer->Add( 0, 20, 1, wxEXPAND, 5 );
...@@ -192,24 +181,24 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr ...@@ -192,24 +181,24 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr
m_staticText7->Wrap( -1 ); m_staticText7->Wrap( -1 );
bButtonsSizer->Add( m_staticText7, 0, wxRIGHT|wxLEFT, 5 ); bButtonsSizer->Add( m_staticText7, 0, wxRIGHT|wxLEFT, 5 );
m_FineAdjustXscaleOpt = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); m_fineAdjustXscaleOpt = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_FineAdjustXscaleOpt->SetToolTip( _("Set X scale adjust for exact scale plotting") ); m_fineAdjustXscaleOpt->SetToolTip( _("Set X scale adjust for exact scale plotting") );
bButtonsSizer->Add( m_FineAdjustXscaleOpt, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); bButtonsSizer->Add( m_fineAdjustXscaleOpt, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_staticText8 = new wxStaticText( this, wxID_ANY, _("Y scale adjust"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText8 = new wxStaticText( this, wxID_ANY, _("Y scale adjust"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText8->Wrap( -1 ); m_staticText8->Wrap( -1 );
bButtonsSizer->Add( m_staticText8, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); bButtonsSizer->Add( m_staticText8, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_FineAdjustYscaleOpt = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); m_fineAdjustYscaleOpt = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
bButtonsSizer->Add( m_FineAdjustYscaleOpt, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); bButtonsSizer->Add( m_fineAdjustYscaleOpt, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
bButtonsSizer->Add( 0, 20, 1, wxEXPAND, 5 ); bButtonsSizer->Add( 0, 20, 1, wxEXPAND, 5 );
m_PlotButton = new wxButton( this, ID_EXEC_PLOT, _("Plot"), wxDefaultPosition, wxDefaultSize, 0 ); m_plotButton = new wxButton( this, wxID_ANY, _("Plot"), wxDefaultPosition, wxDefaultSize, 0 );
m_PlotButton->SetDefault(); m_plotButton->SetDefault();
bButtonsSizer->Add( m_PlotButton, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); bButtonsSizer->Add( m_plotButton, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
m_buttonSaveOpt = new wxButton( this, ID_SAVE_OPT_PLOT, _("Save Options"), wxDefaultPosition, wxDefaultSize, 0 ); m_buttonSaveOpt = new wxButton( this, ID_SAVE_OPT_PLOT, _("Save Options"), wxDefaultPosition, wxDefaultSize, 0 );
bButtonsSizer->Add( m_buttonSaveOpt, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); bButtonsSizer->Add( m_buttonSaveOpt, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
...@@ -220,32 +209,51 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr ...@@ -220,32 +209,51 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr
m_buttonQuit = new wxButton( this, wxID_CANCEL, _("Quit"), wxDefaultPosition, wxDefaultSize, 0 ); m_buttonQuit = new wxButton( this, wxID_CANCEL, _("Quit"), wxDefaultPosition, wxDefaultSize, 0 );
bButtonsSizer->Add( m_buttonQuit, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); bButtonsSizer->Add( m_buttonQuit, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
bUpperSizer->Add( bButtonsSizer, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); bUpperSizer->Add( bButtonsSizer, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
bMainSizer->Add( bUpperSizer, 0, wxEXPAND, 5 ); bMainSizer->Add( bUpperSizer, 0, wxEXPAND, 5 );
wxBoxSizer* bSizerDirChoice;
bSizerDirChoice = new wxBoxSizer( wxVERTICAL );
m_staticTextDir = new wxStaticText( this, wxID_ANY, _("Output Directory:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextDir->Wrap( -1 );
bSizerDirChoice->Add( m_staticTextDir, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
wxBoxSizer* bSizerDirNmae;
bSizerDirNmae = new wxBoxSizer( wxHORIZONTAL );
m_outputDirectoryName = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
bSizerDirNmae->Add( m_outputDirectoryName, 1, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
m_browseButton = new wxButton( this, wxID_ANY, _("Browse..."), wxDefaultPosition, wxDefaultSize, 0 );
bSizerDirNmae->Add( m_browseButton, 0, wxRIGHT|wxLEFT, 5 );
bSizerDirChoice->Add( bSizerDirNmae, 0, wxRIGHT|wxEXPAND, 5 );
bMainSizer->Add( bSizerDirChoice, 0, wxEXPAND, 5 );
m_staticText2 = new wxStaticText( this, wxID_ANY, _("Messages:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText2 = new wxStaticText( this, wxID_ANY, _("Messages:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText2->Wrap( -1 ); m_staticText2->Wrap( -1 );
bMainSizer->Add( m_staticText2, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); bMainSizer->Add( m_staticText2, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_MessagesBox = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE ); m_messagesBox = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE );
m_MessagesBox->SetMinSize( wxSize( -1,120 ) ); m_messagesBox->SetMinSize( wxSize( -1,120 ) );
bMainSizer->Add( m_MessagesBox, 1, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); bMainSizer->Add( m_messagesBox, 1, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
this->SetSizer( bMainSizer ); this->SetSizer( bMainSizer );
this->Layout(); this->Layout();
bMainSizer->Fit( this );
// Connect Events // Connect Events
this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_PLOT_BASE::OnCloseWindow ) ); this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_PLOT_BASE::OnCloseWindow ) );
this->Connect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_PLOT_BASE::OnInitDialog ) ); this->Connect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_PLOT_BASE::OnInitDialog ) );
m_PlotFormatOpt->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_PLOT_BASE::SetPlotFormat ), NULL, this ); m_plotFormatOpt->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_PLOT_BASE::SetPlotFormat ), NULL, this );
m_BrowseButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::OnOutputDirectoryBrowseClicked ), NULL, this ); m_plotButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::Plot ), NULL, this );
m_PlotButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::Plot ), NULL, this ); m_buttonSaveOpt->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::savePlotOptions ), NULL, this );
m_buttonSaveOpt->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::SaveOptPlot ), NULL, this );
m_buttonDrill->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::CreateDrillFile ), NULL, this ); m_buttonDrill->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::CreateDrillFile ), NULL, this );
m_buttonQuit->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::OnQuit ), NULL, this ); m_buttonQuit->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::OnQuit ), NULL, this );
m_browseButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::OnOutputDirectoryBrowseClicked ), NULL, this );
} }
DIALOG_PLOT_BASE::~DIALOG_PLOT_BASE() DIALOG_PLOT_BASE::~DIALOG_PLOT_BASE()
...@@ -253,11 +261,11 @@ DIALOG_PLOT_BASE::~DIALOG_PLOT_BASE() ...@@ -253,11 +261,11 @@ DIALOG_PLOT_BASE::~DIALOG_PLOT_BASE()
// Disconnect Events // Disconnect Events
this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_PLOT_BASE::OnCloseWindow ) ); this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_PLOT_BASE::OnCloseWindow ) );
this->Disconnect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_PLOT_BASE::OnInitDialog ) ); this->Disconnect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_PLOT_BASE::OnInitDialog ) );
m_PlotFormatOpt->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_PLOT_BASE::SetPlotFormat ), NULL, this ); m_plotFormatOpt->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_PLOT_BASE::SetPlotFormat ), NULL, this );
m_BrowseButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::OnOutputDirectoryBrowseClicked ), NULL, this ); m_plotButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::Plot ), NULL, this );
m_PlotButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::Plot ), NULL, this ); m_buttonSaveOpt->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::savePlotOptions ), NULL, this );
m_buttonSaveOpt->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::SaveOptPlot ), NULL, this );
m_buttonDrill->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::CreateDrillFile ), NULL, this ); m_buttonDrill->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::CreateDrillFile ), NULL, this );
m_buttonQuit->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::OnQuit ), NULL, this ); m_buttonQuit->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::OnQuit ), NULL, this );
m_browseButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::OnOutputDirectoryBrowseClicked ), NULL, this );
} }
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
<property name="minimum_size">-1,350</property> <property name="minimum_size">-1,350</property>
<property name="name">DIALOG_PLOT_BASE</property> <property name="name">DIALOG_PLOT_BASE</property>
<property name="pos"></property> <property name="pos"></property>
<property name="size">-1,-1</property> <property name="size">571,616</property>
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property> <property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
<property name="subclass"></property> <property name="subclass"></property>
<property name="title">Plot</property> <property name="title">Plot</property>
...@@ -97,7 +97,7 @@ ...@@ -97,7 +97,7 @@
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxEXPAND</property> <property name="flag">wxEXPAND</property>
<property name="proportion">2</property> <property name="proportion">2</property>
<object class="wxBoxSizer" expanded="0"> <object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">bLeftSizer</property> <property name="name">bLeftSizer</property>
<property name="orient">wxVERTICAL</property> <property name="orient">wxVERTICAL</property>
...@@ -157,11 +157,11 @@ ...@@ -157,11 +157,11 @@
<property name="fg"></property> <property name="fg"></property>
<property name="font"></property> <property name="font"></property>
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">ID_USE_GERBER_EXTENSIONS</property> <property name="id">wxID_ANY</property>
<property name="label">Use Proper Gerber Extensions</property> <property name="label">Use proper Gerber extensions</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">m_Use_Gerber_Extensions</property> <property name="name">m_useGerberExtensions</property>
<property name="permission">protected</property> <property name="permission">protected</property>
<property name="pos"></property> <property name="pos"></property>
<property name="size"></property> <property name="size"></property>
...@@ -218,7 +218,7 @@ ...@@ -218,7 +218,7 @@
<property name="label">Exclude pcb edge layer</property> <property name="label">Exclude pcb edge layer</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">m_Exclude_Edges_Pcb</property> <property name="name">m_excludeEdgeLayerOpt</property>
<property name="permission">protected</property> <property name="permission">protected</property>
<property name="pos"></property> <property name="pos"></property>
<property name="size"></property> <property name="size"></property>
...@@ -258,11 +258,11 @@ ...@@ -258,11 +258,11 @@
<event name="OnUpdateUI"></event> <event name="OnUpdateUI"></event>
</object> </object>
</object> </object>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="0">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxTOP|wxRIGHT|wxLEFT</property> <property name="flag">wxTOP|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxCheckBox" expanded="1"> <object class="wxCheckBox" expanded="0">
<property name="bg"></property> <property name="bg"></property>
<property name="checked">0</property> <property name="checked">0</property>
<property name="context_help"></property> <property name="context_help"></property>
...@@ -272,10 +272,10 @@ ...@@ -272,10 +272,10 @@
<property name="font"></property> <property name="font"></property>
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="label">Subtract Mask from Silk</property> <property name="label">Subtract mask from silk</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">m_SubtractMaskFromSilk</property> <property name="name">m_subtractMaskFromSilk</property>
<property name="permission">protected</property> <property name="permission">protected</property>
<property name="pos"></property> <property name="pos"></property>
<property name="size"></property> <property name="size"></property>
...@@ -329,10 +329,10 @@ ...@@ -329,10 +329,10 @@
<property name="font"></property> <property name="font"></property>
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="label">Print sheet reference</property> <property name="label">Plot sheet reference</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">m_Plot_Sheet_Ref</property> <property name="name">m_plotSheetRef</property>
<property name="permission">protected</property> <property name="permission">protected</property>
<property name="pos"></property> <property name="pos"></property>
<property name="size"></property> <property name="size"></property>
...@@ -386,10 +386,10 @@ ...@@ -386,10 +386,10 @@
<property name="font"></property> <property name="font"></property>
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">ID_ALLOW_PRINT_PAD_ON_SILKSCREEN</property> <property name="id">ID_ALLOW_PRINT_PAD_ON_SILKSCREEN</property>
<property name="label">Print pads on silkscreen</property> <property name="label">Plot pads on silkscreen</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">m_Plot_Pads_on_Silkscreen</property> <property name="name">m_plotPads_on_Silkscreen</property>
<property name="permission">protected</property> <property name="permission">protected</property>
<property name="pos"></property> <property name="pos"></property>
<property name="size"></property> <property name="size"></property>
...@@ -442,11 +442,11 @@ ...@@ -442,11 +442,11 @@
<property name="fg"></property> <property name="fg"></property>
<property name="font"></property> <property name="font"></property>
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">ID_PRINT_VALUE</property> <property name="id">wxID_ANY</property>
<property name="label">Print module value</property> <property name="label">Plot module value</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">m_Plot_Text_Value</property> <property name="name">m_plotModuleValueOpt</property>
<property name="permission">protected</property> <property name="permission">protected</property>
<property name="pos"></property> <property name="pos"></property>
<property name="size"></property> <property name="size"></property>
...@@ -500,10 +500,10 @@ ...@@ -500,10 +500,10 @@
<property name="font"></property> <property name="font"></property>
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">ID_PRINT_REF</property> <property name="id">ID_PRINT_REF</property>
<property name="label">Print module reference</property> <property name="label">Plot module reference</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">m_Plot_Text_Ref</property> <property name="name">m_plotModuleRefOpt</property>
<property name="permission">protected</property> <property name="permission">protected</property>
<property name="pos"></property> <property name="pos"></property>
<property name="size"></property> <property name="size"></property>
...@@ -556,11 +556,11 @@ ...@@ -556,11 +556,11 @@
<property name="fg"></property> <property name="fg"></property>
<property name="font"></property> <property name="font"></property>
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">ID_PRINT_MODULE_TEXTS</property> <property name="id">wxID_ANY</property>
<property name="label">Print other module texts</property> <property name="label">Plot other module texts</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">m_Plot_Text_Div</property> <property name="name">m_plotTextOther</property>
<property name="permission">protected</property> <property name="permission">protected</property>
<property name="pos"></property> <property name="pos"></property>
<property name="size"></property> <property name="size"></property>
...@@ -613,11 +613,11 @@ ...@@ -613,11 +613,11 @@
<property name="fg"></property> <property name="fg"></property>
<property name="font"></property> <property name="font"></property>
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">ID_FORCE_PRINT_INVISIBLE_TEXT</property> <property name="id">wxID_ANY</property>
<property name="label">Force print invisible texts</property> <property name="label">Force plot invisible texts</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">m_Plot_Invisible_Text</property> <property name="name">m_plotInvisibleText</property>
<property name="permission">protected</property> <property name="permission">protected</property>
<property name="pos"></property> <property name="pos"></property>
<property name="size"></property> <property name="size"></property>
...@@ -661,35 +661,35 @@ ...@@ -661,35 +661,35 @@
</object> </object>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag"></property> <property name="flag">wxEXPAND</property>
<property name="proportion">1</property> <property name="proportion">0</property>
<object class="wxBoxSizer" expanded="0"> <object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">bPlotOptionsSizer</property> <property name="name">bPlotOptionsSizer</property>
<property name="orient">wxVERTICAL</property> <property name="orient">wxVERTICAL</property>
<property name="permission">none</property> <property name="permission">none</property>
<object class="sizeritem" expanded="0"> <object class="sizeritem" expanded="0">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property> <property name="flag">wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxRadioBox" expanded="0"> <object class="wxRadioBox" expanded="0">
<property name="bg"></property> <property name="bg"></property>
<property name="choices">&quot;No drill mark&quot; &quot;Small mark&quot; &quot;Real drill&quot;</property> <property name="choices">&quot;No drill mark&quot; &quot;Small mark&quot; &quot;Actual hole&quot;</property>
<property name="context_help"></property> <property name="context_help"></property>
<property name="context_menu">1</property> <property name="context_menu">1</property>
<property name="enabled">1</property> <property name="enabled">1</property>
<property name="fg"></property> <property name="fg"></property>
<property name="font"></property> <property name="font"></property>
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">ID_DRILL_SHAPE_OPT</property> <property name="id">wxID_ANY</property>
<property name="label">Pads Drill Opt</property> <property name="label">Holes Options</property>
<property name="majorDimension">1</property> <property name="majorDimension">1</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">m_Drill_Shape_Opt</property> <property name="name">m_drillShapeOpt</property>
<property name="permission">protected</property> <property name="permission">protected</property>
<property name="pos"></property> <property name="pos"></property>
<property name="selection">1</property> <property name="selection">2</property>
<property name="size"></property> <property name="size"></property>
<property name="style">wxRA_SPECIFY_COLS</property> <property name="style">wxRA_SPECIFY_COLS</property>
<property name="subclass"></property> <property name="subclass"></property>
...@@ -729,7 +729,7 @@ ...@@ -729,7 +729,7 @@
</object> </object>
<object class="sizeritem" expanded="0"> <object class="sizeritem" expanded="0">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property> <property name="flag">wxEXPAND|wxALL</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxRadioBox" expanded="0"> <object class="wxRadioBox" expanded="0">
<property name="bg"></property> <property name="bg"></property>
...@@ -745,7 +745,7 @@ ...@@ -745,7 +745,7 @@
<property name="majorDimension">1</property> <property name="majorDimension">1</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">m_Scale_Opt</property> <property name="name">m_scaleOpt</property>
<property name="permission">protected</property> <property name="permission">protected</property>
<property name="pos"></property> <property name="pos"></property>
<property name="selection">0</property> <property name="selection">0</property>
...@@ -804,7 +804,7 @@ ...@@ -804,7 +804,7 @@
<property name="majorDimension">1</property> <property name="majorDimension">1</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">m_PlotModeOpt</property> <property name="name">m_plotModeOpt</property>
<property name="permission">protected</property> <property name="permission">protected</property>
<property name="pos"></property> <property name="pos"></property>
<property name="selection">0</property> <property name="selection">0</property>
...@@ -863,7 +863,7 @@ ...@@ -863,7 +863,7 @@
<property name="majorDimension">1</property> <property name="majorDimension">1</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">m_Choice_Plot_Offset</property> <property name="name">m_choicePlotOffset</property>
<property name="permission">protected</property> <property name="permission">protected</property>
<property name="pos"></property> <property name="pos"></property>
<property name="selection">0</property> <property name="selection">0</property>
...@@ -909,7 +909,7 @@ ...@@ -909,7 +909,7 @@
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxEXPAND</property> <property name="flag">wxEXPAND</property>
<property name="proportion">1</property> <property name="proportion">0</property>
<object class="wxBoxSizer" expanded="1"> <object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">bSizerFmtPlot</property> <property name="name">bSizerFmtPlot</property>
...@@ -917,11 +917,11 @@ ...@@ -917,11 +917,11 @@
<property name="permission">none</property> <property name="permission">none</property>
<object class="sizeritem" expanded="0"> <object class="sizeritem" expanded="0">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property> <property name="flag">wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxRadioBox" expanded="0"> <object class="wxRadioBox" expanded="0">
<property name="bg"></property> <property name="bg"></property>
<property name="choices">&quot;HPGL&quot; &quot;Gerber&quot; &quot;Postscript&quot; &quot;Postscript A4&quot; &quot;DXF Export&quot;</property> <property name="choices">&quot;HPGL&quot; &quot;Gerber&quot; &quot;Postscript&quot; &quot;Postscript A4&quot; &quot;DXF export&quot;</property>
<property name="context_help"></property> <property name="context_help"></property>
<property name="context_menu">1</property> <property name="context_menu">1</property>
<property name="enabled">1</property> <property name="enabled">1</property>
...@@ -933,10 +933,10 @@ ...@@ -933,10 +933,10 @@
<property name="majorDimension">1</property> <property name="majorDimension">1</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">m_PlotFormatOpt</property> <property name="name">m_plotFormatOpt</property>
<property name="permission">protected</property> <property name="permission">protected</property>
<property name="pos"></property> <property name="pos"></property>
<property name="selection">1</property> <property name="selection">4</property>
<property name="size"></property> <property name="size"></property>
<property name="style">wxRA_SPECIFY_COLS</property> <property name="style">wxRA_SPECIFY_COLS</property>
<property name="subclass"></property> <property name="subclass"></property>
...@@ -974,10 +974,10 @@ ...@@ -974,10 +974,10 @@
<event name="OnUpdateUI"></event> <event name="OnUpdateUI"></event>
</object> </object>
</object> </object>
<object class="sizeritem" expanded="0"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxEXPAND</property> <property name="flag">wxEXPAND</property>
<property name="proportion">1</property> <property name="proportion">0</property>
<object class="wxStaticBoxSizer" expanded="0"> <object class="wxStaticBoxSizer" expanded="0">
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="label">HPGL Options:</property> <property name="label">HPGL Options:</property>
...@@ -1336,15 +1336,26 @@ ...@@ -1336,15 +1336,26 @@
</object> </object>
</object> </object>
</object> </object>
<object class="sizeritem" expanded="0"> </object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|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="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxEXPAND</property> <property name="flag">wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxStaticBoxSizer" expanded="0"> <object class="wxStaticBoxSizer" expanded="0">
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="label">PS Options:</property> <property name="label">Plot Options:</property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">sbSizerPSOpt</property> <property name="name">sbSizerPlotOpt</property>
<property name="orient">wxVERTICAL</property> <property name="orient">wxVERTICAL</property>
<property name="permission">none</property> <property name="permission">none</property>
<event name="OnUpdateUI"></event> <event name="OnUpdateUI"></event>
...@@ -1365,7 +1376,7 @@ ...@@ -1365,7 +1376,7 @@
<property name="label">Plot negative</property> <property name="label">Plot negative</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">m_Plot_PS_Negative</property> <property name="name">m_plotPSNegativeOpt</property>
<property name="permission">protected</property> <property name="permission">protected</property>
<property name="pos"></property> <property name="pos"></property>
<property name="size"></property> <property name="size"></property>
...@@ -1405,37 +1416,24 @@ ...@@ -1405,37 +1416,24 @@
<event name="OnUpdateUI"></event> <event name="OnUpdateUI"></event>
</object> </object>
</object> </object>
</object>
</object>
<object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxStaticBoxSizer" expanded="0">
<property name="id">wxID_ANY</property>
<property name="label">Output Directory:</property>
<property name="minimum_size"></property>
<property name="name">sbSizerOutputDir</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">none</property>
<event name="OnUpdateUI"></event>
<object class="sizeritem" expanded="0"> <object class="sizeritem" expanded="0">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALIGN_LEFT|wxEXPAND</property> <property name="flag">wxALL</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxTextCtrl" expanded="0"> <object class="wxCheckBox" expanded="0">
<property name="bg"></property> <property name="bg"></property>
<property name="checked">0</property>
<property name="context_help"></property> <property name="context_help"></property>
<property name="context_menu">1</property> <property name="context_menu">1</property>
<property name="enabled">1</property> <property name="enabled">1</property>
<property name="fg"></property> <property name="fg"></property>
<property name="font"></property> <property name="font"></property>
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_ANY</property> <property name="id">ID_MIROR_OPT</property>
<property name="label">Plot mirror</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
<property name="maxlength">0</property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">m_OutputDirectory</property> <property name="name">m_plotMirrorOpt</property>
<property name="permission">protected</property> <property name="permission">protected</property>
<property name="pos"></property> <property name="pos"></property>
<property name="size"></property> <property name="size"></property>
...@@ -1446,11 +1444,11 @@ ...@@ -1446,11 +1444,11 @@
<property name="validator_style">wxFILTER_NONE</property> <property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property> <property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property> <property name="validator_variable"></property>
<property name="value"></property>
<property name="window_extra_style"></property> <property name="window_extra_style"></property>
<property name="window_name"></property> <property name="window_name"></property>
<property name="window_style"></property> <property name="window_style"></property>
<event name="OnChar"></event> <event name="OnChar"></event>
<event name="OnCheckBox"></event>
<event name="OnEnterWindow"></event> <event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event> <event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event> <event name="OnKeyDown"></event>
...@@ -1472,10 +1470,6 @@ ...@@ -1472,10 +1470,6 @@
<event name="OnRightUp"></event> <event name="OnRightUp"></event>
<event name="OnSetFocus"></event> <event name="OnSetFocus"></event>
<event name="OnSize"></event> <event name="OnSize"></event>
<event name="OnText"></event>
<event name="OnTextEnter"></event>
<event name="OnTextMaxLen"></event>
<event name="OnTextURL"></event>
<event name="OnUpdateUI"></event> <event name="OnUpdateUI"></event>
</object> </object>
</object> </object>
...@@ -1483,26 +1477,26 @@ ...@@ -1483,26 +1477,26 @@
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALL</property> <property name="flag">wxALL</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxButton" expanded="0"> <object class="wxCheckBox" expanded="0">
<property name="bg"></property> <property name="bg"></property>
<property name="checked">0</property>
<property name="context_help"></property> <property name="context_help"></property>
<property name="context_menu">1</property> <property name="context_menu">1</property>
<property name="default">0</property>
<property name="enabled">1</property> <property name="enabled">1</property>
<property name="fg"></property> <property name="fg"></property>
<property name="font"></property> <property name="font"></property>
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">ID_BROWSE_OUTPUT_DIRECTORY</property> <property name="id">wxID_ANY</property>
<property name="label">Browse...</property> <property name="label">Vias on mask</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">m_BrowseButton</property> <property name="name">m_plotNoViaOnMaskOpt</property>
<property name="permission">protected</property> <property name="permission">protected</property>
<property name="pos"></property> <property name="pos"></property>
<property name="size"></property> <property name="size"></property>
<property name="style"></property> <property name="style"></property>
<property name="subclass"></property> <property name="subclass"></property>
<property name="tooltip"></property> <property name="tooltip">Print/plot vias on mask layers. They are in this case not protected</property>
<property name="validator_data_type"></property> <property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property> <property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property> <property name="validator_type">wxDefaultValidator</property>
...@@ -1510,8 +1504,8 @@ ...@@ -1510,8 +1504,8 @@
<property name="window_extra_style"></property> <property name="window_extra_style"></property>
<property name="window_name"></property> <property name="window_name"></property>
<property name="window_style"></property> <property name="window_style"></property>
<event name="OnButtonClick">OnOutputDirectoryBrowseClicked</event>
<event name="OnChar"></event> <event name="OnChar"></event>
<event name="OnCheckBox"></event>
<event name="OnEnterWindow"></event> <event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event> <event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event> <event name="OnKeyDown"></event>
...@@ -1538,41 +1532,29 @@ ...@@ -1538,41 +1532,29 @@
</object> </object>
</object> </object>
</object> </object>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxEXPAND</property>
<property name="proportion">1</property>
<object class="wxBoxSizer" expanded="0">
<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"> <object class="sizeritem" expanded="0">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxTOP|wxRIGHT|wxLEFT</property> <property name="flag">wxTOP|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxCheckBox" expanded="0"> <object class="wxStaticText" expanded="0">
<property name="bg"></property> <property name="bg"></property>
<property name="checked">0</property>
<property name="context_help"></property> <property name="context_help"></property>
<property name="context_menu">1</property> <property name="context_menu">1</property>
<property name="enabled">1</property> <property name="enabled">1</property>
<property name="fg"></property> <property name="fg"></property>
<property name="font"></property> <property name="font"></property>
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">ID_MIROR_OPT</property> <property name="id">wxID_ANY</property>
<property name="label">Plot mirror</property> <property name="label">Default pen size</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">m_PlotMirorOpt</property> <property name="name">m_staticText6</property>
<property name="permission">protected</property> <property name="permission">protected</property>
<property name="pos"></property> <property name="pos"></property>
<property name="size"></property> <property name="size"></property>
<property name="style"></property> <property name="style"></property>
<property name="subclass"></property> <property name="subclass"></property>
<property name="tooltip"></property> <property name="tooltip">Pen size used to draw items that have no pen size specified.&#x0A;Used mainly to draw items in sketch mode.</property>
<property name="validator_data_type"></property> <property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property> <property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property> <property name="validator_type">wxDefaultValidator</property>
...@@ -1580,8 +1562,8 @@ ...@@ -1580,8 +1562,8 @@
<property name="window_extra_style"></property> <property name="window_extra_style"></property>
<property name="window_name"></property> <property name="window_name"></property>
<property name="window_style"></property> <property name="window_style"></property>
<property name="wrap">-1</property>
<event name="OnChar"></event> <event name="OnChar"></event>
<event name="OnCheckBox"></event>
<event name="OnEnterWindow"></event> <event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event> <event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event> <event name="OnKeyDown"></event>
...@@ -1608,37 +1590,36 @@ ...@@ -1608,37 +1590,36 @@
</object> </object>
<object class="sizeritem" expanded="0"> <object class="sizeritem" expanded="0">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALL</property> <property name="flag">wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxCheckBox" expanded="0"> <object class="wxTextCtrl" expanded="0">
<property name="bg"></property> <property name="bg"></property>
<property name="checked">0</property>
<property name="context_help"></property> <property name="context_help"></property>
<property name="context_menu">1</property> <property name="context_menu">1</property>
<property name="enabled">1</property> <property name="enabled">1</property>
<property name="fg"></property> <property name="fg"></property>
<property name="font"></property> <property name="font"></property>
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">ID_MASKVIA_OPT</property> <property name="id">wxID_ANY</property>
<property name="label">Vias on mask</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
<property name="maxlength">0</property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">m_PlotNoViaOnMaskOpt</property> <property name="name">m_linesWidth</property>
<property name="permission">protected</property> <property name="permission">protected</property>
<property name="pos"></property> <property name="pos"></property>
<property name="size"></property> <property name="size"></property>
<property name="style"></property> <property name="style"></property>
<property name="subclass"></property> <property name="subclass"></property>
<property name="tooltip">Print/plot vias on mask layers. They are in this case not protected</property> <property name="tooltip"></property>
<property name="validator_data_type"></property> <property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property> <property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property> <property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property> <property name="validator_variable"></property>
<property name="value"></property>
<property name="window_extra_style"></property> <property name="window_extra_style"></property>
<property name="window_name"></property> <property name="window_name"></property>
<property name="window_style"></property> <property name="window_style"></property>
<event name="OnChar"></event> <event name="OnChar"></event>
<event name="OnCheckBox"></event>
<event name="OnEnterWindow"></event> <event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event> <event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event> <event name="OnKeyDown"></event>
...@@ -1660,12 +1641,26 @@ ...@@ -1660,12 +1641,26 @@
<event name="OnRightUp"></event> <event name="OnRightUp"></event>
<event name="OnSetFocus"></event> <event name="OnSetFocus"></event>
<event name="OnSize"></event> <event name="OnSize"></event>
<event name="OnText"></event>
<event name="OnTextEnter"></event>
<event name="OnTextMaxLen"></event>
<event name="OnTextURL"></event>
<event name="OnUpdateUI"></event> <event name="OnUpdateUI"></event>
</object> </object>
</object> </object>
<object class="sizeritem" expanded="0"> <object class="sizeritem" expanded="0">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxTOP|wxRIGHT|wxLEFT</property> <property name="flag">wxEXPAND</property>
<property name="proportion">1</property>
<object class="spacer" expanded="0">
<property name="height">20</property>
<property name="permission">protected</property>
<property name="width">0</property>
</object>
</object>
<object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxRIGHT|wxLEFT</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxStaticText" expanded="0"> <object class="wxStaticText" expanded="0">
<property name="bg"></property> <property name="bg"></property>
...@@ -1676,16 +1671,16 @@ ...@@ -1676,16 +1671,16 @@
<property name="font"></property> <property name="font"></property>
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="label">Default pen size</property> <property name="label">X scale adjust</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">m_staticText6</property> <property name="name">m_staticText7</property>
<property name="permission">protected</property> <property name="permission">protected</property>
<property name="pos"></property> <property name="pos"></property>
<property name="size"></property> <property name="size"></property>
<property name="style"></property> <property name="style"></property>
<property name="subclass"></property> <property name="subclass"></property>
<property name="tooltip">Pen size used to draw items that have no pen size specified.&#x0A;Used mainly to draw items in sketch mode.</property> <property name="tooltip"></property>
<property name="validator_data_type"></property> <property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property> <property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property> <property name="validator_type">wxDefaultValidator</property>
...@@ -1735,13 +1730,13 @@ ...@@ -1735,13 +1730,13 @@
<property name="maximum_size"></property> <property name="maximum_size"></property>
<property name="maxlength">0</property> <property name="maxlength">0</property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">m_LinesWidth</property> <property name="name">m_fineAdjustXscaleOpt</property>
<property name="permission">protected</property> <property name="permission">protected</property>
<property name="pos"></property> <property name="pos"></property>
<property name="size"></property> <property name="size"></property>
<property name="style"></property> <property name="style"></property>
<property name="subclass"></property> <property name="subclass"></property>
<property name="tooltip"></property> <property name="tooltip">Set X scale adjust for exact scale plotting</property>
<property name="validator_data_type"></property> <property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property> <property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property> <property name="validator_type">wxDefaultValidator</property>
...@@ -1781,17 +1776,7 @@ ...@@ -1781,17 +1776,7 @@
</object> </object>
<object class="sizeritem" expanded="0"> <object class="sizeritem" expanded="0">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxEXPAND</property> <property name="flag">wxTOP|wxRIGHT|wxLEFT</property>
<property name="proportion">1</property>
<object class="spacer" expanded="0">
<property name="height">20</property>
<property name="permission">protected</property>
<property name="width">0</property>
</object>
</object>
<object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxRIGHT|wxLEFT</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxStaticText" expanded="0"> <object class="wxStaticText" expanded="0">
<property name="bg"></property> <property name="bg"></property>
...@@ -1802,10 +1787,10 @@ ...@@ -1802,10 +1787,10 @@
<property name="font"></property> <property name="font"></property>
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="label">X scale adjust</property> <property name="label">Y scale adjust</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">m_staticText7</property> <property name="name">m_staticText8</property>
<property name="permission">protected</property> <property name="permission">protected</property>
<property name="pos"></property> <property name="pos"></property>
<property name="size"></property> <property name="size"></property>
...@@ -1861,13 +1846,13 @@ ...@@ -1861,13 +1846,13 @@
<property name="maximum_size"></property> <property name="maximum_size"></property>
<property name="maxlength">0</property> <property name="maxlength">0</property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">m_FineAdjustXscaleOpt</property> <property name="name">m_fineAdjustYscaleOpt</property>
<property name="permission">protected</property> <property name="permission">protected</property>
<property name="pos"></property> <property name="pos"></property>
<property name="size"></property> <property name="size"></property>
<property name="style"></property> <property name="style"></property>
<property name="subclass"></property> <property name="subclass"></property>
<property name="tooltip">Set X scale adjust for exact scale plotting</property> <property name="tooltip"></property>
<property name="validator_data_type"></property> <property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property> <property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property> <property name="validator_type">wxDefaultValidator</property>
...@@ -1907,21 +1892,32 @@ ...@@ -1907,21 +1892,32 @@
</object> </object>
<object class="sizeritem" expanded="0"> <object class="sizeritem" expanded="0">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxTOP|wxRIGHT|wxLEFT</property> <property name="flag">wxEXPAND</property>
<property name="proportion">1</property>
<object class="spacer" expanded="0">
<property name="height">20</property>
<property name="permission">protected</property>
<property name="width">0</property>
</object>
</object>
<object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxStaticText" expanded="0"> <object class="wxButton" expanded="0">
<property name="bg"></property> <property name="bg"></property>
<property name="context_help"></property> <property name="context_help"></property>
<property name="context_menu">1</property> <property name="context_menu">1</property>
<property name="default">1</property>
<property name="enabled">1</property> <property name="enabled">1</property>
<property name="fg"></property> <property name="fg"></property>
<property name="font"></property> <property name="font"></property>
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="label">Y scale adjust</property> <property name="label">Plot</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">m_staticText8</property> <property name="name">m_plotButton</property>
<property name="permission">protected</property> <property name="permission">protected</property>
<property name="pos"></property> <property name="pos"></property>
<property name="size"></property> <property name="size"></property>
...@@ -1935,7 +1931,7 @@ ...@@ -1935,7 +1931,7 @@
<property name="window_extra_style"></property> <property name="window_extra_style"></property>
<property name="window_name"></property> <property name="window_name"></property>
<property name="window_style"></property> <property name="window_style"></property>
<property name="wrap">-1</property> <event name="OnButtonClick">Plot</event>
<event name="OnChar"></event> <event name="OnChar"></event>
<event name="OnEnterWindow"></event> <event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event> <event name="OnEraseBackground"></event>
...@@ -1963,21 +1959,22 @@ ...@@ -1963,21 +1959,22 @@
</object> </object>
<object class="sizeritem" expanded="0"> <object class="sizeritem" expanded="0">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT</property> <property name="flag">wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxTextCtrl" expanded="0"> <object class="wxButton" expanded="0">
<property name="bg"></property> <property name="bg"></property>
<property name="context_help"></property> <property name="context_help"></property>
<property name="context_menu">1</property> <property name="context_menu">1</property>
<property name="default">0</property>
<property name="enabled">1</property> <property name="enabled">1</property>
<property name="fg"></property> <property name="fg"></property>
<property name="font"></property> <property name="font"></property>
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_ANY</property> <property name="id">ID_SAVE_OPT_PLOT</property>
<property name="label">Save Options</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
<property name="maxlength">0</property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">m_FineAdjustYscaleOpt</property> <property name="name">m_buttonSaveOpt</property>
<property name="permission">protected</property> <property name="permission">protected</property>
<property name="pos"></property> <property name="pos"></property>
<property name="size"></property> <property name="size"></property>
...@@ -1988,10 +1985,10 @@ ...@@ -1988,10 +1985,10 @@
<property name="validator_style">wxFILTER_NONE</property> <property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property> <property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property> <property name="validator_variable"></property>
<property name="value"></property>
<property name="window_extra_style"></property> <property name="window_extra_style"></property>
<property name="window_name"></property> <property name="window_name"></property>
<property name="window_style"></property> <property name="window_style"></property>
<event name="OnButtonClick">savePlotOptions</event>
<event name="OnChar"></event> <event name="OnChar"></event>
<event name="OnEnterWindow"></event> <event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event> <event name="OnEraseBackground"></event>
...@@ -2014,23 +2011,9 @@ ...@@ -2014,23 +2011,9 @@
<event name="OnRightUp"></event> <event name="OnRightUp"></event>
<event name="OnSetFocus"></event> <event name="OnSetFocus"></event>
<event name="OnSize"></event> <event name="OnSize"></event>
<event name="OnText"></event>
<event name="OnTextEnter"></event>
<event name="OnTextMaxLen"></event>
<event name="OnTextURL"></event>
<event name="OnUpdateUI"></event> <event name="OnUpdateUI"></event>
</object> </object>
</object> </object>
<object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">1</property>
<object class="spacer" expanded="0">
<property name="height">20</property>
<property name="permission">protected</property>
<property name="width">0</property>
</object>
</object>
<object class="sizeritem" expanded="0"> <object class="sizeritem" expanded="0">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND</property> <property name="flag">wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND</property>
...@@ -2039,16 +2022,16 @@ ...@@ -2039,16 +2022,16 @@
<property name="bg"></property> <property name="bg"></property>
<property name="context_help"></property> <property name="context_help"></property>
<property name="context_menu">1</property> <property name="context_menu">1</property>
<property name="default">1</property> <property name="default">0</property>
<property name="enabled">1</property> <property name="enabled">1</property>
<property name="fg"></property> <property name="fg"></property>
<property name="font"></property> <property name="font"></property>
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">ID_EXEC_PLOT</property> <property name="id">ID_CREATE_DRILL_FILE</property>
<property name="label">Plot</property> <property name="label">Generate drill file</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">m_PlotButton</property> <property name="name">m_buttonDrill</property>
<property name="permission">protected</property> <property name="permission">protected</property>
<property name="pos"></property> <property name="pos"></property>
<property name="size"></property> <property name="size"></property>
...@@ -2062,7 +2045,7 @@ ...@@ -2062,7 +2045,7 @@
<property name="window_extra_style"></property> <property name="window_extra_style"></property>
<property name="window_name"></property> <property name="window_name"></property>
<property name="window_style"></property> <property name="window_style"></property>
<event name="OnButtonClick">Plot</event> <event name="OnButtonClick">CreateDrillFile</event>
<event name="OnChar"></event> <event name="OnChar"></event>
<event name="OnEnterWindow"></event> <event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event> <event name="OnEraseBackground"></event>
...@@ -2101,11 +2084,11 @@ ...@@ -2101,11 +2084,11 @@
<property name="fg"></property> <property name="fg"></property>
<property name="font"></property> <property name="font"></property>
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">ID_SAVE_OPT_PLOT</property> <property name="id">wxID_CANCEL</property>
<property name="label">Save Options</property> <property name="label">Quit</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">m_buttonSaveOpt</property> <property name="name">m_buttonQuit</property>
<property name="permission">protected</property> <property name="permission">protected</property>
<property name="pos"></property> <property name="pos"></property>
<property name="size"></property> <property name="size"></property>
...@@ -2119,7 +2102,7 @@ ...@@ -2119,7 +2102,7 @@
<property name="window_extra_style"></property> <property name="window_extra_style"></property>
<property name="window_name"></property> <property name="window_name"></property>
<property name="window_style"></property> <property name="window_style"></property>
<event name="OnButtonClick">SaveOptPlot</event> <event name="OnButtonClick">OnQuit</event>
<event name="OnChar"></event> <event name="OnChar"></event>
<event name="OnEnterWindow"></event> <event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event> <event name="OnEraseBackground"></event>
...@@ -2145,24 +2128,101 @@ ...@@ -2145,24 +2128,101 @@
<event name="OnUpdateUI"></event> <event name="OnUpdateUI"></event>
</object> </object>
</object> </object>
</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">bSizerDirChoice</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxTOP|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxStaticText" expanded="1">
<property name="bg"></property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Output Directory:</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">m_staticTextDir</property>
<property name="permission">protected</property>
<property name="pos"></property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></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>
<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 class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxRIGHT|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property>
<property name="name">bSizerDirNmae</property>
<property name="orient">wxHORIZONTAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="0"> <object class="sizeritem" expanded="0">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND</property> <property name="flag">wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property> <property name="proportion">1</property>
<object class="wxButton" expanded="0"> <object class="wxTextCtrl" expanded="0">
<property name="bg"></property> <property name="bg"></property>
<property name="context_help"></property> <property name="context_help"></property>
<property name="context_menu">1</property> <property name="context_menu">1</property>
<property name="default">0</property>
<property name="enabled">1</property> <property name="enabled">1</property>
<property name="fg"></property> <property name="fg"></property>
<property name="font"></property> <property name="font"></property>
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">ID_CREATE_DRILL_FILE</property> <property name="id">wxID_ANY</property>
<property name="label">Generate drill file</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
<property name="maxlength">0</property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">m_buttonDrill</property> <property name="name">m_outputDirectoryName</property>
<property name="permission">protected</property> <property name="permission">protected</property>
<property name="pos"></property> <property name="pos"></property>
<property name="size"></property> <property name="size"></property>
...@@ -2173,10 +2233,10 @@ ...@@ -2173,10 +2233,10 @@
<property name="validator_style">wxFILTER_NONE</property> <property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property> <property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property> <property name="validator_variable"></property>
<property name="value"></property>
<property name="window_extra_style"></property> <property name="window_extra_style"></property>
<property name="window_name"></property> <property name="window_name"></property>
<property name="window_style"></property> <property name="window_style"></property>
<event name="OnButtonClick">CreateDrillFile</event>
<event name="OnChar"></event> <event name="OnChar"></event>
<event name="OnEnterWindow"></event> <event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event> <event name="OnEraseBackground"></event>
...@@ -2199,12 +2259,16 @@ ...@@ -2199,12 +2259,16 @@
<event name="OnRightUp"></event> <event name="OnRightUp"></event>
<event name="OnSetFocus"></event> <event name="OnSetFocus"></event>
<event name="OnSize"></event> <event name="OnSize"></event>
<event name="OnText"></event>
<event name="OnTextEnter"></event>
<event name="OnTextMaxLen"></event>
<event name="OnTextURL"></event>
<event name="OnUpdateUI"></event> <event name="OnUpdateUI"></event>
</object> </object>
</object> </object>
<object class="sizeritem" expanded="0"> <object class="sizeritem" expanded="0">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND</property> <property name="flag">wxRIGHT|wxLEFT</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxButton" expanded="0"> <object class="wxButton" expanded="0">
<property name="bg"></property> <property name="bg"></property>
...@@ -2215,11 +2279,11 @@ ...@@ -2215,11 +2279,11 @@
<property name="fg"></property> <property name="fg"></property>
<property name="font"></property> <property name="font"></property>
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_CANCEL</property> <property name="id">wxID_ANY</property>
<property name="label">Quit</property> <property name="label">Browse...</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">m_buttonQuit</property> <property name="name">m_browseButton</property>
<property name="permission">protected</property> <property name="permission">protected</property>
<property name="pos"></property> <property name="pos"></property>
<property name="size"></property> <property name="size"></property>
...@@ -2233,7 +2297,7 @@ ...@@ -2233,7 +2297,7 @@
<property name="window_extra_style"></property> <property name="window_extra_style"></property>
<property name="window_name"></property> <property name="window_name"></property>
<property name="window_style"></property> <property name="window_style"></property>
<event name="OnButtonClick">OnQuit</event> <event name="OnButtonClick">OnOutputDirectoryBrowseClicked</event>
<event name="OnChar"></event> <event name="OnChar"></event>
<event name="OnEnterWindow"></event> <event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event> <event name="OnEraseBackground"></event>
...@@ -2263,11 +2327,11 @@ ...@@ -2263,11 +2327,11 @@
</object> </object>
</object> </object>
</object> </object>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="0">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxTOP|wxRIGHT|wxLEFT</property> <property name="flag">wxTOP|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxStaticText" expanded="1"> <object class="wxStaticText" expanded="0">
<property name="bg"></property> <property name="bg"></property>
<property name="context_help"></property> <property name="context_help"></property>
<property name="context_menu">1</property> <property name="context_menu">1</property>
...@@ -2319,11 +2383,11 @@ ...@@ -2319,11 +2383,11 @@
<event name="OnUpdateUI"></event> <event name="OnUpdateUI"></event>
</object> </object>
</object> </object>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="0">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND</property> <property name="flag">wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND</property>
<property name="proportion">1</property> <property name="proportion">1</property>
<object class="wxTextCtrl" expanded="1"> <object class="wxTextCtrl" expanded="0">
<property name="bg"></property> <property name="bg"></property>
<property name="context_help"></property> <property name="context_help"></property>
<property name="context_menu">1</property> <property name="context_menu">1</property>
...@@ -2335,7 +2399,7 @@ ...@@ -2335,7 +2399,7 @@
<property name="maximum_size"></property> <property name="maximum_size"></property>
<property name="maxlength">0</property> <property name="maxlength">0</property>
<property name="minimum_size">-1,120</property> <property name="minimum_size">-1,120</property>
<property name="name">m_MessagesBox</property> <property name="name">m_messagesBox</property>
<property name="permission">protected</property> <property name="permission">protected</property>
<property name="pos"></property> <property name="pos"></property>
<property name="size"></property> <property name="size"></property>
......
...@@ -36,77 +36,70 @@ class DIALOG_PLOT_BASE : public wxDialog ...@@ -36,77 +36,70 @@ class DIALOG_PLOT_BASE : public wxDialog
protected: protected:
enum enum
{ {
ID_USE_GERBER_EXTENSIONS = 1000, ID_ALLOW_PRINT_PAD_ON_SILKSCREEN = 1000,
ID_ALLOW_PRINT_PAD_ON_SILKSCREEN,
ID_PRINT_VALUE,
ID_PRINT_REF, ID_PRINT_REF,
ID_PRINT_MODULE_TEXTS,
ID_FORCE_PRINT_INVISIBLE_TEXT,
ID_DRILL_SHAPE_OPT,
ID_BROWSE_OUTPUT_DIRECTORY,
ID_MIROR_OPT, ID_MIROR_OPT,
ID_MASKVIA_OPT,
ID_EXEC_PLOT,
ID_SAVE_OPT_PLOT, ID_SAVE_OPT_PLOT,
ID_CREATE_DRILL_FILE, ID_CREATE_DRILL_FILE,
}; };
wxStaticBoxSizer* m_CopperLayersBoxSizer; wxStaticBoxSizer* m_CopperLayersBoxSizer;
wxStaticBoxSizer* m_TechnicalLayersBoxSizer; wxStaticBoxSizer* m_TechnicalLayersBoxSizer;
wxCheckBox* m_Use_Gerber_Extensions; wxCheckBox* m_useGerberExtensions;
wxCheckBox* m_Exclude_Edges_Pcb; wxCheckBox* m_excludeEdgeLayerOpt;
wxCheckBox* m_SubtractMaskFromSilk; wxCheckBox* m_subtractMaskFromSilk;
wxCheckBox* m_Plot_Sheet_Ref; wxCheckBox* m_plotSheetRef;
wxCheckBox* m_Plot_Pads_on_Silkscreen; wxCheckBox* m_plotPads_on_Silkscreen;
wxCheckBox* m_Plot_Text_Value; wxCheckBox* m_plotModuleValueOpt;
wxCheckBox* m_Plot_Text_Ref; wxCheckBox* m_plotModuleRefOpt;
wxCheckBox* m_Plot_Text_Div; wxCheckBox* m_plotTextOther;
wxCheckBox* m_Plot_Invisible_Text; wxCheckBox* m_plotInvisibleText;
wxRadioBox* m_Drill_Shape_Opt; wxRadioBox* m_drillShapeOpt;
wxRadioBox* m_Scale_Opt; wxRadioBox* m_scaleOpt;
wxRadioBox* m_PlotModeOpt; wxRadioBox* m_plotModeOpt;
wxRadioBox* m_Choice_Plot_Offset; wxRadioBox* m_choicePlotOffset;
wxRadioBox* m_PlotFormatOpt; wxRadioBox* m_plotFormatOpt;
wxStaticText* m_textPenSize; wxStaticText* m_textPenSize;
wxTextCtrl* m_HPGLPenSizeOpt; wxTextCtrl* m_HPGLPenSizeOpt;
wxStaticText* m_staticText3; wxStaticText* m_staticText3;
wxTextCtrl* m_HPGLPenSpeedOpt; wxTextCtrl* m_HPGLPenSpeedOpt;
wxStaticText* m_textPenOvr; wxStaticText* m_textPenOvr;
wxTextCtrl* m_HPGLPenOverlayOpt; wxTextCtrl* m_HPGLPenOverlayOpt;
wxCheckBox* m_Plot_PS_Negative; wxCheckBox* m_plotPSNegativeOpt;
wxTextCtrl* m_OutputDirectory; wxCheckBox* m_plotMirrorOpt;
wxButton* m_BrowseButton; wxCheckBox* m_plotNoViaOnMaskOpt;
wxCheckBox* m_PlotMirorOpt;
wxCheckBox* m_PlotNoViaOnMaskOpt;
wxStaticText* m_staticText6; wxStaticText* m_staticText6;
wxTextCtrl* m_LinesWidth; wxTextCtrl* m_linesWidth;
wxStaticText* m_staticText7; wxStaticText* m_staticText7;
wxTextCtrl* m_FineAdjustXscaleOpt; wxTextCtrl* m_fineAdjustXscaleOpt;
wxStaticText* m_staticText8; wxStaticText* m_staticText8;
wxTextCtrl* m_FineAdjustYscaleOpt; wxTextCtrl* m_fineAdjustYscaleOpt;
wxButton* m_PlotButton; wxButton* m_plotButton;
wxButton* m_buttonSaveOpt; wxButton* m_buttonSaveOpt;
wxButton* m_buttonDrill; wxButton* m_buttonDrill;
wxButton* m_buttonQuit; wxButton* m_buttonQuit;
wxStaticText* m_staticTextDir;
wxTextCtrl* m_outputDirectoryName;
wxButton* m_browseButton;
wxStaticText* m_staticText2; wxStaticText* m_staticText2;
wxTextCtrl* m_MessagesBox; wxTextCtrl* m_messagesBox;
// Virtual event handlers, overide them in your derived class // Virtual event handlers, overide them in your derived class
virtual void OnCloseWindow( wxCloseEvent& event ) { event.Skip(); } virtual void OnCloseWindow( wxCloseEvent& event ) { event.Skip(); }
virtual void OnInitDialog( wxInitDialogEvent& event ) { event.Skip(); } virtual void OnInitDialog( wxInitDialogEvent& event ) { event.Skip(); }
virtual void SetPlotFormat( wxCommandEvent& event ) { event.Skip(); } virtual void SetPlotFormat( wxCommandEvent& event ) { event.Skip(); }
virtual void OnOutputDirectoryBrowseClicked( wxCommandEvent& event ) { event.Skip(); }
virtual void Plot( wxCommandEvent& event ) { event.Skip(); } virtual void Plot( wxCommandEvent& event ) { event.Skip(); }
virtual void SaveOptPlot( wxCommandEvent& event ) { event.Skip(); } virtual void savePlotOptions( wxCommandEvent& event ) { event.Skip(); }
virtual void CreateDrillFile( wxCommandEvent& event ) { event.Skip(); } virtual void CreateDrillFile( wxCommandEvent& event ) { event.Skip(); }
virtual void OnQuit( wxCommandEvent& event ) { event.Skip(); } virtual void OnQuit( wxCommandEvent& event ) { event.Skip(); }
virtual void OnOutputDirectoryBrowseClicked( wxCommandEvent& event ) { event.Skip(); }
public: public:
DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Plot"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Plot"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 571,616 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_PLOT_BASE(); ~DIALOG_PLOT_BASE();
}; };
......
...@@ -194,9 +194,9 @@ void DIALOG_PRINT_FOR_MODEDIT::OnPrintButtonClick( wxCommandEvent& event ) ...@@ -194,9 +194,9 @@ void DIALOG_PRINT_FOR_MODEDIT::OnPrintButtonClick( wxCommandEvent& event )
s_Parameters.m_Print_Black_and_White = m_ModeColorOption->GetSelection(); s_Parameters.m_Print_Black_and_White = m_ModeColorOption->GetSelection();
s_Parameters.m_PrintScale = s_ScaleList[m_ScaleOption->GetSelection()]; s_Parameters.m_PrintScale = s_ScaleList[m_ScaleOption->GetSelection()];
g_pcb_plot_options.ScaleAdjX = s_Parameters.m_XScaleAdjust; g_PcbPlotOptions.m_FineScaleAdjustX = s_Parameters.m_XScaleAdjust;
g_pcb_plot_options.ScaleAdjX = s_Parameters.m_YScaleAdjust; g_PcbPlotOptions.m_FineScaleAdjustY = s_Parameters.m_YScaleAdjust;
g_pcb_plot_options.Scale = s_Parameters.m_PrintScale; g_PcbPlotOptions.m_PlotScale = s_Parameters.m_PrintScale;
wxPrintDialogData printDialogData( *g_PrintData ); wxPrintDialogData printDialogData( *g_PrintData );
wxPrinter printer( &printDialogData ); wxPrinter printer( &printDialogData );
......
...@@ -383,7 +383,7 @@ void DIALOG_PRINT_USING_PRINTER::SetPrintParameters( ) ...@@ -383,7 +383,7 @@ void DIALOG_PRINT_USING_PRINTER::SetPrintParameters( )
int idx = m_ScaleOption->GetSelection(); int idx = m_ScaleOption->GetSelection();
s_Parameters.m_PrintScale = s_ScaleList[idx]; s_Parameters.m_PrintScale = s_ScaleList[idx];
g_pcb_plot_options.Scale = s_Parameters.m_PrintScale; g_PcbPlotOptions.m_PlotScale = s_Parameters.m_PrintScale;
if( m_FineAdjustXscaleOpt ) if( m_FineAdjustXscaleOpt )
{ {
...@@ -400,8 +400,8 @@ void DIALOG_PRINT_USING_PRINTER::SetPrintParameters( ) ...@@ -400,8 +400,8 @@ void DIALOG_PRINT_USING_PRINTER::SetPrintParameters( )
DisplayInfoMessage( NULL, _( "Warning: Scale option set to a very small value" ) ); DisplayInfoMessage( NULL, _( "Warning: Scale option set to a very small value" ) );
m_FineAdjustYscaleOpt->GetValue().ToDouble( &s_Parameters.m_YScaleAdjust ); m_FineAdjustYscaleOpt->GetValue().ToDouble( &s_Parameters.m_YScaleAdjust );
} }
g_pcb_plot_options.ScaleAdjX = s_Parameters.m_XScaleAdjust; g_PcbPlotOptions.m_FineScaleAdjustX = s_Parameters.m_XScaleAdjust;
g_pcb_plot_options.ScaleAdjX = s_Parameters.m_YScaleAdjust; g_PcbPlotOptions.m_FineScaleAdjustY = s_Parameters.m_YScaleAdjust;
SetPenWidth(); SetPenWidth();
} }
......
...@@ -4,8 +4,6 @@ ...@@ -4,8 +4,6 @@
#include "fctsys.h" #include "fctsys.h"
using namespace std;
#include <vector> #include <vector>
#include "common.h" #include "common.h"
...@@ -67,8 +65,8 @@ void GenDrillMapFile( BOARD* aPcb, FILE* aFile, const wxString& aFullFileName, ...@@ -67,8 +65,8 @@ void GenDrillMapFile( BOARD* aPcb, FILE* aFile, const wxString& aFullFileName,
scale = 1; scale = 1;
HPGL_PLOTTER* hpgl_plotter = new HPGL_PLOTTER; HPGL_PLOTTER* hpgl_plotter = new HPGL_PLOTTER;
plotter = hpgl_plotter; plotter = hpgl_plotter;
hpgl_plotter->set_pen_number( g_pcb_plot_options.HPGL_Pen_Num ); hpgl_plotter->set_pen_number( g_PcbPlotOptions.m_HPGLPenNum );
hpgl_plotter->set_pen_speed( g_pcb_plot_options.HPGL_Pen_Speed ); hpgl_plotter->set_pen_speed( g_PcbPlotOptions.m_HPGLPenSpeed );
hpgl_plotter->set_pen_overlap( 0 ); hpgl_plotter->set_pen_overlap( 0 );
plotter->set_paper_size( aSheet ); plotter->set_paper_size( aSheet );
plotter->set_viewport( offset, scale, 0 ); plotter->set_viewport( offset, scale, 0 );
......
...@@ -388,18 +388,6 @@ PARAM_CFG_ARRAY& WinEDA_PcbFrame::GetConfigurationSettings() ...@@ -388,18 +388,6 @@ PARAM_CFG_ARRAY& WinEDA_PcbFrame::GetConfigurationSettings()
m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "CoRatsN" ), m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "CoRatsN" ),
ITEM_COLOR( RATSNEST_VISIBLE ), ITEM_COLOR( RATSNEST_VISIBLE ),
WHITE ) ); WHITE ) );
m_configSettings.push_back( new PARAM_CFG_INT( true, wxT( "HPGLnum" ),
&g_pcb_plot_options.HPGL_Pen_Num,
1, 1, 16 ) );
m_configSettings.push_back( new PARAM_CFG_INT( true, wxT( "HPGdiam" ),
&g_pcb_plot_options.HPGL_Pen_Diam,
15, 0, 100 ) );
m_configSettings.push_back( new PARAM_CFG_INT( true, wxT( "HPGLSpd" ),
&g_pcb_plot_options.HPGL_Pen_Speed,
20, 0, 1000 ) );
m_configSettings.push_back( new PARAM_CFG_INT( true, wxT( "HPGLrec" ),
&g_pcb_plot_options.HPGL_Pen_Recouvrement,
2, 0, 0x100 ) );
m_configSettings.push_back( new PARAM_CFG_INT( true, wxT( "TimeOut" ), &g_TimeOut, m_configSettings.push_back( new PARAM_CFG_INT( true, wxT( "TimeOut" ), &g_TimeOut,
600, 0, 60000 ) ); 600, 0, 60000 ) );
m_configSettings.push_back( new PARAM_CFG_BOOL( true, wxT( "DPolair" ), m_configSettings.push_back( new PARAM_CFG_BOOL( true, wxT( "DPolair" ),
...@@ -411,14 +399,33 @@ PARAM_CFG_ARRAY& WinEDA_PcbFrame::GetConfigurationSettings() ...@@ -411,14 +399,33 @@ PARAM_CFG_ARRAY& WinEDA_PcbFrame::GetConfigurationSettings()
m_configSettings.push_back( new PARAM_CFG_BOOL( true, wxT( "TwoSegT" ), m_configSettings.push_back( new PARAM_CFG_BOOL( true, wxT( "TwoSegT" ),
&g_TwoSegmentTrackBuild, TRUE ) ); &g_TwoSegmentTrackBuild, TRUE ) );
// Plot options: // Plot options:
m_configSettings.push_back( new PARAM_CFG_INT( true, wxT( "HPGLnum" ),
&g_PcbPlotOptions.m_HPGLPenNum,
1, 1, 16 ) );
m_configSettings.push_back( new PARAM_CFG_INT( true, wxT( "HPGdiam" ),
&g_PcbPlotOptions.m_HPGLPenDiam,
15, 0, 100 ) );
m_configSettings.push_back( new PARAM_CFG_INT( true, wxT( "HPGLSpd" ),
&g_PcbPlotOptions.m_HPGLPenSpeed,
20, 0, 1000 ) );
m_configSettings.push_back( new PARAM_CFG_INT( true, wxT( "HPGLrec" ),
&g_PcbPlotOptions.m_HPGLPenOvr,
2, 0, 0x100 ) );
m_configSettings.push_back( new PARAM_CFG_INT( true, wxT( "PlotOutputFormat" ), m_configSettings.push_back( new PARAM_CFG_INT( true, wxT( "PlotOutputFormat" ),
&g_pcb_plot_options.PlotFormat, PLOT_FORMAT_GERBER ) ); &g_PcbPlotOptions.m_PlotFormat, PLOT_FORMAT_GERBER ) );
m_configSettings.push_back( new PARAM_CFG_BOOL( true, wxT( "EdgeLayerGerberOpt" ), m_configSettings.push_back( new PARAM_CFG_BOOL( true, wxT( "EdgeLayerGerberOpt" ),
&g_pcb_plot_options.Exclude_Edges_Pcb, true ) ); &g_PcbPlotOptions.m_ExcludeEdgeLayer, true ) );
m_configSettings.push_back( new PARAM_CFG_BOOL( true, wxT( "SubstractMasktoSilk" ), m_configSettings.push_back( new PARAM_CFG_BOOL( true, wxT( "SubstractMasktoSilk" ),
&g_pcb_plot_options.m_SubtractMaskFromSilk, false ) ); &g_PcbPlotOptions.m_SubtractMaskFromSilk, false ) );
m_configSettings.push_back( new PARAM_CFG_BOOL( true, wxT( "PlotPadsOnSilkscreen" ), m_configSettings.push_back( new PARAM_CFG_BOOL( true, wxT( "PlotPadsOnSilkscreen" ),
&g_pcb_plot_options.PlotPadsOnSilkLayer, false ) ); &g_PcbPlotOptions.m_PlotPadsOnSilkLayer, false ) );
m_configSettings.push_back( new PARAM_CFG_BOOL( true, wxT( "PlotFrameRef" ),
&g_PcbPlotOptions.m_PlotFrameRef, false ) );
m_configSettings.push_back( new PARAM_CFG_BOOL( true, wxT( "PlotViasOnMask" ),
&g_PcbPlotOptions.m_PlotViaOnMaskLayer, false ) );
m_configSettings.push_back( new PARAM_CFG_INT( true, wxT( "PlotHolesOpt" ),
(int*)&g_PcbPlotOptions.m_DrillShapeOpt,
PCB_PLOT_PARAMS::SMALL_DRILL_SHAPE ) );
return m_configSettings; return m_configSettings;
} }
...@@ -21,28 +21,28 @@ ...@@ -21,28 +21,28 @@
#define PLOT_DEFAULT_MARGE 300 // mils #define PLOT_DEFAULT_MARGE 300 // mils
/* Keywords to r/w options in m_Config */ /* Keywords to r/w options in m_Config */
#define OPTKEY_GERBER_EXTENSIONS wxT( "GerberOptUseLayersExt" ) #define OPTKEY_GERBER_EXTENSIONS wxT( "GerberOptUseLayersExt" )
#define OPTKEY_XFINESCALE_ADJ wxT( "PlotXFineScaleAdj" ) #define OPTKEY_XFINESCALE_ADJ wxT( "PlotXFineScaleAdj" )
#define OPTKEY_YFINESCALE_ADJ wxT( "PlotYFineScaleAdj" ) #define OPTKEY_YFINESCALE_ADJ wxT( "PlotYFineScaleAdj" )
// Define min and max reasonable values for print scale // Define min and max reasonable values for print scale
#define MIN_SCALE 0.01 #define MIN_SCALE 0.01
#define MAX_SCALE 100.0 #define MAX_SCALE 100.0
// PCB_Plot_Options constructor: set the default values for plot options: // PCB_PLOT_PARAMS constructor: set the default values for plot options:
PCB_Plot_Options::PCB_Plot_Options() PCB_PLOT_PARAMS::PCB_PLOT_PARAMS()
{ {
m_SubtractMaskFromSilk = false; m_SubtractMaskFromSilk = false;
Sel_Texte_Reference = true; m_PlotReference = true;
Sel_Texte_Valeur = true; m_PlotValue = true;
Sel_Texte_Divers = true; m_PlotTextOther = true;
DrillShapeOpt = PCB_Plot_Options::SMALL_DRILL_SHAPE; m_DrillShapeOpt = PCB_PLOT_PARAMS::SMALL_DRILL_SHAPE;
Trace_Mode = FILLED; m_PlotMode = FILLED;
Scale = 1.0; m_PlotScale = 1.0;
ScaleAdjX = 1.0; m_AutoScale = false;
ScaleAdjY = 1.0; m_FineScaleAdjustX = 1.0;
PlotScaleOpt = 1; m_FineScaleAdjustY = 1.0;
outputDirectory = wxT( "" ); outputDirectory = wxT( "" );
} }
...@@ -53,8 +53,8 @@ static bool s_PlotOriginIsAuxAxis = FALSE; ...@@ -53,8 +53,8 @@ static bool s_PlotOriginIsAuxAxis = FALSE;
/* The group of plot options - sadly global XXX */ /* The group of plot options - sadly global XXX */
PCB_Plot_Options g_pcb_plot_options; PCB_PLOT_PARAMS g_PcbPlotOptions;
extern int g_DrawDefaultLineThickness; extern int g_DrawDefaultLineThickness;
/*******************************/ /*******************************/
...@@ -69,25 +69,26 @@ public: ...@@ -69,25 +69,26 @@ public:
wxCheckBox* m_BoxSelectLayer[LAYER_COUNT]; // wxCheckBox list to select/deselec layers to plot wxCheckBox* m_BoxSelectLayer[LAYER_COUNT]; // wxCheckBox list to select/deselec layers to plot
double m_XScaleAdjust; double m_XScaleAdjust;
double m_YScaleAdjust; double m_YScaleAdjust;
static int m_dlgPlotScaleOpt; // Static to remember last selection
bool useA4() bool useA4()
{ {
return m_PlotFormatOpt->GetSelection() == 3; return m_plotFormatOpt->GetSelection() == 3;
} }
/** /**
* Function getFormat * Function getFormat
* returns one of the values from the PlotFormat enum. If the 4th * returns one of the values from the m_PlotFormat enum. If the 4th
* radio button is selected, map this back to postscript. * radio button is selected, map this back to postscript.
*/ */
PlotFormat getFormat() PlotFormat getFormat()
{ {
int radioNdx = m_PlotFormatOpt->GetSelection(); int radioNdx = m_plotFormatOpt->GetSelection();
// change the A4 to the simple postscript, according to the // change the A4 to the simple postscript, according to the
// PlotFormat enum // m_PlotFormat enum
switch( radioNdx ) switch( radioNdx )
{ {
case 3: case 3:
...@@ -103,8 +104,7 @@ public: ...@@ -103,8 +104,7 @@ public:
} }
public: public: DIALOG_PLOT( WinEDA_PcbFrame* parent );
DIALOG_PLOT( WinEDA_PcbFrame* parent );
private: private:
void Init_Dialog(); void Init_Dialog();
void Plot( wxCommandEvent& event ); void Plot( wxCommandEvent& event );
...@@ -113,10 +113,11 @@ private: ...@@ -113,10 +113,11 @@ private:
void OnOutputDirectoryBrowseClicked( wxCommandEvent& event ); void OnOutputDirectoryBrowseClicked( wxCommandEvent& event );
void SetPlotFormat( wxCommandEvent& event ); void SetPlotFormat( wxCommandEvent& event );
void OnSetScaleOpt( wxCommandEvent& event ); void OnSetScaleOpt( wxCommandEvent& event );
void SaveOptPlot( wxCommandEvent& event ); void savePlotOptions( wxCommandEvent& event );
void CreateDrillFile( wxCommandEvent& event ); void CreateDrillFile( wxCommandEvent& event );
}; };
int DIALOG_PLOT::m_dlgPlotScaleOpt = 1;
const int UNITS_MILS = 1000; const int UNITS_MILS = 1000;
...@@ -137,41 +138,41 @@ DIALOG_PLOT::DIALOG_PLOT( WinEDA_PcbFrame* parent ) : ...@@ -137,41 +138,41 @@ DIALOG_PLOT::DIALOG_PLOT( WinEDA_PcbFrame* parent ) :
void DIALOG_PLOT::Init_Dialog() void DIALOG_PLOT::Init_Dialog()
{ {
wxString msg; wxString msg;
wxFileName fileName; wxFileName fileName;
BOARD* board = m_Parent->GetBoard(); BOARD* board = m_Parent->GetBoard();
m_Config->Read( OPTKEY_XFINESCALE_ADJ, &m_XScaleAdjust ); m_Config->Read( OPTKEY_XFINESCALE_ADJ, &m_XScaleAdjust );
m_Config->Read( OPTKEY_YFINESCALE_ADJ, &m_YScaleAdjust ); m_Config->Read( OPTKEY_YFINESCALE_ADJ, &m_YScaleAdjust );
m_PlotFormatOpt->SetSelection( g_pcb_plot_options.PlotFormat ); m_plotFormatOpt->SetSelection( g_PcbPlotOptions.m_PlotFormat );
g_pcb_plot_options.PlotLine_Width = g_DrawDefaultLineThickness; g_PcbPlotOptions.m_PlotLineWidth = g_DrawDefaultLineThickness;
// Set units and value for HPGL pen speed. // Set units and value for HPGL pen speed.
AddUnitSymbol( *m_textPenSize, g_UserUnit ); AddUnitSymbol( *m_textPenSize, g_UserUnit );
msg = ReturnStringFromValue( g_UserUnit, g_pcb_plot_options.HPGL_Pen_Diam, UNITS_MILS ); msg = ReturnStringFromValue( g_UserUnit, g_PcbPlotOptions.m_HPGLPenDiam, UNITS_MILS );
m_HPGLPenSizeOpt->AppendText( msg ); m_HPGLPenSizeOpt->AppendText( msg );
// Set units to cm for standard HPGL pen speed. // Set units to cm for standard HPGL pen speed.
msg = ReturnStringFromValue( UNSCALED_UNITS, g_pcb_plot_options.HPGL_Pen_Speed, 1 ); msg = ReturnStringFromValue( UNSCALED_UNITS, g_PcbPlotOptions.m_HPGLPenSpeed, 1 );
m_HPGLPenSpeedOpt->AppendText( msg ); m_HPGLPenSpeedOpt->AppendText( msg );
// Set units and value for HPGL pen overlay. // Set units and value for HPGL pen overlay.
AddUnitSymbol( *m_textPenOvr, g_UserUnit ); AddUnitSymbol( *m_textPenOvr, g_UserUnit );
msg = ReturnStringFromValue( g_UserUnit, msg = ReturnStringFromValue( g_UserUnit,
g_pcb_plot_options.HPGL_Pen_Recouvrement, g_PcbPlotOptions.m_HPGLPenOvr,
UNITS_MILS ); UNITS_MILS );
m_HPGLPenOverlayOpt->AppendText( msg ); m_HPGLPenOverlayOpt->AppendText( msg );
msg = ReturnStringFromValue( g_UserUnit, msg = ReturnStringFromValue( g_UserUnit,
g_pcb_plot_options.PlotLine_Width, g_PcbPlotOptions.m_PlotLineWidth,
PCB_INTERNAL_UNIT ); PCB_INTERNAL_UNIT );
m_LinesWidth->AppendText( msg ); m_linesWidth->AppendText( msg );
if( s_PlotOriginIsAuxAxis ) if( s_PlotOriginIsAuxAxis )
m_Choice_Plot_Offset->SetSelection( 1 ); m_choicePlotOffset->SetSelection( 1 );
// Create scale adjust option // Create scale adjust option
m_XScaleAdjust = m_YScaleAdjust = 1.0; m_XScaleAdjust = m_YScaleAdjust = 1.0;
...@@ -182,12 +183,12 @@ void DIALOG_PLOT::Init_Dialog() ...@@ -182,12 +183,12 @@ void DIALOG_PLOT::Init_Dialog()
m_XScaleAdjust = m_YScaleAdjust = 1.0; m_XScaleAdjust = m_YScaleAdjust = 1.0;
msg.Printf( wxT( "%f" ), m_XScaleAdjust ); msg.Printf( wxT( "%f" ), m_XScaleAdjust );
m_FineAdjustXscaleOpt->AppendText( msg ); m_fineAdjustXscaleOpt->AppendText( msg );
msg.Printf( wxT( "%f" ), m_YScaleAdjust ); msg.Printf( wxT( "%f" ), m_YScaleAdjust );
m_FineAdjustYscaleOpt->AppendText( msg ); m_fineAdjustYscaleOpt->AppendText( msg );
m_Plot_PS_Negative->SetValue( g_pcb_plot_options.Plot_PS_Negative ); m_plotPSNegativeOpt->SetValue( g_PcbPlotOptions.m_PlotPSNegative );
// Create layer list. // Create layer list.
...@@ -198,29 +199,29 @@ void DIALOG_PLOT::Init_Dialog() ...@@ -198,29 +199,29 @@ void DIALOG_PLOT::Init_Dialog()
if( !board->IsLayerEnabled( layer ) ) if( !board->IsLayerEnabled( layer ) )
m_BoxSelectLayer[layer] = NULL; m_BoxSelectLayer[layer] = NULL;
else else
m_BoxSelectLayer[layer] = m_BoxSelectLayer[layer] =
new wxCheckBox( this, -1, board->GetLayerName( layer ) ); new wxCheckBox( this, -1, board->GetLayerName( layer ) );
} }
// Add wxCheckBoxes in layers lists dialog // Add wxCheckBoxes in layers lists dialog
// List layers in same order than in setup layers dialog // List layers in same order than in setup layers dialog
// (Front or Top to Back or Bottom) // (Front or Top to Back or Bottom)
DECLARE_LAYERS_ORDER_LIST(layersOrder); DECLARE_LAYERS_ORDER_LIST( layersOrder );
for( int layer_idx = 0; layer_idx < NB_LAYERS; ++layer_idx ) for( int layer_idx = 0; layer_idx < NB_LAYERS; ++layer_idx )
{ {
layer = layersOrder[layer_idx]; layer = layersOrder[layer_idx];
wxASSERT(layer < NB_LAYERS); wxASSERT( layer < NB_LAYERS );
if( m_BoxSelectLayer[layer] == NULL ) if( m_BoxSelectLayer[layer] == NULL )
continue; continue;
if( layer < NB_COPPER_LAYERS ) if( layer < NB_COPPER_LAYERS )
m_CopperLayersBoxSizer->Add( m_BoxSelectLayer[layer], m_CopperLayersBoxSizer->Add( m_BoxSelectLayer[layer],
0, wxGROW | wxALL, 1 ); 0, wxGROW | wxALL, 1 );
else else
m_TechnicalLayersBoxSizer->Add( m_BoxSelectLayer[layer], m_TechnicalLayersBoxSizer->Add( m_BoxSelectLayer[layer],
0, wxGROW | wxALL, 1 ); 0, wxGROW | wxALL, 1 );
layerKey.Printf( OPTKEY_LAYERBASE, layer ); layerKey.Printf( OPTKEY_LAYERBASE, layer );
...@@ -239,57 +240,57 @@ void DIALOG_PLOT::Init_Dialog() ...@@ -239,57 +240,57 @@ void DIALOG_PLOT::Init_Dialog()
// Option for using proper Gerber extensions // Option for using proper Gerber extensions
long ltmp; long ltmp;
m_Config->Read( OPTKEY_GERBER_EXTENSIONS, &ltmp ); m_Config->Read( OPTKEY_GERBER_EXTENSIONS, &ltmp );
m_Use_Gerber_Extensions->SetValue( ltmp ); m_useGerberExtensions->SetValue( ltmp );
// Option for excluding contents of "Edges Pcb" layer // Option for excluding contents of "Edges Pcb" layer
m_Exclude_Edges_Pcb->SetValue( g_pcb_plot_options.Exclude_Edges_Pcb ); m_excludeEdgeLayerOpt->SetValue( g_PcbPlotOptions.m_ExcludeEdgeLayer );
m_SubtractMaskFromSilk->SetValue( g_pcb_plot_options.GetSubtractMaskFromSilk() ); m_subtractMaskFromSilk->SetValue( g_PcbPlotOptions.GetSubtractMaskFromSilk() );
// Option to plot page references: // Option to plot page references:
if( m_Parent->m_Print_Sheet_Ref ) if( m_Parent->m_Print_Sheet_Ref )
{ {
m_Plot_Sheet_Ref->SetValue( g_pcb_plot_options.Plot_Frame_Ref ); m_plotSheetRef->SetValue( g_PcbPlotOptions.m_PlotFrameRef );
} }
else else
{ {
m_Plot_Sheet_Ref->Enable( false ); m_plotSheetRef->Enable( false );
g_pcb_plot_options.Plot_Frame_Ref = false; g_PcbPlotOptions.m_PlotFrameRef = false;
} }
// Option to plot pads on silkscreen layers or all layers // Option to plot pads on silkscreen layers or all layers
m_Plot_Pads_on_Silkscreen->SetValue( g_pcb_plot_options.PlotPadsOnSilkLayer ); m_plotPads_on_Silkscreen->SetValue( g_PcbPlotOptions.m_PlotPadsOnSilkLayer );
// Options to plot texts on footprints // Options to plot texts on footprints
m_Plot_Text_Value->SetValue( g_pcb_plot_options.Sel_Texte_Valeur ); m_plotModuleValueOpt->SetValue( g_PcbPlotOptions.m_PlotValue );
m_Plot_Text_Ref->SetValue( g_pcb_plot_options.Sel_Texte_Reference ); m_plotModuleRefOpt->SetValue( g_PcbPlotOptions.m_PlotReference );
m_Plot_Text_Div->SetValue( g_pcb_plot_options.Sel_Texte_Divers ); m_plotTextOther->SetValue( g_PcbPlotOptions.m_PlotTextOther );
m_Plot_Invisible_Text->SetValue( g_pcb_plot_options.Sel_Texte_Invisible ); m_plotInvisibleText->SetValue( g_PcbPlotOptions.m_PlotInvisibleTexts );
// Options to plot pads and vias holes // Options to plot pads and vias holes
m_Drill_Shape_Opt->SetSelection( g_pcb_plot_options.DrillShapeOpt ); m_drillShapeOpt->SetSelection( g_PcbPlotOptions.m_DrillShapeOpt );
// Scale option // Scale option
m_Scale_Opt->SetSelection( g_pcb_plot_options.PlotScaleOpt ); m_scaleOpt->SetSelection( m_dlgPlotScaleOpt );
// Plot mode // Plot mode
m_PlotModeOpt->SetSelection( g_pcb_plot_options.Trace_Mode ); m_plotModeOpt->SetSelection( g_PcbPlotOptions.m_PlotMode );
// Plot mirror option // Plot mirror option
m_PlotMirorOpt->SetValue( g_pcb_plot_options.Plot_Set_MIROIR ); m_plotMirrorOpt->SetValue( g_PcbPlotOptions.m_PlotMirror );
// Put vias on mask layer // Put vias on mask layer
m_PlotNoViaOnMaskOpt->SetValue( g_pcb_plot_options.DrawViaOnMaskLayer ); m_plotNoViaOnMaskOpt->SetValue( g_PcbPlotOptions.m_PlotViaOnMaskLayer );
// Output directory // Output directory
if( g_pcb_plot_options.GetOutputDirectory().IsEmpty() ) if( g_PcbPlotOptions.GetOutputDirectory().IsEmpty() )
{ {
fileName = m_Parent->GetScreen()->m_FileName; fileName = m_Parent->GetScreen()->m_FileName;
m_OutputDirectory->SetValue( fileName.GetPath() ); m_outputDirectoryName->SetValue( fileName.GetPath() );
} }
else else
{ {
m_OutputDirectory->SetValue( g_pcb_plot_options.GetOutputDirectory() ); m_outputDirectoryName->SetValue( g_PcbPlotOptions.GetOutputDirectory() );
} }
// Update options values: // Update options values:
...@@ -302,7 +303,7 @@ void DIALOG_PLOT::Init_Dialog() ...@@ -302,7 +303,7 @@ void DIALOG_PLOT::Init_Dialog()
} }
void DIALOG_PLOT::OnQuit( wxCommandEvent& WXUNUSED(event) ) void DIALOG_PLOT::OnQuit( wxCommandEvent& WXUNUSED( event ) )
{ {
Close( true ); // true is to force the frame to close Close( true ); // true is to force the frame to close
} }
...@@ -323,24 +324,27 @@ void DIALOG_PLOT::CreateDrillFile( wxCommandEvent& event ) ...@@ -323,24 +324,27 @@ void DIALOG_PLOT::CreateDrillFile( wxCommandEvent& event )
void DIALOG_PLOT::OnSetScaleOpt( wxCommandEvent& event ) void DIALOG_PLOT::OnSetScaleOpt( wxCommandEvent& event )
{ {
/* Disable sheet reference for scale != 1:1 */ /* Disable sheet reference for scale != 1:1 */
bool scale1 = ( m_Scale_Opt->GetSelection() == 1 ); bool scale1 = ( m_scaleOpt->GetSelection() == 1 );
m_Plot_Sheet_Ref->Enable( scale1 ); m_plotSheetRef->Enable( scale1 );
if( !scale1 ) if( !scale1 )
m_Plot_Sheet_Ref->SetValue( false ); m_plotSheetRef->SetValue( false );
} }
void DIALOG_PLOT::OnOutputDirectoryBrowseClicked( wxCommandEvent& event ) void DIALOG_PLOT::OnOutputDirectoryBrowseClicked( wxCommandEvent& event )
{ {
wxString currentDir; wxString currentDir;
currentDir = m_OutputDirectory->GetValue();
currentDir = m_outputDirectoryName->GetValue();
wxDirDialog dirDialog( this, _( "Select Output Directory" ), currentDir ); wxDirDialog dirDialog( this, _( "Select Output Directory" ), currentDir );
if( dirDialog.ShowModal() == wxID_CANCEL ) if( dirDialog.ShowModal() == wxID_CANCEL )
return; return;
m_OutputDirectory->SetValue( dirDialog.GetPath() ); m_outputDirectoryName->SetValue( dirDialog.GetPath() );
} }
void DIALOG_PLOT::SetPlotFormat( wxCommandEvent& event ) void DIALOG_PLOT::SetPlotFormat( wxCommandEvent& event )
{ {
int format = getFormat(); int format = getFormat();
...@@ -349,155 +353,150 @@ void DIALOG_PLOT::SetPlotFormat( wxCommandEvent& event ) ...@@ -349,155 +353,150 @@ void DIALOG_PLOT::SetPlotFormat( wxCommandEvent& event )
{ {
case PLOT_FORMAT_POST: case PLOT_FORMAT_POST:
default: default:
m_Drill_Shape_Opt->Enable( true ); m_drillShapeOpt->Enable( true );
m_PlotModeOpt->Enable( true ); m_plotModeOpt->Enable( true );
m_PlotMirorOpt->Enable( true ); m_plotMirrorOpt->Enable( true );
m_Choice_Plot_Offset->Enable( false ); m_choicePlotOffset->Enable( false );
m_LinesWidth->Enable( true ); m_linesWidth->Enable( true );
m_HPGLPenSizeOpt->Enable( false ); m_HPGLPenSizeOpt->Enable( false );
m_HPGLPenSpeedOpt->Enable( false ); m_HPGLPenSpeedOpt->Enable( false );
m_HPGLPenOverlayOpt->Enable( false ); m_HPGLPenOverlayOpt->Enable( false );
m_Exclude_Edges_Pcb->SetValue( false ); m_excludeEdgeLayerOpt->SetValue( false );
m_Exclude_Edges_Pcb->Enable( false ); m_excludeEdgeLayerOpt->Enable( false );
m_SubtractMaskFromSilk->Enable( false ); m_subtractMaskFromSilk->Enable( false );
m_Use_Gerber_Extensions->Enable( false ); m_useGerberExtensions->Enable( false );
m_Scale_Opt->Enable( true ); m_scaleOpt->Enable( true );
m_FineAdjustXscaleOpt->Enable( true ); m_fineAdjustXscaleOpt->Enable( true );
m_FineAdjustYscaleOpt->Enable( true ); m_fineAdjustYscaleOpt->Enable( true );
m_Plot_PS_Negative->Enable( true ); m_plotPSNegativeOpt->Enable( true );
break; break;
case PLOT_FORMAT_GERBER: case PLOT_FORMAT_GERBER:
m_Drill_Shape_Opt->Enable( false ); m_drillShapeOpt->Enable( false );
m_PlotModeOpt->SetSelection( 1 ); m_plotModeOpt->SetSelection( 1 );
m_PlotModeOpt->Enable( false ); m_plotModeOpt->Enable( false );
m_PlotMirorOpt->SetValue( false ); m_plotMirrorOpt->SetValue( false );
m_PlotMirorOpt->Enable( false ); m_plotMirrorOpt->Enable( false );
m_Choice_Plot_Offset->Enable( true ); m_choicePlotOffset->Enable( true );
m_LinesWidth->Enable( true ); m_linesWidth->Enable( true );
m_HPGLPenSizeOpt->Enable( false ); m_HPGLPenSizeOpt->Enable( false );
m_HPGLPenSpeedOpt->Enable( false ); m_HPGLPenSpeedOpt->Enable( false );
m_HPGLPenOverlayOpt->Enable( false ); m_HPGLPenOverlayOpt->Enable( false );
m_Exclude_Edges_Pcb->Enable( true ); m_excludeEdgeLayerOpt->Enable( true );
m_SubtractMaskFromSilk->Enable( true ); m_subtractMaskFromSilk->Enable( true );
m_Use_Gerber_Extensions->Enable( true ); m_useGerberExtensions->Enable( true );
m_Scale_Opt->SetSelection( 1 ); m_scaleOpt->SetSelection( 1 );
m_Scale_Opt->Enable( false ); m_scaleOpt->Enable( false );
m_FineAdjustXscaleOpt->Enable( false ); m_fineAdjustXscaleOpt->Enable( false );
m_FineAdjustYscaleOpt->Enable( false ); m_fineAdjustYscaleOpt->Enable( false );
m_Plot_PS_Negative->SetValue( false ); m_plotPSNegativeOpt->SetValue( false );
m_Plot_PS_Negative->Enable( false ); m_plotPSNegativeOpt->Enable( false );
break; break;
case PLOT_FORMAT_HPGL: case PLOT_FORMAT_HPGL:
m_PlotMirorOpt->Enable( true ); m_plotMirrorOpt->Enable( true );
m_Drill_Shape_Opt->Enable( false ); m_drillShapeOpt->Enable( false );
m_PlotModeOpt->Enable( true ); m_plotModeOpt->Enable( true );
m_Choice_Plot_Offset->Enable( false ); m_choicePlotOffset->Enable( false );
m_LinesWidth->Enable( false ); m_linesWidth->Enable( false );
m_HPGLPenSizeOpt->Enable( true ); m_HPGLPenSizeOpt->Enable( true );
m_HPGLPenSpeedOpt->Enable( true ); m_HPGLPenSpeedOpt->Enable( true );
m_HPGLPenOverlayOpt->Enable( true ); m_HPGLPenOverlayOpt->Enable( true );
m_Exclude_Edges_Pcb->SetValue( false ); m_excludeEdgeLayerOpt->SetValue( false );
m_Exclude_Edges_Pcb->Enable( false ); m_excludeEdgeLayerOpt->Enable( false );
m_SubtractMaskFromSilk->Enable( false ); m_subtractMaskFromSilk->Enable( false );
m_Use_Gerber_Extensions->Enable( false ); m_useGerberExtensions->Enable( false );
m_Scale_Opt->Enable( true ); m_scaleOpt->Enable( true );
m_FineAdjustXscaleOpt->Enable( false ); m_fineAdjustXscaleOpt->Enable( false );
m_FineAdjustYscaleOpt->Enable( false ); m_fineAdjustYscaleOpt->Enable( false );
m_Plot_PS_Negative->SetValue( false ); m_plotPSNegativeOpt->SetValue( false );
m_Plot_PS_Negative->Enable( false ); m_plotPSNegativeOpt->Enable( false );
break; break;
case PLOT_FORMAT_DXF: case PLOT_FORMAT_DXF:
m_PlotMirorOpt->Enable( false ); m_plotMirrorOpt->Enable( false );
m_PlotMirorOpt->SetValue( false ); m_plotMirrorOpt->SetValue( false );
m_Drill_Shape_Opt->Enable( false ); m_drillShapeOpt->Enable( false );
m_PlotModeOpt->Enable( true ); m_plotModeOpt->Enable( true );
m_Choice_Plot_Offset->Enable( false ); m_choicePlotOffset->Enable( false );
m_LinesWidth->Enable( false ); m_linesWidth->Enable( false );
m_HPGLPenSizeOpt->Enable( false ); m_HPGLPenSizeOpt->Enable( false );
m_HPGLPenSpeedOpt->Enable( false ); m_HPGLPenSpeedOpt->Enable( false );
m_HPGLPenOverlayOpt->Enable( false ); m_HPGLPenOverlayOpt->Enable( false );
m_Exclude_Edges_Pcb->SetValue( false ); m_excludeEdgeLayerOpt->SetValue( false );
m_Exclude_Edges_Pcb->Enable( false ); m_excludeEdgeLayerOpt->Enable( false );
m_SubtractMaskFromSilk->Enable( false ); m_subtractMaskFromSilk->Enable( false );
m_Use_Gerber_Extensions->Enable( false ); m_useGerberExtensions->Enable( false );
m_Scale_Opt->Enable( false ); m_scaleOpt->Enable( false );
m_Scale_Opt->SetSelection( 1 ); m_scaleOpt->SetSelection( 1 );
m_FineAdjustXscaleOpt->Enable( false ); m_fineAdjustXscaleOpt->Enable( false );
m_FineAdjustYscaleOpt->Enable( false ); m_fineAdjustYscaleOpt->Enable( false );
m_Plot_PS_Negative->SetValue( false ); m_plotPSNegativeOpt->SetValue( false );
m_Plot_PS_Negative->Enable( false ); m_plotPSNegativeOpt->Enable( false );
break; break;
} }
g_pcb_plot_options.PlotFormat = format; g_PcbPlotOptions.m_PlotFormat = format;
} }
void DIALOG_PLOT::SaveOptPlot( wxCommandEvent& event ) void DIALOG_PLOT::savePlotOptions( wxCommandEvent& event )
{ {
g_pcb_plot_options.Exclude_Edges_Pcb = m_Exclude_Edges_Pcb->GetValue(); g_PcbPlotOptions.m_ExcludeEdgeLayer = m_excludeEdgeLayerOpt->GetValue();
g_pcb_plot_options.SetSubtractMaskFromSilk( m_SubtractMaskFromSilk->GetValue() ); g_PcbPlotOptions.SetSubtractMaskFromSilk( m_subtractMaskFromSilk->GetValue() );
if( m_Plot_Sheet_Ref ) if( m_plotSheetRef )
g_pcb_plot_options.Plot_Frame_Ref = m_Plot_Sheet_Ref->GetValue(); g_PcbPlotOptions.m_PlotFrameRef = m_plotSheetRef->GetValue();
g_pcb_plot_options.PlotPadsOnSilkLayer = m_Plot_Pads_on_Silkscreen->GetValue(); g_PcbPlotOptions.m_PlotPadsOnSilkLayer = m_plotPads_on_Silkscreen->GetValue();
s_PlotOriginIsAuxAxis = s_PlotOriginIsAuxAxis =
(m_Choice_Plot_Offset->GetSelection() == 0) ? FALSE : TRUE; (m_choicePlotOffset->GetSelection() == 0) ? FALSE : TRUE;
g_pcb_plot_options.Sel_Texte_Valeur = m_Plot_Text_Value->GetValue(); g_PcbPlotOptions.m_PlotValue = m_plotModuleValueOpt->GetValue();
g_pcb_plot_options.Sel_Texte_Reference = m_Plot_Text_Ref->GetValue(); g_PcbPlotOptions.m_PlotReference = m_plotModuleRefOpt->GetValue();
g_pcb_plot_options.Sel_Texte_Divers = m_Plot_Text_Div->GetValue(); g_PcbPlotOptions.m_PlotTextOther = m_plotTextOther->GetValue();
g_pcb_plot_options.Sel_Texte_Invisible = m_Plot_Invisible_Text->GetValue(); g_PcbPlotOptions.m_PlotInvisibleTexts = m_plotInvisibleText->GetValue();
g_pcb_plot_options.PlotScaleOpt = m_Scale_Opt->GetSelection(); m_dlgPlotScaleOpt = m_scaleOpt->GetSelection();
g_pcb_plot_options.DrillShapeOpt = g_PcbPlotOptions.m_DrillShapeOpt =
(PCB_Plot_Options::DrillShapeOptT) m_Drill_Shape_Opt->GetSelection(); (PCB_PLOT_PARAMS::DrillShapeOptT) m_drillShapeOpt->GetSelection();
g_pcb_plot_options.Plot_Set_MIROIR = m_PlotMirorOpt->GetValue(); g_PcbPlotOptions.m_PlotMirror = m_plotMirrorOpt->GetValue();
if( g_pcb_plot_options.Plot_Set_MIROIR ) g_PcbPlotOptions.m_PlotMode = (GRTraceMode) m_plotModeOpt->GetSelection();
g_pcb_plot_options.PlotOrient = PLOT_MIROIR; g_PcbPlotOptions.m_PlotViaOnMaskLayer = m_plotNoViaOnMaskOpt->GetValue();
else
g_pcb_plot_options.PlotOrient = 0;
g_pcb_plot_options.Trace_Mode = (GRTraceMode) m_PlotModeOpt->GetSelection();
g_pcb_plot_options.DrawViaOnMaskLayer = m_PlotNoViaOnMaskOpt->GetValue();
wxString msg = m_HPGLPenSizeOpt->GetValue(); wxString msg = m_HPGLPenSizeOpt->GetValue();
int tmp = ReturnValueFromString( g_UserUnit, msg, UNITS_MILS ); int tmp = ReturnValueFromString( g_UserUnit, msg, UNITS_MILS );
g_pcb_plot_options.HPGL_Pen_Diam = tmp; g_PcbPlotOptions.m_HPGLPenDiam = tmp;
msg = m_HPGLPenSpeedOpt->GetValue(); msg = m_HPGLPenSpeedOpt->GetValue();
tmp = ReturnValueFromString( MILLIMETRES, msg, 1 ); tmp = ReturnValueFromString( MILLIMETRES, msg, 1 );
g_pcb_plot_options.HPGL_Pen_Speed = tmp; g_PcbPlotOptions.m_HPGLPenSpeed = tmp;
msg = m_HPGLPenOverlayOpt->GetValue(); msg = m_HPGLPenOverlayOpt->GetValue();
tmp = ReturnValueFromString( g_UserUnit, msg, UNITS_MILS ); tmp = ReturnValueFromString( g_UserUnit, msg, UNITS_MILS );
g_pcb_plot_options.HPGL_Pen_Recouvrement = tmp; g_PcbPlotOptions.m_HPGLPenOvr = tmp;
msg = m_LinesWidth->GetValue(); msg = m_linesWidth->GetValue();
tmp = ReturnValueFromString( g_UserUnit, msg, PCB_INTERNAL_UNIT ); tmp = ReturnValueFromString( g_UserUnit, msg, PCB_INTERNAL_UNIT );
g_pcb_plot_options.PlotLine_Width = tmp; g_PcbPlotOptions.m_PlotLineWidth = tmp;
g_DrawDefaultLineThickness = g_pcb_plot_options.PlotLine_Width; g_DrawDefaultLineThickness = g_PcbPlotOptions.m_PlotLineWidth;
msg = m_FineAdjustXscaleOpt->GetValue(); msg = m_fineAdjustXscaleOpt->GetValue();
msg.ToDouble( &m_XScaleAdjust ); msg.ToDouble( &m_XScaleAdjust );
msg = m_FineAdjustYscaleOpt->GetValue(); msg = m_fineAdjustYscaleOpt->GetValue();
msg.ToDouble( &m_YScaleAdjust ); msg.ToDouble( &m_YScaleAdjust );
m_Config->Write( OPTKEY_GERBER_EXTENSIONS, m_Config->Write( OPTKEY_GERBER_EXTENSIONS,
m_Use_Gerber_Extensions->GetValue() ); m_useGerberExtensions->GetValue() );
m_Config->Write( OPTKEY_XFINESCALE_ADJ, m_XScaleAdjust ); m_Config->Write( OPTKEY_XFINESCALE_ADJ, m_XScaleAdjust );
m_Config->Write( OPTKEY_YFINESCALE_ADJ, m_YScaleAdjust ); m_Config->Write( OPTKEY_YFINESCALE_ADJ, m_YScaleAdjust );
g_pcb_plot_options.PlotFormat = m_PlotFormatOpt->GetSelection(); g_PcbPlotOptions.m_PlotFormat = m_plotFormatOpt->GetSelection();
wxString layerKey; wxString layerKey;
for( int layer = 0; layer<NB_LAYERS; ++layer ) for( int layer = 0; layer<NB_LAYERS; ++layer )
{ {
if( m_BoxSelectLayer[layer] == NULL ) if( m_BoxSelectLayer[layer] == NULL )
continue; continue;
...@@ -505,9 +504,9 @@ void DIALOG_PLOT::SaveOptPlot( wxCommandEvent& event ) ...@@ -505,9 +504,9 @@ void DIALOG_PLOT::SaveOptPlot( wxCommandEvent& event )
m_Config->Write( layerKey, m_BoxSelectLayer[layer]->IsChecked() ); m_Config->Write( layerKey, m_BoxSelectLayer[layer]->IsChecked() );
} }
g_pcb_plot_options.Plot_PS_Negative = m_Plot_PS_Negative->GetValue(); g_PcbPlotOptions.m_PlotPSNegative = m_plotPSNegativeOpt->GetValue();
g_pcb_plot_options.SetOutputDirectory( m_OutputDirectory->GetValue() ); g_PcbPlotOptions.SetOutputDirectory( m_outputDirectoryName->GetValue() );
} }
...@@ -519,16 +518,16 @@ void DIALOG_PLOT::Plot( wxCommandEvent& event ) ...@@ -519,16 +518,16 @@ void DIALOG_PLOT::Plot( wxCommandEvent& event )
BOARD* board = m_Parent->GetBoard(); BOARD* board = m_Parent->GetBoard();
SaveOptPlot( event ); savePlotOptions( event );
// Create output directory if it does not exist // Create output directory if it does not exist
if( !wxFileName::DirExists( m_OutputDirectory->GetValue() ) ) if( !wxFileName::DirExists( m_outputDirectoryName->GetValue() ) )
{ {
if( wxMkdir( m_OutputDirectory->GetValue() ) ) if( wxMkdir( m_outputDirectoryName->GetValue() ) )
{ {
wxString msg; wxString msg;
msg.Printf( _( "Directory %s created.\n" ), GetChars( m_OutputDirectory->GetValue() ) ); msg.Printf( _( "Directory %s created.\n" ), GetChars( m_outputDirectoryName->GetValue() ) );
m_MessagesBox->AppendText( msg ); m_messagesBox->AppendText( msg );
} }
else else
{ {
...@@ -537,22 +536,27 @@ void DIALOG_PLOT::Plot( wxCommandEvent& event ) ...@@ -537,22 +536,27 @@ void DIALOG_PLOT::Plot( wxCommandEvent& event )
} }
} }
switch( g_pcb_plot_options.PlotScaleOpt ) g_PcbPlotOptions.m_AutoScale = false;
g_PcbPlotOptions.m_PlotScale = 1;
switch( m_dlgPlotScaleOpt )
{ {
default: default:
g_pcb_plot_options.Scale = 1; break;
case 0:
g_PcbPlotOptions.m_AutoScale = true;
break; break;
case 2: case 2:
g_pcb_plot_options.Scale = 1.5; g_PcbPlotOptions.m_PlotScale = 1.5;
break; break;
case 3: case 3:
g_pcb_plot_options.Scale = 2; g_PcbPlotOptions.m_PlotScale = 2;
break; break;
case 4: case 4:
g_pcb_plot_options.Scale = 3; g_PcbPlotOptions.m_PlotScale = 3;
break; break;
} }
...@@ -561,12 +565,10 @@ void DIALOG_PLOT::Plot( wxCommandEvent& event ) ...@@ -561,12 +565,10 @@ void DIALOG_PLOT::Plot( wxCommandEvent& event )
* the default scale adjust is initialized to 0 and saved in program * the default scale adjust is initialized to 0 and saved in program
* settings resulting in a divide by zero fault. * settings resulting in a divide by zero fault.
*/ */
if( m_FineAdjustXscaleOpt - IsEnabled() if( m_fineAdjustXscaleOpt->IsEnabled() && m_XScaleAdjust != 0.0 )
&& m_XScaleAdjust != 0.0 ) g_PcbPlotOptions.m_FineScaleAdjustX = m_XScaleAdjust;
g_pcb_plot_options.ScaleAdjX = m_XScaleAdjust; if( m_fineAdjustYscaleOpt->IsEnabled() && m_YScaleAdjust != 0.0 )
if( m_FineAdjustYscaleOpt->IsEnabled() g_PcbPlotOptions.m_FineScaleAdjustY = m_YScaleAdjust;
&& m_YScaleAdjust != 0.0 )
g_pcb_plot_options.ScaleAdjY = m_YScaleAdjust;
int format = getFormat(); int format = getFormat();
...@@ -577,7 +579,7 @@ void DIALOG_PLOT::Plot( wxCommandEvent& event ) ...@@ -577,7 +579,7 @@ void DIALOG_PLOT::Plot( wxCommandEvent& event )
break; break;
case PLOT_FORMAT_GERBER: case PLOT_FORMAT_GERBER:
g_pcb_plot_options.Scale = 1.0; // No scale option allowed in gerber format g_PcbPlotOptions.m_PlotScale = 1.0; // No scale option allowed in gerber format
ext = wxT( "pho" ); ext = wxT( "pho" );
break; break;
...@@ -586,16 +588,16 @@ void DIALOG_PLOT::Plot( wxCommandEvent& event ) ...@@ -586,16 +588,16 @@ void DIALOG_PLOT::Plot( wxCommandEvent& event )
break; break;
case PLOT_FORMAT_DXF: case PLOT_FORMAT_DXF:
g_pcb_plot_options.Scale = 1.0; g_PcbPlotOptions.m_PlotScale = 1.0;
ext = wxT( "dxf" ); ext = wxT( "dxf" );
break; break;
} }
// Test for a reasonable scale value // Test for a reasonable scale value
if( g_pcb_plot_options.Scale < MIN_SCALE ) if( g_PcbPlotOptions.m_PlotScale < MIN_SCALE )
DisplayInfoMessage( this, DisplayInfoMessage( this,
_( "Warning: Scale option set to a very small value" ) ); _( "Warning: Scale option set to a very small value" ) );
if( g_pcb_plot_options.Scale > MAX_SCALE ) if( g_PcbPlotOptions.m_PlotScale > MAX_SCALE )
DisplayInfoMessage( this, DisplayInfoMessage( this,
_( "Warning: Scale option set to a very large value" ) ); _( "Warning: Scale option set to a very large value" ) );
...@@ -611,7 +613,7 @@ void DIALOG_PLOT::Plot( wxCommandEvent& event ) ...@@ -611,7 +613,7 @@ void DIALOG_PLOT::Plot( wxCommandEvent& event )
s_SelectedLayers |= mask; s_SelectedLayers |= mask;
fn = m_Parent->GetScreen()->m_FileName; fn = m_Parent->GetScreen()->m_FileName;
fn.SetPath( m_OutputDirectory->GetValue() ); fn.SetPath( m_outputDirectoryName->GetValue() );
// Create file name. // Create file name.
wxString layername = board->GetLayerName( layer ); wxString layername = board->GetLayerName( layer );
...@@ -620,7 +622,7 @@ void DIALOG_PLOT::Plot( wxCommandEvent& event ) ...@@ -620,7 +622,7 @@ void DIALOG_PLOT::Plot( wxCommandEvent& event )
// Use Gerber Extensions based on layer number // Use Gerber Extensions based on layer number
// (See http://en.wikipedia.org/wiki/Gerber_File) // (See http://en.wikipedia.org/wiki/Gerber_File)
if( (format == PLOT_FORMAT_GERBER) && m_Use_Gerber_Extensions->GetValue() ) if( (format == PLOT_FORMAT_GERBER) && m_useGerberExtensions->GetValue() )
{ {
switch( layer ) switch( layer )
{ {
...@@ -704,23 +706,23 @@ void DIALOG_PLOT::Plot( wxCommandEvent& event ) ...@@ -704,23 +706,23 @@ void DIALOG_PLOT::Plot( wxCommandEvent& event )
{ {
case PLOT_FORMAT_POST: case PLOT_FORMAT_POST:
success = m_Parent->Genere_PS( fn.GetFullPath(), layer, useA4(), success = m_Parent->Genere_PS( fn.GetFullPath(), layer, useA4(),
g_pcb_plot_options.Trace_Mode ); g_PcbPlotOptions.m_PlotMode );
break; break;
case PLOT_FORMAT_GERBER: case PLOT_FORMAT_GERBER:
success = m_Parent->Genere_GERBER( fn.GetFullPath(), layer, success = m_Parent->Genere_GERBER( fn.GetFullPath(), layer,
s_PlotOriginIsAuxAxis, s_PlotOriginIsAuxAxis,
g_pcb_plot_options.Trace_Mode ); g_PcbPlotOptions.m_PlotMode );
break; break;
case PLOT_FORMAT_HPGL: case PLOT_FORMAT_HPGL:
success = m_Parent->Genere_HPGL( fn.GetFullPath(), layer, success = m_Parent->Genere_HPGL( fn.GetFullPath(), layer,
g_pcb_plot_options.Trace_Mode ); g_PcbPlotOptions.m_PlotMode );
break; break;
case PLOT_FORMAT_DXF: case PLOT_FORMAT_DXF:
success = m_Parent->Genere_DXF( fn.GetFullPath(), layer, success = m_Parent->Genere_DXF( fn.GetFullPath(), layer,
g_pcb_plot_options.Trace_Mode ); g_PcbPlotOptions.m_PlotMode );
break; break;
} }
...@@ -731,7 +733,7 @@ void DIALOG_PLOT::Plot( wxCommandEvent& event ) ...@@ -731,7 +733,7 @@ void DIALOG_PLOT::Plot( wxCommandEvent& event )
else else
msg.Printf( _( "Unable to create <%s>" ), GetChars( fn.GetFullPath() ) ); msg.Printf( _( "Unable to create <%s>" ), GetChars( fn.GetFullPath() ) );
msg << wxT( "\n" ); msg << wxT( "\n" );
m_MessagesBox->AppendText( msg ); m_messagesBox->AppendText( msg );
} }
} }
...@@ -745,8 +747,6 @@ void DIALOG_PLOT::Plot( wxCommandEvent& event ) ...@@ -745,8 +747,6 @@ void DIALOG_PLOT::Plot( wxCommandEvent& event )
void WinEDA_PcbFrame::ToPlotter( wxCommandEvent& event ) void WinEDA_PcbFrame::ToPlotter( wxCommandEvent& event )
{ {
DIALOG_PLOT* frame = new DIALOG_PLOT( this ); DIALOG_PLOT dlg( this );
dlg.ShowModal();
frame->ShowModal();
frame->Destroy();
} }
...@@ -25,61 +25,66 @@ ...@@ -25,61 +25,66 @@
// Small drill marks diameter value (in internal value = 1/10000 inch) // Small drill marks diameter value (in internal value = 1/10000 inch)
#define SMALL_DRILL 150 #define SMALL_DRILL 150
/* Plot Options : */ /* a helper class to handle plot parameters and options when plotting/printing a board
class PCB_Plot_Options */
class PCB_PLOT_PARAMS
{ {
public: public:
bool Exclude_Edges_Pcb; bool m_ExcludeEdgeLayer; // True: do not plot edge layer when plotting other layers
int PlotLine_Width; // False: Edge layer always plotted (merged) when plotting other layers
bool Plot_Frame_Ref; // True to plot/print frame references int m_PlotLineWidth;
bool DrawViaOnMaskLayer; // True if vias are drawn on Mask layer bool m_PlotFrameRef; // True to plot/print frame references
// (ie protected by mask) bool m_PlotViaOnMaskLayer; // True if vias are drawn on Mask layer
GRTraceMode Trace_Mode; // (ie protected by mask)
bool Plot_Set_MIROIR; GRTraceMode m_PlotMode; // = FILAIRE, FILLED or SKETCH: select how to plot filled objects.
int HPGL_Pen_Num; // depending on plot format or layers, all options are not always allowed
int HPGL_Pen_Speed; int m_HPGLPenNum;
int HPGL_Pen_Diam; int m_HPGLPenSpeed;
int HPGL_Pen_Recouvrement; int m_HPGLPenDiam;
int PlotPSColorOpt; // True for color Postscript output int m_HPGLPenOvr;
bool Plot_PS_Negative; // True to create a negative board ps plot int m_PlotPSColorOpt; // True for color Postscript output
bool m_PlotPSNegative; // True to create a negative board ps plot
/// Flags to enable or disable ploting of various PCB elements.
bool Sel_Texte_Reference; /* Flags to enable or disable ploting of various PCB elements. */
bool Sel_Texte_Valeur; bool m_PlotReference;
bool Sel_Texte_Divers; bool m_PlotValue;
bool Sel_Texte_Invisible; bool m_PlotTextOther;
bool PlotPadsOnSilkLayer; ///< allows pads on silkscreen bool m_PlotInvisibleTexts;
bool m_PlotPadsOnSilkLayer; ///< allows pads outlines on silkscreen layer (when pads are also o, silk screen
bool m_SubtractMaskFromSilk; bool m_SubtractMaskFromSilk;
/// id for plot format (see enum PlotFormat in plot_common.h) /// id for plot format (see enum PlotFormat in plot_common.h) */
int PlotFormat; int m_PlotFormat; // Gerber, HPGL ...
int PlotOrient; bool m_PlotMirror;
int PlotScaleOpt;
enum DrillShapeOptT enum DrillShapeOptT {
{
NO_DRILL_SHAPE = 0, NO_DRILL_SHAPE = 0,
SMALL_DRILL_SHAPE = 1, SMALL_DRILL_SHAPE = 1,
FULL_DRILL_SHAPE = 2 FULL_DRILL_SHAPE = 2
}; };
DrillShapeOptT m_DrillShapeOpt; // For postscript output: holes can be not plotted,
DrillShapeOptT DrillShapeOpt; // or have a small size or plotted with their actual size
double Scale; bool m_AutoScale; // If true, use the better scale to fit in page
double ScaleAdjX; double m_PlotScale; // The global scale factor. a 1.0 scale factor plot a board
double ScaleAdjY; // with its actual size.
// These next two scale factors are intended to compensable plotters (and mainly printers) X and Y scale error.
// Therefore they are expected very near 1.0
// Only X and Y dimensions are adjusted: circles are plotted as circle, even if X and Y fine scale differ.
double m_FineScaleAdjustX; // fine scale adjust X axis
double m_FineScaleAdjustY; // dine scale adjust Y axis
private: private:
wxString outputDirectory; wxString outputDirectory;
public: public:
PCB_Plot_Options(); PCB_PLOT_PARAMS();
void SetOutputDirectory( wxString aDir ) { outputDirectory = aDir; }; void SetOutputDirectory( wxString aDir ) { outputDirectory = aDir; };
wxString GetOutputDirectory() { return outputDirectory; }; wxString GetOutputDirectory() { return outputDirectory; };
void SetSubtractMaskFromSilk( bool aSubtract ) { m_SubtractMaskFromSilk = aSubtract; }; void SetSubtractMaskFromSilk( bool aSubtract ) { m_SubtractMaskFromSilk = aSubtract; };
bool GetSubtractMaskFromSilk() { return m_SubtractMaskFromSilk; }; bool GetSubtractMaskFromSilk() { return m_SubtractMaskFromSilk; };
}; };
extern PCB_Plot_Options g_pcb_plot_options; extern PCB_PLOT_PARAMS g_PcbPlotOptions;
void PlotTextePcb( PLOTTER* plotter, TEXTE_PCB* pt_texte, int masque_layer, void PlotTextePcb( PLOTTER* plotter, TEXTE_PCB* pt_texte, int masque_layer,
...@@ -91,7 +96,7 @@ void PlotDrawSegment( PLOTTER* plotter, DRAWSEGMENT* PtSegm, int masque_layer, ...@@ -91,7 +96,7 @@ void PlotDrawSegment( PLOTTER* plotter, DRAWSEGMENT* PtSegm, int masque_layer,
GRTraceMode trace_mode ); GRTraceMode trace_mode );
void PlotDimension( PLOTTER* plotter, DIMENSION* Dimension, int masque_layer, void PlotDimension( PLOTTER* plotter, DIMENSION* Dimension, int masque_layer,
GRTraceMode trace_mode ); GRTraceMode trace_mode );
void PlotMirePcb( PLOTTER* plotter, MIREPCB* PtMire, int masque_layer, void PlotMirePcb( PLOTTER* plotter, MIREPCB* PtMire, int masque_layer,
GRTraceMode trace_mode ); GRTraceMode trace_mode );
......
...@@ -67,7 +67,7 @@ void WinEDA_BasePcbFrame::Plot_Serigraphie( PLOTTER* plotter, ...@@ -67,7 +67,7 @@ void WinEDA_BasePcbFrame::Plot_Serigraphie( PLOTTER* plotter,
/* Plot pads (creates pads outlines, for pads on silkscreen layers) */ /* Plot pads (creates pads outlines, for pads on silkscreen layers) */
int layersmask_plotpads = masque_layer; int layersmask_plotpads = masque_layer;
// Calculate the mask layers of allowed layers for pads // Calculate the mask layers of allowed layers for pads
if( !g_pcb_plot_options.PlotPadsOnSilkLayer ) // Do not plot pads on silk screen layers if( !g_PcbPlotOptions.m_PlotPadsOnSilkLayer ) // Do not plot pads on silk screen layers
layersmask_plotpads &= ~(SILKSCREEN_LAYER_BACK | SILKSCREEN_LAYER_FRONT ); layersmask_plotpads &= ~(SILKSCREEN_LAYER_BACK | SILKSCREEN_LAYER_FRONT );
if( layersmask_plotpads ) if( layersmask_plotpads )
{ {
...@@ -112,8 +112,8 @@ void WinEDA_BasePcbFrame::Plot_Serigraphie( PLOTTER* plotter, ...@@ -112,8 +112,8 @@ void WinEDA_BasePcbFrame::Plot_Serigraphie( PLOTTER* plotter,
for( MODULE* Module = m_Pcb->m_Modules; Module; Module = Module->Next() ) for( MODULE* Module = m_Pcb->m_Modules; Module; Module = Module->Next() )
{ {
/* see if we want to plot VALUE and REF fields */ /* see if we want to plot VALUE and REF fields */
trace_val = g_pcb_plot_options.Sel_Texte_Valeur; trace_val = g_PcbPlotOptions.m_PlotValue;
trace_ref = g_pcb_plot_options.Sel_Texte_Reference; trace_ref = g_PcbPlotOptions.m_PlotReference;
TEXTE_MODULE* text = Module->m_Reference; TEXTE_MODULE* text = Module->m_Reference;
unsigned textLayer = text->GetLayer(); unsigned textLayer = text->GetLayer();
...@@ -132,7 +132,7 @@ module\n %s's \"reference\" text." ), ...@@ -132,7 +132,7 @@ module\n %s's \"reference\" text." ),
if( ( ( 1 << textLayer ) & masque_layer ) == 0 ) if( ( ( 1 << textLayer ) & masque_layer ) == 0 )
trace_ref = FALSE; trace_ref = FALSE;
if( text->m_NoShow && !g_pcb_plot_options.Sel_Texte_Invisible ) if( text->m_NoShow && !g_PcbPlotOptions.m_PlotInvisibleTexts )
trace_ref = FALSE; trace_ref = FALSE;
text = Module->m_Value; text = Module->m_Value;
...@@ -152,7 +152,7 @@ module\n %s's \"value\" text." ), ...@@ -152,7 +152,7 @@ module\n %s's \"value\" text." ),
if( ( (1 << textLayer) & masque_layer ) == 0 ) if( ( (1 << textLayer) & masque_layer ) == 0 )
trace_val = FALSE; trace_val = FALSE;
if( text->m_NoShow && !g_pcb_plot_options.Sel_Texte_Invisible ) if( text->m_NoShow && !g_PcbPlotOptions.m_PlotInvisibleTexts )
trace_val = FALSE; trace_val = FALSE;
/* Plot text fields, if allowed */ /* Plot text fields, if allowed */
...@@ -169,10 +169,10 @@ module\n %s's \"value\" text." ), ...@@ -169,10 +169,10 @@ module\n %s's \"value\" text." ),
if( pt_texte->Type() != TYPE_TEXTE_MODULE ) if( pt_texte->Type() != TYPE_TEXTE_MODULE )
continue; continue;
if( !g_pcb_plot_options.Sel_Texte_Divers ) if( !g_PcbPlotOptions.m_PlotTextOther )
continue; continue;
if( (pt_texte->m_NoShow) if( (pt_texte->m_NoShow)
&& !g_pcb_plot_options.Sel_Texte_Invisible ) && !g_PcbPlotOptions.m_PlotInvisibleTexts )
continue; continue;
textLayer = pt_texte->GetLayer(); textLayer = pt_texte->GetLayer();
...@@ -644,7 +644,7 @@ void PlotDrawSegment( PLOTTER* plotter, DRAWSEGMENT* pt_segm, int masque_layer, ...@@ -644,7 +644,7 @@ void PlotDrawSegment( PLOTTER* plotter, DRAWSEGMENT* pt_segm, int masque_layer,
return; return;
if( trace_mode == FILAIRE ) if( trace_mode == FILAIRE )
thickness = g_pcb_plot_options.PlotLine_Width; thickness = g_PcbPlotOptions.m_PlotLineWidth;
else else
thickness = pt_segm->m_Width; thickness = pt_segm->m_Width;
...@@ -697,7 +697,7 @@ void WinEDA_BasePcbFrame::Plot_Layer( PLOTTER* plotter, int Layer, ...@@ -697,7 +697,7 @@ void WinEDA_BasePcbFrame::Plot_Layer( PLOTTER* plotter, int Layer,
// in addition to the contents of the currently specified layer. // in addition to the contents of the currently specified layer.
int layer_mask = g_TabOneLayerMask[Layer]; int layer_mask = g_TabOneLayerMask[Layer];
if( !g_pcb_plot_options.Exclude_Edges_Pcb ) if( !g_PcbPlotOptions.m_ExcludeEdgeLayer )
layer_mask |= EDGE_LAYER; layer_mask |= EDGE_LAYER;
switch( Layer ) switch( Layer )
...@@ -722,21 +722,19 @@ void WinEDA_BasePcbFrame::Plot_Layer( PLOTTER* plotter, int Layer, ...@@ -722,21 +722,19 @@ void WinEDA_BasePcbFrame::Plot_Layer( PLOTTER* plotter, int Layer,
// Adding drill marks, if required and if the plotter is able to plot // Adding drill marks, if required and if the plotter is able to plot
// them: // them:
if( g_pcb_plot_options.DrillShapeOpt != if( g_PcbPlotOptions.m_DrillShapeOpt != PCB_PLOT_PARAMS::NO_DRILL_SHAPE )
PCB_Plot_Options::NO_DRILL_SHAPE )
{ {
if( plotter->GetPlotterType() == PLOT_FORMAT_POST ) if( plotter->GetPlotterType() == PLOT_FORMAT_POST )
PlotDrillMark( plotter, PlotDrillMark( plotter, trace_mode,
trace_mode, g_PcbPlotOptions.m_DrillShapeOpt ==
g_pcb_plot_options.DrillShapeOpt == PCB_PLOT_PARAMS::SMALL_DRILL_SHAPE );
PCB_Plot_Options::SMALL_DRILL_SHAPE );
} }
break; break;
case SOLDERMASK_N_BACK: case SOLDERMASK_N_BACK:
case SOLDERMASK_N_FRONT: case SOLDERMASK_N_FRONT:
Plot_Standard_Layer( plotter, layer_mask, Plot_Standard_Layer( plotter, layer_mask,
g_pcb_plot_options.DrawViaOnMaskLayer, trace_mode ); g_PcbPlotOptions.m_PlotViaOnMaskLayer, trace_mode );
break; break;
case SOLDERPASTE_N_BACK: case SOLDERPASTE_N_BACK:
...@@ -749,7 +747,7 @@ void WinEDA_BasePcbFrame::Plot_Layer( PLOTTER* plotter, int Layer, ...@@ -749,7 +747,7 @@ void WinEDA_BasePcbFrame::Plot_Layer( PLOTTER* plotter, int Layer,
// Gerber: Subtract soldermask from silkscreen if enabled // Gerber: Subtract soldermask from silkscreen if enabled
if( plotter->GetPlotterType() == PLOT_FORMAT_GERBER if( plotter->GetPlotterType() == PLOT_FORMAT_GERBER
&& g_pcb_plot_options.GetSubtractMaskFromSilk() ) && g_PcbPlotOptions.GetSubtractMaskFromSilk() )
{ {
if( Layer == SILKSCREEN_N_FRONT ) if( Layer == SILKSCREEN_N_FRONT )
{ {
...@@ -763,7 +761,7 @@ void WinEDA_BasePcbFrame::Plot_Layer( PLOTTER* plotter, int Layer, ...@@ -763,7 +761,7 @@ void WinEDA_BasePcbFrame::Plot_Layer( PLOTTER* plotter, int Layer,
// Set layer polarity to negative // Set layer polarity to negative
plotter->SetLayerPolarity( false ); plotter->SetLayerPolarity( false );
Plot_Standard_Layer( plotter, layer_mask, Plot_Standard_Layer( plotter, layer_mask,
g_pcb_plot_options.DrawViaOnMaskLayer, g_PcbPlotOptions.m_PlotViaOnMaskLayer,
trace_mode ); trace_mode );
} }
break; break;
...@@ -1013,8 +1011,7 @@ void WinEDA_BasePcbFrame::PlotDrillMark( PLOTTER* aPlotter, ...@@ -1013,8 +1011,7 @@ void WinEDA_BasePcbFrame::PlotDrillMark( PLOTTER* aPlotter,
if( pts->Type() != TYPE_VIA ) if( pts->Type() != TYPE_VIA )
continue; continue;
pos = pts->m_Start; pos = pts->m_Start;
if( g_pcb_plot_options.DrillShapeOpt == if( g_PcbPlotOptions.m_DrillShapeOpt == PCB_PLOT_PARAMS::SMALL_DRILL_SHAPE )
PCB_Plot_Options::SMALL_DRILL_SHAPE )
diam.x = diam.y = SMALL_DRILL; diam.x = diam.y = SMALL_DRILL;
else else
diam.x = diam.y = pts->GetDrillValue(); diam.x = diam.y = pts->GetDrillValue();
......
...@@ -32,7 +32,7 @@ bool WinEDA_BasePcbFrame::Genere_DXF( const wxString& FullFileName, int Layer, ...@@ -32,7 +32,7 @@ bool WinEDA_BasePcbFrame::Genere_DXF( const wxString& FullFileName, int Layer,
plotter->set_filename( FullFileName ); plotter->set_filename( FullFileName );
plotter->start_plot( output_file ); plotter->start_plot( output_file );
if( g_pcb_plot_options.Plot_Frame_Ref ) if( g_PcbPlotOptions.m_PlotFrameRef )
PlotWorkSheet( plotter, GetScreen() ); PlotWorkSheet( plotter, GetScreen() );
Plot_Layer( plotter, Layer, trace_mode ); Plot_Layer( plotter, Layer, trace_mode );
......
...@@ -42,7 +42,7 @@ bool WinEDA_BasePcbFrame::Genere_GERBER( const wxString& FullFileName, int Layer ...@@ -42,7 +42,7 @@ bool WinEDA_BasePcbFrame::Genere_GERBER( const wxString& FullFileName, int Layer
wxPoint offset; wxPoint offset;
/* Calculate scaling from pcbnew units (in 0.1 mil or 0.0001 inch) to gerber units */ /* Calculate scaling from pcbnew units (in 0.1 mil or 0.0001 inch) to gerber units */
double scale = g_pcb_plot_options.Scale; double scale = g_PcbPlotOptions.m_PlotScale;
if( PlotOriginIsAuxAxis ) if( PlotOriginIsAuxAxis )
offset = m_Auxiliary_Axis_Position; offset = m_Auxiliary_Axis_Position;
...@@ -56,17 +56,17 @@ bool WinEDA_BasePcbFrame::Genere_GERBER( const wxString& FullFileName, int Layer ...@@ -56,17 +56,17 @@ bool WinEDA_BasePcbFrame::Genere_GERBER( const wxString& FullFileName, int Layer
PLOTTER* plotter = new GERBER_PLOTTER(); PLOTTER* plotter = new GERBER_PLOTTER();
/* No mirror and scaling for gerbers! */ /* No mirror and scaling for gerbers! */
plotter->set_viewport( offset, scale, 0 ); plotter->set_viewport( offset, scale, 0 );
plotter->set_default_line_width( g_pcb_plot_options.PlotLine_Width ); plotter->set_default_line_width( g_PcbPlotOptions.m_PlotLineWidth );
plotter->set_creator( wxT( "PCBNEW-RS274X" ) ); plotter->set_creator( wxT( "PCBNEW-RS274X" ) );
plotter->set_filename( FullFileName ); plotter->set_filename( FullFileName );
if( plotter->start_plot( output_file ) ) if( plotter->start_plot( output_file ) )
{ {
// Sheet refs on gerber CAN be useful... and they're always 1:1 // Sheet refs on gerber CAN be useful... and they're always 1:1
if( g_pcb_plot_options.Plot_Frame_Ref ) if( g_PcbPlotOptions.m_PlotFrameRef )
PlotWorkSheet( plotter, GetScreen() ); PlotWorkSheet( plotter, GetScreen() );
Plot_Layer( plotter, Layer, trace_mode );
Plot_Layer( plotter, Layer, trace_mode );
plotter->end_plot(); plotter->end_plot();
} }
......
...@@ -29,26 +29,26 @@ bool WinEDA_BasePcbFrame::Genere_HPGL( const wxString& FullFileName, int Layer, ...@@ -29,26 +29,26 @@ bool WinEDA_BasePcbFrame::Genere_HPGL( const wxString& FullFileName, int Layer,
{ {
return false; return false;
} }
// Compute pen_dim (from g_HPGL_Pen_Diam in mils) in pcb units, // Compute pen_dim (from g_m_HPGLPenDiam in mils) in pcb units,
// with plot scale (if Scale is 2, pen diameter is always g_HPGL_Pen_Diam // with plot scale (if Scale is 2, pen diameter is always g_m_HPGLPenDiam
// so apparent pen diam is real pen diam / Scale // so apparent pen diam is real pen diam / Scale
int pen_diam = wxRound( (g_pcb_plot_options.HPGL_Pen_Diam * U_PCB) / g_pcb_plot_options.Scale ); int pen_diam = wxRound( (g_PcbPlotOptions.m_HPGLPenDiam * U_PCB) / g_PcbPlotOptions.m_PlotScale );
// compute pen_recouvrement (from g_HPGL_Pen_Recouvrement in mils) // compute pen_overlay (from g_m_HPGLPenOvr in mils)
// with plot scale // with plot scale
if( g_pcb_plot_options.HPGL_Pen_Recouvrement < 0 ) if( g_PcbPlotOptions.m_HPGLPenOvr < 0 )
g_pcb_plot_options.HPGL_Pen_Recouvrement = 0; g_PcbPlotOptions.m_HPGLPenOvr = 0;
if( g_pcb_plot_options.HPGL_Pen_Recouvrement >= g_pcb_plot_options.HPGL_Pen_Diam ) if( g_PcbPlotOptions.m_HPGLPenOvr >= g_PcbPlotOptions.m_HPGLPenDiam )
g_pcb_plot_options.HPGL_Pen_Recouvrement = g_pcb_plot_options.HPGL_Pen_Diam - 1; g_PcbPlotOptions.m_HPGLPenOvr = g_PcbPlotOptions.m_HPGLPenDiam - 1;
int pen_recouvrement = wxRound( int pen_overlay = wxRound(
g_pcb_plot_options.HPGL_Pen_Recouvrement * 10.0 / g_pcb_plot_options.Scale ); g_PcbPlotOptions.m_HPGLPenOvr * 10.0 / g_PcbPlotOptions.m_PlotScale );
SetLocaleTo_C_standard(); SetLocaleTo_C_standard();
if( g_pcb_plot_options.PlotScaleOpt != 1 ) if( g_PcbPlotOptions.m_PlotScale != 1.0 || g_PcbPlotOptions.m_AutoScale )
Center = TRUE; // Scale != 1 so center PCB plot. Center = true; // when scale != 1.0 we must calculate the position in page
// because actual position has no meaning
// Scale units from 0.0001" to HPGL plot units. // Scale units from 0.0001" to HPGL plot units.
SheetSize.x = currentsheet->m_Size.x * U_PCB; SheetSize.x = currentsheet->m_Size.x * U_PCB;
...@@ -59,7 +59,7 @@ bool WinEDA_BasePcbFrame::Genere_HPGL( const wxString& FullFileName, int Layer, ...@@ -59,7 +59,7 @@ bool WinEDA_BasePcbFrame::Genere_HPGL( const wxString& FullFileName, int Layer,
BoardSize = m_Pcb->m_BoundaryBox.GetSize(); BoardSize = m_Pcb->m_BoundaryBox.GetSize();
BoardCenter = m_Pcb->m_BoundaryBox.Centre(); BoardCenter = m_Pcb->m_BoundaryBox.Centre();
if( g_pcb_plot_options.PlotScaleOpt == 0 ) // Optimum scale if( g_PcbPlotOptions.m_AutoScale ) // Optimum scale
{ {
double Xscale, Yscale; double Xscale, Yscale;
...@@ -69,7 +69,7 @@ bool WinEDA_BasePcbFrame::Genere_HPGL( const wxString& FullFileName, int Layer, ...@@ -69,7 +69,7 @@ bool WinEDA_BasePcbFrame::Genere_HPGL( const wxString& FullFileName, int Layer,
scale = MIN( Xscale, Yscale ); scale = MIN( Xscale, Yscale );
} }
else else
scale = g_pcb_plot_options.Scale; scale = g_PcbPlotOptions.m_PlotScale;
// Calculate the page size offset. // Calculate the page size offset.
if( Center ) if( Center )
...@@ -87,20 +87,19 @@ bool WinEDA_BasePcbFrame::Genere_HPGL( const wxString& FullFileName, int Layer, ...@@ -87,20 +87,19 @@ bool WinEDA_BasePcbFrame::Genere_HPGL( const wxString& FullFileName, int Layer,
HPGL_PLOTTER* plotter = new HPGL_PLOTTER(); HPGL_PLOTTER* plotter = new HPGL_PLOTTER();
plotter->set_paper_size( currentsheet ); plotter->set_paper_size( currentsheet );
plotter->set_viewport( offset, scale, plotter->set_viewport( offset, scale, g_PcbPlotOptions.m_PlotMirror );
g_pcb_plot_options.PlotOrient ); plotter->set_default_line_width( g_PcbPlotOptions.m_PlotLineWidth );
plotter->set_default_line_width( g_pcb_plot_options.PlotLine_Width );
plotter->set_creator( wxT( "PCBNEW-HPGL" ) ); plotter->set_creator( wxT( "PCBNEW-HPGL" ) );
plotter->set_filename( FullFileName ); plotter->set_filename( FullFileName );
plotter->set_pen_speed( g_pcb_plot_options.HPGL_Pen_Speed ); plotter->set_pen_speed( g_PcbPlotOptions.m_HPGLPenSpeed );
plotter->set_pen_number( g_pcb_plot_options.HPGL_Pen_Num ); plotter->set_pen_number( g_PcbPlotOptions.m_HPGLPenNum );
plotter->set_pen_overlap( pen_recouvrement ); plotter->set_pen_overlap( pen_overlay );
plotter->set_pen_diameter( pen_diam ); plotter->set_pen_diameter( pen_diam );
plotter->start_plot( output_file ); plotter->start_plot( output_file );
/* The worksheet is not significant with scale!=1... It is with /* The worksheet is not significant with scale!=1... It is with
* paperscale!=1, anyway */ * paperscale!=1, anyway */
if( g_pcb_plot_options.Plot_Frame_Ref && !Center ) if( g_PcbPlotOptions.m_PlotFrameRef && !Center )
PlotWorkSheet( plotter, GetScreen() ); PlotWorkSheet( plotter, GetScreen() );
Plot_Layer( plotter, Layer, trace_mode ); Plot_Layer( plotter, Layer, trace_mode );
......
...@@ -37,12 +37,13 @@ bool WinEDA_BasePcbFrame::Genere_PS( const wxString& FullFileName, int Layer, ...@@ -37,12 +37,13 @@ bool WinEDA_BasePcbFrame::Genere_PS( const wxString& FullFileName, int Layer,
SetLocaleTo_C_standard(); SetLocaleTo_C_standard();
if( g_pcb_plot_options.PlotScaleOpt != 1 ) if( g_PcbPlotOptions.m_PlotScale != 1.0 || g_PcbPlotOptions.m_AutoScale )
Center = TRUE; // Scale != 1 so center plot. Center = true; // when scale != 1.0 we must calculate the position in page
// because actual position has no meaning
// Set default line width // Set default line width
if( g_pcb_plot_options.PlotLine_Width < 1 ) if( g_PcbPlotOptions.m_PlotLineWidth < 1 )
g_pcb_plot_options.PlotLine_Width = 1; g_PcbPlotOptions.m_PlotLineWidth = 1;
SheetSize.x = currentsheet->m_Size.x * U_PCB; SheetSize.x = currentsheet->m_Size.x * U_PCB;
SheetSize.y = currentsheet->m_Size.y * U_PCB; SheetSize.y = currentsheet->m_Size.y * U_PCB;
...@@ -65,7 +66,7 @@ bool WinEDA_BasePcbFrame::Genere_PS( const wxString& FullFileName, int Layer, ...@@ -65,7 +66,7 @@ bool WinEDA_BasePcbFrame::Genere_PS( const wxString& FullFileName, int Layer,
BoardSize = m_Pcb->m_BoundaryBox.GetSize(); BoardSize = m_Pcb->m_BoundaryBox.GetSize();
BoardCenter = m_Pcb->m_BoundaryBox.Centre(); BoardCenter = m_Pcb->m_BoundaryBox.Centre();
if( g_pcb_plot_options.PlotScaleOpt == 0 ) // Optimum scale if( g_PcbPlotOptions.m_AutoScale ) // Optimum scale
{ {
double Xscale, Yscale; double Xscale, Yscale;
...@@ -75,7 +76,7 @@ bool WinEDA_BasePcbFrame::Genere_PS( const wxString& FullFileName, int Layer, ...@@ -75,7 +76,7 @@ bool WinEDA_BasePcbFrame::Genere_PS( const wxString& FullFileName, int Layer,
scale = MIN( Xscale, Yscale ); scale = MIN( Xscale, Yscale );
} }
else else
scale = g_pcb_plot_options.Scale * paperscale; scale = g_PcbPlotOptions.m_PlotScale * paperscale;
if( Center ) if( Center )
{ {
...@@ -92,24 +93,23 @@ bool WinEDA_BasePcbFrame::Genere_PS( const wxString& FullFileName, int Layer, ...@@ -92,24 +93,23 @@ bool WinEDA_BasePcbFrame::Genere_PS( const wxString& FullFileName, int Layer,
PS_PLOTTER* plotter = new PS_PLOTTER(); PS_PLOTTER* plotter = new PS_PLOTTER();
plotter->set_paper_size( SheetPS ); plotter->set_paper_size( SheetPS );
plotter->set_scale_adjust( g_pcb_plot_options.ScaleAdjX, plotter->set_scale_adjust( g_PcbPlotOptions.m_FineScaleAdjustX,
g_pcb_plot_options.ScaleAdjY ); g_PcbPlotOptions.m_FineScaleAdjustX );
plotter->set_viewport( offset, scale, plotter->set_viewport( offset, scale, g_PcbPlotOptions.m_PlotMirror );
g_pcb_plot_options.PlotOrient ); plotter->set_default_line_width( g_PcbPlotOptions.m_PlotLineWidth );
plotter->set_default_line_width( g_pcb_plot_options.PlotLine_Width );
plotter->set_creator( wxT( "PCBNEW-PS" ) ); plotter->set_creator( wxT( "PCBNEW-PS" ) );
plotter->set_filename( FullFileName ); plotter->set_filename( FullFileName );
plotter->start_plot( output_file ); plotter->start_plot( output_file );
/* The worksheet is not significant with scale!=1... It is with /* The worksheet is not significant with scale!=1... It is with
* paperscale!=1, anyway */ * paperscale!=1, anyway */
if( g_pcb_plot_options.Plot_Frame_Ref && !Center ) if( g_PcbPlotOptions.m_PlotFrameRef && !Center )
PlotWorkSheet( plotter, GetScreen() ); PlotWorkSheet( plotter, GetScreen() );
// If plot a negative board: // If plot a negative board:
// Draw a black rectangle (background for plot board in white) // Draw a black rectangle (background for plot board in white)
// and switch the current color to WHITE // and switch the current color to WHITE
if( g_pcb_plot_options.Plot_PS_Negative ) if( g_PcbPlotOptions.m_PlotPSNegative )
{ {
int margin = 500; // Add a 0.5 inch margin around the board int margin = 500; // Add a 0.5 inch margin around the board
plotter->set_negative( true ); plotter->set_negative( true );
......
release version: release version:
2010 dec 06 (BZR testing 2644) 2010 dec 10 (BZR testing 26xx)
files (.zip,.tgz): files (.zip,.tgz):
kicad-2010-12-06-testing kicad-2010-12-10-testing
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment