Commit 27346c7e authored by charras's avatar charras

Pcbnew and Gerbview: Refactor dialogs for plot and print.

parent a1998410
...@@ -4,6 +4,15 @@ KiCad ChangeLog 2009 ...@@ -4,6 +4,15 @@ KiCad ChangeLog 2009
Please add newer entries at the top, list the date and your name with Please add newer entries at the top, list the date and your name with
email address. email address.
2010-Jan-01 UPDATE Jean-Pierre Charras <jean-pierre.charras@gipsa-lab.inpg.fr>
================================================================================
++pcbnew
Rewrite plot dialog using wxDialogBlocks.
Display layers list according to the Setup layers dialog order.
++Gerbview
Write Gerbview plot dialog using wxDialogBlocks.
Do not use anymore the Pcbnew one.
2009-Dec-30 UPDATE Jean-Pierre Charras <jean-pierre.charras@gipsa-lab.inpg.fr> 2009-Dec-30 UPDATE Jean-Pierre Charras <jean-pierre.charras@gipsa-lab.inpg.fr>
================================================================================ ================================================================================
++pcbnew ++pcbnew
......
...@@ -83,7 +83,6 @@ set(PCB_COMMON_SRCS ...@@ -83,7 +83,6 @@ set(PCB_COMMON_SRCS
../pcbnew/collectors.cpp ../pcbnew/collectors.cpp
../pcbnew/sel_layer.cpp ../pcbnew/sel_layer.cpp
../pcbnew/tracemod.cpp ../pcbnew/tracemod.cpp
../pcbnew/dialog_print_using_printer_base.cpp
) )
add_library(pcbcommon ${PCB_COMMON_SRCS}) add_library(pcbcommon ${PCB_COMMON_SRCS})
...@@ -41,11 +41,11 @@ static bool s_Print_Frame_Ref = true; ...@@ -41,11 +41,11 @@ static bool s_Print_Frame_Ref = true;
class DIALOG_PRINT_USING_PRINTER : public DIALOG_PRINT_USING_PRINTER_base class DIALOG_PRINT_USING_PRINTER : public DIALOG_PRINT_USING_PRINTER_base
{ {
private: private:
WinEDA_DrawFrame* m_Parent; WinEDA_SchematicFrame* m_Parent;
wxConfig* m_Config; wxConfig* m_Config;
public: public:
DIALOG_PRINT_USING_PRINTER( WinEDA_DrawFrame* parent ); DIALOG_PRINT_USING_PRINTER( WinEDA_SchematicFrame* parent );
~DIALOG_PRINT_USING_PRINTER() {}; ~DIALOG_PRINT_USING_PRINTER() {};
private: private:
...@@ -93,7 +93,7 @@ public: ...@@ -93,7 +93,7 @@ public:
/* Virtual function /* Virtual function
* Calls the print dialog for Eeschema * Calls the print dialog for Eeschema
*/ */
void WinEDA_DrawFrame::ToPrinter( wxCommandEvent& event ) void WinEDA_SchematicFrame::ToPrinter( wxCommandEvent& event )
{ {
if( g_PrintData == NULL ) // First call. creates print handlers if( g_PrintData == NULL ) // First call. creates print handlers
{ {
...@@ -115,7 +115,7 @@ void WinEDA_DrawFrame::ToPrinter( wxCommandEvent& event ) ...@@ -115,7 +115,7 @@ void WinEDA_DrawFrame::ToPrinter( wxCommandEvent& event )
} }
DIALOG_PRINT_USING_PRINTER::DIALOG_PRINT_USING_PRINTER( WinEDA_DrawFrame* parent ) : DIALOG_PRINT_USING_PRINTER::DIALOG_PRINT_USING_PRINTER( WinEDA_SchematicFrame* parent ) :
DIALOG_PRINT_USING_PRINTER_base( parent ) DIALOG_PRINT_USING_PRINTER_base( parent )
{ {
m_Parent = parent; m_Parent = parent;
......
...@@ -12,6 +12,8 @@ set(GERBVIEW_SRCS ...@@ -12,6 +12,8 @@ set(GERBVIEW_SRCS
controle.cpp controle.cpp
dcode.cpp dcode.cpp
deltrack.cpp deltrack.cpp
dialog_print_using_printer.cpp
dialog_print_using_printer_base.cpp
dummy_functions.cpp dummy_functions.cpp
edit.cpp edit.cpp
export_to_pcbnew.cpp export_to_pcbnew.cpp
...@@ -39,7 +41,6 @@ set(GERBVIEW_SRCS ...@@ -39,7 +41,6 @@ set(GERBVIEW_SRCS
set(GERBVIEW_EXTRA_SRCS set(GERBVIEW_EXTRA_SRCS
../share/setpage.cpp ../share/setpage.cpp
../pcbnew/dialog_print_using_printer.cpp
../pcbnew/printout_controler.cpp ../pcbnew/printout_controler.cpp
) )
......
/****************************************/
/* File: dialog_print_using_printer.cpp */
/****************************************/
// Set this to 1 if you want to test PostScript printing under MSW.
#define wxTEST_POSTSCRIPT_IN_MSW 1
#include "fctsys.h"
#include "appl_wxstruct.h"
#include "common.h"
#include "class_drawpanel.h"
#include "confirm.h"
#include "dialog_print_using_printer_base.h"
#include "printout_controler.h"
#include "gerbview.h"
#include "wxGerberFrame.h"
#include "pcbnew.h"
#include "wxPcbStruct.h"
#include "pcbplot.h"
#include "class_board_design_settings.h"
#define WIDTH_MAX_VALUE 1000
#define WIDTH_MIN_VALUE 1
static long s_SelectedLayers;
static double s_ScaleList[] =
{ 0, 0.5, 0.7, 0.999, 1.0, 1.4, 2.0, 3.0, 4.0 };
// Define min et max reasonnable values for print scale
#define MIN_SCALE 0.01
#define MAX_SCALE 100.0
// static print data and page setup data, to remember settings during the session
static wxPrintData* g_PrintData;
// Variables locales
static PRINT_PARAMETERS s_Parameters;
/* Dialog to print schematic. Class derived from DIALOG_PRINT_USING_PRINTER_base
* created by wxFormBuilder
*/
class DIALOG_PRINT_USING_PRINTER : public DIALOG_PRINT_USING_PRINTER_base
{
private:
WinEDA_GerberFrame* m_Parent;
wxConfig* m_Config;
wxCheckBox* m_BoxSelectLayer[32];
static bool m_ExcludeEdgeLayer;
public:
DIALOG_PRINT_USING_PRINTER( WinEDA_GerberFrame* parent );
~DIALOG_PRINT_USING_PRINTER() {};
private:
void OnCloseWindow( wxCloseEvent& event );
void OnInitDialog( wxInitDialogEvent& event );
void OnPrintSetup( wxCommandEvent& event );
void OnPrintPreview( wxCommandEvent& event );
void OnPrintButtonClick( wxCommandEvent& event );
void OnButtonCancelClick( wxCommandEvent& event ) { Close(); }
void SetPrintParameters( );
void SetPenWidth();
void InitValues( );
public:
bool IsMirrored() { return m_Print_Mirror->IsChecked(); }
bool PrintUsingSinglePage() { return m_PagesOption->GetSelection(); }
int SetLayerMaskFromListSelection();
};
bool DIALOG_PRINT_USING_PRINTER::m_ExcludeEdgeLayer;
/*******************************************************/
void WinEDA_GerberFrame::ToPrinter( wxCommandEvent& event )
/*******************************************************/
/* Virtual function:
* Display the print dialog
*/
{
if( g_PrintData == NULL ) // First print
{
g_PrintData = new wxPrintData();
if( !g_PrintData->Ok() )
{
DisplayError( this, _( "Error Init Printer info" ) );
}
g_PrintData->SetQuality( wxPRINT_QUALITY_HIGH ); // Default resolution = HIGHT;
g_PrintData->SetOrientation( DEFAULT_ORIENTATION_PAPER );
}
DIALOG_PRINT_USING_PRINTER* frame = new DIALOG_PRINT_USING_PRINTER( this );
frame->ShowModal(); frame->Destroy();
}
/*************************************************************************************/
DIALOG_PRINT_USING_PRINTER::DIALOG_PRINT_USING_PRINTER( WinEDA_GerberFrame* parent ) :
DIALOG_PRINT_USING_PRINTER_base( parent )
/*************************************************************************************/
{
m_Parent = parent;
m_Config = wxGetApp().m_EDA_Config;
InitValues( );
if( GetSizer() )
{
GetSizer()->SetSizeHints( this );
}
}
/************************************************************************/
void DIALOG_PRINT_USING_PRINTER::InitValues( )
/************************************************************************/
{
SetFocus();
int layer_max = NB_LAYERS;
wxString msg;
layer_max = 32;
m_ExcludeEdgeLayer = true; // no meaning in gerbview
/* Create layer list */
int mask = 1, ii;
for( ii = 0; ii < layer_max; ii++, mask <<= 1 )
{
msg = _( "Layer" );
msg << wxT( " " ) << ii + 1;
m_BoxSelectLayer[ii] = new wxCheckBox( this, -1, msg );
if( mask & s_SelectedLayers )
m_BoxSelectLayer[ii]->SetValue( TRUE );
if( ii < 16 )
m_leftLayersBoxSizer->Add( m_BoxSelectLayer[ii],
wxGROW | wxLEFT | wxRIGHT | wxTOP | wxADJUST_MINSIZE );
else
m_rightLayersBoxSizer->Add( m_BoxSelectLayer[ii],
wxGROW | wxLEFT | wxRIGHT | wxTOP | wxADJUST_MINSIZE );
}
// Read the scale adjust option
int scale_idx = 4; // default selected scale = ScaleList[4] = 1.000
if( m_Config )
{
m_Config->Read( OPTKEY_PLOT_LINEWIDTH_VALUE, &s_Parameters.m_PenMinSize );
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_SCALE, &scale_idx );
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);
// Test for a reasonnable scale value. Set to 1 if problem
if( s_Parameters.m_XScaleAdjust < MIN_SCALE ||
s_Parameters.m_YScaleAdjust < MIN_SCALE ||
s_Parameters.m_XScaleAdjust > MAX_SCALE ||
s_Parameters.m_YScaleAdjust > MAX_SCALE )
s_Parameters.m_XScaleAdjust = s_Parameters.m_YScaleAdjust = 1.0;
s_SelectedLayers = 0;
for( int layer = 0; layer<layer_max; ++layer )
{
wxString layerKey;
bool option;
layerKey.Printf( OPTKEY_LAYERBASE, layer );
option = false;
if( m_Config->Read( layerKey, &option ) )
{
m_BoxSelectLayer[layer]->SetValue( option );
if( option )
s_SelectedLayers |= 1 << layer;
}
}
}
// Disable checkboxes if the corresponding layer is not enabled
BOARD* board = ((WinEDA_BasePcbFrame*)m_Parent)->GetBoard();
for( int layer = 0; layer<NB_LAYERS; layer++, mask <<= 1 )
{
if( ! board->m_BoardSettings->IsLayerEnabled( layer ) )
{
m_BoxSelectLayer[layer]->Enable( false );
m_BoxSelectLayer[layer]->SetValue( false );
}
}
m_ScaleOption->SetSelection( scale_idx );
m_Print_Mirror->SetValue(s_Parameters.m_PrintMirror);
if( s_Parameters.m_Print_Black_and_White )
m_ModeColorOption->SetSelection( 1 );
else
m_ModeColorOption->SetSelection( 0 );
AddUnitSymbol( *m_TextPenWidth, g_UnitMetric );
m_DialogPenWidth->SetValue(
ReturnStringFromValue( g_UnitMetric, s_Parameters.m_PenMinSize, m_Parent->m_InternalUnits ) );
// Create scale adjust option
msg.Printf( wxT( "%f" ), s_Parameters.m_XScaleAdjust );
m_FineAdjustXscaleOpt->SetValue( msg );
msg.Printf( wxT( "%f" ), s_Parameters.m_YScaleAdjust );
m_FineAdjustYscaleOpt->SetValue( msg );
}
/**************************************************************/
int DIALOG_PRINT_USING_PRINTER::SetLayerMaskFromListSelection()
/**************************************************************/
{
int page_count;
s_Parameters.m_PrintMaskLayer = 0;
int ii;
for( ii = 0, page_count = 0; ii < LAYER_COUNT; ii++ )
{
if( m_BoxSelectLayer[ii]->IsChecked() )
{
page_count++;
s_Parameters.m_PrintMaskLayer |= 1 << ii;
}
}
s_Parameters.m_PageCount = page_count;
return page_count;
}
/********************************************************************/
void DIALOG_PRINT_USING_PRINTER::OnCloseWindow( wxCloseEvent& event )
/********************************************************************/
{
SetPrintParameters();
if( m_Config )
{
m_Config->Write( OPTKEY_PLOT_LINEWIDTH_VALUE, s_Parameters.m_PenMinSize );
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_SCALE, m_ScaleOption->GetSelection() );
m_Config->Write( OPTKEY_PRINT_PAGE_FRAME, s_Parameters.m_Print_Sheet_Ref);
m_Config->Write( OPTKEY_PRINT_MONOCHROME_MODE, s_Parameters.m_Print_Black_and_White);
wxString layerKey;
for( int layer = 0; layer < LAYER_COUNT; ++layer )
{
layerKey.Printf( OPTKEY_LAYERBASE, layer );
m_Config->Write( layerKey, m_BoxSelectLayer[layer]->IsChecked() );
}
}
EndModal( 0 );
}
/******************************************************************/
void DIALOG_PRINT_USING_PRINTER::SetPrintParameters( )
/******************************************************************/
{
s_Parameters.m_PrintMirror = m_Print_Mirror->GetValue();
s_Parameters.m_Print_Black_and_White =
m_ModeColorOption->GetSelection() != 0;
if( m_PagesOption )
s_Parameters.m_OptionPrintPage = m_PagesOption->GetSelection() != 0;
SetLayerMaskFromListSelection();
int idx = m_ScaleOption->GetSelection();
s_Parameters.m_PrintScale = s_ScaleList[idx];
g_pcb_plot_options.Scale = s_Parameters.m_PrintScale;
if( m_FineAdjustXscaleOpt )
{
if( s_Parameters.m_XScaleAdjust > MAX_SCALE ||
s_Parameters.m_YScaleAdjust > MAX_SCALE )
DisplayInfoMessage( NULL, _( "Warning: Scale option set to a very large value" ) );
m_FineAdjustXscaleOpt->GetValue().ToDouble( &s_Parameters.m_XScaleAdjust );
}
if( m_FineAdjustYscaleOpt )
{
// Test for a reasonnable scale value
if( s_Parameters.m_XScaleAdjust < MIN_SCALE ||
s_Parameters.m_YScaleAdjust < MIN_SCALE )
DisplayInfoMessage( NULL, _( "Warning: Scale option set to a very small value" ) );
m_FineAdjustYscaleOpt->GetValue().ToDouble( &s_Parameters.m_YScaleAdjust );
}
g_pcb_plot_options.ScaleAdjX = s_Parameters.m_XScaleAdjust;
g_pcb_plot_options.ScaleAdjX = s_Parameters.m_YScaleAdjust;
SetPenWidth();
}
/**********************************************/
void DIALOG_PRINT_USING_PRINTER::SetPenWidth()
/***********************************************/
/* Get the new pen width value, and verify min et max value
* NOTE: s_Parameters.m_PenMinSize is in internal units
*/
{
s_Parameters.m_PenMinSize = ReturnValueFromTextCtrl( *m_DialogPenWidth, m_Parent->m_InternalUnits );
if( s_Parameters.m_PenMinSize > WIDTH_MAX_VALUE )
{
s_Parameters.m_PenMinSize = WIDTH_MAX_VALUE;
}
if( s_Parameters.m_PenMinSize < WIDTH_MIN_VALUE )
{
s_Parameters.m_PenMinSize = WIDTH_MIN_VALUE;
}
m_DialogPenWidth->SetValue(
ReturnStringFromValue( g_UnitMetric, s_Parameters.m_PenMinSize, m_Parent->m_InternalUnits ) );
}
/**********************************************************/
void DIALOG_PRINT_USING_PRINTER::OnPrintSetup( wxCommandEvent& event )
/**********************************************************/
/* Open a dialog box for printer setup (printer options, page size ...)
*/
{
wxPrintDialogData printDialogData( *g_PrintData );
if( printDialogData.Ok() )
{
wxPrintDialog printerDialog( this, &printDialogData );
printerDialog.ShowModal();
*g_PrintData = printerDialog.GetPrintDialogData().GetPrintData();
}
else
DisplayError( this, _( "Printer Problem!" ) );
}
/************************************************************/
void DIALOG_PRINT_USING_PRINTER::OnPrintPreview( wxCommandEvent& event )
/************************************************************/
/* Open and display a previewer frame for printing
*/
{
SetPrintParameters( );
// Pass two printout objects: for preview, and possible printing.
wxString title = _( "Print Preview" );
wxPrintPreview* preview =
new wxPrintPreview( new BOARD_PRINTOUT_CONTROLER( s_Parameters, m_Parent, title ),
new BOARD_PRINTOUT_CONTROLER( s_Parameters, m_Parent, title ),
g_PrintData );
if( preview == NULL )
{
DisplayError( this, wxT( "OnPrintPreview() problem" ) );
return;
}
SetLayerMaskFromListSelection();
// If no layer selected, we have no plot. prompt user if it happens
// because he could think there is a bug in pcbnew:
if( s_Parameters.m_PrintMaskLayer == 0 )
{
DisplayError( this, _( "No layer selected" ) );
return;
}
// Uses the parent position and size.
// @todo uses last position and size ans store them when exit in m_Config
wxPoint WPos = m_Parent->GetPosition();
wxSize WSize = m_Parent->GetSize();
wxPreviewFrame* frame = new wxPreviewFrame( preview, this, title, WPos, WSize );
frame->Initialize();
frame->Show( TRUE );
}
/***************************************************************************/
void DIALOG_PRINT_USING_PRINTER::OnPrintButtonClick( wxCommandEvent& event )
/***************************************************************************/
/* Called on activate Print button
*/
{
SetPrintParameters( );
// If no layer selected, we have no plot. prompt user if it happens
// because he could think there is a bug in pcbnew:
if( s_Parameters.m_PrintMaskLayer == 0 )
{
DisplayError( this, _( "No layer selected" ) );
return;
}
wxPrintDialogData printDialogData( *g_PrintData );
wxPrinter printer( &printDialogData );
wxString title = _( "Print" );
BOARD_PRINTOUT_CONTROLER printout( s_Parameters, m_Parent, title );
#if !defined(__WINDOWS__) && !wxCHECK_VERSION(2,9,0)
wxDC* dc = printout.GetDC();
( (wxPostScriptDC*) dc )->SetResolution( 600 ); // Postscript DC resolution is 600 ppi
#endif
if( !printer.Print( this, &printout, TRUE ) )
{
if( wxPrinter::GetLastError() == wxPRINTER_ERROR )
DisplayError( this, _( "There was a problem printing" ) );
return;
}
else
{
*g_PrintData = printer.GetPrintDialogData().GetPrintData();
}
}
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Apr 16 2008)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#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 )
{
this->SetSizeHints( wxSize( -1,-1 ), wxDefaultSize );
wxBoxSizer* bMainSizer;
bMainSizer = new wxBoxSizer( wxHORIZONTAL );
wxStaticBoxSizer* sbLayersSizer;
sbLayersSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Layers:") ), wxVERTICAL );
wxBoxSizer* bleftSizer;
bleftSizer = new wxBoxSizer( wxHORIZONTAL );
m_leftLayersBoxSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Layers:") ), wxVERTICAL );
bleftSizer->Add( m_leftLayersBoxSizer, 1, wxALL, 5 );
m_rightLayersBoxSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Layers:") ), wxVERTICAL );
bleftSizer->Add( m_rightLayersBoxSizer, 1, wxALL, 5 );
sbLayersSizer->Add( bleftSizer, 1, wxEXPAND, 5 );
bMainSizer->Add( sbLayersSizer, 1, wxEXPAND, 5 );
wxBoxSizer* bmiddleLeftSizer;
bmiddleLeftSizer = new wxBoxSizer( wxVERTICAL );
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_ScaleOption = new wxRadioBox( this, wxID_ANY, _("Approx. Scale:"), wxDefaultPosition, wxDefaultSize, m_ScaleOptionNChoices, m_ScaleOptionChoices, 1, wxRA_SPECIFY_COLS );
m_ScaleOption->SetSelection( 3 );
bmiddleLeftSizer->Add( m_ScaleOption, 0, wxALL, 5 );
m_FineAdjustXscaleTitle = new wxStaticText( this, wxID_ANY, _("X Scale Adjust"), wxDefaultPosition, wxDefaultSize, 0 );
m_FineAdjustXscaleTitle->Wrap( -1 );
bmiddleLeftSizer->Add( m_FineAdjustXscaleTitle, 0, wxRIGHT|wxLEFT, 5 );
m_FineAdjustXscaleOpt = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_FineAdjustXscaleOpt->SetToolTip( _("Set X scale adjust for exact scale plotting") );
bmiddleLeftSizer->Add( m_FineAdjustXscaleOpt, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
m_FineAdjustYscaleTitle = new wxStaticText( this, wxID_ANY, _("Y Scale Adjust"), wxDefaultPosition, wxDefaultSize, 0 );
m_FineAdjustYscaleTitle->Wrap( -1 );
bmiddleLeftSizer->Add( m_FineAdjustYscaleTitle, 0, wxRIGHT|wxLEFT, 5 );
m_FineAdjustYscaleOpt = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_FineAdjustYscaleOpt->SetToolTip( _("Set Y scale adjust for exact scale plotting") );
bmiddleLeftSizer->Add( m_FineAdjustYscaleOpt, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
bMainSizer->Add( bmiddleLeftSizer, 0, wxEXPAND, 5 );
wxBoxSizer* bmiddleRightSizer;
bmiddleRightSizer = new wxBoxSizer( wxVERTICAL );
wxStaticBoxSizer* sbOptionsSizer;
sbOptionsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Options:") ), wxVERTICAL );
m_TextPenWidth = new wxStaticText( this, wxID_ANY, _("Pen Width Mini"), wxDefaultPosition, wxDefaultSize, 0 );
m_TextPenWidth->Wrap( -1 );
sbOptionsSizer->Add( m_TextPenWidth, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_DialogPenWidth = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_DialogPenWidth->SetToolTip( _("Selection of the minimum pen thickness used to draw items.") );
sbOptionsSizer->Add( m_DialogPenWidth, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
m_Print_Mirror = new wxCheckBox( this, wxID_ANY, _("Mirror"), wxDefaultPosition, wxDefaultSize, 0 );
sbOptionsSizer->Add( m_Print_Mirror, 0, wxALL, 5 );
bmiddleRightSizer->Add( sbOptionsSizer, 0, wxEXPAND|wxALL, 5 );
wxString m_ModeColorOptionChoices[] = { _("Color"), _("Black and white") };
int m_ModeColorOptionNChoices = sizeof( m_ModeColorOptionChoices ) / sizeof( wxString );
m_ModeColorOption = new wxRadioBox( this, wxID_PRINT_MODE, _("Print Mode"), wxDefaultPosition, wxDefaultSize, m_ModeColorOptionNChoices, m_ModeColorOptionChoices, 1, wxRA_SPECIFY_COLS );
m_ModeColorOption->SetSelection( 1 );
m_ModeColorOption->SetToolTip( _("Choose if you wand 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 );
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 );
m_PagesOption->SetSelection( 0 );
bmiddleRightSizer->Add( m_PagesOption, 0, wxALL|wxEXPAND, 5 );
bMainSizer->Add( bmiddleRightSizer, 0, wxEXPAND, 5 );
wxBoxSizer* b_buttonsSizer;
b_buttonsSizer = new wxBoxSizer( wxVERTICAL );
m_buttonOption = new wxButton( this, wxID_PRINT_OPTIONS, _("Page Options"), wxDefaultPosition, wxDefaultSize, 0 );
b_buttonsSizer->Add( m_buttonOption, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
m_buttonPreview = new wxButton( this, wxID_PREVIEW, _("Preview"), wxDefaultPosition, wxDefaultSize, 0 );
b_buttonsSizer->Add( m_buttonPreview, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
m_buttonPrint = new wxButton( this, wxID_PRINT_ALL, _("Print"), wxDefaultPosition, wxDefaultSize, 0 );
b_buttonsSizer->Add( m_buttonPrint, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
m_buttonQuit = new wxButton( this, wxID_CANCEL, _("Close"), wxDefaultPosition, wxDefaultSize, 0 );
b_buttonsSizer->Add( m_buttonQuit, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
bMainSizer->Add( b_buttonsSizer, 0, wxALIGN_CENTER_VERTICAL, 5 );
this->SetSizer( bMainSizer );
this->Layout();
// Connect Events
this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_PRINT_USING_PRINTER_base::OnCloseWindow ) );
m_buttonOption->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_base::OnPrintSetup ), NULL, this );
m_buttonPreview->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_base::OnPrintPreview ), NULL, this );
m_buttonPrint->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_base::OnPrintButtonClick ), NULL, this );
m_buttonQuit->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_base::OnButtonCancelClick ), NULL, this );
}
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_buttonOption->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_base::OnPrintSetup ), 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 );
}
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<wxFormBuilder_Project>
<FileVersion major="1" minor="9" />
<object class="Project" expanded="1">
<property name="class_decoration"></property>
<property name="code_generation">C++</property>
<property name="disconnect_events">1</property>
<property name="encoding">UTF-8</property>
<property name="event_generation">connect</property>
<property name="file">dialog_print_using_printer_base</property>
<property name="first_id">1000</property>
<property name="help_provider">none</property>
<property name="internationalize">1</property>
<property name="name">DialogPrint_base</property>
<property name="namespace"></property>
<property name="path">.</property>
<property name="precompiled_header"></property>
<property name="relative_path">1</property>
<property name="use_enum">1</property>
<property name="use_microsoft_bom">0</property>
<object class="Dialog" expanded="1">
<property name="bg"></property>
<property name="center"></property>
<property name="context_help"></property>
<property name="enabled">1</property>
<property name="extra_style"></property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="maximum_size"></property>
<property name="minimum_size">-1,-1</property>
<property name="name">DIALOG_PRINT_USING_PRINTER_base</property>
<property name="pos"></property>
<property name="size">551,314</property>
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
<property name="subclass"></property>
<property name="title">Print</property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnActivate"></event>
<event name="OnActivateApp"></event>
<event name="OnChar"></event>
<event name="OnClose">OnCloseWindow</event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnHibernate"></event>
<event name="OnIconize"></event>
<event name="OnIdle"></event>
<event name="OnInitDialog"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
<object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property>
<property name="name">bMainSizer</property>
<property name="orient">wxHORIZONTAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">1</property>
<object class="wxStaticBoxSizer" expanded="1">
<property name="id">wxID_ANY</property>
<property name="label">Layers:</property>
<property name="minimum_size"></property>
<property name="name">sbLayersSizer</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">none</property>
<event name="OnUpdateUI"></event>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">1</property>
<object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property>
<property name="name">bleftSizer</property>
<property name="orient">wxHORIZONTAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="proportion">1</property>
<object class="wxStaticBoxSizer" expanded="1">
<property name="id">wxID_ANY</property>
<property name="label">Layers:</property>
<property name="minimum_size"></property>
<property name="name">m_leftLayersBoxSizer</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">protected</property>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="proportion">1</property>
<object class="wxStaticBoxSizer" expanded="1">
<property name="id">wxID_ANY</property>
<property name="label">Layers:</property>
<property name="minimum_size"></property>
<property name="name">m_rightLayersBoxSizer</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">protected</property>
<event name="OnUpdateUI"></event>
</object>
</object>
</object>
</object>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property>
<property name="name">bmiddleLeftSizer</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="proportion">0</property>
<object class="wxRadioBox" expanded="1">
<property name="bg"></property>
<property name="choices">&quot;fit in page&quot; &quot;Scale 0.5&quot; &quot;Scale 0.7&quot; &quot;Approx. Scale 1&quot; &quot;Accurate Scale 1&quot; &quot;Scale 1.4&quot; &quot;Scale 2&quot; &quot;Scale 3&quot; &quot;Scale 4&quot;</property>
<property name="context_help"></property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Approx. Scale:</property>
<property name="majorDimension">1</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">m_ScaleOption</property>
<property name="permission">protected</property>
<property name="pos"></property>
<property name="selection">3</property>
<property name="size"></property>
<property name="style">wxRA_SPECIFY_COLS</property>
<property name="subclass"></property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRadioBox"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxRIGHT|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxStaticText" expanded="1">
<property name="bg"></property>
<property name="context_help"></property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">X Scale Adjust</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">m_FineAdjustXscaleTitle</property>
<property name="permission">protected</property>
<property name="pos"></property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<property name="wrap">-1</property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxTextCtrl" expanded="1">
<property name="bg"></property>
<property name="context_help"></property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="maximum_size"></property>
<property name="maxlength">0</property>
<property name="minimum_size"></property>
<property name="name">m_FineAdjustXscaleOpt</property>
<property name="permission">protected</property>
<property name="pos"></property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="tooltip">Set X scale adjust for exact scale plotting</property>
<property name="value"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnText"></event>
<event name="OnTextEnter"></event>
<event name="OnTextMaxLen"></event>
<event name="OnTextURL"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxRIGHT|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxStaticText" expanded="1">
<property name="bg"></property>
<property name="context_help"></property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Y Scale Adjust</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">m_FineAdjustYscaleTitle</property>
<property name="permission">protected</property>
<property name="pos"></property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<property name="wrap">-1</property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxTextCtrl" expanded="1">
<property name="bg"></property>
<property name="context_help"></property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="maximum_size"></property>
<property name="maxlength">0</property>
<property name="minimum_size"></property>
<property name="name">m_FineAdjustYscaleOpt</property>
<property name="permission">protected</property>
<property name="pos"></property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="tooltip">Set Y scale adjust for exact scale plotting</property>
<property name="value"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnText"></event>
<event name="OnTextEnter"></event>
<event name="OnTextMaxLen"></event>
<event name="OnTextURL"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property>
<property name="name">bmiddleRightSizer</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND|wxALL</property>
<property name="proportion">0</property>
<object class="wxStaticBoxSizer" expanded="1">
<property name="id">wxID_ANY</property>
<property name="label">Options:</property>
<property name="minimum_size"></property>
<property name="name">sbOptionsSizer</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">none</property>
<event name="OnUpdateUI"></event>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxTOP|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxStaticText" expanded="1">
<property name="bg"></property>
<property name="context_help"></property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Pen Width Mini</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">m_TextPenWidth</property>
<property name="permission">protected</property>
<property name="pos"></property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<property name="wrap">-1</property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxTextCtrl" expanded="1">
<property name="bg"></property>
<property name="context_help"></property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="maximum_size"></property>
<property name="maxlength">0</property>
<property name="minimum_size">-1,-1</property>
<property name="name">m_DialogPenWidth</property>
<property name="permission">protected</property>
<property name="pos"></property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="tooltip">Selection of the minimum pen thickness used to draw items.</property>
<property name="value"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnText"></event>
<event name="OnTextEnter"></event>
<event name="OnTextMaxLen"></event>
<event name="OnTextURL"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="proportion">0</property>
<object class="wxCheckBox" expanded="1">
<property name="bg"></property>
<property name="checked">0</property>
<property name="context_help"></property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Mirror</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">m_Print_Mirror</property>
<property name="permission">protected</property>
<property name="pos"></property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnCheckBox"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxRadioBox" expanded="1">
<property name="bg"></property>
<property name="choices">&quot;Color&quot; &quot;Black and white&quot;</property>
<property name="context_help"></property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_PRINT_MODE</property>
<property name="label">Print Mode</property>
<property name="majorDimension">1</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">m_ModeColorOption</property>
<property name="permission">protected</property>
<property name="pos"></property>
<property name="selection">1</property>
<property name="size"></property>
<property name="style">wxRA_SPECIFY_COLS</property>
<property name="subclass"></property>
<property name="tooltip">Choose if you wand 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="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRadioBox"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxRadioBox" expanded="1">
<property name="bg"></property>
<property name="choices">&quot;1 Page per Layer&quot; &quot;Single page&quot;</property>
<property name="context_help"></property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_PAGE_MODE</property>
<property name="label">Page Print</property>
<property name="majorDimension">1</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">m_PagesOption</property>
<property name="permission">protected</property>
<property name="pos"></property>
<property name="selection">0</property>
<property name="size"></property>
<property name="style">wxRA_SPECIFY_COLS</property>
<property name="subclass"></property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRadioBox"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL</property>
<property name="proportion">0</property>
<object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property>
<property name="name">b_buttonsSizer</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL|wxALIGN_CENTER_HORIZONTAL</property>
<property name="proportion">0</property>
<object class="wxButton" expanded="1">
<property name="bg"></property>
<property name="context_help"></property>
<property name="default">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_PRINT_OPTIONS</property>
<property name="label">Page Options</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">m_buttonOption</property>
<property name="permission">protected</property>
<property name="pos"></property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnButtonClick">OnPrintSetup</event>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL|wxALIGN_CENTER_HORIZONTAL</property>
<property name="proportion">0</property>
<object class="wxButton" expanded="1">
<property name="bg"></property>
<property name="context_help"></property>
<property name="default">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_PREVIEW</property>
<property name="label">Preview</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">m_buttonPreview</property>
<property name="permission">protected</property>
<property name="pos"></property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnButtonClick">OnPrintPreview</event>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL|wxALIGN_CENTER_HORIZONTAL</property>
<property name="proportion">0</property>
<object class="wxButton" expanded="1">
<property name="bg"></property>
<property name="context_help"></property>
<property name="default">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_PRINT_ALL</property>
<property name="label">Print</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">m_buttonPrint</property>
<property name="permission">protected</property>
<property name="pos"></property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnButtonClick">OnPrintButtonClick</event>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL|wxALIGN_CENTER_HORIZONTAL</property>
<property name="proportion">0</property>
<object class="wxButton" expanded="1">
<property name="bg"></property>
<property name="context_help"></property>
<property name="default">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_CANCEL</property>
<property name="label">Close</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">m_buttonQuit</property>
<property name="permission">protected</property>
<property name="pos"></property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnButtonClick">OnButtonCancelClick</event>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
</object>
</object>
</object>
</object>
</object>
</wxFormBuilder_Project>
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Apr 16 2008)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#ifndef __dialog_print_using_printer_base__
#define __dialog_print_using_printer_base__
#include <wx/intl.h>
#include <wx/string.h>
#include <wx/sizer.h>
#include <wx/statbox.h>
#include <wx/gdicmn.h>
#include <wx/radiobox.h>
#include <wx/font.h>
#include <wx/colour.h>
#include <wx/settings.h>
#include <wx/stattext.h>
#include <wx/textctrl.h>
#include <wx/checkbox.h>
#include <wx/button.h>
#include <wx/dialog.h>
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
/// Class DIALOG_PRINT_USING_PRINTER_base
///////////////////////////////////////////////////////////////////////////////
class DIALOG_PRINT_USING_PRINTER_base : public wxDialog
{
private:
protected:
enum
{
wxID_PRINT_MODE = 1000,
wxID_PAGE_MODE,
wxID_PRINT_OPTIONS,
wxID_PRINT_ALL,
};
wxStaticBoxSizer* m_leftLayersBoxSizer;
wxStaticBoxSizer* m_rightLayersBoxSizer;
wxRadioBox* m_ScaleOption;
wxStaticText* m_FineAdjustXscaleTitle;
wxTextCtrl* m_FineAdjustXscaleOpt;
wxStaticText* m_FineAdjustYscaleTitle;
wxTextCtrl* m_FineAdjustYscaleOpt;
wxStaticText* m_TextPenWidth;
wxTextCtrl* m_DialogPenWidth;
wxCheckBox* m_Print_Mirror;
wxRadioBox* m_ModeColorOption;
wxRadioBox* m_PagesOption;
wxButton* m_buttonOption;
wxButton* m_buttonPreview;
wxButton* m_buttonPrint;
wxButton* m_buttonQuit;
// Virtual event handlers, overide them in your derived class
virtual void OnCloseWindow( wxCloseEvent& event ){ event.Skip(); }
virtual void OnPrintSetup( wxCommandEvent& event ){ event.Skip(); }
virtual void OnPrintPreview( wxCommandEvent& event ){ event.Skip(); }
virtual void OnPrintButtonClick( wxCommandEvent& event ){ event.Skip(); }
virtual void OnButtonCancelClick( wxCommandEvent& event ){ event.Skip(); }
public:
DIALOG_PRINT_USING_PRINTER_base( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Print"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 551,314 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_PRINT_USING_PRINTER_base();
};
#endif //__dialog_print_using_printer_base__
...@@ -116,7 +116,7 @@ bool WinEDA_GerberFrame::LoadOneGerberFile( const wxString& FullFileName, ...@@ -116,7 +116,7 @@ bool WinEDA_GerberFrame::LoadOneGerberFile( const wxString& FullFileName,
*/ */
filetypes = _( "Gerber files (.gb* .gt* .lgr .ger .pho)" ); filetypes = _( "Gerber files (.gb* .gt* .lgr .ger .pho)" );
filetypes << wxT("|"); filetypes << wxT("|");
filetypes += wxT("*.gb*;*.GB*;.gt*;.GT*;.gko;.GKO;*.GPB;*.gpb;*.lgr;*.LGR;*.ger;*.GER;*.pho;*.PHO" ); filetypes += wxT("*.gb*;*.GB*;*.gt*;*.GT*;*.gko;*.GKO;*.GPB;*.gpb;*.lgr;*.LGR;*.ger;*.GER;*.pho;*.PHO" );
filetypes << wxT("|"); filetypes << wxT("|");
/* Special gerber filetypes */ /* Special gerber filetypes */
......
...@@ -19,9 +19,8 @@ PCB_Plot_Options g_pcb_plot_options; ...@@ -19,9 +19,8 @@ PCB_Plot_Options g_pcb_plot_options;
/* void WinEDA_BasePcbFrame::ToPlotter(wxCommandEvent& event) */ /* void WinEDA_BasePcbFrame::ToPlotter(wxCommandEvent& event) */
/***************************************************************/ /***************************************************************/
void WinEDA_BasePcbFrame::ToPlotter(wxCommandEvent& event) /** TODO */
void WinEDA_GerberFrame::ToPlotter(wxCommandEvent& event)
{ {
// WinEDA_PlotFrame * frame = new WinEDA_PlotFrame(this);
// frame->ShowModal(); frame->Destroy();
} }
...@@ -11,6 +11,8 @@ ...@@ -11,6 +11,8 @@
#define OPTKEY_PRINT_X_FINESCALE_ADJ wxT( "PrintXFineScaleAdj" ) #define OPTKEY_PRINT_X_FINESCALE_ADJ wxT( "PrintXFineScaleAdj" )
#define OPTKEY_PRINT_Y_FINESCALE_ADJ wxT( "PrintYFineScaleAdj" ) #define OPTKEY_PRINT_Y_FINESCALE_ADJ wxT( "PrintYFineScaleAdj" )
#define OPTKEY_PRINT_SCALE wxT( "PrintScale" ) #define OPTKEY_PRINT_SCALE wxT( "PrintScale" )
#define OPTKEY_PRINT_PAGE_FRAME wxT( "PrintPageFrame" )
#define OPTKEY_PRINT_MONOCHROME_MODE wxT( "PrintMonochrome" )
/* Plot Options : */ /* Plot Options : */
struct PCB_Plot_Options struct PCB_Plot_Options
...@@ -18,8 +20,6 @@ struct PCB_Plot_Options ...@@ -18,8 +20,6 @@ struct PCB_Plot_Options
bool Exclude_Edges_Pcb; bool Exclude_Edges_Pcb;
int PlotLine_Width; int PlotLine_Width;
bool Plot_Frame_Ref; // True to plot/print frame references bool Plot_Frame_Ref; // True to plot/print frame references
bool DrawViaOnMaskLayer; // True if vias are drawn on Mask layer
// (ie protected by mask)
int Plot_Mode; int Plot_Mode;
bool Plot_Set_MIROIR; bool Plot_Set_MIROIR;
bool Sel_Rotate_Window; bool Sel_Rotate_Window;
...@@ -31,22 +31,14 @@ struct PCB_Plot_Options ...@@ -31,22 +31,14 @@ struct PCB_Plot_Options
int PlotPSColorOpt; // True for color Postscript output int PlotPSColorOpt; // True for color Postscript output
bool Plot_PS_Negative; // True to create a negative board ps plot bool Plot_PS_Negative; // True to create a negative board ps plot
/* Settings to trace the various items in silkscreen. */
bool Sel_Texte_Reference;
bool Sel_Texte_Valeur;
bool Sel_Texte_Divers;
bool Sel_Texte_Invisible;
bool PlotPadsOnSilkLayer;
/* Plot pads even outside the layer (useful for silkscreen) */
bool Plot_Pads_All_Layers;
/* id for plot format (see enum PlotFormat in plot_common.h) */ /* id for plot format (see enum PlotFormat in plot_common.h) */
int PlotFormat; int PlotFormat;
int PlotOrient; int PlotOrient;
int PlotScaleOpt; int PlotScaleOpt;
int DrillShapeOpt; int DrillShapeOpt;
double Scale_X; double Scale;
double Scale_Y; double ScaleAdjX;
double ScaleAdjY;
}; };
extern PCB_Plot_Options g_pcb_plot_options; extern PCB_Plot_Options g_pcb_plot_options;
......
/***********************************************************/ /***********************************************************/
/* wxGerberStruct.h: */ /* wxGerberFrame.h: */
/***********************************************************/ /***********************************************************/
#ifndef WX_GERBER_STRUCT_H #ifndef WX_GERBER_STRUCT_H
...@@ -145,6 +145,18 @@ public: ...@@ -145,6 +145,18 @@ public:
void InstallDrillFrame( wxCommandEvent& event ); void InstallDrillFrame( wxCommandEvent& event );
void ToPostProcess( wxCommandEvent& event ); void ToPostProcess( wxCommandEvent& event );
/** Function ToPlotter
* Open a dialog frame to create plot and drill files
* relative to the current board
*/
void ToPlotter( wxCommandEvent& event );
/** Function ToPrinter
* Open a dialog frame to print layers
*/
void ToPrinter( wxCommandEvent& event );
void Genere_HPGL( const wxString& FullFileName, int Layers ); void Genere_HPGL( const wxString& FullFileName, int Layers );
void Genere_GERBER( const wxString& FullFileName, int Layers ); void Genere_GERBER( const wxString& FullFileName, int Layers );
void Genere_PS( const wxString& FullFileName, int Layers ); void Genere_PS( const wxString& FullFileName, int Layers );
......
...@@ -69,6 +69,9 @@ ...@@ -69,6 +69,9 @@
#define ECO2_N 27 #define ECO2_N 27
#define EDGE_N 28 #define EDGE_N 28
#define LAST_NO_COPPER_LAYER 28 #define LAST_NO_COPPER_LAYER 28
#define UNUSED_LAYER_29 29
#define UNUSED_LAYER_30 30
#define UNUSED_LAYER_31 31
#define NB_LAYERS (LAST_NO_COPPER_LAYER + 1) #define NB_LAYERS (LAST_NO_COPPER_LAYER + 1)
#define LAYER_COUNT 32 #define LAYER_COUNT 32
...@@ -116,6 +119,28 @@ ...@@ -116,6 +119,28 @@
#define INTERNAL_LAYERS 0x00007FFE #define INTERNAL_LAYERS 0x00007FFE
#define EXTERNAL_LAYERS 0x00008001 #define EXTERNAL_LAYERS 0x00008001
// layers order in dialogs (plot, print and toolbars)
// in same order than in setup layers dialog
// (Front or Top to Back or Bottom)
#define DECLARE_LAYERS_ORDER_LIST(list) int list[LAYER_COUNT] =\
{ LAYER_N_FRONT,\
LAYER_N_15, LAYER_N_14, LAYER_N_13, LAYER_N_12,\
LAYER_N_11, LAYER_N_10, LAYER_N_9, LAYER_N_8,\
LAYER_N_7, LAYER_N_6, LAYER_N_5, LAYER_N_4,\
LAYER_N_3, LAYER_N_2,\
LAYER_N_BACK,\
ADHESIVE_N_FRONT , ADHESIVE_N_BACK,\
SOLDERPASTE_N_FRONT, SOLDERPASTE_N_BACK,\
SILKSCREEN_N_FRONT, SILKSCREEN_N_BACK,\
SOLDERMASK_N_FRONT, SOLDERMASK_N_BACK,\
DRAW_N,\
COMMENT_N,\
ECO1_N, ECO2_N,\
EDGE_N,\
UNUSED_LAYER_29, UNUSED_LAYER_30, UNUSED_LAYER_31\
};
class NETINFO_ITEM; class NETINFO_ITEM;
class MARKER_PCB; class MARKER_PCB;
class RATSNEST_ITEM; class RATSNEST_ITEM;
......
...@@ -305,20 +305,21 @@ public: ...@@ -305,20 +305,21 @@ public:
void RecalculateAllTracksNetcode(); void RecalculateAllTracksNetcode();
/* Plotting functions: /* Plotting functions:
* Return true if OK, false if the file is not created (or has a problem)
*/ */
void ToPlotter( wxCommandEvent& event );
void Genere_GERBER( const wxString& FullFileName, bool Genere_GERBER( const wxString& FullFileName,
int Layer, int Layer,
bool PlotOriginIsAuxAxis, bool PlotOriginIsAuxAxis,
GRTraceMode trace_mode ); GRTraceMode trace_mode );
void Genere_HPGL( const wxString& FullFileName, bool Genere_HPGL( const wxString& FullFileName,
int Layer, int Layer,
GRTraceMode trace_mode ); GRTraceMode trace_mode );
void Genere_PS( const wxString& FullFileName, bool Genere_PS( const wxString& FullFileName,
int Layer, int Layer,
bool useA4, bool useA4,
GRTraceMode trace_mode ); GRTraceMode trace_mode );
void Genere_DXF( const wxString& FullFileName, bool Genere_DXF( const wxString& FullFileName,
int Layer, int Layer,
GRTraceMode trace_mode ); GRTraceMode trace_mode );
void Plot_Layer( PLOTTER* plotter, void Plot_Layer( PLOTTER* plotter,
......
...@@ -202,6 +202,11 @@ public: ...@@ -202,6 +202,11 @@ public:
*/ */
void SetSheetNumberAndCount(); void SetSheetNumberAndCount();
/** function ToPrinter
* Install the print dialog
*/
void ToPrinter( wxCommandEvent& event );
// Plot functions: // Plot functions:
void ToPlot_PS( wxCommandEvent& event ); void ToPlot_PS( wxCommandEvent& event );
void ToPlot_HPGL( wxCommandEvent& event ); void ToPlot_HPGL( wxCommandEvent& event );
......
...@@ -87,6 +87,17 @@ public: ...@@ -87,6 +87,17 @@ public:
~WinEDA_PcbFrame(); ~WinEDA_PcbFrame();
/** Function ToPlotter
* Open a dialog frame to create plot and drill files
* relative to the current board
*/
void ToPlotter( wxCommandEvent& event );
/** function ToPrinter
* Install the print dialog
*/
void ToPrinter( wxCommandEvent& event );
void GetKicadAbout( wxCommandEvent& event ); void GetKicadAbout( wxCommandEvent& event );
// Configurations: // Configurations:
...@@ -183,9 +194,9 @@ public: ...@@ -183,9 +194,9 @@ public:
*commands like move *commands like move
*/ */
virtual void SaveCopyInUndoList( BOARD_ITEM* aItemToCopy, virtual void SaveCopyInUndoList( BOARD_ITEM* aItemToCopy,
UndoRedoOpType aTypeCommand, UndoRedoOpType aTypeCommand,
const wxPoint& aTransformPoint = const wxPoint& aTransformPoint =
wxPoint( 0, 0 ) ); wxPoint( 0, 0 ) );
/** Function SaveCopyInUndoList (overloaded). /** Function SaveCopyInUndoList (overloaded).
* Creates a new entry in undo list of commands. * Creates a new entry in undo list of commands.
...@@ -196,9 +207,9 @@ public: ...@@ -196,9 +207,9 @@ public:
*commands like move *commands like move
*/ */
virtual void SaveCopyInUndoList( PICKED_ITEMS_LIST& aItemsList, virtual void SaveCopyInUndoList( PICKED_ITEMS_LIST& aItemsList,
UndoRedoOpType aTypeCommand, UndoRedoOpType aTypeCommand,
const wxPoint& aTransformPoint = const wxPoint& aTransformPoint =
wxPoint( 0, 0 ) ); wxPoint( 0, 0 ) );
/** Function PutDataInPreviousState() /** Function PutDataInPreviousState()
* Used in undo or redo command. * Used in undo or redo command.
...@@ -859,10 +870,10 @@ public: ...@@ -859,10 +870,10 @@ public:
* @param aTransformPoint = the reference point of the transformation, for * @param aTransformPoint = the reference point of the transformation, for
* commands like move * commands like move
*/ */
virtual void SaveCopyInUndoList( BOARD_ITEM* aItem, virtual void SaveCopyInUndoList( BOARD_ITEM* aItem,
UndoRedoOpType aTypeCommand, UndoRedoOpType aTypeCommand,
const wxPoint& aTransformPoint = const wxPoint& aTransformPoint =
wxPoint( 0, 0 ) ); wxPoint( 0, 0 ) );
/** Function SaveCopyInUndoList (overloaded). /** Function SaveCopyInUndoList (overloaded).
* Creates a new entry in undo list of commands. * Creates a new entry in undo list of commands.
...@@ -873,25 +884,25 @@ public: ...@@ -873,25 +884,25 @@ public:
* commands like move * commands like move
*/ */
virtual void SaveCopyInUndoList( PICKED_ITEMS_LIST& aItemsList, virtual void SaveCopyInUndoList( PICKED_ITEMS_LIST& aItemsList,
UndoRedoOpType aTypeCommand, UndoRedoOpType aTypeCommand,
const wxPoint& aTransformPoint = const wxPoint& aTransformPoint =
wxPoint( 0, 0 ) ); wxPoint( 0, 0 ) );
private: private:
void GetComponentFromUndoList( wxCommandEvent& event ); void GetComponentFromUndoList( wxCommandEvent& event );
void GetComponentFromRedoList( wxCommandEvent& event ); void GetComponentFromRedoList( wxCommandEvent& event );
public: public:
// Footprint edition // Footprint edition
void Place_Ancre( MODULE* module ); void Place_Ancre( MODULE* module );
void RemoveStruct( EDA_BaseStruct* Item ); void RemoveStruct( EDA_BaseStruct* Item );
void Transform( MODULE* module, int transform ); void Transform( MODULE* module, int transform );
// loading Footprint // loading Footprint
MODULE* Import_Module( wxDC* DC ); MODULE* Import_Module( wxDC* DC );
void Export_Module( MODULE* ptmod, bool createlib ); void Export_Module( MODULE* ptmod, bool createlib );
void Load_Module_From_BOARD( MODULE* Module ); void Load_Module_From_BOARD( MODULE* Module );
// functions to edit footprint edges // functions to edit footprint edges
......
...@@ -269,7 +269,6 @@ public: ...@@ -269,7 +269,6 @@ public:
/* Return the current zoom level */ /* Return the current zoom level */
int GetZoom( void ); int GetZoom( void );
void ToPrinter( wxCommandEvent& event );
void SVG_Print( wxCommandEvent& event ); void SVG_Print( wxCommandEvent& event );
void TraceWorkSheet( wxDC* DC, BASE_SCREEN* screen, int line_width ); void TraceWorkSheet( wxDC* DC, BASE_SCREEN* screen, int line_width );
......
No preview for this file type
...@@ -2,8 +2,8 @@ msgid "" ...@@ -2,8 +2,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: kicad\n" "Project-Id-Version: kicad\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-12-30 18:30+0100\n" "POT-Creation-Date: 2010-01-01 10:53+0100\n"
"PO-Revision-Date: 2009-12-30 18:34+0100\n" "PO-Revision-Date: 2010-01-01 10:54+0100\n"
"Last-Translator: \n" "Last-Translator: \n"
"Language-Team: kicad team <jean-pierre.charras@ujf-grenoble.fr>\n" "Language-Team: kicad team <jean-pierre.charras@ujf-grenoble.fr>\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
...@@ -1525,10 +1525,6 @@ msgstr "Rot de la forme" ...@@ -1525,10 +1525,6 @@ msgstr "Rot de la forme"
msgid "3D Shape:" msgid "3D Shape:"
msgstr "Forme 3D:" msgstr "Forme 3D:"
#: pcbnew/plotdxf.cpp:31
msgid "File"
msgstr "Fichier"
#: pcbnew/set_color.cpp:278 #: pcbnew/set_color.cpp:278
#: pcbnew/set_color.cpp:304 #: pcbnew/set_color.cpp:304
msgid "Show None" msgid "Show None"
...@@ -2423,244 +2419,20 @@ msgstr "&3D Visu" ...@@ -2423,244 +2419,20 @@ msgstr "&3D Visu"
msgid "&Help" msgid "&Help"
msgstr "&Aide" msgstr "&Aide"
#: pcbnew/pcbplot.cpp:184 #: pcbnew/pcbplot.cpp:583
#: pcbnew/pcbplot.cpp:328
msgid "Plot"
msgstr "Tracer"
#: pcbnew/pcbplot.cpp:232
msgid "Plot Format"
msgstr "Format de tracé"
#: pcbnew/pcbplot.cpp:243
msgid "HPGL Options:"
msgstr "Options HPGL:"
#: pcbnew/pcbplot.cpp:248
msgid "Pen size"
msgstr "Diam plume"
#: pcbnew/pcbplot.cpp:255
msgid "Pen Speed (cm/s)"
msgstr "Vitesse Plume ( cm/s )"
#: pcbnew/pcbplot.cpp:259
msgid "Set pen speed in cm/s"
msgstr "Ajuster Vitesse plume en centimètres par seconde"
#: pcbnew/pcbplot.cpp:261
msgid "Pen ovr"
msgstr "Recouvrement"
#: pcbnew/pcbplot.cpp:267
msgid "Set plot overlay for filling"
msgstr "Ajuste recouvrement des tracés pour les remplissages"
#: pcbnew/pcbplot.cpp:269
msgid "Line width"
msgstr "Epaisseur ligne"
#: pcbnew/pcbplot.cpp:276
msgid "Set lines width used to plot in sketch mode and plot pads outlines on silk screen layers"
msgstr "Ajuste l'épaisseur des lignes utilisées pour tracer en mode contour et pour les contours des pads sur les couches de sérigraphie"
#: pcbnew/pcbplot.cpp:281
msgid "Absolute"
msgstr "Absolu"
#: pcbnew/pcbplot.cpp:281
msgid "Auxiliary axis"
msgstr "Axe Auxiliaire"
#: pcbnew/pcbplot.cpp:284
msgid "Plot Origin"
msgstr "Origine des Coord de Tracé"
#: pcbnew/pcbplot.cpp:309
msgid "X scale adjust"
msgstr "Ajustage Echelle X"
#: pcbnew/pcbplot.cpp:312
msgid "Set X scale adjust for exact scale plotting"
msgstr "Ajuster échelle X pour traçage à l'échelle exacte"
#: pcbnew/pcbplot.cpp:316
msgid "Y scale adjust"
msgstr "Ajustage Echelle Y"
#: pcbnew/pcbplot.cpp:319
msgid "Set Y scale adjust for exact scale plotting"
msgstr "Ajuster échelle Y pour traçage à l'échelle exacte"
#: pcbnew/pcbplot.cpp:322
msgid "Plot negative"
msgstr "Tracé en Négatif"
#: pcbnew/pcbplot.cpp:331
msgid "Save Options"
msgstr "Sauver Options"
#: pcbnew/pcbplot.cpp:335
msgid "Generate drill file"
msgstr "Créer Fichier de perçage"
#: pcbnew/pcbplot.cpp:338
msgid "Close"
msgstr "Fermer"
#: pcbnew/pcbplot.cpp:384
msgid "Use Proper Gerber Extensions"
msgstr "Utiliser Extensions Gerber Particulières"
#: pcbnew/pcbplot.cpp:390
msgid "Use Proper Gerber Extensions - .GBL, .GTL, etc..."
msgstr "Utiliser les extensions GERBER specifiques aux couches - .GBL, .GTL, etc..."
#: pcbnew/pcbplot.cpp:397
msgid "Exclude pcb edge layer"
msgstr "Exclure couche contours PCB"
#: pcbnew/pcbplot.cpp:401
msgid "Exclude contents of the pcb edge layer from all other layers"
msgstr "Exclure les tracés contour PCB des autres couches"
#: pcbnew/pcbplot.cpp:408
msgid "Print sheet reference"
msgstr "Imprimer cartouche"
#: pcbnew/pcbplot.cpp:419
msgid "Print pads on silkscreen"
msgstr "Pads sur Sérigraphie"
#: pcbnew/pcbplot.cpp:426
msgid "Enable/disable print/plot pads on silkscreen layers"
msgstr "Active/désactive tracé des pastilles sur les couches de sérigraphie"
#: pcbnew/pcbplot.cpp:430
msgid "Always print pads"
msgstr "Toujours tracer pads"
#: pcbnew/pcbplot.cpp:435
msgid "Force print/plot pads on ALL layers"
msgstr "Force le tracé des pastilles sur TOUTES les couches"
#: pcbnew/pcbplot.cpp:440
msgid "Print module value"
msgstr "Imprimer Valeur Module"
#: pcbnew/pcbplot.cpp:444
msgid "Enable/disable print/plot module value on silkscreen layers"
msgstr "Active/désactive le tracé des textes valeurs des modules sur couches de sérigraphie"
#: pcbnew/pcbplot.cpp:448
msgid "Print module reference"
msgstr "Imprimer Référence Module"
#: pcbnew/pcbplot.cpp:452
msgid "Enable/disable print/plot module reference on silkscreen layers"
msgstr "Active/désactive le tracé des textes référence des modules sur couches de sérigraphie"
#: pcbnew/pcbplot.cpp:456
msgid "Print other module texts"
msgstr "Imprimer autres textes module"
#: pcbnew/pcbplot.cpp:460
msgid "Enable/disable print/plot module field texts on silkscreen layers"
msgstr "Active/désactive le tracé des textes des champs des modules sur couches de sérigraphie"
#: pcbnew/pcbplot.cpp:465
msgid "Force print invisible texts"
msgstr "Force tracé textes invisibles"
#: pcbnew/pcbplot.cpp:469
msgid "Force print/plot module invisible texts on silkscreen layers"
msgstr "Force le tracé des textes invisibles sur couches de sérigraphie"
#: pcbnew/pcbplot.cpp:475
msgid "No drill mark"
msgstr "Pas de marque"
#: pcbnew/pcbplot.cpp:476
msgid "Small mark"
msgstr "Petite marque"
#: pcbnew/pcbplot.cpp:477
msgid "Real drill"
msgstr "Perçage réel"
#: pcbnew/pcbplot.cpp:481
msgid "Pads Drill Opt"
msgstr "Options Perçage Pads"
#: pcbnew/pcbplot.cpp:490
msgid "Auto scale"
msgstr "Ech. auto"
#: pcbnew/pcbplot.cpp:491
msgid "Scale 1"
msgstr "Echelle 1"
#: pcbnew/pcbplot.cpp:492
msgid "Scale 1.5"
msgstr "Echelle 1,5"
#: pcbnew/pcbplot.cpp:493
msgid "Scale 2"
msgstr "Echelle 2"
#: pcbnew/pcbplot.cpp:494
msgid "Scale 3"
msgstr "Echelle 3"
#: pcbnew/pcbplot.cpp:498
msgid "Scale Opt"
msgstr "Echelle"
#: pcbnew/pcbplot.cpp:507
msgid "Line"
msgstr "Ligne"
#: pcbnew/pcbplot.cpp:507
msgid "Filled"
msgstr "Plein"
#: pcbnew/pcbplot.cpp:508
msgid "Sketch"
msgstr "Contour"
#: pcbnew/pcbplot.cpp:511
msgid "Plot Mode"
msgstr "Mode de Tracé"
#: pcbnew/pcbplot.cpp:519
msgid "Plot mirror"
msgstr "Tracé Miroir"
#: pcbnew/pcbplot.cpp:525
msgid "Vias on mask"
msgstr "Vias sur masque"
#: pcbnew/pcbplot.cpp:529
msgid "Print/plot vias on mask layers. They are in this case not protected"
msgstr "Trace vias sur vernis épargne. Elles seront non protégées"
#: pcbnew/pcbplot.cpp:784
msgid "Adobe post script files (.ps)|*.ps"
msgstr "Fichiers Adobe post script (.ps)|*.ps"
#: pcbnew/pcbplot.cpp:790
msgid "GERBER photo plot files (.pho .gbr)|*.pho;*.gbr"
msgstr "Fichiers photraçage GERBER (.pho .gbr)|*.pho;*.gbr"
#: pcbnew/pcbplot.cpp:808
msgid "Warning: Scale option set to a very small value" msgid "Warning: Scale option set to a very small value"
msgstr "Attention: option d'échelle ajustée à une valeur très petite" msgstr "Attention: option d'échelle ajustée à une valeur très petite"
#: pcbnew/pcbplot.cpp:811 #: pcbnew/pcbplot.cpp:586
msgid "Warning: Scale option set to a very large value" msgid "Warning: Scale option set to a very large value"
msgstr "Attention: option d'échelle ajustée à une valeur très grande" msgstr "Attention: option d'échelle ajustée à une valeur très grande"
#: pcbnew/pcbplot.cpp:939 #: pcbnew/pcbplot.cpp:715
#, c-format
msgid "Plot file <%s> created"
msgstr "Fichier de tracé <%s> créé"
#: pcbnew/pcbplot.cpp:727
msgid "No layer selected" msgid "No layer selected"
msgstr "Pas de couche sélectionnée" msgstr "Pas de couche sélectionnée"
...@@ -2668,10 +2440,6 @@ msgstr "Pas de couche sélectionnée" ...@@ -2668,10 +2440,6 @@ msgstr "Pas de couche sélectionnée"
msgid "Freeroute Help" msgid "Freeroute Help"
msgstr "Aide Freeroute" msgstr "Aide Freeroute"
#: pcbnew/plotgerb.cpp:54
msgid "unable to create file "
msgstr "Impossible de créer fichier "
#: pcbnew/swap_layers.cpp:68 #: pcbnew/swap_layers.cpp:68
msgid "Swap Layers:" msgid "Swap Layers:"
msgstr "Permutte couches" msgstr "Permutte couches"
...@@ -2934,6 +2702,11 @@ msgstr "H, V et 45 deg" ...@@ -2934,6 +2702,11 @@ msgstr "H, V et 45 deg"
msgid "Zone Edges Orient" msgid "Zone Edges Orient"
msgstr "Direction contours zone" msgstr "Direction contours zone"
#: pcbnew/dialog_non_copper_zones_properties_base.cpp:54
#: pcbnew/dialog_copper_zones_base.cpp:107
msgid "Line"
msgstr "Ligne"
#: pcbnew/dialog_non_copper_zones_properties_base.cpp:54 #: pcbnew/dialog_non_copper_zones_properties_base.cpp:54
msgid "Hatched Outline" msgid "Hatched Outline"
msgstr "Contour Hachuré" msgstr "Contour Hachuré"
...@@ -4086,6 +3859,14 @@ msgstr "Echelle Précise 1" ...@@ -4086,6 +3859,14 @@ msgstr "Echelle Précise 1"
msgid "Scale 1.4" msgid "Scale 1.4"
msgstr "Echelle 1,4" msgstr "Echelle 1,4"
#: pcbnew/dialog_print_using_printer_base.cpp:46
msgid "Scale 2"
msgstr "Echelle 2"
#: pcbnew/dialog_print_using_printer_base.cpp:46
msgid "Scale 3"
msgstr "Echelle 3"
#: pcbnew/dialog_print_using_printer_base.cpp:46 #: pcbnew/dialog_print_using_printer_base.cpp:46
msgid "Scale 4" msgid "Scale 4"
msgstr "Echelle 4" msgstr "Echelle 4"
...@@ -4098,10 +3879,18 @@ msgstr "Echelle approx.:" ...@@ -4098,10 +3879,18 @@ msgstr "Echelle approx.:"
msgid "X Scale Adjust" msgid "X Scale Adjust"
msgstr "Ajustage Echelle X" msgstr "Ajustage Echelle X"
#: pcbnew/dialog_print_using_printer_base.cpp:57
msgid "Set X scale adjust for exact scale plotting"
msgstr "Ajuster échelle X pour traçage à l'échelle exacte"
#: pcbnew/dialog_print_using_printer_base.cpp:61 #: pcbnew/dialog_print_using_printer_base.cpp:61
msgid "Y Scale Adjust" msgid "Y Scale Adjust"
msgstr "Ajustage Echelle Y" msgstr "Ajustage Echelle Y"
#: pcbnew/dialog_print_using_printer_base.cpp:66
msgid "Set Y scale adjust for exact scale plotting"
msgstr "Ajuster échelle Y pour traçage à l'échelle exacte"
#: pcbnew/dialog_print_using_printer_base.cpp:78 #: pcbnew/dialog_print_using_printer_base.cpp:78
msgid "Pen Width Mini" msgid "Pen Width Mini"
msgstr "Epaiss Plume Mini" msgstr "Epaiss Plume Mini"
...@@ -4142,6 +3931,11 @@ msgstr "Prévisualisation" ...@@ -4142,6 +3931,11 @@ msgstr "Prévisualisation"
msgid "Print" msgid "Print"
msgstr "Imprimer" msgstr "Imprimer"
#: pcbnew/dialog_print_using_printer_base.cpp:128
#: pcbnew/dialog_netlist_fbp.cpp:85
msgid "Close"
msgstr "Fermer"
#: pcbnew/dialog_netlist_fbp.cpp:25 #: pcbnew/dialog_netlist_fbp.cpp:25
msgid "Timestamp" msgid "Timestamp"
msgstr "Timestamp" msgstr "Timestamp"
...@@ -4848,19 +4642,19 @@ msgstr "" ...@@ -4848,19 +4642,19 @@ msgstr ""
"Chemins (chemins système et chemins utilisateurs) utilisés pour chercher et charger les fichiers libriries et documentation des composants.\n" "Chemins (chemins système et chemins utilisateurs) utilisés pour chercher et charger les fichiers libriries et documentation des composants.\n"
"Triés par ordre de priorité décroissante." "Triés par ordre de priorité décroissante."
#: pcbnew/dialog_print_using_printer.cpp:90 #: pcbnew/dialog_print_using_printer.cpp:91
msgid "Error Init Printer info" msgid "Error Init Printer info"
msgstr "Erreur Init info imprimante" msgstr "Erreur Init info imprimante"
#: pcbnew/dialog_print_using_printer.cpp:372 #: pcbnew/dialog_print_using_printer.cpp:384
msgid "Printer Problem!" msgid "Printer Problem!"
msgstr "Problème d'imprimante" msgstr "Problème d'imprimante"
#: pcbnew/dialog_print_using_printer.cpp:386 #: pcbnew/dialog_print_using_printer.cpp:398
msgid "Print Preview" msgid "Print Preview"
msgstr "Prévisualisation" msgstr "Prévisualisation"
#: pcbnew/dialog_print_using_printer.cpp:453 #: pcbnew/dialog_print_using_printer.cpp:465
msgid "There was a problem printing" msgid "There was a problem printing"
msgstr "Il y a un problème d'impression" msgstr "Il y a un problème d'impression"
...@@ -5177,19 +4971,19 @@ msgstr "Nom" ...@@ -5177,19 +4971,19 @@ msgstr "Nom"
msgid "Enabled" msgid "Enabled"
msgstr "Activé" msgstr "Activé"
#: pcbnew/dialog_layers_setup.cpp:613 #: pcbnew/dialog_layers_setup.cpp:614
msgid "Layer name may not be empty" msgid "Layer name may not be empty"
msgstr "Le nom d'une couche ne peut pas être vide" msgstr "Le nom d'une couche ne peut pas être vide"
#: pcbnew/dialog_layers_setup.cpp:620 #: pcbnew/dialog_layers_setup.cpp:621
msgid "Layer name has an illegal character, one of: '" msgid "Layer name has an illegal character, one of: '"
msgstr "Le nom d'une couche contient un des caracteres interdit: '" msgstr "Le nom d'une couche contient un des caracteres interdit: '"
#: pcbnew/dialog_layers_setup.cpp:627 #: pcbnew/dialog_layers_setup.cpp:628
msgid "'signal' is a reserved layer name" msgid "'signal' is a reserved layer name"
msgstr "'signal' is a nom de couche réservé" msgstr "'signal' is a nom de couche réservé"
#: pcbnew/dialog_layers_setup.cpp:636 #: pcbnew/dialog_layers_setup.cpp:637
msgid "Layer name is a duplicate of another" msgid "Layer name is a duplicate of another"
msgstr "Le nom de la couche est un double d'une autre couche" msgstr "Le nom de la couche est un double d'une autre couche"
...@@ -6078,6 +5872,22 @@ msgstr "Ajuster Toutes les Pistes à la Valeur en NetClass" ...@@ -6078,6 +5872,22 @@ msgstr "Ajuster Toutes les Pistes à la Valeur en NetClass"
msgid "Tracks and vias:" msgid "Tracks and vias:"
msgstr "Pistes et vias:" msgstr "Pistes et vias:"
#: pcbnew/dialog_display_options_base.cpp:22
#: pcbnew/dialog_display_options_base.cpp:67
#: pcbnew/dialog_display_options_base.cpp:73
#: pcbnew/dialog_display_options_base.cpp:84
#: pcbnew/dialog_display_options_base.cpp:118
msgid "Sketch"
msgstr "Contour"
#: pcbnew/dialog_display_options_base.cpp:22
#: pcbnew/dialog_display_options_base.cpp:67
#: pcbnew/dialog_display_options_base.cpp:73
#: pcbnew/dialog_display_options_base.cpp:84
#: pcbnew/dialog_display_options_base.cpp:118
msgid "Filled"
msgstr "Plein"
#: pcbnew/dialog_display_options_base.cpp:24 #: pcbnew/dialog_display_options_base.cpp:24
msgid "Tracks:" msgid "Tracks:"
msgstr "Pistes:" msgstr "Pistes:"
...@@ -6229,6 +6039,10 @@ msgstr "Long. Net" ...@@ -6229,6 +6039,10 @@ msgstr "Long. Net"
msgid "Print Footprint" msgid "Print Footprint"
msgstr "Imprimer Module" msgstr "Imprimer Module"
#: pcbnew/dialog_print_for_modedit_base.cpp:22
msgid "Scale 1"
msgstr "Echelle 1"
#: pcbnew/dialog_print_for_modedit_base.cpp:22 #: pcbnew/dialog_print_for_modedit_base.cpp:22
msgid "Scale 8" msgid "Scale 8"
msgstr "Echelle 8" msgstr "Echelle 8"
...@@ -6546,6 +6360,202 @@ msgstr "Ajuster toutes vias (pas les pistes) à leurs valeurs en Netclass" ...@@ -6546,6 +6360,202 @@ msgstr "Ajuster toutes vias (pas les pistes) à leurs valeurs en Netclass"
msgid "Set all tracks (no via) to their Netclass value" msgid "Set all tracks (no via) to their Netclass value"
msgstr "Ajuster toutes Pistes (pas les Vias) à leurs Valeurs en NetClass" msgstr "Ajuster toutes Pistes (pas les Vias) à leurs Valeurs en NetClass"
#: pcbnew/dialog_plot_base.cpp:38
msgid "Use Proper Gerber Extensions"
msgstr "Utiliser Extensions Gerber Particulières"
#: pcbnew/dialog_plot_base.cpp:40
msgid "Use Proper Gerber Extensions - .GBL, .GTL, etc..."
msgstr "Utiliser les extensions GERBER specifiques aux couches - .GBL, .GTL, etc..."
#: pcbnew/dialog_plot_base.cpp:44
msgid "Exclude pcb edge layer"
msgstr "Exclure couche contours PCB"
#: pcbnew/dialog_plot_base.cpp:46
msgid "Exclude contents of the pcb edge layer from all other layers"
msgstr "Exclure les tracés contour PCB des autres couches"
#: pcbnew/dialog_plot_base.cpp:50
msgid "Print sheet reference"
msgstr "Imprimer cartouche"
#: pcbnew/dialog_plot_base.cpp:54
msgid "Print pads on silkscreen"
msgstr "Pads sur Sérigraphie"
#: pcbnew/dialog_plot_base.cpp:56
msgid "Enable/disable print/plot pads on silkscreen layers"
msgstr "Active/désactive tracé des pastilles sur les couches de sérigraphie"
#: pcbnew/dialog_plot_base.cpp:60
msgid "Always print pads"
msgstr "Toujours tracer pads"
#: pcbnew/dialog_plot_base.cpp:62
msgid "Force print/plot pads on ALL layers"
msgstr "Force le tracé des pastilles sur TOUTES les couches"
#: pcbnew/dialog_plot_base.cpp:66
msgid "Print module value"
msgstr "Imprimer Valeur Module"
#: pcbnew/dialog_plot_base.cpp:70
msgid "Print module reference"
msgstr "Imprimer Référence Module"
#: pcbnew/dialog_plot_base.cpp:74
msgid "Print other module texts"
msgstr "Imprimer autres textes module"
#: pcbnew/dialog_plot_base.cpp:76
msgid "Enable/disable print/plot module field texts on silkscreen layers"
msgstr "Active/désactive le tracé des textes des champs des modules sur couches de sérigraphie"
#: pcbnew/dialog_plot_base.cpp:80
msgid "Force print invisible texts"
msgstr "Force tracé textes invisibles"
#: pcbnew/dialog_plot_base.cpp:82
msgid "Force print/plot module invisible texts on silkscreen layers"
msgstr "Force le tracé des textes invisibles sur couches de sérigraphie"
#: pcbnew/dialog_plot_base.cpp:91
msgid "No drill mark"
msgstr "Pas de marque"
#: pcbnew/dialog_plot_base.cpp:91
msgid "Small mark"
msgstr "Petite marque"
#: pcbnew/dialog_plot_base.cpp:91
msgid "Real drill"
msgstr "Perçage réel"
#: pcbnew/dialog_plot_base.cpp:93
msgid "Pads Drill Opt"
msgstr "Options Perçage Pads"
#: pcbnew/dialog_plot_base.cpp:97
msgid "Auto scale"
msgstr "Ech. auto"
#: pcbnew/dialog_plot_base.cpp:97
msgid "Scale 1.5"
msgstr "Echelle 1,5"
#: pcbnew/dialog_plot_base.cpp:99
msgid "Scale Opt"
msgstr "Echelle"
#: pcbnew/dialog_plot_base.cpp:105
msgid "Plot Mode"
msgstr "Mode de Tracé"
#: pcbnew/dialog_plot_base.cpp:109
msgid "Absolute"
msgstr "Absolu"
#: pcbnew/dialog_plot_base.cpp:109
msgid "Auxiliary axis"
msgstr "Axe Auxiliaire"
#: pcbnew/dialog_plot_base.cpp:111
msgid "Plot Origin"
msgstr "Origine des Coord de Tracé"
#: pcbnew/dialog_plot_base.cpp:120
msgid "HPGL"
msgstr "HPGL"
#: pcbnew/dialog_plot_base.cpp:120
msgid "Gerber"
msgstr "Gerber"
#: pcbnew/dialog_plot_base.cpp:120
msgid "Postscript"
msgstr "Postscript"
#: pcbnew/dialog_plot_base.cpp:120
msgid "Postscript A4"
msgstr "Postscript A4"
#: pcbnew/dialog_plot_base.cpp:120
msgid "DXF Export"
msgstr "Export DXF"
#: pcbnew/dialog_plot_base.cpp:122
msgid "Plot Format"
msgstr "Format de tracé"
#: pcbnew/dialog_plot_base.cpp:127
msgid "HPGL Options:"
msgstr "Options HPGL:"
#: pcbnew/dialog_plot_base.cpp:129
msgid "Pen size"
msgstr "Diam plume"
#: pcbnew/dialog_plot_base.cpp:136
msgid "Pen Speed (cm/s)"
msgstr "Vitesse Plume ( cm/s )"
#: pcbnew/dialog_plot_base.cpp:141
msgid "Set pen speed in cm/s"
msgstr "Ajuster Vitesse plume en centimètres par seconde"
#: pcbnew/dialog_plot_base.cpp:145
msgid "Pen ovr"
msgstr "Recouvrement"
#: pcbnew/dialog_plot_base.cpp:150
msgid "Set plot overlay for filling"
msgstr "Ajuste recouvrement des tracés pour les remplissages"
#: pcbnew/dialog_plot_base.cpp:157
msgid "PS Options:"
msgstr "Options PS:"
#: pcbnew/dialog_plot_base.cpp:159
msgid "Plot negative"
msgstr "Tracé en Négatif"
#: pcbnew/dialog_plot_base.cpp:170
msgid "Plot mirror"
msgstr "Tracé Miroir"
#: pcbnew/dialog_plot_base.cpp:174
msgid "Vias on mask"
msgstr "Vias sur masque"
#: pcbnew/dialog_plot_base.cpp:176
msgid "Print/plot vias on mask layers. They are in this case not protected"
msgstr "Trace vias sur vernis épargne. Elles seront non protégées"
#: pcbnew/dialog_plot_base.cpp:180
msgid "Line width"
msgstr "Epaisseur ligne"
#: pcbnew/dialog_plot_base.cpp:190
msgid "X scale adjust"
msgstr "Ajustage Echelle X"
#: pcbnew/dialog_plot_base.cpp:199
msgid "Y scale adjust"
msgstr "Ajustage Echelle Y"
#: pcbnew/dialog_plot_base.cpp:209
msgid "Plot"
msgstr "Tracer"
#: pcbnew/dialog_plot_base.cpp:213
msgid "Save Options"
msgstr "Sauver Options"
#: pcbnew/dialog_plot_base.cpp:216
msgid "Generate drill file"
msgstr "Créer Fichier de perçage"
#: pcbnew/toolbars_update_user_interface.cpp:39 #: pcbnew/toolbars_update_user_interface.cpp:39
msgid " mils" msgid " mils"
msgstr " mils" msgstr " mils"
...@@ -7552,6 +7562,7 @@ msgid "&New" ...@@ -7552,6 +7562,7 @@ msgid "&New"
msgstr "&Nouveau" msgstr "&Nouveau"
#: eeschema/menubar.cpp:43 #: eeschema/menubar.cpp:43
#: eeschema/tool_sch.cpp:34
msgid "New schematic project" msgid "New schematic project"
msgstr "Nouveau Projet schématique" msgstr "Nouveau Projet schématique"
...@@ -7696,6 +7707,7 @@ msgid "W&ire to bus entry" ...@@ -7696,6 +7707,7 @@ msgid "W&ire to bus entry"
msgstr "Entrées de bus (type fil vers bus)" msgstr "Entrées de bus (type fil vers bus)"
#: eeschema/menubar.cpp:215 #: eeschema/menubar.cpp:215
#: eeschema/tool_sch.cpp:179
msgid "Place a wire to bus entry" msgid "Place a wire to bus entry"
msgstr "Placer une Entrée de Bus (type fil vers bus)" msgstr "Placer une Entrée de Bus (type fil vers bus)"
...@@ -7704,6 +7716,7 @@ msgid "B&us to bus entry" ...@@ -7704,6 +7716,7 @@ msgid "B&us to bus entry"
msgstr "Entrées de bus (type bus vers bus)" msgstr "Entrées de bus (type bus vers bus)"
#: eeschema/menubar.cpp:221 #: eeschema/menubar.cpp:221
#: eeschema/tool_sch.cpp:183
msgid "Place a bus to bus entry" msgid "Place a bus to bus entry"
msgstr "Placer une Entrée de Bus (type bus vers bus)" msgstr "Placer une Entrée de Bus (type bus vers bus)"
...@@ -7720,6 +7733,7 @@ msgid "Net name" ...@@ -7720,6 +7733,7 @@ msgid "Net name"
msgstr "Net Name" msgstr "Net Name"
#: eeschema/menubar.cpp:231 #: eeschema/menubar.cpp:231
#: eeschema/tool_sch.cpp:192
msgid "Place net name" msgid "Place net name"
msgstr "Place nom de net" msgstr "Place nom de net"
...@@ -7744,6 +7758,7 @@ msgid "Hierarchical label" ...@@ -7744,6 +7758,7 @@ msgid "Hierarchical label"
msgstr "Label Hiérarchique" msgstr "Label Hiérarchique"
#: eeschema/menubar.cpp:250 #: eeschema/menubar.cpp:250
#: eeschema/tool_sch.cpp:206
msgid "Place a hierarchical label. This label will be seen as a pin sheet in the sheet symbol" msgid "Place a hierarchical label. This label will be seen as a pin sheet in the sheet symbol"
msgstr "Placer un label hiérachique. Ce label sera vu comme une pin dans la feuille mère symbole" msgstr "Placer un label hiérachique. Ce label sera vu comme une pin dans la feuille mère symbole"
...@@ -7784,6 +7799,7 @@ msgid "Graphic text (comment)" ...@@ -7784,6 +7799,7 @@ msgid "Graphic text (comment)"
msgstr "Textes graphiques (commentaires)" msgstr "Textes graphiques (commentaires)"
#: eeschema/menubar.cpp:286 #: eeschema/menubar.cpp:286
#: eeschema/tool_sch.cpp:229
msgid "Place graphic text (comment)" msgid "Place graphic text (comment)"
msgstr "Placer textes graphiques (commentaires)" msgstr "Placer textes graphiques (commentaires)"
...@@ -11368,14 +11384,14 @@ msgid "%d errors while reading Gerber file [%s]" ...@@ -11368,14 +11384,14 @@ msgid "%d errors while reading Gerber file [%s]"
msgstr "%d erreurs pendant lecture fichier gerber [%s]" msgstr "%d erreurs pendant lecture fichier gerber [%s]"
#: gerbview/readgerb.cpp:267 #: gerbview/readgerb.cpp:267
#: gerbview/files.cpp:185 #: gerbview/files.cpp:188
#: gerbview/files.cpp:218 #: gerbview/files.cpp:221
#, c-format #, c-format
msgid "Gerber DCODE files (%s)|*.%s" msgid "Gerber DCODE files (%s)|*.%s"
msgstr "Fichiers Gerber DCODE (%s)|*.%s" msgstr "Fichiers Gerber DCODE (%s)|*.%s"
#: gerbview/readgerb.cpp:272 #: gerbview/readgerb.cpp:272
#: gerbview/files.cpp:191 #: gerbview/files.cpp:194
msgid "Load GERBER DCODE File" msgid "Load GERBER DCODE File"
msgstr "Charger Fichier de DCodes" msgstr "Charger Fichier de DCodes"
...@@ -11391,63 +11407,63 @@ msgstr "Gerbview est en cours d'exécution. Continuer ?" ...@@ -11391,63 +11407,63 @@ msgstr "Gerbview est en cours d'exécution. Continuer ?"
msgid "Not yet available..." msgid "Not yet available..."
msgstr "non encore disponible" msgstr "non encore disponible"
#: gerbview/files.cpp:114 #: gerbview/files.cpp:117
msgid "Gerber files (.gb* .gt* .lgr .ger .pho)" msgid "Gerber files (.gb* .gt* .lgr .ger .pho)"
msgstr "Fichiers Gerber .gb* .gt* .lgr .ger .pho)" msgstr "Fichiers Gerber .gb* .gt* .lgr .ger .pho)"
#: gerbview/files.cpp:120 #: gerbview/files.cpp:123
msgid "Top layer (*.GTL)|*.GTL;*.gtl|" msgid "Top layer (*.GTL)|*.GTL;*.gtl|"
msgstr "Couche composant" msgstr "Couche composant"
#: gerbview/files.cpp:121 #: gerbview/files.cpp:124
msgid "Bottom layer (*.GBL)|*.GBL;*.gbl|" msgid "Bottom layer (*.GBL)|*.GBL;*.gbl|"
msgstr "Couche cuivre" msgstr "Couche cuivre"
#: gerbview/files.cpp:122 #: gerbview/files.cpp:125
msgid "Bottom solder resist (*.GBS)|*.GBS;*.gbs|" msgid "Bottom solder resist (*.GBS)|*.GBS;*.gbs|"
msgstr "Masque soudure cuivre (*.GBS)|*.GBS;*.gbs|" msgstr "Masque soudure cuivre (*.GBS)|*.GBS;*.gbs|"
#: gerbview/files.cpp:123 #: gerbview/files.cpp:126
msgid "Top solder resist (*.GTS)|*.GTS;*.gts|" msgid "Top solder resist (*.GTS)|*.GTS;*.gts|"
msgstr "Masque soudure composant (*.GTS)|*.GTS;*.gts|" msgstr "Masque soudure composant (*.GTS)|*.GTS;*.gts|"
#: gerbview/files.cpp:124 #: gerbview/files.cpp:127
msgid "Bottom overlay (*.GBO)|*.GBO;*.gbo|" msgid "Bottom overlay (*.GBO)|*.GBO;*.gbo|"
msgstr "Bottom overlay (*.GBO)|*.GBO;*.gbo|" msgstr "Bottom overlay (*.GBO)|*.GBO;*.gbo|"
#: gerbview/files.cpp:125 #: gerbview/files.cpp:128
msgid "Top overlay (*.GTO)|*.GTO;*.gto|" msgid "Top overlay (*.GTO)|*.GTO;*.gto|"
msgstr "Top overlay (*.GTO)|*.GTO;*.gto|" msgstr "Top overlay (*.GTO)|*.GTO;*.gto|"
#: gerbview/files.cpp:126 #: gerbview/files.cpp:129
msgid "Bottom paste (*.GBP)|*.GBP;*.gbp|" msgid "Bottom paste (*.GBP)|*.GBP;*.gbp|"
msgstr "Masque pate à souder cuivre (*.GBP)|*.GBP;*.gbp|" msgstr "Masque pate à souder cuivre (*.GBP)|*.GBP;*.gbp|"
#: gerbview/files.cpp:127 #: gerbview/files.cpp:130
msgid "Top paste (*.GTP)|*.GTP;*.gtp|" msgid "Top paste (*.GTP)|*.GTP;*.gtp|"
msgstr "Masque pate à souder composant (*.GTP)|*.GTP;*.gtp|" msgstr "Masque pate à souder composant (*.GTP)|*.GTP;*.gtp|"
#: gerbview/files.cpp:128 #: gerbview/files.cpp:131
msgid "Keep-out layer (*.GKO)|*.GKO;*.gko|" msgid "Keep-out layer (*.GKO)|*.GKO;*.gko|"
msgstr "Couche de \"Keep-out\" (*.GKO)|*.GKO;*.gko|" msgstr "Couche de \"Keep-out\" (*.GKO)|*.GKO;*.gko|"
#: gerbview/files.cpp:129 #: gerbview/files.cpp:132
msgid "Mechanical layers (*.GMx)|*.GM1;*.gm1;*.GM2;*.gm2;*.GM3;*.gm3|" msgid "Mechanical layers (*.GMx)|*.GM1;*.gm1;*.GM2;*.gm2;*.GM3;*.gm3|"
msgstr "Couches mécaniques (*.GMx)|*.GM1;*.gm1;*.GM2;*.gm2;*.GM3;*.gm3|" msgstr "Couches mécaniques (*.GMx)|*.GM1;*.gm1;*.GM2;*.gm2;*.GM3;*.gm3|"
#: gerbview/files.cpp:130 #: gerbview/files.cpp:133
msgid "Top Pad Master (*.GPT)|*.GPT;*.gpt|" msgid "Top Pad Master (*.GPT)|*.GPT;*.gpt|"
msgstr "Top Pad Master (*.GPT)|*.GPT;*.gpt|" msgstr "Top Pad Master (*.GPT)|*.GPT;*.gpt|"
#: gerbview/files.cpp:131 #: gerbview/files.cpp:134
msgid "Bottom Pad Master (*.GPB)|*.GPB;*.gpb|" msgid "Bottom Pad Master (*.GPB)|*.GPB;*.gpb|"
msgstr "Bottom Pad Master (*.GPB)|*.GPB;*.gpb|" msgstr "Bottom Pad Master (*.GPB)|*.GPB;*.gpb|"
#: gerbview/files.cpp:141 #: gerbview/files.cpp:144
msgid "Open Gerber File" msgid "Open Gerber File"
msgstr "Ouvrir Fichier Gerber" msgstr "Ouvrir Fichier Gerber"
#: gerbview/files.cpp:222 #: gerbview/files.cpp:225
msgid "Save Gerber File" msgid "Save Gerber File"
msgstr "Sauver Fichier Gerber" msgstr "Sauver Fichier Gerber"
...@@ -12850,6 +12866,28 @@ msgstr "Options d'Affichage" ...@@ -12850,6 +12866,28 @@ msgstr "Options d'Affichage"
msgid "Page Settings" msgid "Page Settings"
msgstr "Ajustage opt Page" msgstr "Ajustage opt Page"
#~ msgid "File"
#~ msgstr "Fichier"
#~ msgid ""
#~ "Set lines width used to plot in sketch mode and plot pads outlines on "
#~ "silk screen layers"
#~ msgstr ""
#~ "Ajuste l'épaisseur des lignes utilisées pour tracer en mode contour et "
#~ "pour les contours des pads sur les couches de sérigraphie"
#~ msgid "Enable/disable print/plot module value on silkscreen layers"
#~ msgstr ""
#~ "Active/désactive le tracé des textes valeurs des modules sur couches de "
#~ "sérigraphie"
#~ msgid "Enable/disable print/plot module reference on silkscreen layers"
#~ msgstr ""
#~ "Active/désactive le tracé des textes référence des modules sur couches de "
#~ "sérigraphie"
#~ msgid "Adobe post script files (.ps)|*.ps"
#~ msgstr "Fichiers Adobe post script (.ps)|*.ps"
#~ msgid "GERBER photo plot files (.pho .gbr)|*.pho;*.gbr"
#~ msgstr "Fichiers photraçage GERBER (.pho .gbr)|*.pho;*.gbr"
#~ msgid "unable to create file "
#~ msgstr "Impossible de créer fichier "
#~ msgid "" #~ msgid ""
#~ "Gerber files (.gbr .gbx .lgr .ger .pho)| .gbr;*.GBR;*.gbx;*.GBX;*.lgr;*." #~ "Gerber files (.gbr .gbx .lgr .ger .pho)| .gbr;*.GBR;*.gbx;*.GBX;*.lgr;*."
#~ "LGR;*.ger;*.GER;*.pho;*.PHO|" #~ "LGR;*.ger;*.GER;*.pho;*.PHO|"
......
...@@ -65,8 +65,10 @@ set(PCBNEW_SRCS ...@@ -65,8 +65,10 @@ set(PCBNEW_SRCS
dialog_pcbnew_config_libs_and_paths.cpp dialog_pcbnew_config_libs_and_paths.cpp
dialog_pcbnew_config_libs_and_paths_fbp.cpp dialog_pcbnew_config_libs_and_paths_fbp.cpp
dialog_print_for_modedit.cpp dialog_print_for_modedit.cpp
dialog_plot_base.cpp
dialog_print_for_modedit_base.cpp dialog_print_for_modedit_base.cpp
dialog_print_using_printer.cpp dialog_print_using_printer.cpp
dialog_print_using_printer_base.cpp
dialog_orient_footprints.cpp dialog_orient_footprints.cpp
dialog_mask_clearance.cpp dialog_mask_clearance.cpp
dialog_mask_clearance_base.cpp dialog_mask_clearance_base.cpp
......
...@@ -545,6 +545,7 @@ void DIALOG_LAYERS_SETUP::OnOkButtonClick( wxCommandEvent& event ) ...@@ -545,6 +545,7 @@ void DIALOG_LAYERS_SETUP::OnOkButtonClick( wxCommandEvent& event )
} }
} }
m_Parent->GetScreen()->SetModify();
m_Parent->ReCreateLayerBox( NULL ); m_Parent->ReCreateLayerBox( NULL );
EndModal( wxID_OK ); EndModal( wxID_OK );
......
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Apr 16 2008)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#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 )
{
this->SetSizeHints( wxSize( -1,350 ), wxDefaultSize );
wxBoxSizer* bMainSizer;
bMainSizer = new wxBoxSizer( wxVERTICAL );
wxBoxSizer* bUpperSizer;
bUpperSizer = new wxBoxSizer( wxHORIZONTAL );
wxBoxSizer* bLeftSizer;
bLeftSizer = new wxBoxSizer( wxVERTICAL );
wxStaticBoxSizer* sbLayersSizer;
sbLayersSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Layers:") ), wxHORIZONTAL );
m_CopperLayersBoxSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Copper Layers:") ), wxVERTICAL );
sbLayersSizer->Add( m_CopperLayersBoxSizer, 1, wxALL, 5 );
m_TechnicalLayersBoxSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Technical Layers:") ), wxVERTICAL );
sbLayersSizer->Add( m_TechnicalLayersBoxSizer, 1, wxALL, 5 );
bLeftSizer->Add( sbLayersSizer, 1, wxEXPAND, 5 );
m_Use_Gerber_Extensions = new wxCheckBox( this, ID_USE_GERBER_EXTENSIONS, _("Use Proper Gerber Extensions"), wxDefaultPosition, wxDefaultSize, 0 );
m_Use_Gerber_Extensions->SetToolTip( _("Use Proper Gerber Extensions - .GBL, .GTL, etc...") );
bLeftSizer->Add( m_Use_Gerber_Extensions, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_Exclude_Edges_Pcb = new wxCheckBox( this, wxID_ANY, _("Exclude pcb edge layer"), wxDefaultPosition, wxDefaultSize, 0 );
m_Exclude_Edges_Pcb->SetToolTip( _("Exclude contents of the pcb edge layer from all other layers") );
bLeftSizer->Add( m_Exclude_Edges_Pcb, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_Plot_Sheet_Ref = new wxCheckBox( this, wxID_ANY, _("Print sheet reference"), wxDefaultPosition, wxDefaultSize, 0 );
bLeftSizer->Add( m_Plot_Sheet_Ref, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_Plot_Pads_on_Silkscreen = new wxCheckBox( this, ID_PRINT_PAD_ON_SILKSCREEN, _("Print pads on silkscreen"), wxDefaultPosition, wxDefaultSize, 0 );
m_Plot_Pads_on_Silkscreen->SetToolTip( _("Enable/disable print/plot pads on silkscreen layers") );
bLeftSizer->Add( m_Plot_Pads_on_Silkscreen, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_Force_Plot_Pads = new wxCheckBox( this, ID_FORCE_PRINT_PAD, _("Always print pads"), wxDefaultPosition, wxDefaultSize, 0 );
m_Force_Plot_Pads->SetToolTip( _("Force print/plot pads on ALL layers") );
bLeftSizer->Add( m_Force_Plot_Pads, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_Plot_Text_Value = new wxCheckBox( this, ID_PRINT_VALUE, _("Print module value"), wxDefaultPosition, wxDefaultSize, 0 );
bLeftSizer->Add( m_Plot_Text_Value, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_Plot_Text_Ref = new wxCheckBox( this, ID_PRINT_REF, _("Print module reference"), wxDefaultPosition, wxDefaultSize, 0 );
bLeftSizer->Add( m_Plot_Text_Ref, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_Plot_Text_Div = new wxCheckBox( this, ID_PRINT_MODULE_TEXTS, _("Print other module texts"), wxDefaultPosition, wxDefaultSize, 0 );
m_Plot_Text_Div->SetToolTip( _("Enable/disable print/plot module field texts on silkscreen layers") );
bLeftSizer->Add( m_Plot_Text_Div, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_Plot_Invisible_Text = new wxCheckBox( this, ID_FORCE_PRINT_INVISIBLE_TEXT, _("Force print invisible texts"), wxDefaultPosition, wxDefaultSize, 0 );
m_Plot_Invisible_Text->SetToolTip( _("Force print/plot module invisible texts on silkscreen layers") );
bLeftSizer->Add( m_Plot_Invisible_Text, 0, wxALL, 5 );
bUpperSizer->Add( bLeftSizer, 1, wxEXPAND, 5 );
wxBoxSizer* bPlotOptionsSizer;
bPlotOptionsSizer = new wxBoxSizer( wxVERTICAL );
wxString m_Drill_Shape_OptChoices[] = { _("No drill mark"), _("Small mark"), _("Real drill") };
int m_Drill_Shape_OptNChoices = sizeof( m_Drill_Shape_OptChoices ) / sizeof( wxString );
m_Drill_Shape_Opt = new wxRadioBox( this, ID_DRILL_SHAPE_OPT, _("Pads Drill Opt"), wxDefaultPosition, wxDefaultSize, m_Drill_Shape_OptNChoices, m_Drill_Shape_OptChoices, 1, wxRA_SPECIFY_COLS );
m_Drill_Shape_Opt->SetSelection( 1 );
bPlotOptionsSizer->Add( m_Drill_Shape_Opt, 0, wxALL|wxEXPAND, 5 );
wxString m_Scale_OptChoices[] = { _("Auto scale"), _("Scale 1"), _("Scale 1.5"), _("Scale 2"), _("Scale 3") };
int m_Scale_OptNChoices = sizeof( m_Scale_OptChoices ) / sizeof( wxString );
m_Scale_Opt = new wxRadioBox( this, wxID_ANY, _("Scale Opt"), wxDefaultPosition, wxDefaultSize, m_Scale_OptNChoices, m_Scale_OptChoices, 1, wxRA_SPECIFY_COLS );
m_Scale_Opt->SetSelection( 0 );
bPlotOptionsSizer->Add( m_Scale_Opt, 0, wxALL|wxEXPAND, 5 );
wxString m_PlotModeOptChoices[] = { _("Line"), _("Filled"), _("Sketch") };
int m_PlotModeOptNChoices = sizeof( m_PlotModeOptChoices ) / sizeof( wxString );
m_PlotModeOpt = new wxRadioBox( this, wxID_ANY, _("Plot Mode"), wxDefaultPosition, wxDefaultSize, m_PlotModeOptNChoices, m_PlotModeOptChoices, 1, wxRA_SPECIFY_COLS );
m_PlotModeOpt->SetSelection( 0 );
bPlotOptionsSizer->Add( m_PlotModeOpt, 0, wxALL|wxEXPAND, 5 );
wxString m_Choice_Plot_OffsetChoices[] = { _("Absolute"), _("Auxiliary axis") };
int m_Choice_Plot_OffsetNChoices = sizeof( m_Choice_Plot_OffsetChoices ) / sizeof( wxString );
m_Choice_Plot_Offset = new wxRadioBox( this, wxID_ANY, _("Plot Origin"), wxDefaultPosition, wxDefaultSize, m_Choice_Plot_OffsetNChoices, m_Choice_Plot_OffsetChoices, 1, wxRA_SPECIFY_COLS );
m_Choice_Plot_Offset->SetSelection( 0 );
bPlotOptionsSizer->Add( m_Choice_Plot_Offset, 0, wxALL|wxEXPAND, 5 );
bUpperSizer->Add( bPlotOptionsSizer, 1, wxEXPAND, 5 );
wxBoxSizer* bSizerFmtPlot;
bSizerFmtPlot = new wxBoxSizer( wxVERTICAL );
wxString m_PlotFormatOptChoices[] = { _("HPGL"), _("Gerber"), _("Postscript"), _("Postscript A4"), _("DXF Export") };
int m_PlotFormatOptNChoices = sizeof( m_PlotFormatOptChoices ) / sizeof( wxString );
m_PlotFormatOpt = new wxRadioBox( this, wxID_ANY, _("Plot Format"), wxDefaultPosition, wxDefaultSize, m_PlotFormatOptNChoices, m_PlotFormatOptChoices, 1, wxRA_SPECIFY_COLS );
m_PlotFormatOpt->SetSelection( 1 );
bSizerFmtPlot->Add( m_PlotFormatOpt, 0, wxALL|wxEXPAND, 5 );
wxStaticBoxSizer* m_HPGL_OptionsBox;
m_HPGL_OptionsBox = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("HPGL Options:") ), wxVERTICAL );
m_textPenSize = new wxStaticText( this, wxID_ANY, _("Pen size"), wxDefaultPosition, wxDefaultSize, 0 );
m_textPenSize->Wrap( -1 );
m_HPGL_OptionsBox->Add( m_textPenSize, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_HPGLPenSizeOpt = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_HPGL_OptionsBox->Add( m_HPGLPenSizeOpt, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_staticText3 = new wxStaticText( this, wxID_ANY, _("Pen Speed (cm/s)"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText3->Wrap( -1 );
m_HPGL_OptionsBox->Add( m_staticText3, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_HPGLPenSpeedOpt = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_HPGLPenSpeedOpt->SetToolTip( _("Set pen speed in cm/s") );
m_HPGL_OptionsBox->Add( m_HPGLPenSpeedOpt, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
m_textPenOvr = new wxStaticText( this, wxID_ANY, _("Pen ovr"), wxDefaultPosition, wxDefaultSize, 0 );
m_textPenOvr->Wrap( -1 );
m_HPGL_OptionsBox->Add( m_textPenOvr, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_HPGLPenOverlayOpt = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_HPGLPenOverlayOpt->SetToolTip( _("Set plot overlay for filling") );
m_HPGL_OptionsBox->Add( m_HPGLPenOverlayOpt, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
bSizerFmtPlot->Add( m_HPGL_OptionsBox, 0, wxEXPAND, 5 );
wxStaticBoxSizer* sbSizerPSOpt;
sbSizerPSOpt = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("PS Options:") ), wxVERTICAL );
m_Plot_PS_Negative = new wxCheckBox( this, wxID_ANY, _("Plot negative"), wxDefaultPosition, wxDefaultSize, 0 );
sbSizerPSOpt->Add( m_Plot_PS_Negative, 0, wxALL, 5 );
bSizerFmtPlot->Add( sbSizerPSOpt, 0, wxEXPAND, 5 );
bUpperSizer->Add( bSizerFmtPlot, 1, wxEXPAND, 5 );
wxBoxSizer* bButtonsSizer;
bButtonsSizer = new wxBoxSizer( wxVERTICAL );
m_PlotMirorOpt = new wxCheckBox( this, ID_MIROR_OPT, _("Plot mirror"), wxDefaultPosition, wxDefaultSize, 0 );
bButtonsSizer->Add( m_PlotMirorOpt, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_PlotNoViaOnMaskOpt = new wxCheckBox( this, ID_MASKVIA_OPT, _("Vias on mask"), wxDefaultPosition, wxDefaultSize, 0 );
m_PlotNoViaOnMaskOpt->SetToolTip( _("Print/plot vias on mask layers. They are in this case not protected") );
bButtonsSizer->Add( m_PlotNoViaOnMaskOpt, 0, wxALL, 5 );
m_staticText6 = new wxStaticText( this, wxID_ANY, _("Line width"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText6->Wrap( -1 );
bButtonsSizer->Add( m_staticText6, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_LinesWidth = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
bButtonsSizer->Add( m_LinesWidth, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
bButtonsSizer->Add( 0, 20, 1, wxEXPAND, 5 );
m_staticText7 = new wxStaticText( this, wxID_ANY, _("X scale adjust"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText7->Wrap( -1 );
bButtonsSizer->Add( m_staticText7, 0, wxRIGHT|wxLEFT, 5 );
m_FineAdjustXscaleOpt = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_FineAdjustXscaleOpt->SetToolTip( _("Set X scale adjust for exact scale plotting") );
bButtonsSizer->Add( m_FineAdjustXscaleOpt, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_staticText8 = new wxStaticText( this, wxID_ANY, _("Y scale adjust"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText8->Wrap( -1 );
bButtonsSizer->Add( m_staticText8, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_FineAdjustYscaleOpt = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
bButtonsSizer->Add( m_FineAdjustYscaleOpt, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
bButtonsSizer->Add( 0, 20, 1, wxEXPAND, 5 );
m_PlotButton = new wxButton( this, ID_EXEC_PLOT, _("Plot"), wxDefaultPosition, wxDefaultSize, 0 );
m_PlotButton->SetDefault();
bButtonsSizer->Add( m_PlotButton, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
m_buttonSaveOpt = new wxButton( this, ID_SAVE_OPT_PLOT, _("Save Options"), wxDefaultPosition, wxDefaultSize, 0 );
bButtonsSizer->Add( m_buttonSaveOpt, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
m_buttonDrill = new wxButton( this, ID_CREATE_DRILL_FILE, _("Generate drill file"), wxDefaultPosition, wxDefaultSize, 0 );
bButtonsSizer->Add( m_buttonDrill, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
m_buttonQuit = new wxButton( this, wxID_CANCEL, _("Quit"), wxDefaultPosition, wxDefaultSize, 0 );
bButtonsSizer->Add( m_buttonQuit, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
bUpperSizer->Add( bButtonsSizer, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
bMainSizer->Add( bUpperSizer, 0, wxEXPAND, 5 );
m_staticText2 = new wxStaticText( this, wxID_ANY, _("Messages:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText2->Wrap( -1 );
bMainSizer->Add( m_staticText2, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_MessagesBox = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE );
m_MessagesBox->SetMinSize( wxSize( -1,120 ) );
bMainSizer->Add( m_MessagesBox, 1, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
this->SetSizer( bMainSizer );
this->Layout();
// Connect Events
this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_PLOT_BASE::OnCloseWindow ) );
this->Connect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_PLOT_BASE::OnInitDialog ) );
m_PlotFormatOpt->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_PLOT_BASE::SetPlotFormat ), NULL, this );
m_PlotButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::Plot ), NULL, this );
m_buttonSaveOpt->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::SaveOptPlot ), NULL, this );
m_buttonDrill->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::CreateDrillFile ), NULL, this );
m_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::OnCloseWindow ) );
this->Disconnect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_PLOT_BASE::OnInitDialog ) );
m_PlotFormatOpt->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_PLOT_BASE::SetPlotFormat ), NULL, this );
m_PlotButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::Plot ), NULL, this );
m_buttonSaveOpt->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::SaveOptPlot ), NULL, this );
m_buttonDrill->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::CreateDrillFile ), NULL, this );
m_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 Apr 16 2008)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#ifndef __dialog_plot_base__
#define __dialog_plot_base__
#include <wx/intl.h>
#include <wx/string.h>
#include <wx/sizer.h>
#include <wx/statbox.h>
#include <wx/gdicmn.h>
#include <wx/checkbox.h>
#include <wx/font.h>
#include <wx/colour.h>
#include <wx/settings.h>
#include <wx/radiobox.h>
#include <wx/stattext.h>
#include <wx/textctrl.h>
#include <wx/button.h>
#include <wx/dialog.h>
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
/// Class DIALOG_PLOT_BASE
///////////////////////////////////////////////////////////////////////////////
class DIALOG_PLOT_BASE : public wxDialog
{
private:
protected:
enum
{
ID_USE_GERBER_EXTENSIONS = 1000,
ID_PRINT_PAD_ON_SILKSCREEN,
ID_FORCE_PRINT_PAD,
ID_PRINT_VALUE,
ID_PRINT_REF,
ID_PRINT_MODULE_TEXTS,
ID_FORCE_PRINT_INVISIBLE_TEXT,
ID_DRILL_SHAPE_OPT,
ID_MIROR_OPT,
ID_MASKVIA_OPT,
ID_EXEC_PLOT,
ID_SAVE_OPT_PLOT,
ID_CREATE_DRILL_FILE,
};
wxStaticBoxSizer* m_CopperLayersBoxSizer;
wxStaticBoxSizer* m_TechnicalLayersBoxSizer;
wxCheckBox* m_Use_Gerber_Extensions;
wxCheckBox* m_Exclude_Edges_Pcb;
wxCheckBox* m_Plot_Sheet_Ref;
wxCheckBox* m_Plot_Pads_on_Silkscreen;
wxCheckBox* m_Force_Plot_Pads;
wxCheckBox* m_Plot_Text_Value;
wxCheckBox* m_Plot_Text_Ref;
wxCheckBox* m_Plot_Text_Div;
wxCheckBox* m_Plot_Invisible_Text;
wxRadioBox* m_Drill_Shape_Opt;
wxRadioBox* m_Scale_Opt;
wxRadioBox* m_PlotModeOpt;
wxRadioBox* m_Choice_Plot_Offset;
wxRadioBox* m_PlotFormatOpt;
wxStaticText* m_textPenSize;
wxTextCtrl* m_HPGLPenSizeOpt;
wxStaticText* m_staticText3;
wxTextCtrl* m_HPGLPenSpeedOpt;
wxStaticText* m_textPenOvr;
wxTextCtrl* m_HPGLPenOverlayOpt;
wxCheckBox* m_Plot_PS_Negative;
wxCheckBox* m_PlotMirorOpt;
wxCheckBox* m_PlotNoViaOnMaskOpt;
wxStaticText* m_staticText6;
wxTextCtrl* m_LinesWidth;
wxStaticText* m_staticText7;
wxTextCtrl* m_FineAdjustXscaleOpt;
wxStaticText* m_staticText8;
wxTextCtrl* m_FineAdjustYscaleOpt;
wxButton* m_PlotButton;
wxButton* m_buttonSaveOpt;
wxButton* m_buttonDrill;
wxButton* m_buttonQuit;
wxStaticText* m_staticText2;
wxTextCtrl* m_MessagesBox;
// Virtual event handlers, overide them in your derived class
virtual void OnCloseWindow( wxCloseEvent& event ){ event.Skip(); }
virtual void OnInitDialog( wxInitDialogEvent& event ){ event.Skip(); }
virtual void SetPlotFormat( wxCommandEvent& event ){ event.Skip(); }
virtual void Plot( wxCommandEvent& event ){ event.Skip(); }
virtual void SaveOptPlot( 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( 575,590 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_PLOT_BASE();
};
#endif //__dialog_plot_base__
...@@ -15,7 +15,9 @@ ...@@ -15,7 +15,9 @@
#include "printout_controler.h" #include "printout_controler.h"
#include "pcbnew.h" #include "pcbnew.h"
#include "wxPcbStruct.h"
#include "pcbplot.h" #include "pcbplot.h"
#include "class_board_design_settings.h"
#define WIDTH_MAX_VALUE 1000 #define WIDTH_MAX_VALUE 1000
#define WIDTH_MIN_VALUE 1 #define WIDTH_MIN_VALUE 1
...@@ -41,13 +43,13 @@ static PRINT_PARAMETERS s_Parameters; ...@@ -41,13 +43,13 @@ static PRINT_PARAMETERS s_Parameters;
class DIALOG_PRINT_USING_PRINTER : public DIALOG_PRINT_USING_PRINTER_base class DIALOG_PRINT_USING_PRINTER : public DIALOG_PRINT_USING_PRINTER_base
{ {
private: private:
WinEDA_DrawFrame* m_Parent; WinEDA_PcbFrame* m_Parent;
wxConfig* m_Config; wxConfig* m_Config;
wxCheckBox* m_BoxSelectLayer[32]; wxCheckBox* m_BoxSelectLayer[32];
static bool m_ExcludeEdgeLayer; static bool m_ExcludeEdgeLayer;
public: public:
DIALOG_PRINT_USING_PRINTER( WinEDA_DrawFrame* parent ); DIALOG_PRINT_USING_PRINTER( WinEDA_PcbFrame* parent );
~DIALOG_PRINT_USING_PRINTER() {}; ~DIALOG_PRINT_USING_PRINTER() {};
private: private:
...@@ -74,7 +76,7 @@ bool DIALOG_PRINT_USING_PRINTER::m_ExcludeEdgeLayer; ...@@ -74,7 +76,7 @@ bool DIALOG_PRINT_USING_PRINTER::m_ExcludeEdgeLayer;
/*******************************************************/ /*******************************************************/
void WinEDA_DrawFrame::ToPrinter( wxCommandEvent& event ) void WinEDA_PcbFrame::ToPrinter( wxCommandEvent& event )
/*******************************************************/ /*******************************************************/
/* Virtual function: /* Virtual function:
...@@ -100,13 +102,13 @@ void WinEDA_DrawFrame::ToPrinter( wxCommandEvent& event ) ...@@ -100,13 +102,13 @@ void WinEDA_DrawFrame::ToPrinter( wxCommandEvent& event )
/*************************************************************************************/ /*************************************************************************************/
DIALOG_PRINT_USING_PRINTER::DIALOG_PRINT_USING_PRINTER( WinEDA_DrawFrame* parent ) : DIALOG_PRINT_USING_PRINTER::DIALOG_PRINT_USING_PRINTER( WinEDA_PcbFrame* parent ) :
DIALOG_PRINT_USING_PRINTER_base( parent ) DIALOG_PRINT_USING_PRINTER_base( parent )
/*************************************************************************************/ /*************************************************************************************/
{ {
m_Parent = parent; m_Parent = parent;
m_Config = wxGetApp().m_EDA_Config; m_Config = wxGetApp().m_EDA_Config;
InitValues( ); InitValues( );
if( GetSizer() ) if( GetSizer() )
...@@ -123,45 +125,56 @@ void DIALOG_PRINT_USING_PRINTER::InitValues( ) ...@@ -123,45 +125,56 @@ void DIALOG_PRINT_USING_PRINTER::InitValues( )
SetFocus(); SetFocus();
int layer_max = NB_LAYERS; int layer_max = NB_LAYERS;
wxString msg; wxString msg;
BOARD* board = m_Parent->GetBoard();
#ifdef GERBVIEW // Create layer list.
layer_max = 32; int layer;
m_ExcludeEdgeLayer = true; // no meaning in gerbview wxString layerKey;
m_Exclude_Edges_Pcb->Show( false ); for( layer = 0; layer < NB_LAYERS; ++layer )
msg = _( "Layers:" );
// Set wxRadioBox title to "Layers:" for copper layers and thechincal layers
// Because in Gerbview , al layers are only graphic layers (layer id has no meaning)
m_CopperLayersBoxSizer->GetStaticBox()->SetLabel( msg );
m_TechnicalLayersBoxSizer->GetStaticBox()->SetLabel( msg );
#endif
/* Create layer list */
int mask = 1, ii;
for( ii = 0; ii < layer_max; ii++, mask <<= 1 )
{ {
#ifdef GERBVIEW if( !board->m_BoardSettings->IsLayerEnabled( layer ) )
msg = _( "Layer" ); m_BoxSelectLayer[layer] = NULL;
msg << wxT( " " ) << ii + 1; else
#else m_BoxSelectLayer[layer] =
msg = ( (WinEDA_BasePcbFrame*) m_Parent )->GetBoard()->GetLayerName( ii ); new wxCheckBox( this, -1, board->GetLayerName( layer ) );
#endif }
m_BoxSelectLayer[ii] = new wxCheckBox( this, -1, msg );
// Add wxCheckBoxes in layers lists dialog
// List layers in same order than in setup layers dialog
// (Front or Top to Back or Bottom)
DECLARE_LAYERS_ORDER_LIST(layersOrder);
for( int layer_idx = 0; layer_idx < NB_LAYERS; ++layer_idx )
{
layer = layersOrder[layer_idx];
wxASSERT(layer < NB_LAYERS);
if( m_BoxSelectLayer[layer] == NULL )
continue;
if( mask & s_SelectedLayers ) if( layer < NB_COPPER_LAYERS )
m_BoxSelectLayer[ii]->SetValue( TRUE ); m_CopperLayersBoxSizer->Add( m_BoxSelectLayer[layer],
if( ii < 16 ) 0, wxGROW | wxALL, 1 );
m_CopperLayersBoxSizer->Add( m_BoxSelectLayer[ii],
wxGROW | wxLEFT | wxRIGHT | wxTOP | wxADJUST_MINSIZE );
else else
m_TechnicalLayersBoxSizer->Add( m_BoxSelectLayer[ii], m_TechnicalLayersBoxSizer->Add( m_BoxSelectLayer[layer],
wxGROW | wxLEFT | wxRIGHT | wxTOP | wxADJUST_MINSIZE ); 0, wxGROW | wxALL, 1 );
layerKey.Printf( OPTKEY_LAYERBASE, layer );
bool option;
if( m_Config->Read( layerKey, &option ) )
m_BoxSelectLayer[layer]->SetValue( option );
else
{
long mask = 1 << layer;
if( mask & s_SelectedLayers )
m_BoxSelectLayer[layer]->SetValue( true );
}
} }
// Option for excluding contents of "Edges Pcb" layer // Option for excluding contents of "Edges Pcb" layer
#ifndef GERBVIEW
m_Exclude_Edges_Pcb->Show( true ); m_Exclude_Edges_Pcb->Show( true );
#endif
// 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
...@@ -185,6 +198,9 @@ void DIALOG_PRINT_USING_PRINTER::InitValues( ) ...@@ -185,6 +198,9 @@ void DIALOG_PRINT_USING_PRINTER::InitValues( )
s_SelectedLayers = 0; s_SelectedLayers = 0;
for( int layer = 0; layer<layer_max; ++layer ) for( int layer = 0; layer<layer_max; ++layer )
{ {
if( m_BoxSelectLayer[layer] == NULL )
continue;
wxString layerKey; wxString layerKey;
bool option; bool option;
...@@ -231,20 +247,19 @@ int DIALOG_PRINT_USING_PRINTER::SetLayerMaskFromListSelection() ...@@ -231,20 +247,19 @@ int DIALOG_PRINT_USING_PRINTER::SetLayerMaskFromListSelection()
int page_count; int page_count;
int layers_count = NB_LAYERS; int layers_count = NB_LAYERS;
if( m_Parent->m_Ident == GERBER_FRAME )
layers_count = 32;
s_Parameters.m_PrintMaskLayer = 0; s_Parameters.m_PrintMaskLayer = 0;
int ii; int ii;
for( ii = 0, page_count = 0; ii < layers_count; ii++ ) for( ii = 0, page_count = 0; ii < layers_count; ii++ )
{ {
if( m_BoxSelectLayer[ii] == NULL )
continue;
if( m_BoxSelectLayer[ii]->IsChecked() ) if( m_BoxSelectLayer[ii]->IsChecked() )
{ {
page_count++; page_count++;
s_Parameters.m_PrintMaskLayer |= 1 << ii; s_Parameters.m_PrintMaskLayer |= 1 << ii;
} }
} }
// In pcbnew: force the EDGE layer to be printed or not with the other layers // In pcbnew: force the EDGE layer to be printed or not with the other layers
m_ExcludeEdgeLayer = m_Exclude_Edges_Pcb->IsChecked(); m_ExcludeEdgeLayer = m_Exclude_Edges_Pcb->IsChecked();
if( m_ExcludeEdgeLayer ) if( m_ExcludeEdgeLayer )
...@@ -273,11 +288,10 @@ void DIALOG_PRINT_USING_PRINTER::OnCloseWindow( wxCloseEvent& event ) ...@@ -273,11 +288,10 @@ void DIALOG_PRINT_USING_PRINTER::OnCloseWindow( wxCloseEvent& event )
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);
wxString layerKey; wxString layerKey;
int layers_count = NB_LAYERS; for( int layer = 0; layer < NB_LAYERS; ++layer )
if( m_Parent->m_Ident == GERBER_FRAME )
layers_count = 32;
for( int layer = 0; layer<layers_count; ++layer )
{ {
if( m_BoxSelectLayer[layer] == NULL )
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() );
} }
...@@ -292,12 +306,12 @@ void DIALOG_PRINT_USING_PRINTER::SetPrintParameters( ) ...@@ -292,12 +306,12 @@ void DIALOG_PRINT_USING_PRINTER::SetPrintParameters( )
{ {
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 =
m_ModeColorOption->GetSelection() != 0; m_ModeColorOption->GetSelection() != 0;
if( m_PagesOption ) if( m_PagesOption )
s_Parameters.m_OptionPrintPage = m_PagesOption->GetSelection() != 0; s_Parameters.m_OptionPrintPage = m_PagesOption->GetSelection() != 0;
SetLayerMaskFromListSelection(); SetLayerMaskFromListSelection();
......
...@@ -129,7 +129,7 @@ BEGIN_EVENT_TABLE( WinEDA_PcbFrame, WinEDA_BasePcbFrame ) ...@@ -129,7 +129,7 @@ BEGIN_EVENT_TABLE( WinEDA_PcbFrame, WinEDA_BasePcbFrame )
EVT_TOOL( wxID_PASTE, WinEDA_PcbFrame::Process_Special_Functions ) EVT_TOOL( wxID_PASTE, WinEDA_PcbFrame::Process_Special_Functions )
EVT_TOOL( ID_UNDO_BUTT, WinEDA_PcbFrame::GetBoardFromUndoList ) EVT_TOOL( ID_UNDO_BUTT, WinEDA_PcbFrame::GetBoardFromUndoList )
EVT_TOOL( ID_REDO_BUTT, WinEDA_PcbFrame::GetBoardFromRedoList ) EVT_TOOL( ID_REDO_BUTT, WinEDA_PcbFrame::GetBoardFromRedoList )
EVT_TOOL( ID_GEN_PRINT, WinEDA_DrawFrame::ToPrinter ) EVT_TOOL( ID_GEN_PRINT, WinEDA_PcbFrame::ToPrinter )
EVT_TOOL( ID_GEN_PLOT_SVG, WinEDA_DrawFrame::SVG_Print ) EVT_TOOL( ID_GEN_PLOT_SVG, WinEDA_DrawFrame::SVG_Print )
EVT_TOOL( ID_GEN_PLOT, WinEDA_PcbFrame::Process_Special_Functions ) EVT_TOOL( ID_GEN_PLOT, WinEDA_PcbFrame::Process_Special_Functions )
EVT_TOOL( ID_FIND_ITEMS, WinEDA_PcbFrame::Process_Special_Functions ) EVT_TOOL( ID_FIND_ITEMS, WinEDA_PcbFrame::Process_Special_Functions )
......
...@@ -592,6 +592,7 @@ static PARAM_CFG_SETCOLOR ColorCheveluCfg ...@@ -592,6 +592,7 @@ static PARAM_CFG_SETCOLOR ColorCheveluCfg
static PARAM_CFG_INT HPGLpenNumCfg static PARAM_CFG_INT HPGLpenNumCfg
( (
INSETUP,
wxT( "HPGLnum" ), wxT( "HPGLnum" ),
&g_pcb_plot_options.HPGL_Pen_Num, &g_pcb_plot_options.HPGL_Pen_Num,
1, 1,
...@@ -600,6 +601,7 @@ static PARAM_CFG_INT HPGLpenNumCfg ...@@ -600,6 +601,7 @@ static PARAM_CFG_INT HPGLpenNumCfg
static PARAM_CFG_INT HPGLdiamCfg // HPGL pen size (mils) static PARAM_CFG_INT HPGLdiamCfg // HPGL pen size (mils)
( (
INSETUP,
wxT( "HPGdiam" ), wxT( "HPGdiam" ),
&g_pcb_plot_options.HPGL_Pen_Diam, &g_pcb_plot_options.HPGL_Pen_Diam,
15, 15,
...@@ -608,6 +610,7 @@ static PARAM_CFG_INT HPGLdiamCfg // HPGL pen size (mils) ...@@ -608,6 +610,7 @@ static PARAM_CFG_INT HPGLdiamCfg // HPGL pen size (mils)
static PARAM_CFG_INT HPGLspeedCfg //HPGL pen speed (cm/s) static PARAM_CFG_INT HPGLspeedCfg //HPGL pen speed (cm/s)
( (
INSETUP,
wxT( "HPGLSpd" ), wxT( "HPGLSpd" ),
&g_pcb_plot_options.HPGL_Pen_Speed, &g_pcb_plot_options.HPGL_Pen_Speed,
20, 20,
...@@ -616,6 +619,7 @@ static PARAM_CFG_INT HPGLspeedCfg //HPGL pen speed (cm/s) ...@@ -616,6 +619,7 @@ static PARAM_CFG_INT HPGLspeedCfg //HPGL pen speed (cm/s)
static PARAM_CFG_INT HPGLrecouvrementCfg static PARAM_CFG_INT HPGLrecouvrementCfg
( (
INSETUP,
wxT( "HPGLrec" ), wxT( "HPGLrec" ),
&g_pcb_plot_options.HPGL_Pen_Recouvrement, &g_pcb_plot_options.HPGL_Pen_Recouvrement,
2, 2,
......
...@@ -16,10 +16,11 @@ ...@@ -16,10 +16,11 @@
#include "protos.h" #include "protos.h"
#include "pcbstruct.h" #include "pcbstruct.h"
#include "class_board_design_settings.h" #include "class_board_design_settings.h"
#include "dialog_plot_base.h"
#define PLOT_DEFAULT_MARGE 300 // mils #define PLOT_DEFAULT_MARGE 300 // mils
/* Keywords to r/w options in config */ /* Keywords to r/w options in m_Config */
#define OPTKEY_EDGELAYER_GERBER wxT( "EdgeLayerGerberOpt" ) #define OPTKEY_EDGELAYER_GERBER wxT( "EdgeLayerGerberOpt" )
#define OPTKEY_GERBER_EXTENSIONS wxT( "GerberOptUseLayersExt" ) #define OPTKEY_GERBER_EXTENSIONS wxT( "GerberOptUseLayersExt" )
#define OPTKEY_XFINESCALE_ADJ wxT( "PlotXFineScaleAdj" ) #define OPTKEY_XFINESCALE_ADJ wxT( "PlotXFineScaleAdj" )
...@@ -53,31 +54,6 @@ static long s_SelectedLayers = LAYER_BACK | LAYER_FRONT | ...@@ -53,31 +54,6 @@ static long s_SelectedLayers = LAYER_BACK | LAYER_FRONT |
static bool s_PlotOriginIsAuxAxis = FALSE; static bool s_PlotOriginIsAuxAxis = FALSE;
enum id_plotps {
ID_DRILL_SHAPE_OPT = 8020,
ID_SCALE_OPT,
ID_ROTATE_OPT,
ID_MIROR_OPT,
ID_EXEC_PLOT,
ID_PLOT_MODE_OPT,
ID_MASKVIA_OPT,
ID_PLOT_CENTRE_OPT,
ID_SEL_PLOT_FORMAT,
ID_SEL_GERBER_FORMAT,
ID_SAVE_OPT_PLOT,
ID_EXCLUDE_EDGES_PCB,
ID_PRINT_REF,
ID_PRINT_VALUE,
ID_PRINT_MODULE_TEXTS,
ID_FORCE_PRINT_INVISIBLE_TEXT,
ID_PRINT_PAD_ON_SILKSCREEN,
ID_FORCE_PRINT_PAD,
ID_CREATE_DRILL_FILE,
ID_SEL_PLOT_OFFSET_OPTION,
ID_USE_GERBER_EXTENSIONS
};
/* The group of plot options - sadly global XXX */ /* The group of plot options - sadly global XXX */
PCB_Plot_Options g_pcb_plot_options; PCB_Plot_Options g_pcb_plot_options;
...@@ -85,39 +61,15 @@ PCB_Plot_Options g_pcb_plot_options; ...@@ -85,39 +61,15 @@ PCB_Plot_Options g_pcb_plot_options;
/* Dialog box for plot control */ /* Dialog box for plot control */
/*******************************/ /*******************************/
class WinEDA_PlotFrame : public wxDialog class DIALOG_PLOT : public DIALOG_PLOT_BASE
{ {
public: public:
WinEDA_BasePcbFrame* m_Parent; WinEDA_PcbFrame* m_Parent;
wxButton* m_PlotButton; // button with initial focus wxConfig* m_Config;
wxCheckBox* m_BoxSelectLayer[32]; wxCheckBox* m_BoxSelectLayer[LAYER_COUNT]; // wxCheckBox list to select/deselec layers to plot
wxRadioBox* m_PlotFormatOpt; double m_XScaleAdjust;
wxRadioBox* m_Choice_Plot_Offset; double m_YScaleAdjust;
wxRadioBox* m_Drill_Shape_Opt;
wxRadioBox* m_Scale_Opt;
wxRadioBox* m_PlotModeOpt;
wxCheckBox* m_PlotMirorOpt;
wxCheckBox* m_PlotNoViaOnMaskOpt;
wxCheckBox* m_Exclude_Edges_Pcb;
wxCheckBox* m_Use_Gerber_Extensions;
wxCheckBox* m_Plot_Sheet_Ref;
wxCheckBox* m_Plot_Invisible_Text;
wxCheckBox* m_Plot_Text_Value;
wxCheckBox* m_Plot_Text_Ref;
wxCheckBox* m_Plot_Text_Div;
wxCheckBox* m_Plot_Pads_on_Silkscreen;
wxCheckBox* m_Force_Plot_Pads;
wxCheckBox* m_Plot_PS_Negative;
WinEDA_ValueCtrl* m_LinesWidth;
WinEDA_ValueCtrl* m_HPGLPenSizeOpt;
WinEDA_ValueCtrl* m_HPGLPenSpeedOpt;
WinEDA_ValueCtrl* m_HPGLPenOverlayOpt;
wxStaticBox* m_HPGL_OptionsBox;
WinEDA_DFloatValueCtrl* m_FineAdjustXscaleOpt;
WinEDA_DFloatValueCtrl* m_FineAdjustYscaleOpt;
double m_XScaleAdjust;
double m_YScaleAdjust;
bool useA4() bool useA4()
{ {
...@@ -152,425 +104,218 @@ public: ...@@ -152,425 +104,218 @@ public:
public: public:
WinEDA_PlotFrame( WinEDA_BasePcbFrame* parent ); DIALOG_PLOT( WinEDA_PcbFrame* parent );
private: private:
void OnInitDialog( wxInitDialogEvent& event ); void Init_Dialog();
void Plot( wxCommandEvent& event ); void Plot( wxCommandEvent& event );
void OnQuit( wxCommandEvent& event ); void OnQuit( wxCommandEvent& event );
void OnClose( wxCloseEvent& event ); void OnClose( wxCloseEvent& event );
void SetCommands( wxCommandEvent& event ); void SetPlotFormat( wxCommandEvent& event );
void OnSetScaleOpt( wxCommandEvent& event ); void OnSetScaleOpt( wxCommandEvent& event );
void SaveOptPlot( wxCommandEvent& event ); void SaveOptPlot( wxCommandEvent& event );
void CreateDrillFile( wxCommandEvent& event ); void CreateDrillFile( wxCommandEvent& event );
DECLARE_EVENT_TABLE()
}; };
BEGIN_EVENT_TABLE( WinEDA_PlotFrame, wxDialog )
EVT_INIT_DIALOG( WinEDA_PlotFrame::OnInitDialog )
EVT_CLOSE( WinEDA_PlotFrame::OnClose )
EVT_BUTTON( wxID_CANCEL, WinEDA_PlotFrame::OnQuit )
EVT_BUTTON( ID_EXEC_PLOT, WinEDA_PlotFrame::Plot )
EVT_BUTTON( ID_SAVE_OPT_PLOT, WinEDA_PlotFrame::SaveOptPlot )
EVT_BUTTON( ID_CREATE_DRILL_FILE, WinEDA_PlotFrame::CreateDrillFile )
EVT_RADIOBOX( ID_SEL_PLOT_FORMAT, WinEDA_PlotFrame::SetCommands )
EVT_RADIOBOX( ID_SCALE_OPT, WinEDA_PlotFrame::OnSetScaleOpt )
END_EVENT_TABLE()
const int UNITS_MILS = 1000; const int UNITS_MILS = 1000;
WinEDA_PlotFrame::WinEDA_PlotFrame( WinEDA_BasePcbFrame* parent ) : DIALOG_PLOT::DIALOG_PLOT( WinEDA_PcbFrame* parent ) :
wxDialog( parent, -1, _( "Plot" ), wxPoint( -1, -1 ), wxDefaultSize, DIALOG_PLOT_BASE( parent )
wxDEFAULT_DIALOG_STYLE )
{ {
m_Parent = parent; m_Parent = parent;
m_Config = wxGetApp().m_EDA_Config;
Init_Dialog();
GetSizer()->Fit( this );
GetSizer()->SetSizeHints( this );
Centre(); Centre();
} }
void WinEDA_PlotFrame::OnInitDialog( wxInitDialogEvent& event ) void DIALOG_PLOT::Init_Dialog()
{ {
wxButton* button; wxString msg;
BOARD* board = m_Parent->GetBoard();
wxConfig* config = wxGetApp().m_EDA_Config; BOARD* board = m_Parent->GetBoard();
m_Plot_Sheet_Ref = NULL; m_Config->Read( OPTKEY_OUTPUT_FORMAT, &g_pcb_plot_options.PlotFormat );
m_Config->Read( OPTKEY_PLOT_LINEWIDTH_VALUE, &g_pcb_plot_options.PlotLine_Width );
wxBoxSizer* MainBoxSizer = new wxBoxSizer( wxHORIZONTAL ); m_Config->Read( OPTKEY_EDGELAYER_GERBER, &g_pcb_plot_options.Exclude_Edges_Pcb );
m_Config->Read( OPTKEY_XFINESCALE_ADJ, &m_XScaleAdjust );
SetSizer( MainBoxSizer ); m_Config->Read( OPTKEY_YFINESCALE_ADJ, &m_YScaleAdjust );
wxBoxSizer* RightBoxSizer = new wxBoxSizer( wxVERTICAL );
wxBoxSizer* MidRightBoxSizer = new wxBoxSizer( wxVERTICAL );
wxBoxSizer* MidLeftBoxSizer = new wxBoxSizer( wxVERTICAL );
wxBoxSizer* LeftBoxSizer = new wxBoxSizer( wxVERTICAL );
MainBoxSizer->Add( LeftBoxSizer, 0, wxGROW | wxALL, 5 );
MainBoxSizer->Add( MidLeftBoxSizer, 0, wxGROW | wxALL, 5 );
MainBoxSizer->Add( MidRightBoxSizer, 0, wxGROW | wxALL, 5 );
MainBoxSizer->Add( RightBoxSizer, 0, wxGROW | wxALL, 5 );
wxBoxSizer* LayersBoxSizer = new wxBoxSizer( wxHORIZONTAL );
LeftBoxSizer->Add( LayersBoxSizer, 0, wxGROW | wxALL, 5 );
static const wxString fmtmsg[5] =
{
wxT( "HPGL" ),
wxT( "Gerber" ),
wxT( "Postscript" ),
wxT( "Postscript A4" ),
wxT( "DXF Export" )
};
m_PlotFormatOpt = new wxRadioBox( this, ID_SEL_PLOT_FORMAT,
_( "Plot Format" ), wxDefaultPosition,
wxSize( -1, -1 ),
5, fmtmsg, 1, wxRA_SPECIFY_COLS );
MidRightBoxSizer->Add( m_PlotFormatOpt, 0, wxGROW | wxALL, 5 );
config->Read( OPTKEY_OUTPUT_FORMAT, &g_pcb_plot_options.PlotFormat );
config->Read( OPTKEY_PLOT_LINEWIDTH_VALUE,
&g_pcb_plot_options.PlotLine_Width );
m_PlotFormatOpt->SetSelection( g_pcb_plot_options.PlotFormat ); m_PlotFormatOpt->SetSelection( g_pcb_plot_options.PlotFormat );
m_HPGL_OptionsBox = new wxStaticBox( this, wxID_ANY, _( "HPGL Options:" ) );
wxStaticBoxSizer* HPGL_OptionsBoxSizer =
new wxStaticBoxSizer( m_HPGL_OptionsBox, wxVERTICAL );
MidRightBoxSizer->Add( HPGL_OptionsBoxSizer, 0, wxGROW | wxALL, 5 );
m_HPGLPenSizeOpt = new WinEDA_ValueCtrl( this, _( "Pen size" ), // Set units and value for HPGL pen speed.
g_pcb_plot_options.HPGL_Pen_Diam, AddUnitSymbol( *m_textPenSize, g_UnitMetric );
g_UnitMetric, msg = ReturnStringFromValue( g_UnitMetric, g_pcb_plot_options.HPGL_Pen_Diam, UNITS_MILS );
HPGL_OptionsBoxSizer, m_HPGLPenSizeOpt->AppendText( msg );
UNITS_MILS );
// Set units to cm for standard HPGL pen speed. // Set units to cm for standard HPGL pen speed.
m_HPGLPenSpeedOpt = new WinEDA_ValueCtrl( this, _( "Pen Speed (cm/s)" ), msg = ReturnStringFromValue( CENTIMETRE, g_pcb_plot_options.HPGL_Pen_Speed, 1 );
g_pcb_plot_options.HPGL_Pen_Speed, CENTIMETRE, m_HPGLPenSpeedOpt->AppendText( msg );
HPGL_OptionsBoxSizer, 1 );
m_HPGLPenSpeedOpt->SetToolTip( _( "Set pen speed in cm/s" ) ); // Set units and value for HPGL pen overlay.
AddUnitSymbol( *m_textPenOvr, g_UnitMetric );
msg = ReturnStringFromValue( g_UnitMetric,
g_pcb_plot_options.HPGL_Pen_Recouvrement,
UNITS_MILS );
m_HPGLPenOverlayOpt->AppendText( msg );
m_HPGLPenOverlayOpt = new WinEDA_ValueCtrl( this, _( "Pen ovr" ), msg = ReturnStringFromValue( g_UnitMetric,
g_pcb_plot_options.HPGL_Pen_Recouvrement, g_pcb_plot_options.PlotLine_Width,
g_UnitMetric, PCB_INTERNAL_UNIT );
HPGL_OptionsBoxSizer, m_LinesWidth->AppendText( msg );
UNITS_MILS );
m_HPGLPenOverlayOpt->SetToolTip( _( "Set plot overlay for filling" ) );
m_LinesWidth = new WinEDA_ValueCtrl( this, _( "Line width" ),
g_pcb_plot_options.PlotLine_Width,
g_UnitMetric,
MidRightBoxSizer,
PCB_INTERNAL_UNIT );
m_LinesWidth->SetToolTip( _(
"Set lines width used to plot in sketch \
mode and plot pads outlines on silk screen layers" ) );
// Create the right column commands
static const wxString choice_plot_offset_msg[] =
{ _( "Absolute" ), _( "Auxiliary axis" ) };
m_Choice_Plot_Offset = new wxRadioBox( this, ID_SEL_PLOT_OFFSET_OPTION,
_( "Plot Origin" ),
wxDefaultPosition,
wxSize( -1, -1 ),
2, choice_plot_offset_msg, 1,
wxRA_SPECIFY_COLS );
if( s_PlotOriginIsAuxAxis ) if( s_PlotOriginIsAuxAxis )
m_Choice_Plot_Offset->SetSelection( 1 ); m_Choice_Plot_Offset->SetSelection( 1 );
RightBoxSizer->Add( m_Choice_Plot_Offset, 0, wxGROW | wxALL, 5 );
/* Add a spacer for a better look */
RightBoxSizer->Add( 5, 5, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 20 );
// Create scale adjust option // Create scale adjust option
m_XScaleAdjust = m_YScaleAdjust = 1.0; m_XScaleAdjust = m_YScaleAdjust = 1.0;
config->Read( OPTKEY_EDGELAYER_GERBER, &g_pcb_plot_options.Exclude_Edges_Pcb );
config->Read( OPTKEY_XFINESCALE_ADJ, &m_XScaleAdjust );
config->Read( OPTKEY_YFINESCALE_ADJ, &m_YScaleAdjust );
// 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
|| m_XScaleAdjust > MAX_SCALE || m_YScaleAdjust > MAX_SCALE ) || m_XScaleAdjust > MAX_SCALE || m_YScaleAdjust > MAX_SCALE )
m_XScaleAdjust = m_YScaleAdjust = 1.0; m_XScaleAdjust = m_YScaleAdjust = 1.0;
m_FineAdjustXscaleOpt = new WinEDA_DFloatValueCtrl( this, msg.Printf( wxT( "%f" ), m_XScaleAdjust );
_( "X scale adjust" ), m_FineAdjustXscaleOpt->AppendText( msg );
m_XScaleAdjust,
RightBoxSizer );
m_FineAdjustXscaleOpt->SetToolTip( _( "Set X scale adjust for exact \
scale plotting" ) );
m_FineAdjustYscaleOpt = new WinEDA_DFloatValueCtrl( this,
_( "Y scale adjust" ),
m_YScaleAdjust,
RightBoxSizer );
m_FineAdjustYscaleOpt->SetToolTip( _( "Set Y scale adjust for exact \
scale plotting" ) );
m_Plot_PS_Negative = new wxCheckBox( this, -1, _( "Plot negative" ) );
m_Plot_PS_Negative->SetValue( g_pcb_plot_options.Plot_PS_Negative );
RightBoxSizer->Add( m_Plot_PS_Negative, 0, wxGROW | wxALL, 5 );
/* Create the command buttons */
m_PlotButton = new wxButton( this, ID_EXEC_PLOT, _( "Plot" ) );
RightBoxSizer->Add( m_PlotButton, 0, wxGROW | wxALL, 5 );
button = new wxButton( this, ID_SAVE_OPT_PLOT, _( "Save Options" ) ); msg.Printf( wxT( "%f" ), m_YScaleAdjust );
RightBoxSizer->Add( button, 0, wxGROW | wxALL, 5 ); m_FineAdjustYscaleOpt->AppendText( msg );
button = new wxButton( this, ID_CREATE_DRILL_FILE, m_Plot_PS_Negative->SetValue( g_pcb_plot_options.Plot_PS_Negative );
_( "Generate drill file" ) );
RightBoxSizer->Add( button, 0, wxGROW | wxALL, 5 );
button = new wxButton( this, wxID_CANCEL, _( "Close" ) );
RightBoxSizer->Add( button, 0, wxGROW | wxALL, 5 );
// Create layer list. // Create layer list.
wxBoxSizer* OneColumnLayerBoxSizer = new wxBoxSizer( wxVERTICAL ); int layer;
LayersBoxSizer->Add( OneColumnLayerBoxSizer, 0, wxGROW | wxALL, 5 ); wxString layerKey;
for( layer = 0; layer < NB_LAYERS; ++layer )
int mask = 1;
for( int layer = 0; layer<NB_LAYERS; layer++, mask <<= 1 )
{ {
if( layer == 16 ) if( !board->m_BoardSettings->IsLayerEnabled( layer ) )
{ m_BoxSelectLayer[layer] = NULL;
OneColumnLayerBoxSizer = new wxBoxSizer( wxVERTICAL ); else
LayersBoxSizer->Add( OneColumnLayerBoxSizer, 0, wxGROW | wxALL, 5 );
}
m_BoxSelectLayer[layer] = m_BoxSelectLayer[layer] =
new wxCheckBox( this, -1, board->GetLayerName( layer ) ); new wxCheckBox( this, -1, board->GetLayerName( layer ) );
if( mask & s_SelectedLayers )
m_BoxSelectLayer[layer]->SetValue( true );
OneColumnLayerBoxSizer->Add( m_BoxSelectLayer[layer],
0, wxGROW | wxALL, 1 );
} }
if( config ) // Add wxCheckBoxes in layers lists dialog
// List layers in same order than in setup layers dialog
// (Front or Top to Back or Bottom)
DECLARE_LAYERS_ORDER_LIST(layersOrder);
for( int layer_idx = 0; layer_idx < NB_LAYERS; ++layer_idx )
{ {
wxString layerKey; layer = layersOrder[layer_idx];
for( int layer = 0; layer < NB_LAYERS; ++layer ) wxASSERT(layer < NB_LAYERS);
{
bool option;
layerKey.Printf( OPTKEY_LAYERBASE, layer ); if( m_BoxSelectLayer[layer] == NULL )
continue;
if( config->Read( layerKey, &option ) ) if( layer < NB_COPPER_LAYERS )
m_BoxSelectLayer[layer]->SetValue( option ); m_CopperLayersBoxSizer->Add( m_BoxSelectLayer[layer],
} 0, wxGROW | wxALL, 1 );
} else
m_TechnicalLayersBoxSizer->Add( m_BoxSelectLayer[layer],
0, wxGROW | wxALL, 1 );
// Disable checkboxes if the corresponding layer is not enabled
for( int layer = 0; layer<NB_LAYERS; layer++, mask <<= 1 ) layerKey.Printf( OPTKEY_LAYERBASE, layer );
{ bool option;
if( ! board->m_BoardSettings->IsLayerEnabled( layer ) ) if( m_Config->Read( layerKey, &option ) )
m_BoxSelectLayer[layer]->SetValue( option );
else
{ {
m_BoxSelectLayer[layer]->Enable( false ); long mask = 1 << layer;
m_BoxSelectLayer[layer]->SetValue( false ); if( mask & s_SelectedLayers )
m_BoxSelectLayer[layer]->SetValue( true );
} }
} }
// Option for using proper Gerber extensions
m_Use_Gerber_Extensions = new wxCheckBox( this,
ID_USE_GERBER_EXTENSIONS,
_( "Use Proper Gerber Extensions" ) );
// Option for using proper Gerber extensions
long ltmp; long ltmp;
config->Read( OPTKEY_GERBER_EXTENSIONS, &ltmp ); m_Config->Read( OPTKEY_GERBER_EXTENSIONS, &ltmp );
m_Use_Gerber_Extensions->SetValue( ltmp ); m_Use_Gerber_Extensions->SetValue( ltmp );
m_Use_Gerber_Extensions->SetToolTip(
_( "Use Proper Gerber Extensions - .GBL, .GTL, etc..." ) );
LeftBoxSizer->Add( m_Use_Gerber_Extensions, 0, wxGROW | wxALL, 1 );
// Option for excluding contents of "Edges Pcb" layer // Option for excluding contents of "Edges Pcb" layer
m_Exclude_Edges_Pcb = new wxCheckBox( this,
ID_EXCLUDE_EDGES_PCB,
_( "Exclude pcb edge layer" ) );
m_Exclude_Edges_Pcb->SetValue( g_pcb_plot_options.Exclude_Edges_Pcb ); m_Exclude_Edges_Pcb->SetValue( g_pcb_plot_options.Exclude_Edges_Pcb );
m_Exclude_Edges_Pcb->SetToolTip(
_( "Exclude contents of the pcb edge layer from all other layers" ) );
LeftBoxSizer->Add( m_Exclude_Edges_Pcb, 0, wxGROW | wxALL, 1 );
// Option to plot page references: // Option to plot page references:
if( m_Parent->m_Print_Sheet_Ref ) if( m_Parent->m_Print_Sheet_Ref )
{ {
m_Plot_Sheet_Ref = new wxCheckBox( this, ID_PRINT_REF,
_( "Print sheet reference" ) );
m_Plot_Sheet_Ref->SetValue( g_pcb_plot_options.Plot_Frame_Ref ); m_Plot_Sheet_Ref->SetValue( g_pcb_plot_options.Plot_Frame_Ref );
LeftBoxSizer->Add( m_Plot_Sheet_Ref, 0, wxGROW | wxALL, 1 );
} }
else else
{
m_Plot_Sheet_Ref->Enable( false );
g_pcb_plot_options.Plot_Frame_Ref = false; g_pcb_plot_options.Plot_Frame_Ref = false;
}
// Option to plot pads on silkscreen layers or all layers // Option to plot pads on silkscreen layers or all layers
m_Plot_Pads_on_Silkscreen = new wxCheckBox( this, m_Config->Read( OPTKEY_PADS_ON_SILKSCREEN,
ID_PRINT_PAD_ON_SILKSCREEN, &g_pcb_plot_options.PlotPadsOnSilkLayer );
_( "Print pads on silkscreen" ) );
config->Read( OPTKEY_PADS_ON_SILKSCREEN,
&g_pcb_plot_options.PlotPadsOnSilkLayer );
m_Plot_Pads_on_Silkscreen->SetValue( &g_pcb_plot_options.PlotPadsOnSilkLayer ); m_Plot_Pads_on_Silkscreen->SetValue( &g_pcb_plot_options.PlotPadsOnSilkLayer );
m_Plot_Pads_on_Silkscreen->SetToolTip(
_( "Enable/disable print/plot pads on silkscreen layers" ) );
LeftBoxSizer->Add( m_Plot_Pads_on_Silkscreen, 0, wxGROW | wxALL, 1 );
m_Force_Plot_Pads = new wxCheckBox( this, ID_FORCE_PRINT_PAD, m_Config->Read( OPTKEY_ALWAYS_PRINT_PADS,
_( "Always print pads" ) ); &g_pcb_plot_options.Plot_Pads_All_Layers );
config->Read( OPTKEY_ALWAYS_PRINT_PADS,
&g_pcb_plot_options.Plot_Pads_All_Layers );
m_Force_Plot_Pads->SetValue( g_pcb_plot_options.Plot_Pads_All_Layers ); m_Force_Plot_Pads->SetValue( g_pcb_plot_options.Plot_Pads_All_Layers );
m_Force_Plot_Pads->SetToolTip( _( "Force print/plot pads on ALL layers" ) );
LeftBoxSizer->Add( m_Force_Plot_Pads, 0, wxGROW | wxALL, 1 );
// Options to plot texts on footprints // Options to plot texts on footprints
m_Plot_Text_Value = new wxCheckBox( this, ID_PRINT_VALUE,
_( "Print module value" ) );
m_Plot_Text_Value->SetValue( g_pcb_plot_options.Sel_Texte_Valeur ); m_Plot_Text_Value->SetValue( g_pcb_plot_options.Sel_Texte_Valeur );
m_Plot_Text_Value->SetToolTip(
_( "Enable/disable print/plot module value on silkscreen layers" ) );
LeftBoxSizer->Add( m_Plot_Text_Value, 0, wxGROW | wxALL, 1 );
m_Plot_Text_Ref = new wxCheckBox( this, ID_PRINT_REF,
_( "Print module reference" ) );
m_Plot_Text_Ref->SetValue( g_pcb_plot_options.Sel_Texte_Reference ); m_Plot_Text_Ref->SetValue( g_pcb_plot_options.Sel_Texte_Reference );
m_Plot_Text_Ref->SetToolTip(
_( "Enable/disable print/plot module reference on silkscreen layers" ) );
LeftBoxSizer->Add( m_Plot_Text_Ref, 0, wxGROW | wxALL, 1 );
m_Plot_Text_Div = new wxCheckBox( this, ID_PRINT_MODULE_TEXTS,
_( "Print other module texts" ) );
m_Plot_Text_Div->SetValue( g_pcb_plot_options.Sel_Texte_Divers ); m_Plot_Text_Div->SetValue( g_pcb_plot_options.Sel_Texte_Divers );
m_Plot_Text_Div->SetToolTip(
_( "Enable/disable print/plot module field texts on silkscreen layers" ) );
LeftBoxSizer->Add( m_Plot_Text_Div, 0, wxGROW | wxALL, 1 );
m_Plot_Invisible_Text = new wxCheckBox( this,
ID_FORCE_PRINT_INVISIBLE_TEXT,
_( "Force print invisible texts" ) );
m_Plot_Invisible_Text->SetValue( g_pcb_plot_options.Sel_Texte_Invisible ); m_Plot_Invisible_Text->SetValue( g_pcb_plot_options.Sel_Texte_Invisible );
m_Plot_Invisible_Text->SetToolTip(
_( "Force print/plot module invisible texts on silkscreen layers" ) );
LeftBoxSizer->Add( m_Plot_Invisible_Text, 0, wxGROW | wxALL, 1 );
static const wxString drillmsg[3] =
{
_( "No drill mark" ),
_( "Small mark" ),
_( "Real drill" )
};
m_Drill_Shape_Opt = new wxRadioBox( this, ID_DRILL_SHAPE_OPT,
_( "Pads Drill Opt" ),
wxDefaultPosition, wxSize( -1, -1 ),
3, drillmsg, 1, wxRA_SPECIFY_COLS );
// Options to plot pads and vias holes
m_Drill_Shape_Opt->SetSelection( g_pcb_plot_options.DrillShapeOpt ); m_Drill_Shape_Opt->SetSelection( g_pcb_plot_options.DrillShapeOpt );
MidLeftBoxSizer->Add( m_Drill_Shape_Opt, 0, wxGROW | wxALL, 5 );
static const wxString scalemsg[5] =
{
_( "Auto scale" ),
_( "Scale 1" ),
_( "Scale 1.5" ),
_( "Scale 2" ),
_( "Scale 3" )
};
m_Scale_Opt = new wxRadioBox( this, ID_SCALE_OPT,
_( "Scale Opt" ), wxDefaultPosition,
wxSize( -1, -1 ),
5, scalemsg, 1, wxRA_SPECIFY_COLS );
// Scale option
m_Scale_Opt->SetSelection( g_pcb_plot_options.PlotScaleOpt ); m_Scale_Opt->SetSelection( g_pcb_plot_options.PlotScaleOpt );
MidLeftBoxSizer->Add( m_Scale_Opt, 0, wxGROW | wxALL, 5 );
static const wxString list_opt3[3] =
{
_( "Line" ), _( "Filled" ),
_( "Sketch" )
};
m_PlotModeOpt = new wxRadioBox( this, ID_PLOT_MODE_OPT, _( "Plot Mode" ),
wxDefaultPosition, wxDefaultSize,
3, list_opt3, 1 );
// Plot mode
m_PlotModeOpt->SetSelection( g_pcb_plot_options.Trace_Mode ); m_PlotModeOpt->SetSelection( g_pcb_plot_options.Trace_Mode );
MidLeftBoxSizer->Add( m_PlotModeOpt, 0, wxGROW | wxALL, 5 );
m_PlotMirorOpt = new wxCheckBox( this, ID_MIROR_OPT,
_( "Plot mirror" ) );
// Plot mirror option
m_PlotMirorOpt->SetValue( g_pcb_plot_options.Plot_Set_MIROIR ); m_PlotMirorOpt->SetValue( g_pcb_plot_options.Plot_Set_MIROIR );
MidLeftBoxSizer->Add( m_PlotMirorOpt, 0, wxGROW | wxALL, 5 );
m_PlotNoViaOnMaskOpt = new wxCheckBox( this, ID_MASKVIA_OPT,
_( "Vias on mask" ) );
// Put vias on mask layer
m_PlotNoViaOnMaskOpt->SetValue( g_pcb_plot_options.DrawViaOnMaskLayer ); m_PlotNoViaOnMaskOpt->SetValue( g_pcb_plot_options.DrawViaOnMaskLayer );
m_PlotNoViaOnMaskOpt->SetToolTip(
_( "Print/plot vias on mask layers. They are in this case not protected" ) );
MidLeftBoxSizer->Add( m_PlotNoViaOnMaskOpt, 0, wxGROW | wxALL, 5 );
// Update options values: // Update options values:
wxCommandEvent cmd_event; wxCommandEvent cmd_event;
SetCommands( cmd_event ); SetPlotFormat( cmd_event );
OnSetScaleOpt( cmd_event ); OnSetScaleOpt( cmd_event );
GetSizer()->Fit( this );
GetSizer()->SetSizeHints( this );
// without this line, the ESC key does not work // without this line, the ESC key does not work
SetFocus(); SetFocus();
} }
void WinEDA_PlotFrame::OnQuit( wxCommandEvent& WXUNUSED(event) ) void DIALOG_PLOT::OnQuit( wxCommandEvent& WXUNUSED(event) )
{ {
Close( true ); // true is to force the frame to close Close( true ); // true is to force the frame to close
} }
void WinEDA_PlotFrame::OnClose( wxCloseEvent& event ) void DIALOG_PLOT::OnClose( wxCloseEvent& event )
{ {
EndModal( 0 ); EndModal( 0 );
} }
void WinEDA_PlotFrame::CreateDrillFile( wxCommandEvent& event ) void DIALOG_PLOT::CreateDrillFile( wxCommandEvent& event )
{ {
( (WinEDA_PcbFrame*) m_Parent )->InstallDrillFrame( event ); ( (WinEDA_PcbFrame*) m_Parent )->InstallDrillFrame( event );
} }
void WinEDA_PlotFrame::OnSetScaleOpt( wxCommandEvent& event ) void DIALOG_PLOT::OnSetScaleOpt( wxCommandEvent& event )
{ {
/* Disable sheet reference for scale != 1:1 */ /* Disable sheet reference for scale != 1:1 */
bool scale1 = ( m_Scale_Opt->GetSelection() == 1 ); bool scale1 = ( m_Scale_Opt->GetSelection() == 1 );
...@@ -582,7 +327,7 @@ void WinEDA_PlotFrame::OnSetScaleOpt( wxCommandEvent& event ) ...@@ -582,7 +327,7 @@ void WinEDA_PlotFrame::OnSetScaleOpt( wxCommandEvent& event )
} }
void WinEDA_PlotFrame::SetCommands( wxCommandEvent& event ) void DIALOG_PLOT::SetPlotFormat( wxCommandEvent& event )
{ {
int format = getFormat(); int format = getFormat();
...@@ -595,7 +340,6 @@ void WinEDA_PlotFrame::SetCommands( wxCommandEvent& event ) ...@@ -595,7 +340,6 @@ void WinEDA_PlotFrame::SetCommands( wxCommandEvent& event )
m_PlotMirorOpt->Enable( true ); m_PlotMirorOpt->Enable( true );
m_Choice_Plot_Offset->Enable( false ); m_Choice_Plot_Offset->Enable( false );
m_LinesWidth->Enable( true ); m_LinesWidth->Enable( true );
m_HPGL_OptionsBox->Enable( false );
m_HPGLPenSizeOpt->Enable( false ); m_HPGLPenSizeOpt->Enable( false );
m_HPGLPenSpeedOpt->Enable( false ); m_HPGLPenSpeedOpt->Enable( false );
m_HPGLPenOverlayOpt->Enable( false ); m_HPGLPenOverlayOpt->Enable( false );
...@@ -616,7 +360,6 @@ void WinEDA_PlotFrame::SetCommands( wxCommandEvent& event ) ...@@ -616,7 +360,6 @@ void WinEDA_PlotFrame::SetCommands( wxCommandEvent& event )
m_PlotMirorOpt->Enable( false ); m_PlotMirorOpt->Enable( false );
m_Choice_Plot_Offset->Enable( true ); m_Choice_Plot_Offset->Enable( true );
m_LinesWidth->Enable( true ); m_LinesWidth->Enable( true );
m_HPGL_OptionsBox->Enable( false );
m_HPGLPenSizeOpt->Enable( false ); m_HPGLPenSizeOpt->Enable( false );
m_HPGLPenSpeedOpt->Enable( false ); m_HPGLPenSpeedOpt->Enable( false );
m_HPGLPenOverlayOpt->Enable( false ); m_HPGLPenOverlayOpt->Enable( false );
...@@ -636,7 +379,6 @@ void WinEDA_PlotFrame::SetCommands( wxCommandEvent& event ) ...@@ -636,7 +379,6 @@ void WinEDA_PlotFrame::SetCommands( wxCommandEvent& event )
m_PlotModeOpt->Enable( true ); m_PlotModeOpt->Enable( true );
m_Choice_Plot_Offset->Enable( false ); m_Choice_Plot_Offset->Enable( false );
m_LinesWidth->Enable( false ); m_LinesWidth->Enable( false );
m_HPGL_OptionsBox->Enable( true );
m_HPGLPenSizeOpt->Enable( true ); m_HPGLPenSizeOpt->Enable( true );
m_HPGLPenSpeedOpt->Enable( true ); m_HPGLPenSpeedOpt->Enable( true );
m_HPGLPenOverlayOpt->Enable( true ); m_HPGLPenOverlayOpt->Enable( true );
...@@ -657,7 +399,6 @@ void WinEDA_PlotFrame::SetCommands( wxCommandEvent& event ) ...@@ -657,7 +399,6 @@ void WinEDA_PlotFrame::SetCommands( wxCommandEvent& event )
m_PlotModeOpt->Enable( true ); m_PlotModeOpt->Enable( true );
m_Choice_Plot_Offset->Enable( false ); m_Choice_Plot_Offset->Enable( false );
m_LinesWidth->Enable( false ); m_LinesWidth->Enable( false );
m_HPGL_OptionsBox->Enable( false );
m_HPGLPenSizeOpt->Enable( false ); m_HPGLPenSizeOpt->Enable( false );
m_HPGLPenSpeedOpt->Enable( false ); m_HPGLPenSpeedOpt->Enable( false );
m_HPGLPenOverlayOpt->Enable( false ); m_HPGLPenOverlayOpt->Enable( false );
...@@ -677,7 +418,7 @@ void WinEDA_PlotFrame::SetCommands( wxCommandEvent& event ) ...@@ -677,7 +418,7 @@ void WinEDA_PlotFrame::SetCommands( wxCommandEvent& event )
} }
void WinEDA_PlotFrame::SaveOptPlot( wxCommandEvent& event ) void DIALOG_PLOT::SaveOptPlot( wxCommandEvent& event )
{ {
g_pcb_plot_options.Exclude_Edges_Pcb = m_Exclude_Edges_Pcb->GetValue(); g_pcb_plot_options.Exclude_Edges_Pcb = m_Exclude_Edges_Pcb->GetValue();
...@@ -706,49 +447,61 @@ void WinEDA_PlotFrame::SaveOptPlot( wxCommandEvent& event ) ...@@ -706,49 +447,61 @@ void WinEDA_PlotFrame::SaveOptPlot( wxCommandEvent& event )
g_pcb_plot_options.Trace_Mode = (GRTraceMode) m_PlotModeOpt->GetSelection(); g_pcb_plot_options.Trace_Mode = (GRTraceMode) m_PlotModeOpt->GetSelection();
g_pcb_plot_options.DrawViaOnMaskLayer = m_PlotNoViaOnMaskOpt->GetValue(); g_pcb_plot_options.DrawViaOnMaskLayer = m_PlotNoViaOnMaskOpt->GetValue();
g_pcb_plot_options.HPGL_Pen_Diam = m_HPGLPenSizeOpt->GetValue(); wxString msg = m_HPGLPenSizeOpt->GetValue();
g_pcb_plot_options.HPGL_Pen_Speed = m_HPGLPenSpeedOpt->GetValue(); int tmp = ReturnValueFromString( g_UnitMetric, msg, UNITS_MILS );
g_pcb_plot_options.HPGL_Pen_Recouvrement = m_HPGLPenOverlayOpt->GetValue(); g_pcb_plot_options.HPGL_Pen_Diam = tmp;
g_pcb_plot_options.PlotLine_Width = m_LinesWidth->GetValue();
msg = m_HPGLPenSpeedOpt->GetValue();
m_XScaleAdjust = m_FineAdjustXscaleOpt->GetValue(); tmp = ReturnValueFromString( CENTIMETRE, msg, 1 );
m_YScaleAdjust = m_FineAdjustYscaleOpt->GetValue(); g_pcb_plot_options.HPGL_Pen_Speed = tmp;
wxConfig* config = wxGetApp().m_EDA_Config; msg = m_HPGLPenOverlayOpt->GetValue();
tmp = ReturnValueFromString( g_UnitMetric, msg, UNITS_MILS );
config->Write( OPTKEY_EDGELAYER_GERBER, g_pcb_plot_options.HPGL_Pen_Recouvrement = tmp;
g_pcb_plot_options.Exclude_Edges_Pcb );
config->Write( OPTKEY_GERBER_EXTENSIONS, msg = m_LinesWidth->GetValue();
m_Use_Gerber_Extensions->GetValue() ); tmp = ReturnValueFromString( g_UnitMetric, msg, PCB_INTERNAL_UNIT );
config->Write( OPTKEY_XFINESCALE_ADJ, m_XScaleAdjust ); g_pcb_plot_options.PlotLine_Width = tmp;
config->Write( OPTKEY_YFINESCALE_ADJ, m_YScaleAdjust );
config->Write( OPTKEY_PADS_ON_SILKSCREEN, msg = m_FineAdjustXscaleOpt->GetValue();
g_pcb_plot_options.PlotPadsOnSilkLayer ); msg.ToDouble( &m_XScaleAdjust );
config->Write( OPTKEY_ALWAYS_PRINT_PADS, msg = m_FineAdjustYscaleOpt->GetValue();
g_pcb_plot_options.Plot_Pads_All_Layers ); msg.ToDouble( &m_YScaleAdjust );
m_Config->Write( OPTKEY_EDGELAYER_GERBER,
g_pcb_plot_options.Exclude_Edges_Pcb );
m_Config->Write( OPTKEY_GERBER_EXTENSIONS,
m_Use_Gerber_Extensions->GetValue() );
m_Config->Write( OPTKEY_XFINESCALE_ADJ, m_XScaleAdjust );
m_Config->Write( OPTKEY_YFINESCALE_ADJ, m_YScaleAdjust );
m_Config->Write( OPTKEY_PADS_ON_SILKSCREEN,
g_pcb_plot_options.PlotPadsOnSilkLayer );
m_Config->Write( OPTKEY_ALWAYS_PRINT_PADS,
g_pcb_plot_options.Plot_Pads_All_Layers );
int formatNdx = m_PlotFormatOpt->GetSelection(); int formatNdx = m_PlotFormatOpt->GetSelection();
config->Write( OPTKEY_OUTPUT_FORMAT, formatNdx ); m_Config->Write( OPTKEY_OUTPUT_FORMAT, formatNdx );
config->Write( OPTKEY_PLOT_LINEWIDTH_VALUE, m_Config->Write( OPTKEY_PLOT_LINEWIDTH_VALUE,
g_pcb_plot_options.PlotLine_Width ); g_pcb_plot_options.PlotLine_Width );
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 )
continue;
layerKey.Printf( OPTKEY_LAYERBASE, layer ); layerKey.Printf( OPTKEY_LAYERBASE, layer );
config->Write( layerKey, m_BoxSelectLayer[layer]->IsChecked() ); m_Config->Write( layerKey, m_BoxSelectLayer[layer]->IsChecked() );
} }
g_pcb_plot_options.Plot_PS_Negative = m_Plot_PS_Negative->GetValue(); g_pcb_plot_options.Plot_PS_Negative = m_Plot_PS_Negative->GetValue();
} }
void WinEDA_PlotFrame::Plot( wxCommandEvent& event ) void DIALOG_PLOT::Plot( wxCommandEvent& event )
{ {
int layer_to_plot; int layer;
wxFileName fn; wxFileName fn;
wxString ext; wxString ext;
wxString wildcard;
BOARD* board = m_Parent->GetBoard(); BOARD* board = m_Parent->GetBoard();
...@@ -778,10 +531,10 @@ void WinEDA_PlotFrame::Plot( wxCommandEvent& event ) ...@@ -778,10 +531,10 @@ void WinEDA_PlotFrame::Plot( wxCommandEvent& event )
* the default scale adjust is initialized to 0 and saved in program * the default scale adjust is initialized to 0 and saved in program
* settings resulting in a divide by zero fault. * settings resulting in a divide by zero fault.
*/ */
if( m_FineAdjustXscaleOpt->m_ValueCtrl->IsEnabled() if( m_FineAdjustXscaleOpt - IsEnabled()
&& m_XScaleAdjust != 0.0 ) && m_XScaleAdjust != 0.0 )
g_pcb_plot_options.ScaleAdjX = m_XScaleAdjust; g_pcb_plot_options.ScaleAdjX = m_XScaleAdjust;
if( m_FineAdjustYscaleOpt->m_ValueCtrl->IsEnabled() if( m_FineAdjustYscaleOpt->IsEnabled()
&& m_YScaleAdjust != 0.0 ) && m_YScaleAdjust != 0.0 )
g_pcb_plot_options.ScaleAdjY = m_YScaleAdjust; g_pcb_plot_options.ScaleAdjY = m_YScaleAdjust;
...@@ -791,24 +544,20 @@ void WinEDA_PlotFrame::Plot( wxCommandEvent& event ) ...@@ -791,24 +544,20 @@ void WinEDA_PlotFrame::Plot( wxCommandEvent& event )
{ {
case PLOT_FORMAT_POST: case PLOT_FORMAT_POST:
ext = wxT( "ps" ); ext = wxT( "ps" );
wildcard = _( "Adobe post script files (.ps)|*.ps" );
break; break;
case PLOT_FORMAT_GERBER: case PLOT_FORMAT_GERBER:
g_pcb_plot_options.Scale = 1.0; // No scale option allowed in gerber format g_pcb_plot_options.Scale = 1.0; // No scale option allowed in gerber format
ext = wxT( "pho" ); ext = wxT( "pho" );
wildcard = _( "GERBER photo plot files (.pho .gbr)|*.pho;*.gbr" );
break; break;
case PLOT_FORMAT_HPGL: case PLOT_FORMAT_HPGL:
ext = wxT( "plt" ); ext = wxT( "plt" );
wildcard = _( "HPGL plot files (.plt)|*.plt" );
break; break;
case PLOT_FORMAT_DXF: case PLOT_FORMAT_DXF:
g_pcb_plot_options.Scale = 1.0; g_pcb_plot_options.Scale = 1.0;
ext = wxT( "dxf" ); ext = wxT( "dxf" );
wildcard = _( "DXF files (.dxf)|*.dxf" );
break; break;
} }
...@@ -822,27 +571,27 @@ void WinEDA_PlotFrame::Plot( wxCommandEvent& event ) ...@@ -822,27 +571,27 @@ void WinEDA_PlotFrame::Plot( wxCommandEvent& event )
int mask = 1; int mask = 1;
s_SelectedLayers = 0; s_SelectedLayers = 0;
for( layer = 0; layer < NB_LAYERS; layer++, mask <<= 1 )
for( layer_to_plot = 0;
layer_to_plot < NB_LAYERS;
layer_to_plot++, mask <<= 1 )
{ {
if( m_BoxSelectLayer[layer_to_plot]->GetValue() ) if( m_BoxSelectLayer[layer] == NULL )
continue;
bool success = false;
if( m_BoxSelectLayer[layer]->GetValue() )
{ {
s_SelectedLayers |= mask; s_SelectedLayers |= mask;
fn = m_Parent->GetScreen()->m_FileName; fn = m_Parent->GetScreen()->m_FileName;
// Create file name. // Create file name.
wxString layername = board->GetLayerName( layer_to_plot ); wxString layername = 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( (format == PLOT_FORMAT_GERBER) && m_Use_Gerber_Extensions->GetValue() ) if( (format == PLOT_FORMAT_GERBER) && m_Use_Gerber_Extensions->GetValue() )
{ {
switch( layer_to_plot ) switch( layer )
{ {
case LAYER_N_FRONT: case LAYER_N_FRONT:
fn.SetExt( wxT( "gtl" ) ); fn.SetExt( wxT( "gtl" ) );
...@@ -863,8 +612,8 @@ void WinEDA_PlotFrame::Plot( wxCommandEvent& event ) ...@@ -863,8 +612,8 @@ void WinEDA_PlotFrame::Plot( wxCommandEvent& event )
case LAYER_N_14: case LAYER_N_14:
case LAYER_N_15: case LAYER_N_15:
// TODO: use g1 to gxx according to the // TODO: see if we use .gbr or a layer identifier (gb1 .. gbnn ?)
// new internal layers designation // according to the new internal layers designation
// (1 is the first internal layer from the front layer) // (1 is the first internal layer from the front layer)
fn.SetExt( wxT( "gbr" ) ); fn.SetExt( wxT( "gbr" ) );
break; break;
...@@ -910,6 +659,7 @@ void WinEDA_PlotFrame::Plot( wxCommandEvent& event ) ...@@ -910,6 +659,7 @@ void WinEDA_PlotFrame::Plot( wxCommandEvent& event )
case ECO1_N: case ECO1_N:
case ECO2_N: case ECO2_N:
case EDGE_N: case EDGE_N:
default:
fn.SetExt( wxT( "gbr" ) ); fn.SetExt( wxT( "gbr" ) );
break; break;
} }
...@@ -922,39 +672,49 @@ void WinEDA_PlotFrame::Plot( wxCommandEvent& event ) ...@@ -922,39 +672,49 @@ void WinEDA_PlotFrame::Plot( wxCommandEvent& event )
switch( format ) switch( format )
{ {
case PLOT_FORMAT_POST: case PLOT_FORMAT_POST:
m_Parent->Genere_PS( fn.GetFullPath(), layer_to_plot, useA4(), success = m_Parent->Genere_PS( fn.GetFullPath(), layer, useA4(),
g_pcb_plot_options.Trace_Mode ); g_pcb_plot_options.Trace_Mode );
break; break;
case PLOT_FORMAT_GERBER: case PLOT_FORMAT_GERBER:
m_Parent->Genere_GERBER( fn.GetFullPath(), layer_to_plot, success = m_Parent->Genere_GERBER( fn.GetFullPath(), layer,
s_PlotOriginIsAuxAxis, s_PlotOriginIsAuxAxis,
g_pcb_plot_options.Trace_Mode ); g_pcb_plot_options.Trace_Mode );
break; break;
case PLOT_FORMAT_HPGL: case PLOT_FORMAT_HPGL:
m_Parent->Genere_HPGL( fn.GetFullPath(), layer_to_plot, success = m_Parent->Genere_HPGL( fn.GetFullPath(), layer,
g_pcb_plot_options.Trace_Mode ); g_pcb_plot_options.Trace_Mode );
break; break;
case PLOT_FORMAT_DXF: case PLOT_FORMAT_DXF:
m_Parent->Genere_DXF( fn.GetFullPath(), layer_to_plot, success = m_Parent->Genere_DXF( fn.GetFullPath(), layer,
g_pcb_plot_options.Trace_Mode ); g_pcb_plot_options.Trace_Mode );
break; break;
} }
// Print diags in messages box:
wxString msg;
if( success )
msg.Printf( _( "Plot file <%s> created" ), GetChars( fn.GetFullPath() ) );
else
msg.Printf( _( "Unable to create <%s>" ), GetChars( fn.GetFullPath() ) );
msg << wxT( "\n" );
m_MessagesBox->AppendText( msg );
} }
} }
// If no layer selected, we have no plot. prompt user if it happens // If no layer selected, we have nothing plotted.
// Prompt user if it happens
// because he could think there is a bug in pcbnew: // because he could think there is a bug in pcbnew:
if( s_SelectedLayers == 0 ) if( s_SelectedLayers == 0 )
DisplayError( this, _( "No layer selected" ) ); DisplayError( this, _( "No layer selected" ) );
} }
void WinEDA_BasePcbFrame::ToPlotter( wxCommandEvent& event ) void WinEDA_PcbFrame::ToPlotter( wxCommandEvent& event )
{ {
WinEDA_PlotFrame* frame = new WinEDA_PlotFrame( this ); DIALOG_PLOT* frame = new DIALOG_PLOT( this );
frame->ShowModal(); frame->ShowModal();
frame->Destroy(); frame->Destroy();
......
...@@ -12,23 +12,18 @@ ...@@ -12,23 +12,18 @@
#include "protos.h" #include "protos.h"
void WinEDA_BasePcbFrame::Genere_DXF( const wxString& FullFileName, int Layer, bool WinEDA_BasePcbFrame::Genere_DXF( const wxString& FullFileName, int Layer,
GRTraceMode trace_mode ) GRTraceMode trace_mode )
{ {
Ki_PageDescr* currentsheet = GetScreen()->m_CurrentSheetDesc; Ki_PageDescr* currentsheet = GetScreen()->m_CurrentSheetDesc;
ClearMsgPanel();
FILE* output_file = wxFopen( FullFileName, wxT( "wt" ) ); FILE* output_file = wxFopen( FullFileName, wxT( "wt" ) );
if( output_file == NULL ) if( output_file == NULL )
{ {
wxString msg = _( "Unable to create file " ) + FullFileName; return false;
DisplayError( this, msg );
return;
} }
SetLocaleTo_C_standard(); SetLocaleTo_C_standard();
AppendMsgPanel( _( "File" ), FullFileName, CYAN );
DXF_PLOTTER* plotter = new DXF_PLOTTER(); DXF_PLOTTER* plotter = new DXF_PLOTTER();
plotter->set_paper_size( currentsheet ); plotter->set_paper_size( currentsheet );
...@@ -44,4 +39,6 @@ void WinEDA_BasePcbFrame::Genere_DXF( const wxString& FullFileName, int Layer, ...@@ -44,4 +39,6 @@ void WinEDA_BasePcbFrame::Genere_DXF( const wxString& FullFileName, int Layer,
plotter->end_plot(); plotter->end_plot();
delete plotter; delete plotter;
SetLocaleTo_Default(); SetLocaleTo_Default();
return true;
} }
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
#include "protos.h" #include "protos.h"
/********************************************************************************/ /********************************************************************************/
void WinEDA_BasePcbFrame::Genere_GERBER( const wxString& FullFileName, int Layer, bool WinEDA_BasePcbFrame::Genere_GERBER( const wxString& FullFileName, int Layer,
bool PlotOriginIsAuxAxis, bool PlotOriginIsAuxAxis,
GRTraceMode trace_mode ) GRTraceMode trace_mode )
/********************************************************************************/ /********************************************************************************/
...@@ -33,9 +33,13 @@ void WinEDA_BasePcbFrame::Genere_GERBER( const wxString& FullFileName, int Layer ...@@ -33,9 +33,13 @@ void WinEDA_BasePcbFrame::Genere_GERBER( const wxString& FullFileName, int Layer
* format 3.4 uses the native pcbnew units (1/10000 inch). * format 3.4 uses the native pcbnew units (1/10000 inch).
*/ */
{ {
wxPoint offset; FILE* output_file = wxFopen( FullFileName, wxT( "wt" ) );
if( output_file == NULL )
{
return false;
}
ClearMsgPanel(); wxPoint offset;
/* Calculate scaling from pcbnew units (in 0.1 mil or 0.0001 inch) to gerber units */ /* Calculate scaling from pcbnew units (in 0.1 mil or 0.0001 inch) to gerber units */
double scale = g_pcb_plot_options.Scale; double scale = g_pcb_plot_options.Scale;
...@@ -48,14 +52,6 @@ void WinEDA_BasePcbFrame::Genere_GERBER( const wxString& FullFileName, int Layer ...@@ -48,14 +52,6 @@ void WinEDA_BasePcbFrame::Genere_GERBER( const wxString& FullFileName, int Layer
offset.y = 0; offset.y = 0;
} }
FILE* output_file = wxFopen( FullFileName, wxT( "wt" ) );
if( output_file == NULL )
{
wxString msg = _( "unable to create file " ) + FullFileName;
DisplayError( this, msg );
return;
}
SetLocaleTo_C_standard(); SetLocaleTo_C_standard();
PLOTTER* plotter = new GERBER_PLOTTER(); PLOTTER* plotter = new GERBER_PLOTTER();
/* No mirror and scaling for gerbers! */ /* No mirror and scaling for gerbers! */
...@@ -64,8 +60,6 @@ void WinEDA_BasePcbFrame::Genere_GERBER( const wxString& FullFileName, int Layer ...@@ -64,8 +60,6 @@ void WinEDA_BasePcbFrame::Genere_GERBER( const wxString& FullFileName, int Layer
plotter->set_creator( wxT( "PCBNEW-RS274X" ) ); plotter->set_creator( wxT( "PCBNEW-RS274X" ) );
plotter->set_filename( FullFileName ); plotter->set_filename( FullFileName );
AppendMsgPanel( _( "File" ), FullFileName, CYAN );
plotter->start_plot( output_file ); plotter->start_plot( output_file );
// Sheet refs on gerber CAN be useful... and they're always 1:1 // Sheet refs on gerber CAN be useful... and they're always 1:1
...@@ -76,4 +70,6 @@ void WinEDA_BasePcbFrame::Genere_GERBER( const wxString& FullFileName, int Layer ...@@ -76,4 +70,6 @@ void WinEDA_BasePcbFrame::Genere_GERBER( const wxString& FullFileName, int Layer
plotter->end_plot(); plotter->end_plot();
delete plotter; delete plotter;
SetLocaleTo_Default(); SetLocaleTo_Default();
return true;
} }
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
#include "protos.h" #include "protos.h"
void WinEDA_BasePcbFrame::Genere_HPGL( const wxString& FullFileName, int Layer, bool WinEDA_BasePcbFrame::Genere_HPGL( const wxString& FullFileName, int Layer,
GRTraceMode trace_mode ) GRTraceMode trace_mode )
{ {
wxSize SheetSize; wxSize SheetSize;
...@@ -24,8 +24,11 @@ void WinEDA_BasePcbFrame::Genere_HPGL( const wxString& FullFileName, int Layer, ...@@ -24,8 +24,11 @@ void WinEDA_BasePcbFrame::Genere_HPGL( const wxString& FullFileName, int Layer,
double scale; double scale;
wxPoint offset; wxPoint offset;
ClearMsgPanel(); FILE* output_file = wxFopen( FullFileName, wxT( "wt" ) );
if( output_file == NULL )
{
return false;
}
// Compute pen_dim (from g_HPGL_Pen_Diam in mils) in pcb units, // Compute pen_dim (from g_HPGL_Pen_Diam in mils) in pcb units,
// with plot scale (if Scale is 2, pen diameter is always g_HPGL_Pen_Diam // with plot scale (if Scale is 2, pen diameter is always g_HPGL_Pen_Diam
// so apparent pen diam is real pen diam / Scale // so apparent pen diam is real pen diam / Scale
...@@ -40,16 +43,8 @@ void WinEDA_BasePcbFrame::Genere_HPGL( const wxString& FullFileName, int Layer, ...@@ -40,16 +43,8 @@ void WinEDA_BasePcbFrame::Genere_HPGL( const wxString& FullFileName, int Layer,
int pen_recouvrement = wxRound( int pen_recouvrement = wxRound(
g_pcb_plot_options.HPGL_Pen_Recouvrement * 10.0 / g_pcb_plot_options.Scale ); g_pcb_plot_options.HPGL_Pen_Recouvrement * 10.0 / g_pcb_plot_options.Scale );
FILE* output_file = wxFopen( FullFileName, wxT( "wt" ) );
if( output_file == NULL )
{
wxString msg = _( "Unable to create file " ) + FullFileName;
DisplayError( this, msg );
return;
}
SetLocaleTo_C_standard(); SetLocaleTo_C_standard();
AppendMsgPanel( _( "File" ), FullFileName, CYAN );
if( g_pcb_plot_options.PlotScaleOpt != 1 ) if( g_pcb_plot_options.PlotScaleOpt != 1 )
Center = TRUE; // Scale != 1 so center PCB plot. Center = TRUE; // Scale != 1 so center PCB plot.
...@@ -112,4 +107,6 @@ void WinEDA_BasePcbFrame::Genere_HPGL( const wxString& FullFileName, int Layer, ...@@ -112,4 +107,6 @@ void WinEDA_BasePcbFrame::Genere_HPGL( const wxString& FullFileName, int Layer,
plotter->end_plot(); plotter->end_plot();
delete plotter; delete plotter;
SetLocaleTo_Default(); SetLocaleTo_Default();
return true;
} }
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
/* Generate a PostScript file (*. ps) of the circuit layer. /* Generate a PostScript file (*. ps) of the circuit layer.
* If layer < 0: all layers are plotted. * If layer < 0: all layers are plotted.
*/ */
void WinEDA_BasePcbFrame::Genere_PS( const wxString& FullFileName, int Layer, bool WinEDA_BasePcbFrame::Genere_PS( const wxString& FullFileName, int Layer,
bool useA4, GRTraceMode trace_mode ) bool useA4, GRTraceMode trace_mode )
{ {
wxSize SheetSize; wxSize SheetSize;
...@@ -29,18 +29,13 @@ void WinEDA_BasePcbFrame::Genere_PS( const wxString& FullFileName, int Layer, ...@@ -29,18 +29,13 @@ void WinEDA_BasePcbFrame::Genere_PS( const wxString& FullFileName, int Layer,
Ki_PageDescr* SheetPS; Ki_PageDescr* SheetPS;
wxPoint offset; wxPoint offset;
ClearMsgPanel();
FILE* output_file = wxFopen( FullFileName, wxT( "wt" ) ); FILE* output_file = wxFopen( FullFileName, wxT( "wt" ) );
if( output_file == NULL ) if( output_file == NULL )
{ {
wxString msg = _( "Unable to create file " ) + FullFileName; return false;
DisplayError( this, msg );
return;
} }
SetLocaleTo_C_standard(); SetLocaleTo_C_standard();
AppendMsgPanel( _( "File" ), FullFileName, CYAN );
if( g_pcb_plot_options.PlotScaleOpt != 1 ) if( g_pcb_plot_options.PlotScaleOpt != 1 )
Center = TRUE; // Scale != 1 so center plot. Center = TRUE; // Scale != 1 so center plot.
...@@ -131,4 +126,6 @@ void WinEDA_BasePcbFrame::Genere_PS( const wxString& FullFileName, int Layer, ...@@ -131,4 +126,6 @@ void WinEDA_BasePcbFrame::Genere_PS( const wxString& FullFileName, int Layer,
plotter->end_plot(); plotter->end_plot();
delete plotter; delete plotter;
SetLocaleTo_Default(); SetLocaleTo_Default();
return true;
} }
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