From 19e5bc3b013c26b9d1f43674a454d286ea073860 Mon Sep 17 00:00:00 2001 From: charras Date: Sun, 11 Jan 2009 19:12:18 +0000 Subject: [PATCH] Added: Pcbnew print SVG format (see changelog) --- CHANGELOG.txt | 12 +- eeschema/CMakeLists.txt | 3 +- eeschema/dialog_SVG_print.cpp | 311 ++++++++ eeschema/dialog_SVG_print_base.cpp | 104 +++ eeschema/dialog_SVG_print_base.fbp | 697 ++++++++++++++++++ eeschema/dialog_SVG_print_base.h | 70 ++ eeschema/makefile.include | 5 +- pcbnew/CMakeLists.txt | 2 + pcbnew/dialog_SVG_print.cpp | 337 +++++++++ pcbnew/dialog_SVG_print_base.cpp | 127 ++++ pcbnew/dialog_SVG_print_base.fbp | 791 ++++++++++++++++++++ pcbnew/dialog_SVG_print_base.h | 73 ++ pcbnew/makefile.include | 2 + pcbnew/menubarpcb.cpp | 5 + pcbnew/pcbframe.cpp | 1 + pcbnew/print_board_functions.cpp | 6 +- share/svg_print.cpp | 544 -------------- share/svg_print.h | 137 ---- share/svg_print.pjd | 1100 ---------------------------- 19 files changed, 2539 insertions(+), 1788 deletions(-) create mode 100644 eeschema/dialog_SVG_print.cpp create mode 100644 eeschema/dialog_SVG_print_base.cpp create mode 100644 eeschema/dialog_SVG_print_base.fbp create mode 100644 eeschema/dialog_SVG_print_base.h create mode 100644 pcbnew/dialog_SVG_print.cpp create mode 100644 pcbnew/dialog_SVG_print_base.cpp create mode 100644 pcbnew/dialog_SVG_print_base.fbp create mode 100644 pcbnew/dialog_SVG_print_base.h delete mode 100644 share/svg_print.cpp delete mode 100644 share/svg_print.h delete mode 100644 share/svg_print.pjd diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 36128a7826..6290885a3d 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -5,7 +5,17 @@ Started 2007-June-11 Please add newer entries at the top, list the date and your name with email address. -2009-Jan-19 UPDATE Jean-Pierre Charras +2009-Jan-11 UPDATE Jean-Pierre Charras +================================================================================ +++Pcbnew: + Added: print SVG format. + SVG print/plot function uses WRITE modeinsteed of OR mode as graphic mode. + todo ? uses OR graphic mode with black background color (wait and see) +++eeschema: + Code cleanup for Print SVG format, and used wxFormBuilder in SVG print dialog + + +2009-Jan-10 UPDATE Jean-Pierre Charras ================================================================================ ++Pcbnew: Calculations to create filled areas in a zone modified and uses 2 pass: diff --git a/eeschema/CMakeLists.txt b/eeschema/CMakeLists.txt index 220f261bb0..6bee1013be 100644 --- a/eeschema/CMakeLists.txt +++ b/eeschema/CMakeLists.txt @@ -50,6 +50,8 @@ set(EESCHEMA_SRCS dialog_erc.cpp # dialog_find.cpp dialog_options.cpp + dialog_SVG_print.cpp + dialog_SVG_print_base.cpp edit_component_in_lib.cpp edit_component_in_schematic.cpp edit_label.cpp @@ -109,7 +111,6 @@ set(EESCHEMA_SRCS set(EESCHEMA_EXTRA_SRCS ../share/setpage.cpp - ../share/svg_print.cpp ../share/wxprint.cpp) if(WIN32) diff --git a/eeschema/dialog_SVG_print.cpp b/eeschema/dialog_SVG_print.cpp new file mode 100644 index 0000000000..fb57ea2cc8 --- /dev/null +++ b/eeschema/dialog_SVG_print.cpp @@ -0,0 +1,311 @@ +///////////////////////////////////////////////////////////////////////////// + +// Name: dialog_svg_print.cpp +// Author: jean-pierre Charras +// Modified by: +// Licence: GPL +///////////////////////////////////////////////////////////////////////////// + +#include "fctsys.h" + +#include "common.h" + +#include "dialog_SVG_print_base.h" + +#include "dcsvg.h" + +#include "program.h" + +// Keys for configuration +#define PLOTSVGPENWIDTH_KEY wxT( "PlotSVGPenWidth") +#define PLOTSVGMODECOLOR_KEY wxT( "PlotSVGModeColor" ) + +extern BASE_SCREEN* ActiveScreen; +#define WIDTH_MAX_VALUE 100 +#define WIDTH_MIN_VALUE 1 + +// Variables locales +static int s_SVGPenMinWidth; /* Minimum pen width (in internal units) for printing */ + +static bool s_Print_Frame_Ref = true; +static int s_PlotBlackAndWhite = 0; + +class DIALOG_SVG_PRINT : public DIALOG_SVG_PRINT_base +{ +private: + WinEDA_DrawFrame * m_Parent; + int m_ImageXSize_mm; + wxConfig* m_Config; + +public: + DIALOG_SVG_PRINT( WinEDA_DrawFrame* parent ); + ~DIALOG_SVG_PRINT( ) {} + +private: + void OnCloseWindow( wxCloseEvent& event ); + void OnInitDialog( wxInitDialogEvent& event ); + void OnButtonPlotCurrentClick( wxCommandEvent& event ); + void OnButtonPlotAllClick( wxCommandEvent& event ); + void OnButtonCancelClick( wxCommandEvent& event ); + void OnSetColorModeSelected( wxCommandEvent& event ); + void SetPenWidth(); + void PrintSVGDoc( bool aPrintAll, bool aPrint_Sheet_Ref ); + bool DrawPage( const wxString& FullFileName, BASE_SCREEN* screen, bool aPrint_Sheet_Ref ); +}; + +/*******************************************************/ +void WinEDA_DrawFrame::SVG_Print( wxCommandEvent& event ) +/*******************************************************/ + +/* Prepare les structures de donnees de gestion de l'impression + * et affiche la fenetre de dialogue de gestion de l'impression des feuilles + */ +{ + DIALOG_SVG_PRINT frame( this ); + + frame.ShowModal(); +} + + +/*! + * DIALOG_SVG_PRINT functions + */ +DIALOG_SVG_PRINT::DIALOG_SVG_PRINT( WinEDA_DrawFrame* parent ) + : DIALOG_SVG_PRINT_base( parent ) +{ + m_Parent = parent; + m_Config = wxGetApp().m_EDA_Config; +} + + +/*************************************************************/ +void DIALOG_SVG_PRINT::OnInitDialog( wxInitDialogEvent& event ) +/*************************************************************/ +{ + SetFont( *g_DialogFont ); + SetFocus(); // Make ESC key working + + m_ImageXSize_mm = 270; + if( m_Config ) + { + m_Config->Read( PLOTSVGPENWIDTH_KEY, &s_SVGPenMinWidth ); + m_Config->Read( PLOTSVGMODECOLOR_KEY, &s_PlotBlackAndWhite ); + } + + AddUnitSymbol(* m_TextPenWidth, g_UnitMetric ); + m_DialogPenWidth->SetValue( + ReturnStringFromValue(g_UnitMetric, s_SVGPenMinWidth, m_Parent->m_InternalUnits ) ); + m_Print_Sheet_Ref->SetValue( s_Print_Frame_Ref ); + if (GetSizer()) + { + GetSizer()->SetSizeHints(this); + } +} + + +/********************************************/ +void DIALOG_SVG_PRINT::SetPenWidth() +/********************************************/ +{ + s_SVGPenMinWidth = ReturnValueFromTextCtrl( *m_DialogPenWidth, m_Parent->m_InternalUnits ); + + if( s_SVGPenMinWidth > WIDTH_MAX_VALUE ) + { + s_SVGPenMinWidth = WIDTH_MAX_VALUE; + } + + if( s_SVGPenMinWidth < WIDTH_MIN_VALUE ) + { + s_SVGPenMinWidth = WIDTH_MIN_VALUE; + } + + m_DialogPenWidth->SetValue( + ReturnStringFromValue(g_UnitMetric, s_SVGPenMinWidth, m_Parent->m_InternalUnits ) ); +} + + +/***************************************************************************/ +void DIALOG_SVG_PRINT::PrintSVGDoc( bool aPrintAll, bool aPrint_Sheet_Ref ) +/***************************************************************************/ +{ + wxString msg; + + SetPenWidth(); + + wxString FullFileName; + BASE_SCREEN* screen = m_Parent->GetBaseScreen(); + BASE_SCREEN* oldscreen = screen; + + if( aPrintAll && m_Parent->m_Ident == SCHEMATIC_FRAME ) + { + WinEDA_SchematicFrame* schframe = (WinEDA_SchematicFrame*) m_Parent; + DrawSheetPath* sheetpath, *oldsheetpath = schframe->GetSheet(); + SCH_SCREEN* schscreen = schframe->GetScreen(); + oldscreen = schscreen; + EDA_SheetList SheetList( NULL ); + sheetpath = SheetList.GetFirst(); + DrawSheetPath list; + + for( ; ; ) + { + if( sheetpath == NULL ) + break; + list.Clear(); + if( list.BuildSheetPathInfoFromSheetPathValue( sheetpath->Path() ) ) + { + schframe->m_CurrentSheet = &list; + schframe->m_CurrentSheet->UpdateAllScreenReferences(); + schframe->SetSheetNumberAndCount(); + schscreen = schframe->m_CurrentSheet->LastScreen(); + ActiveScreen = schscreen; + } + else // Should not happen + return; + sheetpath = SheetList.GetNext(); + + FullFileName = schframe->GetUniqueFilenameForCurrentSheet( ) + wxT( ".svg" ); + + bool success = DrawPage( FullFileName, schscreen, aPrint_Sheet_Ref ); + msg = _( "Create file " ) + FullFileName; + if( !success ) + msg += _( " error" ); + msg += wxT( "\n" ); + m_MessagesBox->AppendText( msg ); + } + schframe->m_CurrentSheet = oldsheetpath; + schframe->m_CurrentSheet->UpdateAllScreenReferences(); + schframe->SetSheetNumberAndCount(); + } + else + { + FullFileName = m_FileNameCtrl->GetValue(); + if( FullFileName.IsEmpty() ) + { + FullFileName = screen->m_FileName; + ChangeFileNameExt( FullFileName, wxT( ".svg" ) ); + } + bool success = DrawPage( FullFileName, screen, aPrint_Sheet_Ref ); + msg = _( "Create file " ) + FullFileName; + if( !success ) + msg += _( " error" ); + msg += wxT( "\n" ); + m_MessagesBox->AppendText( msg ); + } + ActiveScreen = oldscreen; +} + + +/*****************************************************************/ +bool DIALOG_SVG_PRINT::DrawPage( const wxString& FullFileName, BASE_SCREEN* screen + , bool aPrint_Sheet_Ref) +/*****************************************************************/ + +/* + * Routine effective d'impression + */ +{ + int tmpzoom; + wxPoint tmp_startvisu; + wxSize SheetSize; // Sheet size in internal units + wxPoint old_org; + float dpi; + bool success = true; + + /* modification des cadrages et reglages locaux */ + tmp_startvisu = screen->m_StartVisu; + tmpzoom = screen->GetZoom(); + old_org = screen->m_DrawOrg; + screen->m_DrawOrg.x = screen->m_DrawOrg.y = 0; + screen->m_StartVisu.x = screen->m_StartVisu.y = 0; + SheetSize = screen->m_CurrentSheetDesc->m_Size; // size in 1/1000 inch + SheetSize.x *= m_Parent->m_InternalUnits / 1000; + SheetSize.y *= m_Parent->m_InternalUnits / 1000; // size in pixels + + screen->SetZoom( 1 ); + dpi = (float) SheetSize.x * 25.4 / m_ImageXSize_mm; + + WinEDA_DrawPanel* panel = m_Parent->DrawPanel; + + wxSVGFileDC dc( FullFileName, SheetSize.x, SheetSize.y, dpi ); + + if( !dc.Ok() ) + { + DisplayError( this, wxT( "SVGprint error: wxSVGFileDC not OK" ) ); + success = FALSE; + } + else + { + EDA_Rect tmp = panel->m_ClipBox; + GRResetPenAndBrush( &dc ); + s_SVGPenMinWidth = ReturnValueFromTextCtrl( *m_DialogPenWidth, m_Parent->m_InternalUnits ); + SetPenMinWidth( s_SVGPenMinWidth ); + GRForceBlackPen( m_ModeColorOption->GetSelection() == 0 ? FALSE : true ); + + + panel->m_ClipBox.SetX( 0 ); panel->m_ClipBox.SetY( 0 ); + panel->m_ClipBox.SetWidth( 0x7FFFFF0 ); panel->m_ClipBox.SetHeight( 0x7FFFFF0 ); + + g_IsPrinting = true; + SetLocaleTo_C_standard( ); // Switch the locale to standard C (needed to print floating point numbers like 1.3) + panel->PrintPage( &dc, aPrint_Sheet_Ref, 1, false ); + SetLocaleTo_Default( ); // revert to the current locale + g_IsPrinting = FALSE; + panel->m_ClipBox = tmp; + } + + + GRForceBlackPen( FALSE ); + SetPenMinWidth( 1 ); + + screen->m_StartVisu = tmp_startvisu; + screen->m_DrawOrg = old_org; + screen->SetZoom( tmpzoom ); + + return success; +} + + +/********************************************************************/ +void DIALOG_SVG_PRINT::OnButtonPlotAllClick( wxCommandEvent& event ) +/********************************************************************/ +{ + PrintSVGDoc( true, m_Print_Sheet_Ref->GetValue() ); +} + +/********************************************************************/ +void DIALOG_SVG_PRINT::OnButtonPlotCurrentClick( wxCommandEvent& event ) +/********************************************************************/ +{ + PrintSVGDoc( false, m_Print_Sheet_Ref->GetValue() ); +} + + +/******************************************************************/ +void DIALOG_SVG_PRINT::OnButtonCancelClick( wxCommandEvent& event ) +/******************************************************************/ +{ + Close( ); +} + + +/***********************************************************/ +void DIALOG_SVG_PRINT::OnCloseWindow( wxCloseEvent& event ) +/***********************************************************/ +{ + if( m_Config ) + { + s_PlotBlackAndWhite = m_ModeColorOption->GetSelection(); + m_Config->Write( PLOTSVGPENWIDTH_KEY, s_SVGPenMinWidth ); + m_Config->Write( PLOTSVGMODECOLOR_KEY, s_PlotBlackAndWhite ); + } + EndModal( 0 ); +} + +/*********************************************************************/ +void DIALOG_SVG_PRINT::OnSetColorModeSelected( wxCommandEvent& event ) +/*********************************************************************/ +/* called on radiobox color/black and white selection +*/ +{ + s_PlotBlackAndWhite = m_ModeColorOption->GetSelection(); +} diff --git a/eeschema/dialog_SVG_print_base.cpp b/eeschema/dialog_SVG_print_base.cpp new file mode 100644 index 0000000000..6b74b1a95c --- /dev/null +++ b/eeschema/dialog_SVG_print_base.cpp @@ -0,0 +1,104 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Apr 16 2008) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#include "dialog_SVG_print_base.h" + +/////////////////////////////////////////////////////////////////////////// + +DIALOG_SVG_PRINT_base::DIALOG_SVG_PRINT_base( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) +{ + this->SetSizeHints( wxSize( -1,-1 ), wxDefaultSize ); + + wxBoxSizer* bMainSizer; + bMainSizer = new wxBoxSizer( wxVERTICAL ); + + wxBoxSizer* bUpperSizer; + bUpperSizer = new wxBoxSizer( wxHORIZONTAL ); + + wxStaticBoxSizer* sbOptionsSizer; + sbOptionsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Print SVG 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 ); + + wxString m_ModeColorOptionChoices[] = { _("Color"), _("Black and White") }; + int m_ModeColorOptionNChoices = sizeof( m_ModeColorOptionChoices ) / sizeof( wxString ); + m_ModeColorOption = new wxRadioBox( this, wxID_ANY, _("Print mode"), wxDefaultPosition, wxDefaultSize, m_ModeColorOptionNChoices, m_ModeColorOptionChoices, 1, wxRA_SPECIFY_COLS ); + m_ModeColorOption->SetSelection( 0 ); + 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") ); + + sbOptionsSizer->Add( m_ModeColorOption, 0, wxALL|wxEXPAND, 5 ); + + m_Print_Sheet_Ref = new wxCheckBox( this, wxID_ANY, _("Print Frame Ref"), wxDefaultPosition, wxDefaultSize, 0 ); + + m_Print_Sheet_Ref->SetToolTip( _("Print (or not) the Frame references.") ); + + sbOptionsSizer->Add( m_Print_Sheet_Ref, 0, wxALL, 5 ); + + bUpperSizer->Add( sbOptionsSizer, 1, wxEXPAND, 5 ); + + wxBoxSizer* bButtonsSizer; + bButtonsSizer = new wxBoxSizer( wxVERTICAL ); + + m_buttonPlotCurrent = new wxButton( this, wxID_PRINT_CURRENT, _("PrintCurrent"), wxDefaultPosition, wxDefaultSize, 0 ); + bButtonsSizer->Add( m_buttonPlotCurrent, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_buttonPlotAll = new wxButton( this, wxID_PRINT_ALL, _("Print All"), wxDefaultPosition, wxDefaultSize, 0 ); + bButtonsSizer->Add( m_buttonPlotAll, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_buttonQuit = new wxButton( this, wxID_CANCEL, _("Quit"), wxDefaultPosition, wxDefaultSize, 0 ); + bButtonsSizer->Add( m_buttonQuit, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + bUpperSizer->Add( bButtonsSizer, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + bMainSizer->Add( bUpperSizer, 1, wxEXPAND, 5 ); + + m_staticText1 = new wxStaticText( this, wxID_ANY, _("Filename:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText1->Wrap( -1 ); + bMainSizer->Add( m_staticText1, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + + m_FileNameCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_FileNameCtrl->SetToolTip( _("Enter a filename if you do not want to use defaults files names\nCan be used only when printing the current sheet") ); + m_FileNameCtrl->SetMinSize( wxSize( 450,-1 ) ); + + bMainSizer->Add( m_FileNameCtrl, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 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 ); + bMainSizer->Add( m_MessagesBox, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + + this->SetSizer( bMainSizer ); + this->Layout(); + + // Connect Events + this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_SVG_PRINT_base::OnCloseWindow ) ); + this->Connect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_SVG_PRINT_base::OnInitDialog ) ); + m_ModeColorOption->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_SVG_PRINT_base::OnSetColorModeSelected ), NULL, this ); + m_buttonPlotCurrent->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SVG_PRINT_base::OnButtonPlotCurrentClick ), NULL, this ); + m_buttonPlotAll->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SVG_PRINT_base::OnButtonPlotAllClick ), NULL, this ); + m_buttonQuit->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SVG_PRINT_base::OnButtonCancelClick ), NULL, this ); +} + +DIALOG_SVG_PRINT_base::~DIALOG_SVG_PRINT_base() +{ + // Disconnect Events + this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_SVG_PRINT_base::OnCloseWindow ) ); + this->Disconnect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_SVG_PRINT_base::OnInitDialog ) ); + m_ModeColorOption->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_SVG_PRINT_base::OnSetColorModeSelected ), NULL, this ); + m_buttonPlotCurrent->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SVG_PRINT_base::OnButtonPlotCurrentClick ), NULL, this ); + m_buttonPlotAll->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SVG_PRINT_base::OnButtonPlotAllClick ), NULL, this ); + m_buttonQuit->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SVG_PRINT_base::OnButtonCancelClick ), NULL, this ); +} diff --git a/eeschema/dialog_SVG_print_base.fbp b/eeschema/dialog_SVG_print_base.fbp new file mode 100644 index 0000000000..591d8b2f86 --- /dev/null +++ b/eeschema/dialog_SVG_print_base.fbp @@ -0,0 +1,697 @@ + + + + + + C++ + 1 + UTF-8 + connect + dialog_SVG_print_base + 1000 + none + 1 + DialogSVGPrint_base + + . + + 1 + 1 + 0 + + + + + 1 + + + + 0 + wxID_ANY + + -1,-1 + DIALOG_SVG_PRINT_base + + 550,459 + wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER + + Create SVG file + + + + + + + + OnCloseWindow + + + + + + OnInitDialog + + + + + + + + + + + + + + + + + + + + + + + bMainSizer + wxVERTICAL + none + + 5 + wxEXPAND + 1 + + + bUpperSizer + wxHORIZONTAL + none + + 5 + wxEXPAND + 1 + + wxID_ANY + Print SVG options: + + sbOptionsSizer + wxVERTICAL + none + + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + + + 1 + + + 0 + wxID_ANY + Pen width mini + + + m_TextPenWidth + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND + 0 + + + + 1 + + + 0 + wxID_ANY + + 0 + + m_DialogPenWidth + protected + + + + + Selection of the minimum pen thickness used to draw items. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + + "Color" "Black and White" + + 1 + + + 0 + wxID_ANY + Print mode + 1 + + + m_ModeColorOption + protected + + 0 + + wxRA_SPECIFY_COLS + + Choose if you wand to draw the sheet like it appears on screen, or in black and white mode, better to print it when using black and white printers + + + + + + + + + + + + + + + + + + + + + OnSetColorModeSelected + + + + + + + + + + 5 + wxALL + 0 + + + 0 + + 1 + + + 0 + wxID_ANY + Print Frame Ref + + + m_Print_Sheet_Ref + protected + + + + + Print (or not) the Frame references. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL + 0 + + + bButtonsSizer + wxVERTICAL + none + + 5 + wxALL|wxALIGN_CENTER_HORIZONTAL + 0 + + + + 0 + 1 + + + 0 + wxID_PRINT_CURRENT + PrintCurrent + + + m_buttonPlotCurrent + protected + + + + + + + + + OnButtonPlotCurrentClick + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_HORIZONTAL + 0 + + + + 0 + 1 + + + 0 + wxID_PRINT_ALL + Print All + + + m_buttonPlotAll + protected + + + + + + + + + OnButtonPlotAllClick + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_HORIZONTAL + 0 + + + + 0 + 1 + + + 0 + wxID_CANCEL + Quit + + + m_buttonQuit + protected + + + + + + + + + OnButtonCancelClick + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + + + 1 + + + 0 + wxID_ANY + Filename: + + + m_staticText1 + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT + 0 + + + + 1 + + + 0 + wxID_ANY + + 0 + 450,-1 + m_FileNameCtrl + protected + + + + + Enter a filename if you do not want to use defaults files names Can be used only when printing the current sheet + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + + + 1 + + + 0 + wxID_ANY + Messages: + + + m_staticText2 + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT + 1 + + + + 1 + + + 0 + wxID_ANY + + 0 + + m_MessagesBox + protected + + + wxTE_MULTILINE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/eeschema/dialog_SVG_print_base.h b/eeschema/dialog_SVG_print_base.h new file mode 100644 index 0000000000..7803803567 --- /dev/null +++ b/eeschema/dialog_SVG_print_base.h @@ -0,0 +1,70 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Apr 16 2008) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifndef __dialog_SVG_print_base__ +#define __dialog_SVG_print_base__ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/////////////////////////////////////////////////////////////////////////// + +/////////////////////////////////////////////////////////////////////////////// +/// Class DIALOG_SVG_PRINT_base +/////////////////////////////////////////////////////////////////////////////// +class DIALOG_SVG_PRINT_base : public wxDialog +{ + private: + + protected: + enum + { + wxID_PRINT_CURRENT = 1000, + wxID_PRINT_ALL, + }; + + wxStaticText* m_TextPenWidth; + wxTextCtrl* m_DialogPenWidth; + wxRadioBox* m_ModeColorOption; + wxCheckBox* m_Print_Sheet_Ref; + wxButton* m_buttonPlotCurrent; + wxButton* m_buttonPlotAll; + wxButton* m_buttonQuit; + wxStaticText* m_staticText1; + wxTextCtrl* m_FileNameCtrl; + 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 OnSetColorModeSelected( wxCommandEvent& event ){ event.Skip(); } + virtual void OnButtonPlotCurrentClick( wxCommandEvent& event ){ event.Skip(); } + virtual void OnButtonPlotAllClick( wxCommandEvent& event ){ event.Skip(); } + virtual void OnButtonCancelClick( wxCommandEvent& event ){ event.Skip(); } + + + public: + DIALOG_SVG_PRINT_base( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Create SVG file"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 550,459 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + ~DIALOG_SVG_PRINT_base(); + +}; + +#endif //__dialog_SVG_print_base__ diff --git a/eeschema/makefile.include b/eeschema/makefile.include index eb64274abc..1818cf00f5 100644 --- a/eeschema/makefile.include +++ b/eeschema/makefile.include @@ -34,6 +34,8 @@ OBJECTS = eeschema.o\ dialog_options.o\ dialog_edit_libentry_fields_in_lib.o\ dialog_edit_libentry_fields_in_lib_base.o\ + dialog_SVG_print.o\ + dialog_SVG_print_base.o\ tool_lib.o\ tool_sch.o\ tool_viewlib.o\ @@ -99,8 +101,7 @@ OBJECTS = eeschema.o\ find.o \ backanno.o \ controle.o\ - hotkeys.o\ - svg_print.o + hotkeys.o eeschema.o: eeschema.cpp program.h general.h $(DEPEND) diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt index aa0068856e..c73d08d271 100644 --- a/pcbnew/CMakeLists.txt +++ b/pcbnew/CMakeLists.txt @@ -68,6 +68,8 @@ set(PCBNEW_SRCS dialog_setup_libs.cpp dialog_orient_footprints.cpp # dialog_track_options.cpp + dialog_SVG_print.cpp + dialog_SVG_print_base.cpp dist.cpp dragsegm.cpp drc.cpp diff --git a/pcbnew/dialog_SVG_print.cpp b/pcbnew/dialog_SVG_print.cpp new file mode 100644 index 0000000000..f21d3483fd --- /dev/null +++ b/pcbnew/dialog_SVG_print.cpp @@ -0,0 +1,337 @@ +///////////////////////////////////////////////////////////////////////////// + +// Name: dialog_svg_print.cpp +// Author: jean-pierre Charras +// Modified by: +// Licence: GPL +///////////////////////////////////////////////////////////////////////////// + +#include "fctsys.h" + +#include "common.h" + +#include "dialog_SVG_print_base.h" + +#include "dcsvg.h" + +#include "pcbnew.h" + +// Keys for configuration +#define PLOTSVGPENWIDTH_KEY wxT( "PlotSVGPenWidth" ) +#define PLOTSVGMODECOLOR_KEY wxT( "PlotSVGModeColor" ) +#define OPTKEY_LAYERBASE wxT( "PlotLayer_%d" ) + +#define WIDTH_MAX_VALUE 100 +#define WIDTH_MIN_VALUE 1 + +// Variables locales +static int s_SVGPenMinWidth; /* Minimum pen width (in internal units) for printing */ + +static bool s_Print_Frame_Ref = true; +static int s_PlotBlackAndWhite = 0; +static long s_SelectedLayers = CUIVRE_LAYER | CMP_LAYER | + SILKSCREEN_LAYER_CMP | SILKSCREEN_LAYER_CU; + +class DIALOG_SVG_PRINT : public DIALOG_SVG_PRINT_base +{ +private: + WinEDA_BasePcbFrame* m_Parent; + int m_ImageXSize_mm; + wxConfig* m_Config; + long m_PrintMaskLayer; + wxCheckBox* m_BoxSelectLayer[32]; + +public: + DIALOG_SVG_PRINT( WinEDA_DrawFrame* parent ); + ~DIALOG_SVG_PRINT() {} + +private: + void OnCloseWindow( wxCloseEvent& event ); + void OnInitDialog( wxInitDialogEvent& event ); + void OnButtonPrintSelectedClick( wxCommandEvent& event ); + void OnButtonPrintBoardClick( wxCommandEvent& event ); + void OnButtonCancelClick( wxCommandEvent& event ); + void OnSetColorModeSelected( wxCommandEvent& event ); + void SetPenWidth(); + void PrintSVGDoc( bool aPrintAll, bool aPrint_Sheet_Ref ); + bool DrawPage( const wxString& FullFileName, BASE_SCREEN* screen, bool aPrint_Sheet_Ref ); +}; + +/*******************************************************/ +void WinEDA_DrawFrame::SVG_Print( wxCommandEvent& event ) +/*******************************************************/ + +/* Prepare les structures de donnees de gestion de l'impression + * et affiche la fenetre de dialogue de gestion de l'impression des feuilles + */ +{ + DIALOG_SVG_PRINT frame( this ); + + frame.ShowModal(); +} + + +/*! + * DIALOG_SVG_PRINT functions + */ +DIALOG_SVG_PRINT::DIALOG_SVG_PRINT( WinEDA_DrawFrame* parent ) : + DIALOG_SVG_PRINT_base( parent ) +{ + m_Parent = (WinEDA_BasePcbFrame*) parent; + m_Config = wxGetApp().m_EDA_Config; +} + + +/*************************************************************/ +void DIALOG_SVG_PRINT::OnInitDialog( wxInitDialogEvent& event ) +/*************************************************************/ +{ + SetFont( *g_DialogFont ); + SetFocus(); // Make ESC key working + + m_ImageXSize_mm = 270; + if( m_Config ) + { + m_Config->Read( PLOTSVGPENWIDTH_KEY, &s_SVGPenMinWidth ); + m_Config->Read( PLOTSVGMODECOLOR_KEY, &s_PlotBlackAndWhite ); + } + + AddUnitSymbol( *m_TextPenWidth, g_UnitMetric ); + m_DialogPenWidth->SetValue( + ReturnStringFromValue( g_UnitMetric, s_SVGPenMinWidth, m_Parent->m_InternalUnits ) ); + m_Print_Sheet_Ref->SetValue( s_Print_Frame_Ref ); + + // Create layers list + BOARD* board = m_Parent->GetBoard(); + int mask = 1; + for( int layer = 0; layerGetLayerName( layer ) ); + + if( mask & s_SelectedLayers ) + m_BoxSelectLayer[layer]->SetValue( true ); + + if( layer < 16 ) + m_CopperLayersBoxSizer->Add( m_BoxSelectLayer[layer], 0, wxGROW | wxALL, 1 ); + else + m_TechnicalBoxSizer->Add( m_BoxSelectLayer[layer], 0, wxGROW | wxALL, 1 ); + } + + if( m_Config ) + { + wxString layerKey; + + for( int layer = 0; layerRead( layerKey, &option ) ) + m_BoxSelectLayer[layer]->SetValue( option ); + } + } + + if( GetSizer() ) + { + GetSizer()->SetSizeHints( this ); + } +} + + +/********************************************/ +void DIALOG_SVG_PRINT::SetPenWidth() +/********************************************/ +{ + s_SVGPenMinWidth = ReturnValueFromTextCtrl( *m_DialogPenWidth, m_Parent->m_InternalUnits ); + + if( s_SVGPenMinWidth > WIDTH_MAX_VALUE ) + { + s_SVGPenMinWidth = WIDTH_MAX_VALUE; + } + + if( s_SVGPenMinWidth < WIDTH_MIN_VALUE ) + { + s_SVGPenMinWidth = WIDTH_MIN_VALUE; + } + + m_DialogPenWidth->SetValue( + ReturnStringFromValue( g_UnitMetric, s_SVGPenMinWidth, m_Parent->m_InternalUnits ) ); +} + + +/***************************************************************************/ +void DIALOG_SVG_PRINT::PrintSVGDoc( bool aPrintAll, bool aPrint_Sheet_Ref ) +/***************************************************************************/ +{ + wxString msg; + + SetPenWidth(); + + wxString FullFileName; + BASE_SCREEN* screen = m_Parent->GetBaseScreen(); + + if( aPrintAll ) + m_PrintMaskLayer = 0xFFFFFFFF; + + for ( int layer = 0; layerGetValue( ) ) + continue; + + FullFileName = m_FileNameCtrl->GetValue(); + if( FullFileName.IsEmpty() ) + { + FullFileName = screen->m_FileName; + ChangeFileNameExt( FullFileName, wxT( "" ) ); + } + + if( ! aPrintAll ) + { + FullFileName << wxT("-") << m_BoxSelectLayer[layer]->GetLabel( ); + m_PrintMaskLayer = 1 << layer; + if ( m_PrintBoardEdgesCtrl->IsChecked() ) + m_PrintMaskLayer |= EDGE_LAYER; + + } + + FullFileName += wxT( ".svg" ); + + bool success = DrawPage( FullFileName, screen, aPrint_Sheet_Ref ); + msg = _( "Create file " ) + FullFileName; + if( !success ) + msg += _( " error" ); + msg += wxT( "\n" ); + m_MessagesBox->AppendText( msg ); + + if ( aPrintAll ) + break; + } +} + + +/*****************************************************************/ +bool DIALOG_SVG_PRINT::DrawPage( const wxString& FullFileName, BASE_SCREEN* screen, + bool aPrint_Sheet_Ref ) +/*****************************************************************/ + +/* + * Routine effective d'impression + */ +{ + int tmpzoom; + wxPoint tmp_startvisu; + wxSize SheetSize; // Sheet size in internal units + wxPoint old_org; + float dpi; + bool success = true; + + /* modification des cadrages et reglages locaux */ + tmp_startvisu = screen->m_StartVisu; + tmpzoom = screen->GetZoom(); + old_org = screen->m_DrawOrg; + screen->m_DrawOrg.x = screen->m_DrawOrg.y = 0; + screen->m_StartVisu.x = screen->m_StartVisu.y = 0; + SheetSize = screen->m_CurrentSheetDesc->m_Size; // size in 1/1000 inch + SheetSize.x *= m_Parent->m_InternalUnits / 1000; + SheetSize.y *= m_Parent->m_InternalUnits / 1000; // size in pixels + + screen->SetZoom( 1 ); + dpi = (float) SheetSize.x * 25.4 / m_ImageXSize_mm; + + WinEDA_DrawPanel* panel = m_Parent->DrawPanel; + + wxSVGFileDC dc( FullFileName, SheetSize.x, SheetSize.y, dpi ); + + if( !dc.Ok() ) + { + DisplayError( this, wxT( "SVGprint error: wxSVGFileDC not OK" ) ); + success = FALSE; + } + else + { + EDA_Rect tmp = panel->m_ClipBox; + GRResetPenAndBrush( &dc ); + s_SVGPenMinWidth = ReturnValueFromTextCtrl( *m_DialogPenWidth, m_Parent->m_InternalUnits ); + SetPenMinWidth( s_SVGPenMinWidth ); + GRForceBlackPen( m_ModeColorOption->GetSelection() == 0 ? FALSE : true ); + + + panel->m_ClipBox.SetX( 0 ); panel->m_ClipBox.SetY( 0 ); + panel->m_ClipBox.SetWidth( 0x7FFFFF0 ); panel->m_ClipBox.SetHeight( 0x7FFFFF0 ); + + g_IsPrinting = true; + SetLocaleTo_C_standard(); // Switch the locale to standard C (needed to print floating point numbers like 1.3) + panel->PrintPage( &dc, aPrint_Sheet_Ref, m_PrintMaskLayer, false ); + SetLocaleTo_Default(); // revert to the current locale + g_IsPrinting = FALSE; + panel->m_ClipBox = tmp; + } + + + GRForceBlackPen( FALSE ); + SetPenMinWidth( 1 ); + + screen->m_StartVisu = tmp_startvisu; + screen->m_DrawOrg = old_org; + screen->SetZoom( tmpzoom ); + + return success; +} + + +/********************************************************************/ +void DIALOG_SVG_PRINT::OnButtonPrintBoardClick( wxCommandEvent& event ) +/********************************************************************/ +{ + s_Print_Frame_Ref = m_Print_Sheet_Ref->GetValue( ); + PrintSVGDoc( true, m_Print_Sheet_Ref->GetValue() ); +} + + +/********************************************************************/ +void DIALOG_SVG_PRINT::OnButtonPrintSelectedClick( wxCommandEvent& event ) +/********************************************************************/ +{ + s_Print_Frame_Ref = m_Print_Sheet_Ref->GetValue( ); + PrintSVGDoc( false, m_Print_Sheet_Ref->GetValue() ); +} + + +/******************************************************************/ +void DIALOG_SVG_PRINT::OnButtonCancelClick( wxCommandEvent& event ) +/******************************************************************/ +{ + Close(); +} + + +/***********************************************************/ +void DIALOG_SVG_PRINT::OnCloseWindow( wxCloseEvent& event ) +/***********************************************************/ +{ + if( m_Config ) + { + s_PlotBlackAndWhite = m_ModeColorOption->GetSelection(); + m_Config->Write( PLOTSVGPENWIDTH_KEY, s_SVGPenMinWidth ); + m_Config->Write( PLOTSVGMODECOLOR_KEY, s_PlotBlackAndWhite ); + wxString layerKey; + for( int layer = 0; layerWrite( layerKey, m_BoxSelectLayer[layer]->IsChecked() ); + } + } + EndModal( 0 ); +} + + +/*********************************************************************/ +void DIALOG_SVG_PRINT::OnSetColorModeSelected( wxCommandEvent& event ) +/*********************************************************************/ + +/* called on radiobox color/black and white selection + */ +{ + s_PlotBlackAndWhite = m_ModeColorOption->GetSelection(); +} diff --git a/pcbnew/dialog_SVG_print_base.cpp b/pcbnew/dialog_SVG_print_base.cpp new file mode 100644 index 0000000000..3a3594bb30 --- /dev/null +++ b/pcbnew/dialog_SVG_print_base.cpp @@ -0,0 +1,127 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Apr 16 2008) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#include "dialog_SVG_print_base.h" + +/////////////////////////////////////////////////////////////////////////// + +DIALOG_SVG_PRINT_base::DIALOG_SVG_PRINT_base( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : 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 ); + + 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, wxEXPAND, 5 ); + + m_TechnicalBoxSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Technical Layers:") ), wxVERTICAL ); + + sbLayersSizer->Add( m_TechnicalBoxSizer, 1, wxEXPAND, 5 ); + + bUpperSizer->Add( sbLayersSizer, 1, wxEXPAND, 5 ); + + wxStaticBoxSizer* sbOptionsSizer; + sbOptionsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Print SVG 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 ); + + wxString m_ModeColorOptionChoices[] = { _("Color"), _("Black and White") }; + int m_ModeColorOptionNChoices = sizeof( m_ModeColorOptionChoices ) / sizeof( wxString ); + m_ModeColorOption = new wxRadioBox( this, wxID_ANY, _("Print mode"), wxDefaultPosition, wxDefaultSize, m_ModeColorOptionNChoices, m_ModeColorOptionChoices, 1, wxRA_SPECIFY_COLS ); + m_ModeColorOption->SetSelection( 0 ); + 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") ); + + sbOptionsSizer->Add( m_ModeColorOption, 0, wxALL|wxEXPAND, 5 ); + + m_Print_Sheet_Ref = new wxCheckBox( this, wxID_ANY, _("Print Frame Ref"), wxDefaultPosition, wxDefaultSize, 0 ); + m_Print_Sheet_Ref->SetValue(true); + + m_Print_Sheet_Ref->SetToolTip( _("Print (or not) the Frame references.") ); + + sbOptionsSizer->Add( m_Print_Sheet_Ref, 0, wxALL, 5 ); + + m_PrintBoardEdgesCtrl = new wxCheckBox( this, wxID_ANY, _("Print Board Edges"), wxDefaultPosition, wxDefaultSize, 0 ); + m_PrintBoardEdgesCtrl->SetValue(true); + + m_PrintBoardEdgesCtrl->SetToolTip( _("Print (or not) the edges layer with others layers") ); + + sbOptionsSizer->Add( m_PrintBoardEdgesCtrl, 0, wxALL, 5 ); + + bUpperSizer->Add( sbOptionsSizer, 1, wxEXPAND, 5 ); + + wxBoxSizer* bButtonsSizer; + bButtonsSizer = new wxBoxSizer( wxVERTICAL ); + + m_buttonPrintSelected = new wxButton( this, wxID_PRINT_CURRENT, _("Print Selected"), wxDefaultPosition, wxDefaultSize, 0 ); + bButtonsSizer->Add( m_buttonPrintSelected, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_buttonBoard = new wxButton( this, wxID_PRINT_BOARD, _("Print Board"), wxDefaultPosition, wxDefaultSize, 0 ); + bButtonsSizer->Add( m_buttonBoard, 0, wxALL, 5 ); + + m_buttonQuit = new wxButton( this, wxID_CANCEL, _("Quit"), wxDefaultPosition, wxDefaultSize, 0 ); + bButtonsSizer->Add( m_buttonQuit, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + bUpperSizer->Add( bButtonsSizer, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + bMainSizer->Add( bUpperSizer, 0, wxEXPAND, 5 ); + + m_staticText1 = new wxStaticText( this, wxID_ANY, _("Filename:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText1->Wrap( -1 ); + bMainSizer->Add( m_staticText1, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + + m_FileNameCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_FileNameCtrl->SetToolTip( _("Enter a filename if you do not want to use defaults files names\nCan be used only when printing the current sheet") ); + m_FileNameCtrl->SetMinSize( wxSize( 450,-1 ) ); + + bMainSizer->Add( m_FileNameCtrl, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 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,100 ) ); + + bMainSizer->Add( m_MessagesBox, 1, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); + + this->SetSizer( bMainSizer ); + this->Layout(); + + // Connect Events + this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_SVG_PRINT_base::OnCloseWindow ) ); + this->Connect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_SVG_PRINT_base::OnInitDialog ) ); + m_ModeColorOption->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_SVG_PRINT_base::OnSetColorModeSelected ), NULL, this ); + m_buttonPrintSelected->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SVG_PRINT_base::OnButtonPrintSelectedClick ), NULL, this ); + m_buttonBoard->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SVG_PRINT_base::OnButtonPrintBoardClick ), NULL, this ); + m_buttonQuit->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SVG_PRINT_base::OnButtonCancelClick ), NULL, this ); +} + +DIALOG_SVG_PRINT_base::~DIALOG_SVG_PRINT_base() +{ + // Disconnect Events + this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_SVG_PRINT_base::OnCloseWindow ) ); + this->Disconnect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_SVG_PRINT_base::OnInitDialog ) ); + m_ModeColorOption->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_SVG_PRINT_base::OnSetColorModeSelected ), NULL, this ); + m_buttonPrintSelected->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SVG_PRINT_base::OnButtonPrintSelectedClick ), NULL, this ); + m_buttonBoard->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SVG_PRINT_base::OnButtonPrintBoardClick ), NULL, this ); + m_buttonQuit->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SVG_PRINT_base::OnButtonCancelClick ), NULL, this ); +} diff --git a/pcbnew/dialog_SVG_print_base.fbp b/pcbnew/dialog_SVG_print_base.fbp new file mode 100644 index 0000000000..dc3d94f1c2 --- /dev/null +++ b/pcbnew/dialog_SVG_print_base.fbp @@ -0,0 +1,791 @@ + + + + + + C++ + 1 + UTF-8 + connect + dialog_SVG_print_base + 1000 + none + 1 + DialogSVGPrint_base + + . + + 1 + 1 + 0 + + + + + 1 + + + + 0 + wxID_ANY + + -1,350 + DIALOG_SVG_PRINT_base + + 507,375 + wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER + + Create SVG file + + + + + + + + OnCloseWindow + + + + + + OnInitDialog + + + + + + + + + + + + + + + + + + + + + + + bMainSizer + wxVERTICAL + none + + 5 + wxEXPAND + 0 + + + bUpperSizer + wxHORIZONTAL + none + + 5 + wxEXPAND + 1 + + wxID_ANY + Layers: + + sbLayersSizer + wxHORIZONTAL + none + + + 5 + wxEXPAND + 1 + + wxID_ANY + Copper Layers: + + m_CopperLayersBoxSizer + wxVERTICAL + protected + + + + + 5 + wxEXPAND + 1 + + wxID_ANY + Technical Layers: + + m_TechnicalBoxSizer + wxVERTICAL + protected + + + + + + + 5 + wxEXPAND + 1 + + wxID_ANY + Print SVG options: + + sbOptionsSizer + wxVERTICAL + none + + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + + + 1 + + + 0 + wxID_ANY + Pen width mini + + + m_TextPenWidth + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND + 0 + + + + 1 + + + 0 + wxID_ANY + + 0 + + m_DialogPenWidth + protected + + + + + Selection of the minimum pen thickness used to draw items. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + + "Color" "Black and White" + + 1 + + + 0 + wxID_ANY + Print mode + 1 + + + m_ModeColorOption + protected + + 0 + + wxRA_SPECIFY_COLS + + Choose if you wand to draw the sheet like it appears on screen, or in black and white mode, better to print it when using black and white printers + + + + + + + + + + + + + + + + + + + + + OnSetColorModeSelected + + + + + + + + + + 5 + wxALL + 0 + + + 1 + + 1 + + + 0 + wxID_ANY + Print Frame Ref + + + m_Print_Sheet_Ref + protected + + + + + Print (or not) the Frame references. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + 1 + + 1 + + + 0 + wxID_ANY + Print Board Edges + + + m_PrintBoardEdgesCtrl + protected + + + + + Print (or not) the edges layer with others layers + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL + 0 + + + bButtonsSizer + wxVERTICAL + none + + 5 + wxALL|wxALIGN_CENTER_HORIZONTAL + 0 + + + + 0 + 1 + + + 0 + wxID_PRINT_CURRENT + Print Selected + + + m_buttonPrintSelected + protected + + + + + + + + + OnButtonPrintSelectedClick + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + + 0 + 1 + + + 0 + wxID_PRINT_BOARD + Print Board + + + m_buttonBoard + protected + + + + + + + + + OnButtonPrintBoardClick + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_HORIZONTAL + 0 + + + + 0 + 1 + + + 0 + wxID_CANCEL + Quit + + + m_buttonQuit + protected + + + + + + + + + OnButtonCancelClick + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + + + 1 + + + 0 + wxID_ANY + Filename: + + + m_staticText1 + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT + 0 + + + + 1 + + + 0 + wxID_ANY + + 0 + 450,-1 + m_FileNameCtrl + protected + + + + + Enter a filename if you do not want to use defaults files names Can be used only when printing the current sheet + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + + + 1 + + + 0 + wxID_ANY + Messages: + + + m_staticText2 + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND + 1 + + + + 1 + + + 0 + wxID_ANY + + 0 + -1,100 + m_MessagesBox + protected + + + wxTE_MULTILINE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pcbnew/dialog_SVG_print_base.h b/pcbnew/dialog_SVG_print_base.h new file mode 100644 index 0000000000..ff54e3af5a --- /dev/null +++ b/pcbnew/dialog_SVG_print_base.h @@ -0,0 +1,73 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Apr 16 2008) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifndef __dialog_SVG_print_base__ +#define __dialog_SVG_print_base__ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/////////////////////////////////////////////////////////////////////////// + +/////////////////////////////////////////////////////////////////////////////// +/// Class DIALOG_SVG_PRINT_base +/////////////////////////////////////////////////////////////////////////////// +class DIALOG_SVG_PRINT_base : public wxDialog +{ + private: + + protected: + enum + { + wxID_PRINT_CURRENT = 1000, + wxID_PRINT_BOARD, + }; + + wxStaticBoxSizer* m_CopperLayersBoxSizer; + wxStaticBoxSizer* m_TechnicalBoxSizer; + wxStaticText* m_TextPenWidth; + wxTextCtrl* m_DialogPenWidth; + wxRadioBox* m_ModeColorOption; + wxCheckBox* m_Print_Sheet_Ref; + wxCheckBox* m_PrintBoardEdgesCtrl; + wxButton* m_buttonPrintSelected; + wxButton* m_buttonBoard; + wxButton* m_buttonQuit; + wxStaticText* m_staticText1; + wxTextCtrl* m_FileNameCtrl; + 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 OnSetColorModeSelected( wxCommandEvent& event ){ event.Skip(); } + virtual void OnButtonPrintSelectedClick( wxCommandEvent& event ){ event.Skip(); } + virtual void OnButtonPrintBoardClick( wxCommandEvent& event ){ event.Skip(); } + virtual void OnButtonCancelClick( wxCommandEvent& event ){ event.Skip(); } + + + public: + DIALOG_SVG_PRINT_base( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Create SVG file"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 507,375 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + ~DIALOG_SVG_PRINT_base(); + +}; + +#endif //__dialog_SVG_print_base__ diff --git a/pcbnew/makefile.include b/pcbnew/makefile.include index b47c17010f..77a5c7a339 100644 --- a/pcbnew/makefile.include +++ b/pcbnew/makefile.include @@ -33,6 +33,8 @@ OBJECTS= $(TARGET).o classpcb.o\ dialog_pad_properties.o\ dialog_pad_properties_base.o\ dialog_pcb_text_properties.o\ + dialog_SVG_print.o\ + dialog_SVG_print_base.o\ onrightclick.o\ onleftclick.o\ modedit_onclick.o\ diff --git a/pcbnew/menubarpcb.cpp b/pcbnew/menubarpcb.cpp index 5303339c1f..2fa81f22b6 100644 --- a/pcbnew/menubarpcb.cpp +++ b/pcbnew/menubarpcb.cpp @@ -92,6 +92,11 @@ void WinEDA_PcbFrame::ReCreateMenuBar() item->SetBitmap(print_button); m_FilesMenu->Append(item); + item = new wxMenuItem(m_FilesMenu, ID_GEN_PLOT_SVG, + _("Print S&VG"), _("Plot pcb board in SVG format")); + item->SetBitmap(print_button); + m_FilesMenu->Append(item); + // Add plot menu item = new wxMenuItem(m_FilesMenu, ID_GEN_PLOT, _("&Plot"), _("Plot (HPGL, PostScript, or Gerber format)")); diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index d351754d30..2f13ae3578 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -116,6 +116,7 @@ BEGIN_EVENT_TABLE( WinEDA_PcbFrame, WinEDA_BasePcbFrame ) EVT_TOOL( wxID_PASTE, WinEDA_PcbFrame::Process_Special_Functions ) EVT_TOOL( ID_UNDO_BUTT, WinEDA_PcbFrame::Process_Special_Functions ) EVT_TOOL( ID_GEN_PRINT, WinEDA_DrawFrame::ToPrinter ) + EVT_TOOL( ID_GEN_PLOT_SVG, WinEDA_DrawFrame::SVG_Print ) EVT_TOOL( ID_GEN_PLOT, WinEDA_DrawFrame::Process_Special_Functions ) EVT_TOOL( ID_FIND_ITEMS, WinEDA_PcbFrame::Process_Special_Functions ) EVT_TOOL( ID_GET_NETLIST, WinEDA_PcbFrame::Process_Special_Functions ) diff --git a/pcbnew/print_board_functions.cpp b/pcbnew/print_board_functions.cpp index 843d43670b..827d30f637 100644 --- a/pcbnew/print_board_functions.cpp +++ b/pcbnew/print_board_functions.cpp @@ -1,6 +1,6 @@ -/**********************************************/ -/*lay2plot.cpp: some functions to plot boards */ -/**********************************************/ +/************************************************************/ +/* print_board_functions.cpp: some functions to plot boards */ +/************************************************************/ #include "fctsys.h" #include "gr_basic.h" diff --git a/share/svg_print.cpp b/share/svg_print.cpp deleted file mode 100644 index 4c067e252f..0000000000 --- a/share/svg_print.cpp +++ /dev/null @@ -1,544 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// - -// Name: svg_print.cpp -// Purpose: -// Author: jean-pierre Charras -// Modified by: -// Created: 05/02/2006 11:05:19 -// RCS-ID: -// Copyright: License GNU -// Licence: -///////////////////////////////////////////////////////////////////////////// - -// Generated by DialogBlocks (unregistered), 05/02/2006 11:05:19 - -#if defined (__GNUG__) && !defined (NO_GCC_PRAGMA) -#pragma implementation "svg_print.h" -#endif - -// For compilers that support precompilation, includes "wx/wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/wx.h" -#endif - -////@begin includes -////@end includes - -#include -#include "wx/metafile.h" -#include "wx/image.h" - -#include "fctsys.h" -#include "gr_basic.h" - -#include "common.h" - -#include "dcsvg.h" -#include "svg_print.h" - -#ifdef EESCHEMA -#include "program.h" -#endif - -////@begin XPM images -////@end XPM images - - -// Keys for configuration -#define PLOTSVGPENWIDTH_KEY wxT( "PlotSVGPenWidth") -#define PLOTSVGMODECOLOR_KEY wxT( "PlotSVGModeColor" ) - -extern BASE_SCREEN* ActiveScreen; -#ifdef EESCHEMA -#define WIDTH_MAX_VALUE 100 -#else -#define WIDTH_MAX_VALUE 1000 -#endif -#define WIDTH_MIN_VALUE 1 - -// Variables locales -static int s_SVGPenMinWidth; /* Minimum pen width (in internal units) for printing */ - -static int Select_PrintAll = FALSE; -static bool Print_Sheet_Ref = TRUE; -static int s_PlotBlackAndWhite = 0; - - -/*******************************************************/ -void WinEDA_DrawFrame::SVG_Print( wxCommandEvent& event ) -/*******************************************************/ - -/* Prepare les structures de donnees de gestion de l'impression - * et affiche la fenetre de dialogue de gestion de l'impression des feuilles - */ -{ - // Arret des commandes en cours - if( DrawPanel->ManageCurseur && DrawPanel->ForceCloseManageCurseur ) - { - wxClientDC dc( DrawPanel ); - - DrawPanel->PrepareDC( dc ); - DrawPanel->ForceCloseManageCurseur( DrawPanel, &dc ); - } - SetToolID( 0, wxCURSOR_ARROW, wxEmptyString ); - - WinEDA_PrintSVGFrame frame( this ); - - frame.ShowModal(); -} - - -/*! - * WinEDA_PrintSVGFrame type definition - */ - -IMPLEMENT_DYNAMIC_CLASS( WinEDA_PrintSVGFrame, wxDialog ) - -/*! - * WinEDA_PrintSVGFrame event table definition - */ - -BEGIN_EVENT_TABLE( WinEDA_PrintSVGFrame, wxDialog ) - -////@begin WinEDA_PrintSVGFrame event table entries - EVT_CLOSE( WinEDA_PrintSVGFrame::OnCloseWindow ) - - EVT_RADIOBOX( ID_RADIOBOX_SETPRINTMODE, WinEDA_PrintSVGFrame::OnRadioboxSetprintmodeSelected ) - - EVT_BUTTON( ID_PRINT_EXECUTE, WinEDA_PrintSVGFrame::OnPrintExecuteClick ) - - EVT_BUTTON( wxID_CANCEL, WinEDA_PrintSVGFrame::OnCancelClick ) - -////@end WinEDA_PrintSVGFrame event table entries - -END_EVENT_TABLE() - -/*! - * WinEDA_PrintSVGFrame constructors - */ - -WinEDA_PrintSVGFrame::WinEDA_PrintSVGFrame() -{ -} - - -WinEDA_PrintSVGFrame::WinEDA_PrintSVGFrame( WinEDA_DrawFrame* parent, - wxWindowID id, - const wxString& caption, - const wxPoint& pos, - const wxSize& size, - long style ) -{ - m_Parent = parent; - m_ImageXSize_mm = 270; - wxConfig* Config = wxGetApp().m_EDA_Config; - if( Config ) - { - Config->Read( PLOTSVGPENWIDTH_KEY, &s_SVGPenMinWidth ); - Config->Read( PLOTSVGMODECOLOR_KEY, &s_PlotBlackAndWhite ); - } - - Create( parent, id, caption, pos, size, style ); -} - - -/*! - * WinEDA_PrintSVGFrame creator - */ - -bool WinEDA_PrintSVGFrame::Create( wxWindow* parent, - wxWindowID id, - const wxString& caption, - const wxPoint& pos, - const wxSize& size, - long style ) -{ -////@begin WinEDA_PrintSVGFrame member initialisation - m_DialogPenWidthSizer = NULL; - m_ModeColorOption = NULL; - m_Print_Sheet_Ref = NULL; - m_PagesOption = NULL; - m_FileNameCtrl = NULL; - m_MessagesBox = NULL; -////@end WinEDA_PrintSVGFrame member initialisation - -////@begin WinEDA_PrintSVGFrame creation - SetExtraStyle(wxWS_EX_BLOCK_EVENTS); - wxDialog::Create( parent, id, caption, pos, size, style ); - - CreateControls(); - if (GetSizer()) - { - GetSizer()->SetSizeHints(this); - } - Centre(); -////@end WinEDA_PrintSVGFrame creation - return true; -} - - -/*! - * Control creation for WinEDA_PrintSVGFrame - */ - -void WinEDA_PrintSVGFrame::CreateControls() -{ - SetFont( *g_DialogFont ); - -////@begin WinEDA_PrintSVGFrame content construction - // Generated by DialogBlocks, 08/01/2009 12:58:57 (unregistered) - - WinEDA_PrintSVGFrame* itemDialog1 = this; - - wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxVERTICAL); - itemDialog1->SetSizer(itemBoxSizer2); - - wxBoxSizer* itemBoxSizer3 = new wxBoxSizer(wxHORIZONTAL); - itemBoxSizer2->Add(itemBoxSizer3, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5); - - wxBoxSizer* itemBoxSizer4 = new wxBoxSizer(wxVERTICAL); - itemBoxSizer3->Add(itemBoxSizer4, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); - - m_DialogPenWidthSizer = new wxBoxSizer(wxVERTICAL); - itemBoxSizer4->Add(m_DialogPenWidthSizer, 0, wxGROW|wxALL, 5); - - wxArrayString m_ModeColorOptionStrings; - m_ModeColorOptionStrings.Add(_("Color")); - m_ModeColorOptionStrings.Add(_("Black and White")); - m_ModeColorOption = new wxRadioBox( itemDialog1, ID_RADIOBOX_SETPRINTMODE, _("Print mode"), wxDefaultPosition, wxDefaultSize, m_ModeColorOptionStrings, 1, wxRA_SPECIFY_COLS ); - m_ModeColorOption->SetSelection(0); - itemBoxSizer4->Add(m_ModeColorOption, 0, wxGROW|wxALL, 5); - - m_Print_Sheet_Ref = new wxCheckBox( itemDialog1, ID_CHECKBOX, _("Print Sheet Ref"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE ); - m_Print_Sheet_Ref->SetValue(false); - itemBoxSizer4->Add(m_Print_Sheet_Ref, 0, wxALIGN_LEFT|wxALL, 5); - - itemBoxSizer3->Add(5, 5, 0, wxALIGN_CENTER_VERTICAL|wxALL, 15); - - wxBoxSizer* itemBoxSizer9 = new wxBoxSizer(wxVERTICAL); - itemBoxSizer3->Add(itemBoxSizer9, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); - - wxArrayString m_PagesOptionStrings; - m_PagesOptionStrings.Add(_("Current")); - m_PagesOptionStrings.Add(_("All")); - m_PagesOption = new wxRadioBox( itemDialog1, ID_RADIOBOX_SELPAGE, _("Page Print:"), wxDefaultPosition, wxDefaultSize, m_PagesOptionStrings, 1, wxRA_SPECIFY_COLS ); - m_PagesOption->SetSelection(0); - itemBoxSizer9->Add(m_PagesOption, 0, wxALIGN_LEFT|wxALL, 5); - - wxButton* itemButton11 = new wxButton( itemDialog1, ID_PRINT_EXECUTE, _("Create &File"), wxDefaultPosition, wxDefaultSize, 0 ); - itemButton11->SetDefault(); - itemButton11->SetForegroundColour(wxColour(0, 128, 0)); - itemBoxSizer9->Add(itemButton11, 0, wxGROW|wxALL, 5); - - wxButton* itemButton12 = new wxButton( itemDialog1, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 ); - itemButton12->SetForegroundColour(wxColour(0, 0, 198)); - itemBoxSizer9->Add(itemButton12, 0, wxGROW|wxALL, 5); - - wxStaticText* itemStaticText13 = new wxStaticText( itemDialog1, wxID_STATIC, _("Filename:"), wxDefaultPosition, wxDefaultSize, 0 ); - itemBoxSizer2->Add(itemStaticText13, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5); - - m_FileNameCtrl = new wxTextCtrl( itemDialog1, ID_TEXTCTRL, _T(""), wxDefaultPosition, wxDefaultSize, 0 ); - itemBoxSizer2->Add(m_FileNameCtrl, 0, wxGROW|wxLEFT|wxRIGHT|wxBOTTOM, 5); - - wxStaticText* itemStaticText15 = new wxStaticText( itemDialog1, wxID_STATIC, _("Messages:"), wxDefaultPosition, wxDefaultSize, 0 ); - itemBoxSizer2->Add(itemStaticText15, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5); - - m_MessagesBox = new wxTextCtrl( itemDialog1, ID_TEXTCTRL1, _T(""), wxDefaultPosition, wxSize(-1, 100), wxTE_MULTILINE|wxTE_READONLY ); - itemBoxSizer2->Add(m_MessagesBox, 0, wxGROW|wxLEFT|wxRIGHT|wxBOTTOM, 5); - - // Set validators - m_ModeColorOption->SetValidator( wxGenericValidator(& s_PlotBlackAndWhite) ); - m_Print_Sheet_Ref->SetValidator( wxGenericValidator(& Print_Sheet_Ref) ); -////@end WinEDA_PrintSVGFrame content construction - - SetFocus(); // Make ESC key working - m_DialogPenWidth = new WinEDA_ValueCtrl( this, _( - "Pen width mini" ), s_SVGPenMinWidth, - g_UnitMetric, m_DialogPenWidthSizer, - m_Parent->m_InternalUnits ); -} - - -/*! - * Should we show tooltips? - */ - -bool WinEDA_PrintSVGFrame::ShowToolTips() -{ - return true; -} - - -/*! - * Get bitmap resources - */ - -wxBitmap WinEDA_PrintSVGFrame::GetBitmapResource( const wxString& name ) -{ - // Bitmap retrieval -////@begin WinEDA_PrintSVGFrame bitmap retrieval - wxUnusedVar(name); - return wxNullBitmap; -////@end WinEDA_PrintSVGFrame bitmap retrieval -} - - -/*! - * Get icon resources - */ - -wxIcon WinEDA_PrintSVGFrame::GetIconResource( const wxString& name ) -{ - // Icon retrieval -////@begin WinEDA_PrintSVGFrame icon retrieval - wxUnusedVar(name); - return wxNullIcon; -////@end WinEDA_PrintSVGFrame icon retrieval -} - - -/********************************************/ -void WinEDA_PrintSVGFrame::SetPenWidth() -/********************************************/ -{ - s_SVGPenMinWidth = m_DialogPenWidth->GetValue(); - - if( s_SVGPenMinWidth > WIDTH_MAX_VALUE ) - { - s_SVGPenMinWidth = WIDTH_MAX_VALUE; - } - - if( s_SVGPenMinWidth < WIDTH_MIN_VALUE ) - { - s_SVGPenMinWidth = WIDTH_MIN_VALUE; - } - - m_DialogPenWidth->SetValue( s_SVGPenMinWidth ); -} - - -/**************************************************************/ -void WinEDA_PrintSVGFrame::PrintSVGDoc( wxCommandEvent& event ) -/**************************************************************/ - -/* Called on activate "Print CURRENT" button - */ -{ - bool print_ref = TRUE; - wxString msg; - - Select_PrintAll = FALSE; - if( m_PagesOption && (m_PagesOption->GetSelection() == 1) ) - Select_PrintAll = TRUE; - - if( (m_Print_Sheet_Ref == NULL) || (m_Print_Sheet_Ref->GetValue() == FALSE) ) - print_ref = FALSE; - - SetPenWidth(); - - wxString FullFileName; - BASE_SCREEN* screen = m_Parent->GetBaseScreen(); - BASE_SCREEN* oldscreen = screen; -#ifndef EESCHEMA - if( Select_PrintAll ) - while( screen->Pback ) - screen = (BASE_SCREEN*) screen->Pback; - -#endif - - if( (m_Parent->m_Ident == PCB_FRAME) || (m_Parent->m_Ident == GERBER_FRAME) ) - { - if( Select_PrintAll ) - { - m_PrintMaskLayer = 0xFFFFFFFF; - } - else - m_PrintMaskLayer = 1; - } - - if( screen == NULL ) - return; - -#ifdef EESCHEMA - if( Select_PrintAll && m_Parent->m_Ident == SCHEMATIC_FRAME ) - { - WinEDA_SchematicFrame* schframe = (WinEDA_SchematicFrame*) m_Parent; - DrawSheetPath* sheetpath, *oldsheetpath = schframe->GetSheet(); - SCH_SCREEN* schscreen = schframe->GetScreen(); - oldscreen = schscreen; - EDA_SheetList SheetList( NULL ); - sheetpath = SheetList.GetFirst(); - DrawSheetPath list; - - for( ; ; ) - { - if( sheetpath == NULL ) - break; - list.Clear(); - if( list.BuildSheetPathInfoFromSheetPathValue( sheetpath->Path() ) ) - { - schframe->m_CurrentSheet = &list; - schframe->m_CurrentSheet->UpdateAllScreenReferences(); - schframe->SetSheetNumberAndCount(); - schscreen = schframe->m_CurrentSheet->LastScreen(); - ActiveScreen = schscreen; - } - else // Should not happen - return; - sheetpath = SheetList.GetNext(); - - FullFileName = schframe->GetUniqueFilenameForCurrentSheet( ) + wxT( ".svg" ); - - bool success = DrawPage( FullFileName, schscreen ); - msg = _( "Create file " ) + FullFileName; - if( !success ) - msg += _( " error" ); - msg += wxT( "\n" ); - m_MessagesBox->AppendText( msg ); - } - schframe->m_CurrentSheet = oldsheetpath; - schframe->m_CurrentSheet->UpdateAllScreenReferences(); - schframe->SetSheetNumberAndCount(); - } - else -#endif - { - FullFileName = m_FileNameCtrl->GetValue(); - if( FullFileName.IsEmpty() ) - { - FullFileName = screen->m_FileName; - ChangeFileNameExt( FullFileName, wxT( ".svg" ) ); - } - bool success = DrawPage( FullFileName, screen ); - msg = _( "Create file " ) + FullFileName; - if( !success ) - msg += _( " error" ); - msg += wxT( "\n" ); - m_MessagesBox->AppendText( msg ); - } - ActiveScreen = oldscreen; -} - - -/*****************************************************************/ -bool WinEDA_PrintSVGFrame::DrawPage( const wxString& FullFileName, BASE_SCREEN* screen ) -/*****************************************************************/ - -/* - * Routine effective d'impression - */ -{ - int tmpzoom; - wxPoint tmp_startvisu; - wxSize SheetSize; // Sheet size in internal units - wxPoint old_org; - float dpi; - bool success = TRUE; - - /* modification des cadrages et reglages locaux */ - tmp_startvisu = screen->m_StartVisu; - tmpzoom = screen->GetZoom(); - old_org = screen->m_DrawOrg; - screen->m_DrawOrg.x = screen->m_DrawOrg.y = 0; - screen->m_StartVisu.x = screen->m_StartVisu.y = 0; - SheetSize = screen->m_CurrentSheetDesc->m_Size; // size in 1/1000 inch - SheetSize.x *= m_Parent->m_InternalUnits / 1000; - SheetSize.y *= m_Parent->m_InternalUnits / 1000; // size in pixels - - screen->SetZoom( 1 ); - dpi = (float) SheetSize.x * 25.4 / m_ImageXSize_mm; - - WinEDA_DrawPanel* panel = m_Parent->DrawPanel; - - wxSVGFileDC dc( FullFileName, SheetSize.x, SheetSize.y, dpi ); - - if( !dc.Ok() ) - { - DisplayError( this, wxT( "SVGprint error: wxSVGFileDC not OK" ) ); - success = FALSE; - } - else - { - EDA_Rect tmp = panel->m_ClipBox; - GRResetPenAndBrush( &dc ); - s_SVGPenMinWidth = m_DialogPenWidth->GetValue(); - SetPenMinWidth( s_SVGPenMinWidth ); - GRForceBlackPen( m_ModeColorOption->GetSelection() == 0 ? FALSE : TRUE ); - - - panel->m_ClipBox.SetX( 0 ); panel->m_ClipBox.SetY( 0 ); - panel->m_ClipBox.SetWidth( 0x7FFFFF0 ); panel->m_ClipBox.SetHeight( 0x7FFFFF0 ); - - g_IsPrinting = TRUE; - SetLocaleTo_C_standard( ); // Switch the locale to standard C (needed to print floating point numbers like 1.3) - panel->PrintPage( &dc, m_Print_Sheet_Ref, m_PrintMaskLayer, false ); - SetLocaleTo_Default( ); // revert to the current locale - g_IsPrinting = FALSE; - panel->m_ClipBox = tmp; - } - - - GRForceBlackPen( FALSE ); - SetPenMinWidth( 1 ); - - screen->m_StartVisu = tmp_startvisu; - screen->m_DrawOrg = old_org; - screen->SetZoom( tmpzoom ); - - return success; -} - - -/*! - * wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_PRINT_EXECUTE - */ - -void WinEDA_PrintSVGFrame::OnPrintExecuteClick( wxCommandEvent& event ) -{ - PrintSVGDoc( event ); -} - - -/*! - * wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CLOSE - */ - -void WinEDA_PrintSVGFrame::OnCancelClick( wxCommandEvent& event ) -{ - Close( ); -} - - -/*! - * wxEVT_CLOSE_WINDOW event handler for ID_DIALOG - */ - -void WinEDA_PrintSVGFrame::OnCloseWindow( wxCloseEvent& event ) -{ - wxConfig* Config = wxGetApp().m_EDA_Config; - - if( Config ) - { - s_PlotBlackAndWhite = m_ModeColorOption->GetSelection(); - Config->Write( PLOTSVGPENWIDTH_KEY, s_SVGPenMinWidth ); - Config->Write( PLOTSVGMODECOLOR_KEY, s_PlotBlackAndWhite ); - } - EndModal( 0 ); -} - - -/*! - * wxEVT_COMMAND_RADIOBOX_SELECTED event handler for ID_RADIOBOX_SETPRINTMODE - */ - -void WinEDA_PrintSVGFrame::OnRadioboxSetprintmodeSelected( wxCommandEvent& event ) -{ - s_PlotBlackAndWhite = m_ModeColorOption->GetSelection(); - event.Skip(); -} diff --git a/share/svg_print.h b/share/svg_print.h deleted file mode 100644 index f226aa9d9f..0000000000 --- a/share/svg_print.h +++ /dev/null @@ -1,137 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: svg_print.h -// Purpose: -// Author: jean-pierre Charras -// Modified by: -// Created: 05/02/2006 11:05:20 -// RCS-ID: -// Copyright: License GNU -// Licence: -///////////////////////////////////////////////////////////////////////////// - -// Generated by DialogBlocks (unregistered), 05/02/2006 11:05:20 - -#ifndef _SVG_PRINT_H_ -#define _SVG_PRINT_H_ - -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) -#pragma interface "svg_print.h" -#endif - -/*! - * Includes - */ - -////@begin includes -#include "wx/valgen.h" -////@end includes - -/*! - * Forward declarations - */ - -////@begin forward declarations -class wxBoxSizer; -////@end forward declarations - -/*! - * Control identifiers - */ - -////@begin control identifiers -#define ID_DIALOG 10000 -#define ID_RADIOBOX_SETPRINTMODE 10007 -#define ID_CHECKBOX 10004 -#define ID_RADIOBOX_SELPAGE 10008 -#define ID_PRINT_EXECUTE 10002 -#define ID_TEXTCTRL 10001 -#define ID_TEXTCTRL1 10006 -#define SYMBOL_WINEDA_PRINTSVGFRAME_STYLE wxCAPTION|wxSYSTEM_MENU|wxCLOSE_BOX|wxFRAME_FLOAT_ON_PARENT|MAYBE_RESIZE_BORDER -#define SYMBOL_WINEDA_PRINTSVGFRAME_TITLE _("Create SVG file") -#define SYMBOL_WINEDA_PRINTSVGFRAME_IDNAME ID_DIALOG -#define SYMBOL_WINEDA_PRINTSVGFRAME_SIZE wxSize(400, 300) -#define SYMBOL_WINEDA_PRINTSVGFRAME_POSITION wxDefaultPosition -////@end control identifiers - -/*! - * Compatibility - */ - -#ifndef wxCLOSE_BOX -#define wxCLOSE_BOX 0x1000 -#endif - -/*! - * WinEDA_PrintSVGFrame class declaration - */ - -class WinEDA_PrintSVGFrame: public wxDialog -{ - DECLARE_DYNAMIC_CLASS( WinEDA_PrintSVGFrame ) - DECLARE_EVENT_TABLE() - -public: - /// Constructors - WinEDA_PrintSVGFrame( ); - WinEDA_PrintSVGFrame( WinEDA_DrawFrame* parent, - wxWindowID id = SYMBOL_WINEDA_PRINTSVGFRAME_IDNAME, - const wxString& caption = SYMBOL_WINEDA_PRINTSVGFRAME_TITLE, - const wxPoint& pos = SYMBOL_WINEDA_PRINTSVGFRAME_POSITION, - const wxSize& size = SYMBOL_WINEDA_PRINTSVGFRAME_SIZE, - long style = SYMBOL_WINEDA_PRINTSVGFRAME_STYLE ); - - /// Creation - bool Create( wxWindow* parent, wxWindowID id = SYMBOL_WINEDA_PRINTSVGFRAME_IDNAME, const wxString& caption = SYMBOL_WINEDA_PRINTSVGFRAME_TITLE, const wxPoint& pos = SYMBOL_WINEDA_PRINTSVGFRAME_POSITION, const wxSize& size = SYMBOL_WINEDA_PRINTSVGFRAME_SIZE, long style = SYMBOL_WINEDA_PRINTSVGFRAME_STYLE ); - - /// Creates the controls and sizers - void CreateControls(); - -////@begin WinEDA_PrintSVGFrame event handler declarations - - /// wxEVT_CLOSE_WINDOW event handler for ID_DIALOG - void OnCloseWindow( wxCloseEvent& event ); - - /// wxEVT_COMMAND_RADIOBOX_SELECTED event handler for ID_RADIOBOX_SETPRINTMODE - void OnRadioboxSetprintmodeSelected( wxCommandEvent& event ); - - /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_PRINT_EXECUTE - void OnPrintExecuteClick( wxCommandEvent& event ); - - /// wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CANCEL - void OnCancelClick( wxCommandEvent& event ); - -////@end WinEDA_PrintSVGFrame event handler declarations - -////@begin WinEDA_PrintSVGFrame member function declarations - - /// Retrieves bitmap resources - wxBitmap GetBitmapResource( const wxString& name ); - - /// Retrieves icon resources - wxIcon GetIconResource( const wxString& name ); -////@end WinEDA_PrintSVGFrame member function declarations - - /// Should we show tooltips? - static bool ShowToolTips(); - - void PrintSVGDoc(wxCommandEvent& event); - bool DrawPage(const wxString & FullFileName, BASE_SCREEN* screen); - -////@begin WinEDA_PrintSVGFrame member variables - wxBoxSizer* m_DialogPenWidthSizer; - wxRadioBox* m_ModeColorOption; - wxCheckBox* m_Print_Sheet_Ref; - wxRadioBox* m_PagesOption; - wxTextCtrl* m_FileNameCtrl; - wxTextCtrl* m_MessagesBox; -////@end WinEDA_PrintSVGFrame member variables - - WinEDA_DrawFrame * m_Parent; - WinEDA_ValueCtrl * m_DialogPenWidth; - void SetPenWidth(); - int m_PrintMaskLayer; - int m_ImageXSize_mm; -}; - -#endif - // _SVG_PRINT_H_ diff --git a/share/svg_print.pjd b/share/svg_print.pjd deleted file mode 100644 index 9d5e3819fd..0000000000 --- a/share/svg_print.pjd +++ /dev/null @@ -1,1100 +0,0 @@ - - -
- 0 - "" - "" - "" - "" - "" - 0 - 0 - 0 - 1 - 1 - 1 - 1 - 0 - "jean-pierre Charras" - "License GNU" - "" - 0 - 0 - "<All platforms>" - "<Any>" - "///////////////////////////////////////////////////////////////////////////// -// Name: %HEADER-FILENAME% -// Purpose: -// Author: %AUTHOR% -// Modified by: -// Created: %DATE% -// RCS-ID: -// Copyright: %COPYRIGHT% -// Licence: -///////////////////////////////////////////////////////////////////////////// - -" - "///////////////////////////////////////////////////////////////////////////// -// Name: %SOURCE-FILENAME% -// Purpose: -// Author: %AUTHOR% -// Modified by: -// Created: %DATE% -// RCS-ID: -// Copyright: %COPYRIGHT% -// Licence: -///////////////////////////////////////////////////////////////////////////// - -" - "///////////////////////////////////////////////////////////////////////////// -// Name: %SYMBOLS-FILENAME% -// Purpose: Symbols file -// Author: %AUTHOR% -// Modified by: -// Created: %DATE% -// RCS-ID: -// Copyright: %COPYRIGHT% -// Licence: -///////////////////////////////////////////////////////////////////////////// - -" - "#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) -#pragma interface "%HEADER-FILENAME%" -#endif - -" - "#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) -#pragma implementation "%HEADER-FILENAME%" -#endif - -// For compilers that support precompilation, includes "wx/wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/wx.h" -#endif - -" - " /// %BODY% -" - " -/*! - * %BODY% - */ - -" - "app_resources.h" - "app_resources.cpp" - "AppResources" - "app.h" - "app.cpp" - "Application" - 0 - "" - "<None>" - "<System>" - "utf-8" - "<System>" - "" - 0 - 0 - 4 - " " - "" - 0 - 0 - 1 - 0 - 1 - 1 - 0 - 1 - 0 -
- - - "" - "data-document" - "" - "" - 0 - 1 - 0 - 0 - - "Configurations" - "config-data-document" - "" - "" - 0 - 1 - 0 - 0 - "" - 1 - -8519680 - "" - "Debug" - "ANSI" - "Static" - "Modular" - "GUI" - "wxMSW" - "Dynamic" - "Yes" - "No" - "No" - "%WXVERSION%" - "%EXECUTABLE%" - "" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - 0 - 1 - - - - - - - "Projects" - "root-document" - "" - "project" - 1 - 1 - 0 - 1 - - "Windows" - "html-document" - "" - "dialogsfolder" - 1 - 1 - 0 - 1 - - "Print SVG file" - "dialog-document" - "" - "dialog" - 0 - 1 - 0 - 0 - "5/7/2006" - "wbDialogProxy" - 10000 - 0 - "" - 0 - "" - 0 - 0 - "wxEVT_CLOSE_WINDOW|OnCloseWindow|||" - "ID_DIALOG" - 10000 - "WinEDA_PrintSVGFrame" - "wxDialog" - "wxDialog" - "svg_print.cpp" - "svg_print.h" - "" - "Create SVG file" - 1 - "" - 0 - "" - "" - "" - "" - "" - 0 - 1 - "<Any platform>" - "" - "" - "" - "" - "" - "" - "Tiled" - 0 - 1 - 0 - 1 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 1 - 0 - "wxFRAME_FLOAT_ON_PARENT|MAYBE_RESIZE_BORDER" - 0 - 1 - -1 - -1 - 400 - 300 - 0 - "" - - "wxBoxSizer V" - "dialog-control-document" - "" - "sizer" - 0 - 1 - 0 - 0 - "wbBoxSizerProxy" - "Vertical" - "" - 0 - 0 - 0 - "<Any platform>" - - "wxBoxSizer H" - "dialog-control-document" - "" - "sizer" - 0 - 1 - 0 - 0 - "5/7/2006" - "wbBoxSizerProxy" - "Horizontal" - "" - "Centre" - "Centre" - 0 - 5 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - "<Any platform>" - - "wxBoxSizer V" - "dialog-control-document" - "" - "sizer" - 0 - 1 - 0 - 0 - "5/7/2006" - "wbBoxSizerProxy" - "Vertical" - "" - "Centre" - "Centre" - 0 - 5 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - "<Any platform>" - - "wxBoxSizer V" - "dialog-control-document" - "" - "sizer" - 0 - 1 - 0 - 0 - "23/8/2008" - "wbBoxSizerProxy" - "Vertical" - "m_DialogPenWidthSizer" - "Expand" - "Centre" - 0 - 5 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - "<Any platform>" - - - "wxRadioBox: ID_RADIOBOX_SETPRINTMODE" - "dialog-control-document" - "" - "radiobox" - 0 - 1 - 0 - 0 - "25/11/2006" - "wbRadioBoxProxy" - "wxEVT_COMMAND_RADIOBOX_SELECTED|OnRadioboxSetprintmodeSelected" - "ID_RADIOBOX_SETPRINTMODE" - 10007 - "" - "wxRadioBox" - "wxRadioBox" - 1 - 0 - "" - "" - "m_ModeColorOption" - "Print mode" - 1 - "Color|Black and White" - 0 - "" - "" - "" - "" - "" - 0 - 1 - "<Any platform>" - "s_PlotBlackAndWhite" - "wxGenericValidator(& %VARIABLE%)" - "" - "" - "" - "" - "" - 0 - 1 - 0 - 0 - 0 - "" - -1 - -1 - -1 - -1 - "Expand" - "Centre" - 0 - 5 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - "" - "" - - - "wxCheckBox: ID_CHECKBOX" - "dialog-control-document" - "" - "checkbox" - 0 - 1 - 0 - 0 - "5/7/2006" - "wbCheckBoxProxy" - "ID_CHECKBOX" - 10004 - "" - "wxCheckBox" - "wxCheckBox" - 1 - 0 - "" - "" - "m_Print_Sheet_Ref" - "Print Sheet Ref" - 0 - "" - "" - "Print_Sheet_Ref" - "wxGenericValidator(& %VARIABLE%)" - "" - "" - "" - "" - "" - "" - "" - "" - 0 - 1 - "<Any platform>" - 0 - 1 - 0 - 0 - 0 - 0 - 0 - "" - -1 - -1 - -1 - -1 - "Left" - "Centre" - 0 - 5 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - "" - "" - - - - "Spacer" - "dialog-control-document" - "" - "spacer" - 0 - 1 - 0 - 0 - "5/7/2006" - "wbSpacerProxy" - 5 - 5 - "Centre" - "Centre" - 0 - 15 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - "<Any platform>" - - - "wxBoxSizer V" - "dialog-control-document" - "" - "sizer" - 0 - 1 - 0 - 0 - "5/7/2006" - "wbBoxSizerProxy" - "Vertical" - "" - "Centre" - "Centre" - 0 - 5 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - "<Any platform>" - - "wxRadioBox: ID_RADIOBOX_SELPAGE" - "dialog-control-document" - "" - "radiobox" - 0 - 1 - 0 - 0 - "23/12/2006" - "wbRadioBoxProxy" - "ID_RADIOBOX_SELPAGE" - 10008 - "" - "wxRadioBox" - "wxRadioBox" - 1 - 0 - "" - "" - "m_PagesOption" - "Page Print:" - 1 - "Current|All" - 0 - "" - "" - "" - "" - "" - 0 - 1 - "<Any platform>" - "" - "" - "" - "" - "" - "" - "" - 0 - 1 - 0 - 0 - 0 - "" - -1 - -1 - -1 - -1 - "Left" - "Centre" - 0 - 5 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - "" - "" - - - "wxButton: ID_PRINT_EXECUTE" - "dialog-control-document" - "" - "dialogcontrol" - 0 - 1 - 0 - 0 - "5/7/2006" - "wbButtonProxy" - "wxEVT_COMMAND_BUTTON_CLICKED|OnPrintExecuteClick" - "ID_PRINT_EXECUTE" - 10002 - "" - "wxButton" - "wxButton" - 1 - 0 - "" - "" - "" - "Create &File" - 1 - "" - "" - "" - "" - "" - "" - "" - "" - "" - "" - "008000" - "" - 0 - 1 - "<Any platform>" - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - "" - -1 - -1 - -1 - -1 - "Expand" - "Centre" - 0 - 5 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - "" - "" - - - "wxButton: wxID_CANCEL" - "dialog-control-document" - "" - "dialogcontrol" - 0 - 1 - 0 - 0 - "5/7/2006" - "wbButtonProxy" - "wxEVT_COMMAND_BUTTON_CLICKED|OnCancelClick|||WinEDA_PrintSVGFrame" - "wxID_CANCEL" - 5101 - "" - "wxButton" - "wxButton" - 1 - 0 - "" - "" - "" - "Cancel" - 0 - "" - "" - "" - "" - "" - "" - "" - "" - "" - "" - "0000C6" - "" - 0 - 1 - "<Any platform>" - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - "" - -1 - -1 - -1 - -1 - "Expand" - "Centre" - 0 - 5 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - "" - "" - - - - - "wxStaticText: wxID_STATIC" - "dialog-control-document" - "" - "statictext" - 0 - 1 - 0 - 0 - "5/7/2006" - "wbStaticTextProxy" - "wxID_STATIC" - 5105 - "" - "wxStaticText" - "wxStaticText" - 1 - 0 - "" - "" - "" - "Filename:" - -1 - "" - "" - "" - "" - "" - 0 - 1 - "<Any platform>" - "" - "" - "" - "" - "" - "" - "" - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - "" - -1 - -1 - -1 - -1 - "Left" - "Top" - 0 - 5 - 1 - 1 - 1 - 0 - 0 - 1 - 0 - "" - "" - - - "wxTextCtrl: ID_TEXTCTRL" - "dialog-control-document" - "" - "textctrl" - 0 - 1 - 0 - 0 - "5/7/2006" - "wbTextCtrlProxy" - "ID_TEXTCTRL" - 10001 - "" - "wxTextCtrl" - "wxTextCtrl" - 1 - 0 - "" - "" - "m_FileNameCtrl" - "" - 0 - "" - "" - "" - "" - "" - 0 - 1 - "<Any platform>" - "" - "" - "" - "" - "" - "" - "" - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - "" - -1 - -1 - -1 - -1 - "Expand" - "Centre" - 0 - 5 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - "" - "" - - - "wxStaticText: wxID_STATIC" - "dialog-control-document" - "" - "statictext" - 0 - 1 - 0 - 0 - "5/9/2006" - "wbStaticTextProxy" - "wxID_STATIC" - 5105 - "" - "wxStaticText" - "wxStaticText" - 1 - 0 - "" - "" - "" - "Messages:" - -1 - "" - "" - "" - "" - "" - 0 - 1 - "<Any platform>" - "" - "" - "" - "" - "" - "" - "" - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - "" - -1 - -1 - -1 - -1 - "Left" - "Centre" - 0 - 5 - 1 - 1 - 1 - 0 - 0 - 1 - 0 - "" - "" - - - "wxTextCtrl: ID_TEXTCTRL1" - "dialog-control-document" - "" - "textctrl" - 0 - 1 - 0 - 0 - "5/9/2006" - "wbTextCtrlProxy" - "ID_TEXTCTRL1" - 10006 - "" - "wxTextCtrl" - "wxTextCtrl" - 1 - 0 - "" - "" - "m_MessagesBox" - "" - 0 - "" - "" - "" - "" - "" - 0 - 1 - "<Any platform>" - "" - "" - "" - "" - "" - "" - "" - 1 - 0 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - "" - -1 - -1 - -1 - 100 - "Expand" - "Centre" - 0 - 5 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - "" - "" - - - - - - "Sources" - "html-document" - "" - "sourcesfolder" - 1 - 1 - 0 - 1 - - "svg_print.rc" - "source-editor-document" - "svg_print.rc" - "source-editor" - 0 - 0 - 1 - 0 - "5/7/2006" - "" - - - - "Images" - "html-document" - "" - "bitmapsfolder" - 1 - 1 - 0 - 1 - - - - -