Commit f8490ff4 authored by Dick Hollenbeck's avatar Dick Hollenbeck

Remove g_PcbPlotOptions, use wxformbuilder to subclass DIALOG_SHIM on several dialogs

parent e4309287
...@@ -18,7 +18,7 @@ Documentation/doxygen ...@@ -18,7 +18,7 @@ Documentation/doxygen
*.cmake *.cmake
*.bak *.bak
common/pcb_plot_params_keywords.cpp common/pcb_plot_params_keywords.cpp
common/pcb_plot_params_lexer.h include/pcb_plot_params_lexer.h
pcbnew/specctra_keywords.cpp pcbnew/specctra_keywords.cpp
pcbnew/specctra_lexer.h pcbnew/specctra_lexer.h
new/html new/html
......
...@@ -254,7 +254,6 @@ set(INC_AFTER ...@@ -254,7 +254,6 @@ set(INC_AFTER
############ ############
# Binaries # # Binaries #
############ ############
add_subdirectory(3d-viewer)
if( USE_PNG_BITMAPS ) if( USE_PNG_BITMAPS )
add_subdirectory(bitmaps_png) add_subdirectory(bitmaps_png)
...@@ -262,8 +261,8 @@ else() ...@@ -262,8 +261,8 @@ else()
add_subdirectory(bitmaps_xpm) add_subdirectory(bitmaps_xpm)
endif() endif()
add_subdirectory(common) add_subdirectory(common)
add_subdirectory(3d-viewer)
add_subdirectory(cvpcb) add_subdirectory(cvpcb)
add_subdirectory(eeschema) add_subdirectory(eeschema)
add_subdirectory(gerbview) add_subdirectory(gerbview)
......
...@@ -113,6 +113,7 @@ set(PCB_COMMON_SRCS ...@@ -113,6 +113,7 @@ set(PCB_COMMON_SRCS
../pcbnew/classpcb.cpp ../pcbnew/classpcb.cpp
../pcbnew/collectors.cpp ../pcbnew/collectors.cpp
../pcbnew/sel_layer.cpp ../pcbnew/sel_layer.cpp
../pcbnew/pcb_plot_params.cpp
pcb_plot_params_keywords.cpp pcb_plot_params_keywords.cpp
dialogs/dialog_page_settings.cpp dialogs/dialog_page_settings.cpp
) )
...@@ -142,7 +143,7 @@ make_lexer( ...@@ -142,7 +143,7 @@ make_lexer(
# auto-generate pcb_plot_params_lexer.h and pcb_plot_params_keywords.cpp # auto-generate pcb_plot_params_lexer.h and pcb_plot_params_keywords.cpp
make_lexer( make_lexer(
${CMAKE_CURRENT_SOURCE_DIR}/pcb_plot_params.keywords ${CMAKE_CURRENT_SOURCE_DIR}/pcb_plot_params.keywords
${CMAKE_CURRENT_SOURCE_DIR}/pcb_plot_params_lexer.h ${PROJECT_SOURCE_DIR}/include/pcb_plot_params_lexer.h
${CMAKE_CURRENT_SOURCE_DIR}/pcb_plot_params_keywords.cpp ${CMAKE_CURRENT_SOURCE_DIR}/pcb_plot_params_keywords.cpp
PCBPLOTPARAMS_T PCBPLOTPARAMS_T
) )
......
...@@ -438,9 +438,9 @@ limits\n%.1f - %.1f %s!\nSelect another custom paper size?" ), ...@@ -438,9 +438,9 @@ limits\n%.1f - %.1f %s!\nSelect another custom paper size?" ),
PAGE_INFO::SetCustomWidthMils( m_layout_size.x ); PAGE_INFO::SetCustomWidthMils( m_layout_size.x );
PAGE_INFO::SetCustomHeightMils( m_layout_size.y ); PAGE_INFO::SetCustomHeightMils( m_layout_size.y );
m_pageInfo.SetWidthMils( m_layout_size.x ); m_pageInfo.SetWidthMils( m_layout_size.x );
m_pageInfo.SetHeightMils( m_layout_size.y ); m_pageInfo.SetHeightMils( m_layout_size.y );
m_pageInfo.SetPortrait( m_layout_size.x < m_layout_size.y );
} }
} }
else else
......
...@@ -139,22 +139,21 @@ extern const wxString g_SchematicBackupFileExtension; ...@@ -139,22 +139,21 @@ extern const wxString g_SchematicBackupFileExtension;
extern LayerStruct g_LayerDescr; extern LayerStruct g_LayerDescr;
extern bool g_EditPinByPinIsOn; /* True to prevent displacing /// True to prevent displacing pins, when they are at the same position.
* pins, when they are at the extern bool g_EditPinByPinIsOn;
* same position. */
/**
extern int g_DrawDefaultLineThickness; /* Default line (in Eeschema * Default line (in Eeschema units) thickness used to draw/plot items having a
* units) thickness used to * default thickness line value (i.e. = 0 ).
* draw/plot items having a * 0 = single pixel line width.
* default thickness line */
* value (i.e. = 0 ). extern int g_DrawDefaultLineThickness;
* 0 = single pixel line width
*/
/// Color to draw selected items
// Color to draw selected items
extern int g_ItemSelectetColor; extern int g_ItemSelectetColor;
// Color to draw items flagged invisible, in libedit (they are invisible in Eeschema /// Color to draw items flagged invisible, in libedit (they are invisible in Eeschema
extern int g_InvisibleItemColor; extern int g_InvisibleItemColor;
/* Global Variables */ /* Global Variables */
......
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
* @brief Classes used in Pcbnew, CvPcb and GerbView. * @brief Classes used in Pcbnew, CvPcb and GerbView.
*/ */
#ifndef WX_BASE_PCB_FRAME_H #ifndef WX_BASE_PCB_FRAME_H_
#define WX_BASE_PCB_FRAME_H #define WX_BASE_PCB_FRAME_H_
#include <vector> #include <vector>
...@@ -59,6 +59,8 @@ class GENERAL_COLLECTOR; ...@@ -59,6 +59,8 @@ class GENERAL_COLLECTOR;
class GENERAL_COLLECTORS_GUIDE; class GENERAL_COLLECTORS_GUIDE;
class BOARD_DESIGN_SETTINGS; class BOARD_DESIGN_SETTINGS;
class ZONE_SETTINGS; class ZONE_SETTINGS;
class PCB_PLOT_PARAMS;
/** /**
* class PCB_BASE_FRAME * class PCB_BASE_FRAME
...@@ -138,6 +140,14 @@ public: ...@@ -138,6 +140,14 @@ public:
const ZONE_SETTINGS& GetZoneSettings() const; const ZONE_SETTINGS& GetZoneSettings() const;
void SetZoneSettings( const ZONE_SETTINGS& aSettings ); void SetZoneSettings( const ZONE_SETTINGS& aSettings );
/**
* Function GetPlotSettings
* returns the PCB_PLOT_PARAMS for the BOARD owned by this frame.
* Overloaded in FOOTPRINT_EDIT_FRAME.
*/
virtual const PCB_PLOT_PARAMS& GetPlotSettings() const;
virtual void SetPlotSettings( const PCB_PLOT_PARAMS& aSettings );
/** /**
* Function SetBoard * Function SetBoard
* sets the m_Pcb member in such as way as to ensure deleting any previous * sets the m_Pcb member in such as way as to ensure deleting any previous
...@@ -674,4 +684,4 @@ public: ...@@ -674,4 +684,4 @@ public:
DECLARE_EVENT_TABLE() DECLARE_EVENT_TABLE()
}; };
#endif /* WX_BASE_PCB_FRAME_H */ #endif // WX_BASE_PCB_FRAME_H_
...@@ -161,7 +161,6 @@ set(PCBNEW_SRCS ...@@ -161,7 +161,6 @@ set(PCBNEW_SRCS
netlist_reader_kicad.cpp netlist_reader_kicad.cpp
onleftclick.cpp onleftclick.cpp
onrightclick.cpp onrightclick.cpp
pcb_plot_params.cpp
pcbnew.cpp pcbnew.cpp
pcbnew_config.cpp pcbnew_config.cpp
pcbplot.cpp pcbplot.cpp
......
...@@ -205,6 +205,20 @@ void PCB_BASE_FRAME::SetZoneSettings( const ZONE_SETTINGS& aSettings ) ...@@ -205,6 +205,20 @@ void PCB_BASE_FRAME::SetZoneSettings( const ZONE_SETTINGS& aSettings )
} }
const PCB_PLOT_PARAMS& PCB_BASE_FRAME::GetPlotSettings() const
{
wxASSERT( m_Pcb );
return m_Pcb->GetPlotOptions();
}
void PCB_BASE_FRAME::SetPlotSettings( const PCB_PLOT_PARAMS& aSettings )
{
wxASSERT( m_Pcb );
m_Pcb->SetPlotOptions( aSettings );
}
EDA_RECT PCB_BASE_FRAME::GetBoardBoundingBox( bool aBoardEdgesOnly ) const EDA_RECT PCB_BASE_FRAME::GetBoardBoundingBox( bool aBoardEdgesOnly ) const
{ {
wxASSERT( m_Pcb ); wxASSERT( m_Pcb );
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
#include <common.h> // PAGE_INFO #include <common.h> // PAGE_INFO
#include <class_title_block.h> #include <class_title_block.h>
#include <class_zone_settings.h> #include <class_zone_settings.h>
#include <pcb_plot_params.h>
class PCB_BASE_FRAME; class PCB_BASE_FRAME;
class PCB_EDIT_FRAME; class PCB_EDIT_FRAME;
...@@ -180,6 +180,7 @@ private: ...@@ -180,6 +180,7 @@ private:
COLORS_DESIGN_SETTINGS* m_colorsSettings; COLORS_DESIGN_SETTINGS* m_colorsSettings;
PAGE_INFO m_paper; PAGE_INFO m_paper;
TITLE_BLOCK m_titles; ///< text in lower right of screen and plots TITLE_BLOCK m_titles; ///< text in lower right of screen and plots
PCB_PLOT_PARAMS m_plotOptions;
/// Position of the origin axis, which is used in exports mostly /// Position of the origin axis, which is used in exports mostly
wxPoint m_originAxisPosition; wxPoint m_originAxisPosition;
...@@ -543,6 +544,9 @@ public: ...@@ -543,6 +544,9 @@ public:
const PAGE_INFO& GetPageSettings() const { return m_paper; } const PAGE_INFO& GetPageSettings() const { return m_paper; }
void SetPageSettings( const PAGE_INFO& aPageSettings ) { m_paper = aPageSettings; } void SetPageSettings( const PAGE_INFO& aPageSettings ) { m_paper = aPageSettings; }
const PCB_PLOT_PARAMS& GetPlotOptions() const { return m_plotOptions; }
void SetPlotOptions( const PCB_PLOT_PARAMS& aOptions ) { m_plotOptions = aOptions; }
const wxPoint& GetOriginAxisPosition() const { return m_originAxisPosition; } const wxPoint& GetOriginAxisPosition() const { return m_originAxisPosition; }
void SetOriginAxisPosition( const wxPoint& aPosition ) { m_originAxisPosition = aPosition; } void SetOriginAxisPosition( const wxPoint& aPosition ) { m_originAxisPosition = aPosition; }
......
...@@ -51,7 +51,7 @@ class BOARD; ...@@ -51,7 +51,7 @@ class BOARD;
* Enum MODULE_ATTR_T * Enum MODULE_ATTR_T
* is the set of attributes allowed within a MODULE, using MODULE::SetAttributes() * is the set of attributes allowed within a MODULE, using MODULE::SetAttributes()
* and MODULE::GetAttributes(). These are to be ORed together when calling * and MODULE::GetAttributes(). These are to be ORed together when calling
* MODULE::SetAttrbute() * MODULE::SetAttributes()
*/ */
enum MODULE_ATTR_T enum MODULE_ATTR_T
{ {
......
...@@ -37,8 +37,6 @@ ...@@ -37,8 +37,6 @@
#define WIDTH_MAX_VALUE 500 #define WIDTH_MAX_VALUE 500
#define WIDTH_MIN_VALUE 1 #define WIDTH_MIN_VALUE 1
extern int g_DrawDefaultLineThickness;
// Local variables: // Local variables:
static PRINT_PARAMETERS s_Parameters; static PRINT_PARAMETERS s_Parameters;
static long s_SelectedLayers = LAYER_BACK | LAYER_FRONT | static long s_SelectedLayers = LAYER_BACK | LAYER_FRONT |
......
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Jun 30 2011) // C++ code generated with wxFormBuilder (version Mar 19 2012)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO "NOT" EDIT THIS FILE! // PLEASE DO "NOT" EDIT THIS FILE!
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
#include "dialog_gen_module_position_file_base.h" #include "dialog_gen_module_position_file_base.h"
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
DIALOG_GEN_MODULE_POSITION_BASE::DIALOG_GEN_MODULE_POSITION_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) DIALOG_GEN_MODULE_POSITION_BASE::DIALOG_GEN_MODULE_POSITION_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
{ {
this->SetSizeHints( wxSize( -1,-1 ), wxDefaultSize ); this->SetSizeHints( wxSize( -1,-1 ), wxDefaultSize );
m_MainSizer = new wxBoxSizer( wxVERTICAL ); m_MainSizer = new wxBoxSizer( wxVERTICAL );
wxBoxSizer* bUpperSizer; wxBoxSizer* bUpperSizer;
bUpperSizer = new wxBoxSizer( wxHORIZONTAL ); bUpperSizer = new wxBoxSizer( wxHORIZONTAL );
wxBoxSizer* bDirSizer; wxBoxSizer* bDirSizer;
bDirSizer = new wxBoxSizer( wxVERTICAL ); bDirSizer = new wxBoxSizer( wxVERTICAL );
m_staticTextDir = new wxStaticText( this, wxID_ANY, _("Output directory:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextDir = new wxStaticText( this, wxID_ANY, _("Output directory:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextDir->Wrap( -1 ); m_staticTextDir->Wrap( -1 );
bDirSizer->Add( m_staticTextDir, 0, wxEXPAND|wxTOP|wxLEFT, 5 ); bDirSizer->Add( m_staticTextDir, 0, wxEXPAND|wxTOP|wxLEFT, 5 );
wxBoxSizer* bSizerdirBrowse; wxBoxSizer* bSizerdirBrowse;
bSizerdirBrowse = new wxBoxSizer( wxHORIZONTAL ); bSizerdirBrowse = new wxBoxSizer( wxHORIZONTAL );
m_outputDirectoryName = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); m_outputDirectoryName = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_outputDirectoryName->SetToolTip( _("Target directory for plot files. Can be absolute or relative to the board file location.") ); m_outputDirectoryName->SetToolTip( _("Target directory for plot files. Can be absolute or relative to the board file location.") );
m_outputDirectoryName->SetMinSize( wxSize( 350,-1 ) ); m_outputDirectoryName->SetMinSize( wxSize( 350,-1 ) );
bSizerdirBrowse->Add( m_outputDirectoryName, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 ); bSizerdirBrowse->Add( m_outputDirectoryName, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 );
m_browseButton = new wxButton( this, wxID_ANY, _("Browse..."), wxDefaultPosition, wxDefaultSize, 0 ); m_browseButton = new wxButton( this, wxID_ANY, _("Browse..."), wxDefaultPosition, wxDefaultSize, 0 );
bSizerdirBrowse->Add( m_browseButton, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 ); bSizerdirBrowse->Add( m_browseButton, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
bDirSizer->Add( bSizerdirBrowse, 1, wxEXPAND, 5 );
bDirSizer->Add( bSizerdirBrowse, 1, wxEXPAND, 5 );
bUpperSizer->Add( bDirSizer, 1, 0, 5 );
m_MainSizer->Add( bUpperSizer, 0, wxEXPAND, 5 ); bUpperSizer->Add( bDirSizer, 1, 0, 5 );
wxBoxSizer* bSizerOptions;
bSizerOptions = new wxBoxSizer( wxHORIZONTAL ); m_MainSizer->Add( bUpperSizer, 0, wxEXPAND, 5 );
wxString m_radioBoxUnitsChoices[] = { _("Inches"), _("mm") }; wxBoxSizer* bSizerOptions;
int m_radioBoxUnitsNChoices = sizeof( m_radioBoxUnitsChoices ) / sizeof( wxString ); bSizerOptions = new wxBoxSizer( wxHORIZONTAL );
m_radioBoxUnits = new wxRadioBox( this, wxID_ANY, _("Units:"), wxDefaultPosition, wxDefaultSize, m_radioBoxUnitsNChoices, m_radioBoxUnitsChoices, 1, wxRA_SPECIFY_COLS );
m_radioBoxUnits->SetSelection( 0 ); wxString m_radioBoxUnitsChoices[] = { _("Inches"), _("mm") };
bSizerOptions->Add( m_radioBoxUnits, 1, wxALL, 5 ); int m_radioBoxUnitsNChoices = sizeof( m_radioBoxUnitsChoices ) / sizeof( wxString );
m_radioBoxUnits = new wxRadioBox( this, wxID_ANY, _("Units:"), wxDefaultPosition, wxDefaultSize, m_radioBoxUnitsNChoices, m_radioBoxUnitsChoices, 1, wxRA_SPECIFY_COLS );
wxString m_radioBoxFilesCountChoices[] = { _("One file per side"), _("One file for board") }; m_radioBoxUnits->SetSelection( 0 );
int m_radioBoxFilesCountNChoices = sizeof( m_radioBoxFilesCountChoices ) / sizeof( wxString ); bSizerOptions->Add( m_radioBoxUnits, 1, wxALL, 5 );
m_radioBoxFilesCount = new wxRadioBox( this, wxID_ANY, _("Files:"), wxDefaultPosition, wxDefaultSize, m_radioBoxFilesCountNChoices, m_radioBoxFilesCountChoices, 1, wxRA_SPECIFY_COLS );
m_radioBoxFilesCount->SetSelection( 0 ); wxString m_radioBoxFilesCountChoices[] = { _("One file per side"), _("One file for board") };
m_radioBoxFilesCount->SetToolTip( _("Creates 2 files: one for each board side or\nCreates only one file containing all footprints to place\n") ); int m_radioBoxFilesCountNChoices = sizeof( m_radioBoxFilesCountChoices ) / sizeof( wxString );
m_radioBoxFilesCount = new wxRadioBox( this, wxID_ANY, _("Files:"), wxDefaultPosition, wxDefaultSize, m_radioBoxFilesCountNChoices, m_radioBoxFilesCountChoices, 1, wxRA_SPECIFY_COLS );
bSizerOptions->Add( m_radioBoxFilesCount, 1, wxALL, 5 ); m_radioBoxFilesCount->SetSelection( 0 );
m_radioBoxFilesCount->SetToolTip( _("Creates 2 files: one for each board side or\nCreates only one file containing all footprints to place\n") );
wxString m_radioBoxForceSmdChoices[] = { _("With INSERT attribute set"), _("Force INSERT attribute for all SMD footprints") };
int m_radioBoxForceSmdNChoices = sizeof( m_radioBoxForceSmdChoices ) / sizeof( wxString ); bSizerOptions->Add( m_radioBoxFilesCount, 1, wxALL, 5 );
m_radioBoxForceSmd = new wxRadioBox( this, wxID_ANY, _("Footprints:"), wxDefaultPosition, wxDefaultSize, m_radioBoxForceSmdNChoices, m_radioBoxForceSmdChoices, 1, wxRA_SPECIFY_COLS );
m_radioBoxForceSmd->SetSelection( 0 ); wxString m_radioBoxForceSmdChoices[] = { _("With INSERT attribute set"), _("Force INSERT attribute for all SMD footprints") };
m_radioBoxForceSmd->SetToolTip( _("Only footprints with option INSERT are listed in placement file.\nThis option can force this option for all footprints having only SMD pads.\nWarning: this options will modify the board.") ); int m_radioBoxForceSmdNChoices = sizeof( m_radioBoxForceSmdChoices ) / sizeof( wxString );
m_radioBoxForceSmd = new wxRadioBox( this, wxID_ANY, _("Footprints Selection:"), wxDefaultPosition, wxDefaultSize, m_radioBoxForceSmdNChoices, m_radioBoxForceSmdChoices, 1, wxRA_SPECIFY_COLS );
bSizerOptions->Add( m_radioBoxForceSmd, 0, wxALL, 5 ); m_radioBoxForceSmd->SetSelection( 0 );
m_radioBoxForceSmd->SetToolTip( _("Only footprints with option INSERT are listed in placement file.\nThis option can force this option for all footprints having only SMD pads.\nWarning: this options will modify the board.") );
m_MainSizer->Add( bSizerOptions, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
bSizerOptions->Add( m_radioBoxForceSmd, 0, wxALL, 5 );
wxStaticBoxSizer* sbSizerMsg;
sbSizerMsg = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Messages:") ), wxVERTICAL );
m_MainSizer->Add( bSizerOptions, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
m_messagesBox = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY );
m_messagesBox->SetMinSize( wxSize( -1,70 ) ); wxStaticBoxSizer* sbSizerMsg;
sbSizerMsg = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Messages:") ), wxVERTICAL );
sbSizerMsg->Add( m_messagesBox, 1, wxEXPAND, 5 );
m_messagesBox = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY );
m_MainSizer->Add( sbSizerMsg, 1, wxEXPAND, 5 ); m_messagesBox->SetMinSize( wxSize( -1,70 ) );
m_sdbSizerButtons = new wxStdDialogButtonSizer(); sbSizerMsg->Add( m_messagesBox, 1, wxEXPAND, 5 );
m_sdbSizerButtonsOK = new wxButton( this, wxID_OK );
m_sdbSizerButtons->AddButton( m_sdbSizerButtonsOK );
m_sdbSizerButtonsCancel = new wxButton( this, wxID_CANCEL ); m_MainSizer->Add( sbSizerMsg, 1, wxEXPAND, 5 );
m_sdbSizerButtons->AddButton( m_sdbSizerButtonsCancel );
m_sdbSizerButtons->Realize(); m_sdbSizerButtons = new wxStdDialogButtonSizer();
m_MainSizer->Add( m_sdbSizerButtons, 0, wxEXPAND|wxALIGN_RIGHT|wxTOP|wxBOTTOM|wxRIGHT, 5 ); m_sdbSizerButtonsOK = new wxButton( this, wxID_OK );
m_sdbSizerButtons->AddButton( m_sdbSizerButtonsOK );
this->SetSizer( m_MainSizer ); m_sdbSizerButtonsCancel = new wxButton( this, wxID_CANCEL );
this->Layout(); m_sdbSizerButtons->AddButton( m_sdbSizerButtonsCancel );
m_sdbSizerButtons->Realize();
// Connect Events
this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_GEN_MODULE_POSITION_BASE::OnClose ) ); m_MainSizer->Add( m_sdbSizerButtons, 0, wxEXPAND|wxALIGN_RIGHT|wxTOP|wxBOTTOM|wxRIGHT, 5 );
this->Connect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_GEN_MODULE_POSITION_BASE::OnInitDialog ) );
m_browseButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GEN_MODULE_POSITION_BASE::OnOutputDirectoryBrowseClicked ), NULL, this );
m_sdbSizerButtonsCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GEN_MODULE_POSITION_BASE::OnCancelButton ), NULL, this ); this->SetSizer( m_MainSizer );
m_sdbSizerButtonsOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GEN_MODULE_POSITION_BASE::OnOKButton ), NULL, this ); this->Layout();
} m_MainSizer->Fit( this );
DIALOG_GEN_MODULE_POSITION_BASE::~DIALOG_GEN_MODULE_POSITION_BASE() this->Centre( wxBOTH );
{
// Disconnect Events // Connect Events
this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_GEN_MODULE_POSITION_BASE::OnClose ) ); this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_GEN_MODULE_POSITION_BASE::OnClose ) );
this->Disconnect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_GEN_MODULE_POSITION_BASE::OnInitDialog ) ); this->Connect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_GEN_MODULE_POSITION_BASE::OnInitDialog ) );
m_browseButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GEN_MODULE_POSITION_BASE::OnOutputDirectoryBrowseClicked ), NULL, this ); m_browseButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GEN_MODULE_POSITION_BASE::OnOutputDirectoryBrowseClicked ), NULL, this );
m_sdbSizerButtonsCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GEN_MODULE_POSITION_BASE::OnCancelButton ), NULL, this ); m_sdbSizerButtonsCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GEN_MODULE_POSITION_BASE::OnCancelButton ), NULL, this );
m_sdbSizerButtonsOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GEN_MODULE_POSITION_BASE::OnOKButton ), NULL, this ); m_sdbSizerButtonsOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GEN_MODULE_POSITION_BASE::OnOKButton ), NULL, this );
}
}
DIALOG_GEN_MODULE_POSITION_BASE::~DIALOG_GEN_MODULE_POSITION_BASE()
{
// Disconnect Events
this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_GEN_MODULE_POSITION_BASE::OnClose ) );
this->Disconnect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_GEN_MODULE_POSITION_BASE::OnInitDialog ) );
m_browseButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GEN_MODULE_POSITION_BASE::OnOutputDirectoryBrowseClicked ), NULL, this );
m_sdbSizerButtonsCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GEN_MODULE_POSITION_BASE::OnCancelButton ), NULL, this );
m_sdbSizerButtonsOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GEN_MODULE_POSITION_BASE::OnOKButton ), NULL, this );
}
This source diff could not be displayed because it is too large. You can view the blob instead.
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Jun 30 2011) // C++ code generated with wxFormBuilder (version Mar 19 2012)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO "NOT" EDIT THIS FILE! // PLEASE DO "NOT" EDIT THIS FILE!
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
#ifndef __DIALOG_GEN_MODULE_POSITION_FILE_BASE_H__ #ifndef __DIALOG_GEN_MODULE_POSITION_FILE_BASE_H__
#define __DIALOG_GEN_MODULE_POSITION_FILE_BASE_H__ #define __DIALOG_GEN_MODULE_POSITION_FILE_BASE_H__
#include <wx/artprov.h> #include <wx/artprov.h>
#include <wx/xrc/xmlres.h> #include <wx/xrc/xmlres.h>
#include <wx/intl.h> #include <wx/intl.h>
#include <wx/string.h> #include "dialog_shim.h"
#include <wx/stattext.h> #include <wx/string.h>
#include <wx/gdicmn.h> #include <wx/stattext.h>
#include <wx/font.h> #include <wx/gdicmn.h>
#include <wx/colour.h> #include <wx/font.h>
#include <wx/settings.h> #include <wx/colour.h>
#include <wx/textctrl.h> #include <wx/settings.h>
#include <wx/button.h> #include <wx/textctrl.h>
#include <wx/sizer.h> #include <wx/button.h>
#include <wx/radiobox.h> #include <wx/sizer.h>
#include <wx/statbox.h> #include <wx/radiobox.h>
#include <wx/dialog.h> #include <wx/statbox.h>
#include <wx/dialog.h>
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
/// Class DIALOG_GEN_MODULE_POSITION_BASE ///////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////// /// Class DIALOG_GEN_MODULE_POSITION_BASE
class DIALOG_GEN_MODULE_POSITION_BASE : public wxDialog ///////////////////////////////////////////////////////////////////////////////
{ class DIALOG_GEN_MODULE_POSITION_BASE : public DIALOG_SHIM
private: {
private:
protected:
wxBoxSizer* m_MainSizer; protected:
wxStaticText* m_staticTextDir; wxBoxSizer* m_MainSizer;
wxTextCtrl* m_outputDirectoryName; wxStaticText* m_staticTextDir;
wxButton* m_browseButton; wxTextCtrl* m_outputDirectoryName;
wxRadioBox* m_radioBoxUnits; wxButton* m_browseButton;
wxRadioBox* m_radioBoxFilesCount; wxRadioBox* m_radioBoxUnits;
wxRadioBox* m_radioBoxForceSmd; wxRadioBox* m_radioBoxFilesCount;
wxTextCtrl* m_messagesBox; wxRadioBox* m_radioBoxForceSmd;
wxStdDialogButtonSizer* m_sdbSizerButtons; wxTextCtrl* m_messagesBox;
wxButton* m_sdbSizerButtonsOK; wxStdDialogButtonSizer* m_sdbSizerButtons;
wxButton* m_sdbSizerButtonsCancel; wxButton* m_sdbSizerButtonsOK;
wxButton* m_sdbSizerButtonsCancel;
// Virtual event handlers, overide them in your derived class
virtual void OnClose( wxCloseEvent& event ) { event.Skip(); } // Virtual event handlers, overide them in your derived class
virtual void OnInitDialog( wxInitDialogEvent& event ) { event.Skip(); } virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
virtual void OnOutputDirectoryBrowseClicked( wxCommandEvent& event ) { event.Skip(); } virtual void OnInitDialog( wxInitDialogEvent& event ) { event.Skip(); }
virtual void OnCancelButton( wxCommandEvent& event ) { event.Skip(); } virtual void OnOutputDirectoryBrowseClicked( wxCommandEvent& event ) { event.Skip(); }
virtual void OnOKButton( wxCommandEvent& event ) { event.Skip(); } virtual void OnCancelButton( wxCommandEvent& event ) { event.Skip(); }
virtual void OnOKButton( wxCommandEvent& event ) { event.Skip(); }
public:
public:
DIALOG_GEN_MODULE_POSITION_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Position Files:"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 501,340 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_GEN_MODULE_POSITION_BASE(); DIALOG_GEN_MODULE_POSITION_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Position Files:"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_GEN_MODULE_POSITION_BASE();
};
};
#endif //__DIALOG_GEN_MODULE_POSITION_FILE_BASE_H__
#endif //__DIALOG_GEN_MODULE_POSITION_FILE_BASE_H__
...@@ -55,6 +55,7 @@ static DRILL_PRECISION precisionListForInches[] = ...@@ -55,6 +55,7 @@ static DRILL_PRECISION precisionListForInches[] =
{ {
DRILL_PRECISION( 2, 3 ), DRILL_PRECISION( 2, 4 ) DRILL_PRECISION( 2, 3 ), DRILL_PRECISION( 2, 4 )
}; };
static DRILL_PRECISION precisionListForMetric[] = static DRILL_PRECISION precisionListForMetric[] =
{ {
DRILL_PRECISION( 3, 2 ), DRILL_PRECISION( 3, 3 ) DRILL_PRECISION( 3, 2 ), DRILL_PRECISION( 3, 3 )
...@@ -64,12 +65,12 @@ static DRILL_PRECISION precisionListForMetric[] = ...@@ -64,12 +65,12 @@ static DRILL_PRECISION precisionListForMetric[] =
DIALOG_GENDRILL::DIALOG_GENDRILL( PCB_EDIT_FRAME* parent ) : DIALOG_GENDRILL::DIALOG_GENDRILL( PCB_EDIT_FRAME* parent ) :
DIALOG_GENDRILL_BASE( parent ) DIALOG_GENDRILL_BASE( parent )
{ {
m_Parent = parent; m_parent = parent;
m_board = parent->GetBoard();
SetReturnCode( 1 ); SetReturnCode( 1 );
initDialog(); initDialog();
GetSizer()->SetSizeHints( this ); GetSizer()->SetSizeHints( this );
Centre();
} }
...@@ -83,9 +84,6 @@ int DIALOG_GENDRILL:: m_PrecisionFormat = 1; ...@@ -83,9 +84,6 @@ int DIALOG_GENDRILL:: m_PrecisionFormat = 1;
bool DIALOG_GENDRILL::m_createRpt = false; bool DIALOG_GENDRILL::m_createRpt = false;
int DIALOG_GENDRILL::m_createMap = 0; int DIALOG_GENDRILL::m_createMap = 0;
/*!
* DIALOG_GENDRILL destructor
*/
DIALOG_GENDRILL::~DIALOG_GENDRILL() DIALOG_GENDRILL::~DIALOG_GENDRILL()
{ {
...@@ -93,13 +91,8 @@ DIALOG_GENDRILL::~DIALOG_GENDRILL() ...@@ -93,13 +91,8 @@ DIALOG_GENDRILL::~DIALOG_GENDRILL()
} }
/*!
* Member initialisation
*/
void DIALOG_GENDRILL::initDialog() void DIALOG_GENDRILL::initDialog()
{ {
SetFocus(); // Under wxGTK: mandatory to close dialog by the ESC key
wxConfig* Config = wxGetApp().GetSettings(); wxConfig* Config = wxGetApp().GetSettings();
if( Config ) if( Config )
...@@ -116,11 +109,10 @@ void DIALOG_GENDRILL::initDialog() ...@@ -116,11 +109,10 @@ void DIALOG_GENDRILL::initDialog()
} }
/* some param values initialization before display dialog window void DIALOG_GENDRILL::InitDisplayParams()
*/
void DIALOG_GENDRILL::InitDisplayParams( void )
{ {
wxString msg; wxString msg;
const PCB_PLOT_PARAMS& plot_opts = m_board->GetPlotOptions();
m_Choice_Unit->SetSelection( m_UnitDrillIsInch ? 1 : 0 ); m_Choice_Unit->SetSelection( m_UnitDrillIsInch ? 1 : 0 );
m_Choice_Precision->SetSelection( m_PrecisionFormat ); m_Choice_Precision->SetSelection( m_PrecisionFormat );
...@@ -146,11 +138,11 @@ void DIALOG_GENDRILL::InitDisplayParams( void ) ...@@ -146,11 +138,11 @@ void DIALOG_GENDRILL::InitDisplayParams( void )
m_MicroViaDrillValue->SetLabel( _( "Use Netclasses values" ) ); m_MicroViaDrillValue->SetLabel( _( "Use Netclasses values" ) );
msg.Empty(); msg.Empty();
msg << g_PcbPlotOptions.m_HPGLPenNum; msg << plot_opts.m_HPGLPenNum;
m_PenNum->SetValue( msg ); m_PenNum->SetValue( msg );
msg.Empty(); msg.Empty();
msg << g_PcbPlotOptions.m_HPGLPenSpeed; msg << plot_opts.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
...@@ -159,7 +151,7 @@ void DIALOG_GENDRILL::InitDisplayParams( void ) ...@@ -159,7 +151,7 @@ void DIALOG_GENDRILL::InitDisplayParams( void )
m_microViasCount = 0; m_microViasCount = 0;
m_blindOrBuriedViasCount = 0; m_blindOrBuriedViasCount = 0;
for( TRACK* track = m_Parent->GetBoard()->m_Track; track != NULL; track = track->Next() ) for( TRACK* track = m_parent->GetBoard()->m_Track; track != NULL; track = track->Next() )
{ {
if( track->Type() != PCB_VIA_T ) if( track->Type() != PCB_VIA_T )
continue; continue;
...@@ -178,7 +170,7 @@ void DIALOG_GENDRILL::InitDisplayParams( void ) ...@@ -178,7 +170,7 @@ void DIALOG_GENDRILL::InitDisplayParams( void )
m_platedPadsHoleCount = 0; m_platedPadsHoleCount = 0;
m_notplatedPadsHoleCount = 0; m_notplatedPadsHoleCount = 0;
for( MODULE* module = m_Parent->GetBoard()->m_Modules; module != NULL; module = module->Next() ) for( MODULE* module = m_parent->GetBoard()->m_Modules; module; module = module->Next() )
{ {
for( D_PAD* pad = module->m_Pads; pad != NULL; pad = pad->Next() ) for( D_PAD* pad = module->m_Pads; pad != NULL; pad = pad->Next() )
{ {
...@@ -228,39 +220,30 @@ void DIALOG_GENDRILL::InitDisplayParams( void ) ...@@ -228,39 +220,30 @@ void DIALOG_GENDRILL::InitDisplayParams( void )
} }
// Save drill options:
void DIALOG_GENDRILL::UpdateConfig() void DIALOG_GENDRILL::UpdateConfig()
{ {
SetParams(); SetParams();
wxConfig* Config = wxGetApp().GetSettings(); wxConfig* config = wxGetApp().GetSettings();
if( Config ) if( config )
{ {
Config->Write( ZerosFormatKey, m_ZerosFormat ); config->Write( ZerosFormatKey, m_ZerosFormat );
Config->Write( PrecisionKey, m_PrecisionFormat ); config->Write( PrecisionKey, m_PrecisionFormat );
Config->Write( MirrorKey, m_Mirror ); config->Write( MirrorKey, m_Mirror );
Config->Write( MinimalHeaderKey, m_MinimalHeader ); config->Write( MinimalHeaderKey, m_MinimalHeader );
Config->Write( UnitDrillInchKey, m_UnitDrillIsInch ); config->Write( UnitDrillInchKey, m_UnitDrillIsInch );
Config->Write( DrillOriginIsAuxAxisKey, m_DrillOriginIsAuxAxis ); config->Write( DrillOriginIsAuxAxisKey, m_DrillOriginIsAuxAxis );
} }
} }
/*!
* wxEVT_COMMAND_RADIOBOX_SELECTED event handler for ID_RADIOBOX
*/
void DIALOG_GENDRILL::OnSelDrillUnitsSelected( wxCommandEvent& event ) void DIALOG_GENDRILL::OnSelDrillUnitsSelected( wxCommandEvent& event )
{ {
UpdatePrecisionOptions(); UpdatePrecisionOptions();
} }
/*!
* wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_OK
*/
void DIALOG_GENDRILL::OnOkClick( wxCommandEvent& event ) void DIALOG_GENDRILL::OnOkClick( wxCommandEvent& event )
{ {
GenDrillAndReportFiles(); GenDrillAndReportFiles();
...@@ -268,10 +251,6 @@ void DIALOG_GENDRILL::OnOkClick( wxCommandEvent& event ) ...@@ -268,10 +251,6 @@ void DIALOG_GENDRILL::OnOkClick( wxCommandEvent& event )
} }
/*!
* wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CLOSE
*/
void DIALOG_GENDRILL::OnCancelClick( wxCommandEvent& event ) void DIALOG_GENDRILL::OnCancelClick( wxCommandEvent& event )
{ {
UpdateConfig(); // Save drill options: UpdateConfig(); // Save drill options:
...@@ -279,10 +258,6 @@ void DIALOG_GENDRILL::OnCancelClick( wxCommandEvent& event ) ...@@ -279,10 +258,6 @@ void DIALOG_GENDRILL::OnCancelClick( wxCommandEvent& event )
} }
/*!
* wxEVT_COMMAND_RADIOBOX_SELECTED event handler for ID_SEL_ZEROS_FMT
*/
void DIALOG_GENDRILL::OnSelZerosFmtSelected( wxCommandEvent& event ) void DIALOG_GENDRILL::OnSelZerosFmtSelected( wxCommandEvent& event )
{ {
UpdatePrecisionOptions(); UpdatePrecisionOptions();
...@@ -311,11 +286,13 @@ void DIALOG_GENDRILL::UpdatePrecisionOptions() ...@@ -311,11 +286,13 @@ void DIALOG_GENDRILL::UpdatePrecisionOptions()
} }
void DIALOG_GENDRILL::SetParams( void ) void DIALOG_GENDRILL::SetParams()
{ {
wxString msg; wxString msg;
long ltmp; long ltmp;
PCB_PLOT_PARAMS plot_opts = m_board->GetPlotOptions();
m_createMap = m_Choice_Drill_Map->GetSelection(); m_createMap = m_Choice_Drill_Map->GetSelection();
m_createRpt = m_Choice_Drill_Report->GetSelection(); m_createRpt = m_Choice_Drill_Report->GetSelection();
...@@ -329,17 +306,17 @@ void DIALOG_GENDRILL::SetParams( void ) ...@@ -329,17 +306,17 @@ void DIALOG_GENDRILL::SetParams( void )
msg = m_PenSpeed->GetValue(); msg = m_PenSpeed->GetValue();
if( msg.ToLong( &ltmp ) ) if( msg.ToLong( &ltmp ) )
g_PcbPlotOptions.m_HPGLPenSpeed = ltmp; plot_opts.m_HPGLPenSpeed = ltmp;
msg = m_PenNum->GetValue(); msg = m_PenNum->GetValue();
if( msg.ToLong( &ltmp ) ) if( msg.ToLong( &ltmp ) )
g_PcbPlotOptions.m_HPGLPenNum = ltmp; plot_opts.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
m_FileDrillOffset = m_Parent->GetOriginAxisPosition(); m_FileDrillOffset = m_parent->GetOriginAxisPosition();
// get precision // get precision
int idx = m_Choice_Precision->GetSelection(); int idx = m_Choice_Precision->GetSelection();
...@@ -348,4 +325,6 @@ void DIALOG_GENDRILL::SetParams( void ) ...@@ -348,4 +325,6 @@ void DIALOG_GENDRILL::SetParams( void )
m_Precision = precisionListForInches[idx]; m_Precision = precisionListForInches[idx];
else else
m_Precision = precisionListForMetric[idx]; m_Precision = precisionListForMetric[idx];
m_board->SetPlotOptions( plot_opts );
} }
...@@ -26,14 +26,17 @@ ...@@ -26,14 +26,17 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
#ifndef _DIALOG_GENDRILL_H_ #ifndef DIALOG_GENDRILL_H_
#define _DIALOG_GENDRILL_H_ #define DIALOG_GENDRILL_H_
#include <dialog_gendrill_base.h> #include <dialog_gendrill_base.h>
class DIALOG_GENDRILL : public DIALOG_GENDRILL_BASE class DIALOG_GENDRILL : public DIALOG_GENDRILL_BASE
{ {
public: public:
DIALOG_GENDRILL( PCB_EDIT_FRAME* parent );
~DIALOG_GENDRILL();
static int m_UnitDrillIsInch; static int m_UnitDrillIsInch;
static int m_ZerosFormat; static int m_ZerosFormat;
static int m_PrecisionFormat; static int m_PrecisionFormat;
...@@ -44,23 +47,21 @@ public: ...@@ -44,23 +47,21 @@ public:
DRILL_PRECISION m_Precision; // Selected precision for drill files DRILL_PRECISION m_Precision; // Selected precision for drill files
wxPoint m_FileDrillOffset; // Drill offset: 0,0 for absolute coordiantes, or auxialry axis origin wxPoint m_FileDrillOffset; // Drill offset: 0,0 for absolute coordiantes, or auxialry axis origin
private: private:
PCB_EDIT_FRAME* m_Parent; PCB_EDIT_FRAME* m_parent;
BOARD* m_board;
int m_platedPadsHoleCount; int m_platedPadsHoleCount;
int m_notplatedPadsHoleCount; int m_notplatedPadsHoleCount;
int m_throughViasCount; int m_throughViasCount;
int m_microViasCount; int m_microViasCount;
int m_blindOrBuriedViasCount; int m_blindOrBuriedViasCount;
static bool m_createRpt; // true to create a drill file report static bool m_createRpt; // true to create a drill file report
static int m_createMap; // > 0 to create a map file report static int m_createMap; // > 0 to create a map file report
public:
DIALOG_GENDRILL( PCB_EDIT_FRAME* parent );
~DIALOG_GENDRILL();
private:
// Initialises member variables
void initDialog(); void initDialog();
void InitDisplayParams( void ); void InitDisplayParams( void );
...@@ -92,4 +93,4 @@ private: ...@@ -92,4 +93,4 @@ private:
DRILL_PRECISION GetPrecison(); DRILL_PRECISION GetPrecison();
}; };
#endif // _DIALOG_GENDRILL_H_ #endif // DIALOG_GENDRILL_H_
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Jun 30 2011) // C++ code generated with wxFormBuilder (version Mar 19 2012)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO "NOT" EDIT THIS FILE! // PLEASE DO "NOT" EDIT THIS FILE!
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
#include "dialog_gendrill_base.h" #include "dialog_gendrill_base.h"
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
DIALOG_GENDRILL_BASE::DIALOG_GENDRILL_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) DIALOG_GENDRILL_BASE::DIALOG_GENDRILL_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
{ {
this->SetSizeHints( wxDefaultSize, wxDefaultSize ); this->SetSizeHints( wxDefaultSize, wxDefaultSize );
wxBoxSizer* bMainSizer; wxBoxSizer* bMainSizer;
bMainSizer = new wxBoxSizer( wxHORIZONTAL ); bMainSizer = new wxBoxSizer( wxHORIZONTAL );
wxBoxSizer* m_LeftBoxSizer; wxBoxSizer* m_LeftBoxSizer;
m_LeftBoxSizer = new wxBoxSizer( wxVERTICAL ); m_LeftBoxSizer = new wxBoxSizer( wxVERTICAL );
wxString m_Choice_UnitChoices[] = { _("Millimeters"), _("Inches") }; wxString m_Choice_UnitChoices[] = { _("Millimeters"), _("Inches") };
int m_Choice_UnitNChoices = sizeof( m_Choice_UnitChoices ) / sizeof( wxString ); int m_Choice_UnitNChoices = sizeof( m_Choice_UnitChoices ) / sizeof( wxString );
m_Choice_Unit = new wxRadioBox( this, wxID_ANY, _("Drill Units:"), wxDefaultPosition, wxDefaultSize, m_Choice_UnitNChoices, m_Choice_UnitChoices, 1, wxRA_SPECIFY_COLS ); m_Choice_Unit = new wxRadioBox( this, wxID_ANY, _("Drill Units:"), wxDefaultPosition, wxDefaultSize, m_Choice_UnitNChoices, m_Choice_UnitChoices, 1, wxRA_SPECIFY_COLS );
m_Choice_Unit->SetSelection( 1 ); m_Choice_Unit->SetSelection( 1 );
m_LeftBoxSizer->Add( m_Choice_Unit, 0, wxALL|wxEXPAND, 5 ); m_LeftBoxSizer->Add( m_Choice_Unit, 0, wxALL|wxEXPAND, 5 );
wxString m_Choice_Zeros_FormatChoices[] = { _("Decimal format"), _("Suppress leading zeros"), _("Suppress trailing zeros"), _("Keep zeros") }; wxString m_Choice_Zeros_FormatChoices[] = { _("Decimal format"), _("Suppress leading zeros"), _("Suppress trailing zeros"), _("Keep zeros") };
int m_Choice_Zeros_FormatNChoices = sizeof( m_Choice_Zeros_FormatChoices ) / sizeof( wxString ); int m_Choice_Zeros_FormatNChoices = sizeof( m_Choice_Zeros_FormatChoices ) / sizeof( wxString );
m_Choice_Zeros_Format = new wxRadioBox( this, wxID_ANY, _("Zeros Format"), wxDefaultPosition, wxDefaultSize, m_Choice_Zeros_FormatNChoices, m_Choice_Zeros_FormatChoices, 1, wxRA_SPECIFY_COLS ); m_Choice_Zeros_Format = new wxRadioBox( this, wxID_ANY, _("Zeros Format"), wxDefaultPosition, wxDefaultSize, m_Choice_Zeros_FormatNChoices, m_Choice_Zeros_FormatChoices, 1, wxRA_SPECIFY_COLS );
m_Choice_Zeros_Format->SetSelection( 0 ); m_Choice_Zeros_Format->SetSelection( 0 );
m_Choice_Zeros_Format->SetToolTip( _("Choose EXCELLON numbers notation") ); m_Choice_Zeros_Format->SetToolTip( _("Choose EXCELLON numbers notation") );
m_LeftBoxSizer->Add( m_Choice_Zeros_Format, 0, wxALL|wxEXPAND, 5 ); m_LeftBoxSizer->Add( m_Choice_Zeros_Format, 0, wxALL|wxEXPAND, 5 );
wxString m_Choice_PrecisionChoices[] = { _("2:3"), _("2:4") }; wxString m_Choice_PrecisionChoices[] = { _("2:3"), _("2:4") };
int m_Choice_PrecisionNChoices = sizeof( m_Choice_PrecisionChoices ) / sizeof( wxString ); int m_Choice_PrecisionNChoices = sizeof( m_Choice_PrecisionChoices ) / sizeof( wxString );
m_Choice_Precision = new wxRadioBox( this, wxID_ANY, _("Precision"), wxDefaultPosition, wxDefaultSize, m_Choice_PrecisionNChoices, m_Choice_PrecisionChoices, 1, wxRA_SPECIFY_COLS ); m_Choice_Precision = new wxRadioBox( this, wxID_ANY, _("Precision"), wxDefaultPosition, wxDefaultSize, m_Choice_PrecisionNChoices, m_Choice_PrecisionChoices, 1, wxRA_SPECIFY_COLS );
m_Choice_Precision->SetSelection( 1 ); m_Choice_Precision->SetSelection( 1 );
m_Choice_Precision->SetToolTip( _("Choose EXCELLON numbers precision") ); m_Choice_Precision->SetToolTip( _("Choose EXCELLON numbers precision") );
m_LeftBoxSizer->Add( m_Choice_Precision, 0, wxALL|wxEXPAND, 5 ); m_LeftBoxSizer->Add( m_Choice_Precision, 0, wxALL|wxEXPAND, 5 );
wxString m_Choice_Drill_OffsetChoices[] = { _("Absolute"), _("Auxiliary axis") }; wxString m_Choice_Drill_OffsetChoices[] = { _("Absolute"), _("Auxiliary axis") };
int m_Choice_Drill_OffsetNChoices = sizeof( m_Choice_Drill_OffsetChoices ) / sizeof( wxString ); int m_Choice_Drill_OffsetNChoices = sizeof( m_Choice_Drill_OffsetChoices ) / sizeof( wxString );
m_Choice_Drill_Offset = new wxRadioBox( this, wxID_ANY, _("Drill Origin:"), wxDefaultPosition, wxDefaultSize, m_Choice_Drill_OffsetNChoices, m_Choice_Drill_OffsetChoices, 1, wxRA_SPECIFY_COLS ); m_Choice_Drill_Offset = new wxRadioBox( this, wxID_ANY, _("Drill Origin:"), wxDefaultPosition, wxDefaultSize, m_Choice_Drill_OffsetNChoices, m_Choice_Drill_OffsetChoices, 1, wxRA_SPECIFY_COLS );
m_Choice_Drill_Offset->SetSelection( 0 ); m_Choice_Drill_Offset->SetSelection( 0 );
m_Choice_Drill_Offset->SetToolTip( _("Choose the coordinate origin: absolute or relative to the auxiliray axis") ); m_Choice_Drill_Offset->SetToolTip( _("Choose the coordinate origin: absolute or relative to the auxiliray axis") );
m_LeftBoxSizer->Add( m_Choice_Drill_Offset, 0, wxALL|wxEXPAND, 5 ); m_LeftBoxSizer->Add( m_Choice_Drill_Offset, 0, wxALL|wxEXPAND, 5 );
bMainSizer->Add( m_LeftBoxSizer, 1, wxEXPAND, 5 );
bMainSizer->Add( m_LeftBoxSizer, 1, wxEXPAND, 5 );
wxBoxSizer* bMiddleBoxSizer;
bMiddleBoxSizer = new wxBoxSizer( wxVERTICAL ); wxBoxSizer* bMiddleBoxSizer;
bMiddleBoxSizer = new wxBoxSizer( wxVERTICAL );
wxString m_Choice_Drill_MapChoices[] = { _("None"), _("Drill map (HPGL)"), _("Drill map (PostScript)"), _("Drill map (Gerber)"), _("Drill map (DXF)") };
int m_Choice_Drill_MapNChoices = sizeof( m_Choice_Drill_MapChoices ) / sizeof( wxString ); wxString m_Choice_Drill_MapChoices[] = { _("None"), _("Drill map (HPGL)"), _("Drill map (PostScript)"), _("Drill map (Gerber)"), _("Drill map (DXF)") };
m_Choice_Drill_Map = new wxRadioBox( this, wxID_ANY, _("Drill Sheet:"), wxDefaultPosition, wxDefaultSize, m_Choice_Drill_MapNChoices, m_Choice_Drill_MapChoices, 1, wxRA_SPECIFY_COLS ); int m_Choice_Drill_MapNChoices = sizeof( m_Choice_Drill_MapChoices ) / sizeof( wxString );
m_Choice_Drill_Map->SetSelection( 0 ); m_Choice_Drill_Map = new wxRadioBox( this, wxID_ANY, _("Drill Sheet:"), wxDefaultPosition, wxDefaultSize, m_Choice_Drill_MapNChoices, m_Choice_Drill_MapChoices, 1, wxRA_SPECIFY_COLS );
m_Choice_Drill_Map->SetToolTip( _("Creates a drill map in PS, HPGL or other formats") ); m_Choice_Drill_Map->SetSelection( 0 );
m_Choice_Drill_Map->SetToolTip( _("Creates a drill map in PS, HPGL or other formats") );
bMiddleBoxSizer->Add( m_Choice_Drill_Map, 0, wxALL|wxEXPAND, 5 );
bMiddleBoxSizer->Add( m_Choice_Drill_Map, 0, wxALL|wxEXPAND, 5 );
wxString m_Choice_Drill_ReportChoices[] = { _("None"), _("Drill report") };
int m_Choice_Drill_ReportNChoices = sizeof( m_Choice_Drill_ReportChoices ) / sizeof( wxString ); wxString m_Choice_Drill_ReportChoices[] = { _("None"), _("Drill report") };
m_Choice_Drill_Report = new wxRadioBox( this, wxID_ANY, _("Drill Report:"), wxDefaultPosition, wxDefaultSize, m_Choice_Drill_ReportNChoices, m_Choice_Drill_ReportChoices, 1, wxRA_SPECIFY_COLS ); int m_Choice_Drill_ReportNChoices = sizeof( m_Choice_Drill_ReportChoices ) / sizeof( wxString );
m_Choice_Drill_Report->SetSelection( 0 ); m_Choice_Drill_Report = new wxRadioBox( this, wxID_ANY, _("Drill Report:"), wxDefaultPosition, wxDefaultSize, m_Choice_Drill_ReportNChoices, m_Choice_Drill_ReportChoices, 1, wxRA_SPECIFY_COLS );
m_Choice_Drill_Report->SetToolTip( _("Creates a plain text report") ); m_Choice_Drill_Report->SetSelection( 0 );
m_Choice_Drill_Report->SetToolTip( _("Creates a plain text report") );
bMiddleBoxSizer->Add( m_Choice_Drill_Report, 0, wxALL|wxEXPAND, 5 );
bMiddleBoxSizer->Add( m_Choice_Drill_Report, 0, wxALL|wxEXPAND, 5 );
wxStaticBoxSizer* sbHPGOptionsSizer;
sbHPGOptionsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("HPGL plotter Options:") ), wxVERTICAL ); wxStaticBoxSizer* sbHPGOptionsSizer;
sbHPGOptionsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("HPGL plotter Options:") ), wxVERTICAL );
m_staticText1 = new wxStaticText( this, wxID_ANY, _("Speed (cm/s)"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText1->Wrap( -1 ); m_staticText1 = new wxStaticText( this, wxID_ANY, _("Speed (cm/s)"), wxDefaultPosition, wxDefaultSize, 0 );
sbHPGOptionsSizer->Add( m_staticText1, 0, wxRIGHT|wxLEFT, 5 ); m_staticText1->Wrap( -1 );
sbHPGOptionsSizer->Add( m_staticText1, 0, wxRIGHT|wxLEFT, 5 );
m_PenSpeed = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
sbHPGOptionsSizer->Add( m_PenSpeed, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); m_PenSpeed = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
sbHPGOptionsSizer->Add( m_PenSpeed, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
m_staticText2 = new wxStaticText( this, wxID_ANY, _("Pen Number"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText2->Wrap( -1 ); m_staticText2 = new wxStaticText( this, wxID_ANY, _("Pen Number"), wxDefaultPosition, wxDefaultSize, 0 );
sbHPGOptionsSizer->Add( m_staticText2, 0, wxRIGHT|wxLEFT, 5 ); m_staticText2->Wrap( -1 );
sbHPGOptionsSizer->Add( m_staticText2, 0, wxRIGHT|wxLEFT, 5 );
m_PenNum = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
sbHPGOptionsSizer->Add( m_PenNum, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); m_PenNum = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
sbHPGOptionsSizer->Add( m_PenNum, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
bMiddleBoxSizer->Add( sbHPGOptionsSizer, 0, wxEXPAND, 5 );
wxStaticBoxSizer* sbOptSizer; bMiddleBoxSizer->Add( sbHPGOptionsSizer, 0, wxEXPAND, 5 );
sbOptSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Options:") ), wxVERTICAL );
wxStaticBoxSizer* sbOptSizer;
m_Check_Mirror = new wxCheckBox( this, wxID_ANY, _("Mirror y axis"), wxDefaultPosition, wxDefaultSize, 0 ); sbOptSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Options:") ), wxVERTICAL );
sbOptSizer->Add( m_Check_Mirror, 0, wxRIGHT|wxLEFT, 5 );
m_Check_Mirror = new wxCheckBox( this, wxID_ANY, _("Mirror y axis"), wxDefaultPosition, wxDefaultSize, 0 );
m_Check_Minimal = new wxCheckBox( this, wxID_ANY, _("Minimal header"), wxDefaultPosition, wxDefaultSize, 0 ); sbOptSizer->Add( m_Check_Mirror, 0, wxRIGHT|wxLEFT, 5 );
sbOptSizer->Add( m_Check_Minimal, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_Check_Minimal = new wxCheckBox( this, wxID_ANY, _("Minimal header"), wxDefaultPosition, wxDefaultSize, 0 );
bMiddleBoxSizer->Add( sbOptSizer, 0, wxEXPAND, 5 ); sbOptSizer->Add( m_Check_Minimal, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
bMainSizer->Add( bMiddleBoxSizer, 1, wxEXPAND, 5 );
bMiddleBoxSizer->Add( sbOptSizer, 0, wxEXPAND, 5 );
wxBoxSizer* bRightBoxSizer;
bRightBoxSizer = new wxBoxSizer( wxVERTICAL );
bMainSizer->Add( bMiddleBoxSizer, 1, wxEXPAND, 5 );
wxStaticBoxSizer* sbSizerInfo;
sbSizerInfo = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Info:") ), wxVERTICAL ); wxBoxSizer* bRightBoxSizer;
bRightBoxSizer = new wxBoxSizer( wxVERTICAL );
m_DefaultViasDrillSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Default Vias Drill:") ), wxVERTICAL );
wxStaticBoxSizer* sbSizerInfo;
m_ViaDrillValue = new wxStaticText( this, wxID_ANY, _("Via Drill Value"), wxDefaultPosition, wxDefaultSize, 0 ); sbSizerInfo = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Info:") ), wxVERTICAL );
m_ViaDrillValue->Wrap( -1 );
m_DefaultViasDrillSizer->Add( m_ViaDrillValue, 0, wxALL, 5 ); m_DefaultViasDrillSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Default Vias Drill:") ), wxVERTICAL );
sbSizerInfo->Add( m_DefaultViasDrillSizer, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 ); m_ViaDrillValue = new wxStaticText( this, wxID_ANY, _("Via Drill Value"), wxDefaultPosition, wxDefaultSize, 0 );
m_ViaDrillValue->Wrap( -1 );
m_MicroViasDrillSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Micro Vias Drill:") ), wxVERTICAL ); m_DefaultViasDrillSizer->Add( m_ViaDrillValue, 0, wxALL, 5 );
m_MicroViaDrillValue = new wxStaticText( this, wxID_ANY, _("Micro Via Drill Value"), wxDefaultPosition, wxDefaultSize, 0 );
m_MicroViaDrillValue->Wrap( -1 ); sbSizerInfo->Add( m_DefaultViasDrillSizer, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
m_MicroViasDrillSizer->Add( m_MicroViaDrillValue, 0, wxALL, 5 );
m_MicroViasDrillSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Micro Vias Drill:") ), wxVERTICAL );
sbSizerInfo->Add( m_MicroViasDrillSizer, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
m_MicroViaDrillValue = new wxStaticText( this, wxID_ANY, _("Micro Via Drill Value"), wxDefaultPosition, wxDefaultSize, 0 );
wxStaticBoxSizer* sbSizerHoles; m_MicroViaDrillValue->Wrap( -1 );
sbSizerHoles = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Holes Count:") ), wxVERTICAL ); m_MicroViasDrillSizer->Add( m_MicroViaDrillValue, 0, wxALL, 5 );
m_PlatedPadsCountInfoMsg = new wxStaticText( this, wxID_ANY, _("Plated Pads:"), wxDefaultPosition, wxDefaultSize, 0 );
m_PlatedPadsCountInfoMsg->Wrap( -1 ); sbSizerInfo->Add( m_MicroViasDrillSizer, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
sbSizerHoles->Add( m_PlatedPadsCountInfoMsg, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
wxStaticBoxSizer* sbSizerHoles;
m_NotPlatedPadsCountInfoMsg = new wxStaticText( this, wxID_ANY, _("Not Plated Pads:"), wxDefaultPosition, wxDefaultSize, 0 ); sbSizerHoles = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Holes Count:") ), wxVERTICAL );
m_NotPlatedPadsCountInfoMsg->Wrap( -1 );
sbSizerHoles->Add( m_NotPlatedPadsCountInfoMsg, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); m_PlatedPadsCountInfoMsg = new wxStaticText( this, wxID_ANY, _("Plated Pads:"), wxDefaultPosition, wxDefaultSize, 0 );
m_PlatedPadsCountInfoMsg->Wrap( -1 );
m_ThroughViasInfoMsg = new wxStaticText( this, wxID_ANY, _("Through Vias:"), wxDefaultPosition, wxDefaultSize, 0 ); sbSizerHoles->Add( m_PlatedPadsCountInfoMsg, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_ThroughViasInfoMsg->Wrap( -1 );
sbSizerHoles->Add( m_ThroughViasInfoMsg, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); m_NotPlatedPadsCountInfoMsg = new wxStaticText( this, wxID_ANY, _("Not Plated Pads:"), wxDefaultPosition, wxDefaultSize, 0 );
m_NotPlatedPadsCountInfoMsg->Wrap( -1 );
m_MicroViasInfoMsg = new wxStaticText( this, wxID_ANY, _("Micro Vias:"), wxDefaultPosition, wxDefaultSize, 0 ); sbSizerHoles->Add( m_NotPlatedPadsCountInfoMsg, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_MicroViasInfoMsg->Wrap( -1 );
sbSizerHoles->Add( m_MicroViasInfoMsg, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); m_ThroughViasInfoMsg = new wxStaticText( this, wxID_ANY, _("Through Vias:"), wxDefaultPosition, wxDefaultSize, 0 );
m_ThroughViasInfoMsg->Wrap( -1 );
m_BuriedViasInfoMsg = new wxStaticText( this, wxID_ANY, _("Buried Vias:"), wxDefaultPosition, wxDefaultSize, 0 ); sbSizerHoles->Add( m_ThroughViasInfoMsg, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_BuriedViasInfoMsg->Wrap( -1 );
sbSizerHoles->Add( m_BuriedViasInfoMsg, 0, wxALL, 5 ); m_MicroViasInfoMsg = new wxStaticText( this, wxID_ANY, _("Micro Vias:"), wxDefaultPosition, wxDefaultSize, 0 );
m_MicroViasInfoMsg->Wrap( -1 );
sbSizerInfo->Add( sbSizerHoles, 1, wxEXPAND|wxTOP|wxBOTTOM, 5 ); sbSizerHoles->Add( m_MicroViasInfoMsg, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
bRightBoxSizer->Add( sbSizerInfo, 0, wxEXPAND|wxTOP, 5 ); m_BuriedViasInfoMsg = new wxStaticText( this, wxID_ANY, _("Buried Vias:"), wxDefaultPosition, wxDefaultSize, 0 );
m_BuriedViasInfoMsg->Wrap( -1 );
sbSizerHoles->Add( m_BuriedViasInfoMsg, 0, wxALL, 5 );
bRightBoxSizer->Add( 10, 10, 1, wxEXPAND|wxALIGN_CENTER_HORIZONTAL, 5 );
m_OkButton = new wxButton( this, wxID_OK, _("OK"), wxDefaultPosition, wxDefaultSize, 0 ); sbSizerInfo->Add( sbSizerHoles, 1, wxEXPAND|wxTOP|wxBOTTOM, 5 );
m_OkButton->SetDefault();
bRightBoxSizer->Add( m_OkButton, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
bRightBoxSizer->Add( sbSizerInfo, 0, wxEXPAND|wxTOP, 5 );
m_CancelButton = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
bRightBoxSizer->Add( m_CancelButton, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
bRightBoxSizer->Add( 10, 10, 1, wxEXPAND|wxALIGN_CENTER_HORIZONTAL, 5 );
bMainSizer->Add( bRightBoxSizer, 1, wxEXPAND, 5 );
m_OkButton = new wxButton( this, wxID_OK, _("OK"), wxDefaultPosition, wxDefaultSize, 0 );
this->SetSizer( bMainSizer ); m_OkButton->SetDefault();
this->Layout(); bRightBoxSizer->Add( m_OkButton, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
// Connect Events m_CancelButton = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
m_Choice_Unit->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::OnSelDrillUnitsSelected ), NULL, this ); bRightBoxSizer->Add( m_CancelButton, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
m_Choice_Zeros_Format->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::OnSelZerosFmtSelected ), NULL, this );
m_OkButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::OnOkClick ), NULL, this );
m_CancelButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::OnCancelClick ), NULL, this ); bMainSizer->Add( bRightBoxSizer, 1, wxEXPAND, 5 );
}
DIALOG_GENDRILL_BASE::~DIALOG_GENDRILL_BASE() this->SetSizer( bMainSizer );
{ this->Layout();
// Disconnect Events bMainSizer->Fit( this );
m_Choice_Unit->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::OnSelDrillUnitsSelected ), NULL, this );
m_Choice_Zeros_Format->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::OnSelZerosFmtSelected ), NULL, this ); this->Centre( wxBOTH );
m_OkButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::OnOkClick ), NULL, this );
m_CancelButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::OnCancelClick ), NULL, this ); // Connect Events
m_Choice_Unit->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::OnSelDrillUnitsSelected ), NULL, this );
} m_Choice_Zeros_Format->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::OnSelZerosFmtSelected ), NULL, this );
m_OkButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::OnOkClick ), NULL, this );
m_CancelButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::OnCancelClick ), NULL, this );
}
DIALOG_GENDRILL_BASE::~DIALOG_GENDRILL_BASE()
{
// Disconnect Events
m_Choice_Unit->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::OnSelDrillUnitsSelected ), NULL, this );
m_Choice_Zeros_Format->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::OnSelZerosFmtSelected ), NULL, this );
m_OkButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::OnOkClick ), NULL, this );
m_CancelButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::OnCancelClick ), NULL, this );
}
This source diff could not be displayed because it is too large. You can view the blob instead.
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Jun 30 2011) // C++ code generated with wxFormBuilder (version Mar 19 2012)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO "NOT" EDIT THIS FILE! // PLEASE DO "NOT" EDIT THIS FILE!
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
#ifndef __DIALOG_GENDRILL_BASE_H__ #ifndef __DIALOG_GENDRILL_BASE_H__
#define __DIALOG_GENDRILL_BASE_H__ #define __DIALOG_GENDRILL_BASE_H__
#include <wx/artprov.h> #include <wx/artprov.h>
#include <wx/xrc/xmlres.h> #include <wx/xrc/xmlres.h>
#include <wx/intl.h> #include <wx/intl.h>
#include <wx/string.h> #include "dialog_shim.h"
#include <wx/radiobox.h> #include <wx/string.h>
#include <wx/gdicmn.h> #include <wx/radiobox.h>
#include <wx/font.h> #include <wx/gdicmn.h>
#include <wx/colour.h> #include <wx/font.h>
#include <wx/settings.h> #include <wx/colour.h>
#include <wx/sizer.h> #include <wx/settings.h>
#include <wx/stattext.h> #include <wx/sizer.h>
#include <wx/textctrl.h> #include <wx/stattext.h>
#include <wx/statbox.h> #include <wx/textctrl.h>
#include <wx/checkbox.h> #include <wx/statbox.h>
#include <wx/button.h> #include <wx/checkbox.h>
#include <wx/dialog.h> #include <wx/button.h>
#include <wx/dialog.h>
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
/// Class DIALOG_GENDRILL_BASE ///////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////// /// Class DIALOG_GENDRILL_BASE
class DIALOG_GENDRILL_BASE : public wxDialog ///////////////////////////////////////////////////////////////////////////////
{ class DIALOG_GENDRILL_BASE : public DIALOG_SHIM
private: {
private:
protected:
wxRadioBox* m_Choice_Unit; protected:
wxRadioBox* m_Choice_Zeros_Format; wxRadioBox* m_Choice_Unit;
wxRadioBox* m_Choice_Precision; wxRadioBox* m_Choice_Zeros_Format;
wxRadioBox* m_Choice_Drill_Offset; wxRadioBox* m_Choice_Precision;
wxRadioBox* m_Choice_Drill_Map; wxRadioBox* m_Choice_Drill_Offset;
wxRadioBox* m_Choice_Drill_Report; wxRadioBox* m_Choice_Drill_Map;
wxStaticText* m_staticText1; wxRadioBox* m_Choice_Drill_Report;
wxTextCtrl* m_PenSpeed; wxStaticText* m_staticText1;
wxStaticText* m_staticText2; wxTextCtrl* m_PenSpeed;
wxTextCtrl* m_PenNum; wxStaticText* m_staticText2;
wxCheckBox* m_Check_Mirror; wxTextCtrl* m_PenNum;
wxCheckBox* m_Check_Minimal; wxCheckBox* m_Check_Mirror;
wxStaticBoxSizer* m_DefaultViasDrillSizer; wxCheckBox* m_Check_Minimal;
wxStaticText* m_ViaDrillValue; wxStaticBoxSizer* m_DefaultViasDrillSizer;
wxStaticBoxSizer* m_MicroViasDrillSizer; wxStaticText* m_ViaDrillValue;
wxStaticText* m_MicroViaDrillValue; wxStaticBoxSizer* m_MicroViasDrillSizer;
wxStaticText* m_PlatedPadsCountInfoMsg; wxStaticText* m_MicroViaDrillValue;
wxStaticText* m_NotPlatedPadsCountInfoMsg; wxStaticText* m_PlatedPadsCountInfoMsg;
wxStaticText* m_ThroughViasInfoMsg; wxStaticText* m_NotPlatedPadsCountInfoMsg;
wxStaticText* m_MicroViasInfoMsg; wxStaticText* m_ThroughViasInfoMsg;
wxStaticText* m_BuriedViasInfoMsg; wxStaticText* m_MicroViasInfoMsg;
wxButton* m_OkButton; wxStaticText* m_BuriedViasInfoMsg;
wxButton* m_CancelButton; wxButton* m_OkButton;
wxButton* m_CancelButton;
// Virtual event handlers, overide them in your derived class
virtual void OnSelDrillUnitsSelected( wxCommandEvent& event ) { event.Skip(); } // Virtual event handlers, overide them in your derived class
virtual void OnSelZerosFmtSelected( wxCommandEvent& event ) { event.Skip(); } virtual void OnSelDrillUnitsSelected( wxCommandEvent& event ) { event.Skip(); }
virtual void OnOkClick( wxCommandEvent& event ) { event.Skip(); } virtual void OnSelZerosFmtSelected( wxCommandEvent& event ) { event.Skip(); }
virtual void OnCancelClick( wxCommandEvent& event ) { event.Skip(); } virtual void OnOkClick( wxCommandEvent& event ) { event.Skip(); }
virtual void OnCancelClick( wxCommandEvent& event ) { event.Skip(); }
public:
public:
DIALOG_GENDRILL_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Drill Files Generation"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 447,385 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_GENDRILL_BASE(); DIALOG_GENDRILL_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Drill Files Generation"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_GENDRILL_BASE();
};
};
#endif //__DIALOG_GENDRILL_BASE_H__
#endif //__DIALOG_GENDRILL_BASE_H__
...@@ -14,8 +14,6 @@ ...@@ -14,8 +14,6 @@
#include <dialog_graphic_items_options.h> #include <dialog_graphic_items_options.h>
extern int g_DrawDefaultLineThickness;
void PCB_EDIT_FRAME::OnConfigurePcbOptions( wxCommandEvent& aEvent ) void PCB_EDIT_FRAME::OnConfigurePcbOptions( wxCommandEvent& aEvent )
{ {
......
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Nov 17 2010) // C++ code generated with wxFormBuilder (version Mar 19 2012)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO "NOT" EDIT THIS FILE! // PLEASE DO "NOT" EDIT THIS FILE!
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
#include "dialog_plot_base.h" #include "dialog_plot_base.h"
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
{ {
this->SetSizeHints( wxSize( -1,-1 ), wxDefaultSize ); this->SetSizeHints( wxSize( -1,-1 ), wxDefaultSize );
m_MainSizer = new wxBoxSizer( wxHORIZONTAL ); m_MainSizer = new wxBoxSizer( wxHORIZONTAL );
wxBoxSizer* bSizer12; wxBoxSizer* bSizer12;
bSizer12 = new wxBoxSizer( wxVERTICAL ); bSizer12 = new wxBoxSizer( wxVERTICAL );
wxBoxSizer* bSizer26; wxBoxSizer* bSizer26;
bSizer26 = new wxBoxSizer( wxHORIZONTAL ); bSizer26 = new wxBoxSizer( wxHORIZONTAL );
wxBoxSizer* bSizer27; wxBoxSizer* bSizer27;
bSizer27 = new wxBoxSizer( wxVERTICAL ); bSizer27 = new wxBoxSizer( wxVERTICAL );
m_staticText121 = new wxStaticText( this, wxID_ANY, _("Plot format:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText121 = new wxStaticText( this, wxID_ANY, _("Plot format:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText121->Wrap( -1 ); m_staticText121->Wrap( -1 );
bSizer27->Add( m_staticText121, 0, wxTOP, 5 ); bSizer27->Add( m_staticText121, 0, wxTOP, 5 );
wxString m_plotFormatOptChoices[] = { _("HPGL"), _("Gerber"), _("Postscript"), _("DXF") }; wxString m_plotFormatOptChoices[] = { _("HPGL"), _("Gerber"), _("Postscript"), _("DXF") };
int m_plotFormatOptNChoices = sizeof( m_plotFormatOptChoices ) / sizeof( wxString ); int m_plotFormatOptNChoices = sizeof( m_plotFormatOptChoices ) / sizeof( wxString );
m_plotFormatOpt = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_plotFormatOptNChoices, m_plotFormatOptChoices, 0 ); m_plotFormatOpt = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_plotFormatOptNChoices, m_plotFormatOptChoices, 0 );
m_plotFormatOpt->SetSelection( 0 ); m_plotFormatOpt->SetSelection( 0 );
bSizer27->Add( m_plotFormatOpt, 0, 0, 5 ); bSizer27->Add( m_plotFormatOpt, 0, 0, 5 );
bSizer26->Add( bSizer27, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
bSizer26->Add( bSizer27, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
wxBoxSizer* bSizer28;
bSizer28 = new wxBoxSizer( wxVERTICAL ); wxBoxSizer* bSizer28;
bSizer28 = new wxBoxSizer( wxVERTICAL );
m_staticTextDir = new wxStaticText( this, wxID_ANY, _("Output directory:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextDir->Wrap( -1 ); m_staticTextDir = new wxStaticText( this, wxID_ANY, _("Output directory:"), wxDefaultPosition, wxDefaultSize, 0 );
bSizer28->Add( m_staticTextDir, 0, wxEXPAND|wxTOP|wxLEFT, 5 ); m_staticTextDir->Wrap( -1 );
bSizer28->Add( m_staticTextDir, 0, wxEXPAND|wxTOP|wxLEFT, 5 );
wxBoxSizer* bSizer29;
bSizer29 = new wxBoxSizer( wxHORIZONTAL ); wxBoxSizer* bSizer29;
bSizer29 = new wxBoxSizer( wxHORIZONTAL );
m_outputDirectoryName = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_outputDirectoryName->SetToolTip( _("Target directory for plot files. Can be absolute or relative to the board file location.") ); m_outputDirectoryName = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_outputDirectoryName->SetToolTip( _("Target directory for plot files. Can be absolute or relative to the board file location.") );
bSizer29->Add( m_outputDirectoryName, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 );
bSizer29->Add( m_outputDirectoryName, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 );
m_browseButton = new wxButton( this, wxID_ANY, _("Browse..."), wxDefaultPosition, wxDefaultSize, 0 );
bSizer29->Add( m_browseButton, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 ); m_browseButton = new wxButton( this, wxID_ANY, _("Browse..."), wxDefaultPosition, wxDefaultSize, 0 );
bSizer29->Add( m_browseButton, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
bSizer28->Add( bSizer29, 1, wxEXPAND, 5 );
bSizer26->Add( bSizer28, 1, 0, 5 ); bSizer28->Add( bSizer29, 1, wxEXPAND, 5 );
bSizer12->Add( bSizer26, 0, wxEXPAND, 5 );
bSizer26->Add( bSizer28, 1, 0, 5 );
wxBoxSizer* bUpperSizer;
bUpperSizer = new wxBoxSizer( wxHORIZONTAL );
bSizer12->Add( bSizer26, 0, wxEXPAND, 5 );
m_LayersSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Layers") ), wxHORIZONTAL );
wxBoxSizer* bUpperSizer;
wxArrayString m_layerCheckListBoxChoices; bUpperSizer = new wxBoxSizer( wxHORIZONTAL );
m_layerCheckListBox = new wxCheckListBox( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_layerCheckListBoxChoices, 0 );
m_LayersSizer->Add( m_layerCheckListBox, 1, wxEXPAND, 5 ); m_LayersSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Layers") ), wxHORIZONTAL );
bUpperSizer->Add( m_LayersSizer, 1, wxALL|wxEXPAND, 3 ); wxArrayString m_layerCheckListBoxChoices;
m_layerCheckListBox = new wxCheckListBox( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_layerCheckListBoxChoices, 0 );
m_PlotOptionsSizer = new wxBoxSizer( wxVERTICAL ); m_LayersSizer->Add( m_layerCheckListBox, 1, wxEXPAND, 5 );
wxStaticBoxSizer* sbOptionsSizer;
sbOptionsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Options") ), wxVERTICAL ); bUpperSizer->Add( m_LayersSizer, 1, wxALL|wxEXPAND, 3 );
wxBoxSizer* bSizer192; m_PlotOptionsSizer = new wxBoxSizer( wxVERTICAL );
bSizer192 = new wxBoxSizer( wxHORIZONTAL );
wxStaticBoxSizer* sbOptionsSizer;
wxBoxSizer* bSizerPlotItems; sbOptionsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Options") ), wxVERTICAL );
bSizerPlotItems = new wxBoxSizer( wxVERTICAL );
wxBoxSizer* bSizer192;
m_plotSheetRef = new wxCheckBox( this, wxID_ANY, _("Plot sheet reference on all layers"), wxDefaultPosition, wxDefaultSize, 0 ); bSizer192 = new wxBoxSizer( wxHORIZONTAL );
bSizerPlotItems->Add( m_plotSheetRef, 0, wxTOP|wxRIGHT|wxLEFT, 2 );
wxBoxSizer* bSizerPlotItems;
m_plotPads_on_Silkscreen = new wxCheckBox( this, ID_ALLOW_PRINT_PAD_ON_SILKSCREEN, _("Plot pads on silkscreen"), wxDefaultPosition, wxDefaultSize, 0 ); bSizerPlotItems = new wxBoxSizer( wxVERTICAL );
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") );
m_plotSheetRef = new wxCheckBox( this, wxID_ANY, _("Plot sheet reference on all layers"), wxDefaultPosition, wxDefaultSize, 0 );
bSizerPlotItems->Add( m_plotPads_on_Silkscreen, 0, wxTOP|wxRIGHT|wxLEFT, 2 ); bSizerPlotItems->Add( m_plotSheetRef, 0, wxTOP|wxRIGHT|wxLEFT, 2 );
m_plotModuleValueOpt = new wxCheckBox( this, wxID_ANY, _("Plot module value 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 );
bSizerPlotItems->Add( m_plotModuleValueOpt, 0, wxTOP|wxRIGHT|wxLEFT, 2 ); 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") );
m_plotModuleRefOpt = new wxCheckBox( this, ID_PRINT_REF, _("Plot module reference on silkscreen"), wxDefaultPosition, wxDefaultSize, 0 ); bSizerPlotItems->Add( m_plotPads_on_Silkscreen, 0, wxTOP|wxRIGHT|wxLEFT, 2 );
bSizerPlotItems->Add( m_plotModuleRefOpt, 0, wxTOP|wxRIGHT|wxLEFT, 2 );
m_plotModuleValueOpt = new wxCheckBox( this, wxID_ANY, _("Plot module value on silkscreen"), wxDefaultPosition, wxDefaultSize, 0 );
m_plotTextOther = new wxCheckBox( this, wxID_ANY, _("Plot other module texts on silkscreen"), wxDefaultPosition, wxDefaultSize, 0 ); bSizerPlotItems->Add( m_plotModuleValueOpt, 0, wxTOP|wxRIGHT|wxLEFT, 2 );
m_plotTextOther->SetToolTip( _("Enable/disable print/plot module field texts on silkscreen layers") );
m_plotModuleRefOpt = new wxCheckBox( this, ID_PRINT_REF, _("Plot module reference on silkscreen"), wxDefaultPosition, wxDefaultSize, 0 );
bSizerPlotItems->Add( m_plotTextOther, 0, wxTOP|wxRIGHT|wxLEFT, 2 ); bSizerPlotItems->Add( m_plotModuleRefOpt, 0, wxTOP|wxRIGHT|wxLEFT, 2 );
m_plotInvisibleText = new wxCheckBox( this, wxID_ANY, _("Plot invisible texts on silkscreen"), wxDefaultPosition, wxDefaultSize, 0 ); m_plotTextOther = new wxCheckBox( this, wxID_ANY, _("Plot other module texts on silkscreen"), wxDefaultPosition, wxDefaultSize, 0 );
m_plotInvisibleText->SetToolTip( _("Force print/plot module invisible texts on silkscreen layers") ); m_plotTextOther->SetToolTip( _("Enable/disable print/plot module field texts on silkscreen layers") );
bSizerPlotItems->Add( m_plotInvisibleText, 0, wxALL, 2 ); bSizerPlotItems->Add( m_plotTextOther, 0, wxTOP|wxRIGHT|wxLEFT, 2 );
m_plotNoViaOnMaskOpt = new wxCheckBox( this, wxID_ANY, _("Do not tent vias"), wxDefaultPosition, wxDefaultSize, 0 ); m_plotInvisibleText = new wxCheckBox( this, wxID_ANY, _("Plot invisible texts on silkscreen"), wxDefaultPosition, wxDefaultSize, 0 );
m_plotNoViaOnMaskOpt->SetToolTip( _("Remove soldermask on vias.") ); m_plotInvisibleText->SetToolTip( _("Force print/plot module invisible texts on silkscreen layers") );
bSizerPlotItems->Add( m_plotNoViaOnMaskOpt, 0, wxALL, 2 ); bSizerPlotItems->Add( m_plotInvisibleText, 0, wxALL, 2 );
m_plotMirrorOpt = new wxCheckBox( this, ID_MIROR_OPT, _("Mirrored plot"), wxDefaultPosition, wxDefaultSize, 0 ); m_plotNoViaOnMaskOpt = new wxCheckBox( this, wxID_ANY, _("Do not tent vias"), wxDefaultPosition, wxDefaultSize, 0 );
bSizerPlotItems->Add( m_plotMirrorOpt, 0, wxALL, 2 ); m_plotNoViaOnMaskOpt->SetToolTip( _("Remove soldermask on vias.") );
bSizer192->Add( bSizerPlotItems, 0, wxEXPAND, 5 ); bSizerPlotItems->Add( m_plotNoViaOnMaskOpt, 0, wxALL, 2 );
wxBoxSizer* bSizer14; m_plotMirrorOpt = new wxCheckBox( this, ID_MIROR_OPT, _("Mirrored plot"), wxDefaultPosition, wxDefaultSize, 0 );
bSizer14 = new wxBoxSizer( wxVERTICAL ); bSizerPlotItems->Add( m_plotMirrorOpt, 0, wxALL, 2 );
m_staticText11 = new wxStaticText( this, wxID_ANY, _("Drill marks:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText11->Wrap( -1 ); bSizer192->Add( bSizerPlotItems, 0, wxEXPAND, 5 );
bSizer14->Add( m_staticText11, 0, wxRIGHT|wxLEFT, 5 );
wxBoxSizer* bSizer14;
wxString m_drillShapeOptChoices[] = { _("None"), _("Small"), _("Actual size") }; bSizer14 = new wxBoxSizer( wxVERTICAL );
int m_drillShapeOptNChoices = sizeof( m_drillShapeOptChoices ) / sizeof( wxString );
m_drillShapeOpt = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_drillShapeOptNChoices, m_drillShapeOptChoices, 0 ); m_staticText11 = new wxStaticText( this, wxID_ANY, _("Drill marks:"), wxDefaultPosition, wxDefaultSize, 0 );
m_drillShapeOpt->SetSelection( 0 ); m_staticText11->Wrap( -1 );
bSizer14->Add( m_drillShapeOpt, 0, wxEXPAND|wxLEFT, 5 ); bSizer14->Add( m_staticText11, 0, wxRIGHT|wxLEFT, 5 );
m_staticText12 = new wxStaticText( this, wxID_ANY, _("Scaling:"), wxDefaultPosition, wxDefaultSize, 0 ); wxString m_drillShapeOptChoices[] = { _("None"), _("Small"), _("Actual size") };
m_staticText12->Wrap( -1 ); int m_drillShapeOptNChoices = sizeof( m_drillShapeOptChoices ) / sizeof( wxString );
bSizer14->Add( m_staticText12, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); m_drillShapeOpt = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_drillShapeOptNChoices, m_drillShapeOptChoices, 0 );
m_drillShapeOpt->SetSelection( 0 );
wxString m_scaleOptChoices[] = { _("Auto"), _("1:1"), _("3:2"), _("2:1"), _("3:1") }; bSizer14->Add( m_drillShapeOpt, 0, wxEXPAND|wxLEFT, 5 );
int m_scaleOptNChoices = sizeof( m_scaleOptChoices ) / sizeof( wxString );
m_scaleOpt = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_scaleOptNChoices, m_scaleOptChoices, 0 ); m_staticText12 = new wxStaticText( this, wxID_ANY, _("Scaling:"), wxDefaultPosition, wxDefaultSize, 0 );
m_scaleOpt->SetSelection( 0 ); m_staticText12->Wrap( -1 );
bSizer14->Add( m_scaleOpt, 0, wxEXPAND|wxLEFT, 5 ); bSizer14->Add( m_staticText12, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_staticText13 = new wxStaticText( this, wxID_ANY, _("Plot mode:"), wxDefaultPosition, wxDefaultSize, 0 ); wxString m_scaleOptChoices[] = { _("Auto"), _("1:1"), _("3:2"), _("2:1"), _("3:1") };
m_staticText13->Wrap( -1 ); int m_scaleOptNChoices = sizeof( m_scaleOptChoices ) / sizeof( wxString );
bSizer14->Add( m_staticText13, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); m_scaleOpt = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_scaleOptNChoices, m_scaleOptChoices, 0 );
m_scaleOpt->SetSelection( 0 );
wxString m_plotModeOptChoices[] = { _("Line"), _("Filled"), _("Sketch") }; bSizer14->Add( m_scaleOpt, 0, wxEXPAND|wxLEFT, 5 );
int m_plotModeOptNChoices = sizeof( m_plotModeOptChoices ) / sizeof( wxString );
m_plotModeOpt = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_plotModeOptNChoices, m_plotModeOptChoices, 0 ); m_staticText13 = new wxStaticText( this, wxID_ANY, _("Plot mode:"), wxDefaultPosition, wxDefaultSize, 0 );
m_plotModeOpt->SetSelection( 0 ); m_staticText13->Wrap( -1 );
bSizer14->Add( m_plotModeOpt, 0, wxEXPAND|wxLEFT, 5 ); bSizer14->Add( m_staticText13, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_textDefaultPenSize = new wxStaticText( this, wxID_ANY, _("Default linewidth"), wxDefaultPosition, wxDefaultSize, 0 ); wxString m_plotModeOptChoices[] = { _("Line"), _("Filled"), _("Sketch") };
m_textDefaultPenSize->Wrap( -1 ); int m_plotModeOptNChoices = sizeof( m_plotModeOptChoices ) / sizeof( wxString );
m_textDefaultPenSize->SetToolTip( _("Pen size used to draw items that have no pen size specified.\nUsed mainly to draw items in sketch mode.") ); m_plotModeOpt = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_plotModeOptNChoices, m_plotModeOptChoices, 0 );
m_plotModeOpt->SetSelection( 0 );
bSizer14->Add( m_textDefaultPenSize, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); bSizer14->Add( m_plotModeOpt, 0, wxEXPAND|wxLEFT, 5 );
m_linesWidth = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); m_textDefaultPenSize = new wxStaticText( this, wxID_ANY, _("Default linewidth"), wxDefaultPosition, wxDefaultSize, 0 );
m_linesWidth->SetToolTip( _("Line width for, e.g., sheet references.") ); m_textDefaultPenSize->Wrap( -1 );
m_textDefaultPenSize->SetToolTip( _("Pen size used to draw items that have no pen size specified.\nUsed mainly to draw items in sketch mode.") );
bSizer14->Add( m_linesWidth, 0, wxBOTTOM|wxEXPAND|wxLEFT, 5 );
bSizer14->Add( m_textDefaultPenSize, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
bSizer192->Add( bSizer14, 1, wxRIGHT|wxLEFT, 3 );
m_linesWidth = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
sbOptionsSizer->Add( bSizer192, 0, wxEXPAND, 5 ); m_linesWidth->SetToolTip( _("Line width for, e.g., sheet references.") );
m_PlotOptionsSizer->Add( sbOptionsSizer, 0, wxALL|wxEXPAND, 3 ); bSizer14->Add( m_linesWidth, 0, wxBOTTOM|wxEXPAND|wxLEFT, 5 );
m_GerberOptionsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Gerber Options") ), wxVERTICAL );
bSizer192->Add( bSizer14, 1, wxRIGHT|wxLEFT, 3 );
m_useGerberExtensions = new wxCheckBox( this, wxID_ANY, _("Use proper filename extensions"), wxDefaultPosition, wxDefaultSize, 0 );
m_useGerberExtensions->SetToolTip( _("Use proper Gerber extensions - .GBL, .GTL, etc...") );
sbOptionsSizer->Add( bSizer192, 0, wxEXPAND, 5 );
m_GerberOptionsSizer->Add( m_useGerberExtensions, 0, wxLEFT|wxRIGHT|wxTOP, 2 );
m_excludeEdgeLayerOpt = new wxCheckBox( this, wxID_ANY, _("Exclude PCB edge layer from other layers"), wxDefaultPosition, wxDefaultSize, 0 ); m_PlotOptionsSizer->Add( sbOptionsSizer, 0, wxALL|wxEXPAND, 3 );
m_excludeEdgeLayerOpt->SetToolTip( _("Exclude contents of the pcb edge layer from all other layers") );
m_GerberOptionsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Gerber Options") ), wxVERTICAL );
m_GerberOptionsSizer->Add( m_excludeEdgeLayerOpt, 0, wxTOP|wxRIGHT|wxLEFT, 2 );
m_useGerberExtensions = new wxCheckBox( this, wxID_ANY, _("Use proper filename extensions"), wxDefaultPosition, wxDefaultSize, 0 );
m_subtractMaskFromSilk = new wxCheckBox( this, wxID_ANY, _("Subtract soldermask from silkscreen"), wxDefaultPosition, wxDefaultSize, 0 ); m_useGerberExtensions->SetToolTip( _("Use proper Gerber extensions - .GBL, .GTL, etc...") );
m_subtractMaskFromSilk->SetToolTip( _("Remove silkscreen from areas without soldermask") );
m_GerberOptionsSizer->Add( m_useGerberExtensions, 0, wxLEFT|wxRIGHT|wxTOP, 2 );
m_GerberOptionsSizer->Add( m_subtractMaskFromSilk, 0, wxTOP|wxRIGHT|wxLEFT, 2 );
m_excludeEdgeLayerOpt = new wxCheckBox( this, wxID_ANY, _("Exclude PCB edge layer from other layers"), wxDefaultPosition, wxDefaultSize, 0 );
m_useAuxOriginCheckBox = new wxCheckBox( this, wxID_ANY, _("Use auxiliary axis as origin"), wxDefaultPosition, wxDefaultSize, 0 ); m_excludeEdgeLayerOpt->SetToolTip( _("Exclude contents of the pcb edge layer from all other layers") );
m_useAuxOriginCheckBox->SetToolTip( _("Use auxiliary axis as coordinates origin in Gerber files.") );
m_GerberOptionsSizer->Add( m_excludeEdgeLayerOpt, 0, wxTOP|wxRIGHT|wxLEFT, 2 );
m_GerberOptionsSizer->Add( m_useAuxOriginCheckBox, 0, wxALL, 2 );
m_subtractMaskFromSilk = new wxCheckBox( this, wxID_ANY, _("Subtract soldermask from silkscreen"), wxDefaultPosition, wxDefaultSize, 0 );
m_PlotOptionsSizer->Add( m_GerberOptionsSizer, 0, wxALL|wxEXPAND, 3 ); m_subtractMaskFromSilk->SetToolTip( _("Remove silkscreen from areas without soldermask") );
m_HPGLOptionsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("HPGL Options") ), wxVERTICAL ); m_GerberOptionsSizer->Add( m_subtractMaskFromSilk, 0, wxTOP|wxRIGHT|wxLEFT, 2 );
wxBoxSizer* bSizer22; m_useAuxOriginCheckBox = new wxCheckBox( this, wxID_ANY, _("Use auxiliary axis as origin"), wxDefaultPosition, wxDefaultSize, 0 );
bSizer22 = new wxBoxSizer( wxHORIZONTAL ); m_useAuxOriginCheckBox->SetToolTip( _("Use auxiliary axis as coordinates origin in Gerber files.") );
wxBoxSizer* bSizer20; m_GerberOptionsSizer->Add( m_useAuxOriginCheckBox, 0, wxALL, 2 );
bSizer20 = new wxBoxSizer( wxVERTICAL );
m_textPenSize = new wxStaticText( this, wxID_ANY, _("Pen size"), wxDefaultPosition, wxDefaultSize, 0 ); m_PlotOptionsSizer->Add( m_GerberOptionsSizer, 0, wxALL|wxEXPAND, 3 );
m_textPenSize->Wrap( -1 );
bSizer20->Add( m_textPenSize, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); m_HPGLOptionsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("HPGL Options") ), wxVERTICAL );
m_HPGLPenSizeOpt = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); wxBoxSizer* bSizer22;
bSizer20->Add( m_HPGLPenSizeOpt, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); bSizer22 = new wxBoxSizer( wxHORIZONTAL );
m_textPenOvr = new wxStaticText( this, wxID_ANY, _("Pen overlay"), wxDefaultPosition, wxDefaultSize, 0 ); wxBoxSizer* bSizer20;
m_textPenOvr->Wrap( -1 ); bSizer20 = new wxBoxSizer( wxVERTICAL );
bSizer20->Add( m_textPenOvr, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_textPenSize = new wxStaticText( this, wxID_ANY, _("Pen size"), wxDefaultPosition, wxDefaultSize, 0 );
m_HPGLPenOverlayOpt = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); m_textPenSize->Wrap( -1 );
m_HPGLPenOverlayOpt->SetToolTip( _("Set plot overlay for filling") ); bSizer20->Add( m_textPenSize, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
bSizer20->Add( m_HPGLPenOverlayOpt, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); m_HPGLPenSizeOpt = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
bSizer20->Add( m_HPGLPenSizeOpt, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
bSizer22->Add( bSizer20, 1, wxEXPAND, 5 );
m_textPenOvr = new wxStaticText( this, wxID_ANY, _("Pen overlay"), wxDefaultPosition, wxDefaultSize, 0 );
wxBoxSizer* bSizer21; m_textPenOvr->Wrap( -1 );
bSizer21 = new wxBoxSizer( wxVERTICAL ); bSizer20->Add( m_textPenOvr, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_textPenSpeed = new wxStaticText( this, wxID_ANY, _("Pen speed (cm/s):"), wxDefaultPosition, wxDefaultSize, 0 ); m_HPGLPenOverlayOpt = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_textPenSpeed->Wrap( -1 ); m_HPGLPenOverlayOpt->SetToolTip( _("Set plot overlay for filling") );
bSizer21->Add( m_textPenSpeed, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
bSizer20->Add( m_HPGLPenOverlayOpt, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
m_HPGLPenSpeedOpt = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_HPGLPenSpeedOpt->SetToolTip( _("Set pen speed in cm/s") );
bSizer22->Add( bSizer20, 1, wxEXPAND, 5 );
bSizer21->Add( m_HPGLPenSpeedOpt, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
wxBoxSizer* bSizer21;
bSizer22->Add( bSizer21, 1, wxEXPAND, 5 ); bSizer21 = new wxBoxSizer( wxVERTICAL );
m_HPGLOptionsSizer->Add( bSizer22, 1, wxEXPAND, 5 ); m_textPenSpeed = new wxStaticText( this, wxID_ANY, _("Pen speed (cm/s):"), wxDefaultPosition, wxDefaultSize, 0 );
m_textPenSpeed->Wrap( -1 );
m_PlotOptionsSizer->Add( m_HPGLOptionsSizer, 0, wxALL|wxEXPAND, 3 ); bSizer21->Add( m_textPenSpeed, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_PSOptionsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Postscript Options") ), wxVERTICAL ); m_HPGLPenSpeedOpt = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_HPGLPenSpeedOpt->SetToolTip( _("Set pen speed in cm/s") );
wxBoxSizer* bSizer17;
bSizer17 = new wxBoxSizer( wxHORIZONTAL ); bSizer21->Add( m_HPGLPenSpeedOpt, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
wxBoxSizer* bSizer18;
bSizer18 = new wxBoxSizer( wxVERTICAL ); bSizer22->Add( bSizer21, 1, wxEXPAND, 5 );
m_staticText7 = new wxStaticText( this, wxID_ANY, _("X scale:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText7->Wrap( -1 ); m_HPGLOptionsSizer->Add( bSizer22, 1, wxEXPAND, 5 );
bSizer18->Add( m_staticText7, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_fineAdjustXscaleOpt = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); m_PlotOptionsSizer->Add( m_HPGLOptionsSizer, 0, wxALL|wxEXPAND, 3 );
m_fineAdjustXscaleOpt->SetToolTip( _("Set global X scale adjust for exact scale postscript output.") );
m_PSOptionsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Postscript Options") ), wxVERTICAL );
bSizer18->Add( m_fineAdjustXscaleOpt, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
wxBoxSizer* bSizer17;
bSizer17->Add( bSizer18, 1, wxEXPAND, 5 ); bSizer17 = new wxBoxSizer( wxHORIZONTAL );
wxBoxSizer* bSizer19; wxBoxSizer* bSizer18;
bSizer19 = new wxBoxSizer( wxVERTICAL ); bSizer18 = new wxBoxSizer( wxVERTICAL );
m_staticText8 = new wxStaticText( this, wxID_ANY, _("Y scale:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText7 = new wxStaticText( this, wxID_ANY, _("X scale:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText8->Wrap( -1 ); m_staticText7->Wrap( -1 );
bSizer19->Add( m_staticText8, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); bSizer18->Add( m_staticText7, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_fineAdjustYscaleOpt = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); m_fineAdjustXscaleOpt = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_fineAdjustYscaleOpt->SetToolTip( _("Set global Y scale adjust for exact scale postscript output.") ); m_fineAdjustXscaleOpt->SetToolTip( _("Set global X scale adjust for exact scale postscript output.") );
bSizer19->Add( m_fineAdjustYscaleOpt, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); bSizer18->Add( m_fineAdjustXscaleOpt, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
bSizer17->Add( bSizer19, 1, wxEXPAND, 5 );
bSizer17->Add( bSizer18, 1, wxEXPAND, 5 );
wxBoxSizer* bSizer191;
bSizer191 = new wxBoxSizer( wxVERTICAL ); wxBoxSizer* bSizer19;
bSizer19 = new wxBoxSizer( wxVERTICAL );
m_textPSFineAdjustWidth = new wxStaticText( this, wxID_ANY, _("Width correction"), wxDefaultPosition, wxDefaultSize, 0 );
m_textPSFineAdjustWidth->Wrap( -1 ); m_staticText8 = new wxStaticText( this, wxID_ANY, _("Y scale:"), wxDefaultPosition, wxDefaultSize, 0 );
bSizer191->Add( m_textPSFineAdjustWidth, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); m_staticText8->Wrap( -1 );
bSizer19->Add( m_staticText8, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_PSFineAdjustWidthOpt = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_PSFineAdjustWidthOpt->SetToolTip( _("Set global width correction for exact width postscript output.\nThese width correction is intended to compensate tracks width and also pads and vias size errors.\nThe reasonable width correction value must be in a range of [-(MinTrackWidth-1), +(MinClearanceValue-1)] in decimils.") ); m_fineAdjustYscaleOpt = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_fineAdjustYscaleOpt->SetToolTip( _("Set global Y scale adjust for exact scale postscript output.") );
bSizer191->Add( m_PSFineAdjustWidthOpt, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
bSizer19->Add( m_fineAdjustYscaleOpt, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
bSizer17->Add( bSizer191, 1, wxEXPAND, 5 );
m_PSOptionsSizer->Add( bSizer17, 1, wxEXPAND, 5 ); bSizer17->Add( bSizer19, 1, wxEXPAND, 5 );
m_plotPSNegativeOpt = new wxCheckBox( this, wxID_ANY, _("Negative plot"), wxDefaultPosition, wxDefaultSize, 0 ); wxBoxSizer* bSizer191;
m_PSOptionsSizer->Add( m_plotPSNegativeOpt, 0, wxALL, 2 ); bSizer191 = new wxBoxSizer( wxVERTICAL );
m_forcePSA4OutputOpt = new wxCheckBox( this, wxID_ANY, _("Force A4 output"), wxDefaultPosition, wxDefaultSize, 0 ); m_textPSFineAdjustWidth = new wxStaticText( this, wxID_ANY, _("Width correction"), wxDefaultPosition, wxDefaultSize, 0 );
m_PSOptionsSizer->Add( m_forcePSA4OutputOpt, 0, wxALL, 2 ); m_textPSFineAdjustWidth->Wrap( -1 );
bSizer191->Add( m_textPSFineAdjustWidth, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
m_PlotOptionsSizer->Add( m_PSOptionsSizer, 0, wxALL|wxEXPAND, 3 );
m_PSFineAdjustWidthOpt = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
bUpperSizer->Add( m_PlotOptionsSizer, 0, 0, 5 ); m_PSFineAdjustWidthOpt->SetToolTip( _("Set global width correction for exact width postscript output.\nThese width correction is intended to compensate tracks width and also pads and vias size errors.\nThe reasonable width correction value must be in a range of [-(MinTrackWidth-1), +(MinClearanceValue-1)] in decimils.") );
bSizer12->Add( bUpperSizer, 0, wxEXPAND, 5 ); bSizer191->Add( m_PSFineAdjustWidthOpt, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
wxStaticBoxSizer* sbSizerMsg;
sbSizerMsg = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Messages:") ), wxVERTICAL ); bSizer17->Add( bSizer191, 1, wxEXPAND, 5 );
m_messagesBox = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY );
m_messagesBox->SetMinSize( wxSize( -1,70 ) ); m_PSOptionsSizer->Add( bSizer17, 1, wxEXPAND, 5 );
sbSizerMsg->Add( m_messagesBox, 1, wxEXPAND, 5 ); m_plotPSNegativeOpt = new wxCheckBox( this, wxID_ANY, _("Negative plot"), wxDefaultPosition, wxDefaultSize, 0 );
m_PSOptionsSizer->Add( m_plotPSNegativeOpt, 0, wxALL, 2 );
bSizer12->Add( sbSizerMsg, 1, wxEXPAND, 5 );
m_forcePSA4OutputOpt = new wxCheckBox( this, wxID_ANY, _("Force A4 output"), wxDefaultPosition, wxDefaultSize, 0 );
wxBoxSizer* bSizerButtons; m_PSOptionsSizer->Add( m_forcePSA4OutputOpt, 0, wxALL, 2 );
bSizerButtons = new wxBoxSizer( wxHORIZONTAL );
m_plotButton = new wxButton( this, wxID_ANY, _("Plot"), wxDefaultPosition, wxDefaultSize, 0 ); m_PlotOptionsSizer->Add( m_PSOptionsSizer, 0, wxALL|wxEXPAND, 3 );
m_plotButton->SetDefault();
bSizerButtons->Add( m_plotButton, 0, wxALL, 5 );
bUpperSizer->Add( m_PlotOptionsSizer, 0, 0, 5 );
m_buttonDrill = new wxButton( this, ID_CREATE_DRILL_FILE, _("Generate Drill File"), wxDefaultPosition, wxDefaultSize, 0 );
bSizerButtons->Add( m_buttonDrill, 0, wxALL, 5 );
bSizer12->Add( bUpperSizer, 0, wxEXPAND, 5 );
m_buttonQuit = new wxButton( this, wxID_CANCEL, _("Close"), wxDefaultPosition, wxDefaultSize, 0 );
bSizerButtons->Add( m_buttonQuit, 0, wxALL, 5 ); wxStaticBoxSizer* sbSizerMsg;
sbSizerMsg = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Messages:") ), wxVERTICAL );
bSizer12->Add( bSizerButtons, 0, wxALIGN_RIGHT|wxRIGHT|wxLEFT, 5 );
m_messagesBox = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY );
m_MainSizer->Add( bSizer12, 1, wxALL|wxEXPAND, 5 ); m_messagesBox->SetMinSize( wxSize( -1,70 ) );
this->SetSizer( m_MainSizer ); sbSizerMsg->Add( m_messagesBox, 1, wxEXPAND, 5 );
this->Layout();
// Connect Events bSizer12->Add( sbSizerMsg, 1, wxEXPAND, 5 );
this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_PLOT_BASE::OnClose ) );
this->Connect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_PLOT_BASE::OnInitDialog ) ); wxBoxSizer* bSizerButtons;
m_plotFormatOpt->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_PLOT_BASE::SetPlotFormat ), NULL, this ); bSizerButtons = new wxBoxSizer( wxHORIZONTAL );
m_browseButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::OnOutputDirectoryBrowseClicked ), NULL, this );
m_scaleOpt->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_PLOT_BASE::OnSetScaleOpt ), NULL, this ); m_plotButton = new wxButton( this, wxID_ANY, _("Plot"), wxDefaultPosition, wxDefaultSize, 0 );
m_plotButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::Plot ), NULL, this ); m_plotButton->SetDefault();
m_buttonDrill->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::CreateDrillFile ), NULL, this ); bSizerButtons->Add( m_plotButton, 0, wxALL, 5 );
m_buttonQuit->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::OnQuit ), NULL, this );
} m_buttonDrill = new wxButton( this, ID_CREATE_DRILL_FILE, _("Generate Drill File"), wxDefaultPosition, wxDefaultSize, 0 );
bSizerButtons->Add( m_buttonDrill, 0, wxALL, 5 );
DIALOG_PLOT_BASE::~DIALOG_PLOT_BASE()
{ m_buttonQuit = new wxButton( this, wxID_CANCEL, _("Close"), wxDefaultPosition, wxDefaultSize, 0 );
// Disconnect Events bSizerButtons->Add( m_buttonQuit, 0, wxALL, 5 );
this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_PLOT_BASE::OnClose ) );
this->Disconnect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_PLOT_BASE::OnInitDialog ) );
m_plotFormatOpt->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_PLOT_BASE::SetPlotFormat ), NULL, this ); bSizer12->Add( bSizerButtons, 0, wxALIGN_RIGHT|wxRIGHT|wxLEFT, 5 );
m_browseButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::OnOutputDirectoryBrowseClicked ), NULL, this );
m_scaleOpt->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_PLOT_BASE::OnSetScaleOpt ), NULL, this );
m_plotButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::Plot ), NULL, this ); m_MainSizer->Add( bSizer12, 1, wxALL|wxEXPAND, 5 );
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 );
this->SetSizer( m_MainSizer );
} this->Layout();
m_MainSizer->Fit( this );
this->Centre( wxBOTH );
// Connect Events
this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_PLOT_BASE::OnClose ) );
this->Connect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_PLOT_BASE::OnInitDialog ) );
m_plotFormatOpt->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_PLOT_BASE::SetPlotFormat ), NULL, this );
m_browseButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::OnOutputDirectoryBrowseClicked ), NULL, this );
m_scaleOpt->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_PLOT_BASE::OnSetScaleOpt ), NULL, this );
m_plotButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::Plot ), 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 );
}
DIALOG_PLOT_BASE::~DIALOG_PLOT_BASE()
{
// Disconnect Events
this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_PLOT_BASE::OnClose ) );
this->Disconnect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_PLOT_BASE::OnInitDialog ) );
m_plotFormatOpt->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_PLOT_BASE::SetPlotFormat ), NULL, this );
m_browseButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::OnOutputDirectoryBrowseClicked ), NULL, this );
m_scaleOpt->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_PLOT_BASE::OnSetScaleOpt ), NULL, this );
m_plotButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::Plot ), 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 );
}
This source diff could not be displayed because it is too large. You can view the blob instead.
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Nov 17 2010) // C++ code generated with wxFormBuilder (version Mar 19 2012)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO "NOT" EDIT THIS FILE! // PLEASE DO "NOT" EDIT THIS FILE!
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
#ifndef __dialog_plot_base__ #ifndef __DIALOG_PLOT_BASE_H__
#define __dialog_plot_base__ #define __DIALOG_PLOT_BASE_H__
#include <wx/intl.h> #include <wx/artprov.h>
#include <wx/xrc/xmlres.h>
#include <wx/string.h> #include <wx/intl.h>
#include <wx/stattext.h> #include "dialog_shim.h"
#include <wx/gdicmn.h> #include <wx/string.h>
#include <wx/font.h> #include <wx/stattext.h>
#include <wx/colour.h> #include <wx/gdicmn.h>
#include <wx/settings.h> #include <wx/font.h>
#include <wx/choice.h> #include <wx/colour.h>
#include <wx/sizer.h> #include <wx/settings.h>
#include <wx/textctrl.h> #include <wx/choice.h>
#include <wx/button.h> #include <wx/sizer.h>
#include <wx/checklst.h> #include <wx/textctrl.h>
#include <wx/statbox.h> #include <wx/button.h>
#include <wx/checkbox.h> #include <wx/checklst.h>
#include <wx/dialog.h> #include <wx/statbox.h>
#include <wx/checkbox.h>
/////////////////////////////////////////////////////////////////////////// #include <wx/dialog.h>
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
/// Class DIALOG_PLOT_BASE
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
class DIALOG_PLOT_BASE : public wxDialog /// Class DIALOG_PLOT_BASE
{ ///////////////////////////////////////////////////////////////////////////////
private: class DIALOG_PLOT_BASE : public DIALOG_SHIM
{
protected: private:
enum
{ protected:
ID_ALLOW_PRINT_PAD_ON_SILKSCREEN = 1000, enum
ID_PRINT_REF, {
ID_MIROR_OPT, ID_ALLOW_PRINT_PAD_ON_SILKSCREEN = 1000,
ID_CREATE_DRILL_FILE, ID_PRINT_REF,
}; ID_MIROR_OPT,
ID_CREATE_DRILL_FILE
wxBoxSizer* m_MainSizer; };
wxStaticText* m_staticText121;
wxChoice* m_plotFormatOpt; wxBoxSizer* m_MainSizer;
wxStaticText* m_staticTextDir; wxStaticText* m_staticText121;
wxTextCtrl* m_outputDirectoryName; wxChoice* m_plotFormatOpt;
wxButton* m_browseButton; wxStaticText* m_staticTextDir;
wxStaticBoxSizer* m_LayersSizer; wxTextCtrl* m_outputDirectoryName;
wxCheckListBox* m_layerCheckListBox; wxButton* m_browseButton;
wxBoxSizer* m_PlotOptionsSizer; wxStaticBoxSizer* m_LayersSizer;
wxCheckBox* m_plotSheetRef; wxCheckListBox* m_layerCheckListBox;
wxCheckBox* m_plotPads_on_Silkscreen; wxBoxSizer* m_PlotOptionsSizer;
wxCheckBox* m_plotModuleValueOpt; wxCheckBox* m_plotSheetRef;
wxCheckBox* m_plotModuleRefOpt; wxCheckBox* m_plotPads_on_Silkscreen;
wxCheckBox* m_plotTextOther; wxCheckBox* m_plotModuleValueOpt;
wxCheckBox* m_plotInvisibleText; wxCheckBox* m_plotModuleRefOpt;
wxCheckBox* m_plotNoViaOnMaskOpt; wxCheckBox* m_plotTextOther;
wxCheckBox* m_plotMirrorOpt; wxCheckBox* m_plotInvisibleText;
wxStaticText* m_staticText11; wxCheckBox* m_plotNoViaOnMaskOpt;
wxChoice* m_drillShapeOpt; wxCheckBox* m_plotMirrorOpt;
wxStaticText* m_staticText12; wxStaticText* m_staticText11;
wxChoice* m_scaleOpt; wxChoice* m_drillShapeOpt;
wxStaticText* m_staticText13; wxStaticText* m_staticText12;
wxChoice* m_plotModeOpt; wxChoice* m_scaleOpt;
wxStaticText* m_textDefaultPenSize; wxStaticText* m_staticText13;
wxTextCtrl* m_linesWidth; wxChoice* m_plotModeOpt;
wxStaticBoxSizer* m_GerberOptionsSizer; wxStaticText* m_textDefaultPenSize;
wxCheckBox* m_useGerberExtensions; wxTextCtrl* m_linesWidth;
wxCheckBox* m_excludeEdgeLayerOpt; wxStaticBoxSizer* m_GerberOptionsSizer;
wxCheckBox* m_subtractMaskFromSilk; wxCheckBox* m_useGerberExtensions;
wxCheckBox* m_useAuxOriginCheckBox; wxCheckBox* m_excludeEdgeLayerOpt;
wxStaticBoxSizer* m_HPGLOptionsSizer; wxCheckBox* m_subtractMaskFromSilk;
wxStaticText* m_textPenSize; wxCheckBox* m_useAuxOriginCheckBox;
wxTextCtrl* m_HPGLPenSizeOpt; wxStaticBoxSizer* m_HPGLOptionsSizer;
wxStaticText* m_textPenOvr; wxStaticText* m_textPenSize;
wxTextCtrl* m_HPGLPenOverlayOpt; wxTextCtrl* m_HPGLPenSizeOpt;
wxStaticText* m_textPenSpeed; wxStaticText* m_textPenOvr;
wxTextCtrl* m_HPGLPenSpeedOpt; wxTextCtrl* m_HPGLPenOverlayOpt;
wxStaticBoxSizer* m_PSOptionsSizer; wxStaticText* m_textPenSpeed;
wxStaticText* m_staticText7; wxTextCtrl* m_HPGLPenSpeedOpt;
wxTextCtrl* m_fineAdjustXscaleOpt; wxStaticBoxSizer* m_PSOptionsSizer;
wxStaticText* m_staticText8; wxStaticText* m_staticText7;
wxTextCtrl* m_fineAdjustYscaleOpt; wxTextCtrl* m_fineAdjustXscaleOpt;
wxStaticText* m_textPSFineAdjustWidth; wxStaticText* m_staticText8;
wxTextCtrl* m_PSFineAdjustWidthOpt; wxTextCtrl* m_fineAdjustYscaleOpt;
wxCheckBox* m_plotPSNegativeOpt; wxStaticText* m_textPSFineAdjustWidth;
wxCheckBox* m_forcePSA4OutputOpt; wxTextCtrl* m_PSFineAdjustWidthOpt;
wxTextCtrl* m_messagesBox; wxCheckBox* m_plotPSNegativeOpt;
wxButton* m_plotButton; wxCheckBox* m_forcePSA4OutputOpt;
wxButton* m_buttonDrill; wxTextCtrl* m_messagesBox;
wxButton* m_buttonQuit; wxButton* m_plotButton;
wxButton* m_buttonDrill;
// Virtual event handlers, overide them in your derived class wxButton* m_buttonQuit;
virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
virtual void OnInitDialog( wxInitDialogEvent& event ) { event.Skip(); } // Virtual event handlers, overide them in your derived class
virtual void SetPlotFormat( wxCommandEvent& event ) { event.Skip(); } virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
virtual void OnOutputDirectoryBrowseClicked( wxCommandEvent& event ) { event.Skip(); } virtual void OnInitDialog( wxInitDialogEvent& event ) { event.Skip(); }
virtual void OnSetScaleOpt( wxCommandEvent& event ) { event.Skip(); } virtual void SetPlotFormat( wxCommandEvent& event ) { event.Skip(); }
virtual void Plot( wxCommandEvent& event ) { event.Skip(); } virtual void OnOutputDirectoryBrowseClicked( wxCommandEvent& event ) { event.Skip(); }
virtual void CreateDrillFile( wxCommandEvent& event ) { event.Skip(); } virtual void OnSetScaleOpt( wxCommandEvent& event ) { event.Skip(); }
virtual void OnQuit( wxCommandEvent& event ) { event.Skip(); } virtual void Plot( wxCommandEvent& event ) { event.Skip(); }
virtual void CreateDrillFile( wxCommandEvent& event ) { event.Skip(); }
virtual void OnQuit( wxCommandEvent& event ) { event.Skip(); }
public:
DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Plot"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 474,747 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); public:
~DIALOG_PLOT_BASE();
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();
#endif //__dialog_plot_base__ };
#endif //__DIALOG_PLOT_BASE_H__
/****************************************/
/* File: dialog_print_for_modedit.cpp */ /* File: dialog_print_for_modedit.cpp */
/****************************************/
// Set this to 1 if you want to test PostScript printing under MSW. // Set this to 1 if you want to test PostScript printing under MSW.
#define wxTEST_POSTSCRIPT_IN_MSW 1 #define wxTEST_POSTSCRIPT_IN_MSW 1
...@@ -30,23 +30,27 @@ static wxPrintData* s_PrintData; ...@@ -30,23 +30,27 @@ static wxPrintData* s_PrintData;
static wxPageSetupDialogData* s_pageSetupData = (wxPageSetupDialogData*) NULL; static wxPageSetupDialogData* s_pageSetupData = (wxPageSetupDialogData*) NULL;
/* Dialog to print schematic. Class derived from DIALOG_PRINT_FOR_MODEDIT_BASE /**
* created by wxFormBuilder * Class DIALOG_PRINT_FOR_MODEDIT
* is derived from DIALOG_PRINT_FOR_MODEDIT_BASE which is created by wxFormBuilder.
*/ */
class DIALOG_PRINT_FOR_MODEDIT : public DIALOG_PRINT_FOR_MODEDIT_BASE class DIALOG_PRINT_FOR_MODEDIT : public DIALOG_PRINT_FOR_MODEDIT_BASE
{ {
private:
EDA_DRAW_FRAME* m_Parent;
wxConfig* m_Config;
public: public:
DIALOG_PRINT_FOR_MODEDIT( EDA_DRAW_FRAME* parent ); DIALOG_PRINT_FOR_MODEDIT( PCB_BASE_FRAME* parent );
~DIALOG_PRINT_FOR_MODEDIT() {};
private: private:
PCB_BASE_FRAME* m_parent;
wxConfig* m_config;
void OnCloseWindow( wxCloseEvent& event ); void OnCloseWindow( wxCloseEvent& event );
/// Open a dialog box for printer setup (printer options, page size ...)
void OnPrintSetup( wxCommandEvent& event ); void OnPrintSetup( wxCommandEvent& event );
void OnPrintPreview( wxCommandEvent& event ); void OnPrintPreview( wxCommandEvent& event );
/// Called on activate Print button
void OnPrintButtonClick( wxCommandEvent& event ); void OnPrintButtonClick( wxCommandEvent& event );
void OnButtonCancelClick( wxCommandEvent& event ) { Close(); } void OnButtonCancelClick( wxCommandEvent& event ) { Close(); }
...@@ -54,12 +58,7 @@ private: ...@@ -54,12 +58,7 @@ private:
}; };
/*************************************************************/
void FOOTPRINT_EDIT_FRAME::ToPrinter( wxCommandEvent& event ) void FOOTPRINT_EDIT_FRAME::ToPrinter( wxCommandEvent& event )
/*************************************************************/
/* Virtual function:
* Display the print dialog
*/
{ {
if( s_PrintData == NULL ) // First print if( s_PrintData == NULL ) // First print
{ {
...@@ -74,34 +73,27 @@ void FOOTPRINT_EDIT_FRAME::ToPrinter( wxCommandEvent& event ) ...@@ -74,34 +73,27 @@ void FOOTPRINT_EDIT_FRAME::ToPrinter( wxCommandEvent& event )
s_PrintData->SetOrientation( GetPageSettings().IsPortrait() ? wxPORTRAIT : wxLANDSCAPE ); s_PrintData->SetOrientation( GetPageSettings().IsPortrait() ? wxPORTRAIT : wxLANDSCAPE );
DIALOG_PRINT_FOR_MODEDIT* frame = new DIALOG_PRINT_FOR_MODEDIT( this ); DIALOG_PRINT_FOR_MODEDIT dlg( this );
frame->ShowModal(); dlg.ShowModal();
frame->Destroy();
} }
/*************************************************************************************/
DIALOG_PRINT_FOR_MODEDIT::DIALOG_PRINT_FOR_MODEDIT( EDA_DRAW_FRAME* parent ) : DIALOG_PRINT_FOR_MODEDIT::DIALOG_PRINT_FOR_MODEDIT( PCB_BASE_FRAME* parent ) :
DIALOG_PRINT_FOR_MODEDIT_BASE( parent ) DIALOG_PRINT_FOR_MODEDIT_BASE( parent )
/*************************************************************************************/
{ {
m_Parent = parent; m_parent = parent;
s_Parameters.m_ForceCentered = true; s_Parameters.m_ForceCentered = true;
m_Config = wxGetApp().GetSettings(); m_config = wxGetApp().GetSettings();
InitValues(); InitValues();
m_buttonPrint->SetDefault(); m_buttonPrint->SetDefault();
GetSizer()->SetSizeHints( this ); GetSizer()->SetSizeHints( this );
Center();
} }
/************************************************************************/
void DIALOG_PRINT_FOR_MODEDIT::InitValues( ) void DIALOG_PRINT_FOR_MODEDIT::InitValues( )
/************************************************************************/
{ {
SetFocus();
if( s_pageSetupData == NULL ) if( s_pageSetupData == NULL )
{ {
s_pageSetupData = new wxPageSetupDialogData; s_pageSetupData = new wxPageSetupDialogData;
...@@ -115,13 +107,12 @@ void DIALOG_PRINT_FOR_MODEDIT::InitValues( ) ...@@ -115,13 +107,12 @@ void DIALOG_PRINT_FOR_MODEDIT::InitValues( )
// Read the scale adjust option // Read the scale adjust option
int scale_Select = 3; // default selected scale = ScaleList[3] = 1 int scale_Select = 3; // default selected scale = ScaleList[3] = 1
if( m_Config ) if( m_config )
{ {
m_Config->Read( OPTKEY_PRINT_MODULE_SCALE, &scale_Select ); m_config->Read( OPTKEY_PRINT_MODULE_SCALE, &scale_Select );
m_Config->Read( OPTKEY_PRINT_MONOCHROME_MODE, &s_Parameters.m_Print_Black_and_White, 1); m_config->Read( OPTKEY_PRINT_MONOCHROME_MODE, &s_Parameters.m_Print_Black_and_White, 1);
} }
extern int g_DrawDefaultLineThickness;
s_Parameters.m_PenDefaultSize = g_DrawDefaultLineThickness; s_Parameters.m_PenDefaultSize = g_DrawDefaultLineThickness;
m_ScaleOption->SetSelection( scale_Select ); m_ScaleOption->SetSelection( scale_Select );
...@@ -130,25 +121,20 @@ void DIALOG_PRINT_FOR_MODEDIT::InitValues( ) ...@@ -130,25 +121,20 @@ void DIALOG_PRINT_FOR_MODEDIT::InitValues( )
} }
/********************************************************************/
void DIALOG_PRINT_FOR_MODEDIT::OnCloseWindow( wxCloseEvent& event ) void DIALOG_PRINT_FOR_MODEDIT::OnCloseWindow( wxCloseEvent& event )
/********************************************************************/
{ {
if( m_Config ) if( m_config )
{ {
m_Config->Write( OPTKEY_PRINT_MODULE_SCALE, m_ScaleOption->GetSelection() ); m_config->Write( OPTKEY_PRINT_MODULE_SCALE, m_ScaleOption->GetSelection() );
m_Config->Write( OPTKEY_PRINT_MONOCHROME_MODE, s_Parameters.m_Print_Black_and_White); m_config->Write( OPTKEY_PRINT_MONOCHROME_MODE, s_Parameters.m_Print_Black_and_White);
} }
EndModal( 0 ); EndModal( 0 );
} }
/**********************************************************/
void DIALOG_PRINT_FOR_MODEDIT::OnPrintSetup( wxCommandEvent& event )
/**********************************************************/
/* Open a dialog box for printer setup (printer options, page size ...) void DIALOG_PRINT_FOR_MODEDIT::OnPrintSetup( wxCommandEvent& event )
*/
{ {
wxPrintDialogData printDialogData( *s_PrintData ); wxPrintDialogData printDialogData( *s_PrintData );
...@@ -163,9 +149,9 @@ void DIALOG_PRINT_FOR_MODEDIT::OnPrintSetup( wxCommandEvent& event ) ...@@ -163,9 +149,9 @@ void DIALOG_PRINT_FOR_MODEDIT::OnPrintSetup( wxCommandEvent& event )
} }
/************************************************************/
void DIALOG_PRINT_FOR_MODEDIT::OnPrintPreview( wxCommandEvent& event ) void DIALOG_PRINT_FOR_MODEDIT::OnPrintPreview( wxCommandEvent& event )
/************************************************************/
/* Open and display a previewer frame for printing /* Open and display a previewer frame for printing
*/ */
...@@ -176,8 +162,8 @@ void DIALOG_PRINT_FOR_MODEDIT::OnPrintPreview( wxCommandEvent& event ) ...@@ -176,8 +162,8 @@ void DIALOG_PRINT_FOR_MODEDIT::OnPrintPreview( wxCommandEvent& event )
// Pass two printout objects: for preview, and possible printing. // Pass two printout objects: for preview, and possible printing.
wxString title = _( "Print Preview" ); wxString title = _( "Print Preview" );
wxPrintPreview* preview = wxPrintPreview* preview =
new wxPrintPreview( new BOARD_PRINTOUT_CONTROLER( s_Parameters, m_Parent, title ), new wxPrintPreview( new BOARD_PRINTOUT_CONTROLER( s_Parameters, m_parent, title ),
new BOARD_PRINTOUT_CONTROLER( s_Parameters, m_Parent, title ), new BOARD_PRINTOUT_CONTROLER( s_Parameters, m_parent, title ),
s_PrintData ); s_PrintData );
if( preview == NULL ) if( preview == NULL )
...@@ -187,9 +173,9 @@ void DIALOG_PRINT_FOR_MODEDIT::OnPrintPreview( wxCommandEvent& event ) ...@@ -187,9 +173,9 @@ void DIALOG_PRINT_FOR_MODEDIT::OnPrintPreview( wxCommandEvent& event )
} }
// Uses the parent position and size. // Uses the parent position and size.
// @todo uses last position and size ans store them when exit in m_Config // @todo uses last position and size ans store them when exit in m_config
wxPoint WPos = m_Parent->GetPosition(); wxPoint WPos = m_parent->GetPosition();
wxSize WSize = m_Parent->GetSize(); wxSize WSize = m_parent->GetSize();
wxPreviewFrame* frame = new wxPreviewFrame( preview, this, title, WPos, WSize ); wxPreviewFrame* frame = new wxPreviewFrame( preview, this, title, WPos, WSize );
...@@ -198,24 +184,23 @@ void DIALOG_PRINT_FOR_MODEDIT::OnPrintPreview( wxCommandEvent& event ) ...@@ -198,24 +184,23 @@ void DIALOG_PRINT_FOR_MODEDIT::OnPrintPreview( wxCommandEvent& event )
} }
/***************************************************************************/
void DIALOG_PRINT_FOR_MODEDIT::OnPrintButtonClick( wxCommandEvent& event ) void DIALOG_PRINT_FOR_MODEDIT::OnPrintButtonClick( wxCommandEvent& event )
/***************************************************************************/
/* Called on activate Print button
*/
{ {
PCB_PLOT_PARAMS plot_opts = m_parent->GetPlotSettings();
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_PcbPlotOptions.m_FineScaleAdjustX = s_Parameters.m_XScaleAdjust; plot_opts.m_FineScaleAdjustX = s_Parameters.m_XScaleAdjust;
g_PcbPlotOptions.m_FineScaleAdjustY = s_Parameters.m_YScaleAdjust; plot_opts.m_FineScaleAdjustY = s_Parameters.m_YScaleAdjust;
g_PcbPlotOptions.m_PlotScale = s_Parameters.m_PrintScale; plot_opts.m_PlotScale = s_Parameters.m_PrintScale;
m_parent->SetPlotSettings( plot_opts );
wxPrintDialogData printDialogData( *s_PrintData ); wxPrintDialogData printDialogData( *s_PrintData );
wxPrinter printer( &printDialogData ); wxPrinter printer( &printDialogData );
BOARD_PRINTOUT_CONTROLER printout( s_Parameters, m_Parent, _( "Print Footprint" ) ); BOARD_PRINTOUT_CONTROLER printout( s_Parameters, m_parent, _( "Print Footprint" ) );
#if !defined(__WINDOWS__) && !wxCHECK_VERSION(2,9,0) #if !defined(__WINDOWS__) && !wxCHECK_VERSION(2,9,0)
wxDC* dc = printout.GetDC(); wxDC* dc = printout.GetDC();
...@@ -232,4 +217,6 @@ void DIALOG_PRINT_FOR_MODEDIT::OnPrintButtonClick( wxCommandEvent& event ) ...@@ -232,4 +217,6 @@ void DIALOG_PRINT_FOR_MODEDIT::OnPrintButtonClick( wxCommandEvent& event )
{ {
*s_PrintData = printer.GetPrintDialogData().GetPrintData(); *s_PrintData = printer.GetPrintDialogData().GetPrintData();
} }
} }
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Jun 30 2011) // C++ code generated with wxFormBuilder (version Mar 19 2012)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO "NOT" EDIT THIS FILE! // PLEASE DO "NOT" EDIT THIS FILE!
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
#include "dialog_print_for_modedit_base.h" #include "dialog_print_for_modedit_base.h"
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
DIALOG_PRINT_FOR_MODEDIT_BASE::DIALOG_PRINT_FOR_MODEDIT_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) DIALOG_PRINT_FOR_MODEDIT_BASE::DIALOG_PRINT_FOR_MODEDIT_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
{ {
this->SetSizeHints( wxSize( -1,-1 ), wxDefaultSize ); this->SetSizeHints( wxSize( -1,-1 ), wxDefaultSize );
wxBoxSizer* bMainSizer; wxBoxSizer* bMainSizer;
bMainSizer = new wxBoxSizer( wxHORIZONTAL ); bMainSizer = new wxBoxSizer( wxHORIZONTAL );
wxBoxSizer* bmiddleLeftSizer; wxBoxSizer* bmiddleLeftSizer;
bmiddleLeftSizer = new wxBoxSizer( wxVERTICAL ); bmiddleLeftSizer = new wxBoxSizer( wxVERTICAL );
wxString m_ScaleOptionChoices[] = { _("fit in page"), _("Scale 0.5"), _("Scale 0.7"), _("Scale 1"), _("Scale 1.4"), _("Scale 2"), _("Scale 3"), _("Scale 4"), _("Scale 8"), _("Scale 16") }; wxString m_ScaleOptionChoices[] = { _("fit in page"), _("Scale 0.5"), _("Scale 0.7"), _("Scale 1"), _("Scale 1.4"), _("Scale 2"), _("Scale 3"), _("Scale 4"), _("Scale 8"), _("Scale 16") };
int m_ScaleOptionNChoices = sizeof( m_ScaleOptionChoices ) / sizeof( wxString ); int m_ScaleOptionNChoices = sizeof( m_ScaleOptionChoices ) / sizeof( wxString );
m_ScaleOption = new wxRadioBox( this, wxID_ANY, _("Approx. Scale:"), wxDefaultPosition, wxDefaultSize, m_ScaleOptionNChoices, m_ScaleOptionChoices, 1, wxRA_SPECIFY_COLS ); m_ScaleOption = new wxRadioBox( this, wxID_ANY, _("Approx. Scale:"), wxDefaultPosition, wxDefaultSize, m_ScaleOptionNChoices, m_ScaleOptionChoices, 1, wxRA_SPECIFY_COLS );
m_ScaleOption->SetSelection( 3 ); m_ScaleOption->SetSelection( 3 );
bmiddleLeftSizer->Add( m_ScaleOption, 0, wxALL, 5 ); bmiddleLeftSizer->Add( m_ScaleOption, 0, wxALL, 5 );
bMainSizer->Add( bmiddleLeftSizer, 0, wxEXPAND, 5 );
bMainSizer->Add( bmiddleLeftSizer, 0, wxEXPAND, 5 );
wxBoxSizer* bmiddleRightSizer;
bmiddleRightSizer = new wxBoxSizer( wxVERTICAL ); wxBoxSizer* bmiddleRightSizer;
bmiddleRightSizer = new wxBoxSizer( wxVERTICAL );
wxString m_ModeColorOptionChoices[] = { _("Color"), _("Black and white") };
int m_ModeColorOptionNChoices = sizeof( m_ModeColorOptionChoices ) / sizeof( wxString ); wxString m_ModeColorOptionChoices[] = { _("Color"), _("Black and white") };
m_ModeColorOption = new wxRadioBox( this, wxID_PRINT_MODE, _("Print Mode"), wxDefaultPosition, wxDefaultSize, m_ModeColorOptionNChoices, m_ModeColorOptionChoices, 1, wxRA_SPECIFY_COLS ); int m_ModeColorOptionNChoices = sizeof( m_ModeColorOptionChoices ) / sizeof( wxString );
m_ModeColorOption->SetSelection( 1 ); m_ModeColorOption = new wxRadioBox( this, wxID_PRINT_MODE, _("Print Mode"), wxDefaultPosition, wxDefaultSize, m_ModeColorOptionNChoices, m_ModeColorOptionChoices, 1, wxRA_SPECIFY_COLS );
m_ModeColorOption->SetToolTip( _("Choose if you want to draw the sheet like it appears on screen,\nor in black and white mode, better to print it when using black and white printers") ); m_ModeColorOption->SetSelection( 1 );
m_ModeColorOption->SetToolTip( _("Choose if you want to draw the sheet like it appears on screen,\nor in black and white mode, better to print it when using black and white printers") );
bmiddleRightSizer->Add( m_ModeColorOption, 0, wxALL|wxEXPAND, 5 );
bmiddleRightSizer->Add( m_ModeColorOption, 0, wxALL|wxEXPAND, 5 );
bMainSizer->Add( bmiddleRightSizer, 1, 0, 5 );
wxBoxSizer* bbuttonsSizer; bMainSizer->Add( bmiddleRightSizer, 1, 0, 5 );
bbuttonsSizer = new wxBoxSizer( wxVERTICAL );
wxBoxSizer* bbuttonsSizer;
m_buttonOption = new wxButton( this, wxID_PRINT_OPTIONS, _("Page Options"), wxDefaultPosition, wxDefaultSize, 0 ); bbuttonsSizer = new wxBoxSizer( wxVERTICAL );
bbuttonsSizer->Add( m_buttonOption, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
m_buttonOption = new wxButton( this, wxID_PRINT_OPTIONS, _("Page Options"), wxDefaultPosition, wxDefaultSize, 0 );
m_buttonPreview = new wxButton( this, wxID_PREVIEW, _("Preview"), wxDefaultPosition, wxDefaultSize, 0 ); bbuttonsSizer->Add( m_buttonOption, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
bbuttonsSizer->Add( m_buttonPreview, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
m_buttonPreview = new wxButton( this, wxID_PREVIEW, _("Preview"), wxDefaultPosition, wxDefaultSize, 0 );
m_buttonPrint = new wxButton( this, wxID_PRINT_ALL, _("Print"), wxDefaultPosition, wxDefaultSize, 0 ); bbuttonsSizer->Add( m_buttonPreview, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
bbuttonsSizer->Add( m_buttonPrint, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
m_buttonPrint = new wxButton( this, wxID_PRINT_ALL, _("Print"), wxDefaultPosition, wxDefaultSize, 0 );
m_buttonQuit = new wxButton( this, wxID_CANCEL, _("Close"), wxDefaultPosition, wxDefaultSize, 0 ); bbuttonsSizer->Add( m_buttonPrint, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
bbuttonsSizer->Add( m_buttonQuit, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
m_buttonQuit = new wxButton( this, wxID_CANCEL, _("Close"), wxDefaultPosition, wxDefaultSize, 0 );
bMainSizer->Add( bbuttonsSizer, 0, 0, 5 ); bbuttonsSizer->Add( m_buttonQuit, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
this->SetSizer( bMainSizer );
this->Layout(); bMainSizer->Add( bbuttonsSizer, 0, 0, 5 );
// Connect Events
this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_PRINT_FOR_MODEDIT_BASE::OnCloseWindow ) ); this->SetSizer( bMainSizer );
m_buttonOption->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_FOR_MODEDIT_BASE::OnPrintSetup ), NULL, this ); this->Layout();
m_buttonPreview->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_FOR_MODEDIT_BASE::OnPrintPreview ), NULL, this ); bMainSizer->Fit( this );
m_buttonPrint->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_FOR_MODEDIT_BASE::OnPrintButtonClick ), NULL, this );
m_buttonQuit->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_FOR_MODEDIT_BASE::OnButtonCancelClick ), NULL, this ); this->Centre( wxBOTH );
}
// Connect Events
DIALOG_PRINT_FOR_MODEDIT_BASE::~DIALOG_PRINT_FOR_MODEDIT_BASE() this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_PRINT_FOR_MODEDIT_BASE::OnCloseWindow ) );
{ m_buttonOption->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_FOR_MODEDIT_BASE::OnPrintSetup ), NULL, this );
// Disconnect Events m_buttonPreview->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_FOR_MODEDIT_BASE::OnPrintPreview ), NULL, this );
this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_PRINT_FOR_MODEDIT_BASE::OnCloseWindow ) ); m_buttonPrint->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_FOR_MODEDIT_BASE::OnPrintButtonClick ), NULL, this );
m_buttonOption->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_FOR_MODEDIT_BASE::OnPrintSetup ), NULL, this ); m_buttonQuit->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_FOR_MODEDIT_BASE::OnButtonCancelClick ), NULL, this );
m_buttonPreview->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_FOR_MODEDIT_BASE::OnPrintPreview ), NULL, this ); }
m_buttonPrint->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_FOR_MODEDIT_BASE::OnPrintButtonClick ), NULL, this );
m_buttonQuit->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_FOR_MODEDIT_BASE::OnButtonCancelClick ), NULL, this ); DIALOG_PRINT_FOR_MODEDIT_BASE::~DIALOG_PRINT_FOR_MODEDIT_BASE()
{
} // Disconnect Events
this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_PRINT_FOR_MODEDIT_BASE::OnCloseWindow ) );
m_buttonOption->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_FOR_MODEDIT_BASE::OnPrintSetup ), NULL, this );
m_buttonPreview->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_FOR_MODEDIT_BASE::OnPrintPreview ), NULL, this );
m_buttonPrint->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_FOR_MODEDIT_BASE::OnPrintButtonClick ), NULL, this );
m_buttonQuit->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_FOR_MODEDIT_BASE::OnButtonCancelClick ), NULL, this );
}
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<wxFormBuilder_Project> <wxFormBuilder_Project>
<FileVersion major="1" minor="10" /> <FileVersion major="1" minor="11" />
<object class="Project" expanded="1"> <object class="Project" expanded="1">
<property name="class_decoration"></property> <property name="class_decoration"></property>
<property name="code_generation">C++</property> <property name="code_generation">C++</property>
<property name="disconnect_events">1</property> <property name="disconnect_events">1</property>
<property name="disconnect_mode">source_name</property> <property name="disconnect_mode">source_name</property>
<property name="disconnect_python_events">0</property> <property name="disconnect_php_events">0</property>
<property name="embedded_files_path">res</property> <property name="disconnect_python_events">0</property>
<property name="encoding">UTF-8</property> <property name="embedded_files_path">res</property>
<property name="event_generation">connect</property> <property name="encoding">UTF-8</property>
<property name="file">dialog_print_for_modedit_base</property> <property name="event_generation">connect</property>
<property name="first_id">1000</property> <property name="file">dialog_print_for_modedit_base</property>
<property name="help_provider">none</property> <property name="first_id">1000</property>
<property name="internationalize">1</property> <property name="help_provider">none</property>
<property name="name">DialogPrintModedit_base</property> <property name="internationalize">1</property>
<property name="namespace"></property> <property name="name">DialogPrintModedit_base</property>
<property name="path">.</property> <property name="namespace"></property>
<property name="precompiled_header"></property> <property name="path">.</property>
<property name="relative_path">1</property> <property name="precompiled_header"></property>
<property name="skip_python_events">1</property> <property name="relative_path">1</property>
<property name="use_enum">1</property> <property name="skip_php_events">1</property>
<property name="use_microsoft_bom">0</property> <property name="skip_python_events">1</property>
<object class="Dialog" expanded="1"> <property name="use_enum">1</property>
<property name="BottomDockable">1</property> <property name="use_microsoft_bom">0</property>
<property name="LeftDockable">1</property> <object class="Dialog" expanded="1">
<property name="RightDockable">1</property> <property name="BottomDockable">1</property>
<property name="TopDockable">1</property> <property name="LeftDockable">1</property>
<property name="aui_managed">0</property> <property name="RightDockable">1</property>
<property name="aui_name"></property> <property name="TopDockable">1</property>
<property name="best_size"></property> <property name="aui_layer"></property>
<property name="bg"></property> <property name="aui_managed">0</property>
<property name="caption"></property> <property name="aui_name"></property>
<property name="caption_visible">1</property> <property name="aui_position"></property>
<property name="center"></property> <property name="aui_row"></property>
<property name="center_pane">0</property> <property name="best_size"></property>
<property name="close_button">1</property> <property name="bg"></property>
<property name="context_help"></property> <property name="caption"></property>
<property name="context_menu">1</property> <property name="caption_visible">1</property>
<property name="default_pane">0</property> <property name="center">wxBOTH</property>
<property name="dock">Dock</property> <property name="center_pane">0</property>
<property name="dock_fixed">0</property> <property name="close_button">1</property>
<property name="docking">Left</property> <property name="context_help"></property>
<property name="enabled">1</property> <property name="context_menu">1</property>
<property name="event_handler">impl_virtual</property> <property name="default_pane">0</property>
<property name="extra_style"></property> <property name="dock">Dock</property>
<property name="fg"></property> <property name="dock_fixed">0</property>
<property name="floatable">1</property> <property name="docking">Left</property>
<property name="font"></property> <property name="enabled">1</property>
<property name="gripper">0</property> <property name="event_handler">impl_virtual</property>
<property name="hidden">0</property> <property name="extra_style"></property>
<property name="id">wxID_ANY</property> <property name="fg"></property>
<property name="layer"></property> <property name="floatable">1</property>
<property name="max_size"></property> <property name="font"></property>
<property name="maximize_button">0</property> <property name="gripper">0</property>
<property name="maximum_size"></property> <property name="hidden">0</property>
<property name="min_size"></property> <property name="id">wxID_ANY</property>
<property name="minimize_button">0</property> <property name="max_size"></property>
<property name="minimum_size">-1,-1</property> <property name="maximize_button">0</property>
<property name="moveable">1</property> <property name="maximum_size"></property>
<property name="name">DIALOG_PRINT_FOR_MODEDIT_BASE</property> <property name="min_size"></property>
<property name="pane_border">1</property> <property name="minimize_button">0</property>
<property name="pane_position"></property> <property name="minimum_size">-1,-1</property>
<property name="pane_size"></property> <property name="moveable">1</property>
<property name="pin_button">1</property> <property name="name">DIALOG_PRINT_FOR_MODEDIT_BASE</property>
<property name="pos"></property> <property name="pane_border">1</property>
<property name="position"></property> <property name="pane_position"></property>
<property name="resize">Resizable</property> <property name="pane_size"></property>
<property name="row"></property> <property name="pin_button">1</property>
<property name="show">1</property> <property name="pos"></property>
<property name="size">375,254</property> <property name="resize">Resizable</property>
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property> <property name="show">1</property>
<property name="subclass"></property> <property name="size">-1,-1</property>
<property name="title">Print</property> <property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
<property name="toolbar_pane">0</property> <property name="subclass">DIALOG_SHIM; dialog_shim.h</property>
<property name="tooltip"></property> <property name="title">Print</property>
<property name="validator_data_type"></property> <property name="toolbar_pane">0</property>
<property name="validator_style">wxFILTER_NONE</property> <property name="tooltip"></property>
<property name="validator_type">wxDefaultValidator</property> <property name="validator_data_type"></property>
<property name="validator_variable"></property> <property name="validator_style">wxFILTER_NONE</property>
<property name="window_extra_style"></property> <property name="validator_type">wxDefaultValidator</property>
<property name="window_name"></property> <property name="validator_variable"></property>
<property name="window_style"></property> <property name="window_extra_style"></property>
<event name="OnActivate"></event> <property name="window_name"></property>
<event name="OnActivateApp"></event> <property name="window_style"></property>
<event name="OnAuiFindManager"></event> <event name="OnActivate"></event>
<event name="OnAuiPaneButton"></event> <event name="OnActivateApp"></event>
<event name="OnAuiPaneClose"></event> <event name="OnAuiFindManager"></event>
<event name="OnAuiPaneMaximize"></event> <event name="OnAuiPaneButton"></event>
<event name="OnAuiPaneRestore"></event> <event name="OnAuiPaneClose"></event>
<event name="OnAuiRender"></event> <event name="OnAuiPaneMaximize"></event>
<event name="OnChar"></event> <event name="OnAuiPaneRestore"></event>
<event name="OnClose">OnCloseWindow</event> <event name="OnAuiRender"></event>
<event name="OnEnterWindow"></event> <event name="OnChar"></event>
<event name="OnEraseBackground"></event> <event name="OnClose">OnCloseWindow</event>
<event name="OnHibernate"></event> <event name="OnEnterWindow"></event>
<event name="OnIconize"></event> <event name="OnEraseBackground"></event>
<event name="OnIdle"></event> <event name="OnHibernate"></event>
<event name="OnInitDialog"></event> <event name="OnIconize"></event>
<event name="OnKeyDown"></event> <event name="OnIdle"></event>
<event name="OnKeyUp"></event> <event name="OnInitDialog"></event>
<event name="OnKillFocus"></event> <event name="OnKeyDown"></event>
<event name="OnLeaveWindow"></event> <event name="OnKeyUp"></event>
<event name="OnLeftDClick"></event> <event name="OnKillFocus"></event>
<event name="OnLeftDown"></event> <event name="OnLeaveWindow"></event>
<event name="OnLeftUp"></event> <event name="OnLeftDClick"></event>
<event name="OnMiddleDClick"></event> <event name="OnLeftDown"></event>
<event name="OnMiddleDown"></event> <event name="OnLeftUp"></event>
<event name="OnMiddleUp"></event> <event name="OnMiddleDClick"></event>
<event name="OnMotion"></event> <event name="OnMiddleDown"></event>
<event name="OnMouseEvents"></event> <event name="OnMiddleUp"></event>
<event name="OnMouseWheel"></event> <event name="OnMotion"></event>
<event name="OnPaint"></event> <event name="OnMouseEvents"></event>
<event name="OnRightDClick"></event> <event name="OnMouseWheel"></event>
<event name="OnRightDown"></event> <event name="OnPaint"></event>
<event name="OnRightUp"></event> <event name="OnRightDClick"></event>
<event name="OnSetFocus"></event> <event name="OnRightDown"></event>
<event name="OnSize"></event> <event name="OnRightUp"></event>
<event name="OnUpdateUI"></event> <event name="OnSetFocus"></event>
<object class="wxBoxSizer" expanded="1"> <event name="OnSize"></event>
<property name="minimum_size"></property> <event name="OnUpdateUI"></event>
<property name="name">bMainSizer</property> <object class="wxBoxSizer" expanded="1">
<property name="orient">wxHORIZONTAL</property> <property name="minimum_size"></property>
<property name="permission">none</property> <property name="name">bMainSizer</property>
<object class="sizeritem" expanded="1"> <property name="orient">wxHORIZONTAL</property>
<property name="border">5</property> <property name="permission">none</property>
<property name="flag">wxEXPAND</property> <object class="sizeritem" expanded="1">
<property name="proportion">0</property> <property name="border">5</property>
<object class="wxBoxSizer" expanded="1"> <property name="flag">wxEXPAND</property>
<property name="minimum_size"></property> <property name="proportion">0</property>
<property name="name">bmiddleLeftSizer</property> <object class="wxBoxSizer" expanded="1">
<property name="orient">wxVERTICAL</property> <property name="minimum_size"></property>
<property name="permission">none</property> <property name="name">bmiddleLeftSizer</property>
<object class="sizeritem" expanded="1"> <property name="orient">wxVERTICAL</property>
<property name="border">5</property> <property name="permission">none</property>
<property name="flag">wxALL</property> <object class="sizeritem" expanded="1">
<property name="proportion">0</property> <property name="border">5</property>
<object class="wxRadioBox" expanded="1"> <property name="flag">wxALL</property>
<property name="BottomDockable">1</property> <property name="proportion">0</property>
<property name="LeftDockable">1</property> <object class="wxRadioBox" expanded="1">
<property name="RightDockable">1</property> <property name="BottomDockable">1</property>
<property name="TopDockable">1</property> <property name="LeftDockable">1</property>
<property name="aui_name"></property> <property name="RightDockable">1</property>
<property name="best_size"></property> <property name="TopDockable">1</property>
<property name="bg"></property> <property name="aui_layer"></property>
<property name="caption"></property> <property name="aui_name"></property>
<property name="caption_visible">1</property> <property name="aui_position"></property>
<property name="center_pane">0</property> <property name="aui_row"></property>
<property name="choices">&quot;fit in page&quot; &quot;Scale 0.5&quot; &quot;Scale 0.7&quot; &quot;Scale 1&quot; &quot;Scale 1.4&quot; &quot;Scale 2&quot; &quot;Scale 3&quot; &quot;Scale 4&quot; &quot;Scale 8&quot; &quot;Scale 16&quot;</property> <property name="best_size"></property>
<property name="close_button">1</property> <property name="bg"></property>
<property name="context_help"></property> <property name="caption"></property>
<property name="context_menu">1</property> <property name="caption_visible">1</property>
<property name="default_pane">0</property> <property name="center_pane">0</property>
<property name="dock">Dock</property> <property name="choices">&quot;fit in page&quot; &quot;Scale 0.5&quot; &quot;Scale 0.7&quot; &quot;Scale 1&quot; &quot;Scale 1.4&quot; &quot;Scale 2&quot; &quot;Scale 3&quot; &quot;Scale 4&quot; &quot;Scale 8&quot; &quot;Scale 16&quot;</property>
<property name="dock_fixed">0</property> <property name="close_button">1</property>
<property name="docking">Left</property> <property name="context_help"></property>
<property name="enabled">1</property> <property name="context_menu">1</property>
<property name="fg"></property> <property name="default_pane">0</property>
<property name="floatable">1</property> <property name="dock">Dock</property>
<property name="font"></property> <property name="dock_fixed">0</property>
<property name="gripper">0</property> <property name="docking">Left</property>
<property name="hidden">0</property> <property name="enabled">1</property>
<property name="id">wxID_ANY</property> <property name="fg"></property>
<property name="label">Approx. Scale:</property> <property name="floatable">1</property>
<property name="layer"></property> <property name="font"></property>
<property name="majorDimension">1</property> <property name="gripper">0</property>
<property name="max_size"></property> <property name="hidden">0</property>
<property name="maximize_button">0</property> <property name="id">wxID_ANY</property>
<property name="maximum_size"></property> <property name="label">Approx. Scale:</property>
<property name="min_size"></property> <property name="majorDimension">1</property>
<property name="minimize_button">0</property> <property name="max_size"></property>
<property name="minimum_size"></property> <property name="maximize_button">0</property>
<property name="moveable">1</property> <property name="maximum_size"></property>
<property name="name">m_ScaleOption</property> <property name="min_size"></property>
<property name="pane_border">1</property> <property name="minimize_button">0</property>
<property name="pane_position"></property> <property name="minimum_size"></property>
<property name="pane_size"></property> <property name="moveable">1</property>
<property name="permission">protected</property> <property name="name">m_ScaleOption</property>
<property name="pin_button">1</property> <property name="pane_border">1</property>
<property name="pos"></property> <property name="pane_position"></property>
<property name="position"></property> <property name="pane_size"></property>
<property name="resize">Resizable</property> <property name="permission">protected</property>
<property name="row"></property> <property name="pin_button">1</property>
<property name="selection">3</property> <property name="pos"></property>
<property name="show">1</property> <property name="resize">Resizable</property>
<property name="size"></property> <property name="selection">3</property>
<property name="style">wxRA_SPECIFY_COLS</property> <property name="show">1</property>
<property name="subclass"></property> <property name="size"></property>
<property name="toolbar_pane">0</property> <property name="style">wxRA_SPECIFY_COLS</property>
<property name="tooltip"></property> <property name="subclass"></property>
<property name="validator_data_type"></property> <property name="toolbar_pane">0</property>
<property name="validator_style">wxFILTER_NONE</property> <property name="tooltip"></property>
<property name="validator_type">wxDefaultValidator</property> <property name="validator_data_type"></property>
<property name="validator_variable"></property> <property name="validator_style">wxFILTER_NONE</property>
<property name="window_extra_style"></property> <property name="validator_type">wxDefaultValidator</property>
<property name="window_name"></property> <property name="validator_variable"></property>
<property name="window_style"></property> <property name="window_extra_style"></property>
<event name="OnChar"></event> <property name="window_name"></property>
<event name="OnEnterWindow"></event> <property name="window_style"></property>
<event name="OnEraseBackground"></event> <event name="OnChar"></event>
<event name="OnKeyDown"></event> <event name="OnEnterWindow"></event>
<event name="OnKeyUp"></event> <event name="OnEraseBackground"></event>
<event name="OnKillFocus"></event> <event name="OnKeyDown"></event>
<event name="OnLeaveWindow"></event> <event name="OnKeyUp"></event>
<event name="OnLeftDClick"></event> <event name="OnKillFocus"></event>
<event name="OnLeftDown"></event> <event name="OnLeaveWindow"></event>
<event name="OnLeftUp"></event> <event name="OnLeftDClick"></event>
<event name="OnMiddleDClick"></event> <event name="OnLeftDown"></event>
<event name="OnMiddleDown"></event> <event name="OnLeftUp"></event>
<event name="OnMiddleUp"></event> <event name="OnMiddleDClick"></event>
<event name="OnMotion"></event> <event name="OnMiddleDown"></event>
<event name="OnMouseEvents"></event> <event name="OnMiddleUp"></event>
<event name="OnMouseWheel"></event> <event name="OnMotion"></event>
<event name="OnPaint"></event> <event name="OnMouseEvents"></event>
<event name="OnRadioBox"></event> <event name="OnMouseWheel"></event>
<event name="OnRightDClick"></event> <event name="OnPaint"></event>
<event name="OnRightDown"></event> <event name="OnRadioBox"></event>
<event name="OnRightUp"></event> <event name="OnRightDClick"></event>
<event name="OnSetFocus"></event> <event name="OnRightDown"></event>
<event name="OnSize"></event> <event name="OnRightUp"></event>
<event name="OnUpdateUI"></event> <event name="OnSetFocus"></event>
</object> <event name="OnSize"></event>
</object> <event name="OnUpdateUI"></event>
</object> </object>
</object> </object>
<object class="sizeritem" expanded="1"> </object>
<property name="border">5</property> </object>
<property name="flag"></property> <object class="sizeritem" expanded="1">
<property name="proportion">1</property> <property name="border">5</property>
<object class="wxBoxSizer" expanded="1"> <property name="flag"></property>
<property name="minimum_size"></property> <property name="proportion">1</property>
<property name="name">bmiddleRightSizer</property> <object class="wxBoxSizer" expanded="1">
<property name="orient">wxVERTICAL</property> <property name="minimum_size"></property>
<property name="permission">none</property> <property name="name">bmiddleRightSizer</property>
<object class="sizeritem" expanded="1"> <property name="orient">wxVERTICAL</property>
<property name="border">5</property> <property name="permission">none</property>
<property name="flag">wxALL|wxEXPAND</property> <object class="sizeritem" expanded="1">
<property name="proportion">0</property> <property name="border">5</property>
<object class="wxRadioBox" expanded="1"> <property name="flag">wxALL|wxEXPAND</property>
<property name="BottomDockable">1</property> <property name="proportion">0</property>
<property name="LeftDockable">1</property> <object class="wxRadioBox" expanded="1">
<property name="RightDockable">1</property> <property name="BottomDockable">1</property>
<property name="TopDockable">1</property> <property name="LeftDockable">1</property>
<property name="aui_name"></property> <property name="RightDockable">1</property>
<property name="best_size"></property> <property name="TopDockable">1</property>
<property name="bg"></property> <property name="aui_layer"></property>
<property name="caption"></property> <property name="aui_name"></property>
<property name="caption_visible">1</property> <property name="aui_position"></property>
<property name="center_pane">0</property> <property name="aui_row"></property>
<property name="choices">&quot;Color&quot; &quot;Black and white&quot;</property> <property name="best_size"></property>
<property name="close_button">1</property> <property name="bg"></property>
<property name="context_help"></property> <property name="caption"></property>
<property name="context_menu">1</property> <property name="caption_visible">1</property>
<property name="default_pane">0</property> <property name="center_pane">0</property>
<property name="dock">Dock</property> <property name="choices">&quot;Color&quot; &quot;Black and white&quot;</property>
<property name="dock_fixed">0</property> <property name="close_button">1</property>
<property name="docking">Left</property> <property name="context_help"></property>
<property name="enabled">1</property> <property name="context_menu">1</property>
<property name="fg"></property> <property name="default_pane">0</property>
<property name="floatable">1</property> <property name="dock">Dock</property>
<property name="font"></property> <property name="dock_fixed">0</property>
<property name="gripper">0</property> <property name="docking">Left</property>
<property name="hidden">0</property> <property name="enabled">1</property>
<property name="id">wxID_PRINT_MODE</property> <property name="fg"></property>
<property name="label">Print Mode</property> <property name="floatable">1</property>
<property name="layer"></property> <property name="font"></property>
<property name="majorDimension">1</property> <property name="gripper">0</property>
<property name="max_size"></property> <property name="hidden">0</property>
<property name="maximize_button">0</property> <property name="id">wxID_PRINT_MODE</property>
<property name="maximum_size"></property> <property name="label">Print Mode</property>
<property name="min_size"></property> <property name="majorDimension">1</property>
<property name="minimize_button">0</property> <property name="max_size"></property>
<property name="minimum_size"></property> <property name="maximize_button">0</property>
<property name="moveable">1</property> <property name="maximum_size"></property>
<property name="name">m_ModeColorOption</property> <property name="min_size"></property>
<property name="pane_border">1</property> <property name="minimize_button">0</property>
<property name="pane_position"></property> <property name="minimum_size"></property>
<property name="pane_size"></property> <property name="moveable">1</property>
<property name="permission">protected</property> <property name="name">m_ModeColorOption</property>
<property name="pin_button">1</property> <property name="pane_border">1</property>
<property name="pos"></property> <property name="pane_position"></property>
<property name="position"></property> <property name="pane_size"></property>
<property name="resize">Resizable</property> <property name="permission">protected</property>
<property name="row"></property> <property name="pin_button">1</property>
<property name="selection">1</property> <property name="pos"></property>
<property name="show">1</property> <property name="resize">Resizable</property>
<property name="size"></property> <property name="selection">1</property>
<property name="style">wxRA_SPECIFY_COLS</property> <property name="show">1</property>
<property name="subclass"></property> <property name="size"></property>
<property name="toolbar_pane">0</property> <property name="style">wxRA_SPECIFY_COLS</property>
<property name="tooltip">Choose if you want to draw the sheet like it appears on screen,&#x0A;or in black and white mode, better to print it when using black and white printers</property> <property name="subclass"></property>
<property name="validator_data_type"></property> <property name="toolbar_pane">0</property>
<property name="validator_style">wxFILTER_NONE</property> <property name="tooltip">Choose if you want to draw the sheet like it appears on screen,&#x0A;or in black and white mode, better to print it when using black and white printers</property>
<property name="validator_type">wxDefaultValidator</property> <property name="validator_data_type"></property>
<property name="validator_variable"></property> <property name="validator_style">wxFILTER_NONE</property>
<property name="window_extra_style"></property> <property name="validator_type">wxDefaultValidator</property>
<property name="window_name"></property> <property name="validator_variable"></property>
<property name="window_style"></property> <property name="window_extra_style"></property>
<event name="OnChar"></event> <property name="window_name"></property>
<event name="OnEnterWindow"></event> <property name="window_style"></property>
<event name="OnEraseBackground"></event> <event name="OnChar"></event>
<event name="OnKeyDown"></event> <event name="OnEnterWindow"></event>
<event name="OnKeyUp"></event> <event name="OnEraseBackground"></event>
<event name="OnKillFocus"></event> <event name="OnKeyDown"></event>
<event name="OnLeaveWindow"></event> <event name="OnKeyUp"></event>
<event name="OnLeftDClick"></event> <event name="OnKillFocus"></event>
<event name="OnLeftDown"></event> <event name="OnLeaveWindow"></event>
<event name="OnLeftUp"></event> <event name="OnLeftDClick"></event>
<event name="OnMiddleDClick"></event> <event name="OnLeftDown"></event>
<event name="OnMiddleDown"></event> <event name="OnLeftUp"></event>
<event name="OnMiddleUp"></event> <event name="OnMiddleDClick"></event>
<event name="OnMotion"></event> <event name="OnMiddleDown"></event>
<event name="OnMouseEvents"></event> <event name="OnMiddleUp"></event>
<event name="OnMouseWheel"></event> <event name="OnMotion"></event>
<event name="OnPaint"></event> <event name="OnMouseEvents"></event>
<event name="OnRadioBox"></event> <event name="OnMouseWheel"></event>
<event name="OnRightDClick"></event> <event name="OnPaint"></event>
<event name="OnRightDown"></event> <event name="OnRadioBox"></event>
<event name="OnRightUp"></event> <event name="OnRightDClick"></event>
<event name="OnSetFocus"></event> <event name="OnRightDown"></event>
<event name="OnSize"></event> <event name="OnRightUp"></event>
<event name="OnUpdateUI"></event> <event name="OnSetFocus"></event>
</object> <event name="OnSize"></event>
</object> <event name="OnUpdateUI"></event>
</object> </object>
</object> </object>
<object class="sizeritem" expanded="1"> </object>
<property name="border">5</property> </object>
<property name="flag"></property> <object class="sizeritem" expanded="1">
<property name="proportion">0</property> <property name="border">5</property>
<object class="wxBoxSizer" expanded="1"> <property name="flag"></property>
<property name="minimum_size"></property> <property name="proportion">0</property>
<property name="name">bbuttonsSizer</property> <object class="wxBoxSizer" expanded="1">
<property name="orient">wxVERTICAL</property> <property name="minimum_size"></property>
<property name="permission">none</property> <property name="name">bbuttonsSizer</property>
<object class="sizeritem" expanded="1"> <property name="orient">wxVERTICAL</property>
<property name="border">5</property> <property name="permission">none</property>
<property name="flag">wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND</property> <object class="sizeritem" expanded="1">
<property name="proportion">0</property> <property name="border">5</property>
<object class="wxButton" expanded="1"> <property name="flag">wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND</property>
<property name="BottomDockable">1</property> <property name="proportion">0</property>
<property name="LeftDockable">1</property> <object class="wxButton" expanded="1">
<property name="RightDockable">1</property> <property name="BottomDockable">1</property>
<property name="TopDockable">1</property> <property name="LeftDockable">1</property>
<property name="aui_name"></property> <property name="RightDockable">1</property>
<property name="best_size"></property> <property name="TopDockable">1</property>
<property name="bg"></property> <property name="aui_layer"></property>
<property name="caption"></property> <property name="aui_name"></property>
<property name="caption_visible">1</property> <property name="aui_position"></property>
<property name="center_pane">0</property> <property name="aui_row"></property>
<property name="close_button">1</property> <property name="best_size"></property>
<property name="context_help"></property> <property name="bg"></property>
<property name="context_menu">1</property> <property name="caption"></property>
<property name="default">0</property> <property name="caption_visible">1</property>
<property name="default_pane">0</property> <property name="center_pane">0</property>
<property name="dock">Dock</property> <property name="close_button">1</property>
<property name="dock_fixed">0</property> <property name="context_help"></property>
<property name="docking">Left</property> <property name="context_menu">1</property>
<property name="enabled">1</property> <property name="default">0</property>
<property name="fg"></property> <property name="default_pane">0</property>
<property name="floatable">1</property> <property name="dock">Dock</property>
<property name="font"></property> <property name="dock_fixed">0</property>
<property name="gripper">0</property> <property name="docking">Left</property>
<property name="hidden">0</property> <property name="enabled">1</property>
<property name="id">wxID_PRINT_OPTIONS</property> <property name="fg"></property>
<property name="label">Page Options</property> <property name="floatable">1</property>
<property name="layer"></property> <property name="font"></property>
<property name="max_size"></property> <property name="gripper">0</property>
<property name="maximize_button">0</property> <property name="hidden">0</property>
<property name="maximum_size"></property> <property name="id">wxID_PRINT_OPTIONS</property>
<property name="min_size"></property> <property name="label">Page Options</property>
<property name="minimize_button">0</property> <property name="max_size"></property>
<property name="minimum_size"></property> <property name="maximize_button">0</property>
<property name="moveable">1</property> <property name="maximum_size"></property>
<property name="name">m_buttonOption</property> <property name="min_size"></property>
<property name="pane_border">1</property> <property name="minimize_button">0</property>
<property name="pane_position"></property> <property name="minimum_size"></property>
<property name="pane_size"></property> <property name="moveable">1</property>
<property name="permission">protected</property> <property name="name">m_buttonOption</property>
<property name="pin_button">1</property> <property name="pane_border">1</property>
<property name="pos"></property> <property name="pane_position"></property>
<property name="position"></property> <property name="pane_size"></property>
<property name="resize">Resizable</property> <property name="permission">protected</property>
<property name="row"></property> <property name="pin_button">1</property>
<property name="show">1</property> <property name="pos"></property>
<property name="size"></property> <property name="resize">Resizable</property>
<property name="style"></property> <property name="show">1</property>
<property name="subclass"></property> <property name="size"></property>
<property name="toolbar_pane">0</property> <property name="style"></property>
<property name="tooltip"></property> <property name="subclass"></property>
<property name="validator_data_type"></property> <property name="toolbar_pane">0</property>
<property name="validator_style">wxFILTER_NONE</property> <property name="tooltip"></property>
<property name="validator_type">wxDefaultValidator</property> <property name="validator_data_type"></property>
<property name="validator_variable"></property> <property name="validator_style">wxFILTER_NONE</property>
<property name="window_extra_style"></property> <property name="validator_type">wxDefaultValidator</property>
<property name="window_name"></property> <property name="validator_variable"></property>
<property name="window_style"></property> <property name="window_extra_style"></property>
<event name="OnButtonClick">OnPrintSetup</event> <property name="window_name"></property>
<event name="OnChar"></event> <property name="window_style"></property>
<event name="OnEnterWindow"></event> <event name="OnButtonClick">OnPrintSetup</event>
<event name="OnEraseBackground"></event> <event name="OnChar"></event>
<event name="OnKeyDown"></event> <event name="OnEnterWindow"></event>
<event name="OnKeyUp"></event> <event name="OnEraseBackground"></event>
<event name="OnKillFocus"></event> <event name="OnKeyDown"></event>
<event name="OnLeaveWindow"></event> <event name="OnKeyUp"></event>
<event name="OnLeftDClick"></event> <event name="OnKillFocus"></event>
<event name="OnLeftDown"></event> <event name="OnLeaveWindow"></event>
<event name="OnLeftUp"></event> <event name="OnLeftDClick"></event>
<event name="OnMiddleDClick"></event> <event name="OnLeftDown"></event>
<event name="OnMiddleDown"></event> <event name="OnLeftUp"></event>
<event name="OnMiddleUp"></event> <event name="OnMiddleDClick"></event>
<event name="OnMotion"></event> <event name="OnMiddleDown"></event>
<event name="OnMouseEvents"></event> <event name="OnMiddleUp"></event>
<event name="OnMouseWheel"></event> <event name="OnMotion"></event>
<event name="OnPaint"></event> <event name="OnMouseEvents"></event>
<event name="OnRightDClick"></event> <event name="OnMouseWheel"></event>
<event name="OnRightDown"></event> <event name="OnPaint"></event>
<event name="OnRightUp"></event> <event name="OnRightDClick"></event>
<event name="OnSetFocus"></event> <event name="OnRightDown"></event>
<event name="OnSize"></event> <event name="OnRightUp"></event>
<event name="OnUpdateUI"></event> <event name="OnSetFocus"></event>
</object> <event name="OnSize"></event>
</object> <event name="OnUpdateUI"></event>
<object class="sizeritem" expanded="1"> </object>
<property name="border">5</property> </object>
<property name="flag">wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND</property> <object class="sizeritem" expanded="1">
<property name="proportion">0</property> <property name="border">5</property>
<object class="wxButton" expanded="1"> <property name="flag">wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND</property>
<property name="BottomDockable">1</property> <property name="proportion">0</property>
<property name="LeftDockable">1</property> <object class="wxButton" expanded="1">
<property name="RightDockable">1</property> <property name="BottomDockable">1</property>
<property name="TopDockable">1</property> <property name="LeftDockable">1</property>
<property name="aui_name"></property> <property name="RightDockable">1</property>
<property name="best_size"></property> <property name="TopDockable">1</property>
<property name="bg"></property> <property name="aui_layer"></property>
<property name="caption"></property> <property name="aui_name"></property>
<property name="caption_visible">1</property> <property name="aui_position"></property>
<property name="center_pane">0</property> <property name="aui_row"></property>
<property name="close_button">1</property> <property name="best_size"></property>
<property name="context_help"></property> <property name="bg"></property>
<property name="context_menu">1</property> <property name="caption"></property>
<property name="default">0</property> <property name="caption_visible">1</property>
<property name="default_pane">0</property> <property name="center_pane">0</property>
<property name="dock">Dock</property> <property name="close_button">1</property>
<property name="dock_fixed">0</property> <property name="context_help"></property>
<property name="docking">Left</property> <property name="context_menu">1</property>
<property name="enabled">1</property> <property name="default">0</property>
<property name="fg"></property> <property name="default_pane">0</property>
<property name="floatable">1</property> <property name="dock">Dock</property>
<property name="font"></property> <property name="dock_fixed">0</property>
<property name="gripper">0</property> <property name="docking">Left</property>
<property name="hidden">0</property> <property name="enabled">1</property>
<property name="id">wxID_PREVIEW</property> <property name="fg"></property>
<property name="label">Preview</property> <property name="floatable">1</property>
<property name="layer"></property> <property name="font"></property>
<property name="max_size"></property> <property name="gripper">0</property>
<property name="maximize_button">0</property> <property name="hidden">0</property>
<property name="maximum_size"></property> <property name="id">wxID_PREVIEW</property>
<property name="min_size"></property> <property name="label">Preview</property>
<property name="minimize_button">0</property> <property name="max_size"></property>
<property name="minimum_size"></property> <property name="maximize_button">0</property>
<property name="moveable">1</property> <property name="maximum_size"></property>
<property name="name">m_buttonPreview</property> <property name="min_size"></property>
<property name="pane_border">1</property> <property name="minimize_button">0</property>
<property name="pane_position"></property> <property name="minimum_size"></property>
<property name="pane_size"></property> <property name="moveable">1</property>
<property name="permission">protected</property> <property name="name">m_buttonPreview</property>
<property name="pin_button">1</property> <property name="pane_border">1</property>
<property name="pos"></property> <property name="pane_position"></property>
<property name="position"></property> <property name="pane_size"></property>
<property name="resize">Resizable</property> <property name="permission">protected</property>
<property name="row"></property> <property name="pin_button">1</property>
<property name="show">1</property> <property name="pos"></property>
<property name="size"></property> <property name="resize">Resizable</property>
<property name="style"></property> <property name="show">1</property>
<property name="subclass"></property> <property name="size"></property>
<property name="toolbar_pane">0</property> <property name="style"></property>
<property name="tooltip"></property> <property name="subclass"></property>
<property name="validator_data_type"></property> <property name="toolbar_pane">0</property>
<property name="validator_style">wxFILTER_NONE</property> <property name="tooltip"></property>
<property name="validator_type">wxDefaultValidator</property> <property name="validator_data_type"></property>
<property name="validator_variable"></property> <property name="validator_style">wxFILTER_NONE</property>
<property name="window_extra_style"></property> <property name="validator_type">wxDefaultValidator</property>
<property name="window_name"></property> <property name="validator_variable"></property>
<property name="window_style"></property> <property name="window_extra_style"></property>
<event name="OnButtonClick">OnPrintPreview</event> <property name="window_name"></property>
<event name="OnChar"></event> <property name="window_style"></property>
<event name="OnEnterWindow"></event> <event name="OnButtonClick">OnPrintPreview</event>
<event name="OnEraseBackground"></event> <event name="OnChar"></event>
<event name="OnKeyDown"></event> <event name="OnEnterWindow"></event>
<event name="OnKeyUp"></event> <event name="OnEraseBackground"></event>
<event name="OnKillFocus"></event> <event name="OnKeyDown"></event>
<event name="OnLeaveWindow"></event> <event name="OnKeyUp"></event>
<event name="OnLeftDClick"></event> <event name="OnKillFocus"></event>
<event name="OnLeftDown"></event> <event name="OnLeaveWindow"></event>
<event name="OnLeftUp"></event> <event name="OnLeftDClick"></event>
<event name="OnMiddleDClick"></event> <event name="OnLeftDown"></event>
<event name="OnMiddleDown"></event> <event name="OnLeftUp"></event>
<event name="OnMiddleUp"></event> <event name="OnMiddleDClick"></event>
<event name="OnMotion"></event> <event name="OnMiddleDown"></event>
<event name="OnMouseEvents"></event> <event name="OnMiddleUp"></event>
<event name="OnMouseWheel"></event> <event name="OnMotion"></event>
<event name="OnPaint"></event> <event name="OnMouseEvents"></event>
<event name="OnRightDClick"></event> <event name="OnMouseWheel"></event>
<event name="OnRightDown"></event> <event name="OnPaint"></event>
<event name="OnRightUp"></event> <event name="OnRightDClick"></event>
<event name="OnSetFocus"></event> <event name="OnRightDown"></event>
<event name="OnSize"></event> <event name="OnRightUp"></event>
<event name="OnUpdateUI"></event> <event name="OnSetFocus"></event>
</object> <event name="OnSize"></event>
</object> <event name="OnUpdateUI"></event>
<object class="sizeritem" expanded="1"> </object>
<property name="border">5</property> </object>
<property name="flag">wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND</property> <object class="sizeritem" expanded="1">
<property name="proportion">0</property> <property name="border">5</property>
<object class="wxButton" expanded="1"> <property name="flag">wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND</property>
<property name="BottomDockable">1</property> <property name="proportion">0</property>
<property name="LeftDockable">1</property> <object class="wxButton" expanded="1">
<property name="RightDockable">1</property> <property name="BottomDockable">1</property>
<property name="TopDockable">1</property> <property name="LeftDockable">1</property>
<property name="aui_name"></property> <property name="RightDockable">1</property>
<property name="best_size"></property> <property name="TopDockable">1</property>
<property name="bg"></property> <property name="aui_layer"></property>
<property name="caption"></property> <property name="aui_name"></property>
<property name="caption_visible">1</property> <property name="aui_position"></property>
<property name="center_pane">0</property> <property name="aui_row"></property>
<property name="close_button">1</property> <property name="best_size"></property>
<property name="context_help"></property> <property name="bg"></property>
<property name="context_menu">1</property> <property name="caption"></property>
<property name="default">0</property> <property name="caption_visible">1</property>
<property name="default_pane">0</property> <property name="center_pane">0</property>
<property name="dock">Dock</property> <property name="close_button">1</property>
<property name="dock_fixed">0</property> <property name="context_help"></property>
<property name="docking">Left</property> <property name="context_menu">1</property>
<property name="enabled">1</property> <property name="default">0</property>
<property name="fg"></property> <property name="default_pane">0</property>
<property name="floatable">1</property> <property name="dock">Dock</property>
<property name="font"></property> <property name="dock_fixed">0</property>
<property name="gripper">0</property> <property name="docking">Left</property>
<property name="hidden">0</property> <property name="enabled">1</property>
<property name="id">wxID_PRINT_ALL</property> <property name="fg"></property>
<property name="label">Print</property> <property name="floatable">1</property>
<property name="layer"></property> <property name="font"></property>
<property name="max_size"></property> <property name="gripper">0</property>
<property name="maximize_button">0</property> <property name="hidden">0</property>
<property name="maximum_size"></property> <property name="id">wxID_PRINT_ALL</property>
<property name="min_size"></property> <property name="label">Print</property>
<property name="minimize_button">0</property> <property name="max_size"></property>
<property name="minimum_size"></property> <property name="maximize_button">0</property>
<property name="moveable">1</property> <property name="maximum_size"></property>
<property name="name">m_buttonPrint</property> <property name="min_size"></property>
<property name="pane_border">1</property> <property name="minimize_button">0</property>
<property name="pane_position"></property> <property name="minimum_size"></property>
<property name="pane_size"></property> <property name="moveable">1</property>
<property name="permission">protected</property> <property name="name">m_buttonPrint</property>
<property name="pin_button">1</property> <property name="pane_border">1</property>
<property name="pos"></property> <property name="pane_position"></property>
<property name="position"></property> <property name="pane_size"></property>
<property name="resize">Resizable</property> <property name="permission">protected</property>
<property name="row"></property> <property name="pin_button">1</property>
<property name="show">1</property> <property name="pos"></property>
<property name="size"></property> <property name="resize">Resizable</property>
<property name="style"></property> <property name="show">1</property>
<property name="subclass"></property> <property name="size"></property>
<property name="toolbar_pane">0</property> <property name="style"></property>
<property name="tooltip"></property> <property name="subclass"></property>
<property name="validator_data_type"></property> <property name="toolbar_pane">0</property>
<property name="validator_style">wxFILTER_NONE</property> <property name="tooltip"></property>
<property name="validator_type">wxDefaultValidator</property> <property name="validator_data_type"></property>
<property name="validator_variable"></property> <property name="validator_style">wxFILTER_NONE</property>
<property name="window_extra_style"></property> <property name="validator_type">wxDefaultValidator</property>
<property name="window_name"></property> <property name="validator_variable"></property>
<property name="window_style"></property> <property name="window_extra_style"></property>
<event name="OnButtonClick">OnPrintButtonClick</event> <property name="window_name"></property>
<event name="OnChar"></event> <property name="window_style"></property>
<event name="OnEnterWindow"></event> <event name="OnButtonClick">OnPrintButtonClick</event>
<event name="OnEraseBackground"></event> <event name="OnChar"></event>
<event name="OnKeyDown"></event> <event name="OnEnterWindow"></event>
<event name="OnKeyUp"></event> <event name="OnEraseBackground"></event>
<event name="OnKillFocus"></event> <event name="OnKeyDown"></event>
<event name="OnLeaveWindow"></event> <event name="OnKeyUp"></event>
<event name="OnLeftDClick"></event> <event name="OnKillFocus"></event>
<event name="OnLeftDown"></event> <event name="OnLeaveWindow"></event>
<event name="OnLeftUp"></event> <event name="OnLeftDClick"></event>
<event name="OnMiddleDClick"></event> <event name="OnLeftDown"></event>
<event name="OnMiddleDown"></event> <event name="OnLeftUp"></event>
<event name="OnMiddleUp"></event> <event name="OnMiddleDClick"></event>
<event name="OnMotion"></event> <event name="OnMiddleDown"></event>
<event name="OnMouseEvents"></event> <event name="OnMiddleUp"></event>
<event name="OnMouseWheel"></event> <event name="OnMotion"></event>
<event name="OnPaint"></event> <event name="OnMouseEvents"></event>
<event name="OnRightDClick"></event> <event name="OnMouseWheel"></event>
<event name="OnRightDown"></event> <event name="OnPaint"></event>
<event name="OnRightUp"></event> <event name="OnRightDClick"></event>
<event name="OnSetFocus"></event> <event name="OnRightDown"></event>
<event name="OnSize"></event> <event name="OnRightUp"></event>
<event name="OnUpdateUI"></event> <event name="OnSetFocus"></event>
</object> <event name="OnSize"></event>
</object> <event name="OnUpdateUI"></event>
<object class="sizeritem" expanded="1"> </object>
<property name="border">5</property> </object>
<property name="flag">wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND</property> <object class="sizeritem" expanded="1">
<property name="proportion">0</property> <property name="border">5</property>
<object class="wxButton" expanded="1"> <property name="flag">wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND</property>
<property name="BottomDockable">1</property> <property name="proportion">0</property>
<property name="LeftDockable">1</property> <object class="wxButton" expanded="1">
<property name="RightDockable">1</property> <property name="BottomDockable">1</property>
<property name="TopDockable">1</property> <property name="LeftDockable">1</property>
<property name="aui_name"></property> <property name="RightDockable">1</property>
<property name="best_size"></property> <property name="TopDockable">1</property>
<property name="bg"></property> <property name="aui_layer"></property>
<property name="caption"></property> <property name="aui_name"></property>
<property name="caption_visible">1</property> <property name="aui_position"></property>
<property name="center_pane">0</property> <property name="aui_row"></property>
<property name="close_button">1</property> <property name="best_size"></property>
<property name="context_help"></property> <property name="bg"></property>
<property name="context_menu">1</property> <property name="caption"></property>
<property name="default">0</property> <property name="caption_visible">1</property>
<property name="default_pane">0</property> <property name="center_pane">0</property>
<property name="dock">Dock</property> <property name="close_button">1</property>
<property name="dock_fixed">0</property> <property name="context_help"></property>
<property name="docking">Left</property> <property name="context_menu">1</property>
<property name="enabled">1</property> <property name="default">0</property>
<property name="fg"></property> <property name="default_pane">0</property>
<property name="floatable">1</property> <property name="dock">Dock</property>
<property name="font"></property> <property name="dock_fixed">0</property>
<property name="gripper">0</property> <property name="docking">Left</property>
<property name="hidden">0</property> <property name="enabled">1</property>
<property name="id">wxID_CANCEL</property> <property name="fg"></property>
<property name="label">Close</property> <property name="floatable">1</property>
<property name="layer"></property> <property name="font"></property>
<property name="max_size"></property> <property name="gripper">0</property>
<property name="maximize_button">0</property> <property name="hidden">0</property>
<property name="maximum_size"></property> <property name="id">wxID_CANCEL</property>
<property name="min_size"></property> <property name="label">Close</property>
<property name="minimize_button">0</property> <property name="max_size"></property>
<property name="minimum_size"></property> <property name="maximize_button">0</property>
<property name="moveable">1</property> <property name="maximum_size"></property>
<property name="name">m_buttonQuit</property> <property name="min_size"></property>
<property name="pane_border">1</property> <property name="minimize_button">0</property>
<property name="pane_position"></property> <property name="minimum_size"></property>
<property name="pane_size"></property> <property name="moveable">1</property>
<property name="permission">protected</property> <property name="name">m_buttonQuit</property>
<property name="pin_button">1</property> <property name="pane_border">1</property>
<property name="pos"></property> <property name="pane_position"></property>
<property name="position"></property> <property name="pane_size"></property>
<property name="resize">Resizable</property> <property name="permission">protected</property>
<property name="row"></property> <property name="pin_button">1</property>
<property name="show">1</property> <property name="pos"></property>
<property name="size"></property> <property name="resize">Resizable</property>
<property name="style"></property> <property name="show">1</property>
<property name="subclass"></property> <property name="size"></property>
<property name="toolbar_pane">0</property> <property name="style"></property>
<property name="tooltip"></property> <property name="subclass"></property>
<property name="validator_data_type"></property> <property name="toolbar_pane">0</property>
<property name="validator_style">wxFILTER_NONE</property> <property name="tooltip"></property>
<property name="validator_type">wxDefaultValidator</property> <property name="validator_data_type"></property>
<property name="validator_variable"></property> <property name="validator_style">wxFILTER_NONE</property>
<property name="window_extra_style"></property> <property name="validator_type">wxDefaultValidator</property>
<property name="window_name"></property> <property name="validator_variable"></property>
<property name="window_style"></property> <property name="window_extra_style"></property>
<event name="OnButtonClick">OnButtonCancelClick</event> <property name="window_name"></property>
<event name="OnChar"></event> <property name="window_style"></property>
<event name="OnEnterWindow"></event> <event name="OnButtonClick">OnButtonCancelClick</event>
<event name="OnEraseBackground"></event> <event name="OnChar"></event>
<event name="OnKeyDown"></event> <event name="OnEnterWindow"></event>
<event name="OnKeyUp"></event> <event name="OnEraseBackground"></event>
<event name="OnKillFocus"></event> <event name="OnKeyDown"></event>
<event name="OnLeaveWindow"></event> <event name="OnKeyUp"></event>
<event name="OnLeftDClick"></event> <event name="OnKillFocus"></event>
<event name="OnLeftDown"></event> <event name="OnLeaveWindow"></event>
<event name="OnLeftUp"></event> <event name="OnLeftDClick"></event>
<event name="OnMiddleDClick"></event> <event name="OnLeftDown"></event>
<event name="OnMiddleDown"></event> <event name="OnLeftUp"></event>
<event name="OnMiddleUp"></event> <event name="OnMiddleDClick"></event>
<event name="OnMotion"></event> <event name="OnMiddleDown"></event>
<event name="OnMouseEvents"></event> <event name="OnMiddleUp"></event>
<event name="OnMouseWheel"></event> <event name="OnMotion"></event>
<event name="OnPaint"></event> <event name="OnMouseEvents"></event>
<event name="OnRightDClick"></event> <event name="OnMouseWheel"></event>
<event name="OnRightDown"></event> <event name="OnPaint"></event>
<event name="OnRightUp"></event> <event name="OnRightDClick"></event>
<event name="OnSetFocus"></event> <event name="OnRightDown"></event>
<event name="OnSize"></event> <event name="OnRightUp"></event>
<event name="OnUpdateUI"></event> <event name="OnSetFocus"></event>
</object> <event name="OnSize"></event>
</object> <event name="OnUpdateUI"></event>
</object> </object>
</object> </object>
</object> </object>
</object> </object>
</object> </object>
</wxFormBuilder_Project> </object>
</object>
</wxFormBuilder_Project>
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Jun 30 2011) // C++ code generated with wxFormBuilder (version Mar 19 2012)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO "NOT" EDIT THIS FILE! // PLEASE DO "NOT" EDIT THIS FILE!
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
#ifndef __DIALOG_PRINT_FOR_MODEDIT_BASE_H__ #ifndef __DIALOG_PRINT_FOR_MODEDIT_BASE_H__
#define __DIALOG_PRINT_FOR_MODEDIT_BASE_H__ #define __DIALOG_PRINT_FOR_MODEDIT_BASE_H__
#include <wx/artprov.h> #include <wx/artprov.h>
#include <wx/xrc/xmlres.h> #include <wx/xrc/xmlres.h>
#include <wx/intl.h> #include <wx/intl.h>
#include <wx/string.h> #include "dialog_shim.h"
#include <wx/radiobox.h> #include <wx/string.h>
#include <wx/gdicmn.h> #include <wx/radiobox.h>
#include <wx/font.h> #include <wx/gdicmn.h>
#include <wx/colour.h> #include <wx/font.h>
#include <wx/settings.h> #include <wx/colour.h>
#include <wx/sizer.h> #include <wx/settings.h>
#include <wx/button.h> #include <wx/sizer.h>
#include <wx/dialog.h> #include <wx/button.h>
#include <wx/dialog.h>
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
/// Class DIALOG_PRINT_FOR_MODEDIT_BASE ///////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////// /// Class DIALOG_PRINT_FOR_MODEDIT_BASE
class DIALOG_PRINT_FOR_MODEDIT_BASE : public wxDialog ///////////////////////////////////////////////////////////////////////////////
{ class DIALOG_PRINT_FOR_MODEDIT_BASE : public DIALOG_SHIM
private: {
private:
protected:
enum protected:
{ enum
wxID_PRINT_MODE = 1000, {
wxID_PRINT_OPTIONS, wxID_PRINT_MODE = 1000,
wxID_PRINT_ALL, wxID_PRINT_OPTIONS,
}; wxID_PRINT_ALL
};
wxRadioBox* m_ScaleOption;
wxRadioBox* m_ModeColorOption; wxRadioBox* m_ScaleOption;
wxButton* m_buttonOption; wxRadioBox* m_ModeColorOption;
wxButton* m_buttonPreview; wxButton* m_buttonOption;
wxButton* m_buttonPrint; wxButton* m_buttonPreview;
wxButton* m_buttonQuit; wxButton* m_buttonPrint;
wxButton* m_buttonQuit;
// Virtual event handlers, overide them in your derived class
virtual void OnCloseWindow( wxCloseEvent& event ) { event.Skip(); } // Virtual event handlers, overide them in your derived class
virtual void OnPrintSetup( wxCommandEvent& event ) { event.Skip(); } virtual void OnCloseWindow( wxCloseEvent& event ) { event.Skip(); }
virtual void OnPrintPreview( wxCommandEvent& event ) { event.Skip(); } virtual void OnPrintSetup( wxCommandEvent& event ) { event.Skip(); }
virtual void OnPrintButtonClick( wxCommandEvent& event ) { event.Skip(); } virtual void OnPrintPreview( wxCommandEvent& event ) { event.Skip(); }
virtual void OnButtonCancelClick( wxCommandEvent& event ) { event.Skip(); } virtual void OnPrintButtonClick( wxCommandEvent& event ) { event.Skip(); }
virtual void OnButtonCancelClick( wxCommandEvent& event ) { event.Skip(); }
public:
public:
DIALOG_PRINT_FOR_MODEDIT_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Print"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 375,254 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_PRINT_FOR_MODEDIT_BASE(); DIALOG_PRINT_FOR_MODEDIT_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Print"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_PRINT_FOR_MODEDIT_BASE();
};
};
#endif //__DIALOG_PRINT_FOR_MODEDIT_BASE_H__
#endif //__DIALOG_PRINT_FOR_MODEDIT_BASE_H__
...@@ -42,24 +42,28 @@ static wxPageSetupDialogData* s_pageSetupData = (wxPageSetupDialogData*) NULL; ...@@ -42,24 +42,28 @@ static wxPageSetupDialogData* s_pageSetupData = (wxPageSetupDialogData*) NULL;
static PRINT_PARAMETERS s_Parameters; static PRINT_PARAMETERS s_Parameters;
/* Dialog to print schematic. Class derived from DIALOG_PRINT_USING_PRINTER_base /**
* Dialog to print schematic. Class derived from DIALOG_PRINT_USING_PRINTER_base
* created by wxFormBuilder * created by wxFormBuilder
*/ */
class DIALOG_PRINT_USING_PRINTER : public DIALOG_PRINT_USING_PRINTER_base class DIALOG_PRINT_USING_PRINTER : public DIALOG_PRINT_USING_PRINTER_base
{ {
private:
PCB_EDIT_FRAME* m_Parent;
wxConfig* m_Config;
wxCheckBox* m_BoxSelectLayer[32];
static bool m_ExcludeEdgeLayer;
static wxPoint s_LastPos;
static wxSize s_LastSize;
public: public:
DIALOG_PRINT_USING_PRINTER( PCB_EDIT_FRAME* parent ); DIALOG_PRINT_USING_PRINTER( PCB_EDIT_FRAME* parent );
~DIALOG_PRINT_USING_PRINTER() {};
bool IsMirrored() { return m_Print_Mirror->IsChecked(); }
bool ExcludeEdges() { return m_Exclude_Edges_Pcb->IsChecked(); }
bool PrintUsingSinglePage() { return m_PagesOption->GetSelection(); }
int SetLayerMaskFromListSelection();
private: private:
PCB_EDIT_FRAME* m_parent;
wxConfig* m_config;
wxCheckBox* m_BoxSelectLayer[32];
static bool m_ExcludeEdgeLayer;
void OnCloseWindow( wxCloseEvent& event ); void OnCloseWindow( wxCloseEvent& event );
void OnPageSetup( wxCommandEvent& event ); void OnPageSetup( wxCommandEvent& event );
void OnPrintPreview( wxCommandEvent& event ); void OnPrintPreview( wxCommandEvent& event );
...@@ -70,31 +74,13 @@ private: ...@@ -70,31 +74,13 @@ private:
void SetPrintParameters( ); void SetPrintParameters( );
void SetPenWidth(); void SetPenWidth();
void InitValues( ); void InitValues( );
bool Show( bool show ); // overload stock function
public:
bool IsMirrored() { return m_Print_Mirror->IsChecked(); }
bool ExcludeEdges() { return m_Exclude_Edges_Pcb->IsChecked(); }
bool PrintUsingSinglePage() { return m_PagesOption->GetSelection(); }
int SetLayerMaskFromListSelection();
}; };
bool DIALOG_PRINT_USING_PRINTER::m_ExcludeEdgeLayer;
// We want our dialog to remember its previous screen position
wxPoint DIALOG_PRINT_USING_PRINTER::s_LastPos( -1, -1 );
wxSize DIALOG_PRINT_USING_PRINTER::s_LastSize;
bool DIALOG_PRINT_USING_PRINTER::m_ExcludeEdgeLayer;
/*******************************************************/
void PCB_EDIT_FRAME::ToPrinter( wxCommandEvent& event ) void PCB_EDIT_FRAME::ToPrinter( wxCommandEvent& event )
/*******************************************************/
/* Virtual function:
* Display the print dialog
*/
{ {
const PAGE_INFO& pageInfo = GetPageSettings(); const PAGE_INFO& pageInfo = GetPageSettings();
...@@ -136,13 +122,11 @@ void PCB_EDIT_FRAME::ToPrinter( wxCommandEvent& event ) ...@@ -136,13 +122,11 @@ void PCB_EDIT_FRAME::ToPrinter( wxCommandEvent& event )
} }
/*************************************************************************************/
DIALOG_PRINT_USING_PRINTER::DIALOG_PRINT_USING_PRINTER( PCB_EDIT_FRAME* parent ) : DIALOG_PRINT_USING_PRINTER::DIALOG_PRINT_USING_PRINTER( PCB_EDIT_FRAME* parent ) :
DIALOG_PRINT_USING_PRINTER_base( parent ) DIALOG_PRINT_USING_PRINTER_base( parent )
/*************************************************************************************/
{ {
m_Parent = parent; m_parent = parent;
m_Config = wxGetApp().GetSettings(); m_config = wxGetApp().GetSettings();
InitValues( ); InitValues( );
...@@ -160,14 +144,11 @@ DIALOG_PRINT_USING_PRINTER::DIALOG_PRINT_USING_PRINTER( PCB_EDIT_FRAME* parent ) ...@@ -160,14 +144,11 @@ DIALOG_PRINT_USING_PRINTER::DIALOG_PRINT_USING_PRINTER( PCB_EDIT_FRAME* parent )
} }
/************************************************************************/
void DIALOG_PRINT_USING_PRINTER::InitValues( ) void DIALOG_PRINT_USING_PRINTER::InitValues( )
/************************************************************************/
{ {
SetFocus();
int layer_max = NB_LAYERS; int layer_max = NB_LAYERS;
wxString msg; wxString msg;
BOARD* board = m_Parent->GetBoard(); BOARD* board = m_parent->GetBoard();
s_Parameters.m_PageSetupData = s_pageSetupData; s_Parameters.m_PageSetupData = s_pageSetupData;
...@@ -206,7 +187,7 @@ void DIALOG_PRINT_USING_PRINTER::InitValues( ) ...@@ -206,7 +187,7 @@ void DIALOG_PRINT_USING_PRINTER::InitValues( )
layerKey.Printf( OPTKEY_LAYERBASE, layer ); layerKey.Printf( OPTKEY_LAYERBASE, layer );
bool option; bool option;
if( m_Config->Read( layerKey, &option ) ) if( m_config->Read( layerKey, &option ) )
m_BoxSelectLayer[layer]->SetValue( option ); m_BoxSelectLayer[layer]->SetValue( option );
else else
{ {
...@@ -222,15 +203,15 @@ void DIALOG_PRINT_USING_PRINTER::InitValues( ) ...@@ -222,15 +203,15 @@ void DIALOG_PRINT_USING_PRINTER::InitValues( )
// Read the scale adjust option // Read the scale adjust option
int scale_idx = 4; // default selected scale = ScaleList[4] = 1.000 int scale_idx = 4; // default selected scale = ScaleList[4] = 1.000
if( m_Config ) if( m_config )
{ {
m_Config->Read( OPTKEY_PRINT_X_FINESCALE_ADJ, &s_Parameters.m_XScaleAdjust ); m_config->Read( OPTKEY_PRINT_X_FINESCALE_ADJ, &s_Parameters.m_XScaleAdjust );
m_Config->Read( OPTKEY_PRINT_Y_FINESCALE_ADJ, &s_Parameters.m_YScaleAdjust ); m_config->Read( OPTKEY_PRINT_Y_FINESCALE_ADJ, &s_Parameters.m_YScaleAdjust );
m_Config->Read( OPTKEY_PRINT_SCALE, &scale_idx ); m_config->Read( OPTKEY_PRINT_SCALE, &scale_idx );
m_Config->Read( OPTKEY_PRINT_PAGE_FRAME, &s_Parameters.m_Print_Sheet_Ref, 1); m_config->Read( OPTKEY_PRINT_PAGE_FRAME, &s_Parameters.m_Print_Sheet_Ref, 1);
m_Config->Read( OPTKEY_PRINT_MONOCHROME_MODE, &s_Parameters.m_Print_Black_and_White, 1); m_config->Read( OPTKEY_PRINT_MONOCHROME_MODE, &s_Parameters.m_Print_Black_and_White, 1);
int tmp; int tmp;
m_Config->Read( OPTKEY_PRINT_PADS_DRILL, &tmp, PRINT_PARAMETERS::SMALL_DRILL_SHAPE ); m_config->Read( OPTKEY_PRINT_PADS_DRILL, &tmp, PRINT_PARAMETERS::SMALL_DRILL_SHAPE );
s_Parameters.m_DrillShapeOpt = (PRINT_PARAMETERS::DrillShapeOptT) tmp; s_Parameters.m_DrillShapeOpt = (PRINT_PARAMETERS::DrillShapeOptT) tmp;
// Test for a reasonnable scale value. Set to 1 if problem // Test for a reasonnable scale value. Set to 1 if problem
...@@ -252,7 +233,7 @@ void DIALOG_PRINT_USING_PRINTER::InitValues( ) ...@@ -252,7 +233,7 @@ void DIALOG_PRINT_USING_PRINTER::InitValues( )
layerKey.Printf( OPTKEY_LAYERBASE, layer ); layerKey.Printf( OPTKEY_LAYERBASE, layer );
option = false; option = false;
if( m_Config->Read( layerKey, &option ) ) if( m_config->Read( layerKey, &option ) )
{ {
m_BoxSelectLayer[layer]->SetValue( option ); m_BoxSelectLayer[layer]->SetValue( option );
if( option ) if( option )
...@@ -279,7 +260,7 @@ void DIALOG_PRINT_USING_PRINTER::InitValues( ) ...@@ -279,7 +260,7 @@ void DIALOG_PRINT_USING_PRINTER::InitValues( )
s_Parameters.m_PenDefaultSize = g_DrawDefaultLineThickness; s_Parameters.m_PenDefaultSize = g_DrawDefaultLineThickness;
AddUnitSymbol( *m_TextPenWidth, g_UserUnit ); AddUnitSymbol( *m_TextPenWidth, g_UserUnit );
m_DialogPenWidth->SetValue( m_DialogPenWidth->SetValue(
ReturnStringFromValue( g_UserUnit, s_Parameters.m_PenDefaultSize, m_Parent->GetInternalUnits() ) ); ReturnStringFromValue( g_UserUnit, s_Parameters.m_PenDefaultSize, m_parent->GetInternalUnits() ) );
// Create scale adjust option // Create scale adjust option
msg.Printf( wxT( "%f" ), s_Parameters.m_XScaleAdjust ); msg.Printf( wxT( "%f" ), s_Parameters.m_XScaleAdjust );
...@@ -296,35 +277,7 @@ void DIALOG_PRINT_USING_PRINTER::InitValues( ) ...@@ -296,35 +277,7 @@ void DIALOG_PRINT_USING_PRINTER::InitValues( )
} }
/*************************************************/
bool DIALOG_PRINT_USING_PRINTER::Show( bool show )
/*************************************************/
{
bool ret;
if( show )
{
if( s_LastPos.x != -1 )
{
SetSize( s_LastPos.x, s_LastPos.y, s_LastSize.x, s_LastSize.y, 0 );
}
ret = DIALOG_PRINT_USING_PRINTER_base::Show( show );
}
else
{
// Save the dialog's position before hiding
s_LastPos = GetPosition();
s_LastSize = GetSize();
ret = DIALOG_PRINT_USING_PRINTER_base::Show( show );
}
return ret;
}
/**************************************************************/
int DIALOG_PRINT_USING_PRINTER::SetLayerMaskFromListSelection() int DIALOG_PRINT_USING_PRINTER::SetLayerMaskFromListSelection()
/**************************************************************/
{ {
int page_count; int page_count;
int layers_count = NB_LAYERS; int layers_count = NB_LAYERS;
...@@ -355,37 +308,35 @@ int DIALOG_PRINT_USING_PRINTER::SetLayerMaskFromListSelection() ...@@ -355,37 +308,35 @@ int DIALOG_PRINT_USING_PRINTER::SetLayerMaskFromListSelection()
} }
/********************************************************************/
void DIALOG_PRINT_USING_PRINTER::OnCloseWindow( wxCloseEvent& event ) void DIALOG_PRINT_USING_PRINTER::OnCloseWindow( wxCloseEvent& event )
/********************************************************************/
{ {
SetPrintParameters(); SetPrintParameters();
if( m_Config ) if( m_config )
{ {
m_Config->Write( OPTKEY_PRINT_X_FINESCALE_ADJ, s_Parameters.m_XScaleAdjust ); m_config->Write( OPTKEY_PRINT_X_FINESCALE_ADJ, s_Parameters.m_XScaleAdjust );
m_Config->Write( OPTKEY_PRINT_Y_FINESCALE_ADJ, s_Parameters.m_YScaleAdjust ); m_config->Write( OPTKEY_PRINT_Y_FINESCALE_ADJ, s_Parameters.m_YScaleAdjust );
m_Config->Write( OPTKEY_PRINT_SCALE, m_ScaleOption->GetSelection() ); m_config->Write( OPTKEY_PRINT_SCALE, m_ScaleOption->GetSelection() );
m_Config->Write( OPTKEY_PRINT_PAGE_FRAME, s_Parameters.m_Print_Sheet_Ref); m_config->Write( OPTKEY_PRINT_PAGE_FRAME, s_Parameters.m_Print_Sheet_Ref);
m_Config->Write( OPTKEY_PRINT_MONOCHROME_MODE, s_Parameters.m_Print_Black_and_White); m_config->Write( OPTKEY_PRINT_MONOCHROME_MODE, s_Parameters.m_Print_Black_and_White);
m_Config->Write( OPTKEY_PRINT_PADS_DRILL, (long) s_Parameters.m_DrillShapeOpt ); m_config->Write( OPTKEY_PRINT_PADS_DRILL, (long) s_Parameters.m_DrillShapeOpt );
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;
layerKey.Printf( OPTKEY_LAYERBASE, layer ); layerKey.Printf( OPTKEY_LAYERBASE, layer );
m_Config->Write( layerKey, m_BoxSelectLayer[layer]->IsChecked() ); m_config->Write( layerKey, m_BoxSelectLayer[layer]->IsChecked() );
} }
} }
EndModal( 0 ); EndModal( 0 );
} }
/******************************************************************/
void DIALOG_PRINT_USING_PRINTER::SetPrintParameters( ) void DIALOG_PRINT_USING_PRINTER::SetPrintParameters( )
/******************************************************************/
{ {
PCB_PLOT_PARAMS plot_opts = m_parent->GetPlotSettings();
s_Parameters.m_PrintMirror = m_Print_Mirror->GetValue(); s_Parameters.m_PrintMirror = m_Print_Mirror->GetValue();
s_Parameters.m_Print_Sheet_Ref = m_Print_Sheet_Ref->GetValue(); s_Parameters.m_Print_Sheet_Ref = m_Print_Sheet_Ref->GetValue();
s_Parameters.m_Print_Black_and_White = s_Parameters.m_Print_Black_and_White =
...@@ -397,12 +348,11 @@ void DIALOG_PRINT_USING_PRINTER::SetPrintParameters( ) ...@@ -397,12 +348,11 @@ void DIALOG_PRINT_USING_PRINTER::SetPrintParameters( )
if( m_PagesOption ) if( m_PagesOption )
s_Parameters.m_OptionPrintPage = m_PagesOption->GetSelection() != 0; s_Parameters.m_OptionPrintPage = m_PagesOption->GetSelection() != 0;
SetLayerMaskFromListSelection(); SetLayerMaskFromListSelection();
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_PcbPlotOptions.m_PlotScale = s_Parameters.m_PrintScale; plot_opts.m_PlotScale = s_Parameters.m_PrintScale;
if( m_FineAdjustXscaleOpt ) if( m_FineAdjustXscaleOpt )
{ {
...@@ -419,20 +369,22 @@ void DIALOG_PRINT_USING_PRINTER::SetPrintParameters( ) ...@@ -419,20 +369,22 @@ 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_PcbPlotOptions.m_FineScaleAdjustX = s_Parameters.m_XScaleAdjust;
g_PcbPlotOptions.m_FineScaleAdjustY = s_Parameters.m_YScaleAdjust; plot_opts.m_FineScaleAdjustX = s_Parameters.m_XScaleAdjust;
plot_opts.m_FineScaleAdjustY = s_Parameters.m_YScaleAdjust;
m_parent->SetPlotSettings( plot_opts );
SetPenWidth(); SetPenWidth();
} }
/**********************************************/
void DIALOG_PRINT_USING_PRINTER::SetPenWidth() void DIALOG_PRINT_USING_PRINTER::SetPenWidth()
/***********************************************/
{ {
// Get the new pen width value, and verify min et max value // Get the new pen width value, and verify min et max value
// NOTE: s_Parameters.m_PenDefaultSize is in internal units // NOTE: s_Parameters.m_PenDefaultSize is in internal units
s_Parameters.m_PenDefaultSize = ReturnValueFromTextCtrl( *m_DialogPenWidth, m_Parent->GetInternalUnits() ); s_Parameters.m_PenDefaultSize = ReturnValueFromTextCtrl( *m_DialogPenWidth, m_parent->GetInternalUnits() );
if( s_Parameters.m_PenDefaultSize > WIDTH_MAX_VALUE ) if( s_Parameters.m_PenDefaultSize > WIDTH_MAX_VALUE )
{ {
...@@ -447,7 +399,7 @@ void DIALOG_PRINT_USING_PRINTER::SetPenWidth() ...@@ -447,7 +399,7 @@ void DIALOG_PRINT_USING_PRINTER::SetPenWidth()
g_DrawDefaultLineThickness = s_Parameters.m_PenDefaultSize; g_DrawDefaultLineThickness = s_Parameters.m_PenDefaultSize;
m_DialogPenWidth->SetValue( m_DialogPenWidth->SetValue(
ReturnStringFromValue( g_UserUnit, s_Parameters.m_PenDefaultSize, m_Parent->GetInternalUnits() ) ); ReturnStringFromValue( g_UserUnit, s_Parameters.m_PenDefaultSize, m_parent->GetInternalUnits() ) );
} }
void DIALOG_PRINT_USING_PRINTER::OnScaleSelectionClick( wxCommandEvent& event ) void DIALOG_PRINT_USING_PRINTER::OnScaleSelectionClick( wxCommandEvent& event )
...@@ -462,9 +414,7 @@ void DIALOG_PRINT_USING_PRINTER::OnScaleSelectionClick( wxCommandEvent& event ) ...@@ -462,9 +414,7 @@ void DIALOG_PRINT_USING_PRINTER::OnScaleSelectionClick( wxCommandEvent& event )
} }
/**********************************************************/
void DIALOG_PRINT_USING_PRINTER::OnPageSetup( wxCommandEvent& event ) void DIALOG_PRINT_USING_PRINTER::OnPageSetup( wxCommandEvent& event )
/**********************************************************/
{ {
wxPageSetupDialog pageSetupDialog(this, s_pageSetupData); wxPageSetupDialog pageSetupDialog(this, s_pageSetupData);
pageSetupDialog.ShowModal(); pageSetupDialog.ShowModal();
...@@ -474,17 +424,15 @@ void DIALOG_PRINT_USING_PRINTER::OnPageSetup( wxCommandEvent& event ) ...@@ -474,17 +424,15 @@ void DIALOG_PRINT_USING_PRINTER::OnPageSetup( wxCommandEvent& event )
} }
/************************************************************/
void DIALOG_PRINT_USING_PRINTER::OnPrintPreview( wxCommandEvent& event ) void DIALOG_PRINT_USING_PRINTER::OnPrintPreview( wxCommandEvent& event )
/************************************************************/
{ {
SetPrintParameters( ); SetPrintParameters( );
// Pass two printout objects: for preview, and possible printing. // Pass two printout objects: for preview, and possible printing.
wxString title = _( "Print Preview" ); wxString title = _( "Print Preview" );
wxPrintPreview* preview = wxPrintPreview* preview =
new wxPrintPreview( new BOARD_PRINTOUT_CONTROLER( s_Parameters, m_Parent, title ), new wxPrintPreview( new BOARD_PRINTOUT_CONTROLER( s_Parameters, m_parent, title ),
new BOARD_PRINTOUT_CONTROLER( s_Parameters, m_Parent, title ), new BOARD_PRINTOUT_CONTROLER( s_Parameters, m_parent, title ),
s_PrintData ); s_PrintData );
if( preview == NULL ) if( preview == NULL )
...@@ -504,9 +452,9 @@ void DIALOG_PRINT_USING_PRINTER::OnPrintPreview( wxCommandEvent& event ) ...@@ -504,9 +452,9 @@ void DIALOG_PRINT_USING_PRINTER::OnPrintPreview( wxCommandEvent& event )
} }
// Uses the parent position and size. // Uses the parent position and size.
// @todo uses last position and size ans store them when exit in m_Config // @todo uses last position and size ans store them when exit in m_config
wxPoint WPos = m_Parent->GetPosition(); wxPoint WPos = m_parent->GetPosition();
wxSize WSize = m_Parent->GetSize(); wxSize WSize = m_parent->GetSize();
wxPreviewFrame* frame = new wxPreviewFrame( preview, this, title, WPos, WSize ); wxPreviewFrame* frame = new wxPreviewFrame( preview, this, title, WPos, WSize );
...@@ -515,9 +463,7 @@ void DIALOG_PRINT_USING_PRINTER::OnPrintPreview( wxCommandEvent& event ) ...@@ -515,9 +463,7 @@ void DIALOG_PRINT_USING_PRINTER::OnPrintPreview( wxCommandEvent& event )
} }
/***************************************************************************/
void DIALOG_PRINT_USING_PRINTER::OnPrintButtonClick( wxCommandEvent& event ) void DIALOG_PRINT_USING_PRINTER::OnPrintButtonClick( wxCommandEvent& event )
/***************************************************************************/
{ {
SetPrintParameters( ); SetPrintParameters( );
...@@ -534,7 +480,7 @@ void DIALOG_PRINT_USING_PRINTER::OnPrintButtonClick( wxCommandEvent& event ) ...@@ -534,7 +480,7 @@ void DIALOG_PRINT_USING_PRINTER::OnPrintButtonClick( wxCommandEvent& event )
wxPrinter printer( &printDialogData ); wxPrinter printer( &printDialogData );
wxString title = _( "Print" ); wxString title = _( "Print" );
BOARD_PRINTOUT_CONTROLER printout( s_Parameters, m_Parent, title ); BOARD_PRINTOUT_CONTROLER printout( s_Parameters, m_parent, title );
// Alexander's patch had this removed altogether, waiting for testing. // Alexander's patch had this removed altogether, waiting for testing.
#if 0 && !defined(__WINDOWS__) && !wxCHECK_VERSION(2,9,0) #if 0 && !defined(__WINDOWS__) && !wxCHECK_VERSION(2,9,0)
......
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Jun 30 2011) // C++ code generated with wxFormBuilder (version Mar 19 2012)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO "NOT" EDIT THIS FILE! // PLEASE DO "NOT" EDIT THIS FILE!
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
#include "dialog_print_using_printer_base.h" #include "dialog_print_using_printer_base.h"
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
DIALOG_PRINT_USING_PRINTER_base::DIALOG_PRINT_USING_PRINTER_base( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) DIALOG_PRINT_USING_PRINTER_base::DIALOG_PRINT_USING_PRINTER_base( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
{ {
this->SetSizeHints( wxSize( -1,-1 ), wxDefaultSize ); this->SetSizeHints( wxSize( -1,-1 ), wxDefaultSize );
wxBoxSizer* bMainSizer; wxBoxSizer* bMainSizer;
bMainSizer = new wxBoxSizer( wxHORIZONTAL ); bMainSizer = new wxBoxSizer( wxHORIZONTAL );
wxStaticBoxSizer* sbLayersSizer; wxStaticBoxSizer* sbLayersSizer;
sbLayersSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Layers:") ), wxVERTICAL ); sbLayersSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Layers:") ), wxVERTICAL );
wxBoxSizer* bleftSizer; wxBoxSizer* bleftSizer;
bleftSizer = new wxBoxSizer( wxHORIZONTAL ); bleftSizer = new wxBoxSizer( wxHORIZONTAL );
m_CopperLayersBoxSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Copper Layers:") ), wxVERTICAL ); m_CopperLayersBoxSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Copper Layers:") ), wxVERTICAL );
bleftSizer->Add( m_CopperLayersBoxSizer, 1, wxALL, 5 );
bleftSizer->Add( m_CopperLayersBoxSizer, 1, wxALL, 5 );
m_TechnicalLayersBoxSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Technical Layers:") ), wxVERTICAL );
m_TechnicalLayersBoxSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Technical Layers:") ), wxVERTICAL );
bleftSizer->Add( m_TechnicalLayersBoxSizer, 1, wxALL, 5 );
sbLayersSizer->Add( bleftSizer, 1, wxEXPAND, 5 ); bleftSizer->Add( m_TechnicalLayersBoxSizer, 1, wxALL, 5 );
m_Exclude_Edges_Pcb = new wxCheckBox( this, wxID_ANY, _("Exclude Edges_Pcb Layer"), wxDefaultPosition, wxDefaultSize, 0 );
m_Exclude_Edges_Pcb->SetToolTip( _("Exclude contents of Edges_Pcb layer from all other layers") ); sbLayersSizer->Add( bleftSizer, 1, wxEXPAND, 5 );
sbLayersSizer->Add( m_Exclude_Edges_Pcb, 0, wxALL|wxEXPAND, 5 ); m_Exclude_Edges_Pcb = new wxCheckBox( this, wxID_ANY, _("Exclude Edges_Pcb Layer"), wxDefaultPosition, wxDefaultSize, 0 );
m_Exclude_Edges_Pcb->SetToolTip( _("Exclude contents of Edges_Pcb layer from all other layers") );
bMainSizer->Add( sbLayersSizer, 1, wxEXPAND, 5 );
sbLayersSizer->Add( m_Exclude_Edges_Pcb, 0, wxALL|wxEXPAND, 5 );
wxBoxSizer* bmiddleLeftSizer;
bmiddleLeftSizer = new wxBoxSizer( wxVERTICAL );
bMainSizer->Add( sbLayersSizer, 1, wxEXPAND, 5 );
wxString m_ScaleOptionChoices[] = { _("fit in page"), _("Scale 0.5"), _("Scale 0.7"), _("Approx. Scale 1"), _("Accurate Scale 1"), _("Scale 1.4"), _("Scale 2"), _("Scale 3"), _("Scale 4") };
int m_ScaleOptionNChoices = sizeof( m_ScaleOptionChoices ) / sizeof( wxString ); wxBoxSizer* bmiddleLeftSizer;
m_ScaleOption = new wxRadioBox( this, wxID_ANY, _("Approx. Scale:"), wxDefaultPosition, wxDefaultSize, m_ScaleOptionNChoices, m_ScaleOptionChoices, 1, wxRA_SPECIFY_COLS ); bmiddleLeftSizer = new wxBoxSizer( wxVERTICAL );
m_ScaleOption->SetSelection( 4 );
bmiddleLeftSizer->Add( m_ScaleOption, 0, wxALL, 5 ); wxString m_ScaleOptionChoices[] = { _("fit in page"), _("Scale 0.5"), _("Scale 0.7"), _("Approx. Scale 1"), _("Accurate Scale 1"), _("Scale 1.4"), _("Scale 2"), _("Scale 3"), _("Scale 4") };
int m_ScaleOptionNChoices = sizeof( m_ScaleOptionChoices ) / sizeof( wxString );
m_FineAdjustXscaleTitle = new wxStaticText( this, wxID_ANY, _("X Scale Adjust"), wxDefaultPosition, wxDefaultSize, 0 ); m_ScaleOption = new wxRadioBox( this, wxID_ANY, _("Approx. Scale:"), wxDefaultPosition, wxDefaultSize, m_ScaleOptionNChoices, m_ScaleOptionChoices, 1, wxRA_SPECIFY_COLS );
m_FineAdjustXscaleTitle->Wrap( -1 ); m_ScaleOption->SetSelection( 4 );
bmiddleLeftSizer->Add( m_FineAdjustXscaleTitle, 0, wxRIGHT|wxLEFT, 5 ); bmiddleLeftSizer->Add( m_ScaleOption, 0, wxALL, 5 );
m_FineAdjustXscaleOpt = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); m_FineAdjustXscaleTitle = new wxStaticText( this, wxID_ANY, _("X Scale Adjust"), wxDefaultPosition, wxDefaultSize, 0 );
m_FineAdjustXscaleOpt->SetToolTip( _("Set X scale adjust for exact scale plotting") ); m_FineAdjustXscaleTitle->Wrap( -1 );
bmiddleLeftSizer->Add( m_FineAdjustXscaleTitle, 0, wxRIGHT|wxLEFT, 5 );
bmiddleLeftSizer->Add( m_FineAdjustXscaleOpt, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
m_FineAdjustXscaleOpt = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_FineAdjustYscaleTitle = new wxStaticText( this, wxID_ANY, _("Y Scale Adjust"), wxDefaultPosition, wxDefaultSize, 0 ); m_FineAdjustXscaleOpt->SetToolTip( _("Set X scale adjust for exact scale plotting") );
m_FineAdjustYscaleTitle->Wrap( -1 );
bmiddleLeftSizer->Add( m_FineAdjustYscaleTitle, 0, wxRIGHT|wxLEFT, 5 ); bmiddleLeftSizer->Add( m_FineAdjustXscaleOpt, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
m_FineAdjustYscaleOpt = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); m_FineAdjustYscaleTitle = new wxStaticText( this, wxID_ANY, _("Y Scale Adjust"), wxDefaultPosition, wxDefaultSize, 0 );
m_FineAdjustYscaleOpt->SetToolTip( _("Set Y scale adjust for exact scale plotting") ); m_FineAdjustYscaleTitle->Wrap( -1 );
bmiddleLeftSizer->Add( m_FineAdjustYscaleTitle, 0, wxRIGHT|wxLEFT, 5 );
bmiddleLeftSizer->Add( m_FineAdjustYscaleOpt, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
m_FineAdjustYscaleOpt = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
bMainSizer->Add( bmiddleLeftSizer, 0, wxEXPAND, 5 ); m_FineAdjustYscaleOpt->SetToolTip( _("Set Y scale adjust for exact scale plotting") );
wxBoxSizer* bmiddleRightSizer; bmiddleLeftSizer->Add( m_FineAdjustYscaleOpt, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
bmiddleRightSizer = new wxBoxSizer( wxVERTICAL );
wxStaticBoxSizer* sbOptionsSizer; bMainSizer->Add( bmiddleLeftSizer, 0, wxEXPAND, 5 );
sbOptionsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Options:") ), wxVERTICAL );
wxBoxSizer* bmiddleRightSizer;
m_TextPenWidth = new wxStaticText( this, wxID_ANY, _("Default pen size"), wxDefaultPosition, wxDefaultSize, 0 ); bmiddleRightSizer = new wxBoxSizer( wxVERTICAL );
m_TextPenWidth->Wrap( -1 );
m_TextPenWidth->SetToolTip( _("Pen size used to draw items that have no pen size specified.\nUsed mainly to draw items in sketch mode.") ); wxStaticBoxSizer* sbOptionsSizer;
sbOptionsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Options:") ), wxVERTICAL );
sbOptionsSizer->Add( m_TextPenWidth, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_TextPenWidth = new wxStaticText( this, wxID_ANY, _("Default pen size"), wxDefaultPosition, wxDefaultSize, 0 );
m_DialogPenWidth = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); m_TextPenWidth->Wrap( -1 );
sbOptionsSizer->Add( m_DialogPenWidth, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); m_TextPenWidth->SetToolTip( _("Pen size used to draw items that have no pen size specified.\nUsed mainly to draw items in sketch mode.") );
m_Print_Sheet_Ref = new wxCheckBox( this, wxID_FRAME_SEL, _("Print frame ref"), wxDefaultPosition, wxDefaultSize, 0 ); sbOptionsSizer->Add( m_TextPenWidth, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_Print_Sheet_Ref->SetValue(true);
m_Print_Sheet_Ref->SetToolTip( _("Print (or not) the Frame references.") ); m_DialogPenWidth = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
sbOptionsSizer->Add( m_DialogPenWidth, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
sbOptionsSizer->Add( m_Print_Sheet_Ref, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_Print_Sheet_Ref = new wxCheckBox( this, wxID_FRAME_SEL, _("Print frame ref"), wxDefaultPosition, wxDefaultSize, 0 );
m_Print_Mirror = new wxCheckBox( this, wxID_ANY, _("Mirror"), wxDefaultPosition, wxDefaultSize, 0 ); m_Print_Sheet_Ref->SetValue(true);
sbOptionsSizer->Add( m_Print_Mirror, 0, wxALL, 5 ); m_Print_Sheet_Ref->SetToolTip( _("Print (or not) the Frame references.") );
bmiddleRightSizer->Add( sbOptionsSizer, 0, wxEXPAND|wxALL, 5 ); sbOptionsSizer->Add( m_Print_Sheet_Ref, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
wxString m_Drill_Shape_OptChoices[] = { _("No drill mark"), _("Small mark"), _("Real drill") }; m_Print_Mirror = new wxCheckBox( this, wxID_ANY, _("Mirror"), wxDefaultPosition, wxDefaultSize, 0 );
int m_Drill_Shape_OptNChoices = sizeof( m_Drill_Shape_OptChoices ) / sizeof( wxString ); sbOptionsSizer->Add( m_Print_Mirror, 0, wxALL, 5 );
m_Drill_Shape_Opt = new wxRadioBox( this, wxID_ANY, _("Pads Drill Opt"), wxDefaultPosition, wxDefaultSize, m_Drill_Shape_OptNChoices, m_Drill_Shape_OptChoices, 1, wxRA_SPECIFY_COLS );
m_Drill_Shape_Opt->SetSelection( 1 );
bmiddleRightSizer->Add( m_Drill_Shape_Opt, 0, wxALL|wxEXPAND, 5 ); bmiddleRightSizer->Add( sbOptionsSizer, 0, wxEXPAND|wxALL, 5 );
wxString m_ModeColorOptionChoices[] = { _("Color"), _("Black and white") }; wxString m_Drill_Shape_OptChoices[] = { _("No drill mark"), _("Small mark"), _("Real drill") };
int m_ModeColorOptionNChoices = sizeof( m_ModeColorOptionChoices ) / sizeof( wxString ); int m_Drill_Shape_OptNChoices = sizeof( m_Drill_Shape_OptChoices ) / sizeof( wxString );
m_ModeColorOption = new wxRadioBox( this, wxID_PRINT_MODE, _("Print Mode"), wxDefaultPosition, wxDefaultSize, m_ModeColorOptionNChoices, m_ModeColorOptionChoices, 1, wxRA_SPECIFY_COLS ); m_Drill_Shape_Opt = new wxRadioBox( this, wxID_ANY, _("Pads Drill Opt"), wxDefaultPosition, wxDefaultSize, m_Drill_Shape_OptNChoices, m_Drill_Shape_OptChoices, 1, wxRA_SPECIFY_COLS );
m_ModeColorOption->SetSelection( 1 ); m_Drill_Shape_Opt->SetSelection( 1 );
m_ModeColorOption->SetToolTip( _("Choose if you want to draw the sheet like it appears on screen,\nor in black and white mode, better to print it when using black and white printers") ); bmiddleRightSizer->Add( m_Drill_Shape_Opt, 0, wxALL|wxEXPAND, 5 );
bmiddleRightSizer->Add( m_ModeColorOption, 0, wxALL|wxEXPAND, 5 ); wxString m_ModeColorOptionChoices[] = { _("Color"), _("Black and white") };
int m_ModeColorOptionNChoices = sizeof( m_ModeColorOptionChoices ) / sizeof( wxString );
bMainSizer->Add( bmiddleRightSizer, 0, wxEXPAND, 5 ); m_ModeColorOption = new wxRadioBox( this, wxID_PRINT_MODE, _("Print Mode"), wxDefaultPosition, wxDefaultSize, m_ModeColorOptionNChoices, m_ModeColorOptionChoices, 1, wxRA_SPECIFY_COLS );
m_ModeColorOption->SetSelection( 1 );
wxBoxSizer* bbuttonsSizer; m_ModeColorOption->SetToolTip( _("Choose if you want to draw the sheet like it appears on screen,\nor in black and white mode, better to print it when using black and white printers") );
bbuttonsSizer = new wxBoxSizer( wxVERTICAL );
bmiddleRightSizer->Add( m_ModeColorOption, 0, wxALL|wxEXPAND, 5 );
wxString m_PagesOptionChoices[] = { _("1 Page per Layer"), _("Single page") };
int m_PagesOptionNChoices = sizeof( m_PagesOptionChoices ) / sizeof( wxString );
m_PagesOption = new wxRadioBox( this, wxID_PAGE_MODE, _("Page Print"), wxDefaultPosition, wxDefaultSize, m_PagesOptionNChoices, m_PagesOptionChoices, 1, wxRA_SPECIFY_COLS ); bMainSizer->Add( bmiddleRightSizer, 0, wxEXPAND, 5 );
m_PagesOption->SetSelection( 0 );
bbuttonsSizer->Add( m_PagesOption, 0, wxALL|wxEXPAND, 5 ); wxBoxSizer* bbuttonsSizer;
bbuttonsSizer = new wxBoxSizer( wxVERTICAL );
bbuttonsSizer->Add( 0, 0, 1, wxEXPAND, 5 ); wxString m_PagesOptionChoices[] = { _("1 Page per Layer"), _("Single page") };
int m_PagesOptionNChoices = sizeof( m_PagesOptionChoices ) / sizeof( wxString );
m_buttonOption = new wxButton( this, wxID_PRINT_OPTIONS, _("Page Options"), wxDefaultPosition, wxDefaultSize, 0 ); m_PagesOption = new wxRadioBox( this, wxID_PAGE_MODE, _("Page Print"), wxDefaultPosition, wxDefaultSize, m_PagesOptionNChoices, m_PagesOptionChoices, 1, wxRA_SPECIFY_COLS );
bbuttonsSizer->Add( m_buttonOption, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); m_PagesOption->SetSelection( 0 );
bbuttonsSizer->Add( m_PagesOption, 0, wxALL|wxEXPAND, 5 );
m_buttonPreview = new wxButton( this, wxID_PREVIEW, _("Preview"), wxDefaultPosition, wxDefaultSize, 0 );
bbuttonsSizer->Add( m_buttonPreview, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
bbuttonsSizer->Add( 0, 0, 1, wxEXPAND, 5 );
m_buttonPrint = new wxButton( this, wxID_PRINT_ALL, _("Print"), wxDefaultPosition, wxDefaultSize, 0 );
bbuttonsSizer->Add( m_buttonPrint, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); m_buttonOption = new wxButton( this, wxID_PRINT_OPTIONS, _("Page Options"), wxDefaultPosition, wxDefaultSize, 0 );
bbuttonsSizer->Add( m_buttonOption, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
m_buttonQuit = new wxButton( this, wxID_CANCEL, _("Close"), wxDefaultPosition, wxDefaultSize, 0 );
m_buttonQuit->SetDefault(); m_buttonPreview = new wxButton( this, wxID_PREVIEW, _("Preview"), wxDefaultPosition, wxDefaultSize, 0 );
bbuttonsSizer->Add( m_buttonQuit, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); bbuttonsSizer->Add( m_buttonPreview, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
m_buttonPrint = new wxButton( this, wxID_PRINT_ALL, _("Print"), wxDefaultPosition, wxDefaultSize, 0 );
bbuttonsSizer->Add( 0, 0, 1, wxEXPAND, 5 ); bbuttonsSizer->Add( m_buttonPrint, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
bMainSizer->Add( bbuttonsSizer, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); m_buttonQuit = new wxButton( this, wxID_CANCEL, _("Close"), wxDefaultPosition, wxDefaultSize, 0 );
m_buttonQuit->SetDefault();
this->SetSizer( bMainSizer ); bbuttonsSizer->Add( m_buttonQuit, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
this->Layout();
// Connect Events bbuttonsSizer->Add( 0, 0, 1, wxEXPAND, 5 );
this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_PRINT_USING_PRINTER_base::OnCloseWindow ) );
m_ScaleOption->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_base::OnScaleSelectionClick ), NULL, this );
m_buttonOption->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_base::OnPageSetup ), NULL, this ); bMainSizer->Add( bbuttonsSizer, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
m_buttonPreview->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_base::OnPrintPreview ), NULL, this );
m_buttonPrint->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_base::OnPrintButtonClick ), NULL, this );
m_buttonQuit->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_base::OnButtonCancelClick ), NULL, this ); this->SetSizer( bMainSizer );
} this->Layout();
bMainSizer->Fit( this );
DIALOG_PRINT_USING_PRINTER_base::~DIALOG_PRINT_USING_PRINTER_base()
{ this->Centre( wxBOTH );
// Disconnect Events
this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_PRINT_USING_PRINTER_base::OnCloseWindow ) ); // Connect Events
m_ScaleOption->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_base::OnScaleSelectionClick ), NULL, this ); this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_PRINT_USING_PRINTER_base::OnCloseWindow ) );
m_buttonOption->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_base::OnPageSetup ), NULL, this ); m_ScaleOption->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_base::OnScaleSelectionClick ), NULL, this );
m_buttonPreview->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_base::OnPrintPreview ), NULL, this ); m_buttonOption->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_base::OnPageSetup ), NULL, this );
m_buttonPrint->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_base::OnPrintButtonClick ), NULL, this ); m_buttonPreview->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_base::OnPrintPreview ), NULL, this );
m_buttonQuit->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_base::OnButtonCancelClick ), NULL, this ); m_buttonPrint->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_base::OnPrintButtonClick ), NULL, this );
m_buttonQuit->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_base::OnButtonCancelClick ), NULL, this );
} }
DIALOG_PRINT_USING_PRINTER_base::~DIALOG_PRINT_USING_PRINTER_base()
{
// Disconnect Events
this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_PRINT_USING_PRINTER_base::OnCloseWindow ) );
m_ScaleOption->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_base::OnScaleSelectionClick ), NULL, this );
m_buttonOption->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_base::OnPageSetup ), NULL, this );
m_buttonPreview->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_base::OnPrintPreview ), NULL, this );
m_buttonPrint->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_base::OnPrintButtonClick ), NULL, this );
m_buttonQuit->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_base::OnButtonCancelClick ), NULL, this );
}
This source diff could not be displayed because it is too large. You can view the blob instead.
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Jun 30 2011) // C++ code generated with wxFormBuilder (version Mar 19 2012)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO "NOT" EDIT THIS FILE! // PLEASE DO "NOT" EDIT THIS FILE!
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
#ifndef __DIALOG_PRINT_USING_PRINTER_BASE_H__ #ifndef __DIALOG_PRINT_USING_PRINTER_BASE_H__
#define __DIALOG_PRINT_USING_PRINTER_BASE_H__ #define __DIALOG_PRINT_USING_PRINTER_BASE_H__
#include <wx/artprov.h> #include <wx/artprov.h>
#include <wx/xrc/xmlres.h> #include <wx/xrc/xmlres.h>
#include <wx/intl.h> #include <wx/intl.h>
#include <wx/string.h> #include "dialog_shim.h"
#include <wx/sizer.h> #include <wx/string.h>
#include <wx/statbox.h> #include <wx/sizer.h>
#include <wx/gdicmn.h> #include <wx/statbox.h>
#include <wx/checkbox.h> #include <wx/gdicmn.h>
#include <wx/font.h> #include <wx/checkbox.h>
#include <wx/colour.h> #include <wx/font.h>
#include <wx/settings.h> #include <wx/colour.h>
#include <wx/radiobox.h> #include <wx/settings.h>
#include <wx/stattext.h> #include <wx/radiobox.h>
#include <wx/textctrl.h> #include <wx/stattext.h>
#include <wx/button.h> #include <wx/textctrl.h>
#include <wx/dialog.h> #include <wx/button.h>
#include <wx/dialog.h>
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
/// Class DIALOG_PRINT_USING_PRINTER_base ///////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////// /// Class DIALOG_PRINT_USING_PRINTER_base
class DIALOG_PRINT_USING_PRINTER_base : public wxDialog ///////////////////////////////////////////////////////////////////////////////
{ class DIALOG_PRINT_USING_PRINTER_base : public DIALOG_SHIM
private: {
private:
protected:
enum protected:
{ enum
wxID_FRAME_SEL = 1000, {
wxID_PRINT_MODE, wxID_FRAME_SEL = 1000,
wxID_PAGE_MODE, wxID_PRINT_MODE,
wxID_PRINT_OPTIONS, wxID_PAGE_MODE,
wxID_PRINT_ALL, wxID_PRINT_OPTIONS,
}; wxID_PRINT_ALL
};
wxStaticBoxSizer* m_CopperLayersBoxSizer;
wxStaticBoxSizer* m_TechnicalLayersBoxSizer; wxStaticBoxSizer* m_CopperLayersBoxSizer;
wxCheckBox* m_Exclude_Edges_Pcb; wxStaticBoxSizer* m_TechnicalLayersBoxSizer;
wxRadioBox* m_ScaleOption; wxCheckBox* m_Exclude_Edges_Pcb;
wxStaticText* m_FineAdjustXscaleTitle; wxRadioBox* m_ScaleOption;
wxTextCtrl* m_FineAdjustXscaleOpt; wxStaticText* m_FineAdjustXscaleTitle;
wxStaticText* m_FineAdjustYscaleTitle; wxTextCtrl* m_FineAdjustXscaleOpt;
wxTextCtrl* m_FineAdjustYscaleOpt; wxStaticText* m_FineAdjustYscaleTitle;
wxStaticText* m_TextPenWidth; wxTextCtrl* m_FineAdjustYscaleOpt;
wxTextCtrl* m_DialogPenWidth; wxStaticText* m_TextPenWidth;
wxCheckBox* m_Print_Sheet_Ref; wxTextCtrl* m_DialogPenWidth;
wxCheckBox* m_Print_Mirror; wxCheckBox* m_Print_Sheet_Ref;
wxRadioBox* m_Drill_Shape_Opt; wxCheckBox* m_Print_Mirror;
wxRadioBox* m_ModeColorOption; wxRadioBox* m_Drill_Shape_Opt;
wxRadioBox* m_PagesOption; wxRadioBox* m_ModeColorOption;
wxButton* m_buttonOption; wxRadioBox* m_PagesOption;
wxButton* m_buttonPreview; wxButton* m_buttonOption;
wxButton* m_buttonPrint; wxButton* m_buttonPreview;
wxButton* m_buttonQuit; wxButton* m_buttonPrint;
wxButton* m_buttonQuit;
// Virtual event handlers, overide them in your derived class
virtual void OnCloseWindow( wxCloseEvent& event ) { event.Skip(); } // Virtual event handlers, overide them in your derived class
virtual void OnScaleSelectionClick( wxCommandEvent& event ) { event.Skip(); } virtual void OnCloseWindow( wxCloseEvent& event ) { event.Skip(); }
virtual void OnPageSetup( wxCommandEvent& event ) { event.Skip(); } virtual void OnScaleSelectionClick( wxCommandEvent& event ) { event.Skip(); }
virtual void OnPrintPreview( wxCommandEvent& event ) { event.Skip(); } virtual void OnPageSetup( wxCommandEvent& event ) { event.Skip(); }
virtual void OnPrintButtonClick( wxCommandEvent& event ) { event.Skip(); } virtual void OnPrintPreview( wxCommandEvent& event ) { event.Skip(); }
virtual void OnButtonCancelClick( wxCommandEvent& event ) { event.Skip(); } virtual void OnPrintButtonClick( wxCommandEvent& event ) { event.Skip(); }
virtual void OnButtonCancelClick( wxCommandEvent& event ) { event.Skip(); }
public:
public:
DIALOG_PRINT_USING_PRINTER_base( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Print"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 551,315 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_PRINT_USING_PRINTER_base(); DIALOG_PRINT_USING_PRINTER_base( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Print"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_PRINT_USING_PRINTER_base();
};
};
#endif //__DIALOG_PRINT_USING_PRINTER_BASE_H__
#endif //__DIALOG_PRINT_USING_PRINTER_BASE_H__
...@@ -37,6 +37,9 @@ void GenDrillMapFile( BOARD* aPcb, FILE* aFile, const wxString& aFullFileName, ...@@ -37,6 +37,9 @@ void GenDrillMapFile( BOARD* aPcb, FILE* aFile, const wxString& aFullFileName,
wxPoint offset; wxPoint offset;
wxString msg; wxString msg;
PLOTTER* plotter = NULL; PLOTTER* plotter = NULL;
const PCB_PLOT_PARAMS& plot_opts = aPcb->GetPlotOptions();
LOCALE_IO toggle; // use standard notation for float numbers LOCALE_IO toggle; // use standard notation for float numbers
// Calculate dimensions and center of PCB // Calculate dimensions and center of PCB
...@@ -58,53 +61,53 @@ void GenDrillMapFile( BOARD* aPcb, FILE* aFile, const wxString& aFullFileName, ...@@ -58,53 +61,53 @@ void GenDrillMapFile( BOARD* aPcb, FILE* aFile, const wxString& aFullFileName,
break; break;
case PLOT_FORMAT_HPGL: // Scale for HPGL format. case PLOT_FORMAT_HPGL: // Scale for HPGL format.
{ {
offset.x = 0; offset.x = 0;
offset.y = 0; offset.y = 0;
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_PcbPlotOptions.m_HPGLPenNum ); hpgl_plotter->set_pen_number( plot_opts.m_HPGLPenNum );
hpgl_plotter->set_pen_speed( g_PcbPlotOptions.m_HPGLPenSpeed ); hpgl_plotter->set_pen_speed( plot_opts.m_HPGLPenSpeed );
hpgl_plotter->set_pen_overlap( 0 ); hpgl_plotter->set_pen_overlap( 0 );
plotter->SetPageSettings( aSheet ); plotter->SetPageSettings( aSheet );
plotter->set_viewport( offset, scale, 0 ); plotter->set_viewport( offset, scale, 0 );
} }
break; break;
case PLOT_FORMAT_POST: case PLOT_FORMAT_POST:
{ {
PAGE_INFO pageA4( wxT( "A4" ) ); PAGE_INFO pageA4( wxT( "A4" ) );
wxSize pageSizeIU = pageA4.GetSizeIU(); wxSize pageSizeIU = pageA4.GetSizeIU();
// Keep size for drill legend // Keep size for drill legend
double Xscale = (double) ( pageSizeIU.x * 0.8 ) / dX; double Xscale = (double) ( pageSizeIU.x * 0.8 ) / dX;
double Yscale = (double) ( pageSizeIU.y * 0.6 ) / dY; double Yscale = (double) ( pageSizeIU.y * 0.6 ) / dY;
scale = MIN( Xscale, Yscale ); scale = MIN( Xscale, Yscale );
offset.x = (int) ( (double) BoardCentre.x - ( (double) pageSizeIU.x / 2.0 ) / scale ); offset.x = (int) ( (double) BoardCentre.x - ( (double) pageSizeIU.x / 2.0 ) / scale );
offset.y = (int) ( (double) BoardCentre.y - ( (double) pageSizeIU.y / 2.0 ) / scale ); offset.y = (int) ( (double) BoardCentre.y - ( (double) pageSizeIU.y / 2.0 ) / scale );
offset.y += pageSizeIU.y / 8; // offset to legend offset.y += pageSizeIU.y / 8; // offset to legend
PS_PLOTTER* ps_plotter = new PS_PLOTTER; PS_PLOTTER* ps_plotter = new PS_PLOTTER;
plotter = ps_plotter; plotter = ps_plotter;
ps_plotter->SetPageSettings( pageA4 ); ps_plotter->SetPageSettings( pageA4 );
plotter->set_viewport( offset, scale, 0 ); plotter->set_viewport( offset, scale, 0 );
}
break; break;
}
case PLOT_FORMAT_DXF: case PLOT_FORMAT_DXF:
{ {
offset.x = 0; offset.x = 0;
offset.y = 0; offset.y = 0;
scale = 1; scale = 1;
DXF_PLOTTER* dxf_plotter = new DXF_PLOTTER; DXF_PLOTTER* dxf_plotter = new DXF_PLOTTER;
plotter = dxf_plotter; plotter = dxf_plotter;
plotter->SetPageSettings( aSheet ); plotter->SetPageSettings( aSheet );
plotter->set_viewport( offset, scale, 0 ); plotter->set_viewport( offset, scale, 0 );
}
break; break;
}
default: default:
wxASSERT( false ); wxASSERT( false );
...@@ -122,19 +125,19 @@ void GenDrillMapFile( BOARD* aPcb, FILE* aFile, const wxString& aFullFileName, ...@@ -122,19 +125,19 @@ void GenDrillMapFile( BOARD* aPcb, FILE* aFile, const wxString& aFullFileName,
switch( PtStruct->Type() ) switch( PtStruct->Type() )
{ {
case PCB_LINE_T: case PCB_LINE_T:
PlotDrawSegment( plotter, (DRAWSEGMENT*) PtStruct, EDGE_LAYER, FILLED ); PlotDrawSegment( plotter, plot_opts, (DRAWSEGMENT*) PtStruct, EDGE_LAYER, FILLED );
break; break;
case PCB_TEXT_T: case PCB_TEXT_T:
PlotTextePcb( plotter, (TEXTE_PCB*) PtStruct, EDGE_LAYER, FILLED ); PlotTextePcb( plotter, plot_opts, (TEXTE_PCB*) PtStruct, EDGE_LAYER, FILLED );
break; break;
case PCB_DIMENSION_T: case PCB_DIMENSION_T:
PlotDimension( plotter, (DIMENSION*) PtStruct, EDGE_LAYER, FILLED ); PlotDimension( plotter, plot_opts, (DIMENSION*) PtStruct, EDGE_LAYER, FILLED );
break; break;
case PCB_TARGET_T: case PCB_TARGET_T:
PlotPcbTarget( plotter, (PCB_TARGET*) PtStruct, EDGE_LAYER, FILLED ); PlotPcbTarget( plotter, plot_opts, (PCB_TARGET*) PtStruct, EDGE_LAYER, FILLED );
break; break;
case PCB_MARKER_T: // do not draw case PCB_MARKER_T: // do not draw
...@@ -182,7 +185,7 @@ void GenDrillMapFile( BOARD* aPcb, FILE* aFile, const wxString& aFullFileName, ...@@ -182,7 +185,7 @@ void GenDrillMapFile( BOARD* aPcb, FILE* aFile, const wxString& aFullFileName,
plotY += intervalle; plotY += intervalle;
plot_diam = (int) ( aToolListBuffer[ii].m_Diameter ); plot_diam = (int) aToolListBuffer[ii].m_Diameter;
x = (int) ( (double) plotX - 200.0 * CharScale - (double)plot_diam / 2.0 ); x = (int) ( (double) plotX - 200.0 * CharScale - (double)plot_diam / 2.0 );
y = (int) ( (double) plotY + (double) CharSize * CharScale ); y = (int) ( (double) plotY + (double) CharSize * CharScale );
plotter->marker( wxPoint( x, y ), plot_diam, ii ); plotter->marker( wxPoint( x, y ), plot_diam, ii );
......
...@@ -59,32 +59,35 @@ public: ...@@ -59,32 +59,35 @@ public:
int m_Layer; // its side (LAYER_N_BACK, or LAYER_N_FRONT) int m_Layer; // its side (LAYER_N_BACK, or LAYER_N_FRONT)
}; };
/*
/**
* The dialog to create footprint position files, * The dialog to create footprint position files,
* and choose options (one or 2 files, units and force all SMD footprints in list) * and choose options (one or 2 files, units and force all SMD footprints in list)
*/ */
class DIALOG_GEN_MODULE_POSITION : public DIALOG_GEN_MODULE_POSITION_BASE class DIALOG_GEN_MODULE_POSITION : public DIALOG_GEN_MODULE_POSITION_BASE
{ {
private:
PCB_EDIT_FRAME* m_parent;
static int m_unitsOpt;
static int m_fileOpt;
public: public:
DIALOG_GEN_MODULE_POSITION( PCB_EDIT_FRAME * parent): DIALOG_GEN_MODULE_POSITION( PCB_EDIT_FRAME * aParent ):
DIALOG_GEN_MODULE_POSITION_BASE( parent ) DIALOG_GEN_MODULE_POSITION_BASE( aParent ),
m_parent( aParent ),
m_plotOpts( aParent->GetPlotSettings() )
{ {
m_parent = parent;
} }
private: private:
void OnInitDialog( wxInitDialogEvent& event ); PCB_EDIT_FRAME* m_parent;
void OnOutputDirectoryBrowseClicked( wxCommandEvent& event ); PCB_PLOT_PARAMS m_plotOpts;
void OnCancelButton( wxCommandEvent& event )
static int m_unitsOpt;
static int m_fileOpt;
void OnInitDialog( wxInitDialogEvent& event );
void OnOutputDirectoryBrowseClicked( wxCommandEvent& event );
void OnCancelButton( wxCommandEvent& event )
{ {
EndModal( wxID_CANCEL ); EndModal( wxID_CANCEL );
} }
void OnOKButton( wxCommandEvent& event ); void OnOKButton( wxCommandEvent& event );
bool CreateFiles(); bool CreateFiles();
...@@ -115,6 +118,7 @@ private: ...@@ -115,6 +118,7 @@ private:
} }
}; };
// Static members to remember choices // Static members to remember choices
int DIALOG_GEN_MODULE_POSITION::m_unitsOpt = 0; int DIALOG_GEN_MODULE_POSITION::m_unitsOpt = 0;
int DIALOG_GEN_MODULE_POSITION::m_fileOpt = 0; int DIALOG_GEN_MODULE_POSITION::m_fileOpt = 0;
...@@ -122,7 +126,7 @@ int DIALOG_GEN_MODULE_POSITION::m_fileOpt = 0; ...@@ -122,7 +126,7 @@ int DIALOG_GEN_MODULE_POSITION::m_fileOpt = 0;
void DIALOG_GEN_MODULE_POSITION::OnInitDialog( wxInitDialogEvent& event ) void DIALOG_GEN_MODULE_POSITION::OnInitDialog( wxInitDialogEvent& event )
{ {
// Output directory // Output directory
m_outputDirectoryName->SetValue( g_PcbPlotOptions.GetOutputDirectory() ); m_outputDirectoryName->SetValue( m_plotOpts.GetOutputDirectory() );
m_radioBoxUnits->SetSelection( m_unitsOpt ); m_radioBoxUnits->SetSelection( m_unitsOpt );
m_radioBoxFilesCount->SetSelection( m_fileOpt ); m_radioBoxFilesCount->SetSelection( m_fileOpt );
...@@ -176,11 +180,15 @@ void DIALOG_GEN_MODULE_POSITION::OnOKButton( wxCommandEvent& event ) ...@@ -176,11 +180,15 @@ void DIALOG_GEN_MODULE_POSITION::OnOKButton( wxCommandEvent& event )
wxString dirStr; wxString dirStr;
dirStr = m_outputDirectoryName->GetValue(); dirStr = m_outputDirectoryName->GetValue();
dirStr.Replace( wxT( "\\" ), wxT( "/" ) ); dirStr.Replace( wxT( "\\" ), wxT( "/" ) );
g_PcbPlotOptions.SetOutputDirectory( dirStr );
m_plotOpts.SetOutputDirectory( dirStr );
m_parent->SetPlotSettings( m_plotOpts );
CreateFiles(); CreateFiles();
} }
bool DIALOG_GEN_MODULE_POSITION::CreateFiles() bool DIALOG_GEN_MODULE_POSITION::CreateFiles()
{ {
BOARD * brd = m_parent->GetBoard(); BOARD * brd = m_parent->GetBoard();
......
...@@ -116,20 +116,20 @@ void DIALOG_GENDRILL::GenDrillAndReportFiles() ...@@ -116,20 +116,20 @@ void DIALOG_GENDRILL::GenDrillAndReportFiles()
UpdateConfig(); // set params and Save drill options UpdateConfig(); // set params and Save drill options
m_Parent->ClearMsgPanel(); m_parent->ClearMsgPanel();
if( m_microViasCount || m_blindOrBuriedViasCount ) if( m_microViasCount || m_blindOrBuriedViasCount )
hasBuriedVias = true; hasBuriedVias = true;
for( ; ; ) for( ; ; )
{ {
Build_Holes_List( m_Parent->GetBoard(), s_HoleListBuffer, Build_Holes_List( m_parent->GetBoard(), s_HoleListBuffer,
s_ToolListBuffer, layer1, layer2, s_ToolListBuffer, layer1, layer2,
gen_through_holes ? false : true, gen_NPTH_holes ); gen_through_holes ? false : true, gen_NPTH_holes );
if( s_ToolListBuffer.size() > 0 ) // holes? if( s_ToolListBuffer.size() > 0 ) // holes?
{ {
fn = m_Parent->GetScreen()->GetFileName(); fn = m_parent->GetScreen()->GetFileName();
layer_extend.Empty(); layer_extend.Empty();
if( gen_NPTH_holes ) if( gen_NPTH_holes )
...@@ -169,7 +169,7 @@ void DIALOG_GENDRILL::GenDrillAndReportFiles() ...@@ -169,7 +169,7 @@ void DIALOG_GENDRILL::GenDrillAndReportFiles()
return; return;
} }
EXCELLON_WRITER excellonWriter( m_Parent->GetBoard(), EXCELLON_WRITER excellonWriter( m_parent->GetBoard(),
aFile, m_FileDrillOffset, aFile, m_FileDrillOffset,
&s_HoleListBuffer, &s_ToolListBuffer ); &s_HoleListBuffer, &s_ToolListBuffer );
excellonWriter.SetFormat( !m_UnitDrillIsInch, excellonWriter.SetFormat( !m_UnitDrillIsInch,
...@@ -226,7 +226,7 @@ void DIALOG_GENDRILL::GenDrillAndReportFiles() ...@@ -226,7 +226,7 @@ void DIALOG_GENDRILL::GenDrillAndReportFiles()
layer1++; layer1++;
layer2++; // use next layer pair layer2++; // use next layer pair
if( layer2 == m_Parent->GetBoard()->GetCopperLayerCount() - 1 ) if( layer2 == m_parent->GetBoard()->GetCopperLayerCount() - 1 )
layer2 = LAYER_N_FRONT; // the last layer is always the layer2 = LAYER_N_FRONT; // the last layer is always the
// component layer // component layer
} }
...@@ -237,7 +237,7 @@ void DIALOG_GENDRILL::GenDrillAndReportFiles() ...@@ -237,7 +237,7 @@ void DIALOG_GENDRILL::GenDrillAndReportFiles()
if( m_Choice_Drill_Report->GetSelection() > 0 ) if( m_Choice_Drill_Report->GetSelection() > 0 )
{ {
fn = m_Parent->GetScreen()->GetFileName(); fn = m_parent->GetScreen()->GetFileName();
GenDrillReport( fn.GetFullName() ); GenDrillReport( fn.GetFullName() );
} }
...@@ -628,10 +628,10 @@ void DIALOG_GENDRILL::GenDrillMap( const wxString aFileName, ...@@ -628,10 +628,10 @@ void DIALOG_GENDRILL::GenDrillMap( const wxString aFileName,
return; return;
} }
GenDrillMapFile( m_Parent->GetBoard(), GenDrillMapFile( m_parent->GetBoard(),
plotfile, plotfile,
dlg.GetPath(), dlg.GetPath(),
m_Parent->GetPageSettings(), m_parent->GetPageSettings(),
s_HoleListBuffer, s_HoleListBuffer,
s_ToolListBuffer, s_ToolListBuffer,
m_UnitDrillIsInch, m_UnitDrillIsInch,
...@@ -667,8 +667,8 @@ void DIALOG_GENDRILL::GenDrillReport( const wxString aFileName ) ...@@ -667,8 +667,8 @@ void DIALOG_GENDRILL::GenDrillReport( const wxString aFileName )
return; return;
} }
GenDrillReportFile( report_dest, m_Parent->GetBoard(), GenDrillReportFile( report_dest, m_parent->GetBoard(),
m_Parent->GetScreen()->GetFileName(), m_parent->GetScreen()->GetFileName(),
m_UnitDrillIsInch, m_UnitDrillIsInch,
s_HoleListBuffer, s_HoleListBuffer,
s_ToolListBuffer ); s_ToolListBuffer );
......
...@@ -355,11 +355,12 @@ int PCB_BASE_FRAME::ReadSetup( LINE_READER* aReader ) ...@@ -355,11 +355,12 @@ int PCB_BASE_FRAME::ReadSetup( LINE_READER* aReader )
if( strnicmp( line, "PcbPlotParams", 13 ) == 0 ) if( strnicmp( line, "PcbPlotParams", 13 ) == 0 )
{ {
PCB_PLOT_PARAMS plot_opts;
PCB_PLOT_PARAMS_PARSER parser( &line[13], aReader->GetSource() ); PCB_PLOT_PARAMS_PARSER parser( &line[13], aReader->GetSource() );
try try
{ {
g_PcbPlotOptions.Parse( &parser ); plot_opts.Parse( &parser );
} }
catch( IO_ERROR& e ) catch( IO_ERROR& e )
{ {
...@@ -370,6 +371,8 @@ int PCB_BASE_FRAME::ReadSetup( LINE_READER* aReader ) ...@@ -370,6 +371,8 @@ int PCB_BASE_FRAME::ReadSetup( LINE_READER* aReader )
wxMessageBox( msg, _( "Open Board File" ), wxOK | wxICON_ERROR ); wxMessageBox( msg, _( "Open Board File" ), wxOK | wxICON_ERROR );
} }
GetBoard()->SetPlotOptions( plot_opts );
continue; continue;
} }
...@@ -801,7 +804,7 @@ static int WriteSetup( FILE* aFile, PCB_EDIT_FRAME* aFrame, BOARD* aBoard ) ...@@ -801,7 +804,7 @@ static int WriteSetup( FILE* aFile, PCB_EDIT_FRAME* aFrame, BOARD* aBoard )
STRING_FORMATTER sf; STRING_FORMATTER sf;
g_PcbPlotOptions.Format( &sf, 0 ); aBoard->GetPlotOptions().Format( &sf, 0 );
wxString record = FROM_UTF8( sf.GetString().c_str() ); wxString record = FROM_UTF8( sf.GetString().c_str() );
record.Replace( wxT("\n"), wxT(""), true ); record.Replace( wxT("\n"), wxT(""), true );
......
...@@ -573,8 +573,13 @@ void KICAD_PLUGIN::loadSETUP() ...@@ -573,8 +573,13 @@ void KICAD_PLUGIN::loadSETUP()
if( TESTLINE( "PcbPlotParams" ) ) if( TESTLINE( "PcbPlotParams" ) )
{ {
PCB_PLOT_PARAMS plot_opts;
PCB_PLOT_PARAMS_PARSER parser( line + SZ( "PcbPlotParams" ), m_reader->GetSource() ); PCB_PLOT_PARAMS_PARSER parser( line + SZ( "PcbPlotParams" ), m_reader->GetSource() );
g_PcbPlotOptions.Parse( &parser );
plot_opts.Parse( &parser );
m_board->SetPlotOptions( plot_opts );
} }
else if( TESTLINE( "AuxiliaryAxisOrg" ) ) else if( TESTLINE( "AuxiliaryAxisOrg" ) )
...@@ -2906,11 +2911,10 @@ void KICAD_PLUGIN::saveSETUP() const ...@@ -2906,11 +2911,10 @@ void KICAD_PLUGIN::saveSETUP() const
fprintf( m_fp, "AuxiliaryAxisOrg %s\n", fmtBIUPoint( m_board->GetOriginAxisPosition() ).c_str() ); fprintf( m_fp, "AuxiliaryAxisOrg %s\n", fmtBIUPoint( m_board->GetOriginAxisPosition() ).c_str() );
/* @todo no globals
{ {
STRING_FORMATTER sf; STRING_FORMATTER sf;
g_PcbPlotOptions.Format( &sf, 0 ); m_board->GetPlotOptions().Format( &sf, 0 );
wxString record = FROM_UTF8( sf.GetString().c_str() ); wxString record = FROM_UTF8( sf.GetString().c_str() );
...@@ -2919,7 +2923,6 @@ void KICAD_PLUGIN::saveSETUP() const ...@@ -2919,7 +2923,6 @@ void KICAD_PLUGIN::saveSETUP() const
fprintf( m_fp, "PcbPlotParams %s\n", TO_UTF8( record ) ); fprintf( m_fp, "PcbPlotParams %s\n", TO_UTF8( record ) );
} }
*/
fprintf( m_fp, "VisibleElements %X\n", bds.GetVisibleElements() ); fprintf( m_fp, "VisibleElements %X\n", bds.GetVisibleElements() );
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
#ifndef MODULE_EDITOR_FRAME_H_ #ifndef MODULE_EDITOR_FRAME_H_
#define MODULE_EDITOR_FRAME_H_ #define MODULE_EDITOR_FRAME_H_
#include <wxBasePcbFrame.h>
class FOOTPRINT_EDIT_FRAME : public PCB_BASE_FRAME class FOOTPRINT_EDIT_FRAME : public PCB_BASE_FRAME
{ {
...@@ -20,9 +21,12 @@ public: ...@@ -20,9 +21,12 @@ public:
~FOOTPRINT_EDIT_FRAME(); ~FOOTPRINT_EDIT_FRAME();
BOARD_DESIGN_SETTINGS& GetDesignSettings() const; // overload PCB_BASE_FRAME, get parent's BOARD_DESIGN_SETTINGS& GetDesignSettings() const; // overload PCB_BASE_FRAME, get parent's
void SetDesignSettings( const BOARD_DESIGN_SETTINGS& aSettings ); // overload void SetDesignSettings( const BOARD_DESIGN_SETTINGS& aSettings ); // overload
const PCB_PLOT_PARAMS& GetPlotSettings() const; // overload PCB_BASE_FRAME, get parent's
void SetPlotSettings( const PCB_PLOT_PARAMS& aSettings ); // overload
void InstallOptionsFrame( const wxPoint& pos ); void InstallOptionsFrame( const wxPoint& pos );
void OnCloseWindow( wxCloseEvent& Event ); void OnCloseWindow( wxCloseEvent& Event );
......
...@@ -265,6 +265,30 @@ void FOOTPRINT_EDIT_FRAME::SetDesignSettings( const BOARD_DESIGN_SETTINGS& aSett ...@@ -265,6 +265,30 @@ void FOOTPRINT_EDIT_FRAME::SetDesignSettings( const BOARD_DESIGN_SETTINGS& aSett
} }
const PCB_PLOT_PARAMS& FOOTPRINT_EDIT_FRAME::GetPlotSettings() const
{
// get the settings from the parent editor, not our BOARD.
PCB_BASE_FRAME* parentFrame = (PCB_BASE_FRAME*) GetParent();
wxASSERT( parentFrame );
return parentFrame->GetPlotSettings();
}
void FOOTPRINT_EDIT_FRAME::SetPlotSettings( const PCB_PLOT_PARAMS& aSettings )
{
// set the settings into parent editor, not our BOARD.
PCB_BASE_FRAME* parentFrame = (PCB_BASE_FRAME*) GetParent();
wxASSERT( parentFrame );
parentFrame->SetPlotSettings( aSettings );
}
void FOOTPRINT_EDIT_FRAME::OnCloseWindow( wxCloseEvent& Event ) void FOOTPRINT_EDIT_FRAME::OnCloseWindow( wxCloseEvent& Event )
{ {
if( GetScreen()->IsModify() ) if( GetScreen()->IsModify() )
......
...@@ -41,9 +41,14 @@ ...@@ -41,9 +41,14 @@
#define HPGL_PEN_OVERLAY_MIN 0 #define HPGL_PEN_OVERLAY_MIN 0
#define HPGL_PEN_OVERLAY_MAX 0x100 #define HPGL_PEN_OVERLAY_MAX 0x100
extern int g_DrawDefaultLineThickness;
PCB_PLOT_PARAMS g_PcbPlotOptions; /**
* Default line thickness in PCnew units used to draw or plot items having a
* default thickness line value (Frame references) (i.e. = 0 ).
* 0 = single pixel line width.
*/
int g_DrawDefaultLineThickness = 60;
using namespace PCBPLOTPARAMS_T; using namespace PCBPLOTPARAMS_T;
...@@ -109,7 +114,7 @@ PCB_PLOT_PARAMS::PCB_PLOT_PARAMS() ...@@ -109,7 +114,7 @@ PCB_PLOT_PARAMS::PCB_PLOT_PARAMS()
void PCB_PLOT_PARAMS::Format( OUTPUTFORMATTER* aFormatter, void PCB_PLOT_PARAMS::Format( OUTPUTFORMATTER* aFormatter,
int aNestLevel ) const throw( IO_ERROR ) int aNestLevel, int aControl ) const throw( IO_ERROR )
{ {
const char* falseStr = getTokenName( T_false ); const char* falseStr = getTokenName( T_false );
const char* trueStr = getTokenName( T_true ); const char* trueStr = getTokenName( T_true );
......
...@@ -28,6 +28,8 @@ ...@@ -28,6 +28,8 @@
#include <base_struct.h> #include <base_struct.h>
class PCB_PLOT_PARAMS_PARSER; class PCB_PLOT_PARAMS_PARSER;
class LINE_READER;
/** /**
* Class PCB_PLOT_PARAMS * Class PCB_PLOT_PARAMS
...@@ -99,7 +101,7 @@ private: ...@@ -99,7 +101,7 @@ private:
public: public:
PCB_PLOT_PARAMS(); PCB_PLOT_PARAMS();
void Format( OUTPUTFORMATTER* aFormatter, int aNestLevel ) const throw( IO_ERROR ); void Format( OUTPUTFORMATTER* aFormatter, int aNestLevel, int aControl=0 ) const throw( IO_ERROR );
void Parse( PCB_PLOT_PARAMS_PARSER* aParser ) throw( IO_ERROR, PARSE_ERROR ); void Parse( PCB_PLOT_PARAMS_PARSER* aParser ) throw( IO_ERROR, PARSE_ERROR );
bool operator==( const PCB_PLOT_PARAMS &aPcbPlotParams ) const; bool operator==( const PCB_PLOT_PARAMS &aPcbPlotParams ) const;
...@@ -157,6 +159,12 @@ public: ...@@ -157,6 +159,12 @@ public:
}; };
extern PCB_PLOT_PARAMS g_PcbPlotOptions; /**
* Default line thickness in PCnew units used to draw or plot items having a
* default thickness line value (Frame references) (i.e. = 0 ).
* 0 = single pixel line width.
*/
extern int g_DrawDefaultLineThickness;
#endif // PCB_PLOT_PARAMS_H_ #endif // PCB_PLOT_PARAMS_H_
...@@ -54,8 +54,6 @@ ...@@ -54,8 +54,6 @@
#include <dialog_helpers.h> #include <dialog_helpers.h>
extern int g_DrawDefaultLineThickness;
// Keys used in read/write config // Keys used in read/write config
#define OPTKEY_DEFAULT_LINEWIDTH_VALUE wxT( "PlotLineWidth" ) #define OPTKEY_DEFAULT_LINEWIDTH_VALUE wxT( "PlotLineWidth" )
#define PCB_SHOW_FULL_RATSNET_OPT wxT( "PcbFulRatsnest" ) #define PCB_SHOW_FULL_RATSNET_OPT wxT( "PcbFulRatsnest" )
......
...@@ -49,10 +49,6 @@ ...@@ -49,10 +49,6 @@
// Colors for layers and items // Colors for layers and items
COLORS_DESIGN_SETTINGS g_ColorsSettings; COLORS_DESIGN_SETTINGS g_ColorsSettings;
int g_DrawDefaultLineThickness = 60; /* Default line thickness in PCnew units used to draw
* or plot items having a default thickness line value
* (Frame references) (i.e. = 0 ). 0 = single pixel line
* width */
bool Drc_On = true; bool Drc_On = true;
bool g_AutoDeleteOldTrack = true; bool g_AutoDeleteOldTrack = true;
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
#include <dialog_plot_base.h> #include <dialog_plot_base.h>
#include <pcb_plot_params.h> #include <pcb_plot_params.h>
/* Keywords to r/w options in m_Config */ /* Keywords to r/w options in m_config */
#define CONFIG_XFINESCALE_ADJ wxT( "PlotXFineScaleAdj" ) #define CONFIG_XFINESCALE_ADJ wxT( "PlotXFineScaleAdj" )
#define CONFIG_YFINESCALE_ADJ wxT( "PlotYFineScaleAdj" ) #define CONFIG_YFINESCALE_ADJ wxT( "PlotYFineScaleAdj" )
#define CONFIG_PS_FINEWIDTH_ADJ wxT( "PSPlotFineWidthAdj" ) #define CONFIG_PS_FINEWIDTH_ADJ wxT( "PSPlotFineWidthAdj" )
...@@ -30,8 +30,6 @@ ...@@ -30,8 +30,6 @@
#define MIN_SCALE 0.01 #define MIN_SCALE 0.01
#define MAX_SCALE 100.0 #define MAX_SCALE 100.0
extern int g_DrawDefaultLineThickness;
static bool setDouble( double* aDouble, double aValue, double aMin, double aMax ) static bool setDouble( double* aDouble, double aValue, double aMin, double aMax )
{ {
...@@ -51,28 +49,30 @@ static bool setDouble( double* aDouble, double aValue, double aMin, double aMax ...@@ -51,28 +49,30 @@ static bool setDouble( double* aDouble, double aValue, double aMin, double aMax
} }
/*******************************/
/* Dialog box for plot control */
/*******************************/
/**
* Class DIALOG_PLOT
*
*/
class DIALOG_PLOT : public DIALOG_PLOT_BASE class DIALOG_PLOT : public DIALOG_PLOT_BASE
{ {
private:
PCB_EDIT_FRAME* m_Parent;
wxConfig* m_Config;
std::vector<int> layerList; // List to hold CheckListBox layer numbers
double m_XScaleAdjust;
double m_YScaleAdjust;
double m_PSWidthAdjust; // Global width correction for exact width postscript output.
double m_WidthAdjustMinValue; // Global width correction
double m_WidthAdjustMaxValue; // margins.
static wxPoint prevPosition; // Dialog position & size
static wxSize prevSize;
public: public:
DIALOG_PLOT( PCB_EDIT_FRAME* parent ); DIALOG_PLOT( PCB_EDIT_FRAME* parent );
private: private:
PCB_EDIT_FRAME* m_parent;
BOARD* m_board;
wxConfig* m_config;
std::vector<int> layerList; // List to hold CheckListBox layer numbers
double m_XScaleAdjust;
double m_YScaleAdjust;
double m_PSWidthAdjust; // Global width correction for exact width postscript output.
double m_WidthAdjustMinValue; // Global width correction
double m_WidthAdjustMaxValue; // margins.
PCB_PLOT_PARAMS m_plotOpts;
void Init_Dialog(); void Init_Dialog();
void Plot( wxCommandEvent& event ); void Plot( wxCommandEvent& event );
void OnQuit( wxCommandEvent& event ); void OnQuit( wxCommandEvent& event );
...@@ -85,27 +85,20 @@ private: ...@@ -85,27 +85,20 @@ private:
}; };
wxPoint DIALOG_PLOT::prevPosition( -1, -1 );
wxSize DIALOG_PLOT::prevSize;
const int UNITS_MILS = 1000; const int UNITS_MILS = 1000;
DIALOG_PLOT::DIALOG_PLOT( PCB_EDIT_FRAME* aParent ) :
DIALOG_PLOT::DIALOG_PLOT( PCB_EDIT_FRAME* parent ) : DIALOG_PLOT_BASE( aParent ),
DIALOG_PLOT_BASE( parent ) m_parent( aParent ),
m_board( aParent->GetBoard() ),
m_plotOpts( aParent->GetPlotSettings() )
{ {
m_Parent = parent; m_config = wxGetApp().GetSettings();
m_Config = wxGetApp().GetSettings();
Init_Dialog(); Init_Dialog();
GetSizer()->Fit( this ); GetSizer()->Fit( this );
GetSizer()->SetSizeHints( this ); GetSizer()->SetSizeHints( this );
if( prevPosition.x != -1 )
SetSize( prevPosition.x, prevPosition.y, prevSize.x, prevSize.y );
else
Center();
} }
...@@ -114,42 +107,40 @@ void DIALOG_PLOT::Init_Dialog() ...@@ -114,42 +107,40 @@ void DIALOG_PLOT::Init_Dialog()
wxString msg; wxString msg;
wxFileName fileName; wxFileName fileName;
BOARD* board = m_Parent->GetBoard(); m_config->Read( CONFIG_XFINESCALE_ADJ, &m_XScaleAdjust );
m_config->Read( CONFIG_YFINESCALE_ADJ, &m_YScaleAdjust );
m_Config->Read( CONFIG_XFINESCALE_ADJ, &m_XScaleAdjust ); m_config->Read( CONFIG_PS_FINEWIDTH_ADJ, &m_PSWidthAdjust);
m_Config->Read( CONFIG_YFINESCALE_ADJ, &m_YScaleAdjust );
m_Config->Read( CONFIG_PS_FINEWIDTH_ADJ, &m_PSWidthAdjust);
// The reasonable width correction value must be in a range of // The reasonable width correction value must be in a range of
// [-(MinTrackWidth-1), +(MinClearanceValue-1)] decimils. // [-(MinTrackWidth-1), +(MinClearanceValue-1)] decimils.
m_WidthAdjustMinValue = -(board->GetDesignSettings().m_TrackMinWidth - 1); m_WidthAdjustMinValue = -(m_board->GetDesignSettings().m_TrackMinWidth - 1);
m_WidthAdjustMaxValue = board->GetSmallestClearanceValue() - 1; m_WidthAdjustMaxValue = m_board->GetSmallestClearanceValue() - 1;
m_plotFormatOpt->SetSelection( g_PcbPlotOptions.GetPlotFormat() ); m_plotFormatOpt->SetSelection( m_plotOpts.GetPlotFormat() );
// Set units and value for HPGL pen size. // Set units and value for HPGL pen size.
AddUnitSymbol( *m_textPenSize, g_UserUnit ); AddUnitSymbol( *m_textPenSize, g_UserUnit );
msg = ReturnStringFromValue( g_UserUnit, g_PcbPlotOptions.GetHpglPenDiameter(), UNITS_MILS ); msg = ReturnStringFromValue( g_UserUnit, m_plotOpts.GetHpglPenDiameter(), UNITS_MILS );
m_HPGLPenSizeOpt->AppendText( msg ); m_HPGLPenSizeOpt->AppendText( msg );
// Set units to cm/s for standard HPGL pen speed. // Set units to cm/s for standard HPGL pen speed.
msg = ReturnStringFromValue( UNSCALED_UNITS, g_PcbPlotOptions.GetHpglPenSpeed(), 1 ); msg = ReturnStringFromValue( UNSCALED_UNITS, m_plotOpts.GetHpglPenSpeed(), 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, g_PcbPlotOptions.GetHpglPenOverlay(), UNITS_MILS ); msg = ReturnStringFromValue( g_UserUnit, m_plotOpts.GetHpglPenOverlay(), UNITS_MILS );
m_HPGLPenOverlayOpt->AppendText( msg ); m_HPGLPenOverlayOpt->AppendText( msg );
AddUnitSymbol( *m_textDefaultPenSize, g_UserUnit ); AddUnitSymbol( *m_textDefaultPenSize, g_UserUnit );
msg = ReturnStringFromValue( g_UserUnit, g_PcbPlotOptions.GetPlotLineWidth(), msg = ReturnStringFromValue( g_UserUnit, m_plotOpts.GetPlotLineWidth(),
PCB_INTERNAL_UNIT ); PCB_INTERNAL_UNIT );
m_linesWidth->AppendText( msg ); m_linesWidth->AppendText( msg );
// Set units for PS global width correction. // Set units for PS global width correction.
AddUnitSymbol( *m_textPSFineAdjustWidth, g_UserUnit ); AddUnitSymbol( *m_textPSFineAdjustWidth, g_UserUnit );
m_useAuxOriginCheckBox->SetValue( g_PcbPlotOptions.GetUseAuxOrigin() ); m_useAuxOriginCheckBox->SetValue( m_plotOpts.GetUseAuxOrigin() );
// Test for a reasonable scale value. Set to 1 if problem // Test for a reasonable scale value. Set to 1 if problem
if( m_XScaleAdjust < MIN_SCALE || m_YScaleAdjust < MIN_SCALE if( m_XScaleAdjust < MIN_SCALE || m_YScaleAdjust < MIN_SCALE
...@@ -169,8 +160,8 @@ void DIALOG_PLOT::Init_Dialog() ...@@ -169,8 +160,8 @@ void DIALOG_PLOT::Init_Dialog()
msg.Printf( wxT( "%f" ), To_User_Unit( g_UserUnit, m_PSWidthAdjust, PCB_INTERNAL_UNIT ) ); msg.Printf( wxT( "%f" ), To_User_Unit( g_UserUnit, m_PSWidthAdjust, PCB_INTERNAL_UNIT ) );
m_PSFineAdjustWidthOpt->AppendText( msg ); m_PSFineAdjustWidthOpt->AppendText( msg );
m_plotPSNegativeOpt->SetValue( g_PcbPlotOptions.m_PlotPSNegative ); m_plotPSNegativeOpt->SetValue( m_plotOpts.m_PlotPSNegative );
m_forcePSA4OutputOpt->SetValue( g_PcbPlotOptions.GetPsA4Output() ); m_forcePSA4OutputOpt->SetValue( m_plotOpts.GetPsA4Output() );
// 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)
...@@ -183,28 +174,28 @@ void DIALOG_PLOT::Init_Dialog() ...@@ -183,28 +174,28 @@ void DIALOG_PLOT::Init_Dialog()
wxASSERT( layer < NB_LAYERS ); wxASSERT( layer < NB_LAYERS );
if( !board->IsLayerEnabled( layer ) ) if( !m_board->IsLayerEnabled( layer ) )
continue; continue;
layerList.push_back( layer ); layerList.push_back( layer );
checkIndex = m_layerCheckListBox->Append( board->GetLayerName( layer ) ); checkIndex = m_layerCheckListBox->Append( m_board->GetLayerName( layer ) );
if( g_PcbPlotOptions.GetLayerSelection() & ( 1 << layer ) ) if( m_plotOpts.GetLayerSelection() & ( 1 << layer ) )
m_layerCheckListBox->Check( checkIndex ); m_layerCheckListBox->Check( checkIndex );
} }
// Option for using proper Gerber extensions // Option for using proper Gerber extensions
m_useGerberExtensions->SetValue( g_PcbPlotOptions.GetUseGerberExtensions() ); m_useGerberExtensions->SetValue( m_plotOpts.GetUseGerberExtensions() );
// Option for excluding contents of "Edges Pcb" layer // Option for excluding contents of "Edges Pcb" layer
m_excludeEdgeLayerOpt->SetValue( g_PcbPlotOptions.m_ExcludeEdgeLayer ); m_excludeEdgeLayerOpt->SetValue( m_plotOpts.m_ExcludeEdgeLayer );
m_subtractMaskFromSilk->SetValue( g_PcbPlotOptions.GetSubtractMaskFromSilk() ); m_subtractMaskFromSilk->SetValue( m_plotOpts.GetSubtractMaskFromSilk() );
// Option to plot page references: // Option to plot page references:
if( m_Parent->GetPrintBorderAndTitleBlock() ) if( m_parent->GetPrintBorderAndTitleBlock() )
{ {
m_plotSheetRef->SetValue( g_PcbPlotOptions.m_PlotFrameRef ); m_plotSheetRef->SetValue( m_plotOpts.m_PlotFrameRef );
} }
else else
{ {
...@@ -213,39 +204,36 @@ void DIALOG_PLOT::Init_Dialog() ...@@ -213,39 +204,36 @@ void DIALOG_PLOT::Init_Dialog()
} }
// Option to plot pads on silkscreen layers or all layers // Option to plot pads on silkscreen layers or all layers
m_plotPads_on_Silkscreen->SetValue( g_PcbPlotOptions.m_PlotPadsOnSilkLayer ); m_plotPads_on_Silkscreen->SetValue( m_plotOpts.m_PlotPadsOnSilkLayer );
// Options to plot texts on footprints // Options to plot texts on footprints
m_plotModuleValueOpt->SetValue( g_PcbPlotOptions.m_PlotValue ); m_plotModuleValueOpt->SetValue( m_plotOpts.m_PlotValue );
m_plotModuleRefOpt->SetValue( g_PcbPlotOptions.m_PlotReference ); m_plotModuleRefOpt->SetValue( m_plotOpts.m_PlotReference );
m_plotTextOther->SetValue( g_PcbPlotOptions.m_PlotTextOther ); m_plotTextOther->SetValue( m_plotOpts.m_PlotTextOther );
m_plotInvisibleText->SetValue( g_PcbPlotOptions.m_PlotInvisibleTexts ); m_plotInvisibleText->SetValue( m_plotOpts.m_PlotInvisibleTexts );
// Options to plot pads and vias holes // Options to plot pads and vias holes
m_drillShapeOpt->SetSelection( g_PcbPlotOptions.m_DrillShapeOpt ); m_drillShapeOpt->SetSelection( m_plotOpts.m_DrillShapeOpt );
// Scale option // Scale option
m_scaleOpt->SetSelection( g_PcbPlotOptions.GetScaleSelection() ); m_scaleOpt->SetSelection( m_plotOpts.GetScaleSelection() );
// Plot mode // Plot mode
m_plotModeOpt->SetSelection( g_PcbPlotOptions.m_PlotMode ); m_plotModeOpt->SetSelection( m_plotOpts.m_PlotMode );
// Plot mirror option // Plot mirror option
m_plotMirrorOpt->SetValue( g_PcbPlotOptions.m_PlotMirror ); m_plotMirrorOpt->SetValue( m_plotOpts.m_PlotMirror );
// Put vias on mask layer // Put vias on mask layer
m_plotNoViaOnMaskOpt->SetValue( g_PcbPlotOptions.m_PlotViaOnMaskLayer ); m_plotNoViaOnMaskOpt->SetValue( m_plotOpts.m_PlotViaOnMaskLayer );
// Output directory // Output directory
m_outputDirectoryName->SetValue( g_PcbPlotOptions.GetOutputDirectory() ); m_outputDirectoryName->SetValue( m_plotOpts.GetOutputDirectory() );
// Update options values: // Update options values:
wxCommandEvent cmd_event; wxCommandEvent cmd_event;
SetPlotFormat( cmd_event ); SetPlotFormat( cmd_event );
OnSetScaleOpt( cmd_event ); OnSetScaleOpt( cmd_event );
// without this line, the ESC key does not work
SetFocus();
} }
...@@ -257,17 +245,14 @@ void DIALOG_PLOT::OnQuit( wxCommandEvent& event ) ...@@ -257,17 +245,14 @@ void DIALOG_PLOT::OnQuit( wxCommandEvent& event )
void DIALOG_PLOT::OnClose( wxCloseEvent& event ) void DIALOG_PLOT::OnClose( wxCloseEvent& event )
{ {
prevPosition = GetPosition();
prevSize = GetSize();
applyPlotSettings(); applyPlotSettings();
EndModal( 0 ); EndModal( 0 );
} }
void DIALOG_PLOT::CreateDrillFile( wxCommandEvent& event ) void DIALOG_PLOT::CreateDrillFile( wxCommandEvent& event )
{ {
( (PCB_EDIT_FRAME*) m_Parent )->InstallDrillFrame( event ); ( (PCB_EDIT_FRAME*) m_parent )->InstallDrillFrame( event );
} }
...@@ -307,7 +292,7 @@ void DIALOG_PLOT::OnOutputDirectoryBrowseClicked( wxCommandEvent& event ) ...@@ -307,7 +292,7 @@ void DIALOG_PLOT::OnOutputDirectoryBrowseClicked( wxCommandEvent& event )
wxYES_NO | wxICON_QUESTION | wxYES_DEFAULT ); wxYES_NO | wxICON_QUESTION | wxYES_DEFAULT );
if( dialog.ShowModal() == wxID_YES ) { if( dialog.ShowModal() == wxID_YES ) {
wxString boardFilePath = ( (wxFileName) m_Parent->GetScreen()->GetFileName()).GetPath(); wxString boardFilePath = ( (wxFileName) m_parent->GetScreen()->GetFileName()).GetPath();
if( !dirName.MakeRelativeTo( boardFilePath ) ) if( !dirName.MakeRelativeTo( boardFilePath ) )
wxMessageBox( _( "Cannot make path relative (target volume different from board file volume)!" ), wxMessageBox( _( "Cannot make path relative (target volume different from board file volume)!" ),
...@@ -525,7 +510,7 @@ void DIALOG_PLOT::applyPlotSettings() ...@@ -525,7 +510,7 @@ void DIALOG_PLOT::applyPlotSettings()
m_messagesBox->AppendText( msg ); m_messagesBox->AppendText( msg );
} }
m_Config->Write( CONFIG_XFINESCALE_ADJ, m_XScaleAdjust ); m_config->Write( CONFIG_XFINESCALE_ADJ, m_XScaleAdjust );
// Y scale // Y scale
msg = m_fineAdjustYscaleOpt->GetValue(); msg = m_fineAdjustYscaleOpt->GetValue();
...@@ -539,7 +524,7 @@ void DIALOG_PLOT::applyPlotSettings() ...@@ -539,7 +524,7 @@ void DIALOG_PLOT::applyPlotSettings()
m_messagesBox->AppendText( msg ); m_messagesBox->AppendText( msg );
} }
m_Config->Write( CONFIG_YFINESCALE_ADJ, m_YScaleAdjust ); m_config->Write( CONFIG_YFINESCALE_ADJ, m_YScaleAdjust );
// PS Width correction // PS Width correction
msg = m_PSFineAdjustWidthOpt->GetValue(); msg = m_PSFineAdjustWidthOpt->GetValue();
...@@ -558,7 +543,7 @@ void DIALOG_PLOT::applyPlotSettings() ...@@ -558,7 +543,7 @@ void DIALOG_PLOT::applyPlotSettings()
m_messagesBox->AppendText( msg ); m_messagesBox->AppendText( msg );
} }
m_Config->Write( CONFIG_PS_FINEWIDTH_ADJ, m_PSWidthAdjust ); m_config->Write( CONFIG_PS_FINEWIDTH_ADJ, m_PSWidthAdjust );
tempOptions.SetUseGerberExtensions( m_useGerberExtensions->GetValue() ); tempOptions.SetUseGerberExtensions( m_useGerberExtensions->GetValue() );
...@@ -583,10 +568,11 @@ void DIALOG_PLOT::applyPlotSettings() ...@@ -583,10 +568,11 @@ void DIALOG_PLOT::applyPlotSettings()
dirStr.Replace( wxT( "\\" ), wxT( "/" ) ); dirStr.Replace( wxT( "\\" ), wxT( "/" ) );
tempOptions.SetOutputDirectory( dirStr ); tempOptions.SetOutputDirectory( dirStr );
if( g_PcbPlotOptions != tempOptions ) if( m_plotOpts != tempOptions )
{ {
g_PcbPlotOptions = tempOptions; m_parent->SetPlotSettings( tempOptions );
m_Parent->OnModify(); m_plotOpts = tempOptions;
m_parent->OnModify();
} }
} }
...@@ -597,13 +583,11 @@ void DIALOG_PLOT::Plot( wxCommandEvent& event ) ...@@ -597,13 +583,11 @@ void DIALOG_PLOT::Plot( wxCommandEvent& event )
wxFileName fn; wxFileName fn;
wxString ext; wxString ext;
BOARD* board = m_Parent->GetBoard();
applyPlotSettings(); applyPlotSettings();
// Create output directory if it does not exist // Create output directory if it does not exist
wxFileName outputDir = wxFileName::DirName( g_PcbPlotOptions.GetOutputDirectory() ); wxFileName outputDir = wxFileName::DirName( m_plotOpts.GetOutputDirectory() );
wxString boardFilePath = ( (wxFileName) m_Parent->GetScreen()->GetFileName()).GetPath(); wxString boardFilePath = ( (wxFileName) m_parent->GetScreen()->GetFileName()).GetPath();
if( !outputDir.MakeAbsolute( boardFilePath ) ) if( !outputDir.MakeAbsolute( boardFilePath ) )
{ {
...@@ -631,28 +615,28 @@ void DIALOG_PLOT::Plot( wxCommandEvent& event ) ...@@ -631,28 +615,28 @@ void DIALOG_PLOT::Plot( wxCommandEvent& event )
} }
} }
g_PcbPlotOptions.m_AutoScale = false; m_plotOpts.m_AutoScale = false;
g_PcbPlotOptions.m_PlotScale = 1; m_plotOpts.m_PlotScale = 1;
switch( g_PcbPlotOptions.GetScaleSelection() ) switch( m_plotOpts.GetScaleSelection() )
{ {
default: default:
break; break;
case 0: case 0:
g_PcbPlotOptions.m_AutoScale = true; m_plotOpts.m_AutoScale = true;
break; break;
case 2: case 2:
g_PcbPlotOptions.m_PlotScale = 1.5; m_plotOpts.m_PlotScale = 1.5;
break; break;
case 3: case 3:
g_PcbPlotOptions.m_PlotScale = 2; m_plotOpts.m_PlotScale = 2;
break; break;
case 4: case 4:
g_PcbPlotOptions.m_PlotScale = 3; m_plotOpts.m_PlotScale = 3;
break; break;
} }
...@@ -662,22 +646,22 @@ void DIALOG_PLOT::Plot( wxCommandEvent& event ) ...@@ -662,22 +646,22 @@ void DIALOG_PLOT::Plot( wxCommandEvent& event )
* settings resulting in a divide by zero fault. * settings resulting in a divide by zero fault.
*/ */
if( m_fineAdjustXscaleOpt->IsEnabled() && m_XScaleAdjust != 0.0 ) if( m_fineAdjustXscaleOpt->IsEnabled() && m_XScaleAdjust != 0.0 )
g_PcbPlotOptions.m_FineScaleAdjustX = m_XScaleAdjust; m_plotOpts.m_FineScaleAdjustX = m_XScaleAdjust;
if( m_fineAdjustYscaleOpt->IsEnabled() && m_YScaleAdjust != 0.0 ) if( m_fineAdjustYscaleOpt->IsEnabled() && m_YScaleAdjust != 0.0 )
g_PcbPlotOptions.m_FineScaleAdjustY = m_YScaleAdjust; m_plotOpts.m_FineScaleAdjustY = m_YScaleAdjust;
if( m_PSFineAdjustWidthOpt->IsEnabled() ) if( m_PSFineAdjustWidthOpt->IsEnabled() )
g_PcbPlotOptions.m_FineWidthAdjust = m_PSWidthAdjust; m_plotOpts.m_FineWidthAdjust = m_PSWidthAdjust;
switch( g_PcbPlotOptions.GetPlotFormat() ) switch( m_plotOpts.GetPlotFormat() )
{ {
case PLOT_FORMAT_POST: case PLOT_FORMAT_POST:
ext = wxT( "ps" ); ext = wxT( "ps" );
break; break;
case PLOT_FORMAT_GERBER: case PLOT_FORMAT_GERBER:
g_PcbPlotOptions.m_PlotScale = 1.0; // No scale option allowed in gerber format m_plotOpts.m_PlotScale = 1.0; // No scale option allowed in gerber format
ext = wxT( "pho" ); ext = wxT( "pho" );
break; break;
...@@ -686,39 +670,41 @@ void DIALOG_PLOT::Plot( wxCommandEvent& event ) ...@@ -686,39 +670,41 @@ void DIALOG_PLOT::Plot( wxCommandEvent& event )
break; break;
case PLOT_FORMAT_DXF: case PLOT_FORMAT_DXF:
g_PcbPlotOptions.m_PlotScale = 1.0; m_plotOpts.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_PcbPlotOptions.m_PlotScale < MIN_SCALE ) if( m_plotOpts.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_PcbPlotOptions.m_PlotScale > MAX_SCALE ) if( m_plotOpts.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" ) );
m_parent->SetPlotSettings( m_plotOpts );
long layerMask = 1; long layerMask = 1;
for( layer = 0; layer < NB_LAYERS; layer++, layerMask <<= 1 ) for( layer = 0; layer < NB_LAYERS; layer++, layerMask <<= 1 )
{ {
bool success = false; bool success = false;
if( g_PcbPlotOptions.GetLayerSelection() & layerMask ) if( m_plotOpts.GetLayerSelection() & layerMask )
{ {
fn = m_Parent->GetScreen()->GetFileName(); fn = m_parent->GetScreen()->GetFileName();
fn.SetPath( outputDir.GetPath() ); fn.SetPath( outputDir.GetPath() );
// Create file name. // Create file name.
wxString layername = board->GetLayerName( layer ); wxString layername = m_board->GetLayerName( layer );
layername.Trim( true ); layername.Trim( false ); // remove leading and trailing spaces if any layername.Trim( true ); layername.Trim( false ); // remove leading and trailing spaces if any
fn.SetName( fn.GetName() + wxT( "-" ) + layername ); fn.SetName( fn.GetName() + wxT( "-" ) + layername );
// 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( ( g_PcbPlotOptions.GetPlotFormat() == PLOT_FORMAT_GERBER ) if( ( m_plotOpts.GetPlotFormat() == PLOT_FORMAT_GERBER )
&& m_useGerberExtensions->GetValue() ) && m_useGerberExtensions->GetValue() )
{ {
switch( layer ) switch( layer )
...@@ -799,28 +785,28 @@ void DIALOG_PLOT::Plot( wxCommandEvent& event ) ...@@ -799,28 +785,28 @@ void DIALOG_PLOT::Plot( wxCommandEvent& event )
fn.SetExt( ext ); fn.SetExt( ext );
} }
switch( g_PcbPlotOptions.GetPlotFormat() ) switch( m_plotOpts.GetPlotFormat() )
{ {
case PLOT_FORMAT_POST: case PLOT_FORMAT_POST:
success = m_Parent->ExportToPostScriptFile( fn.GetFullPath(), layer, success = m_parent->ExportToPostScriptFile( fn.GetFullPath(), layer,
g_PcbPlotOptions.GetPsA4Output(), m_plotOpts.GetPsA4Output(),
g_PcbPlotOptions.m_PlotMode ); m_plotOpts.m_PlotMode );
break; break;
case PLOT_FORMAT_GERBER: case PLOT_FORMAT_GERBER:
success = m_Parent->ExportToGerberFile( fn.GetFullPath(), layer, success = m_parent->ExportToGerberFile( fn.GetFullPath(), layer,
g_PcbPlotOptions.GetUseAuxOrigin(), m_plotOpts.GetUseAuxOrigin(),
g_PcbPlotOptions.m_PlotMode ); m_plotOpts.m_PlotMode );
break; break;
case PLOT_FORMAT_HPGL: case PLOT_FORMAT_HPGL:
success = m_Parent->ExportToHpglFile( fn.GetFullPath(), layer, success = m_parent->ExportToHpglFile( fn.GetFullPath(), layer,
g_PcbPlotOptions.m_PlotMode ); m_plotOpts.m_PlotMode );
break; break;
case PLOT_FORMAT_DXF: case PLOT_FORMAT_DXF:
success = m_Parent->ExportToDxfFile( fn.GetFullPath(), layer, success = m_parent->ExportToDxfFile( fn.GetFullPath(), layer,
g_PcbPlotOptions.m_PlotMode ); m_plotOpts.m_PlotMode );
break; break;
} }
...@@ -839,7 +825,7 @@ void DIALOG_PLOT::Plot( wxCommandEvent& event ) ...@@ -839,7 +825,7 @@ void DIALOG_PLOT::Plot( wxCommandEvent& event )
// If no layer selected, we have nothing plotted. // If no layer selected, we have nothing plotted.
// Prompt user if it happens because he could think there is a bug in Pcbnew. // Prompt user if it happens because he could think there is a bug in Pcbnew.
if( !g_PcbPlotOptions.GetLayerSelection() ) if( !m_plotOpts.GetLayerSelection() )
DisplayError( this, _( "No layer selected" ) ); DisplayError( this, _( "No layer selected" ) );
} }
......
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
* @file pcbnew/pcbplot.h * @file pcbnew/pcbplot.h
*/ */
#ifndef PCBPLOT_H #ifndef PCBPLOT_H_
#define PCBPLOT_H #define PCBPLOT_H_
#include "pcb_plot_params.h" #include <pcb_plot_params.h>
class PLOTTER; class PLOTTER;
...@@ -29,36 +29,34 @@ class ZONE_CONTAINER; ...@@ -29,36 +29,34 @@ class ZONE_CONTAINER;
// Conversion unit constants. // Conversion unit constants.
// Convert pcb dimension of 0.1 mil to PS units of inches. // Convert pcb dimension of 0.1 mil to PS units of inches.
#define SCALE_PS .0001 #define SCALE_PS .0001
// Convert dimension 0.1 mil -> HPGL units: // Convert dimension 0.1 mil -> HPGL units:
#define SCALE_HPGL 0.102041 #define SCALE_HPGL 0.102041
// 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
void PlotTextePcb( PLOTTER* plotter, TEXTE_PCB* pt_texte, int masque_layer, void PlotTextePcb( PLOTTER* plotter, const PCB_PLOT_PARAMS& aPlotOpts, TEXTE_PCB* pt_texte, int masque_layer,
EDA_DRAW_MODE_T trace_mode ); EDA_DRAW_MODE_T trace_mode );
/* Plat PCB text type, ie other than text on modules void PlotDrawSegment( PLOTTER* plotter, const PCB_PLOT_PARAMS& aPlotOpts, DRAWSEGMENT* PtSegm, int masque_layer,
* prepare the plot settings of text */
void PlotDrawSegment( PLOTTER* plotter, DRAWSEGMENT* PtSegm, int masque_layer,
EDA_DRAW_MODE_T trace_mode ); EDA_DRAW_MODE_T trace_mode );
void PlotDimension( PLOTTER* plotter, DIMENSION* Dimension, int masque_layer, void PlotDimension( PLOTTER* plotter, const PCB_PLOT_PARAMS& aPlotOpts, DIMENSION* Dimension, int masque_layer,
EDA_DRAW_MODE_T trace_mode ); EDA_DRAW_MODE_T trace_mode );
void PlotPcbTarget( PLOTTER* plotter, PCB_TARGET* PtMire, int masque_layer, void PlotPcbTarget( PLOTTER* plotter, const PCB_PLOT_PARAMS& aPlotOpts, PCB_TARGET* PtMire, int masque_layer,
EDA_DRAW_MODE_T trace_mode ); EDA_DRAW_MODE_T trace_mode );
void Plot_1_EdgeModule( PLOTTER* plotter, EDGE_MODULE* PtEdge, void Plot_1_EdgeModule( PLOTTER* plotter, const PCB_PLOT_PARAMS& aPlotOpts, EDGE_MODULE* PtEdge,
EDA_DRAW_MODE_T trace_mode, int masque_layer ); EDA_DRAW_MODE_T trace_mode, int masque_layer );
void PlotFilledAreas( PLOTTER* plotter, ZONE_CONTAINER* aZone, void PlotFilledAreas( PLOTTER* plotter, const PCB_PLOT_PARAMS& aPlotOpts, ZONE_CONTAINER* aZone,
EDA_DRAW_MODE_T trace_mode ); EDA_DRAW_MODE_T trace_mode );
// PLOTGERB.CPP // PLOTGERB.CPP
void SelectD_CODE_For_LineDraw( PLOTTER* plotter, int aSize ); void SelectD_CODE_For_LineDraw( PLOTTER* plotter, int aSize );
#endif // PCBPLOT_H_
#endif // #define PCBPLOT_H
...@@ -27,19 +27,21 @@ ...@@ -27,19 +27,21 @@
#include <pcbnew.h> #include <pcbnew.h>
#include <pcbplot.h> #include <pcbplot.h>
static void Plot_Edges_Modules( PLOTTER* plotter, BOARD* pcb, int aLayerMask, static void Plot_Edges_Modules( PLOTTER* aPlotter, const PCB_PLOT_PARAMS& aPlotOpts,
EDA_DRAW_MODE_T trace_mode ); BOARD* pcb, int aLayerMask, EDA_DRAW_MODE_T trace_mode );
static void PlotTextModule( PLOTTER* plotter, TEXTE_MODULE* pt_texte,
EDA_DRAW_MODE_T trace_mode ); static void PlotTextModule( PLOTTER* aPlotter, TEXTE_MODULE* pt_texte, EDA_DRAW_MODE_T trace_mode );
/* Creates the plot for silkscreen layers /* Creates the plot for silkscreen layers
*/ */
void PCB_BASE_FRAME::PlotSilkScreen( PLOTTER* plotter, int aLayerMask, EDA_DRAW_MODE_T trace_mode ) void PCB_BASE_FRAME::PlotSilkScreen( PLOTTER* aPlotter, int aLayerMask, EDA_DRAW_MODE_T trace_mode )
{ {
bool trace_val, trace_ref; bool trace_val, trace_ref;
TEXTE_MODULE* pt_texte; TEXTE_MODULE* pt_texte;
const PCB_PLOT_PARAMS& plot_opts = GetPlotSettings();
// Plot edge layer and graphic items // Plot edge layer and graphic items
for( EDA_ITEM* item = m_Pcb->m_Drawings; item; item = item->Next() ) for( EDA_ITEM* item = m_Pcb->m_Drawings; item; item = item->Next() )
...@@ -47,19 +49,19 @@ void PCB_BASE_FRAME::PlotSilkScreen( PLOTTER* plotter, int aLayerMask, EDA_DRAW_ ...@@ -47,19 +49,19 @@ void PCB_BASE_FRAME::PlotSilkScreen( PLOTTER* plotter, int aLayerMask, EDA_DRAW_
switch( item->Type() ) switch( item->Type() )
{ {
case PCB_LINE_T: case PCB_LINE_T:
PlotDrawSegment( plotter, (DRAWSEGMENT*) item, aLayerMask, trace_mode ); PlotDrawSegment( aPlotter, plot_opts, (DRAWSEGMENT*) item, aLayerMask, trace_mode );
break; break;
case PCB_TEXT_T: case PCB_TEXT_T:
PlotTextePcb( plotter, (TEXTE_PCB*) item, aLayerMask, trace_mode ); PlotTextePcb( aPlotter, plot_opts, (TEXTE_PCB*) item, aLayerMask, trace_mode );
break; break;
case PCB_DIMENSION_T: case PCB_DIMENSION_T:
PlotDimension( plotter, (DIMENSION*) item, aLayerMask, trace_mode ); PlotDimension( aPlotter, plot_opts, (DIMENSION*) item, aLayerMask, trace_mode );
break; break;
case PCB_TARGET_T: case PCB_TARGET_T:
PlotPcbTarget( plotter, (PCB_TARGET*) item, aLayerMask, trace_mode ); PlotPcbTarget( aPlotter, plot_opts, (PCB_TARGET*) item, aLayerMask, trace_mode );
break; break;
case PCB_MARKER_T: case PCB_MARKER_T:
...@@ -72,13 +74,13 @@ void PCB_BASE_FRAME::PlotSilkScreen( PLOTTER* plotter, int aLayerMask, EDA_DRAW_ ...@@ -72,13 +74,13 @@ void PCB_BASE_FRAME::PlotSilkScreen( PLOTTER* plotter, int aLayerMask, EDA_DRAW_
} }
// Plot footprint outlines : // Plot footprint outlines :
Plot_Edges_Modules( plotter, m_Pcb, aLayerMask, trace_mode ); Plot_Edges_Modules( aPlotter, plot_opts, m_Pcb, aLayerMask, trace_mode );
// Plot pads (creates pads outlines, for pads on silkscreen layers) // Plot pads (creates pads outlines, for pads on silkscreen layers)
int layersmask_plotpads = aLayerMask; int layersmask_plotpads = aLayerMask;
// Calculate the mask layers of allowed layers for pads // Calculate the mask layers of allowed layers for pads
if( !g_PcbPlotOptions.m_PlotPadsOnSilkLayer ) // Do not plot pads on silk screen layers if( !plot_opts.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 )
...@@ -96,24 +98,24 @@ void PCB_BASE_FRAME::PlotSilkScreen( PLOTTER* plotter, int aLayerMask, EDA_DRAW_ ...@@ -96,24 +98,24 @@ void PCB_BASE_FRAME::PlotSilkScreen( PLOTTER* plotter, int aLayerMask, EDA_DRAW_
switch( pad->GetShape() ) switch( pad->GetShape() )
{ {
case PAD_CIRCLE: case PAD_CIRCLE:
plotter->flash_pad_circle( shape_pos, pad->GetSize().x, LINE ); aPlotter->flash_pad_circle( shape_pos, pad->GetSize().x, LINE );
break; break;
case PAD_OVAL: case PAD_OVAL:
plotter->flash_pad_oval( shape_pos, pad->GetSize(), pad->GetOrientation(), LINE ); aPlotter->flash_pad_oval( shape_pos, pad->GetSize(), pad->GetOrientation(), LINE );
break; break;
case PAD_TRAPEZOID: case PAD_TRAPEZOID:
{ {
wxPoint coord[4]; wxPoint coord[4];
pad->BuildPadPolygon( coord, wxSize(0,0), 0 ); pad->BuildPadPolygon( coord, wxSize(0,0), 0 );
plotter->flash_pad_trapez( shape_pos, coord, pad->GetOrientation(), LINE ); aPlotter->flash_pad_trapez( shape_pos, coord, pad->GetOrientation(), LINE );
} }
break; break;
case PAD_RECT: case PAD_RECT:
default: default:
plotter->flash_pad_rect( shape_pos, pad->GetSize(), pad->GetOrientation(), LINE ); aPlotter->flash_pad_rect( shape_pos, pad->GetSize(), pad->GetOrientation(), LINE );
break; break;
} }
} }
...@@ -121,13 +123,13 @@ void PCB_BASE_FRAME::PlotSilkScreen( PLOTTER* plotter, int aLayerMask, EDA_DRAW_ ...@@ -121,13 +123,13 @@ void PCB_BASE_FRAME::PlotSilkScreen( PLOTTER* plotter, int aLayerMask, EDA_DRAW_
} }
// Plot footprints fields (ref, value ...) // Plot footprints fields (ref, value ...)
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_PcbPlotOptions.m_PlotValue; trace_val = plot_opts.m_PlotValue;
trace_ref = g_PcbPlotOptions.m_PlotReference; trace_ref = plot_opts.m_PlotReference;
TEXTE_MODULE* text = Module->m_Reference; TEXTE_MODULE* text = module->m_Reference;
unsigned textLayer = text->GetLayer(); unsigned textLayer = text->GetLayer();
if( textLayer >= 32 ) if( textLayer >= 32 )
...@@ -136,7 +138,7 @@ void PCB_BASE_FRAME::PlotSilkScreen( PLOTTER* plotter, int aLayerMask, EDA_DRAW_ ...@@ -136,7 +138,7 @@ void PCB_BASE_FRAME::PlotSilkScreen( PLOTTER* plotter, int aLayerMask, EDA_DRAW_
errMsg.Printf( _( "Your BOARD has a bad layer number of %u for \ errMsg.Printf( _( "Your BOARD has a bad layer number of %u for \
module\n %s's \"reference\" text." ), module\n %s's \"reference\" text." ),
textLayer, GetChars( Module->GetReference() ) ); textLayer, GetChars( module->GetReference() ) );
DisplayError( this, errMsg ); DisplayError( this, errMsg );
return; return;
} }
...@@ -144,10 +146,10 @@ module\n %s's \"reference\" text." ), ...@@ -144,10 +146,10 @@ module\n %s's \"reference\" text." ),
if( ( ( 1 << textLayer ) & aLayerMask ) == 0 ) if( ( ( 1 << textLayer ) & aLayerMask ) == 0 )
trace_ref = false; trace_ref = false;
if( !text->IsVisible() && !g_PcbPlotOptions.m_PlotInvisibleTexts ) if( !text->IsVisible() && !plot_opts.m_PlotInvisibleTexts )
trace_ref = false; trace_ref = false;
text = Module->m_Value; text = module->m_Value;
textLayer = text->GetLayer(); textLayer = text->GetLayer();
if( textLayer > 32 ) if( textLayer > 32 )
...@@ -156,7 +158,7 @@ module\n %s's \"reference\" text." ), ...@@ -156,7 +158,7 @@ module\n %s's \"reference\" text." ),
errMsg.Printf( _( "Your BOARD has a bad layer number of %u for \ errMsg.Printf( _( "Your BOARD has a bad layer number of %u for \
module\n %s's \"value\" text." ), module\n %s's \"value\" text." ),
textLayer, GetChars( Module->GetReference() ) ); textLayer, GetChars( module->GetReference() ) );
DisplayError( this, errMsg ); DisplayError( this, errMsg );
return; return;
} }
...@@ -164,27 +166,27 @@ module\n %s's \"value\" text." ), ...@@ -164,27 +166,27 @@ module\n %s's \"value\" text." ),
if( ( (1 << textLayer) & aLayerMask ) == 0 ) if( ( (1 << textLayer) & aLayerMask ) == 0 )
trace_val = false; trace_val = false;
if( !text->IsVisible() && !g_PcbPlotOptions.m_PlotInvisibleTexts ) if( !text->IsVisible() && !plot_opts.m_PlotInvisibleTexts )
trace_val = false; trace_val = false;
// Plot text fields, if allowed // Plot text fields, if allowed
if( trace_ref ) if( trace_ref )
PlotTextModule( plotter, Module->m_Reference, trace_mode ); PlotTextModule( aPlotter, module->m_Reference, trace_mode );
if( trace_val ) if( trace_val )
PlotTextModule( plotter, Module->m_Value, trace_mode ); PlotTextModule( aPlotter, module->m_Value, trace_mode );
for( pt_texte = (TEXTE_MODULE*) Module->m_Drawings.GetFirst(); for( pt_texte = (TEXTE_MODULE*) module->m_Drawings.GetFirst();
pt_texte != NULL; pt_texte != NULL;
pt_texte = pt_texte->Next() ) pt_texte = pt_texte->Next() )
{ {
if( pt_texte->Type() != PCB_MODULE_TEXT_T ) if( pt_texte->Type() != PCB_MODULE_TEXT_T )
continue; continue;
if( !g_PcbPlotOptions.m_PlotTextOther ) if( !plot_opts.m_PlotTextOther )
continue; continue;
if( !pt_texte->IsVisible() && !g_PcbPlotOptions.m_PlotInvisibleTexts ) if( !pt_texte->IsVisible() && !plot_opts.m_PlotInvisibleTexts )
continue; continue;
textLayer = pt_texte->GetLayer(); textLayer = pt_texte->GetLayer();
...@@ -195,7 +197,7 @@ module\n %s's \"value\" text." ), ...@@ -195,7 +197,7 @@ module\n %s's \"value\" text." ),
errMsg.Printf( _( "Your BOARD has a bad layer number of %u \ errMsg.Printf( _( "Your BOARD has a bad layer number of %u \
for module\n %s's \"module text\" text of %s." ), for module\n %s's \"module text\" text of %s." ),
textLayer, GetChars( Module->GetReference() ), textLayer, GetChars( module->GetReference() ),
GetChars( pt_texte->m_Text ) ); GetChars( pt_texte->m_Text ) );
DisplayError( this, errMsg ); DisplayError( this, errMsg );
return; return;
...@@ -204,7 +206,7 @@ for module\n %s's \"module text\" text of %s." ), ...@@ -204,7 +206,7 @@ for module\n %s's \"module text\" text of %s." ),
if( !( ( 1 << textLayer ) & aLayerMask ) ) if( !( ( 1 << textLayer ) & aLayerMask ) )
continue; continue;
PlotTextModule( plotter, pt_texte, trace_mode ); PlotTextModule( aPlotter, pt_texte, trace_mode );
} }
} }
...@@ -216,7 +218,7 @@ for module\n %s's \"module text\" text of %s." ), ...@@ -216,7 +218,7 @@ for module\n %s's \"module text\" text of %s." ),
if( ( ( 1 << edge_zone->GetLayer() ) & aLayerMask ) == 0 ) if( ( ( 1 << edge_zone->GetLayer() ) & aLayerMask ) == 0 )
continue; continue;
PlotFilledAreas( plotter, edge_zone, trace_mode ); PlotFilledAreas( aPlotter, plot_opts, edge_zone, trace_mode );
} }
// Plot segments used to fill zone areas (outdated, but here for old boards // Plot segments used to fill zone areas (outdated, but here for old boards
...@@ -226,12 +228,12 @@ for module\n %s's \"module text\" text of %s." ), ...@@ -226,12 +228,12 @@ for module\n %s's \"module text\" text of %s." ),
if( ( ( 1 << seg->GetLayer() ) & aLayerMask ) == 0 ) if( ( ( 1 << seg->GetLayer() ) & aLayerMask ) == 0 )
continue; continue;
plotter->thick_segment( seg->m_Start, seg->m_End, seg->m_Width, trace_mode ); aPlotter->thick_segment( seg->m_Start, seg->m_End, seg->m_Width, trace_mode );
} }
} }
static void PlotTextModule( PLOTTER* plotter, TEXTE_MODULE* pt_texte, EDA_DRAW_MODE_T trace_mode ) static void PlotTextModule( PLOTTER* aPlotter, TEXTE_MODULE* pt_texte, EDA_DRAW_MODE_T trace_mode )
{ {
wxSize size; wxSize size;
wxPoint pos; wxPoint pos;
...@@ -257,7 +259,7 @@ static void PlotTextModule( PLOTTER* plotter, TEXTE_MODULE* pt_texte, EDA_DRAW_M ...@@ -257,7 +259,7 @@ static void PlotTextModule( PLOTTER* plotter, TEXTE_MODULE* pt_texte, EDA_DRAW_M
// So we set bold flag to true // So we set bold flag to true
bool allow_bold = pt_texte->m_Bold || thickness; bool allow_bold = pt_texte->m_Bold || thickness;
plotter->text( pos, BLACK, aPlotter->text( pos, BLACK,
pt_texte->m_Text, pt_texte->m_Text,
orient, size, orient, size,
pt_texte->m_HJustify, pt_texte->m_VJustify, pt_texte->m_HJustify, pt_texte->m_VJustify,
...@@ -265,7 +267,7 @@ static void PlotTextModule( PLOTTER* plotter, TEXTE_MODULE* pt_texte, EDA_DRAW_M ...@@ -265,7 +267,7 @@ static void PlotTextModule( PLOTTER* plotter, TEXTE_MODULE* pt_texte, EDA_DRAW_M
} }
void PlotDimension( PLOTTER* plotter, DIMENSION* aDim, int aLayerMask, void PlotDimension( PLOTTER* aPlotter, const PCB_PLOT_PARAMS& aPlotOpts, DIMENSION* aDim, int aLayerMask,
EDA_DRAW_MODE_T trace_mode ) EDA_DRAW_MODE_T trace_mode )
{ {
if( (GetLayerMask( aDim->GetLayer() ) & aLayerMask) == 0 ) if( (GetLayerMask( aDim->GetLayer() ) & aLayerMask) == 0 )
...@@ -276,39 +278,39 @@ void PlotDimension( PLOTTER* plotter, DIMENSION* aDim, int aLayerMask, ...@@ -276,39 +278,39 @@ void PlotDimension( PLOTTER* plotter, DIMENSION* aDim, int aLayerMask,
draw.SetWidth( (trace_mode==LINE) ? -1 : aDim->GetWidth() ); draw.SetWidth( (trace_mode==LINE) ? -1 : aDim->GetWidth() );
draw.SetLayer( aDim->GetLayer() ); draw.SetLayer( aDim->GetLayer() );
PlotTextePcb( plotter, &aDim->m_Text, aLayerMask, trace_mode ); PlotTextePcb( aPlotter, aPlotOpts, &aDim->m_Text, aLayerMask, trace_mode );
draw.SetStart( wxPoint( aDim->m_crossBarOx, aDim->m_crossBarOy )); draw.SetStart( wxPoint( aDim->m_crossBarOx, aDim->m_crossBarOy ));
draw.SetEnd( wxPoint( aDim->m_crossBarFx, aDim->m_crossBarFy )); draw.SetEnd( wxPoint( aDim->m_crossBarFx, aDim->m_crossBarFy ));
PlotDrawSegment( plotter, &draw, aLayerMask, trace_mode ); PlotDrawSegment( aPlotter, aPlotOpts, &draw, aLayerMask, trace_mode );
draw.SetStart( wxPoint( aDim->m_featureLineGOx, aDim->m_featureLineGOy )); draw.SetStart( wxPoint( aDim->m_featureLineGOx, aDim->m_featureLineGOy ));
draw.SetEnd( wxPoint( aDim->m_featureLineGFx, aDim->m_featureLineGFy )); draw.SetEnd( wxPoint( aDim->m_featureLineGFx, aDim->m_featureLineGFy ));
PlotDrawSegment( plotter, &draw, aLayerMask, trace_mode ); PlotDrawSegment( aPlotter, aPlotOpts, &draw, aLayerMask, trace_mode );
draw.SetStart( wxPoint( aDim->m_featureLineDOx, aDim->m_featureLineDOy )); draw.SetStart( wxPoint( aDim->m_featureLineDOx, aDim->m_featureLineDOy ));
draw.SetEnd( wxPoint( aDim->m_featureLineDFx, aDim->m_featureLineDFy )); draw.SetEnd( wxPoint( aDim->m_featureLineDFx, aDim->m_featureLineDFy ));
PlotDrawSegment( plotter, &draw, aLayerMask, trace_mode ); PlotDrawSegment( aPlotter, aPlotOpts, &draw, aLayerMask, trace_mode );
draw.SetStart( wxPoint( aDim->m_arrowD1Ox, aDim->m_arrowD1Oy )); draw.SetStart( wxPoint( aDim->m_arrowD1Ox, aDim->m_arrowD1Oy ));
draw.SetEnd( wxPoint( aDim->m_arrowD1Fx, aDim->m_arrowD1Fy )); draw.SetEnd( wxPoint( aDim->m_arrowD1Fx, aDim->m_arrowD1Fy ));
PlotDrawSegment( plotter, &draw, aLayerMask, trace_mode ); PlotDrawSegment( aPlotter, aPlotOpts, &draw, aLayerMask, trace_mode );
draw.SetStart( wxPoint( aDim->m_arrowD2Ox, aDim->m_arrowD2Oy )); draw.SetStart( wxPoint( aDim->m_arrowD2Ox, aDim->m_arrowD2Oy ));
draw.SetEnd( wxPoint( aDim->m_arrowD2Fx, aDim->m_arrowD2Fy )); draw.SetEnd( wxPoint( aDim->m_arrowD2Fx, aDim->m_arrowD2Fy ));
PlotDrawSegment( plotter, &draw, aLayerMask, trace_mode ); PlotDrawSegment( aPlotter, aPlotOpts, &draw, aLayerMask, trace_mode );
draw.SetStart( wxPoint( aDim->m_arrowG1Ox, aDim->m_arrowG1Oy )); draw.SetStart( wxPoint( aDim->m_arrowG1Ox, aDim->m_arrowG1Oy ));
draw.SetEnd( wxPoint( aDim->m_arrowG1Fx, aDim->m_arrowG1Fy )); draw.SetEnd( wxPoint( aDim->m_arrowG1Fx, aDim->m_arrowG1Fy ));
PlotDrawSegment( plotter, &draw, aLayerMask, trace_mode ); PlotDrawSegment( aPlotter, aPlotOpts, &draw, aLayerMask, trace_mode );
draw.SetStart( wxPoint( aDim->m_arrowG2Ox, aDim->m_arrowG2Oy )); draw.SetStart( wxPoint( aDim->m_arrowG2Ox, aDim->m_arrowG2Oy ));
draw.SetEnd( wxPoint( aDim->m_arrowG2Fx, aDim->m_arrowG2Fy )); draw.SetEnd( wxPoint( aDim->m_arrowG2Fx, aDim->m_arrowG2Fy ));
PlotDrawSegment( plotter, &draw, aLayerMask, trace_mode ); PlotDrawSegment( aPlotter, aPlotOpts, &draw, aLayerMask, trace_mode );
} }
void PlotPcbTarget( PLOTTER* plotter, PCB_TARGET* aMire, int aLayerMask, void PlotPcbTarget( PLOTTER* aPlotter, const PCB_PLOT_PARAMS& aPlotOpts, PCB_TARGET* aMire, int aLayerMask,
EDA_DRAW_MODE_T trace_mode ) EDA_DRAW_MODE_T trace_mode )
{ {
int dx1, dx2, dy1, dy2, radius; int dx1, dx2, dy1, dy2, radius;
...@@ -324,7 +326,7 @@ void PlotPcbTarget( PLOTTER* plotter, PCB_TARGET* aMire, int aLayerMask, ...@@ -324,7 +326,7 @@ void PlotPcbTarget( PLOTTER* plotter, PCB_TARGET* aMire, int aLayerMask,
draw.SetStart( aMire->GetPosition() ); draw.SetStart( aMire->GetPosition() );
draw.SetEnd( wxPoint( draw.GetStart().x + ( aMire->GetSize() / 4 ), draw.GetStart().y )); draw.SetEnd( wxPoint( draw.GetStart().x + ( aMire->GetSize() / 4 ), draw.GetStart().y ));
PlotDrawSegment( plotter, &draw, aLayerMask, trace_mode ); PlotDrawSegment( aPlotter, aPlotOpts, &draw, aLayerMask, trace_mode );
draw.SetShape( S_SEGMENT ); draw.SetShape( S_SEGMENT );
...@@ -345,18 +347,18 @@ void PlotPcbTarget( PLOTTER* plotter, PCB_TARGET* aMire, int aLayerMask, ...@@ -345,18 +347,18 @@ void PlotPcbTarget( PLOTTER* plotter, PCB_TARGET* aMire, int aLayerMask,
draw.SetStart( wxPoint( mirePos.x - dx1, mirePos.y - dy1 )); draw.SetStart( wxPoint( mirePos.x - dx1, mirePos.y - dy1 ));
draw.SetEnd( wxPoint( mirePos.x + dx1, mirePos.y + dy1 )); draw.SetEnd( wxPoint( mirePos.x + dx1, mirePos.y + dy1 ));
PlotDrawSegment( plotter, &draw, aLayerMask, trace_mode ); PlotDrawSegment( aPlotter, aPlotOpts, &draw, aLayerMask, trace_mode );
draw.SetStart( wxPoint( mirePos.x - dx2, mirePos.y - dy2 )); draw.SetStart( wxPoint( mirePos.x - dx2, mirePos.y - dy2 ));
draw.SetEnd( wxPoint( mirePos.x + dx2, mirePos.y + dy2 )); draw.SetEnd( wxPoint( mirePos.x + dx2, mirePos.y + dy2 ));
PlotDrawSegment( plotter, &draw, aLayerMask, trace_mode ); PlotDrawSegment( aPlotter, aPlotOpts, &draw, aLayerMask, trace_mode );
} }
// Plot footprints graphic items (outlines) // Plot footprints graphic items (outlines)
void Plot_Edges_Modules( PLOTTER* plotter, BOARD* pcb, int aLayerMask, EDA_DRAW_MODE_T trace_mode ) void Plot_Edges_Modules( PLOTTER* aPlotter, const PCB_PLOT_PARAMS& aPlotOpts, BOARD* aPcb, int aLayerMask, EDA_DRAW_MODE_T trace_mode )
{ {
for( MODULE* module = pcb->m_Modules; module; module = module->Next() ) for( MODULE* module = aPcb->m_Modules; module; module = module->Next() )
{ {
for( EDGE_MODULE* edge = (EDGE_MODULE*) module->m_Drawings.GetFirst(); for( EDGE_MODULE* edge = (EDGE_MODULE*) module->m_Drawings.GetFirst();
edge; edge;
...@@ -368,14 +370,15 @@ void Plot_Edges_Modules( PLOTTER* plotter, BOARD* pcb, int aLayerMask, EDA_DRAW_ ...@@ -368,14 +370,15 @@ void Plot_Edges_Modules( PLOTTER* plotter, BOARD* pcb, int aLayerMask, EDA_DRAW_
if( ( GetLayerMask( edge->GetLayer() ) & aLayerMask ) == 0 ) if( ( GetLayerMask( edge->GetLayer() ) & aLayerMask ) == 0 )
continue; continue;
Plot_1_EdgeModule( plotter, edge, trace_mode, aLayerMask ); Plot_1_EdgeModule( aPlotter, aPlotOpts, edge, trace_mode, aLayerMask );
} }
} }
} }
//* Plot a graphic item (outline) relative to a footprint //* Plot a graphic item (outline) relative to a footprint
void Plot_1_EdgeModule( PLOTTER* plotter, EDGE_MODULE* aEdge, EDA_DRAW_MODE_T trace_mode, int masque_layer ) void Plot_1_EdgeModule( PLOTTER* aPlotter, const PCB_PLOT_PARAMS& aPlotOpts,
EDGE_MODULE* aEdge, EDA_DRAW_MODE_T trace_mode, int masque_layer )
{ {
int type_trace; // Type of item to plot. int type_trace; // Type of item to plot.
int thickness; // Segment thickness. int thickness; // Segment thickness.
...@@ -393,13 +396,13 @@ void Plot_1_EdgeModule( PLOTTER* plotter, EDGE_MODULE* aEdge, EDA_DRAW_MODE_T tr ...@@ -393,13 +396,13 @@ void Plot_1_EdgeModule( PLOTTER* plotter, EDGE_MODULE* aEdge, EDA_DRAW_MODE_T tr
switch( type_trace ) switch( type_trace )
{ {
case S_SEGMENT: case S_SEGMENT:
plotter->thick_segment( pos, end, thickness, trace_mode ); aPlotter->thick_segment( pos, end, thickness, trace_mode );
break; break;
case S_CIRCLE: case S_CIRCLE:
radius = (int) hypot( (double) ( end.x - pos.x ), radius = (int) hypot( (double) ( end.x - pos.x ),
(double) ( end.y - pos.y ) ); (double) ( end.y - pos.y ) );
plotter->thick_circle( pos, radius * 2, thickness, trace_mode ); aPlotter->thick_circle( pos, radius * 2, thickness, trace_mode );
break; break;
case S_ARC: case S_ARC:
...@@ -411,16 +414,16 @@ void Plot_1_EdgeModule( PLOTTER* plotter, EDGE_MODULE* aEdge, EDA_DRAW_MODE_T tr ...@@ -411,16 +414,16 @@ void Plot_1_EdgeModule( PLOTTER* plotter, EDGE_MODULE* aEdge, EDA_DRAW_MODE_T tr
double endAngle = startAngle + aEdge->GetAngle(); double endAngle = startAngle + aEdge->GetAngle();
if ( ( g_PcbPlotOptions.GetPlotFormat() == PLOT_FORMAT_DXF ) && if ( ( aPlotOpts.GetPlotFormat() == PLOT_FORMAT_DXF ) &&
( masque_layer & ( SILKSCREEN_LAYER_BACK | DRAW_LAYER | COMMENT_LAYER ) ) ) ( masque_layer & ( SILKSCREEN_LAYER_BACK | DRAW_LAYER | COMMENT_LAYER ) ) )
plotter->thick_arc( pos, aPlotter->thick_arc( pos,
-startAngle, -startAngle,
-endAngle, -endAngle,
radius, radius,
thickness, thickness,
trace_mode ); trace_mode );
else else
plotter->thick_arc( pos, aPlotter->thick_arc( pos,
-endAngle, -endAngle,
-startAngle, -startAngle,
radius, radius,
...@@ -457,7 +460,7 @@ void Plot_1_EdgeModule( PLOTTER* plotter, EDGE_MODULE* aEdge, EDA_DRAW_MODE_T tr ...@@ -457,7 +460,7 @@ void Plot_1_EdgeModule( PLOTTER* plotter, EDGE_MODULE* aEdge, EDA_DRAW_MODE_T tr
cornerList.push_back( corner ); cornerList.push_back( corner );
} }
plotter->PlotPoly( cornerList, FILLED_SHAPE, thickness ); aPlotter->PlotPoly( cornerList, FILLED_SHAPE, thickness );
} }
break; break;
} }
...@@ -465,7 +468,7 @@ void Plot_1_EdgeModule( PLOTTER* plotter, EDGE_MODULE* aEdge, EDA_DRAW_MODE_T tr ...@@ -465,7 +468,7 @@ void Plot_1_EdgeModule( PLOTTER* plotter, EDGE_MODULE* aEdge, EDA_DRAW_MODE_T tr
// Plot a PCB Text, i;e. a text found on a copper or technical layer // Plot a PCB Text, i;e. a text found on a copper or technical layer
void PlotTextePcb( PLOTTER* plotter, TEXTE_PCB* pt_texte, int aLayerMask, void PlotTextePcb( PLOTTER* aPlotter, const PCB_PLOT_PARAMS& aPlotOpts, TEXTE_PCB* pt_texte, int aLayerMask,
EDA_DRAW_MODE_T trace_mode ) EDA_DRAW_MODE_T trace_mode )
{ {
int orient, thickness; int orient, thickness;
...@@ -504,7 +507,7 @@ void PlotTextePcb( PLOTTER* plotter, TEXTE_PCB* pt_texte, int aLayerMask, ...@@ -504,7 +507,7 @@ void PlotTextePcb( PLOTTER* plotter, TEXTE_PCB* pt_texte, int aLayerMask,
for( unsigned i = 0; i < list->Count(); i++ ) for( unsigned i = 0; i < list->Count(); i++ )
{ {
wxString txt = list->Item( i ); wxString txt = list->Item( i );
plotter->text( pos, BLACK, aPlotter->text( pos, BLACK,
txt, txt,
orient, size, orient, size,
pt_texte->m_HJustify, pt_texte->m_VJustify, pt_texte->m_HJustify, pt_texte->m_VJustify,
...@@ -512,11 +515,11 @@ void PlotTextePcb( PLOTTER* plotter, TEXTE_PCB* pt_texte, int aLayerMask, ...@@ -512,11 +515,11 @@ void PlotTextePcb( PLOTTER* plotter, TEXTE_PCB* pt_texte, int aLayerMask,
pos += offset; pos += offset;
} }
delete (list); delete list;
} }
else else
{ {
plotter->text( pos, BLACK, aPlotter->text( pos, BLACK,
pt_texte->m_Text, pt_texte->m_Text,
orient, size, orient, size,
pt_texte->m_HJustify, pt_texte->m_VJustify, pt_texte->m_HJustify, pt_texte->m_VJustify,
...@@ -527,7 +530,7 @@ void PlotTextePcb( PLOTTER* plotter, TEXTE_PCB* pt_texte, int aLayerMask, ...@@ -527,7 +530,7 @@ void PlotTextePcb( PLOTTER* plotter, TEXTE_PCB* pt_texte, int aLayerMask,
/* Plot areas (given by .m_FilledPolysList member) in a zone /* Plot areas (given by .m_FilledPolysList member) in a zone
*/ */
void PlotFilledAreas( PLOTTER* plotter, ZONE_CONTAINER* aZone, EDA_DRAW_MODE_T trace_mode ) void PlotFilledAreas( PLOTTER* aPlotter, const PCB_PLOT_PARAMS& aPlotOpts, ZONE_CONTAINER* aZone, EDA_DRAW_MODE_T trace_mode )
{ {
unsigned imax = aZone->m_FilledPolysList.size(); unsigned imax = aZone->m_FilledPolysList.size();
...@@ -563,7 +566,7 @@ void PlotFilledAreas( PLOTTER* plotter, ZONE_CONTAINER* aZone, EDA_DRAW_MODE_T t ...@@ -563,7 +566,7 @@ void PlotFilledAreas( PLOTTER* plotter, ZONE_CONTAINER* aZone, EDA_DRAW_MODE_T t
// Plot the current filled area polygon // Plot the current filled area polygon
if( aZone->m_FillMode == 0 ) // We are using solid polygons if( aZone->m_FillMode == 0 ) // We are using solid polygons
{ // (if != 0: using segments ) { // (if != 0: using segments )
plotter->PlotPoly( cornerList, FILLED_SHAPE ); aPlotter->PlotPoly( cornerList, FILLED_SHAPE );
} }
else // We are using areas filled by else // We are using areas filled by
{ // segments: plot them ) { // segments: plot them )
...@@ -571,7 +574,7 @@ void PlotFilledAreas( PLOTTER* plotter, ZONE_CONTAINER* aZone, EDA_DRAW_MODE_T t ...@@ -571,7 +574,7 @@ void PlotFilledAreas( PLOTTER* plotter, ZONE_CONTAINER* aZone, EDA_DRAW_MODE_T t
{ {
wxPoint start = aZone->m_FillSegmList[iseg].m_Start; wxPoint start = aZone->m_FillSegmList[iseg].m_Start;
wxPoint end = aZone->m_FillSegmList[iseg].m_End; wxPoint end = aZone->m_FillSegmList[iseg].m_End;
plotter->thick_segment( start, aPlotter->thick_segment( start,
end, end,
aZone->m_ZoneMinThickness, aZone->m_ZoneMinThickness,
trace_mode ); trace_mode );
...@@ -580,19 +583,19 @@ void PlotFilledAreas( PLOTTER* plotter, ZONE_CONTAINER* aZone, EDA_DRAW_MODE_T t ...@@ -580,19 +583,19 @@ void PlotFilledAreas( PLOTTER* plotter, ZONE_CONTAINER* aZone, EDA_DRAW_MODE_T t
// Plot the current filled area outline // Plot the current filled area outline
if( aZone->m_ZoneMinThickness > 0 ) if( aZone->m_ZoneMinThickness > 0 )
plotter->PlotPoly( cornerList, NO_FILL, aZone->m_ZoneMinThickness ); aPlotter->PlotPoly( cornerList, NO_FILL, aZone->m_ZoneMinThickness );
} }
else else
{ {
if( aZone->m_ZoneMinThickness > 0 ) if( aZone->m_ZoneMinThickness > 0 )
{ {
for( unsigned jj = 1; jj<cornerList.size(); jj++ ) for( unsigned jj = 1; jj<cornerList.size(); jj++ )
plotter->thick_segment( cornerList[jj -1], cornerList[jj], aPlotter->thick_segment( cornerList[jj -1], cornerList[jj],
( trace_mode == LINE ) ? -1 : aZone->m_ZoneMinThickness, ( trace_mode == LINE ) ? -1 : aZone->m_ZoneMinThickness,
trace_mode ); trace_mode );
} }
plotter->set_current_line_width( -1 ); aPlotter->set_current_line_width( -1 );
} }
cornerList.clear(); cornerList.clear();
...@@ -603,7 +606,7 @@ void PlotFilledAreas( PLOTTER* plotter, ZONE_CONTAINER* aZone, EDA_DRAW_MODE_T t ...@@ -603,7 +606,7 @@ void PlotFilledAreas( PLOTTER* plotter, ZONE_CONTAINER* aZone, EDA_DRAW_MODE_T t
/* Plot items type DRAWSEGMENT on layers allowed by aLayerMask /* Plot items type DRAWSEGMENT on layers allowed by aLayerMask
*/ */
void PlotDrawSegment( PLOTTER* plotter, DRAWSEGMENT* aSeg, int aLayerMask, void PlotDrawSegment( PLOTTER* aPlotter, const PCB_PLOT_PARAMS& aPlotOpts, DRAWSEGMENT* aSeg, int aLayerMask,
EDA_DRAW_MODE_T trace_mode ) EDA_DRAW_MODE_T trace_mode )
{ {
int thickness; int thickness;
...@@ -613,21 +616,21 @@ void PlotDrawSegment( PLOTTER* plotter, DRAWSEGMENT* aSeg, int aLayerMask, ...@@ -613,21 +616,21 @@ void PlotDrawSegment( PLOTTER* plotter, DRAWSEGMENT* aSeg, int aLayerMask,
return; return;
if( trace_mode == LINE ) if( trace_mode == LINE )
thickness = g_PcbPlotOptions.m_PlotLineWidth; thickness = aPlotOpts.m_PlotLineWidth;
else else
thickness = aSeg->GetWidth(); thickness = aSeg->GetWidth();
wxPoint start( aSeg->GetStart() ); wxPoint start( aSeg->GetStart() );
wxPoint end( aSeg->GetEnd() ); wxPoint end( aSeg->GetEnd() );
plotter->set_current_line_width( thickness ); aPlotter->set_current_line_width( thickness );
switch( aSeg->GetShape() ) switch( aSeg->GetShape() )
{ {
case S_CIRCLE: case S_CIRCLE:
radius = (int) hypot( (double) ( end.x - start.x ), radius = (int) hypot( (double) ( end.x - start.x ),
(double) ( end.y - start.y ) ); (double) ( end.y - start.y ) );
plotter->thick_circle( start, radius * 2, thickness, trace_mode ); aPlotter->thick_circle( start, radius * 2, thickness, trace_mode );
break; break;
case S_ARC: case S_ARC:
...@@ -635,7 +638,7 @@ void PlotDrawSegment( PLOTTER* plotter, DRAWSEGMENT* aSeg, int aLayerMask, ...@@ -635,7 +638,7 @@ void PlotDrawSegment( PLOTTER* plotter, DRAWSEGMENT* aSeg, int aLayerMask,
(double) ( end.y - start.y ) ); (double) ( end.y - start.y ) );
StAngle = ArcTangente( end.y - start.y, end.x - start.x ); StAngle = ArcTangente( end.y - start.y, end.x - start.x );
EndAngle = StAngle + aSeg->GetAngle(); EndAngle = StAngle + aSeg->GetAngle();
plotter->thick_arc( start, -EndAngle, -StAngle, radius, thickness, trace_mode ); aPlotter->thick_arc( start, -EndAngle, -StAngle, radius, thickness, trace_mode );
break; break;
case S_CURVE: case S_CURVE:
...@@ -643,7 +646,7 @@ void PlotDrawSegment( PLOTTER* plotter, DRAWSEGMENT* aSeg, int aLayerMask, ...@@ -643,7 +646,7 @@ void PlotDrawSegment( PLOTTER* plotter, DRAWSEGMENT* aSeg, int aLayerMask,
const std::vector<wxPoint>& bezierPoints = aSeg->GetBezierPoints(); const std::vector<wxPoint>& bezierPoints = aSeg->GetBezierPoints();
for( unsigned i = 1; i < bezierPoints.size(); i++ ) for( unsigned i = 1; i < bezierPoints.size(); i++ )
plotter->thick_segment( bezierPoints[i - 1], aPlotter->thick_segment( bezierPoints[i - 1],
bezierPoints[i], bezierPoints[i],
thickness, thickness,
trace_mode ); trace_mode );
...@@ -651,18 +654,20 @@ void PlotDrawSegment( PLOTTER* plotter, DRAWSEGMENT* aSeg, int aLayerMask, ...@@ -651,18 +654,20 @@ void PlotDrawSegment( PLOTTER* plotter, DRAWSEGMENT* aSeg, int aLayerMask,
break; break;
default: default:
plotter->thick_segment( start, end, thickness, trace_mode ); aPlotter->thick_segment( start, end, thickness, trace_mode );
} }
} }
void PCB_BASE_FRAME::Plot_Layer( PLOTTER* plotter, int Layer, EDA_DRAW_MODE_T trace_mode ) void PCB_BASE_FRAME::Plot_Layer( PLOTTER* aPlotter, int Layer, EDA_DRAW_MODE_T trace_mode )
{ {
const PCB_PLOT_PARAMS& plot_opts = GetPlotSettings();
// Specify that the contents of the "Edges Pcb" layer are to be plotted // Specify that the contents of the "Edges Pcb" layer are to be plotted
// in addition to the contents of the currently specified layer. // in addition to the contents of the currently specified layer.
int layer_mask = GetLayerMask( Layer ); int layer_mask = GetLayerMask( Layer );
if( !g_PcbPlotOptions.m_ExcludeEdgeLayer ) if( !plot_opts.m_ExcludeEdgeLayer )
layer_mask |= EDGE_LAYER; layer_mask |= EDGE_LAYER;
switch( Layer ) switch( Layer )
...@@ -683,15 +688,15 @@ void PCB_BASE_FRAME::Plot_Layer( PLOTTER* plotter, int Layer, EDA_DRAW_MODE_T tr ...@@ -683,15 +688,15 @@ void PCB_BASE_FRAME::Plot_Layer( PLOTTER* plotter, int Layer, EDA_DRAW_MODE_T tr
case LAYER_N_14: case LAYER_N_14:
case LAYER_N_15: case LAYER_N_15:
case LAST_COPPER_LAYER: case LAST_COPPER_LAYER:
Plot_Standard_Layer( plotter, layer_mask, true, trace_mode, Plot_Standard_Layer( aPlotter, layer_mask, true, trace_mode,
g_PcbPlotOptions.m_SkipNPTH_Pads ); plot_opts.m_SkipNPTH_Pads );
// Adding drill marks, if required and if the plotter is able to plot them: // Adding drill marks, if required and if the plotter is able to plot them:
if( g_PcbPlotOptions.m_DrillShapeOpt != PCB_PLOT_PARAMS::NO_DRILL_SHAPE ) if( plot_opts.m_DrillShapeOpt != PCB_PLOT_PARAMS::NO_DRILL_SHAPE )
{ {
if( plotter->GetPlotterType() == PLOT_FORMAT_POST ) if( aPlotter->GetPlotterType() == PLOT_FORMAT_POST )
PlotDrillMark( plotter, trace_mode, PlotDrillMark( aPlotter, trace_mode,
g_PcbPlotOptions.m_DrillShapeOpt == plot_opts.m_DrillShapeOpt ==
PCB_PLOT_PARAMS::SMALL_DRILL_SHAPE ); PCB_PLOT_PARAMS::SMALL_DRILL_SHAPE );
} }
...@@ -699,22 +704,22 @@ void PCB_BASE_FRAME::Plot_Layer( PLOTTER* plotter, int Layer, EDA_DRAW_MODE_T tr ...@@ -699,22 +704,22 @@ void PCB_BASE_FRAME::Plot_Layer( PLOTTER* plotter, int Layer, EDA_DRAW_MODE_T tr
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( aPlotter, layer_mask,
g_PcbPlotOptions.m_PlotViaOnMaskLayer, trace_mode ); plot_opts.m_PlotViaOnMaskLayer, trace_mode );
break; break;
case SOLDERPASTE_N_BACK: case SOLDERPASTE_N_BACK:
case SOLDERPASTE_N_FRONT: case SOLDERPASTE_N_FRONT:
Plot_Standard_Layer( plotter, layer_mask, false, trace_mode ); Plot_Standard_Layer( aPlotter, layer_mask, false, trace_mode );
break; break;
case SILKSCREEN_N_FRONT: case SILKSCREEN_N_FRONT:
case SILKSCREEN_N_BACK: case SILKSCREEN_N_BACK:
PlotSilkScreen( plotter, layer_mask, trace_mode ); PlotSilkScreen( aPlotter, layer_mask, trace_mode );
// Gerber: Subtract soldermask from silkscreen if enabled // Gerber: Subtract soldermask from silkscreen if enabled
if( plotter->GetPlotterType() == PLOT_FORMAT_GERBER if( aPlotter->GetPlotterType() == PLOT_FORMAT_GERBER
&& g_PcbPlotOptions.GetSubtractMaskFromSilk() ) && plot_opts.GetSubtractMaskFromSilk() )
{ {
if( Layer == SILKSCREEN_N_FRONT ) if( Layer == SILKSCREEN_N_FRONT )
{ {
...@@ -726,16 +731,16 @@ void PCB_BASE_FRAME::Plot_Layer( PLOTTER* plotter, int Layer, EDA_DRAW_MODE_T tr ...@@ -726,16 +731,16 @@ void PCB_BASE_FRAME::Plot_Layer( PLOTTER* plotter, int Layer, EDA_DRAW_MODE_T tr
} }
// Set layer polarity to negative // Set layer polarity to negative
plotter->SetLayerPolarity( false ); aPlotter->SetLayerPolarity( false );
Plot_Standard_Layer( plotter, layer_mask, Plot_Standard_Layer( aPlotter, layer_mask,
g_PcbPlotOptions.m_PlotViaOnMaskLayer, plot_opts.m_PlotViaOnMaskLayer,
trace_mode ); trace_mode );
} }
break; break;
default: default:
PlotSilkScreen( plotter, layer_mask, trace_mode ); PlotSilkScreen( aPlotter, layer_mask, trace_mode );
break; break;
} }
} }
...@@ -754,25 +759,27 @@ void PCB_BASE_FRAME::Plot_Standard_Layer( PLOTTER* aPlotter, ...@@ -754,25 +759,27 @@ void PCB_BASE_FRAME::Plot_Standard_Layer( PLOTTER* aPlotter,
wxSize size; wxSize size;
wxString msg; wxString msg;
const PCB_PLOT_PARAMS& plot_opts = GetPlotSettings();
// Plot pcb draw items. // Plot pcb draw items.
for( BOARD_ITEM* item = m_Pcb->m_Drawings; item; item = item->Next() ) for( BOARD_ITEM* item = m_Pcb->m_Drawings; item; item = item->Next() )
{ {
switch( item->Type() ) switch( item->Type() )
{ {
case PCB_LINE_T: case PCB_LINE_T:
PlotDrawSegment( aPlotter, (DRAWSEGMENT*) item, aLayerMask, aPlotMode ); PlotDrawSegment( aPlotter, plot_opts, (DRAWSEGMENT*) item, aLayerMask, aPlotMode );
break; break;
case PCB_TEXT_T: case PCB_TEXT_T:
PlotTextePcb( aPlotter, (TEXTE_PCB*) item, aLayerMask, aPlotMode ); PlotTextePcb( aPlotter, plot_opts, (TEXTE_PCB*) item, aLayerMask, aPlotMode );
break; break;
case PCB_DIMENSION_T: case PCB_DIMENSION_T:
PlotDimension( aPlotter, (DIMENSION*) item, aLayerMask, aPlotMode ); PlotDimension( aPlotter, plot_opts, (DIMENSION*) item, aLayerMask, aPlotMode );
break; break;
case PCB_TARGET_T: case PCB_TARGET_T:
PlotPcbTarget( aPlotter, (PCB_TARGET*) item, aLayerMask, aPlotMode ); PlotPcbTarget( aPlotter, plot_opts, (PCB_TARGET*) item, aLayerMask, aPlotMode );
break; break;
case PCB_MARKER_T: case PCB_MARKER_T:
...@@ -785,7 +792,7 @@ void PCB_BASE_FRAME::Plot_Standard_Layer( PLOTTER* aPlotter, ...@@ -785,7 +792,7 @@ void PCB_BASE_FRAME::Plot_Standard_Layer( PLOTTER* aPlotter,
} }
// Draw footprint shapes without pads (pads will plotted later) // Draw footprint shapes without pads (pads will plotted later)
for( MODULE* module = m_Pcb->m_Modules; module; module = module->Next() ) for( MODULE* module = m_Pcb->m_Modules; module; module = module->Next() )
{ {
for( BOARD_ITEM* item = module->m_Drawings; item; item = item->Next() ) for( BOARD_ITEM* item = module->m_Drawings; item; item = item->Next() )
{ {
...@@ -793,7 +800,7 @@ void PCB_BASE_FRAME::Plot_Standard_Layer( PLOTTER* aPlotter, ...@@ -793,7 +800,7 @@ void PCB_BASE_FRAME::Plot_Standard_Layer( PLOTTER* aPlotter,
{ {
case PCB_MODULE_EDGE_T: case PCB_MODULE_EDGE_T:
if( aLayerMask & GetLayerMask( item->GetLayer() ) ) if( aLayerMask & GetLayerMask( item->GetLayer() ) )
Plot_1_EdgeModule( aPlotter, (EDGE_MODULE*) item, aPlotMode, aLayerMask ); Plot_1_EdgeModule( aPlotter, plot_opts, (EDGE_MODULE*) item, aPlotMode, aLayerMask );
break; break;
...@@ -804,17 +811,17 @@ void PCB_BASE_FRAME::Plot_Standard_Layer( PLOTTER* aPlotter, ...@@ -804,17 +811,17 @@ void PCB_BASE_FRAME::Plot_Standard_Layer( PLOTTER* aPlotter,
} }
// Plot footprint pads // Plot footprint pads
for( MODULE* module = m_Pcb->m_Modules; module; module = module->Next() ) for( MODULE* module = m_Pcb->m_Modules; module; module = module->Next() )
{ {
for( D_PAD* pad = module->m_Pads; pad; pad = pad->Next() ) for( D_PAD* pad = module->m_Pads; pad; pad = pad->Next() )
{ {
wxPoint shape_pos;
if( (pad->GetLayerMask() & aLayerMask) == 0 ) if( (pad->GetLayerMask() & aLayerMask) == 0 )
continue; continue;
shape_pos = pad->ReturnShapePos(); wxPoint shape_pos = pad->ReturnShapePos();
pos = shape_pos; pos = shape_pos;
wxSize margin; wxSize margin;
double width_adj = 0; double width_adj = 0;
...@@ -973,7 +980,7 @@ void PCB_BASE_FRAME::Plot_Standard_Layer( PLOTTER* aPlotter, ...@@ -973,7 +980,7 @@ void PCB_BASE_FRAME::Plot_Standard_Layer( PLOTTER* aPlotter,
if( ( ( 1 << edge_zone->GetLayer() ) & aLayerMask ) == 0 ) if( ( ( 1 << edge_zone->GetLayer() ) & aLayerMask ) == 0 )
continue; continue;
PlotFilledAreas( aPlotter, edge_zone, aPlotMode ); PlotFilledAreas( aPlotter, plot_opts, edge_zone, aPlotMode );
} }
} }
...@@ -999,6 +1006,8 @@ void PCB_BASE_FRAME::PlotDrillMark( PLOTTER* aPlotter, ...@@ -999,6 +1006,8 @@ void PCB_BASE_FRAME::PlotDrillMark( PLOTTER* aPlotter,
D_PAD* pad; D_PAD* pad;
TRACK* pts; TRACK* pts;
const PCB_PLOT_PARAMS& plot_opts = GetPlotSettings();
if( aTraceMode == FILLED ) if( aTraceMode == FILLED )
{ {
aPlotter->set_color( WHITE ); aPlotter->set_color( WHITE );
...@@ -1012,7 +1021,7 @@ void PCB_BASE_FRAME::PlotDrillMark( PLOTTER* aPlotter, ...@@ -1012,7 +1021,7 @@ void PCB_BASE_FRAME::PlotDrillMark( PLOTTER* aPlotter,
pos = pts->m_Start; pos = pts->m_Start;
// It is quite possible that the real drill value is less then small drill value. // It is quite possible that the real drill value is less then small drill value.
if( g_PcbPlotOptions.m_DrillShapeOpt == PCB_PLOT_PARAMS::SMALL_DRILL_SHAPE ) if( plot_opts.m_DrillShapeOpt == PCB_PLOT_PARAMS::SMALL_DRILL_SHAPE )
diam.x = diam.y = MIN( SMALL_DRILL, pts->GetDrillValue() ); diam.x = diam.y = MIN( SMALL_DRILL, pts->GetDrillValue() );
else else
diam.x = diam.y = pts->GetDrillValue(); diam.x = diam.y = pts->GetDrillValue();
......
...@@ -20,6 +20,8 @@ bool PCB_BASE_FRAME::ExportToDxfFile( const wxString& aFullFileName, int aLayer, ...@@ -20,6 +20,8 @@ bool PCB_BASE_FRAME::ExportToDxfFile( const wxString& aFullFileName, int aLayer,
{ {
LOCALE_IO toggle; LOCALE_IO toggle;
const PCB_PLOT_PARAMS& plot_opts = GetPlotSettings();
FILE* output_file = wxFopen( aFullFileName, wxT( "wt" ) ); FILE* output_file = wxFopen( aFullFileName, wxT( "wt" ) );
if( output_file == NULL ) if( output_file == NULL )
...@@ -34,7 +36,7 @@ bool PCB_BASE_FRAME::ExportToDxfFile( const wxString& aFullFileName, int aLayer, ...@@ -34,7 +36,7 @@ bool PCB_BASE_FRAME::ExportToDxfFile( const wxString& aFullFileName, int aLayer,
plotter->set_filename( aFullFileName ); plotter->set_filename( aFullFileName );
plotter->start_plot( output_file ); plotter->start_plot( output_file );
if( g_PcbPlotOptions.m_PlotFrameRef ) if( plot_opts.m_PlotFrameRef )
PlotWorkSheet( plotter, GetScreen() ); PlotWorkSheet( plotter, GetScreen() );
Plot_Layer( plotter, aLayer, aTraceMode ); Plot_Layer( plotter, aLayer, aTraceMode );
......
...@@ -27,16 +27,17 @@ bool PCB_BASE_FRAME::ExportToGerberFile( const wxString& aFullFileName, int aLay ...@@ -27,16 +27,17 @@ bool PCB_BASE_FRAME::ExportToGerberFile( const wxString& aFullFileName, int aLay
bool aPlotOriginIsAuxAxis, EDA_DRAW_MODE_T aTraceMode ) bool aPlotOriginIsAuxAxis, EDA_DRAW_MODE_T aTraceMode )
{ {
FILE* output_file = wxFopen( aFullFileName, wxT( "wt" ) ); FILE* output_file = wxFopen( aFullFileName, wxT( "wt" ) );
if( output_file == NULL ) if( output_file == NULL )
{ {
return false; return false;
} }
PCB_PLOT_PARAMS plot_opts = GetPlotSettings();
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_PcbPlotOptions.m_PlotScale; double scale = plot_opts.m_PlotScale;
if( aPlotOriginIsAuxAxis ) if( aPlotOriginIsAuxAxis )
{ {
...@@ -54,7 +55,7 @@ bool PCB_BASE_FRAME::ExportToGerberFile( const wxString& aFullFileName, int aLay ...@@ -54,7 +55,7 @@ bool PCB_BASE_FRAME::ExportToGerberFile( const wxString& aFullFileName, int aLay
// 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_PcbPlotOptions.m_PlotLineWidth ); plotter->set_default_line_width( plot_opts.m_PlotLineWidth );
plotter->set_creator( wxT( "PCBNEW-RS274X" ) ); plotter->set_creator( wxT( "PCBNEW-RS274X" ) );
plotter->set_filename( aFullFileName ); plotter->set_filename( aFullFileName );
...@@ -63,16 +64,21 @@ bool PCB_BASE_FRAME::ExportToGerberFile( const wxString& aFullFileName, int aLay ...@@ -63,16 +64,21 @@ bool PCB_BASE_FRAME::ExportToGerberFile( const wxString& aFullFileName, int aLay
// Skip NPTH pads on copper layers // Skip NPTH pads on copper layers
// ( only if hole size == pad size ): // ( only if hole size == pad size ):
if( (aLayer >= LAYER_N_BACK) && (aLayer <= LAYER_N_FRONT) ) if( (aLayer >= LAYER_N_BACK) && (aLayer <= LAYER_N_FRONT) )
g_PcbPlotOptions.m_SkipNPTH_Pads = true; plot_opts.m_SkipNPTH_Pads = true;
SetPlotSettings( plot_opts );
// 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_PcbPlotOptions.m_PlotFrameRef ) if( plot_opts.m_PlotFrameRef )
PlotWorkSheet( plotter, GetScreen() ); PlotWorkSheet( plotter, GetScreen() );
Plot_Layer( plotter, aLayer, aTraceMode ); Plot_Layer( plotter, aLayer, aTraceMode );
plotter->end_plot(); plotter->end_plot();
g_PcbPlotOptions.m_SkipNPTH_Pads = false; plot_opts.m_SkipNPTH_Pads = false;
SetPlotSettings( plot_opts );
} }
else // error in start_plot( ): failed opening a temporary file else // error in start_plot( ): failed opening a temporary file
{ {
......
...@@ -26,7 +26,6 @@ bool PCB_BASE_FRAME::ExportToHpglFile( const wxString& aFullFileName, int aLayer ...@@ -26,7 +26,6 @@ bool PCB_BASE_FRAME::ExportToHpglFile( const wxString& aFullFileName, int aLayer
double scale; double scale;
wxPoint offset; wxPoint offset;
LOCALE_IO toggle; LOCALE_IO toggle;
FILE* output_file = wxFopen( aFullFileName, wxT( "wt" ) ); FILE* output_file = wxFopen( aFullFileName, wxT( "wt" ) );
if( output_file == NULL ) if( output_file == NULL )
...@@ -34,24 +33,26 @@ bool PCB_BASE_FRAME::ExportToHpglFile( const wxString& aFullFileName, int aLayer ...@@ -34,24 +33,26 @@ bool PCB_BASE_FRAME::ExportToHpglFile( const wxString& aFullFileName, int aLayer
return false; return false;
} }
PCB_PLOT_PARAMS plot_opts = GetPlotSettings();
// Compute pen_dim (from g_m_HPGLPenDiam 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_m_HPGLPenDiam // 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_PcbPlotOptions.m_HPGLPenDiam * U_PCB) / int pen_diam = wxRound( (plot_opts.m_HPGLPenDiam * U_PCB) /
g_PcbPlotOptions.m_PlotScale ); plot_opts.m_PlotScale );
// compute pen_overlay (from g_m_HPGLPenOvr in mils) with plot scale // compute pen_overlay (from g_m_HPGLPenOvr in mils) with plot scale
if( g_PcbPlotOptions.m_HPGLPenOvr < 0 ) if( plot_opts.m_HPGLPenOvr < 0 )
g_PcbPlotOptions.m_HPGLPenOvr = 0; plot_opts.m_HPGLPenOvr = 0;
if( g_PcbPlotOptions.m_HPGLPenOvr >= g_PcbPlotOptions.m_HPGLPenDiam ) if( plot_opts.m_HPGLPenOvr >= plot_opts.m_HPGLPenDiam )
g_PcbPlotOptions.m_HPGLPenOvr = g_PcbPlotOptions.m_HPGLPenDiam - 1; plot_opts.m_HPGLPenOvr = plot_opts.m_HPGLPenDiam - 1;
int pen_overlay = wxRound( g_PcbPlotOptions.m_HPGLPenOvr * 10.0 / int pen_overlay = wxRound( plot_opts.m_HPGLPenOvr * 10.0 /
g_PcbPlotOptions.m_PlotScale ); plot_opts.m_PlotScale );
if( g_PcbPlotOptions.m_PlotScale != 1.0 || g_PcbPlotOptions.m_AutoScale ) if( plot_opts.m_PlotScale != 1.0 || plot_opts.m_AutoScale )
{ {
// when scale != 1.0 we must calculate the position in page // when scale != 1.0 we must calculate the position in page
// because actual position has no meaning // because actual position has no meaning
...@@ -66,7 +67,7 @@ bool PCB_BASE_FRAME::ExportToHpglFile( const wxString& aFullFileName, int aLayer ...@@ -66,7 +67,7 @@ bool PCB_BASE_FRAME::ExportToHpglFile( const wxString& aFullFileName, int aLayer
boardSize = bbbox.GetSize(); boardSize = bbbox.GetSize();
boardCenter = bbbox.Centre(); boardCenter = bbbox.Centre();
if( g_PcbPlotOptions.m_AutoScale ) // Optimum scale if( plot_opts.m_AutoScale ) // Optimum scale
{ {
// Fit to 80% of the page // Fit to 80% of the page
double Xscale = ( ( pageSizeIU.x * 0.8 ) / boardSize.x ); double Xscale = ( ( pageSizeIU.x * 0.8 ) / boardSize.x );
...@@ -75,7 +76,7 @@ bool PCB_BASE_FRAME::ExportToHpglFile( const wxString& aFullFileName, int aLayer ...@@ -75,7 +76,7 @@ bool PCB_BASE_FRAME::ExportToHpglFile( const wxString& aFullFileName, int aLayer
} }
else else
{ {
scale = g_PcbPlotOptions.m_PlotScale; scale = plot_opts.m_PlotScale;
} }
// Calculate the page size offset. // Calculate the page size offset.
...@@ -96,18 +97,21 @@ bool PCB_BASE_FRAME::ExportToHpglFile( const wxString& aFullFileName, int aLayer ...@@ -96,18 +97,21 @@ bool PCB_BASE_FRAME::ExportToHpglFile( const wxString& aFullFileName, int aLayer
plotter->SetPageSettings( GetPageSettings() ); plotter->SetPageSettings( GetPageSettings() );
plotter->set_viewport( offset, scale, g_PcbPlotOptions.m_PlotMirror ); // why did we have to change these settings above?
plotter->set_default_line_width( g_PcbPlotOptions.m_PlotLineWidth ); SetPlotSettings( plot_opts );
plotter->set_viewport( offset, scale, plot_opts.m_PlotMirror );
plotter->set_default_line_width( plot_opts.m_PlotLineWidth );
plotter->set_creator( wxT( "PCBNEW-HPGL" ) ); plotter->set_creator( wxT( "PCBNEW-HPGL" ) );
plotter->set_filename( aFullFileName ); plotter->set_filename( aFullFileName );
plotter->set_pen_speed( g_PcbPlotOptions.m_HPGLPenSpeed ); plotter->set_pen_speed( plot_opts.m_HPGLPenSpeed );
plotter->set_pen_number( g_PcbPlotOptions.m_HPGLPenNum ); plotter->set_pen_number( plot_opts.m_HPGLPenNum );
plotter->set_pen_overlap( pen_overlay ); 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 paperscale!=1, anyway // The worksheet is not significant with scale!=1... It is with paperscale!=1, anyway
if( g_PcbPlotOptions.m_PlotFrameRef && !center ) if( plot_opts.m_PlotFrameRef && !center )
PlotWorkSheet( plotter, GetScreen() ); PlotWorkSheet( plotter, GetScreen() );
Plot_Layer( plotter, aLayer, aTraceMode ); Plot_Layer( plotter, aLayer, aTraceMode );
......
...@@ -25,6 +25,7 @@ bool PCB_BASE_FRAME::ExportToPostScriptFile( const wxString& aFullFileName, int ...@@ -25,6 +25,7 @@ bool PCB_BASE_FRAME::ExportToPostScriptFile( const wxString& aFullFileName, int
bool aUseA4, EDA_DRAW_MODE_T aTraceMode ) bool aUseA4, EDA_DRAW_MODE_T aTraceMode )
{ {
const PAGE_INFO& pageInfo = GetPageSettings(); const PAGE_INFO& pageInfo = GetPageSettings();
PCB_PLOT_PARAMS plotOpts = GetPlotSettings();
wxSize paperSizeIU; wxSize paperSizeIU;
wxSize boardSize; wxSize boardSize;
...@@ -45,7 +46,7 @@ bool PCB_BASE_FRAME::ExportToPostScriptFile( const wxString& aFullFileName, int ...@@ -45,7 +46,7 @@ bool PCB_BASE_FRAME::ExportToPostScriptFile( const wxString& aFullFileName, int
return false; return false;
} }
if( g_PcbPlotOptions.m_PlotScale != 1.0 || g_PcbPlotOptions.m_AutoScale ) if( plotOpts.m_PlotScale != 1.0 || plotOpts.m_AutoScale )
{ {
// when scale != 1.0 we must calculate the position in page // when scale != 1.0 we must calculate the position in page
// because actual position has no meaning // because actual position has no meaning
...@@ -53,8 +54,8 @@ bool PCB_BASE_FRAME::ExportToPostScriptFile( const wxString& aFullFileName, int ...@@ -53,8 +54,8 @@ bool PCB_BASE_FRAME::ExportToPostScriptFile( const wxString& aFullFileName, int
} }
// Set default line width // Set default line width
if( g_PcbPlotOptions.m_PlotLineWidth < 1 ) if( plotOpts.m_PlotLineWidth < 1 )
g_PcbPlotOptions.m_PlotLineWidth = 1; plotOpts.m_PlotLineWidth = 1;
wxSize pageSizeIU = GetPageSizeIU(); wxSize pageSizeIU = GetPageSizeIU();
...@@ -76,7 +77,7 @@ bool PCB_BASE_FRAME::ExportToPostScriptFile( const wxString& aFullFileName, int ...@@ -76,7 +77,7 @@ bool PCB_BASE_FRAME::ExportToPostScriptFile( const wxString& aFullFileName, int
boardSize = bbbox.GetSize(); boardSize = bbbox.GetSize();
boardCenter = bbbox.Centre(); boardCenter = bbbox.Centre();
if( g_PcbPlotOptions.m_AutoScale ) // Optimum scale if( plotOpts.m_AutoScale ) // Optimum scale
{ {
// Fit to 80% of the page // Fit to 80% of the page
double Xscale = (paperSizeIU.x * 0.8) / boardSize.x; double Xscale = (paperSizeIU.x * 0.8) / boardSize.x;
...@@ -86,7 +87,7 @@ bool PCB_BASE_FRAME::ExportToPostScriptFile( const wxString& aFullFileName, int ...@@ -86,7 +87,7 @@ bool PCB_BASE_FRAME::ExportToPostScriptFile( const wxString& aFullFileName, int
} }
else else
{ {
scale = g_PcbPlotOptions.m_PlotScale * paperscale; scale = plotOpts.m_PlotScale * paperscale;
} }
if( center ) if( center )
...@@ -104,23 +105,26 @@ bool PCB_BASE_FRAME::ExportToPostScriptFile( const wxString& aFullFileName, int ...@@ -104,23 +105,26 @@ bool PCB_BASE_FRAME::ExportToPostScriptFile( const wxString& aFullFileName, int
plotter->SetPageSettings( *sheetPS ); plotter->SetPageSettings( *sheetPS );
plotter->set_scale_adjust( g_PcbPlotOptions.m_FineScaleAdjustX, // why did we have to change these settings?
g_PcbPlotOptions.m_FineScaleAdjustY ); SetPlotSettings( plotOpts );
plotter->set_plot_width_adj( g_PcbPlotOptions.m_FineWidthAdjust );
plotter->set_viewport( offset, scale, g_PcbPlotOptions.m_PlotMirror ); plotter->set_scale_adjust( plotOpts.m_FineScaleAdjustX,
plotter->set_default_line_width( g_PcbPlotOptions.m_PlotLineWidth ); plotOpts.m_FineScaleAdjustY );
plotter->set_plot_width_adj( plotOpts.m_FineWidthAdjust );
plotter->set_viewport( offset, scale, plotOpts.m_PlotMirror );
plotter->set_default_line_width( plotOpts.m_PlotLineWidth );
plotter->set_creator( wxT( "PCBNEW-PS" ) ); plotter->set_creator( wxT( "PCBNEW-PS" ) );
plotter->set_filename( aFullFileName ); plotter->set_filename( aFullFileName );
plotter->start_plot( output_file ); plotter->start_plot( output_file );
/* The worksheet is not significant with scale!=1... It is with paperscale!=1, anyway */ /* The worksheet is not significant with scale!=1... It is with paperscale!=1, anyway */
if( g_PcbPlotOptions.m_PlotFrameRef && !center ) if( plotOpts.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_PcbPlotOptions.m_PlotPSNegative ) if( plotOpts.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 );
......
...@@ -46,9 +46,6 @@ ...@@ -46,9 +46,6 @@
#include <wx/overlay.h> #include <wx/overlay.h>
extern int g_DrawDefaultLineThickness; // Default line thickness, used to draw Frame references
// Local functions: // Local functions:
/* Trace the pads of a module in sketch mode. /* Trace the pads of a module in sketch mode.
* Used to display pads when when the module visibility is set to not visible * Used to display pads when when the module visibility is set to not visible
......
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