Commit 37ee2394 authored by jean-pierre charras's avatar jean-pierre charras

Pcbnew: in SVG export, add option to export only the board area, not the full page.

dialog plot functions: fix compil warnings with wxWidgets 2.8
parent ba6da604
...@@ -119,24 +119,25 @@ wxString wxBrushString(wxColour c, int style = wxBRUSHSTYLE_SOLID) ...@@ -119,24 +119,25 @@ wxString wxBrushString(wxColour c, int style = wxBRUSHSTYLE_SOLID)
IMPLEMENT_ABSTRACT_CLASS(KicadSVGFileDCImpl, wxDC) IMPLEMENT_ABSTRACT_CLASS(KicadSVGFileDCImpl, wxDC)
KicadSVGFileDCImpl::KicadSVGFileDCImpl( KicadSVGFileDC *owner, const wxString &filename, KicadSVGFileDCImpl::KicadSVGFileDCImpl( KicadSVGFileDC *owner, const wxString &aFilename,
int width, int height, double dpi ) : wxPoint aOrigin, wxSize aSize, double aDpi ) :
wxDCImpl( owner ) wxDCImpl( owner )
{ {
Init( filename, width, height, dpi ); Init( aFilename, aOrigin, aSize, aDpi );
} }
void KicadSVGFileDCImpl::Init (const wxString &filename, int Width, int Height, double dpi) void KicadSVGFileDCImpl::Init ( const wxString &aFilename,
wxPoint aOrigin, wxSize aSize, double aDpi)
{ {
m_width = Width; m_width = aSize.x;
m_height = Height; m_height = aSize.y;
m_dpi = dpi; m_dpi = aDpi;
m_OK = true; m_OK = true;
m_mm_to_pix_x = dpi/25.4; m_mm_to_pix_x = m_dpi/25.4;
m_mm_to_pix_y = dpi/25.4; m_mm_to_pix_y = m_dpi/25.4;
m_backgroundBrush = *wxTRANSPARENT_BRUSH; m_backgroundBrush = *wxTRANSPARENT_BRUSH;
m_textForegroundColour = *wxBLACK; m_textForegroundColour = *wxBLACK;
...@@ -151,11 +152,11 @@ void KicadSVGFileDCImpl::Init (const wxString &filename, int Width, int Height, ...@@ -151,11 +152,11 @@ void KicadSVGFileDCImpl::Init (const wxString &filename, int Width, int Height,
////////////////////code here ////////////////////code here
m_outfile = new wxFileOutputStream(filename); m_outfile = new wxFileOutputStream(aFilename);
m_OK = m_outfile->IsOk(); m_OK = m_outfile->IsOk();
if (m_OK) if (m_OK)
{ {
m_filename = filename; m_filename = aFilename;
m_sub_images = 0; m_sub_images = 0;
wxString s; wxString s;
s = wxT("<?xml version=\"1.0\" standalone=\"no\"?>") + wxString(wxT("\n")); s = wxT("<?xml version=\"1.0\" standalone=\"no\"?>") + wxString(wxT("\n"));
...@@ -166,9 +167,11 @@ void KicadSVGFileDCImpl::Init (const wxString &filename, int Width, int Height, ...@@ -166,9 +167,11 @@ void KicadSVGFileDCImpl::Init (const wxString &filename, int Width, int Height,
write(s); write(s);
s = wxT("<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" ") + wxString(wxT("\n")); s = wxT("<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" ") + wxString(wxT("\n"));
write(s); write(s);
s.Printf( wxT(" width=\"%scm\" height=\"%scm\" viewBox=\"0 0 %d %d \"> \n"), NumStr(float(Width)/dpi*2.54), NumStr(float(Height)/dpi*2.54), Width, Height ); s.Printf( wxT(" width=\"%scm\" height=\"%scm\" viewBox=\"%d %d %d %d \"> \n"),
NumStr(float(m_width)/m_dpi*2.54), NumStr(float(m_height)/m_dpi*2.54),
aOrigin.x, aOrigin.y, m_width, m_height );
write(s); write(s);
s = wxT("<title>SVG Picture created as ") + wxFileName(filename).GetFullName() + wxT(" </title>") + wxT("\n"); s = wxT("<title>SVG Picture created as ") + wxFileName(m_filename).GetFullName() + wxT(" </title>") + wxT("\n");
write(s); write(s);
s = wxString (wxT("<desc>Picture generated by wxSVG ")) + wxSVGVersion + wxT(" </desc>")+ wxT("\n"); s = wxString (wxT("<desc>Picture generated by wxSVG ")) + wxSVGVersion + wxT(" </desc>")+ wxT("\n");
write(s); write(s);
...@@ -738,27 +741,28 @@ wxString wxBrushString( wxColour c, int style ) ...@@ -738,27 +741,28 @@ wxString wxBrushString( wxColour c, int style )
/***********************************************************************/ /***********************************************************************/
void wxSVGFileDC::Init( wxString f, int Width, int Height, float dpi ) void wxSVGFileDC::Init( const wxString& aFilename,
wxPoint aOrigin, wxSize aSize, double aDpi )
/***********************************************************************/ /***********************************************************************/
/* set up things first wxDCBase does all this? /* set up things first wxDCBase does all this?
*/ */
{ {
m_width = Width; m_width = aSize.x;
m_height = Height; m_height = aSize.y;
m_clipping = false; m_clipping = false;
m_OK = true; m_OK = true;
m_mm_to_pix_x = dpi / 25.4; m_mm_to_pix_x = aDpi / 25.4;
m_mm_to_pix_y = dpi / 25.4; m_mm_to_pix_y = aDpi / 25.4;
m_signX = m_signY = 1; m_signX = m_signY = 1;
m_userScaleX = m_userScaleY = m_userScaleX = m_userScaleY =
m_deviceOriginX = m_deviceOriginY = 0; m_deviceOriginX = m_deviceOriginY = 0;
m_OriginX = m_OriginY = 0; m_OriginX = m_OriginY = 0;
m_logicalOriginX = m_logicalOriginY = 0; m_logicalOriginX = m_logicalOriginY = 0;
m_logicalScaleX = m_logicalScaleY = 0; m_logicalScaleX = m_logicalScaleY = 0;
m_scaleX = m_scaleY = 1.0; m_scaleX = m_scaleY = 1.0;
...@@ -780,11 +784,11 @@ void wxSVGFileDC::Init( wxString f, int Width, int Height, float dpi ) ...@@ -780,11 +784,11 @@ void wxSVGFileDC::Init( wxString f, int Width, int Height, float dpi )
////////////////////code here ////////////////////code here
m_outfile = new wxFileOutputStream( f ); m_outfile = new wxFileOutputStream( aFilename );
m_OK = m_outfile->Ok(); m_OK = m_outfile->Ok();
if( m_OK ) if( m_OK )
{ {
m_filename = f; m_filename = aFilename;
m_sub_images = 0; m_sub_images = 0;
wxString s; wxString s;
s = wxT( "<?xml version=\"1.0\" standalone=\"no\"?>" ); s = s + newline; s = wxT( "<?xml version=\"1.0\" standalone=\"no\"?>" ); s = s + newline;
...@@ -800,13 +804,14 @@ void wxSVGFileDC::Init( wxString f, int Width, int Height, float dpi ) ...@@ -800,13 +804,14 @@ void wxSVGFileDC::Init( wxString f, int Width, int Height, float dpi )
write( s ); write( s );
s.Printf( wxT( " version=\"1.1\"\n" ) ); s.Printf( wxT( " version=\"1.1\"\n" ) );
write( s ); write( s );
s.Printf( wxT( " width=\"%gin\" height=\"%gin\" viewBox=\"0 0 %d %d \"\n" ), s.Printf( wxT( " width=\"%gin\" height=\"%gin\" viewBox=\"%d %d %d %d \"\n" ),
double (Width) / dpi, double (Height) / dpi, Width, Height ); double (m_width) / aDpi, double (m_height) / aDpi,
aOrigin.x, aOrigin.y, aSize.x, aSize.y );
write( s ); write( s );
s.Printf( wxT( ">\n" ) ); s.Printf( wxT( ">\n" ) );
write( s ); write( s );
s = wxT( " <title>SVG Picture created as " ) + wxFileNameFromPath( f ) + s = wxT( " <title>SVG Picture created as " ) + wxFileNameFromPath( aFilename ) +
wxT( " </title>" ) + newline; wxT( " </title>" ) + newline;
write( s ); write( s );
s = wxString( wxT( " <desc>Picture generated by wxSVG " ) ) + wxSVGVersion + wxT( s = wxString( wxT( " <desc>Picture generated by wxSVG " ) ) + wxSVGVersion + wxT(
...@@ -818,21 +823,11 @@ void wxSVGFileDC::Init( wxString f, int Width, int Height, float dpi ) ...@@ -818,21 +823,11 @@ void wxSVGFileDC::Init( wxString f, int Width, int Height, float dpi )
} }
// constructors // constructor
wxSVGFileDC::wxSVGFileDC( wxString f ) wxSVGFileDC::wxSVGFileDC( const wxString &aFilename,
wxPoint aOrigin, wxSize aSize, double aDpi )
{ {
// quarter 640x480 screen display at 72 dpi Init( aFilename, aOrigin, aSize, aDpi);
Init( f, 320, 240, 72.0 );
}
wxSVGFileDC::wxSVGFileDC( wxString f, int Width, int Height )
{
Init( f, Width, Height, 72.0 );
}
wxSVGFileDC::wxSVGFileDC( wxString f, int Width, int Height, float dpi )
{
Init( f, Width, Height, dpi );
} }
wxSVGFileDC::~wxSVGFileDC() wxSVGFileDC::~wxSVGFileDC()
......
/* /*
* This program source code file is part of KiCad, a free EDA CAD application. * This program source code file is part of KiCad, a free EDA CAD application.
* *
* Copyright (C) 2009 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com * Copyright (C) 2009 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com
* Copyright (C) 2011 Wayne Stambaugh <stambaughw@verizon.net> * Copyright (C) 2011 Wayne Stambaugh <stambaughw@verizon.net>
* Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.txt for contributors. * Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.txt for contributors.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here: * along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license, * or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc., * or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
/** /**
* @file eeschema/dialogs/dialog_SVG_print.cpp * @file eeschema/dialogs/dialog_SVG_print.cpp
*/ */
#include <fctsys.h> #include <fctsys.h>
#include <appl_wxstruct.h> #include <appl_wxstruct.h>
#include <gr_basic.h> #include <gr_basic.h>
#include <class_drawpanel.h> #include <class_drawpanel.h>
#include <confirm.h> #include <confirm.h>
#include <gestfich.h> #include <gestfich.h>
#include <class_sch_screen.h> #include <class_sch_screen.h>
#include <wxEeschemaStruct.h> #include <wxEeschemaStruct.h>
#include <dcsvg.h> #include <dcsvg.h>
#include <base_units.h> #include <base_units.h>
#include <general.h> #include <general.h>
#include <libeditframe.h> #include <libeditframe.h>
#include <sch_sheet_path.h> #include <sch_sheet_path.h>
#include <dialog_SVG_print.h> #include <dialog_SVG_print.h>
// Keys for configuration // Keys for configuration
#define PLOTSVGMODECOLOR_KEY wxT( "PlotSVGModeColor" ) #define PLOTSVGMODECOLOR_KEY wxT( "PlotSVGModeColor" )
#define WIDTH_MAX_VALUE 100 #define WIDTH_MAX_VALUE 100
#define WIDTH_MIN_VALUE 1 #define WIDTH_MIN_VALUE 1
// Variables locales // Variables locales
static bool s_Print_Frame_Ref = true; static bool s_Print_Frame_Ref = true;
static int s_PlotBlackAndWhite = 0; static int s_PlotBlackAndWhite = 0;
/*! /*!
* DIALOG_SVG_PRINT functions * DIALOG_SVG_PRINT functions
*/ */
DIALOG_SVG_PRINT::DIALOG_SVG_PRINT( EDA_DRAW_FRAME* parent ) : DIALOG_SVG_PRINT::DIALOG_SVG_PRINT( EDA_DRAW_FRAME* parent ) :
DIALOG_SVG_PRINT_base( parent ) DIALOG_SVG_PRINT_base( parent )
{ {
m_Parent = parent; m_Parent = parent;
m_Config = wxGetApp().GetSettings(); m_Config = wxGetApp().GetSettings();
} }
void DIALOG_SVG_PRINT::OnInitDialog( wxInitDialogEvent& event ) void DIALOG_SVG_PRINT::OnInitDialog( wxInitDialogEvent& event )
{ {
SetFocus(); // Make ESC key working SetFocus(); // Make ESC key working
if( m_Config ) if( m_Config )
{ {
m_Config->Read( PLOTSVGMODECOLOR_KEY, &s_PlotBlackAndWhite ); m_Config->Read( PLOTSVGMODECOLOR_KEY, &s_PlotBlackAndWhite );
} }
m_ModeColorOption->SetSelection( s_PlotBlackAndWhite ); m_ModeColorOption->SetSelection( s_PlotBlackAndWhite );
AddUnitSymbol( *m_TextPenWidth, g_UserUnit ); AddUnitSymbol( *m_TextPenWidth, g_UserUnit );
m_DialogPenWidth->SetValue( m_DialogPenWidth->SetValue(
ReturnStringFromValue( g_UserUnit, g_DrawDefaultLineThickness ) ); ReturnStringFromValue( g_UserUnit, g_DrawDefaultLineThickness ) );
m_Print_Sheet_Ref->SetValue( s_Print_Frame_Ref ); m_Print_Sheet_Ref->SetValue( s_Print_Frame_Ref );
if( GetSizer() ) if( GetSizer() )
{ {
GetSizer()->SetSizeHints( this ); GetSizer()->SetSizeHints( this );
} }
} }
void DIALOG_SVG_PRINT::SetPenWidth() void DIALOG_SVG_PRINT::SetPenWidth()
{ {
g_DrawDefaultLineThickness = ReturnValueFromTextCtrl( *m_DialogPenWidth ); g_DrawDefaultLineThickness = ReturnValueFromTextCtrl( *m_DialogPenWidth );
if( g_DrawDefaultLineThickness > WIDTH_MAX_VALUE ) if( g_DrawDefaultLineThickness > WIDTH_MAX_VALUE )
{ {
g_DrawDefaultLineThickness = WIDTH_MAX_VALUE; g_DrawDefaultLineThickness = WIDTH_MAX_VALUE;
} }
if( g_DrawDefaultLineThickness < WIDTH_MIN_VALUE ) if( g_DrawDefaultLineThickness < WIDTH_MIN_VALUE )
{ {
g_DrawDefaultLineThickness = WIDTH_MIN_VALUE; g_DrawDefaultLineThickness = WIDTH_MIN_VALUE;
} }
m_DialogPenWidth->SetValue( m_DialogPenWidth->SetValue(
ReturnStringFromValue( g_UserUnit, g_DrawDefaultLineThickness ) ); ReturnStringFromValue( g_UserUnit, g_DrawDefaultLineThickness ) );
} }
void DIALOG_SVG_PRINT::PrintSVGDoc( bool aPrintAll, bool aPrint_Sheet_Ref ) void DIALOG_SVG_PRINT::PrintSVGDoc( bool aPrintAll, bool aPrint_Sheet_Ref )
{ {
wxString msg; wxString msg;
wxFileName fn; wxFileName fn;
SetPenWidth(); SetPenWidth();
g_DrawDefaultLineThickness = g_DrawDefaultLineThickness =
ReturnValueFromTextCtrl( *m_DialogPenWidth ); ReturnValueFromTextCtrl( *m_DialogPenWidth );
SCH_SCREEN* screen = (SCH_SCREEN*) m_Parent->GetScreen(); SCH_SCREEN* screen = (SCH_SCREEN*) m_Parent->GetScreen();
if( aPrintAll && m_Parent->IsType( SCHEMATIC_FRAME ) ) if( aPrintAll && m_Parent->IsType( SCHEMATIC_FRAME ) )
{ {
SCH_EDIT_FRAME* schframe = (SCH_EDIT_FRAME*) m_Parent; SCH_EDIT_FRAME* schframe = (SCH_EDIT_FRAME*) m_Parent;
SCH_SHEET_PATH* sheetpath; SCH_SHEET_PATH* sheetpath;
SCH_SHEET_PATH oldsheetpath = schframe->GetCurrentSheet(); SCH_SHEET_PATH oldsheetpath = schframe->GetCurrentSheet();
SCH_SCREEN* schscreen = schframe->GetScreen(); SCH_SCREEN* schscreen = schframe->GetScreen();
SCH_SHEET_LIST SheetList( NULL ); SCH_SHEET_LIST SheetList( NULL );
sheetpath = SheetList.GetFirst(); sheetpath = SheetList.GetFirst();
SCH_SHEET_PATH list; SCH_SHEET_PATH list;
for( ; ; ) for( ; ; )
{ {
if( sheetpath == NULL ) if( sheetpath == NULL )
break; break;
list.Clear(); list.Clear();
if( list.BuildSheetPathInfoFromSheetPathValue( sheetpath->Path() ) ) if( list.BuildSheetPathInfoFromSheetPathValue( sheetpath->Path() ) )
{ {
schframe->SetCurrentSheet( list ); schframe->SetCurrentSheet( list );
schframe->GetCurrentSheet().UpdateAllScreenReferences(); schframe->GetCurrentSheet().UpdateAllScreenReferences();
schframe->SetSheetNumberAndCount(); schframe->SetSheetNumberAndCount();
schscreen = schframe->GetCurrentSheet().LastScreen(); schscreen = schframe->GetCurrentSheet().LastScreen();
} }
else // Should not happen else // Should not happen
return; return;
sheetpath = SheetList.GetNext(); sheetpath = SheetList.GetNext();
fn = schframe->GetUniqueFilenameForCurrentSheet() + wxT( ".svg" ); fn = schframe->GetUniqueFilenameForCurrentSheet() + wxT( ".svg" );
bool success = DrawSVGPage( m_Parent, fn.GetFullPath(), ( SCH_SCREEN* ) schscreen, bool success = DrawSVGPage( m_Parent, fn.GetFullPath(), ( SCH_SCREEN* ) schscreen,
m_ModeColorOption->GetSelection() == 0 ? false : true, m_ModeColorOption->GetSelection() == 0 ? false : true,
aPrint_Sheet_Ref ); aPrint_Sheet_Ref );
msg = _( "Create file " ) + fn.GetFullPath(); msg = _( "Create file " ) + fn.GetFullPath();
if( !success ) if( !success )
msg += _( " error" ); msg += _( " error" );
msg += wxT( "\n" ); msg += wxT( "\n" );
m_MessagesBox->AppendText( msg ); m_MessagesBox->AppendText( msg );
} }
schframe->SetCurrentSheet( oldsheetpath ); schframe->SetCurrentSheet( oldsheetpath );
schframe->GetCurrentSheet().UpdateAllScreenReferences(); schframe->GetCurrentSheet().UpdateAllScreenReferences();
schframe->SetSheetNumberAndCount(); schframe->SetSheetNumberAndCount();
} }
else else
{ {
fn = m_FileNameCtrl->GetValue(); fn = m_FileNameCtrl->GetValue();
if( !fn.IsOk() ) if( !fn.IsOk() )
fn = screen->GetFileName(); fn = screen->GetFileName();
fn.SetExt( wxT( "svg" ) ); fn.SetExt( wxT( "svg" ) );
fn.MakeAbsolute(); fn.MakeAbsolute();
bool success = DrawSVGPage( m_Parent, fn.GetFullPath(), ( SCH_SCREEN* ) screen, bool success = DrawSVGPage( m_Parent, fn.GetFullPath(), ( SCH_SCREEN* ) screen,
m_ModeColorOption->GetSelection() == 0 ? false : true, m_ModeColorOption->GetSelection() == 0 ? false : true,
aPrint_Sheet_Ref ); aPrint_Sheet_Ref );
msg = _( "Create file " ) + fn.GetFullPath(); msg = _( "Create file " ) + fn.GetFullPath();
if( !success ) if( !success )
msg += _( " error" ); msg += _( " error" );
msg += wxT( "\n" ); msg += wxT( "\n" );
m_MessagesBox->AppendText( msg ); m_MessagesBox->AppendText( msg );
} }
} }
bool DIALOG_SVG_PRINT::DrawSVGPage( EDA_DRAW_FRAME* frame, bool DIALOG_SVG_PRINT::DrawSVGPage( EDA_DRAW_FRAME* frame,
const wxString& FullFileName, const wxString& FullFileName,
SCH_SCREEN* screen, SCH_SCREEN* screen,
bool aPrintBlackAndWhite, bool aPrintBlackAndWhite,
bool aPrint_Sheet_Ref ) bool aPrint_Sheet_Ref )
{ {
int tmpzoom; int tmpzoom;
wxPoint tmp_startvisu; wxPoint tmp_startvisu;
wxSize sheetSize; // Sheet size in internal units wxSize sheetSize; // Sheet size in internal units
wxPoint old_org; wxPoint old_org;
bool success = true; bool success = true;
tmp_startvisu = screen->m_StartVisu; tmp_startvisu = screen->m_StartVisu;
tmpzoom = screen->GetZoom(); tmpzoom = screen->GetZoom();
old_org = screen->m_DrawOrg; old_org = screen->m_DrawOrg;
screen->m_DrawOrg.x = screen->m_DrawOrg.y = 0; screen->m_DrawOrg.x = screen->m_DrawOrg.y = 0;
screen->m_StartVisu.x = screen->m_StartVisu.y = 0; screen->m_StartVisu.x = screen->m_StartVisu.y = 0;
sheetSize = screen->GetPageSettings().GetSizeIU(); // page size in 1/1000 inch, ie in internal units sheetSize = screen->GetPageSettings().GetSizeIU(); // page size in 1/1000 inch, ie in internal units
screen->SetScalingFactor( 1.0 ); screen->SetScalingFactor( 1.0 );
EDA_DRAW_PANEL* panel = frame->GetCanvas(); EDA_DRAW_PANEL* panel = frame->GetCanvas();
LOCALE_IO toggle; LOCALE_IO toggle;
float dpi = 1000.0; double dpi = 1000.0*IU_PER_MILS;
KicadSVGFileDC dc( FullFileName, sheetSize.x, sheetSize.y, dpi ); wxPoint origin;
KicadSVGFileDC dc( FullFileName, origin, sheetSize, dpi );
EDA_RECT tmp = *panel->GetClipBox();
GRResetPenAndBrush( &dc ); EDA_RECT tmp = *panel->GetClipBox();
GRForceBlackPen( aPrintBlackAndWhite ); GRResetPenAndBrush( &dc );
GRForceBlackPen( aPrintBlackAndWhite );
panel->SetClipBox( EDA_RECT( wxPoint( -0x3FFFFF0, -0x3FFFFF0 ),
wxSize( 0x7FFFFF0, 0x7FFFFF0 ) ) ); panel->SetClipBox( EDA_RECT( wxPoint( -0x3FFFFF0, -0x3FFFFF0 ),
wxSize( 0x7FFFFF0, 0x7FFFFF0 ) ) );
screen->m_IsPrinting = true;
screen->m_IsPrinting = true;
if( frame->IsType( SCHEMATIC_FRAME ) )
screen->Draw( panel, &dc, GR_COPY ); if( frame->IsType( SCHEMATIC_FRAME ) )
screen->Draw( panel, &dc, GR_COPY );
if( frame->IsType( LIBEDITOR_FRAME ) )
((LIB_EDIT_FRAME*)frame)->RedrawComponent( &dc, if( frame->IsType( LIBEDITOR_FRAME ) )
wxPoint(sheetSize.x/2, ((LIB_EDIT_FRAME*)frame)->RedrawComponent( &dc,
sheetSize.y/2) ); wxPoint(sheetSize.x/2,
sheetSize.y/2) );
if( aPrint_Sheet_Ref )
frame->TraceWorkSheet( &dc, screen, g_DrawDefaultLineThickness, if( aPrint_Sheet_Ref )
IU_PER_MILS, frame->GetScreenDesc() ); frame->TraceWorkSheet( &dc, screen, g_DrawDefaultLineThickness,
IU_PER_MILS, frame->GetScreenDesc() );
screen->m_IsPrinting = false;
panel->SetClipBox( tmp ); screen->m_IsPrinting = false;
panel->SetClipBox( tmp );
GRForceBlackPen( false );
GRForceBlackPen( false );
screen->m_StartVisu = tmp_startvisu;
screen->m_DrawOrg = old_org; screen->m_StartVisu = tmp_startvisu;
screen->SetZoom( tmpzoom ); screen->m_DrawOrg = old_org;
screen->SetZoom( tmpzoom );
return success;
} return success;
}
void DIALOG_SVG_PRINT::OnButtonPlotAllClick( wxCommandEvent& event )
{ void DIALOG_SVG_PRINT::OnButtonPlotAllClick( wxCommandEvent& event )
PrintSVGDoc( true, m_Print_Sheet_Ref->GetValue() ); {
} PrintSVGDoc( true, m_Print_Sheet_Ref->GetValue() );
}
void DIALOG_SVG_PRINT::OnButtonPlotCurrentClick( wxCommandEvent& event )
{ void DIALOG_SVG_PRINT::OnButtonPlotCurrentClick( wxCommandEvent& event )
PrintSVGDoc( false, m_Print_Sheet_Ref->GetValue() ); {
} PrintSVGDoc( false, m_Print_Sheet_Ref->GetValue() );
}
void DIALOG_SVG_PRINT::OnButtonCancelClick( wxCommandEvent& event )
{ void DIALOG_SVG_PRINT::OnButtonCancelClick( wxCommandEvent& event )
Close(); {
} Close();
}
void DIALOG_SVG_PRINT::OnCloseWindow( wxCloseEvent& event )
{ void DIALOG_SVG_PRINT::OnCloseWindow( wxCloseEvent& event )
if( m_Config ) {
{ if( m_Config )
s_PlotBlackAndWhite = m_ModeColorOption->GetSelection(); {
m_Config->Write( PLOTSVGMODECOLOR_KEY, s_PlotBlackAndWhite ); s_PlotBlackAndWhite = m_ModeColorOption->GetSelection();
} m_Config->Write( PLOTSVGMODECOLOR_KEY, s_PlotBlackAndWhite );
EndModal( 0 ); }
} EndModal( 0 );
}
/* called on radiobox color/black and white selection
*/ /* called on radiobox color/black and white selection
void DIALOG_SVG_PRINT::OnSetColorModeSelected( wxCommandEvent& event ) */
{ void DIALOG_SVG_PRINT::OnSetColorModeSelected( wxCommandEvent& event )
s_PlotBlackAndWhite = m_ModeColorOption->GetSelection(); {
} s_PlotBlackAndWhite = m_ModeColorOption->GetSelection();
}
...@@ -188,8 +188,8 @@ void DIALOG_PLOT_SCHEMATIC_DXF::CreateDXFFile( ) ...@@ -188,8 +188,8 @@ void DIALOG_PLOT_SCHEMATIC_DXF::CreateDXFFile( )
plot_offset.x = 0; plot_offset.x = 0;
plot_offset.y = 0; plot_offset.y = 0;
plotFileName = schframe->GetUniqueFilenameForCurrentSheet() + '.' plotFileName = schframe->GetUniqueFilenameForCurrentSheet() + wxT(".")
+ DXF_PLOTTER::GetDefaultFileExtension(); + DXF_PLOTTER::GetDefaultFileExtension();
PlotOneSheetDXF( plotFileName, screen, plot_offset, 1 ); PlotOneSheetDXF( plotFileName, screen, plot_offset, 1 );
......
...@@ -336,8 +336,8 @@ void DIALOG_PLOT_SCHEMATIC_HPGL::Plot_Schematic_HPGL( bool aPlotAll ) ...@@ -336,8 +336,8 @@ void DIALOG_PLOT_SCHEMATIC_HPGL::Plot_Schematic_HPGL( bool aPlotAll )
plotOffset.x = -s_Offset.x; plotOffset.x = -s_Offset.x;
plotOffset.y = -s_Offset.y; plotOffset.y = -s_Offset.y;
plotFileName = m_Parent->GetUniqueFilenameForCurrentSheet() + '.' plotFileName = m_Parent->GetUniqueFilenameForCurrentSheet() + wxT(".")
+ HPGL_PLOTTER::GetDefaultFileExtension(); + HPGL_PLOTTER::GetDefaultFileExtension();
LOCALE_IO toggle; LOCALE_IO toggle;
......
...@@ -218,8 +218,8 @@ void DIALOG_PLOT_SCHEMATIC_PDF::createPDFFile() ...@@ -218,8 +218,8 @@ void DIALOG_PLOT_SCHEMATIC_PDF::createPDFFile()
if( first_page ) { if( first_page ) {
wxString msg; wxString msg;
wxString plotFileName = m_Parent->GetUniqueFilenameForCurrentSheet() + '.' wxString plotFileName = m_Parent->GetUniqueFilenameForCurrentSheet() + wxT(".")
+ PDF_PLOTTER::GetDefaultFileExtension(); + PDF_PLOTTER::GetDefaultFileExtension();
msg.Printf( _( "Plot: %s " ), GetChars( plotFileName ) ); msg.Printf( _( "Plot: %s " ), GetChars( plotFileName ) );
m_MsgBox->AppendText( msg ); m_MsgBox->AppendText( msg );
......
...@@ -242,7 +242,7 @@ void DIALOG_PLOT_SCHEMATIC_PS::createPSFile() ...@@ -242,7 +242,7 @@ void DIALOG_PLOT_SCHEMATIC_PS::createPSFile()
plot_offset.x = 0; plot_offset.x = 0;
plot_offset.y = 0; plot_offset.y = 0;
plotFileName = m_Parent->GetUniqueFilenameForCurrentSheet() + '.' plotFileName = m_Parent->GetUniqueFilenameForCurrentSheet() + wxT(".")
+ PS_PLOTTER::GetDefaultFileExtension(); + PS_PLOTTER::GetDefaultFileExtension();
plotOneSheetPS( plotFileName, screen, plotPage, plot_offset, scale ); plotOneSheetPS( plotFileName, screen, plotPage, plot_offset, scale );
......
/* /*
* This program source code file is part of KiCad, a free EDA CAD application. * This program source code file is part of KiCad, a free EDA CAD application.
* *
* Copyright (C) 2004 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com * Copyright (C) 2012 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 2008-2011 Wayne Stambaugh <stambaughw@verizon.net> * Copyright (C) 2008-2012 Wayne Stambaugh <stambaughw@verizon.net>
* Copyright (C) 2004-2011 KiCad Developers, see change_log.txt for contributors. * Copyright (C) 2004-2012 KiCad Developers, see change_log.txt for contributors.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
/** /**
* @file getpart.cpp * @file getpart.cpp
* @brief Cod to handle get & place library component. * @brief functions to get and place library components.
*/ */
#include <fctsys.h> #include <fctsys.h>
...@@ -69,11 +69,15 @@ wxString SCH_BASE_FRAME::SelectComponentFromLibBrowser( void ) ...@@ -69,11 +69,15 @@ wxString SCH_BASE_FRAME::SelectComponentFromLibBrowser( void )
m_ViewlibFrame = new LIB_VIEW_FRAME( this, NULL, &semaphore ); m_ViewlibFrame = new LIB_VIEW_FRAME( this, NULL, &semaphore );
// Show the library viewer frame until it is closed // Show the library viewer frame until it is closed
while( semaphore.TryWait() == wxSEMA_BUSY ) // Wait for viewer closing event // and disable the current frame, until the library viewer is closed
Enable(false);
// Wait for viewer closing event:
while( semaphore.TryWait() == wxSEMA_BUSY )
{ {
wxYield(); wxYield();
wxMilliSleep( 50 ); wxMilliSleep( 50 );
} }
Enable(true);
cmpname = m_ViewlibFrame->GetSelectedComponent(); cmpname = m_ViewlibFrame->GetSelectedComponent();
m_ViewlibFrame->Destroy(); m_ViewlibFrame->Destroy();
......
...@@ -122,9 +122,6 @@ LIB_VIEW_FRAME::LIB_VIEW_FRAME( wxWindow* father, CMP_LIBRARY* Library, wxSemaph ...@@ -122,9 +122,6 @@ LIB_VIEW_FRAME::LIB_VIEW_FRAME( wxWindow* father, CMP_LIBRARY* Library, wxSemaph
m_Semaphore = semaphore; m_Semaphore = semaphore;
m_exportToEeschemaCmpName.Empty(); m_exportToEeschemaCmpName.Empty();
if( m_Semaphore )
MakeModal(true);
SetScreen( new SCH_SCREEN() ); SetScreen( new SCH_SCREEN() );
GetScreen()->m_Center = true; // Center coordinate origins on screen. GetScreen()->m_Center = true; // Center coordinate origins on screen.
LoadSettings(); LoadSettings();
...@@ -270,9 +267,8 @@ void LIB_VIEW_FRAME::OnCloseWindow( wxCloseEvent& Event ) ...@@ -270,9 +267,8 @@ void LIB_VIEW_FRAME::OnCloseWindow( wxCloseEvent& Event )
if( m_Semaphore ) if( m_Semaphore )
{ {
m_Semaphore->Post(); m_Semaphore->Post();
MakeModal(false);
// This window will be destroyed by the calling function, // This window will be destroyed by the calling function,
// to avoid side effects // if needed
} }
else else
{ {
......
...@@ -26,8 +26,8 @@ class WXDLLIMPEXP_FWD_CORE KicadSVGFileDC; ...@@ -26,8 +26,8 @@ class WXDLLIMPEXP_FWD_CORE KicadSVGFileDC;
class WXDLLIMPEXP_CORE KicadSVGFileDCImpl : public wxDCImpl class WXDLLIMPEXP_CORE KicadSVGFileDCImpl : public wxDCImpl
{ {
public: public:
KicadSVGFileDCImpl( KicadSVGFileDC *owner, const wxString &filename, KicadSVGFileDCImpl( KicadSVGFileDC *owner, const wxString &aFilename,
int width=320, int height=240, double dpi=72.0 ); wxPoint aOrigin, wxSize aSize, double aDpi );
virtual ~KicadSVGFileDCImpl(); virtual ~KicadSVGFileDCImpl();
...@@ -175,7 +175,7 @@ private: ...@@ -175,7 +175,7 @@ private:
virtual wxSize GetPPI() const; virtual wxSize GetPPI() const;
void Init (const wxString &filename, int width, int height, double dpi); void Init (const wxString &aFilename, wxPoint aOrigin, wxSize aSize, double aDpi);
void NewGraphics(); void NewGraphics();
...@@ -198,11 +198,9 @@ private: ...@@ -198,11 +198,9 @@ private:
class WXDLLIMPEXP_CORE KicadSVGFileDC : public wxDC class WXDLLIMPEXP_CORE KicadSVGFileDC : public wxDC
{ {
public: public:
KicadSVGFileDC(const wxString& filename, KicadSVGFileDC(const wxString& aFilename,
int width = 320, wxPoint aOrigin, wxSize aSize, double aDpi = 300.0)
int height = 240, : wxDC(new KicadSVGFileDCImpl(this, aFilename, aOrigin, aSize, aDpi))
double dpi = 72.0)
: wxDC(new KicadSVGFileDCImpl(this, filename, width, height, dpi))
{ {
} }
}; };
...@@ -309,7 +307,8 @@ private: ...@@ -309,7 +307,8 @@ private:
wxT( "wxSVGFILEDC::DoSetClippingRegionAsRegion Call not yet implemented" ) ); return; wxT( "wxSVGFILEDC::DoSetClippingRegionAsRegion Call not yet implemented" ) ); return;
}; };
void Init( wxString f, int Width, int Height, float dpi ); void Init( const wxString& aFilename,
wxPoint aOrigin, wxSize aSize, double aDpi );
void NewGraphics(); void NewGraphics();
...@@ -421,9 +420,8 @@ private: ...@@ -421,9 +420,8 @@ private:
public: public:
wxSVGFileDC( wxString f ); wxSVGFileDC( const wxString& aFilename,
wxSVGFileDC( wxString f, int Width, int Height ); wxPoint aOrigin, wxSize aSize, double aDpi );
wxSVGFileDC( wxString f, int Width, int Height, float dpi );
~wxSVGFileDC(); ~wxSVGFileDC();
......
///////////////////////////////////////////////////////////////////////////// /**
// Name: dialog_svg_print.cpp * @file dialog_svg_print.cpp
// Author: jean-pierre Charras */
// Modified by:
// Licence: GPL /*
///////////////////////////////////////////////////////////////////////////// * This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2012 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 2012 KiCad Developers, see change_log.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <fctsys.h> #include <fctsys.h>
#include <appl_wxstruct.h> #include <appl_wxstruct.h>
#include <common.h> #include <common.h>
#include <class_drawpanel.h> #include <class_drawpanel.h>
#include <confirm.h>
#include <gestfich.h>
#include <dcsvg.h> #include <dcsvg.h>
#include <wxBasePcbFrame.h> #include <wxBasePcbFrame.h>
#include <class_pcb_screen.h> #include <class_pcb_screen.h>
#include <macros.h>
#include <base_units.h> #include <base_units.h>
#include <pcbnew.h> #include <pcbnew.h>
...@@ -22,26 +41,23 @@ ...@@ -22,26 +41,23 @@
#include <printout_controler.h> #include <printout_controler.h>
#include <class_board.h> #include <class_board.h>
#include <class_edge_mod.h>
#include <class_mire.h>
#include <class_pcb_text.h>
#include <class_dimension.h>
#include <class_zone.h>
#include <dialog_SVG_print.h> #include <dialog_SVG_print.h>
// Keys for configuration // Keys for configuration
#define PLOTSVGMODECOLOR_KEY wxT( "PlotSVGModeColor" ) #define PLOTSVGMODECOLOR_KEY wxT( "PlotSVGModeColor" )
#define PLOTSVGPAGESIZEOPT_KEY wxT( "PlotSVGPageOpt" )
#define PLOTSVGPLOT_BRD_EDGE_KEY wxT( "PlotSVGBrdEdge" )
// reasonnable values for default pen width (in 1/10000 inch) // reasonnable values for default pen width
#define WIDTH_MAX_VALUE 500 #define WIDTH_MAX_VALUE (2 *IU_PER_MM)
#define WIDTH_MIN_VALUE 1 #define WIDTH_MIN_VALUE (0.05 *IU_PER_MM)
// Local variables: // Local variables:
static PRINT_PARAMETERS s_Parameters; static PRINT_PARAMETERS s_Parameters;
static long s_SelectedLayers = LAYER_BACK | LAYER_FRONT | static long s_SelectedLayers = LAYER_BACK | LAYER_FRONT |
SILKSCREEN_LAYER_FRONT | SILKSCREEN_LAYER_BACK; SILKSCREEN_LAYER_FRONT | SILKSCREEN_LAYER_BACK;
/*! /*!
...@@ -66,15 +82,23 @@ void DIALOG_SVG_PRINT::initDialog( ) ...@@ -66,15 +82,23 @@ void DIALOG_SVG_PRINT::initDialog( )
if( m_Config ) if( m_Config )
{ {
m_Config->Read( PLOTSVGMODECOLOR_KEY, &s_Parameters.m_Print_Black_and_White ); m_Config->Read( PLOTSVGMODECOLOR_KEY, &s_Parameters.m_Print_Black_and_White );
long ltmp;
m_Config->Read( PLOTSVGPAGESIZEOPT_KEY, &ltmp, 0 );
m_rbSvgPageSizeOpt->SetSelection( ltmp );
m_Config->Read( PLOTSVGPLOT_BRD_EDGE_KEY, &ltmp, 1 );
m_PrintBoardEdgesCtrl->SetValue(ltmp );
} }
if( s_Parameters.m_Print_Black_and_White )
m_ModeColorOption->SetSelection( 1 );
else
m_ModeColorOption->SetSelection( 0 );
s_Parameters.m_PenDefaultSize = g_DrawDefaultLineThickness; s_Parameters.m_PenDefaultSize = g_DrawDefaultLineThickness;
AddUnitSymbol( *m_TextPenWidth, g_UserUnit ); AddUnitSymbol( *m_TextPenWidth, g_UserUnit );
m_DialogPenWidth->SetValue( m_DialogDefaultPenSize->SetValue(
ReturnStringFromValue( g_UserUnit, s_Parameters.m_PenDefaultSize ) ); ReturnStringFromValue( g_UserUnit, s_Parameters.m_PenDefaultSize ) );
m_Print_Frame_Ref_Ctrl->SetValue( s_Parameters.m_Print_Sheet_Ref );
// Create layers list // Create layers list
BOARD* board = m_Parent->GetBoard(); BOARD* board = m_Parent->GetBoard();
int layer; int layer;
...@@ -135,7 +159,7 @@ void DIALOG_SVG_PRINT::initDialog( ) ...@@ -135,7 +159,7 @@ void DIALOG_SVG_PRINT::initDialog( )
void DIALOG_SVG_PRINT::SetPenWidth() void DIALOG_SVG_PRINT::SetPenWidth()
{ {
s_Parameters.m_PenDefaultSize = ReturnValueFromTextCtrl( *m_DialogPenWidth ); s_Parameters.m_PenDefaultSize = ReturnValueFromTextCtrl( *m_DialogDefaultPenSize );
if( s_Parameters.m_PenDefaultSize > WIDTH_MAX_VALUE ) if( s_Parameters.m_PenDefaultSize > WIDTH_MAX_VALUE )
{ {
...@@ -148,16 +172,17 @@ void DIALOG_SVG_PRINT::SetPenWidth() ...@@ -148,16 +172,17 @@ void DIALOG_SVG_PRINT::SetPenWidth()
} }
g_DrawDefaultLineThickness = s_Parameters.m_PenDefaultSize; g_DrawDefaultLineThickness = s_Parameters.m_PenDefaultSize;
m_DialogPenWidth->SetValue( m_DialogDefaultPenSize->SetValue(
ReturnStringFromValue( g_UserUnit, s_Parameters.m_PenDefaultSize ) ); ReturnStringFromValue( g_UserUnit, s_Parameters.m_PenDefaultSize ) );
} }
void DIALOG_SVG_PRINT::PrintSVGDoc( bool aPrintAll, bool aPrint_Frame_Ref ) void DIALOG_SVG_PRINT::PrintSVGDoc( bool aPrintAll )
{ {
wxFileName fn; wxFileName fn;
wxString msg; wxString msg;
s_Parameters.m_Print_Black_and_White = m_ModeColorOption->GetSelection();
SetPenWidth(); SetPenWidth();
PCB_SCREEN* screen = m_Parent->GetScreen(); PCB_SCREEN* screen = m_Parent->GetScreen();
...@@ -202,7 +227,7 @@ void DIALOG_SVG_PRINT::PrintSVGDoc( bool aPrintAll, bool aPrint_Frame_Ref ) ...@@ -202,7 +227,7 @@ void DIALOG_SVG_PRINT::PrintSVGDoc( bool aPrintAll, bool aPrint_Frame_Ref )
fn.SetExt( wxT( "svg" ) ); fn.SetExt( wxT( "svg" ) );
bool success = DrawPage( fn.GetFullPath(), screen, aPrint_Frame_Ref ); bool success = DrawPage( fn.GetFullPath(), screen );
msg = _( "Create file " ) + fn.GetFullPath(); msg = _( "Create file " ) + fn.GetFullPath();
if( !success ) if( !success )
msg += _( " error" ); msg += _( " error" );
...@@ -219,11 +244,8 @@ void DIALOG_SVG_PRINT::PrintSVGDoc( bool aPrintAll, bool aPrint_Frame_Ref ) ...@@ -219,11 +244,8 @@ void DIALOG_SVG_PRINT::PrintSVGDoc( bool aPrintAll, bool aPrint_Frame_Ref )
* Actual print function. * Actual print function.
*/ */
bool DIALOG_SVG_PRINT::DrawPage( const wxString& FullFileName, bool DIALOG_SVG_PRINT::DrawPage( const wxString& FullFileName,
BASE_SCREEN* screen, BASE_SCREEN* screen )
bool aPrint_Frame_Ref )
{ {
// const PAGE_INFO& pageInfo = m_Parent->GetPageSettings();
LOCALE_IO toggle; LOCALE_IO toggle;
int tmpzoom; int tmpzoom;
wxPoint tmp_startvisu; wxPoint tmp_startvisu;
...@@ -240,24 +262,23 @@ bool DIALOG_SVG_PRINT::DrawPage( const wxString& FullFileName, ...@@ -240,24 +262,23 @@ bool DIALOG_SVG_PRINT::DrawPage( const wxString& FullFileName,
screen->SetScalingFactor( 1.0 ); screen->SetScalingFactor( 1.0 );
float dpi; double dpi = IU_PER_MILS * 1000.0;
#if defined( USE_PCBNEW_NANOMETRES )
dpi = 25.4e6;
#else
dpi = 10000.0;
#endif
EDA_DRAW_PANEL* panel = m_Parent->GetCanvas(); EDA_DRAW_PANEL* panel = m_Parent->GetCanvas();
// paper pageSize is in internal units, either nanometers or deci-mils // paper pageSize is in internal units, either nanometers or deci-mils
wxSize pageSize = m_Parent->GetPageSizeIU(); EDA_RECT rect;
rect.SetSize( m_Parent->GetPageSizeIU() );
if( PageIsBoardBoundarySize() )
{
rect = m_Parent->GetBoard()->ComputeBoundingBox();
}
KicadSVGFileDC dc( FullFileName, pageSize.x, pageSize.y, dpi ); KicadSVGFileDC dc( FullFileName, rect.GetOrigin(), rect.GetSize(), dpi );
EDA_RECT tmp = *panel->GetClipBox(); EDA_RECT tmp = *panel->GetClipBox();
GRResetPenAndBrush( &dc ); GRResetPenAndBrush( &dc );
GRForceBlackPen( m_ModeColorOption->GetSelection() == 0 ? false : true ); GRForceBlackPen( s_Parameters.m_Print_Black_and_White );
s_Parameters.m_DrillShapeOpt = PRINT_PARAMETERS::FULL_DRILL_SHAPE; s_Parameters.m_DrillShapeOpt = PRINT_PARAMETERS::FULL_DRILL_SHAPE;
// Set clip box to the max size // Set clip box to the max size
...@@ -270,7 +291,7 @@ bool DIALOG_SVG_PRINT::DrawPage( const wxString& FullFileName, ...@@ -270,7 +291,7 @@ bool DIALOG_SVG_PRINT::DrawPage( const wxString& FullFileName,
int bg_color = g_DrawBgColor; int bg_color = g_DrawBgColor;
g_DrawBgColor = WHITE; g_DrawBgColor = WHITE;
if( aPrint_Frame_Ref ) if( PrintPageRef() )
m_Parent->TraceWorkSheet( &dc, screen, s_Parameters.m_PenDefaultSize, m_Parent->TraceWorkSheet( &dc, screen, s_Parameters.m_PenDefaultSize,
IU_PER_MILS, wxT( "" ) ); IU_PER_MILS, wxT( "" ) );
...@@ -292,15 +313,13 @@ bool DIALOG_SVG_PRINT::DrawPage( const wxString& FullFileName, ...@@ -292,15 +313,13 @@ bool DIALOG_SVG_PRINT::DrawPage( const wxString& FullFileName,
void DIALOG_SVG_PRINT::OnButtonPrintBoardClick( wxCommandEvent& event ) void DIALOG_SVG_PRINT::OnButtonPrintBoardClick( wxCommandEvent& event )
{ {
s_Parameters.m_Print_Sheet_Ref = m_Print_Frame_Ref_Ctrl->IsChecked(); PrintSVGDoc( true );
PrintSVGDoc( true, s_Parameters.m_Print_Sheet_Ref );
} }
void DIALOG_SVG_PRINT::OnButtonPrintSelectedClick( wxCommandEvent& event ) void DIALOG_SVG_PRINT::OnButtonPrintSelectedClick( wxCommandEvent& event )
{ {
s_Parameters.m_Print_Sheet_Ref = m_Print_Frame_Ref_Ctrl->IsChecked(); PrintSVGDoc( false );
PrintSVGDoc( false, s_Parameters.m_Print_Sheet_Ref );
} }
...@@ -317,6 +336,9 @@ void DIALOG_SVG_PRINT::OnCloseWindow( wxCloseEvent& event ) ...@@ -317,6 +336,9 @@ void DIALOG_SVG_PRINT::OnCloseWindow( wxCloseEvent& event )
if( m_Config ) if( m_Config )
{ {
m_Config->Write( PLOTSVGMODECOLOR_KEY, s_Parameters.m_Print_Black_and_White ); m_Config->Write( PLOTSVGMODECOLOR_KEY, s_Parameters.m_Print_Black_and_White );
m_Config->Write( PLOTSVGPAGESIZEOPT_KEY, m_rbSvgPageSizeOpt->GetSelection() );
m_Config->Write( PLOTSVGPLOT_BRD_EDGE_KEY, m_PrintBoardEdgesCtrl->GetValue() );
wxString layerKey; wxString layerKey;
for( int layer = 0; layer<NB_LAYERS; ++layer ) for( int layer = 0; layer<NB_LAYERS; ++layer )
{ {
...@@ -328,11 +350,3 @@ void DIALOG_SVG_PRINT::OnCloseWindow( wxCloseEvent& event ) ...@@ -328,11 +350,3 @@ void DIALOG_SVG_PRINT::OnCloseWindow( wxCloseEvent& event )
} }
EndModal( 0 ); EndModal( 0 );
} }
/* called on radiobox color/black and white selection
*/
void DIALOG_SVG_PRINT::OnSetColorModeSelected( wxCommandEvent& event )
{
s_Parameters.m_Print_Black_and_White = m_ModeColorOption->GetSelection();
}
#ifndef _DIALOG_SVG_PRINT_H_ #ifndef _DIALOG_SVG_PRINT_H_
#define _DIALOG_SVG_PRINT_H_ #define _DIALOG_SVG_PRINT_H_
#include <dialog_SVG_print_base.h> #include <dialog_SVG_print_base.h>
class BASE_SCREEN; class BASE_SCREEN;
class PCB_BASE_FRAME; class PCB_BASE_FRAME;
class wxConfig; class wxConfig;
class DIALOG_SVG_PRINT : public DIALOG_SVG_PRINT_base class DIALOG_SVG_PRINT : public DIALOG_SVG_PRINT_base
{ {
private: private:
PCB_BASE_FRAME* m_Parent; PCB_BASE_FRAME* m_Parent;
wxConfig* m_Config; wxConfig* m_Config;
long m_PrintMaskLayer; long m_PrintMaskLayer;
wxCheckBox* m_BoxSelectLayer[32]; wxCheckBox* m_BoxSelectLayer[32];
public: public:
DIALOG_SVG_PRINT( EDA_DRAW_FRAME* parent ); DIALOG_SVG_PRINT( EDA_DRAW_FRAME* parent );
~DIALOG_SVG_PRINT() {} ~DIALOG_SVG_PRINT() {}
private: private:
void OnCloseWindow( wxCloseEvent& event ); void OnCloseWindow( wxCloseEvent& event );
void initDialog( ); void initDialog( );
void OnButtonPrintSelectedClick( wxCommandEvent& event ); void OnButtonPrintSelectedClick( wxCommandEvent& event );
void OnButtonPrintBoardClick( wxCommandEvent& event ); void OnButtonPrintBoardClick( wxCommandEvent& event );
void OnButtonCancelClick( wxCommandEvent& event ); void OnButtonCancelClick( wxCommandEvent& event );
void OnSetColorModeSelected( wxCommandEvent& event ); void SetPenWidth();
void SetPenWidth(); void PrintSVGDoc( bool aPrintAll );
void PrintSVGDoc( bool aPrintAll, bool aPrint_Frame_Ref ); bool PageIsBoardBoundarySize()
bool DrawPage( const wxString& FullFileName, BASE_SCREEN* screen, bool aPrint_Frame_Ref ); {
}; return m_rbSvgPageSizeOpt->GetSelection() == 2;
}
bool PrintPageRef()
#endif // _DIALOG_SVG_PRINT_H_ {
return m_rbSvgPageSizeOpt->GetSelection() == 0;
}
bool DrawPage( const wxString& FullFileName, BASE_SCREEN* screen );
};
#endif // _DIALOG_SVG_PRINT_H_
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Jun 30 2011) // C++ code generated with wxFormBuilder (version Apr 10 2012)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO "NOT" EDIT THIS FILE! // PLEASE DO "NOT" EDIT THIS FILE!
...@@ -24,52 +24,56 @@ DIALOG_SVG_PRINT_base::DIALOG_SVG_PRINT_base( wxWindow* parent, wxWindowID id, c ...@@ -24,52 +24,56 @@ DIALOG_SVG_PRINT_base::DIALOG_SVG_PRINT_base( wxWindow* parent, wxWindowID id, c
m_CopperLayersBoxSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Copper Layers:") ), wxVERTICAL ); m_CopperLayersBoxSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Copper Layers:") ), wxVERTICAL );
sbLayersSizer->Add( m_CopperLayersBoxSizer, 1, wxEXPAND, 5 ); sbLayersSizer->Add( m_CopperLayersBoxSizer, 1, wxEXPAND, 5 );
m_TechnicalBoxSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Technical Layers:") ), wxVERTICAL ); m_TechnicalBoxSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Technical Layers:") ), wxVERTICAL );
sbLayersSizer->Add( m_TechnicalBoxSizer, 1, wxEXPAND, 5 ); sbLayersSizer->Add( m_TechnicalBoxSizer, 1, wxEXPAND, 5 );
bUpperSizer->Add( sbLayersSizer, 1, wxEXPAND, 5 ); bUpperSizer->Add( sbLayersSizer, 1, wxEXPAND, 5 );
wxStaticBoxSizer* sbOptionsSizer; wxStaticBoxSizer* sbOptionsSizer;
sbOptionsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Print SVG options:") ), wxVERTICAL ); 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 = new wxStaticText( this, wxID_ANY, _("Default pen size"), wxDefaultPosition, wxDefaultSize, 0 );
m_TextPenWidth->Wrap( -1 ); m_TextPenWidth->Wrap( -1 );
sbOptionsSizer->Add( m_TextPenWidth, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); sbOptionsSizer->Add( m_TextPenWidth, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_DialogPenWidth = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); m_DialogDefaultPenSize = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_DialogPenWidth->SetToolTip( _("Selection of the minimum pen thickness used to draw items.") ); m_DialogDefaultPenSize->SetToolTip( _("Selection of the pen size used to draw items which have no pen size speicfied.") );
sbOptionsSizer->Add( m_DialogPenWidth, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); sbOptionsSizer->Add( m_DialogDefaultPenSize, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
wxString m_ModeColorOptionChoices[] = { _("Color"), _("Black and White") }; wxString m_ModeColorOptionChoices[] = { _("Color"), _("Black and white") };
int m_ModeColorOptionNChoices = sizeof( m_ModeColorOptionChoices ) / sizeof( wxString ); 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 = new wxRadioBox( this, wxID_ANY, _("Print mode"), wxDefaultPosition, wxDefaultSize, m_ModeColorOptionNChoices, m_ModeColorOptionChoices, 1, wxRA_SPECIFY_COLS );
m_ModeColorOption->SetSelection( 0 ); m_ModeColorOption->SetSelection( 1 );
m_ModeColorOption->SetToolTip( _("Choose if you want to draw the sheet like it appears on screen,\nor in black and white mode, better to print it when using black and white printers") ); m_ModeColorOption->SetToolTip( _("Choose if you want to draw the sheet like it appears on screen,\nor in black and white mode, better to print it when using black and white printers") );
sbOptionsSizer->Add( m_ModeColorOption, 0, wxALL|wxEXPAND, 5 ); sbOptionsSizer->Add( m_ModeColorOption, 0, wxALL|wxEXPAND, 5 );
m_Print_Frame_Ref_Ctrl = new wxCheckBox( this, wxID_ANY, _("Print Frame Ref"), wxDefaultPosition, wxDefaultSize, 0 ); wxString m_rbSvgPageSizeOptChoices[] = { _("Full page with frame ref"), _("Current page size"), _("Board area only") };
m_Print_Frame_Ref_Ctrl->SetValue(true); int m_rbSvgPageSizeOptNChoices = sizeof( m_rbSvgPageSizeOptChoices ) / sizeof( wxString );
m_Print_Frame_Ref_Ctrl->SetToolTip( _("Print (or not) the Frame references.") ); m_rbSvgPageSizeOpt = new wxRadioBox( this, wxID_ANY, _("SVG Page Size"), wxDefaultPosition, wxDefaultSize, m_rbSvgPageSizeOptNChoices, m_rbSvgPageSizeOptChoices, 1, wxRA_SPECIFY_COLS );
m_rbSvgPageSizeOpt->SetSelection( 0 );
sbOptionsSizer->Add( m_Print_Frame_Ref_Ctrl, 0, wxALL, 5 ); sbOptionsSizer->Add( m_rbSvgPageSizeOpt, 0, wxALL|wxEXPAND, 5 );
m_PrintBoardEdgesCtrl = new wxCheckBox( this, wxID_ANY, _("Print Board Edges"), wxDefaultPosition, wxDefaultSize, 0 ); 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 on others layers") );
m_PrintBoardEdgesCtrl->SetToolTip( _("Print (or not) the edges layer with others layers") );
sbOptionsSizer->Add( m_PrintBoardEdgesCtrl, 0, wxALL, 5 ); sbOptionsSizer->Add( m_PrintBoardEdgesCtrl, 0, wxALL, 5 );
bUpperSizer->Add( sbOptionsSizer, 1, wxEXPAND, 5 ); bUpperSizer->Add( sbOptionsSizer, 1, wxEXPAND, 5 );
wxBoxSizer* bButtonsSizer; wxBoxSizer* bButtonsSizer;
bButtonsSizer = new wxBoxSizer( wxVERTICAL ); bButtonsSizer = new wxBoxSizer( wxVERTICAL );
m_buttonPrintSelected = new wxButton( this, wxID_PRINT_CURRENT, _("Print Selected"), wxDefaultPosition, wxDefaultSize, 0 ); m_buttonPrintSelected = new wxButton( this, wxID_PRINT_CURRENT, _("Print Selected"), wxDefaultPosition, wxDefaultSize, 0 );
m_buttonPrintSelected->SetDefault();
bButtonsSizer->Add( m_buttonPrintSelected, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); bButtonsSizer->Add( m_buttonPrintSelected, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
m_buttonBoard = new wxButton( this, wxID_PRINT_BOARD, _("Print Board"), wxDefaultPosition, wxDefaultSize, 0 ); m_buttonBoard = new wxButton( this, wxID_PRINT_BOARD, _("Print Board"), wxDefaultPosition, wxDefaultSize, 0 );
...@@ -78,8 +82,10 @@ DIALOG_SVG_PRINT_base::DIALOG_SVG_PRINT_base( wxWindow* parent, wxWindowID id, c ...@@ -78,8 +82,10 @@ DIALOG_SVG_PRINT_base::DIALOG_SVG_PRINT_base( wxWindow* parent, wxWindowID id, c
m_buttonQuit = new wxButton( this, wxID_CANCEL, _("Quit"), wxDefaultPosition, wxDefaultSize, 0 ); m_buttonQuit = new wxButton( this, wxID_CANCEL, _("Quit"), wxDefaultPosition, wxDefaultSize, 0 );
bButtonsSizer->Add( m_buttonQuit, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); bButtonsSizer->Add( m_buttonQuit, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
bUpperSizer->Add( bButtonsSizer, 0, wxALIGN_CENTER_VERTICAL, 5 ); bUpperSizer->Add( bButtonsSizer, 0, wxALIGN_CENTER_VERTICAL, 5 );
bMainSizer->Add( bUpperSizer, 0, wxEXPAND, 5 ); bMainSizer->Add( bUpperSizer, 0, wxEXPAND, 5 );
m_staticText1 = new wxStaticText( this, wxID_ANY, _("Filename:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText1 = new wxStaticText( this, wxID_ANY, _("Filename:"), wxDefaultPosition, wxDefaultSize, 0 );
...@@ -101,12 +107,12 @@ DIALOG_SVG_PRINT_base::DIALOG_SVG_PRINT_base( wxWindow* parent, wxWindowID id, c ...@@ -101,12 +107,12 @@ DIALOG_SVG_PRINT_base::DIALOG_SVG_PRINT_base( wxWindow* parent, wxWindowID id, c
bMainSizer->Add( m_MessagesBox, 1, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); bMainSizer->Add( m_MessagesBox, 1, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
this->SetSizer( bMainSizer ); this->SetSizer( bMainSizer );
this->Layout(); this->Layout();
// Connect Events // Connect Events
this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_SVG_PRINT_base::OnCloseWindow ) ); this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_SVG_PRINT_base::OnCloseWindow ) );
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_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_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 ); m_buttonQuit->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SVG_PRINT_base::OnButtonCancelClick ), NULL, this );
...@@ -116,7 +122,6 @@ DIALOG_SVG_PRINT_base::~DIALOG_SVG_PRINT_base() ...@@ -116,7 +122,6 @@ DIALOG_SVG_PRINT_base::~DIALOG_SVG_PRINT_base()
{ {
// Disconnect Events // Disconnect Events
this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_SVG_PRINT_base::OnCloseWindow ) ); this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_SVG_PRINT_base::OnCloseWindow ) );
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_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_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 ); m_buttonQuit->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SVG_PRINT_base::OnButtonCancelClick ), NULL, this );
......
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<wxFormBuilder_Project> <wxFormBuilder_Project>
<FileVersion major="1" minor="10" /> <FileVersion major="1" minor="11" />
<object class="Project" expanded="1"> <object class="Project" expanded="1">
<property name="class_decoration"></property> <property name="class_decoration"></property>
<property name="code_generation">C++</property> <property name="code_generation">C++</property>
<property name="disconnect_events">1</property> <property name="disconnect_events">1</property>
<property name="disconnect_mode">source_name</property> <property name="disconnect_mode">source_name</property>
<property name="disconnect_php_events">0</property>
<property name="disconnect_python_events">0</property> <property name="disconnect_python_events">0</property>
<property name="embedded_files_path">res</property> <property name="embedded_files_path">res</property>
<property name="encoding">UTF-8</property> <property name="encoding">UTF-8</property>
...@@ -19,66 +20,33 @@ ...@@ -19,66 +20,33 @@
<property name="path">.</property> <property name="path">.</property>
<property name="precompiled_header"></property> <property name="precompiled_header"></property>
<property name="relative_path">1</property> <property name="relative_path">1</property>
<property name="skip_php_events">1</property>
<property name="skip_python_events">1</property> <property name="skip_python_events">1</property>
<property name="use_enum">1</property> <property name="use_enum">1</property>
<property name="use_microsoft_bom">0</property> <property name="use_microsoft_bom">0</property>
<object class="Dialog" expanded="1"> <object class="Dialog" expanded="1">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_managed">0</property> <property name="aui_managed">0</property>
<property name="aui_name"></property> <property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
<property name="best_size"></property>
<property name="bg"></property> <property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center"></property> <property name="center"></property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="context_help"></property> <property name="context_help"></property>
<property name="context_menu">1</property> <property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property> <property name="enabled">1</property>
<property name="event_handler">impl_virtual</property> <property name="event_handler">impl_virtual</property>
<property name="extra_style"></property> <property name="extra_style"></property>
<property name="fg"></property> <property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property> <property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="layer"></property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size">-1,350</property> <property name="minimum_size">-1,350</property>
<property name="moveable">1</property>
<property name="name">DIALOG_SVG_PRINT_base</property> <property name="name">DIALOG_SVG_PRINT_base</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="pin_button">1</property>
<property name="pos"></property> <property name="pos"></property>
<property name="position"></property>
<property name="resize">Resizable</property>
<property name="row"></property>
<property name="show">1</property>
<property name="size">507,375</property> <property name="size">507,375</property>
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property> <property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
<property name="subclass"></property> <property name="subclass"></property>
<property name="title">Create SVG file</property> <property name="title">Create SVG file</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property> <property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property> <property name="window_extra_style"></property>
<property name="window_name"></property> <property name="window_name"></property>
<property name="window_style"></property> <property name="window_style"></property>
...@@ -195,7 +163,10 @@ ...@@ -195,7 +163,10 @@
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
<property name="RightDockable">1</property> <property name="RightDockable">1</property>
<property name="TopDockable">1</property> <property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property> <property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property> <property name="best_size"></property>
<property name="bg"></property> <property name="bg"></property>
<property name="caption"></property> <property name="caption"></property>
...@@ -215,8 +186,7 @@ ...@@ -215,8 +186,7 @@
<property name="gripper">0</property> <property name="gripper">0</property>
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="label">Pen width mini</property> <property name="label">Default pen size</property>
<property name="layer"></property>
<property name="max_size"></property> <property name="max_size"></property>
<property name="maximize_button">0</property> <property name="maximize_button">0</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
...@@ -231,19 +201,13 @@ ...@@ -231,19 +201,13 @@
<property name="permission">protected</property> <property name="permission">protected</property>
<property name="pin_button">1</property> <property name="pin_button">1</property>
<property name="pos"></property> <property name="pos"></property>
<property name="position"></property>
<property name="resize">Resizable</property> <property name="resize">Resizable</property>
<property name="row"></property>
<property name="show">1</property> <property name="show">1</property>
<property name="size"></property> <property name="size"></property>
<property name="style"></property> <property name="style"></property>
<property name="subclass"></property> <property name="subclass"></property>
<property name="toolbar_pane">0</property> <property name="toolbar_pane">0</property>
<property name="tooltip"></property> <property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property> <property name="window_extra_style"></property>
<property name="window_name"></property> <property name="window_name"></property>
<property name="window_style"></property> <property name="window_style"></property>
...@@ -282,7 +246,10 @@ ...@@ -282,7 +246,10 @@
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
<property name="RightDockable">1</property> <property name="RightDockable">1</property>
<property name="TopDockable">1</property> <property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property> <property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property> <property name="best_size"></property>
<property name="bg"></property> <property name="bg"></property>
<property name="caption"></property> <property name="caption"></property>
...@@ -302,7 +269,6 @@ ...@@ -302,7 +269,6 @@
<property name="gripper">0</property> <property name="gripper">0</property>
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="layer"></property>
<property name="max_size"></property> <property name="max_size"></property>
<property name="maximize_button">0</property> <property name="maximize_button">0</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
...@@ -311,22 +277,20 @@ ...@@ -311,22 +277,20 @@
<property name="minimize_button">0</property> <property name="minimize_button">0</property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="moveable">1</property> <property name="moveable">1</property>
<property name="name">m_DialogPenWidth</property> <property name="name">m_DialogDefaultPenSize</property>
<property name="pane_border">1</property> <property name="pane_border">1</property>
<property name="pane_position"></property> <property name="pane_position"></property>
<property name="pane_size"></property> <property name="pane_size"></property>
<property name="permission">protected</property> <property name="permission">protected</property>
<property name="pin_button">1</property> <property name="pin_button">1</property>
<property name="pos"></property> <property name="pos"></property>
<property name="position"></property>
<property name="resize">Resizable</property> <property name="resize">Resizable</property>
<property name="row"></property>
<property name="show">1</property> <property name="show">1</property>
<property name="size"></property> <property name="size"></property>
<property name="style"></property> <property name="style"></property>
<property name="subclass"></property> <property name="subclass"></property>
<property name="toolbar_pane">0</property> <property name="toolbar_pane">0</property>
<property name="tooltip">Selection of the minimum pen thickness used to draw items.</property> <property name="tooltip">Selection of the pen size used to draw items which have no pen size speicfied.</property>
<property name="validator_data_type"></property> <property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property> <property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property> <property name="validator_type">wxDefaultValidator</property>
...@@ -373,13 +337,16 @@ ...@@ -373,13 +337,16 @@
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
<property name="RightDockable">1</property> <property name="RightDockable">1</property>
<property name="TopDockable">1</property> <property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property> <property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property> <property name="best_size"></property>
<property name="bg"></property> <property name="bg"></property>
<property name="caption"></property> <property name="caption"></property>
<property name="caption_visible">1</property> <property name="caption_visible">1</property>
<property name="center_pane">0</property> <property name="center_pane">0</property>
<property name="choices">&quot;Color&quot; &quot;Black and White&quot;</property> <property name="choices">&quot;Color&quot; &quot;Black and white&quot;</property>
<property name="close_button">1</property> <property name="close_button">1</property>
<property name="context_help"></property> <property name="context_help"></property>
<property name="context_menu">1</property> <property name="context_menu">1</property>
...@@ -395,7 +362,6 @@ ...@@ -395,7 +362,6 @@
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="label">Print mode</property> <property name="label">Print mode</property>
<property name="layer"></property>
<property name="majorDimension">1</property> <property name="majorDimension">1</property>
<property name="max_size"></property> <property name="max_size"></property>
<property name="maximize_button">0</property> <property name="maximize_button">0</property>
...@@ -411,10 +377,8 @@ ...@@ -411,10 +377,8 @@
<property name="permission">protected</property> <property name="permission">protected</property>
<property name="pin_button">1</property> <property name="pin_button">1</property>
<property name="pos"></property> <property name="pos"></property>
<property name="position"></property>
<property name="resize">Resizable</property> <property name="resize">Resizable</property>
<property name="row"></property> <property name="selection">1</property>
<property name="selection">0</property>
<property name="show">1</property> <property name="show">1</property>
<property name="size"></property> <property name="size"></property>
<property name="style">wxRA_SPECIFY_COLS</property> <property name="style">wxRA_SPECIFY_COLS</property>
...@@ -445,7 +409,7 @@ ...@@ -445,7 +409,7 @@
<event name="OnMouseEvents"></event> <event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event> <event name="OnMouseWheel"></event>
<event name="OnPaint"></event> <event name="OnPaint"></event>
<event name="OnRadioBox">OnSetColorModeSelected</event> <event name="OnRadioBox"></event>
<event name="OnRightDClick"></event> <event name="OnRightDClick"></event>
<event name="OnRightDown"></event> <event name="OnRightDown"></event>
<event name="OnRightUp"></event> <event name="OnRightUp"></event>
...@@ -456,20 +420,23 @@ ...@@ -456,20 +420,23 @@
</object> </object>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALL</property> <property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxCheckBox" expanded="1"> <object class="wxRadioBox" expanded="1">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
<property name="RightDockable">1</property> <property name="RightDockable">1</property>
<property name="TopDockable">1</property> <property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property> <property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property> <property name="best_size"></property>
<property name="bg"></property> <property name="bg"></property>
<property name="caption"></property> <property name="caption"></property>
<property name="caption_visible">1</property> <property name="caption_visible">1</property>
<property name="center_pane">0</property> <property name="center_pane">0</property>
<property name="checked">1</property> <property name="choices">&quot;Full page with frame ref&quot; &quot;Current page size&quot; &quot;Board area only&quot;</property>
<property name="close_button">1</property> <property name="close_button">1</property>
<property name="context_help"></property> <property name="context_help"></property>
<property name="context_menu">1</property> <property name="context_menu">1</property>
...@@ -484,8 +451,8 @@ ...@@ -484,8 +451,8 @@
<property name="gripper">0</property> <property name="gripper">0</property>
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="label">Print Frame Ref</property> <property name="label">SVG Page Size</property>
<property name="layer"></property> <property name="majorDimension">1</property>
<property name="max_size"></property> <property name="max_size"></property>
<property name="maximize_button">0</property> <property name="maximize_button">0</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
...@@ -493,22 +460,21 @@ ...@@ -493,22 +460,21 @@
<property name="minimize_button">0</property> <property name="minimize_button">0</property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="moveable">1</property> <property name="moveable">1</property>
<property name="name">m_Print_Frame_Ref_Ctrl</property> <property name="name">m_rbSvgPageSizeOpt</property>
<property name="pane_border">1</property> <property name="pane_border">1</property>
<property name="pane_position"></property> <property name="pane_position"></property>
<property name="pane_size"></property> <property name="pane_size"></property>
<property name="permission">protected</property> <property name="permission">protected</property>
<property name="pin_button">1</property> <property name="pin_button">1</property>
<property name="pos"></property> <property name="pos"></property>
<property name="position"></property>
<property name="resize">Resizable</property> <property name="resize">Resizable</property>
<property name="row"></property> <property name="selection">0</property>
<property name="show">1</property> <property name="show">1</property>
<property name="size"></property> <property name="size"></property>
<property name="style"></property> <property name="style">wxRA_SPECIFY_COLS</property>
<property name="subclass"></property> <property name="subclass"></property>
<property name="toolbar_pane">0</property> <property name="toolbar_pane">0</property>
<property name="tooltip">Print (or not) the Frame references.</property> <property name="tooltip"></property>
<property name="validator_data_type"></property> <property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property> <property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property> <property name="validator_type">wxDefaultValidator</property>
...@@ -517,7 +483,6 @@ ...@@ -517,7 +483,6 @@
<property name="window_name"></property> <property name="window_name"></property>
<property name="window_style"></property> <property name="window_style"></property>
<event name="OnChar"></event> <event name="OnChar"></event>
<event name="OnCheckBox"></event>
<event name="OnEnterWindow"></event> <event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event> <event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event> <event name="OnKeyDown"></event>
...@@ -534,6 +499,7 @@ ...@@ -534,6 +499,7 @@
<event name="OnMouseEvents"></event> <event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event> <event name="OnMouseWheel"></event>
<event name="OnPaint"></event> <event name="OnPaint"></event>
<event name="OnRadioBox"></event>
<event name="OnRightDClick"></event> <event name="OnRightDClick"></event>
<event name="OnRightDown"></event> <event name="OnRightDown"></event>
<event name="OnRightUp"></event> <event name="OnRightUp"></event>
...@@ -551,13 +517,16 @@ ...@@ -551,13 +517,16 @@
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
<property name="RightDockable">1</property> <property name="RightDockable">1</property>
<property name="TopDockable">1</property> <property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property> <property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property> <property name="best_size"></property>
<property name="bg"></property> <property name="bg"></property>
<property name="caption"></property> <property name="caption"></property>
<property name="caption_visible">1</property> <property name="caption_visible">1</property>
<property name="center_pane">0</property> <property name="center_pane">0</property>
<property name="checked">1</property> <property name="checked">0</property>
<property name="close_button">1</property> <property name="close_button">1</property>
<property name="context_help"></property> <property name="context_help"></property>
<property name="context_menu">1</property> <property name="context_menu">1</property>
...@@ -572,8 +541,7 @@ ...@@ -572,8 +541,7 @@
<property name="gripper">0</property> <property name="gripper">0</property>
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="label">Print Board Edges</property> <property name="label">Print board edges</property>
<property name="layer"></property>
<property name="max_size"></property> <property name="max_size"></property>
<property name="maximize_button">0</property> <property name="maximize_button">0</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
...@@ -588,15 +556,13 @@ ...@@ -588,15 +556,13 @@
<property name="permission">protected</property> <property name="permission">protected</property>
<property name="pin_button">1</property> <property name="pin_button">1</property>
<property name="pos"></property> <property name="pos"></property>
<property name="position"></property>
<property name="resize">Resizable</property> <property name="resize">Resizable</property>
<property name="row"></property>
<property name="show">1</property> <property name="show">1</property>
<property name="size"></property> <property name="size"></property>
<property name="style"></property> <property name="style"></property>
<property name="subclass"></property> <property name="subclass"></property>
<property name="toolbar_pane">0</property> <property name="toolbar_pane">0</property>
<property name="tooltip">Print (or not) the edges layer with others layers</property> <property name="tooltip">Print (or not) the edges layer on others layers</property>
<property name="validator_data_type"></property> <property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property> <property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property> <property name="validator_type">wxDefaultValidator</property>
...@@ -650,7 +616,10 @@ ...@@ -650,7 +616,10 @@
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
<property name="RightDockable">1</property> <property name="RightDockable">1</property>
<property name="TopDockable">1</property> <property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property> <property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property> <property name="best_size"></property>
<property name="bg"></property> <property name="bg"></property>
<property name="caption"></property> <property name="caption"></property>
...@@ -659,7 +628,7 @@ ...@@ -659,7 +628,7 @@
<property name="close_button">1</property> <property name="close_button">1</property>
<property name="context_help"></property> <property name="context_help"></property>
<property name="context_menu">1</property> <property name="context_menu">1</property>
<property name="default">0</property> <property name="default">1</property>
<property name="default_pane">0</property> <property name="default_pane">0</property>
<property name="dock">Dock</property> <property name="dock">Dock</property>
<property name="dock_fixed">0</property> <property name="dock_fixed">0</property>
...@@ -672,7 +641,6 @@ ...@@ -672,7 +641,6 @@
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_PRINT_CURRENT</property> <property name="id">wxID_PRINT_CURRENT</property>
<property name="label">Print Selected</property> <property name="label">Print Selected</property>
<property name="layer"></property>
<property name="max_size"></property> <property name="max_size"></property>
<property name="maximize_button">0</property> <property name="maximize_button">0</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
...@@ -687,9 +655,7 @@ ...@@ -687,9 +655,7 @@
<property name="permission">protected</property> <property name="permission">protected</property>
<property name="pin_button">1</property> <property name="pin_button">1</property>
<property name="pos"></property> <property name="pos"></property>
<property name="position"></property>
<property name="resize">Resizable</property> <property name="resize">Resizable</property>
<property name="row"></property>
<property name="show">1</property> <property name="show">1</property>
<property name="size"></property> <property name="size"></property>
<property name="style"></property> <property name="style"></property>
...@@ -738,7 +704,10 @@ ...@@ -738,7 +704,10 @@
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
<property name="RightDockable">1</property> <property name="RightDockable">1</property>
<property name="TopDockable">1</property> <property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property> <property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property> <property name="best_size"></property>
<property name="bg"></property> <property name="bg"></property>
<property name="caption"></property> <property name="caption"></property>
...@@ -760,7 +729,6 @@ ...@@ -760,7 +729,6 @@
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_PRINT_BOARD</property> <property name="id">wxID_PRINT_BOARD</property>
<property name="label">Print Board</property> <property name="label">Print Board</property>
<property name="layer"></property>
<property name="max_size"></property> <property name="max_size"></property>
<property name="maximize_button">0</property> <property name="maximize_button">0</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
...@@ -775,9 +743,7 @@ ...@@ -775,9 +743,7 @@
<property name="permission">protected</property> <property name="permission">protected</property>
<property name="pin_button">1</property> <property name="pin_button">1</property>
<property name="pos"></property> <property name="pos"></property>
<property name="position"></property>
<property name="resize">Resizable</property> <property name="resize">Resizable</property>
<property name="row"></property>
<property name="show">1</property> <property name="show">1</property>
<property name="size"></property> <property name="size"></property>
<property name="style"></property> <property name="style"></property>
...@@ -826,7 +792,10 @@ ...@@ -826,7 +792,10 @@
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
<property name="RightDockable">1</property> <property name="RightDockable">1</property>
<property name="TopDockable">1</property> <property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property> <property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property> <property name="best_size"></property>
<property name="bg"></property> <property name="bg"></property>
<property name="caption"></property> <property name="caption"></property>
...@@ -848,7 +817,6 @@ ...@@ -848,7 +817,6 @@
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_CANCEL</property> <property name="id">wxID_CANCEL</property>
<property name="label">Quit</property> <property name="label">Quit</property>
<property name="layer"></property>
<property name="max_size"></property> <property name="max_size"></property>
<property name="maximize_button">0</property> <property name="maximize_button">0</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
...@@ -863,9 +831,7 @@ ...@@ -863,9 +831,7 @@
<property name="permission">protected</property> <property name="permission">protected</property>
<property name="pin_button">1</property> <property name="pin_button">1</property>
<property name="pos"></property> <property name="pos"></property>
<property name="position"></property>
<property name="resize">Resizable</property> <property name="resize">Resizable</property>
<property name="row"></property>
<property name="show">1</property> <property name="show">1</property>
<property name="size"></property> <property name="size"></property>
<property name="style"></property> <property name="style"></property>
...@@ -918,7 +884,10 @@ ...@@ -918,7 +884,10 @@
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
<property name="RightDockable">1</property> <property name="RightDockable">1</property>
<property name="TopDockable">1</property> <property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property> <property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property> <property name="best_size"></property>
<property name="bg"></property> <property name="bg"></property>
<property name="caption"></property> <property name="caption"></property>
...@@ -939,7 +908,6 @@ ...@@ -939,7 +908,6 @@
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="label">Filename:</property> <property name="label">Filename:</property>
<property name="layer"></property>
<property name="max_size"></property> <property name="max_size"></property>
<property name="maximize_button">0</property> <property name="maximize_button">0</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
...@@ -954,19 +922,13 @@ ...@@ -954,19 +922,13 @@
<property name="permission">protected</property> <property name="permission">protected</property>
<property name="pin_button">1</property> <property name="pin_button">1</property>
<property name="pos"></property> <property name="pos"></property>
<property name="position"></property>
<property name="resize">Resizable</property> <property name="resize">Resizable</property>
<property name="row"></property>
<property name="show">1</property> <property name="show">1</property>
<property name="size"></property> <property name="size"></property>
<property name="style"></property> <property name="style"></property>
<property name="subclass"></property> <property name="subclass"></property>
<property name="toolbar_pane">0</property> <property name="toolbar_pane">0</property>
<property name="tooltip"></property> <property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property> <property name="window_extra_style"></property>
<property name="window_name"></property> <property name="window_name"></property>
<property name="window_style"></property> <property name="window_style"></property>
...@@ -1005,7 +967,10 @@ ...@@ -1005,7 +967,10 @@
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
<property name="RightDockable">1</property> <property name="RightDockable">1</property>
<property name="TopDockable">1</property> <property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property> <property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property> <property name="best_size"></property>
<property name="bg"></property> <property name="bg"></property>
<property name="caption"></property> <property name="caption"></property>
...@@ -1025,7 +990,6 @@ ...@@ -1025,7 +990,6 @@
<property name="gripper">0</property> <property name="gripper">0</property>
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="layer"></property>
<property name="max_size"></property> <property name="max_size"></property>
<property name="maximize_button">0</property> <property name="maximize_button">0</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
...@@ -1041,9 +1005,7 @@ ...@@ -1041,9 +1005,7 @@
<property name="permission">protected</property> <property name="permission">protected</property>
<property name="pin_button">1</property> <property name="pin_button">1</property>
<property name="pos"></property> <property name="pos"></property>
<property name="position"></property>
<property name="resize">Resizable</property> <property name="resize">Resizable</property>
<property name="row"></property>
<property name="show">1</property> <property name="show">1</property>
<property name="size"></property> <property name="size"></property>
<property name="style"></property> <property name="style"></property>
...@@ -1096,7 +1058,10 @@ ...@@ -1096,7 +1058,10 @@
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
<property name="RightDockable">1</property> <property name="RightDockable">1</property>
<property name="TopDockable">1</property> <property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property> <property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property> <property name="best_size"></property>
<property name="bg"></property> <property name="bg"></property>
<property name="caption"></property> <property name="caption"></property>
...@@ -1117,7 +1082,6 @@ ...@@ -1117,7 +1082,6 @@
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="label">Messages:</property> <property name="label">Messages:</property>
<property name="layer"></property>
<property name="max_size"></property> <property name="max_size"></property>
<property name="maximize_button">0</property> <property name="maximize_button">0</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
...@@ -1132,19 +1096,13 @@ ...@@ -1132,19 +1096,13 @@
<property name="permission">protected</property> <property name="permission">protected</property>
<property name="pin_button">1</property> <property name="pin_button">1</property>
<property name="pos"></property> <property name="pos"></property>
<property name="position"></property>
<property name="resize">Resizable</property> <property name="resize">Resizable</property>
<property name="row"></property>
<property name="show">1</property> <property name="show">1</property>
<property name="size"></property> <property name="size"></property>
<property name="style"></property> <property name="style"></property>
<property name="subclass"></property> <property name="subclass"></property>
<property name="toolbar_pane">0</property> <property name="toolbar_pane">0</property>
<property name="tooltip"></property> <property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property> <property name="window_extra_style"></property>
<property name="window_name"></property> <property name="window_name"></property>
<property name="window_style"></property> <property name="window_style"></property>
...@@ -1183,7 +1141,10 @@ ...@@ -1183,7 +1141,10 @@
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
<property name="RightDockable">1</property> <property name="RightDockable">1</property>
<property name="TopDockable">1</property> <property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property> <property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property> <property name="best_size"></property>
<property name="bg"></property> <property name="bg"></property>
<property name="caption"></property> <property name="caption"></property>
...@@ -1203,7 +1164,6 @@ ...@@ -1203,7 +1164,6 @@
<property name="gripper">0</property> <property name="gripper">0</property>
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="layer"></property>
<property name="max_size"></property> <property name="max_size"></property>
<property name="maximize_button">0</property> <property name="maximize_button">0</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
...@@ -1219,9 +1179,7 @@ ...@@ -1219,9 +1179,7 @@
<property name="permission">protected</property> <property name="permission">protected</property>
<property name="pin_button">1</property> <property name="pin_button">1</property>
<property name="pos"></property> <property name="pos"></property>
<property name="position"></property>
<property name="resize">Resizable</property> <property name="resize">Resizable</property>
<property name="row"></property>
<property name="show">1</property> <property name="show">1</property>
<property name="size"></property> <property name="size"></property>
<property name="style">wxTE_MULTILINE</property> <property name="style">wxTE_MULTILINE</property>
......
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Jun 30 2011) // C++ code generated with wxFormBuilder (version Apr 10 2012)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO "NOT" EDIT THIS FILE! // PLEASE DO "NOT" EDIT THIS FILE!
...@@ -38,15 +38,15 @@ class DIALOG_SVG_PRINT_base : public wxDialog ...@@ -38,15 +38,15 @@ class DIALOG_SVG_PRINT_base : public wxDialog
enum enum
{ {
wxID_PRINT_CURRENT = 1000, wxID_PRINT_CURRENT = 1000,
wxID_PRINT_BOARD, wxID_PRINT_BOARD
}; };
wxStaticBoxSizer* m_CopperLayersBoxSizer; wxStaticBoxSizer* m_CopperLayersBoxSizer;
wxStaticBoxSizer* m_TechnicalBoxSizer; wxStaticBoxSizer* m_TechnicalBoxSizer;
wxStaticText* m_TextPenWidth; wxStaticText* m_TextPenWidth;
wxTextCtrl* m_DialogPenWidth; wxTextCtrl* m_DialogDefaultPenSize;
wxRadioBox* m_ModeColorOption; wxRadioBox* m_ModeColorOption;
wxCheckBox* m_Print_Frame_Ref_Ctrl; wxRadioBox* m_rbSvgPageSizeOpt;
wxCheckBox* m_PrintBoardEdgesCtrl; wxCheckBox* m_PrintBoardEdgesCtrl;
wxButton* m_buttonPrintSelected; wxButton* m_buttonPrintSelected;
wxButton* m_buttonBoard; wxButton* m_buttonBoard;
...@@ -58,7 +58,6 @@ class DIALOG_SVG_PRINT_base : public wxDialog ...@@ -58,7 +58,6 @@ class DIALOG_SVG_PRINT_base : public wxDialog
// Virtual event handlers, overide them in your derived class // Virtual event handlers, overide them in your derived class
virtual void OnCloseWindow( wxCloseEvent& event ) { event.Skip(); } virtual void OnCloseWindow( wxCloseEvent& event ) { event.Skip(); }
virtual void OnSetColorModeSelected( wxCommandEvent& event ) { event.Skip(); }
virtual void OnButtonPrintSelectedClick( wxCommandEvent& event ) { event.Skip(); } virtual void OnButtonPrintSelectedClick( wxCommandEvent& event ) { event.Skip(); }
virtual void OnButtonPrintBoardClick( wxCommandEvent& event ) { event.Skip(); } virtual void OnButtonPrintBoardClick( wxCommandEvent& event ) { event.Skip(); }
virtual void OnButtonCancelClick( wxCommandEvent& event ) { event.Skip(); } virtual void OnButtonCancelClick( wxCommandEvent& event ) { event.Skip(); }
......
...@@ -180,6 +180,8 @@ FOOTPRINT_EDIT_FRAME::FOOTPRINT_EDIT_FRAME( PCB_EDIT_FRAME* aParent, ...@@ -180,6 +180,8 @@ FOOTPRINT_EDIT_FRAME::FOOTPRINT_EDIT_FRAME( PCB_EDIT_FRAME* aParent,
GetScreen()->SetCurItem( NULL ); GetScreen()->SetCurItem( NULL );
LoadSettings(); LoadSettings();
GetBoard()->SetVisibleAlls();
GetScreen()->AddGrid( m_UserGridSize, m_UserGridUnit, ID_POPUP_GRID_USER ); GetScreen()->AddGrid( m_UserGridSize, m_UserGridUnit, ID_POPUP_GRID_USER );
GetScreen()->SetGrid( ID_POPUP_GRID_LEVEL_1000 + m_LastGridSizeId ); GetScreen()->SetGrid( ID_POPUP_GRID_LEVEL_1000 + m_LastGridSizeId );
......
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