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)
IMPLEMENT_ABSTRACT_CLASS(KicadSVGFileDCImpl, wxDC)
KicadSVGFileDCImpl::KicadSVGFileDCImpl( KicadSVGFileDC *owner, const wxString &filename,
int width, int height, double dpi ) :
KicadSVGFileDCImpl::KicadSVGFileDCImpl( KicadSVGFileDC *owner, const wxString &aFilename,
wxPoint aOrigin, wxSize aSize, double aDpi ) :
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_height = Height;
m_width = aSize.x;
m_height = aSize.y;
m_dpi = dpi;
m_dpi = aDpi;
m_OK = true;
m_mm_to_pix_x = dpi/25.4;
m_mm_to_pix_y = dpi/25.4;
m_mm_to_pix_x = m_dpi/25.4;
m_mm_to_pix_y = m_dpi/25.4;
m_backgroundBrush = *wxTRANSPARENT_BRUSH;
m_textForegroundColour = *wxBLACK;
......@@ -151,11 +152,11 @@ void KicadSVGFileDCImpl::Init (const wxString &filename, int Width, int Height,
////////////////////code here
m_outfile = new wxFileOutputStream(filename);
m_outfile = new wxFileOutputStream(aFilename);
m_OK = m_outfile->IsOk();
if (m_OK)
{
m_filename = filename;
m_filename = aFilename;
m_sub_images = 0;
wxString s;
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,
write(s);
s = wxT("<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" ") + wxString(wxT("\n"));
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);
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);
s = wxString (wxT("<desc>Picture generated by wxSVG ")) + wxSVGVersion + wxT(" </desc>")+ wxT("\n");
write(s);
......@@ -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?
*/
{
m_width = Width;
m_height = Height;
m_width = aSize.x;
m_height = aSize.y;
m_clipping = false;
m_OK = true;
m_mm_to_pix_x = dpi / 25.4;
m_mm_to_pix_y = dpi / 25.4;
m_mm_to_pix_x = aDpi / 25.4;
m_mm_to_pix_y = aDpi / 25.4;
m_signX = m_signY = 1;
m_userScaleX = m_userScaleY =
m_deviceOriginX = m_deviceOriginY = 0;
m_OriginX = m_OriginY = 0;
m_OriginX = m_OriginY = 0;
m_logicalOriginX = m_logicalOriginY = 0;
m_logicalScaleX = m_logicalScaleY = 0;
m_scaleX = m_scaleY = 1.0;
......@@ -780,11 +784,11 @@ void wxSVGFileDC::Init( wxString f, int Width, int Height, float dpi )
////////////////////code here
m_outfile = new wxFileOutputStream( f );
m_outfile = new wxFileOutputStream( aFilename );
m_OK = m_outfile->Ok();
if( m_OK )
{
m_filename = f;
m_filename = aFilename;
m_sub_images = 0;
wxString s;
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 )
write( s );
s.Printf( wxT( " version=\"1.1\"\n" ) );
write( s );
s.Printf( wxT( " width=\"%gin\" height=\"%gin\" viewBox=\"0 0 %d %d \"\n" ),
double (Width) / dpi, double (Height) / dpi, Width, Height );
s.Printf( wxT( " width=\"%gin\" height=\"%gin\" viewBox=\"%d %d %d %d \"\n" ),
double (m_width) / aDpi, double (m_height) / aDpi,
aOrigin.x, aOrigin.y, aSize.x, aSize.y );
write( s );
s.Printf( wxT( ">\n" ) );
write( s );
s = wxT( " <title>SVG Picture created as " ) + wxFileNameFromPath( f ) +
s = wxT( " <title>SVG Picture created as " ) + wxFileNameFromPath( aFilename ) +
wxT( " </title>" ) + newline;
write( s );
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 )
}
// constructors
wxSVGFileDC::wxSVGFileDC( wxString f )
// constructor
wxSVGFileDC::wxSVGFileDC( const wxString &aFilename,
wxPoint aOrigin, wxSize aSize, double aDpi )
{
// quarter 640x480 screen display at 72 dpi
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 );
Init( aFilename, aOrigin, aSize, aDpi);
}
wxSVGFileDC::~wxSVGFileDC()
......
/*
* 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) 2011 Wayne Stambaugh <stambaughw@verizon.net>
* Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.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
*/
/**
* @file eeschema/dialogs/dialog_SVG_print.cpp
*/
#include <fctsys.h>
#include <appl_wxstruct.h>
#include <gr_basic.h>
#include <class_drawpanel.h>
#include <confirm.h>
#include <gestfich.h>
#include <class_sch_screen.h>
#include <wxEeschemaStruct.h>
#include <dcsvg.h>
#include <base_units.h>
#include <general.h>
#include <libeditframe.h>
#include <sch_sheet_path.h>
#include <dialog_SVG_print.h>
// Keys for configuration
#define PLOTSVGMODECOLOR_KEY wxT( "PlotSVGModeColor" )
#define WIDTH_MAX_VALUE 100
#define WIDTH_MIN_VALUE 1
// Variables locales
static bool s_Print_Frame_Ref = true;
static int s_PlotBlackAndWhite = 0;
/*!
* DIALOG_SVG_PRINT functions
*/
DIALOG_SVG_PRINT::DIALOG_SVG_PRINT( EDA_DRAW_FRAME* parent ) :
DIALOG_SVG_PRINT_base( parent )
{
m_Parent = parent;
m_Config = wxGetApp().GetSettings();
}
void DIALOG_SVG_PRINT::OnInitDialog( wxInitDialogEvent& event )
{
SetFocus(); // Make ESC key working
if( m_Config )
{
m_Config->Read( PLOTSVGMODECOLOR_KEY, &s_PlotBlackAndWhite );
}
m_ModeColorOption->SetSelection( s_PlotBlackAndWhite );
AddUnitSymbol( *m_TextPenWidth, g_UserUnit );
m_DialogPenWidth->SetValue(
ReturnStringFromValue( g_UserUnit, g_DrawDefaultLineThickness ) );
m_Print_Sheet_Ref->SetValue( s_Print_Frame_Ref );
if( GetSizer() )
{
GetSizer()->SetSizeHints( this );
}
}
void DIALOG_SVG_PRINT::SetPenWidth()
{
g_DrawDefaultLineThickness = ReturnValueFromTextCtrl( *m_DialogPenWidth );
if( g_DrawDefaultLineThickness > WIDTH_MAX_VALUE )
{
g_DrawDefaultLineThickness = WIDTH_MAX_VALUE;
}
if( g_DrawDefaultLineThickness < WIDTH_MIN_VALUE )
{
g_DrawDefaultLineThickness = WIDTH_MIN_VALUE;
}
m_DialogPenWidth->SetValue(
ReturnStringFromValue( g_UserUnit, g_DrawDefaultLineThickness ) );
}
void DIALOG_SVG_PRINT::PrintSVGDoc( bool aPrintAll, bool aPrint_Sheet_Ref )
{
wxString msg;
wxFileName fn;
SetPenWidth();
g_DrawDefaultLineThickness =
ReturnValueFromTextCtrl( *m_DialogPenWidth );
SCH_SCREEN* screen = (SCH_SCREEN*) m_Parent->GetScreen();
if( aPrintAll && m_Parent->IsType( SCHEMATIC_FRAME ) )
{
SCH_EDIT_FRAME* schframe = (SCH_EDIT_FRAME*) m_Parent;
SCH_SHEET_PATH* sheetpath;
SCH_SHEET_PATH oldsheetpath = schframe->GetCurrentSheet();
SCH_SCREEN* schscreen = schframe->GetScreen();
SCH_SHEET_LIST SheetList( NULL );
sheetpath = SheetList.GetFirst();
SCH_SHEET_PATH list;
for( ; ; )
{
if( sheetpath == NULL )
break;
list.Clear();
if( list.BuildSheetPathInfoFromSheetPathValue( sheetpath->Path() ) )
{
schframe->SetCurrentSheet( list );
schframe->GetCurrentSheet().UpdateAllScreenReferences();
schframe->SetSheetNumberAndCount();
schscreen = schframe->GetCurrentSheet().LastScreen();
}
else // Should not happen
return;
sheetpath = SheetList.GetNext();
fn = schframe->GetUniqueFilenameForCurrentSheet() + wxT( ".svg" );
bool success = DrawSVGPage( m_Parent, fn.GetFullPath(), ( SCH_SCREEN* ) schscreen,
m_ModeColorOption->GetSelection() == 0 ? false : true,
aPrint_Sheet_Ref );
msg = _( "Create file " ) + fn.GetFullPath();
if( !success )
msg += _( " error" );
msg += wxT( "\n" );
m_MessagesBox->AppendText( msg );
}
schframe->SetCurrentSheet( oldsheetpath );
schframe->GetCurrentSheet().UpdateAllScreenReferences();
schframe->SetSheetNumberAndCount();
}
else
{
fn = m_FileNameCtrl->GetValue();
if( !fn.IsOk() )
fn = screen->GetFileName();
fn.SetExt( wxT( "svg" ) );
fn.MakeAbsolute();
bool success = DrawSVGPage( m_Parent, fn.GetFullPath(), ( SCH_SCREEN* ) screen,
m_ModeColorOption->GetSelection() == 0 ? false : true,
aPrint_Sheet_Ref );
msg = _( "Create file " ) + fn.GetFullPath();
if( !success )
msg += _( " error" );
msg += wxT( "\n" );
m_MessagesBox->AppendText( msg );
}
}
bool DIALOG_SVG_PRINT::DrawSVGPage( EDA_DRAW_FRAME* frame,
const wxString& FullFileName,
SCH_SCREEN* screen,
bool aPrintBlackAndWhite,
bool aPrint_Sheet_Ref )
{
int tmpzoom;
wxPoint tmp_startvisu;
wxSize sheetSize; // Sheet size in internal units
wxPoint old_org;
bool success = true;
tmp_startvisu = screen->m_StartVisu;
tmpzoom = screen->GetZoom();
old_org = screen->m_DrawOrg;
screen->m_DrawOrg.x = screen->m_DrawOrg.y = 0;
screen->m_StartVisu.x = screen->m_StartVisu.y = 0;
sheetSize = screen->GetPageSettings().GetSizeIU(); // page size in 1/1000 inch, ie in internal units
screen->SetScalingFactor( 1.0 );
EDA_DRAW_PANEL* panel = frame->GetCanvas();
LOCALE_IO toggle;
float dpi = 1000.0;
KicadSVGFileDC dc( FullFileName, sheetSize.x, sheetSize.y, dpi );
EDA_RECT tmp = *panel->GetClipBox();
GRResetPenAndBrush( &dc );
GRForceBlackPen( aPrintBlackAndWhite );
panel->SetClipBox( EDA_RECT( wxPoint( -0x3FFFFF0, -0x3FFFFF0 ),
wxSize( 0x7FFFFF0, 0x7FFFFF0 ) ) );
screen->m_IsPrinting = true;
if( frame->IsType( SCHEMATIC_FRAME ) )
screen->Draw( panel, &dc, GR_COPY );
if( frame->IsType( LIBEDITOR_FRAME ) )
((LIB_EDIT_FRAME*)frame)->RedrawComponent( &dc,
wxPoint(sheetSize.x/2,
sheetSize.y/2) );
if( aPrint_Sheet_Ref )
frame->TraceWorkSheet( &dc, screen, g_DrawDefaultLineThickness,
IU_PER_MILS, frame->GetScreenDesc() );
screen->m_IsPrinting = false;
panel->SetClipBox( tmp );
GRForceBlackPen( false );
screen->m_StartVisu = tmp_startvisu;
screen->m_DrawOrg = old_org;
screen->SetZoom( tmpzoom );
return success;
}
void DIALOG_SVG_PRINT::OnButtonPlotAllClick( wxCommandEvent& event )
{
PrintSVGDoc( true, m_Print_Sheet_Ref->GetValue() );
}
void DIALOG_SVG_PRINT::OnButtonPlotCurrentClick( wxCommandEvent& event )
{
PrintSVGDoc( false, m_Print_Sheet_Ref->GetValue() );
}
void DIALOG_SVG_PRINT::OnButtonCancelClick( wxCommandEvent& event )
{
Close();
}
void DIALOG_SVG_PRINT::OnCloseWindow( wxCloseEvent& event )
{
if( m_Config )
{
s_PlotBlackAndWhite = m_ModeColorOption->GetSelection();
m_Config->Write( PLOTSVGMODECOLOR_KEY, s_PlotBlackAndWhite );
}
EndModal( 0 );
}
/* called on radiobox color/black and white selection
*/
void DIALOG_SVG_PRINT::OnSetColorModeSelected( wxCommandEvent& event )
{
s_PlotBlackAndWhite = m_ModeColorOption->GetSelection();
}
/*
* 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) 2011 Wayne Stambaugh <stambaughw@verizon.net>
* Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.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
*/
/**
* @file eeschema/dialogs/dialog_SVG_print.cpp
*/
#include <fctsys.h>
#include <appl_wxstruct.h>
#include <gr_basic.h>
#include <class_drawpanel.h>
#include <confirm.h>
#include <gestfich.h>
#include <class_sch_screen.h>
#include <wxEeschemaStruct.h>
#include <dcsvg.h>
#include <base_units.h>
#include <general.h>
#include <libeditframe.h>
#include <sch_sheet_path.h>
#include <dialog_SVG_print.h>
// Keys for configuration
#define PLOTSVGMODECOLOR_KEY wxT( "PlotSVGModeColor" )
#define WIDTH_MAX_VALUE 100
#define WIDTH_MIN_VALUE 1
// Variables locales
static bool s_Print_Frame_Ref = true;
static int s_PlotBlackAndWhite = 0;
/*!
* DIALOG_SVG_PRINT functions
*/
DIALOG_SVG_PRINT::DIALOG_SVG_PRINT( EDA_DRAW_FRAME* parent ) :
DIALOG_SVG_PRINT_base( parent )
{
m_Parent = parent;
m_Config = wxGetApp().GetSettings();
}
void DIALOG_SVG_PRINT::OnInitDialog( wxInitDialogEvent& event )
{
SetFocus(); // Make ESC key working
if( m_Config )
{
m_Config->Read( PLOTSVGMODECOLOR_KEY, &s_PlotBlackAndWhite );
}
m_ModeColorOption->SetSelection( s_PlotBlackAndWhite );
AddUnitSymbol( *m_TextPenWidth, g_UserUnit );
m_DialogPenWidth->SetValue(
ReturnStringFromValue( g_UserUnit, g_DrawDefaultLineThickness ) );
m_Print_Sheet_Ref->SetValue( s_Print_Frame_Ref );
if( GetSizer() )
{
GetSizer()->SetSizeHints( this );
}
}
void DIALOG_SVG_PRINT::SetPenWidth()
{
g_DrawDefaultLineThickness = ReturnValueFromTextCtrl( *m_DialogPenWidth );
if( g_DrawDefaultLineThickness > WIDTH_MAX_VALUE )
{
g_DrawDefaultLineThickness = WIDTH_MAX_VALUE;
}
if( g_DrawDefaultLineThickness < WIDTH_MIN_VALUE )
{
g_DrawDefaultLineThickness = WIDTH_MIN_VALUE;
}
m_DialogPenWidth->SetValue(
ReturnStringFromValue( g_UserUnit, g_DrawDefaultLineThickness ) );
}
void DIALOG_SVG_PRINT::PrintSVGDoc( bool aPrintAll, bool aPrint_Sheet_Ref )
{
wxString msg;
wxFileName fn;
SetPenWidth();
g_DrawDefaultLineThickness =
ReturnValueFromTextCtrl( *m_DialogPenWidth );
SCH_SCREEN* screen = (SCH_SCREEN*) m_Parent->GetScreen();
if( aPrintAll && m_Parent->IsType( SCHEMATIC_FRAME ) )
{
SCH_EDIT_FRAME* schframe = (SCH_EDIT_FRAME*) m_Parent;
SCH_SHEET_PATH* sheetpath;
SCH_SHEET_PATH oldsheetpath = schframe->GetCurrentSheet();
SCH_SCREEN* schscreen = schframe->GetScreen();
SCH_SHEET_LIST SheetList( NULL );
sheetpath = SheetList.GetFirst();
SCH_SHEET_PATH list;
for( ; ; )
{
if( sheetpath == NULL )
break;
list.Clear();
if( list.BuildSheetPathInfoFromSheetPathValue( sheetpath->Path() ) )
{
schframe->SetCurrentSheet( list );
schframe->GetCurrentSheet().UpdateAllScreenReferences();
schframe->SetSheetNumberAndCount();
schscreen = schframe->GetCurrentSheet().LastScreen();
}
else // Should not happen
return;
sheetpath = SheetList.GetNext();
fn = schframe->GetUniqueFilenameForCurrentSheet() + wxT( ".svg" );
bool success = DrawSVGPage( m_Parent, fn.GetFullPath(), ( SCH_SCREEN* ) schscreen,
m_ModeColorOption->GetSelection() == 0 ? false : true,
aPrint_Sheet_Ref );
msg = _( "Create file " ) + fn.GetFullPath();
if( !success )
msg += _( " error" );
msg += wxT( "\n" );
m_MessagesBox->AppendText( msg );
}
schframe->SetCurrentSheet( oldsheetpath );
schframe->GetCurrentSheet().UpdateAllScreenReferences();
schframe->SetSheetNumberAndCount();
}
else
{
fn = m_FileNameCtrl->GetValue();
if( !fn.IsOk() )
fn = screen->GetFileName();
fn.SetExt( wxT( "svg" ) );
fn.MakeAbsolute();
bool success = DrawSVGPage( m_Parent, fn.GetFullPath(), ( SCH_SCREEN* ) screen,
m_ModeColorOption->GetSelection() == 0 ? false : true,
aPrint_Sheet_Ref );
msg = _( "Create file " ) + fn.GetFullPath();
if( !success )
msg += _( " error" );
msg += wxT( "\n" );
m_MessagesBox->AppendText( msg );
}
}
bool DIALOG_SVG_PRINT::DrawSVGPage( EDA_DRAW_FRAME* frame,
const wxString& FullFileName,
SCH_SCREEN* screen,
bool aPrintBlackAndWhite,
bool aPrint_Sheet_Ref )
{
int tmpzoom;
wxPoint tmp_startvisu;
wxSize sheetSize; // Sheet size in internal units
wxPoint old_org;
bool success = true;
tmp_startvisu = screen->m_StartVisu;
tmpzoom = screen->GetZoom();
old_org = screen->m_DrawOrg;
screen->m_DrawOrg.x = screen->m_DrawOrg.y = 0;
screen->m_StartVisu.x = screen->m_StartVisu.y = 0;
sheetSize = screen->GetPageSettings().GetSizeIU(); // page size in 1/1000 inch, ie in internal units
screen->SetScalingFactor( 1.0 );
EDA_DRAW_PANEL* panel = frame->GetCanvas();
LOCALE_IO toggle;
double dpi = 1000.0*IU_PER_MILS;
wxPoint origin;
KicadSVGFileDC dc( FullFileName, origin, sheetSize, dpi );
EDA_RECT tmp = *panel->GetClipBox();
GRResetPenAndBrush( &dc );
GRForceBlackPen( aPrintBlackAndWhite );
panel->SetClipBox( EDA_RECT( wxPoint( -0x3FFFFF0, -0x3FFFFF0 ),
wxSize( 0x7FFFFF0, 0x7FFFFF0 ) ) );
screen->m_IsPrinting = true;
if( frame->IsType( SCHEMATIC_FRAME ) )
screen->Draw( panel, &dc, GR_COPY );
if( frame->IsType( LIBEDITOR_FRAME ) )
((LIB_EDIT_FRAME*)frame)->RedrawComponent( &dc,
wxPoint(sheetSize.x/2,
sheetSize.y/2) );
if( aPrint_Sheet_Ref )
frame->TraceWorkSheet( &dc, screen, g_DrawDefaultLineThickness,
IU_PER_MILS, frame->GetScreenDesc() );
screen->m_IsPrinting = false;
panel->SetClipBox( tmp );
GRForceBlackPen( false );
screen->m_StartVisu = tmp_startvisu;
screen->m_DrawOrg = old_org;
screen->SetZoom( tmpzoom );
return success;
}
void DIALOG_SVG_PRINT::OnButtonPlotAllClick( wxCommandEvent& event )
{
PrintSVGDoc( true, m_Print_Sheet_Ref->GetValue() );
}
void DIALOG_SVG_PRINT::OnButtonPlotCurrentClick( wxCommandEvent& event )
{
PrintSVGDoc( false, m_Print_Sheet_Ref->GetValue() );
}
void DIALOG_SVG_PRINT::OnButtonCancelClick( wxCommandEvent& event )
{
Close();
}
void DIALOG_SVG_PRINT::OnCloseWindow( wxCloseEvent& event )
{
if( m_Config )
{
s_PlotBlackAndWhite = m_ModeColorOption->GetSelection();
m_Config->Write( PLOTSVGMODECOLOR_KEY, s_PlotBlackAndWhite );
}
EndModal( 0 );
}
/* called on radiobox color/black and white selection
*/
void DIALOG_SVG_PRINT::OnSetColorModeSelected( wxCommandEvent& event )
{
s_PlotBlackAndWhite = m_ModeColorOption->GetSelection();
}
......@@ -188,8 +188,8 @@ void DIALOG_PLOT_SCHEMATIC_DXF::CreateDXFFile( )
plot_offset.x = 0;
plot_offset.y = 0;
plotFileName = schframe->GetUniqueFilenameForCurrentSheet() + '.'
+ DXF_PLOTTER::GetDefaultFileExtension();
plotFileName = schframe->GetUniqueFilenameForCurrentSheet() + wxT(".")
+ DXF_PLOTTER::GetDefaultFileExtension();
PlotOneSheetDXF( plotFileName, screen, plot_offset, 1 );
......
......@@ -336,8 +336,8 @@ void DIALOG_PLOT_SCHEMATIC_HPGL::Plot_Schematic_HPGL( bool aPlotAll )
plotOffset.x = -s_Offset.x;
plotOffset.y = -s_Offset.y;
plotFileName = m_Parent->GetUniqueFilenameForCurrentSheet() + '.'
+ HPGL_PLOTTER::GetDefaultFileExtension();
plotFileName = m_Parent->GetUniqueFilenameForCurrentSheet() + wxT(".")
+ HPGL_PLOTTER::GetDefaultFileExtension();
LOCALE_IO toggle;
......
......@@ -218,8 +218,8 @@ void DIALOG_PLOT_SCHEMATIC_PDF::createPDFFile()
if( first_page ) {
wxString msg;
wxString plotFileName = m_Parent->GetUniqueFilenameForCurrentSheet() + '.'
+ PDF_PLOTTER::GetDefaultFileExtension();
wxString plotFileName = m_Parent->GetUniqueFilenameForCurrentSheet() + wxT(".")
+ PDF_PLOTTER::GetDefaultFileExtension();
msg.Printf( _( "Plot: %s " ), GetChars( plotFileName ) );
m_MsgBox->AppendText( msg );
......
......@@ -242,7 +242,7 @@ void DIALOG_PLOT_SCHEMATIC_PS::createPSFile()
plot_offset.x = 0;
plot_offset.y = 0;
plotFileName = m_Parent->GetUniqueFilenameForCurrentSheet() + '.'
plotFileName = m_Parent->GetUniqueFilenameForCurrentSheet() + wxT(".")
+ PS_PLOTTER::GetDefaultFileExtension();
plotOneSheetPS( plotFileName, screen, plotPage, plot_offset, scale );
......
/*
* 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) 2008-2011 Wayne Stambaugh <stambaughw@verizon.net>
* Copyright (C) 2004-2011 KiCad Developers, see change_log.txt for contributors.
* Copyright (C) 2012 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 2008-2012 Wayne Stambaugh <stambaughw@verizon.net>
* Copyright (C) 2004-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
......@@ -25,7 +25,7 @@
/**
* @file getpart.cpp
* @brief Cod to handle get & place library component.
* @brief functions to get and place library components.
*/
#include <fctsys.h>
......@@ -69,11 +69,15 @@ wxString SCH_BASE_FRAME::SelectComponentFromLibBrowser( void )
m_ViewlibFrame = new LIB_VIEW_FRAME( this, NULL, &semaphore );
// 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();
wxMilliSleep( 50 );
}
Enable(true);
cmpname = m_ViewlibFrame->GetSelectedComponent();
m_ViewlibFrame->Destroy();
......
......@@ -122,9 +122,6 @@ LIB_VIEW_FRAME::LIB_VIEW_FRAME( wxWindow* father, CMP_LIBRARY* Library, wxSemaph
m_Semaphore = semaphore;
m_exportToEeschemaCmpName.Empty();
if( m_Semaphore )
MakeModal(true);
SetScreen( new SCH_SCREEN() );
GetScreen()->m_Center = true; // Center coordinate origins on screen.
LoadSettings();
......@@ -270,9 +267,8 @@ void LIB_VIEW_FRAME::OnCloseWindow( wxCloseEvent& Event )
if( m_Semaphore )
{
m_Semaphore->Post();
MakeModal(false);
// This window will be destroyed by the calling function,
// to avoid side effects
// if needed
}
else
{
......
......@@ -26,8 +26,8 @@ class WXDLLIMPEXP_FWD_CORE KicadSVGFileDC;
class WXDLLIMPEXP_CORE KicadSVGFileDCImpl : public wxDCImpl
{
public:
KicadSVGFileDCImpl( KicadSVGFileDC *owner, const wxString &filename,
int width=320, int height=240, double dpi=72.0 );
KicadSVGFileDCImpl( KicadSVGFileDC *owner, const wxString &aFilename,
wxPoint aOrigin, wxSize aSize, double aDpi );
virtual ~KicadSVGFileDCImpl();
......@@ -175,7 +175,7 @@ private:
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();
......@@ -198,11 +198,9 @@ private:
class WXDLLIMPEXP_CORE KicadSVGFileDC : public wxDC
{
public:
KicadSVGFileDC(const wxString& filename,
int width = 320,
int height = 240,
double dpi = 72.0)
: wxDC(new KicadSVGFileDCImpl(this, filename, width, height, dpi))
KicadSVGFileDC(const wxString& aFilename,
wxPoint aOrigin, wxSize aSize, double aDpi = 300.0)
: wxDC(new KicadSVGFileDCImpl(this, aFilename, aOrigin, aSize, aDpi))
{
}
};
......@@ -309,7 +307,8 @@ private:
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();
......@@ -421,9 +420,8 @@ private:
public:
wxSVGFileDC( wxString f );
wxSVGFileDC( wxString f, int Width, int Height );
wxSVGFileDC( wxString f, int Width, int Height, float dpi );
wxSVGFileDC( const wxString& aFilename,
wxPoint aOrigin, wxSize aSize, double aDpi );
~wxSVGFileDC();
......
/////////////////////////////////////////////////////////////////////////////
// Name: dialog_svg_print.cpp
// Author: jean-pierre Charras
// Modified by:
// Licence: GPL
/////////////////////////////////////////////////////////////////////////////
/**
* @file dialog_svg_print.cpp
*/
/*
* 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 <appl_wxstruct.h>
#include <common.h>
#include <class_drawpanel.h>
#include <confirm.h>
#include <gestfich.h>
#include <dcsvg.h>
#include <wxBasePcbFrame.h>
#include <class_pcb_screen.h>
#include <macros.h>
#include <base_units.h>
#include <pcbnew.h>
......@@ -22,26 +41,23 @@
#include <printout_controler.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>
// Keys for configuration
#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)
#define WIDTH_MAX_VALUE 500
#define WIDTH_MIN_VALUE 1
// reasonnable values for default pen width
#define WIDTH_MAX_VALUE (2 *IU_PER_MM)
#define WIDTH_MIN_VALUE (0.05 *IU_PER_MM)
// Local variables:
static PRINT_PARAMETERS s_Parameters;
static long s_SelectedLayers = LAYER_BACK | LAYER_FRONT |
SILKSCREEN_LAYER_FRONT | SILKSCREEN_LAYER_BACK;
static long s_SelectedLayers = LAYER_BACK | LAYER_FRONT |
SILKSCREEN_LAYER_FRONT | SILKSCREEN_LAYER_BACK;
/*!
......@@ -66,15 +82,23 @@ void DIALOG_SVG_PRINT::initDialog( )
if( m_Config )
{
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;
AddUnitSymbol( *m_TextPenWidth, g_UserUnit );
m_DialogPenWidth->SetValue(
m_DialogDefaultPenSize->SetValue(
ReturnStringFromValue( g_UserUnit, s_Parameters.m_PenDefaultSize ) );
m_Print_Frame_Ref_Ctrl->SetValue( s_Parameters.m_Print_Sheet_Ref );
// Create layers list
BOARD* board = m_Parent->GetBoard();
int layer;
......@@ -135,7 +159,7 @@ void DIALOG_SVG_PRINT::initDialog( )
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 )
{
......@@ -148,16 +172,17 @@ void DIALOG_SVG_PRINT::SetPenWidth()
}
g_DrawDefaultLineThickness = s_Parameters.m_PenDefaultSize;
m_DialogPenWidth->SetValue(
m_DialogDefaultPenSize->SetValue(
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;
wxString msg;
s_Parameters.m_Print_Black_and_White = m_ModeColorOption->GetSelection();
SetPenWidth();
PCB_SCREEN* screen = m_Parent->GetScreen();
......@@ -202,7 +227,7 @@ void DIALOG_SVG_PRINT::PrintSVGDoc( bool aPrintAll, bool aPrint_Frame_Ref )
fn.SetExt( wxT( "svg" ) );
bool success = DrawPage( fn.GetFullPath(), screen, aPrint_Frame_Ref );
bool success = DrawPage( fn.GetFullPath(), screen );
msg = _( "Create file " ) + fn.GetFullPath();
if( !success )
msg += _( " error" );
......@@ -219,11 +244,8 @@ void DIALOG_SVG_PRINT::PrintSVGDoc( bool aPrintAll, bool aPrint_Frame_Ref )
* Actual print function.
*/
bool DIALOG_SVG_PRINT::DrawPage( const wxString& FullFileName,
BASE_SCREEN* screen,
bool aPrint_Frame_Ref )
BASE_SCREEN* screen )
{
// const PAGE_INFO& pageInfo = m_Parent->GetPageSettings();
LOCALE_IO toggle;
int tmpzoom;
wxPoint tmp_startvisu;
......@@ -240,24 +262,23 @@ bool DIALOG_SVG_PRINT::DrawPage( const wxString& FullFileName,
screen->SetScalingFactor( 1.0 );
float dpi;
#if defined( USE_PCBNEW_NANOMETRES )
dpi = 25.4e6;
#else
dpi = 10000.0;
#endif
double dpi = IU_PER_MILS * 1000.0;
EDA_DRAW_PANEL* panel = m_Parent->GetCanvas();
// 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 );
GRForceBlackPen( m_ModeColorOption->GetSelection() == 0 ? false : true );
GRForceBlackPen( s_Parameters.m_Print_Black_and_White );
s_Parameters.m_DrillShapeOpt = PRINT_PARAMETERS::FULL_DRILL_SHAPE;
// Set clip box to the max size
......@@ -270,7 +291,7 @@ bool DIALOG_SVG_PRINT::DrawPage( const wxString& FullFileName,
int bg_color = g_DrawBgColor;
g_DrawBgColor = WHITE;
if( aPrint_Frame_Ref )
if( PrintPageRef() )
m_Parent->TraceWorkSheet( &dc, screen, s_Parameters.m_PenDefaultSize,
IU_PER_MILS, wxT( "" ) );
......@@ -292,15 +313,13 @@ bool DIALOG_SVG_PRINT::DrawPage( const wxString& FullFileName,
void DIALOG_SVG_PRINT::OnButtonPrintBoardClick( wxCommandEvent& event )
{
s_Parameters.m_Print_Sheet_Ref = m_Print_Frame_Ref_Ctrl->IsChecked();
PrintSVGDoc( true, s_Parameters.m_Print_Sheet_Ref );
PrintSVGDoc( true );
}
void DIALOG_SVG_PRINT::OnButtonPrintSelectedClick( wxCommandEvent& event )
{
s_Parameters.m_Print_Sheet_Ref = m_Print_Frame_Ref_Ctrl->IsChecked();
PrintSVGDoc( false, s_Parameters.m_Print_Sheet_Ref );
PrintSVGDoc( false );
}
......@@ -317,6 +336,9 @@ void DIALOG_SVG_PRINT::OnCloseWindow( wxCloseEvent& event )
if( m_Config )
{
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;
for( int layer = 0; layer<NB_LAYERS; ++layer )
{
......@@ -328,11 +350,3 @@ void DIALOG_SVG_PRINT::OnCloseWindow( wxCloseEvent& event )
}
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_
#define _DIALOG_SVG_PRINT_H_
#include <dialog_SVG_print_base.h>
class BASE_SCREEN;
class PCB_BASE_FRAME;
class wxConfig;
class DIALOG_SVG_PRINT : public DIALOG_SVG_PRINT_base
{
private:
PCB_BASE_FRAME* m_Parent;
wxConfig* m_Config;
long m_PrintMaskLayer;
wxCheckBox* m_BoxSelectLayer[32];
public:
DIALOG_SVG_PRINT( EDA_DRAW_FRAME* parent );
~DIALOG_SVG_PRINT() {}
private:
void OnCloseWindow( wxCloseEvent& event );
void initDialog( );
void OnButtonPrintSelectedClick( wxCommandEvent& event );
void OnButtonPrintBoardClick( wxCommandEvent& event );
void OnButtonCancelClick( wxCommandEvent& event );
void OnSetColorModeSelected( wxCommandEvent& event );
void SetPenWidth();
void PrintSVGDoc( bool aPrintAll, bool aPrint_Frame_Ref );
bool DrawPage( const wxString& FullFileName, BASE_SCREEN* screen, bool aPrint_Frame_Ref );
};
#endif // _DIALOG_SVG_PRINT_H_
#ifndef _DIALOG_SVG_PRINT_H_
#define _DIALOG_SVG_PRINT_H_
#include <dialog_SVG_print_base.h>
class BASE_SCREEN;
class PCB_BASE_FRAME;
class wxConfig;
class DIALOG_SVG_PRINT : public DIALOG_SVG_PRINT_base
{
private:
PCB_BASE_FRAME* m_Parent;
wxConfig* m_Config;
long m_PrintMaskLayer;
wxCheckBox* m_BoxSelectLayer[32];
public:
DIALOG_SVG_PRINT( EDA_DRAW_FRAME* parent );
~DIALOG_SVG_PRINT() {}
private:
void OnCloseWindow( wxCloseEvent& event );
void initDialog( );
void OnButtonPrintSelectedClick( wxCommandEvent& event );
void OnButtonPrintBoardClick( wxCommandEvent& event );
void OnButtonCancelClick( wxCommandEvent& event );
void SetPenWidth();
void PrintSVGDoc( bool aPrintAll );
bool PageIsBoardBoundarySize()
{
return m_rbSvgPageSizeOpt->GetSelection() == 2;
}
bool PrintPageRef()
{
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/
//
// PLEASE DO "NOT" EDIT THIS FILE!
......@@ -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 );
sbLayersSizer->Add( m_CopperLayersBoxSizer, 1, wxEXPAND, 5 );
m_TechnicalBoxSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Technical Layers:") ), wxVERTICAL );
sbLayersSizer->Add( m_TechnicalBoxSizer, 1, wxEXPAND, 5 );
bUpperSizer->Add( sbLayersSizer, 1, wxEXPAND, 5 );
wxStaticBoxSizer* sbOptionsSizer;
sbOptionsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Print SVG options:") ), wxVERTICAL );
m_TextPenWidth = new wxStaticText( this, wxID_ANY, _("Pen width mini"), wxDefaultPosition, wxDefaultSize, 0 );
m_TextPenWidth = new wxStaticText( this, wxID_ANY, _("Default pen size"), wxDefaultPosition, wxDefaultSize, 0 );
m_TextPenWidth->Wrap( -1 );
sbOptionsSizer->Add( m_TextPenWidth, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_DialogPenWidth = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_DialogPenWidth->SetToolTip( _("Selection of the minimum pen thickness used to draw items.") );
m_DialogDefaultPenSize = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
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 );
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") );
sbOptionsSizer->Add( m_ModeColorOption, 0, wxALL|wxEXPAND, 5 );
m_Print_Frame_Ref_Ctrl = new wxCheckBox( this, wxID_ANY, _("Print Frame Ref"), wxDefaultPosition, wxDefaultSize, 0 );
m_Print_Frame_Ref_Ctrl->SetValue(true);
m_Print_Frame_Ref_Ctrl->SetToolTip( _("Print (or not) the Frame references.") );
sbOptionsSizer->Add( m_Print_Frame_Ref_Ctrl, 0, wxALL, 5 );
wxString m_rbSvgPageSizeOptChoices[] = { _("Full page with frame ref"), _("Current page size"), _("Board area only") };
int m_rbSvgPageSizeOptNChoices = sizeof( m_rbSvgPageSizeOptChoices ) / sizeof( wxString );
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_rbSvgPageSizeOpt, 0, wxALL|wxEXPAND, 5 );
m_PrintBoardEdgesCtrl = new wxCheckBox( this, wxID_ANY, _("Print Board Edges"), wxDefaultPosition, wxDefaultSize, 0 );
m_PrintBoardEdgesCtrl->SetValue(true);
m_PrintBoardEdgesCtrl->SetToolTip( _("Print (or not) the edges layer with others layers") );
m_PrintBoardEdgesCtrl = new wxCheckBox( this, wxID_ANY, _("Print board edges"), wxDefaultPosition, wxDefaultSize, 0 );
m_PrintBoardEdgesCtrl->SetToolTip( _("Print (or not) the edges layer on others layers") );
sbOptionsSizer->Add( m_PrintBoardEdgesCtrl, 0, wxALL, 5 );
bUpperSizer->Add( sbOptionsSizer, 1, wxEXPAND, 5 );
wxBoxSizer* bButtonsSizer;
bButtonsSizer = new wxBoxSizer( wxVERTICAL );
m_buttonPrintSelected = new wxButton( this, wxID_PRINT_CURRENT, _("Print Selected"), wxDefaultPosition, wxDefaultSize, 0 );
m_buttonPrintSelected->SetDefault();
bButtonsSizer->Add( m_buttonPrintSelected, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
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
m_buttonQuit = new wxButton( this, wxID_CANCEL, _("Quit"), wxDefaultPosition, wxDefaultSize, 0 );
bButtonsSizer->Add( m_buttonQuit, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
bUpperSizer->Add( bButtonsSizer, 0, wxALIGN_CENTER_VERTICAL, 5 );
bMainSizer->Add( bUpperSizer, 0, wxEXPAND, 5 );
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
bMainSizer->Add( m_MessagesBox, 1, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
this->SetSizer( bMainSizer );
this->Layout();
// Connect Events
this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_SVG_PRINT_base::OnCloseWindow ) );
m_ModeColorOption->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_SVG_PRINT_base::OnSetColorModeSelected ), NULL, this );
m_buttonPrintSelected->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SVG_PRINT_base::OnButtonPrintSelectedClick ), NULL, this );
m_buttonBoard->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SVG_PRINT_base::OnButtonPrintBoardClick ), NULL, this );
m_buttonQuit->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SVG_PRINT_base::OnButtonCancelClick ), NULL, this );
......@@ -116,7 +122,6 @@ DIALOG_SVG_PRINT_base::~DIALOG_SVG_PRINT_base()
{
// Disconnect Events
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_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 );
......
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<wxFormBuilder_Project>
<FileVersion major="1" minor="10" />
<FileVersion major="1" minor="11" />
<object class="Project" expanded="1">
<property name="class_decoration"></property>
<property name="code_generation">C++</property>
<property name="disconnect_events">1</property>
<property name="disconnect_mode">source_name</property>
<property name="disconnect_php_events">0</property>
<property name="disconnect_python_events">0</property>
<property name="embedded_files_path">res</property>
<property name="encoding">UTF-8</property>
......@@ -19,66 +20,33 @@
<property name="path">.</property>
<property name="precompiled_header"></property>
<property name="relative_path">1</property>
<property name="skip_php_events">1</property>
<property name="skip_python_events">1</property>
<property name="use_enum">1</property>
<property name="use_microsoft_bom">0</property>
<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_name"></property>
<property name="best_size"></property>
<property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</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_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="event_handler">impl_virtual</property>
<property name="extra_style"></property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</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="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size">-1,350</property>
<property name="moveable">1</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="position"></property>
<property name="resize">Resizable</property>
<property name="row"></property>
<property name="show">1</property>
<property name="size">507,375</property>
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
<property name="subclass"></property>
<property name="title">Create SVG file</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
......@@ -195,7 +163,10 @@
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
......@@ -215,8 +186,7 @@
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Pen width mini</property>
<property name="layer"></property>
<property name="label">Default pen size</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
......@@ -231,19 +201,13 @@
<property name="permission">protected</property>
<property name="pin_button">1</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"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
......@@ -282,7 +246,10 @@
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
......@@ -302,7 +269,6 @@
<property name="gripper">0</property>
<property name="hidden">0</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>
......@@ -311,22 +277,20 @@
<property name="minimize_button">0</property>
<property name="minimum_size"></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_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</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"></property>
<property name="style"></property>
<property name="subclass"></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_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
......@@ -373,13 +337,16 @@
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</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="context_help"></property>
<property name="context_menu">1</property>
......@@ -395,7 +362,6 @@
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Print mode</property>
<property name="layer"></property>
<property name="majorDimension">1</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
......@@ -411,10 +377,8 @@
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="position"></property>
<property name="resize">Resizable</property>
<property name="row"></property>
<property name="selection">0</property>
<property name="selection">1</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style">wxRA_SPECIFY_COLS</property>
......@@ -445,7 +409,7 @@
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRadioBox">OnSetColorModeSelected</event>
<event name="OnRadioBox"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
......@@ -456,20 +420,23 @@
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxCheckBox" expanded="1">
<object class="wxRadioBox" 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_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</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="context_help"></property>
<property name="context_menu">1</property>
......@@ -484,8 +451,8 @@
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Print Frame Ref</property>
<property name="layer"></property>
<property name="label">SVG Page Size</property>
<property name="majorDimension">1</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
......@@ -493,22 +460,21 @@
<property name="minimize_button">0</property>
<property name="minimum_size"></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_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="position"></property>
<property name="resize">Resizable</property>
<property name="row"></property>
<property name="selection">0</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="style">wxRA_SPECIFY_COLS</property>
<property name="subclass"></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_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
......@@ -517,7 +483,6 @@
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnCheckBox"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
......@@ -534,6 +499,7 @@
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRadioBox"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
......@@ -551,13 +517,16 @@
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</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="context_help"></property>
<property name="context_menu">1</property>
......@@ -572,8 +541,7 @@
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Print Board Edges</property>
<property name="layer"></property>
<property name="label">Print board edges</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
......@@ -588,15 +556,13 @@
<property name="permission">protected</property>
<property name="pin_button">1</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"></property>
<property name="style"></property>
<property name="subclass"></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_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
......@@ -650,7 +616,10 @@
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
......@@ -659,7 +628,7 @@
<property name="close_button">1</property>
<property name="context_help"></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="dock">Dock</property>
<property name="dock_fixed">0</property>
......@@ -672,7 +641,6 @@
<property name="hidden">0</property>
<property name="id">wxID_PRINT_CURRENT</property>
<property name="label">Print Selected</property>
<property name="layer"></property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
......@@ -687,9 +655,7 @@
<property name="permission">protected</property>
<property name="pin_button">1</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"></property>
<property name="style"></property>
......@@ -738,7 +704,10 @@
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
......@@ -760,7 +729,6 @@
<property name="hidden">0</property>
<property name="id">wxID_PRINT_BOARD</property>
<property name="label">Print Board</property>
<property name="layer"></property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
......@@ -775,9 +743,7 @@
<property name="permission">protected</property>
<property name="pin_button">1</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"></property>
<property name="style"></property>
......@@ -826,7 +792,10 @@
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
......@@ -848,7 +817,6 @@
<property name="hidden">0</property>
<property name="id">wxID_CANCEL</property>
<property name="label">Quit</property>
<property name="layer"></property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
......@@ -863,9 +831,7 @@
<property name="permission">protected</property>
<property name="pin_button">1</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"></property>
<property name="style"></property>
......@@ -918,7 +884,10 @@
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
......@@ -939,7 +908,6 @@
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Filename:</property>
<property name="layer"></property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
......@@ -954,19 +922,13 @@
<property name="permission">protected</property>
<property name="pin_button">1</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"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
......@@ -1005,7 +967,10 @@
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
......@@ -1025,7 +990,6 @@
<property name="gripper">0</property>
<property name="hidden">0</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>
......@@ -1041,9 +1005,7 @@
<property name="permission">protected</property>
<property name="pin_button">1</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"></property>
<property name="style"></property>
......@@ -1096,7 +1058,10 @@
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
......@@ -1117,7 +1082,6 @@
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Messages:</property>
<property name="layer"></property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
......@@ -1132,19 +1096,13 @@
<property name="permission">protected</property>
<property name="pin_button">1</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"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
......@@ -1183,7 +1141,10 @@
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
......@@ -1203,7 +1164,6 @@
<property name="gripper">0</property>
<property name="hidden">0</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>
......@@ -1219,9 +1179,7 @@
<property name="permission">protected</property>
<property name="pin_button">1</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"></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/
//
// PLEASE DO "NOT" EDIT THIS FILE!
......@@ -38,15 +38,15 @@ class DIALOG_SVG_PRINT_base : public wxDialog
enum
{
wxID_PRINT_CURRENT = 1000,
wxID_PRINT_BOARD,
wxID_PRINT_BOARD
};
wxStaticBoxSizer* m_CopperLayersBoxSizer;
wxStaticBoxSizer* m_TechnicalBoxSizer;
wxStaticText* m_TextPenWidth;
wxTextCtrl* m_DialogPenWidth;
wxTextCtrl* m_DialogDefaultPenSize;
wxRadioBox* m_ModeColorOption;
wxCheckBox* m_Print_Frame_Ref_Ctrl;
wxRadioBox* m_rbSvgPageSizeOpt;
wxCheckBox* m_PrintBoardEdgesCtrl;
wxButton* m_buttonPrintSelected;
wxButton* m_buttonBoard;
......@@ -58,7 +58,6 @@ class DIALOG_SVG_PRINT_base : public wxDialog
// Virtual event handlers, overide them in your derived class
virtual void OnCloseWindow( wxCloseEvent& event ) { event.Skip(); }
virtual void OnSetColorModeSelected( wxCommandEvent& event ) { event.Skip(); }
virtual void OnButtonPrintSelectedClick( wxCommandEvent& event ) { event.Skip(); }
virtual void OnButtonPrintBoardClick( wxCommandEvent& event ) { event.Skip(); }
virtual void OnButtonCancelClick( wxCommandEvent& event ) { event.Skip(); }
......
......@@ -180,6 +180,8 @@ FOOTPRINT_EDIT_FRAME::FOOTPRINT_EDIT_FRAME( PCB_EDIT_FRAME* aParent,
GetScreen()->SetCurItem( NULL );
LoadSettings();
GetBoard()->SetVisibleAlls();
GetScreen()->AddGrid( m_UserGridSize, m_UserGridUnit, ID_POPUP_GRID_USER );
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