Added: Pcbnew print SVG format (see changelog)
This commit is contained in:
parent
30da5aff07
commit
19e5bc3b01
|
@ -5,7 +5,17 @@ Started 2007-June-11
|
|||
Please add newer entries at the top, list the date and your name with
|
||||
email address.
|
||||
|
||||
2009-Jan-19 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
|
||||
2009-Jan-11 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
|
||||
================================================================================
|
||||
++Pcbnew:
|
||||
Added: print SVG format.
|
||||
SVG print/plot function uses WRITE modeinsteed of OR mode as graphic mode.
|
||||
todo ? uses OR graphic mode with black background color (wait and see)
|
||||
++eeschema:
|
||||
Code cleanup for Print SVG format, and used wxFormBuilder in SVG print dialog
|
||||
|
||||
|
||||
2009-Jan-10 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
|
||||
================================================================================
|
||||
++Pcbnew:
|
||||
Calculations to create filled areas in a zone modified and uses 2 pass:
|
||||
|
|
|
@ -50,6 +50,8 @@ set(EESCHEMA_SRCS
|
|||
dialog_erc.cpp
|
||||
# dialog_find.cpp
|
||||
dialog_options.cpp
|
||||
dialog_SVG_print.cpp
|
||||
dialog_SVG_print_base.cpp
|
||||
edit_component_in_lib.cpp
|
||||
edit_component_in_schematic.cpp
|
||||
edit_label.cpp
|
||||
|
@ -109,7 +111,6 @@ set(EESCHEMA_SRCS
|
|||
|
||||
set(EESCHEMA_EXTRA_SRCS
|
||||
../share/setpage.cpp
|
||||
../share/svg_print.cpp
|
||||
../share/wxprint.cpp)
|
||||
|
||||
if(WIN32)
|
||||
|
|
|
@ -0,0 +1,311 @@
|
|||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// Name: dialog_svg_print.cpp
|
||||
// Author: jean-pierre Charras
|
||||
// Modified by:
|
||||
// Licence: GPL
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "fctsys.h"
|
||||
|
||||
#include "common.h"
|
||||
|
||||
#include "dialog_SVG_print_base.h"
|
||||
|
||||
#include "dcsvg.h"
|
||||
|
||||
#include "program.h"
|
||||
|
||||
// Keys for configuration
|
||||
#define PLOTSVGPENWIDTH_KEY wxT( "PlotSVGPenWidth")
|
||||
#define PLOTSVGMODECOLOR_KEY wxT( "PlotSVGModeColor" )
|
||||
|
||||
extern BASE_SCREEN* ActiveScreen;
|
||||
#define WIDTH_MAX_VALUE 100
|
||||
#define WIDTH_MIN_VALUE 1
|
||||
|
||||
// Variables locales
|
||||
static int s_SVGPenMinWidth; /* Minimum pen width (in internal units) for printing */
|
||||
|
||||
static bool s_Print_Frame_Ref = true;
|
||||
static int s_PlotBlackAndWhite = 0;
|
||||
|
||||
class DIALOG_SVG_PRINT : public DIALOG_SVG_PRINT_base
|
||||
{
|
||||
private:
|
||||
WinEDA_DrawFrame * m_Parent;
|
||||
int m_ImageXSize_mm;
|
||||
wxConfig* m_Config;
|
||||
|
||||
public:
|
||||
DIALOG_SVG_PRINT( WinEDA_DrawFrame* parent );
|
||||
~DIALOG_SVG_PRINT( ) {}
|
||||
|
||||
private:
|
||||
void OnCloseWindow( wxCloseEvent& event );
|
||||
void OnInitDialog( wxInitDialogEvent& event );
|
||||
void OnButtonPlotCurrentClick( wxCommandEvent& event );
|
||||
void OnButtonPlotAllClick( wxCommandEvent& event );
|
||||
void OnButtonCancelClick( wxCommandEvent& event );
|
||||
void OnSetColorModeSelected( wxCommandEvent& event );
|
||||
void SetPenWidth();
|
||||
void PrintSVGDoc( bool aPrintAll, bool aPrint_Sheet_Ref );
|
||||
bool DrawPage( const wxString& FullFileName, BASE_SCREEN* screen, bool aPrint_Sheet_Ref );
|
||||
};
|
||||
|
||||
/*******************************************************/
|
||||
void WinEDA_DrawFrame::SVG_Print( wxCommandEvent& event )
|
||||
/*******************************************************/
|
||||
|
||||
/* Prepare les structures de donnees de gestion de l'impression
|
||||
* et affiche la fenetre de dialogue de gestion de l'impression des feuilles
|
||||
*/
|
||||
{
|
||||
DIALOG_SVG_PRINT frame( this );
|
||||
|
||||
frame.ShowModal();
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* DIALOG_SVG_PRINT functions
|
||||
*/
|
||||
DIALOG_SVG_PRINT::DIALOG_SVG_PRINT( WinEDA_DrawFrame* parent )
|
||||
: DIALOG_SVG_PRINT_base( parent )
|
||||
{
|
||||
m_Parent = parent;
|
||||
m_Config = wxGetApp().m_EDA_Config;
|
||||
}
|
||||
|
||||
|
||||
/*************************************************************/
|
||||
void DIALOG_SVG_PRINT::OnInitDialog( wxInitDialogEvent& event )
|
||||
/*************************************************************/
|
||||
{
|
||||
SetFont( *g_DialogFont );
|
||||
SetFocus(); // Make ESC key working
|
||||
|
||||
m_ImageXSize_mm = 270;
|
||||
if( m_Config )
|
||||
{
|
||||
m_Config->Read( PLOTSVGPENWIDTH_KEY, &s_SVGPenMinWidth );
|
||||
m_Config->Read( PLOTSVGMODECOLOR_KEY, &s_PlotBlackAndWhite );
|
||||
}
|
||||
|
||||
AddUnitSymbol(* m_TextPenWidth, g_UnitMetric );
|
||||
m_DialogPenWidth->SetValue(
|
||||
ReturnStringFromValue(g_UnitMetric, s_SVGPenMinWidth, m_Parent->m_InternalUnits ) );
|
||||
m_Print_Sheet_Ref->SetValue( s_Print_Frame_Ref );
|
||||
if (GetSizer())
|
||||
{
|
||||
GetSizer()->SetSizeHints(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/********************************************/
|
||||
void DIALOG_SVG_PRINT::SetPenWidth()
|
||||
/********************************************/
|
||||
{
|
||||
s_SVGPenMinWidth = ReturnValueFromTextCtrl( *m_DialogPenWidth, m_Parent->m_InternalUnits );
|
||||
|
||||
if( s_SVGPenMinWidth > WIDTH_MAX_VALUE )
|
||||
{
|
||||
s_SVGPenMinWidth = WIDTH_MAX_VALUE;
|
||||
}
|
||||
|
||||
if( s_SVGPenMinWidth < WIDTH_MIN_VALUE )
|
||||
{
|
||||
s_SVGPenMinWidth = WIDTH_MIN_VALUE;
|
||||
}
|
||||
|
||||
m_DialogPenWidth->SetValue(
|
||||
ReturnStringFromValue(g_UnitMetric, s_SVGPenMinWidth, m_Parent->m_InternalUnits ) );
|
||||
}
|
||||
|
||||
|
||||
/***************************************************************************/
|
||||
void DIALOG_SVG_PRINT::PrintSVGDoc( bool aPrintAll, bool aPrint_Sheet_Ref )
|
||||
/***************************************************************************/
|
||||
{
|
||||
wxString msg;
|
||||
|
||||
SetPenWidth();
|
||||
|
||||
wxString FullFileName;
|
||||
BASE_SCREEN* screen = m_Parent->GetBaseScreen();
|
||||
BASE_SCREEN* oldscreen = screen;
|
||||
|
||||
if( aPrintAll && m_Parent->m_Ident == SCHEMATIC_FRAME )
|
||||
{
|
||||
WinEDA_SchematicFrame* schframe = (WinEDA_SchematicFrame*) m_Parent;
|
||||
DrawSheetPath* sheetpath, *oldsheetpath = schframe->GetSheet();
|
||||
SCH_SCREEN* schscreen = schframe->GetScreen();
|
||||
oldscreen = schscreen;
|
||||
EDA_SheetList SheetList( NULL );
|
||||
sheetpath = SheetList.GetFirst();
|
||||
DrawSheetPath list;
|
||||
|
||||
for( ; ; )
|
||||
{
|
||||
if( sheetpath == NULL )
|
||||
break;
|
||||
list.Clear();
|
||||
if( list.BuildSheetPathInfoFromSheetPathValue( sheetpath->Path() ) )
|
||||
{
|
||||
schframe->m_CurrentSheet = &list;
|
||||
schframe->m_CurrentSheet->UpdateAllScreenReferences();
|
||||
schframe->SetSheetNumberAndCount();
|
||||
schscreen = schframe->m_CurrentSheet->LastScreen();
|
||||
ActiveScreen = schscreen;
|
||||
}
|
||||
else // Should not happen
|
||||
return;
|
||||
sheetpath = SheetList.GetNext();
|
||||
|
||||
FullFileName = schframe->GetUniqueFilenameForCurrentSheet( ) + wxT( ".svg" );
|
||||
|
||||
bool success = DrawPage( FullFileName, schscreen, aPrint_Sheet_Ref );
|
||||
msg = _( "Create file " ) + FullFileName;
|
||||
if( !success )
|
||||
msg += _( " error" );
|
||||
msg += wxT( "\n" );
|
||||
m_MessagesBox->AppendText( msg );
|
||||
}
|
||||
schframe->m_CurrentSheet = oldsheetpath;
|
||||
schframe->m_CurrentSheet->UpdateAllScreenReferences();
|
||||
schframe->SetSheetNumberAndCount();
|
||||
}
|
||||
else
|
||||
{
|
||||
FullFileName = m_FileNameCtrl->GetValue();
|
||||
if( FullFileName.IsEmpty() )
|
||||
{
|
||||
FullFileName = screen->m_FileName;
|
||||
ChangeFileNameExt( FullFileName, wxT( ".svg" ) );
|
||||
}
|
||||
bool success = DrawPage( FullFileName, screen, aPrint_Sheet_Ref );
|
||||
msg = _( "Create file " ) + FullFileName;
|
||||
if( !success )
|
||||
msg += _( " error" );
|
||||
msg += wxT( "\n" );
|
||||
m_MessagesBox->AppendText( msg );
|
||||
}
|
||||
ActiveScreen = oldscreen;
|
||||
}
|
||||
|
||||
|
||||
/*****************************************************************/
|
||||
bool DIALOG_SVG_PRINT::DrawPage( const wxString& FullFileName, BASE_SCREEN* screen
|
||||
, bool aPrint_Sheet_Ref)
|
||||
/*****************************************************************/
|
||||
|
||||
/*
|
||||
* Routine effective d'impression
|
||||
*/
|
||||
{
|
||||
int tmpzoom;
|
||||
wxPoint tmp_startvisu;
|
||||
wxSize SheetSize; // Sheet size in internal units
|
||||
wxPoint old_org;
|
||||
float dpi;
|
||||
bool success = true;
|
||||
|
||||
/* modification des cadrages et reglages locaux */
|
||||
tmp_startvisu = screen->m_StartVisu;
|
||||
tmpzoom = screen->GetZoom();
|
||||
old_org = screen->m_DrawOrg;
|
||||
screen->m_DrawOrg.x = screen->m_DrawOrg.y = 0;
|
||||
screen->m_StartVisu.x = screen->m_StartVisu.y = 0;
|
||||
SheetSize = screen->m_CurrentSheetDesc->m_Size; // size in 1/1000 inch
|
||||
SheetSize.x *= m_Parent->m_InternalUnits / 1000;
|
||||
SheetSize.y *= m_Parent->m_InternalUnits / 1000; // size in pixels
|
||||
|
||||
screen->SetZoom( 1 );
|
||||
dpi = (float) SheetSize.x * 25.4 / m_ImageXSize_mm;
|
||||
|
||||
WinEDA_DrawPanel* panel = m_Parent->DrawPanel;
|
||||
|
||||
wxSVGFileDC dc( FullFileName, SheetSize.x, SheetSize.y, dpi );
|
||||
|
||||
if( !dc.Ok() )
|
||||
{
|
||||
DisplayError( this, wxT( "SVGprint error: wxSVGFileDC not OK" ) );
|
||||
success = FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
EDA_Rect tmp = panel->m_ClipBox;
|
||||
GRResetPenAndBrush( &dc );
|
||||
s_SVGPenMinWidth = ReturnValueFromTextCtrl( *m_DialogPenWidth, m_Parent->m_InternalUnits );
|
||||
SetPenMinWidth( s_SVGPenMinWidth );
|
||||
GRForceBlackPen( m_ModeColorOption->GetSelection() == 0 ? FALSE : true );
|
||||
|
||||
|
||||
panel->m_ClipBox.SetX( 0 ); panel->m_ClipBox.SetY( 0 );
|
||||
panel->m_ClipBox.SetWidth( 0x7FFFFF0 ); panel->m_ClipBox.SetHeight( 0x7FFFFF0 );
|
||||
|
||||
g_IsPrinting = true;
|
||||
SetLocaleTo_C_standard( ); // Switch the locale to standard C (needed to print floating point numbers like 1.3)
|
||||
panel->PrintPage( &dc, aPrint_Sheet_Ref, 1, false );
|
||||
SetLocaleTo_Default( ); // revert to the current locale
|
||||
g_IsPrinting = FALSE;
|
||||
panel->m_ClipBox = tmp;
|
||||
}
|
||||
|
||||
|
||||
GRForceBlackPen( FALSE );
|
||||
SetPenMinWidth( 1 );
|
||||
|
||||
screen->m_StartVisu = tmp_startvisu;
|
||||
screen->m_DrawOrg = old_org;
|
||||
screen->SetZoom( tmpzoom );
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
|
||||
/********************************************************************/
|
||||
void DIALOG_SVG_PRINT::OnButtonPlotAllClick( wxCommandEvent& event )
|
||||
/********************************************************************/
|
||||
{
|
||||
PrintSVGDoc( true, m_Print_Sheet_Ref->GetValue() );
|
||||
}
|
||||
|
||||
/********************************************************************/
|
||||
void DIALOG_SVG_PRINT::OnButtonPlotCurrentClick( wxCommandEvent& event )
|
||||
/********************************************************************/
|
||||
{
|
||||
PrintSVGDoc( false, m_Print_Sheet_Ref->GetValue() );
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************/
|
||||
void DIALOG_SVG_PRINT::OnButtonCancelClick( wxCommandEvent& event )
|
||||
/******************************************************************/
|
||||
{
|
||||
Close( );
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************/
|
||||
void DIALOG_SVG_PRINT::OnCloseWindow( wxCloseEvent& event )
|
||||
/***********************************************************/
|
||||
{
|
||||
if( m_Config )
|
||||
{
|
||||
s_PlotBlackAndWhite = m_ModeColorOption->GetSelection();
|
||||
m_Config->Write( PLOTSVGPENWIDTH_KEY, s_SVGPenMinWidth );
|
||||
m_Config->Write( PLOTSVGMODECOLOR_KEY, s_PlotBlackAndWhite );
|
||||
}
|
||||
EndModal( 0 );
|
||||
}
|
||||
|
||||
/*********************************************************************/
|
||||
void DIALOG_SVG_PRINT::OnSetColorModeSelected( wxCommandEvent& event )
|
||||
/*********************************************************************/
|
||||
/* called on radiobox color/black and white selection
|
||||
*/
|
||||
{
|
||||
s_PlotBlackAndWhite = m_ModeColorOption->GetSelection();
|
||||
}
|
|
@ -0,0 +1,104 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Apr 16 2008)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO "NOT" EDIT THIS FILE!
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "dialog_SVG_print_base.h"
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
DIALOG_SVG_PRINT_base::DIALOG_SVG_PRINT_base( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
|
||||
{
|
||||
this->SetSizeHints( wxSize( -1,-1 ), wxDefaultSize );
|
||||
|
||||
wxBoxSizer* bMainSizer;
|
||||
bMainSizer = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
wxBoxSizer* bUpperSizer;
|
||||
bUpperSizer = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
wxStaticBoxSizer* sbOptionsSizer;
|
||||
sbOptionsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Print SVG options:") ), wxVERTICAL );
|
||||
|
||||
m_TextPenWidth = new wxStaticText( this, wxID_ANY, _("Pen width mini"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_TextPenWidth->Wrap( -1 );
|
||||
sbOptionsSizer->Add( m_TextPenWidth, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_DialogPenWidth = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_DialogPenWidth->SetToolTip( _("Selection of the minimum pen thickness used to draw items.") );
|
||||
|
||||
sbOptionsSizer->Add( m_DialogPenWidth, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
|
||||
|
||||
wxString m_ModeColorOptionChoices[] = { _("Color"), _("Black and White") };
|
||||
int m_ModeColorOptionNChoices = sizeof( m_ModeColorOptionChoices ) / sizeof( wxString );
|
||||
m_ModeColorOption = new wxRadioBox( this, wxID_ANY, _("Print mode"), wxDefaultPosition, wxDefaultSize, m_ModeColorOptionNChoices, m_ModeColorOptionChoices, 1, wxRA_SPECIFY_COLS );
|
||||
m_ModeColorOption->SetSelection( 0 );
|
||||
m_ModeColorOption->SetToolTip( _("Choose if you wand to draw the sheet like it appears on screen,\nor in black and white mode, better to print it when using black and white printers") );
|
||||
|
||||
sbOptionsSizer->Add( m_ModeColorOption, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
m_Print_Sheet_Ref = new wxCheckBox( this, wxID_ANY, _("Print Frame Ref"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
|
||||
m_Print_Sheet_Ref->SetToolTip( _("Print (or not) the Frame references.") );
|
||||
|
||||
sbOptionsSizer->Add( m_Print_Sheet_Ref, 0, wxALL, 5 );
|
||||
|
||||
bUpperSizer->Add( sbOptionsSizer, 1, wxEXPAND, 5 );
|
||||
|
||||
wxBoxSizer* bButtonsSizer;
|
||||
bButtonsSizer = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
m_buttonPlotCurrent = new wxButton( this, wxID_PRINT_CURRENT, _("PrintCurrent"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bButtonsSizer->Add( m_buttonPlotCurrent, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
|
||||
|
||||
m_buttonPlotAll = new wxButton( this, wxID_PRINT_ALL, _("Print All"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bButtonsSizer->Add( m_buttonPlotAll, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
|
||||
|
||||
m_buttonQuit = new wxButton( this, wxID_CANCEL, _("Quit"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bButtonsSizer->Add( m_buttonQuit, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
|
||||
|
||||
bUpperSizer->Add( bButtonsSizer, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
bMainSizer->Add( bUpperSizer, 1, wxEXPAND, 5 );
|
||||
|
||||
m_staticText1 = new wxStaticText( this, wxID_ANY, _("Filename:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText1->Wrap( -1 );
|
||||
bMainSizer->Add( m_staticText1, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_FileNameCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_FileNameCtrl->SetToolTip( _("Enter a filename if you do not want to use defaults files names\nCan be used only when printing the current sheet") );
|
||||
m_FileNameCtrl->SetMinSize( wxSize( 450,-1 ) );
|
||||
|
||||
bMainSizer->Add( m_FileNameCtrl, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_staticText2 = new wxStaticText( this, wxID_ANY, _("Messages:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText2->Wrap( -1 );
|
||||
bMainSizer->Add( m_staticText2, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_MessagesBox = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE );
|
||||
bMainSizer->Add( m_MessagesBox, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
this->SetSizer( bMainSizer );
|
||||
this->Layout();
|
||||
|
||||
// Connect Events
|
||||
this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_SVG_PRINT_base::OnCloseWindow ) );
|
||||
this->Connect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_SVG_PRINT_base::OnInitDialog ) );
|
||||
m_ModeColorOption->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_SVG_PRINT_base::OnSetColorModeSelected ), NULL, this );
|
||||
m_buttonPlotCurrent->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SVG_PRINT_base::OnButtonPlotCurrentClick ), NULL, this );
|
||||
m_buttonPlotAll->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SVG_PRINT_base::OnButtonPlotAllClick ), NULL, this );
|
||||
m_buttonQuit->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SVG_PRINT_base::OnButtonCancelClick ), NULL, this );
|
||||
}
|
||||
|
||||
DIALOG_SVG_PRINT_base::~DIALOG_SVG_PRINT_base()
|
||||
{
|
||||
// Disconnect Events
|
||||
this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_SVG_PRINT_base::OnCloseWindow ) );
|
||||
this->Disconnect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_SVG_PRINT_base::OnInitDialog ) );
|
||||
m_ModeColorOption->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_SVG_PRINT_base::OnSetColorModeSelected ), NULL, this );
|
||||
m_buttonPlotCurrent->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SVG_PRINT_base::OnButtonPlotCurrentClick ), NULL, this );
|
||||
m_buttonPlotAll->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SVG_PRINT_base::OnButtonPlotAllClick ), NULL, this );
|
||||
m_buttonQuit->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SVG_PRINT_base::OnButtonCancelClick ), NULL, this );
|
||||
}
|
|
@ -0,0 +1,697 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
|
||||
<wxFormBuilder_Project>
|
||||
<FileVersion major="1" minor="9" />
|
||||
<object class="Project" expanded="1">
|
||||
<property name="class_decoration"></property>
|
||||
<property name="code_generation">C++</property>
|
||||
<property name="disconnect_events">1</property>
|
||||
<property name="encoding">UTF-8</property>
|
||||
<property name="event_generation">connect</property>
|
||||
<property name="file">dialog_SVG_print_base</property>
|
||||
<property name="first_id">1000</property>
|
||||
<property name="help_provider">none</property>
|
||||
<property name="internationalize">1</property>
|
||||
<property name="name">DialogSVGPrint_base</property>
|
||||
<property name="namespace"></property>
|
||||
<property name="path">.</property>
|
||||
<property name="precompiled_header"></property>
|
||||
<property name="relative_path">1</property>
|
||||
<property name="use_enum">1</property>
|
||||
<property name="use_microsoft_bom">0</property>
|
||||
<object class="Dialog" expanded="1">
|
||||
<property name="bg"></property>
|
||||
<property name="center"></property>
|
||||
<property name="context_help"></property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="extra_style"></property>
|
||||
<property name="fg"></property>
|
||||
<property name="font"></property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="minimum_size">-1,-1</property>
|
||||
<property name="name">DIALOG_SVG_PRINT_base</property>
|
||||
<property name="pos"></property>
|
||||
<property name="size">550,459</property>
|
||||
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
|
||||
<property name="subclass"></property>
|
||||
<property name="title">Create SVG file</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnActivate"></event>
|
||||
<event name="OnActivateApp"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnClose">OnCloseWindow</event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnHibernate"></event>
|
||||
<event name="OnIconize"></event>
|
||||
<event name="OnIdle"></event>
|
||||
<event name="OnInitDialog">OnInitDialog</event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">bMainSizer</property>
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">bUpperSizer</property>
|
||||
<property name="orient">wxHORIZONTAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxStaticBoxSizer" expanded="1">
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Print SVG options:</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">sbOptionsSizer</property>
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
<property name="permission">none</property>
|
||||
<event name="OnUpdateUI"></event>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxTOP|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="1">
|
||||
<property name="bg"></property>
|
||||
<property name="context_help"></property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="font"></property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Pen width mini</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">m_TextPenWidth</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pos"></property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</property>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxTextCtrl" expanded="1">
|
||||
<property name="bg"></property>
|
||||
<property name="context_help"></property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="font"></property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="maxlength">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">m_DialogPenWidth</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pos"></property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="tooltip">Selection of the minimum pen thickness used to draw items.</property>
|
||||
<property name="value"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnText"></event>
|
||||
<event name="OnTextEnter"></event>
|
||||
<event name="OnTextMaxLen"></event>
|
||||
<event name="OnTextURL"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL|wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxRadioBox" expanded="1">
|
||||
<property name="bg"></property>
|
||||
<property name="choices">"Color" "Black and White"</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="font"></property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Print mode</property>
|
||||
<property name="majorDimension">1</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">m_ModeColorOption</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pos"></property>
|
||||
<property name="selection">0</property>
|
||||
<property name="size"></property>
|
||||
<property name="style">wxRA_SPECIFY_COLS</property>
|
||||
<property name="subclass"></property>
|
||||
<property name="tooltip">Choose if you wand to draw the sheet like it appears on screen,
or in black and white mode, better to print it when using black and white printers</property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRadioBox">OnSetColorModeSelected</event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxCheckBox" expanded="1">
|
||||
<property name="bg"></property>
|
||||
<property name="checked">0</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="font"></property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Print Frame Ref</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">m_Print_Sheet_Ref</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pos"></property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="tooltip">Print (or not) the Frame references.</property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnCheckBox"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">bButtonsSizer</property>
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL|wxALIGN_CENTER_HORIZONTAL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxButton" expanded="1">
|
||||
<property name="bg"></property>
|
||||
<property name="context_help"></property>
|
||||
<property name="default">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="font"></property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_PRINT_CURRENT</property>
|
||||
<property name="label">PrintCurrent</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">m_buttonPlotCurrent</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pos"></property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnButtonClick">OnButtonPlotCurrentClick</event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL|wxALIGN_CENTER_HORIZONTAL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxButton" expanded="1">
|
||||
<property name="bg"></property>
|
||||
<property name="context_help"></property>
|
||||
<property name="default">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="font"></property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_PRINT_ALL</property>
|
||||
<property name="label">Print All</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">m_buttonPlotAll</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pos"></property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnButtonClick">OnButtonPlotAllClick</event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL|wxALIGN_CENTER_HORIZONTAL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxButton" expanded="1">
|
||||
<property name="bg"></property>
|
||||
<property name="context_help"></property>
|
||||
<property name="default">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="font"></property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_CANCEL</property>
|
||||
<property name="label">Quit</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">m_buttonQuit</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pos"></property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnButtonClick">OnButtonCancelClick</event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxTOP|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="1">
|
||||
<property name="bg"></property>
|
||||
<property name="context_help"></property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="font"></property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Filename:</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">m_staticText1</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pos"></property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</property>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxTextCtrl" expanded="1">
|
||||
<property name="bg"></property>
|
||||
<property name="context_help"></property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="font"></property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="maxlength">0</property>
|
||||
<property name="minimum_size">450,-1</property>
|
||||
<property name="name">m_FileNameCtrl</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pos"></property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="tooltip">Enter a filename if you do not want to use defaults files names
Can be used only when printing the current sheet</property>
|
||||
<property name="value"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnText"></event>
|
||||
<event name="OnTextEnter"></event>
|
||||
<event name="OnTextMaxLen"></event>
|
||||
<event name="OnTextURL"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxTOP|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="1">
|
||||
<property name="bg"></property>
|
||||
<property name="context_help"></property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="font"></property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Messages:</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">m_staticText2</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pos"></property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</property>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxTextCtrl" expanded="1">
|
||||
<property name="bg"></property>
|
||||
<property name="context_help"></property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="font"></property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="maxlength">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">m_MessagesBox</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pos"></property>
|
||||
<property name="size"></property>
|
||||
<property name="style">wxTE_MULTILINE</property>
|
||||
<property name="subclass"></property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="value"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnText"></event>
|
||||
<event name="OnTextEnter"></event>
|
||||
<event name="OnTextMaxLen"></event>
|
||||
<event name="OnTextURL"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</wxFormBuilder_Project>
|
|
@ -0,0 +1,70 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Apr 16 2008)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO "NOT" EDIT THIS FILE!
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __dialog_SVG_print_base__
|
||||
#define __dialog_SVG_print_base__
|
||||
|
||||
#include <wx/intl.h>
|
||||
|
||||
#include <wx/string.h>
|
||||
#include <wx/stattext.h>
|
||||
#include <wx/gdicmn.h>
|
||||
#include <wx/font.h>
|
||||
#include <wx/colour.h>
|
||||
#include <wx/settings.h>
|
||||
#include <wx/textctrl.h>
|
||||
#include <wx/radiobox.h>
|
||||
#include <wx/checkbox.h>
|
||||
#include <wx/sizer.h>
|
||||
#include <wx/statbox.h>
|
||||
#include <wx/button.h>
|
||||
#include <wx/dialog.h>
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Class DIALOG_SVG_PRINT_base
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class DIALOG_SVG_PRINT_base : public wxDialog
|
||||
{
|
||||
private:
|
||||
|
||||
protected:
|
||||
enum
|
||||
{
|
||||
wxID_PRINT_CURRENT = 1000,
|
||||
wxID_PRINT_ALL,
|
||||
};
|
||||
|
||||
wxStaticText* m_TextPenWidth;
|
||||
wxTextCtrl* m_DialogPenWidth;
|
||||
wxRadioBox* m_ModeColorOption;
|
||||
wxCheckBox* m_Print_Sheet_Ref;
|
||||
wxButton* m_buttonPlotCurrent;
|
||||
wxButton* m_buttonPlotAll;
|
||||
wxButton* m_buttonQuit;
|
||||
wxStaticText* m_staticText1;
|
||||
wxTextCtrl* m_FileNameCtrl;
|
||||
wxStaticText* m_staticText2;
|
||||
wxTextCtrl* m_MessagesBox;
|
||||
|
||||
// Virtual event handlers, overide them in your derived class
|
||||
virtual void OnCloseWindow( wxCloseEvent& event ){ event.Skip(); }
|
||||
virtual void OnInitDialog( wxInitDialogEvent& event ){ event.Skip(); }
|
||||
virtual void OnSetColorModeSelected( wxCommandEvent& event ){ event.Skip(); }
|
||||
virtual void OnButtonPlotCurrentClick( wxCommandEvent& event ){ event.Skip(); }
|
||||
virtual void OnButtonPlotAllClick( wxCommandEvent& event ){ event.Skip(); }
|
||||
virtual void OnButtonCancelClick( wxCommandEvent& event ){ event.Skip(); }
|
||||
|
||||
|
||||
public:
|
||||
DIALOG_SVG_PRINT_base( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Create SVG file"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 550,459 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
|
||||
~DIALOG_SVG_PRINT_base();
|
||||
|
||||
};
|
||||
|
||||
#endif //__dialog_SVG_print_base__
|
|
@ -34,6 +34,8 @@ OBJECTS = eeschema.o\
|
|||
dialog_options.o\
|
||||
dialog_edit_libentry_fields_in_lib.o\
|
||||
dialog_edit_libentry_fields_in_lib_base.o\
|
||||
dialog_SVG_print.o\
|
||||
dialog_SVG_print_base.o\
|
||||
tool_lib.o\
|
||||
tool_sch.o\
|
||||
tool_viewlib.o\
|
||||
|
@ -99,8 +101,7 @@ OBJECTS = eeschema.o\
|
|||
find.o \
|
||||
backanno.o \
|
||||
controle.o\
|
||||
hotkeys.o\
|
||||
svg_print.o
|
||||
hotkeys.o
|
||||
|
||||
|
||||
eeschema.o: eeschema.cpp program.h general.h $(DEPEND)
|
||||
|
|
|
@ -68,6 +68,8 @@ set(PCBNEW_SRCS
|
|||
dialog_setup_libs.cpp
|
||||
dialog_orient_footprints.cpp
|
||||
# dialog_track_options.cpp
|
||||
dialog_SVG_print.cpp
|
||||
dialog_SVG_print_base.cpp
|
||||
dist.cpp
|
||||
dragsegm.cpp
|
||||
drc.cpp
|
||||
|
|
|
@ -0,0 +1,337 @@
|
|||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// Name: dialog_svg_print.cpp
|
||||
// Author: jean-pierre Charras
|
||||
// Modified by:
|
||||
// Licence: GPL
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "fctsys.h"
|
||||
|
||||
#include "common.h"
|
||||
|
||||
#include "dialog_SVG_print_base.h"
|
||||
|
||||
#include "dcsvg.h"
|
||||
|
||||
#include "pcbnew.h"
|
||||
|
||||
// Keys for configuration
|
||||
#define PLOTSVGPENWIDTH_KEY wxT( "PlotSVGPenWidth" )
|
||||
#define PLOTSVGMODECOLOR_KEY wxT( "PlotSVGModeColor" )
|
||||
#define OPTKEY_LAYERBASE wxT( "PlotLayer_%d" )
|
||||
|
||||
#define WIDTH_MAX_VALUE 100
|
||||
#define WIDTH_MIN_VALUE 1
|
||||
|
||||
// Variables locales
|
||||
static int s_SVGPenMinWidth; /* Minimum pen width (in internal units) for printing */
|
||||
|
||||
static bool s_Print_Frame_Ref = true;
|
||||
static int s_PlotBlackAndWhite = 0;
|
||||
static long s_SelectedLayers = CUIVRE_LAYER | CMP_LAYER |
|
||||
SILKSCREEN_LAYER_CMP | SILKSCREEN_LAYER_CU;
|
||||
|
||||
class DIALOG_SVG_PRINT : public DIALOG_SVG_PRINT_base
|
||||
{
|
||||
private:
|
||||
WinEDA_BasePcbFrame* m_Parent;
|
||||
int m_ImageXSize_mm;
|
||||
wxConfig* m_Config;
|
||||
long m_PrintMaskLayer;
|
||||
wxCheckBox* m_BoxSelectLayer[32];
|
||||
|
||||
public:
|
||||
DIALOG_SVG_PRINT( WinEDA_DrawFrame* parent );
|
||||
~DIALOG_SVG_PRINT() {}
|
||||
|
||||
private:
|
||||
void OnCloseWindow( wxCloseEvent& event );
|
||||
void OnInitDialog( wxInitDialogEvent& event );
|
||||
void OnButtonPrintSelectedClick( wxCommandEvent& event );
|
||||
void OnButtonPrintBoardClick( wxCommandEvent& event );
|
||||
void OnButtonCancelClick( wxCommandEvent& event );
|
||||
void OnSetColorModeSelected( wxCommandEvent& event );
|
||||
void SetPenWidth();
|
||||
void PrintSVGDoc( bool aPrintAll, bool aPrint_Sheet_Ref );
|
||||
bool DrawPage( const wxString& FullFileName, BASE_SCREEN* screen, bool aPrint_Sheet_Ref );
|
||||
};
|
||||
|
||||
/*******************************************************/
|
||||
void WinEDA_DrawFrame::SVG_Print( wxCommandEvent& event )
|
||||
/*******************************************************/
|
||||
|
||||
/* Prepare les structures de donnees de gestion de l'impression
|
||||
* et affiche la fenetre de dialogue de gestion de l'impression des feuilles
|
||||
*/
|
||||
{
|
||||
DIALOG_SVG_PRINT frame( this );
|
||||
|
||||
frame.ShowModal();
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* DIALOG_SVG_PRINT functions
|
||||
*/
|
||||
DIALOG_SVG_PRINT::DIALOG_SVG_PRINT( WinEDA_DrawFrame* parent ) :
|
||||
DIALOG_SVG_PRINT_base( parent )
|
||||
{
|
||||
m_Parent = (WinEDA_BasePcbFrame*) parent;
|
||||
m_Config = wxGetApp().m_EDA_Config;
|
||||
}
|
||||
|
||||
|
||||
/*************************************************************/
|
||||
void DIALOG_SVG_PRINT::OnInitDialog( wxInitDialogEvent& event )
|
||||
/*************************************************************/
|
||||
{
|
||||
SetFont( *g_DialogFont );
|
||||
SetFocus(); // Make ESC key working
|
||||
|
||||
m_ImageXSize_mm = 270;
|
||||
if( m_Config )
|
||||
{
|
||||
m_Config->Read( PLOTSVGPENWIDTH_KEY, &s_SVGPenMinWidth );
|
||||
m_Config->Read( PLOTSVGMODECOLOR_KEY, &s_PlotBlackAndWhite );
|
||||
}
|
||||
|
||||
AddUnitSymbol( *m_TextPenWidth, g_UnitMetric );
|
||||
m_DialogPenWidth->SetValue(
|
||||
ReturnStringFromValue( g_UnitMetric, s_SVGPenMinWidth, m_Parent->m_InternalUnits ) );
|
||||
m_Print_Sheet_Ref->SetValue( s_Print_Frame_Ref );
|
||||
|
||||
// Create layers list
|
||||
BOARD* board = m_Parent->GetBoard();
|
||||
int mask = 1;
|
||||
for( int layer = 0; layer<NB_LAYERS; layer++, mask <<= 1 )
|
||||
{
|
||||
m_BoxSelectLayer[layer] = new wxCheckBox( this, -1, board->GetLayerName( layer ) );
|
||||
|
||||
if( mask & s_SelectedLayers )
|
||||
m_BoxSelectLayer[layer]->SetValue( true );
|
||||
|
||||
if( layer < 16 )
|
||||
m_CopperLayersBoxSizer->Add( m_BoxSelectLayer[layer], 0, wxGROW | wxALL, 1 );
|
||||
else
|
||||
m_TechnicalBoxSizer->Add( m_BoxSelectLayer[layer], 0, wxGROW | wxALL, 1 );
|
||||
}
|
||||
|
||||
if( m_Config )
|
||||
{
|
||||
wxString layerKey;
|
||||
|
||||
for( int layer = 0; layer<NB_LAYERS; ++layer )
|
||||
{
|
||||
bool option;
|
||||
|
||||
layerKey.Printf( OPTKEY_LAYERBASE, layer );
|
||||
|
||||
if( m_Config->Read( layerKey, &option ) )
|
||||
m_BoxSelectLayer[layer]->SetValue( option );
|
||||
}
|
||||
}
|
||||
|
||||
if( GetSizer() )
|
||||
{
|
||||
GetSizer()->SetSizeHints( this );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/********************************************/
|
||||
void DIALOG_SVG_PRINT::SetPenWidth()
|
||||
/********************************************/
|
||||
{
|
||||
s_SVGPenMinWidth = ReturnValueFromTextCtrl( *m_DialogPenWidth, m_Parent->m_InternalUnits );
|
||||
|
||||
if( s_SVGPenMinWidth > WIDTH_MAX_VALUE )
|
||||
{
|
||||
s_SVGPenMinWidth = WIDTH_MAX_VALUE;
|
||||
}
|
||||
|
||||
if( s_SVGPenMinWidth < WIDTH_MIN_VALUE )
|
||||
{
|
||||
s_SVGPenMinWidth = WIDTH_MIN_VALUE;
|
||||
}
|
||||
|
||||
m_DialogPenWidth->SetValue(
|
||||
ReturnStringFromValue( g_UnitMetric, s_SVGPenMinWidth, m_Parent->m_InternalUnits ) );
|
||||
}
|
||||
|
||||
|
||||
/***************************************************************************/
|
||||
void DIALOG_SVG_PRINT::PrintSVGDoc( bool aPrintAll, bool aPrint_Sheet_Ref )
|
||||
/***************************************************************************/
|
||||
{
|
||||
wxString msg;
|
||||
|
||||
SetPenWidth();
|
||||
|
||||
wxString FullFileName;
|
||||
BASE_SCREEN* screen = m_Parent->GetBaseScreen();
|
||||
|
||||
if( aPrintAll )
|
||||
m_PrintMaskLayer = 0xFFFFFFFF;
|
||||
|
||||
for ( int layer = 0; layer<NB_LAYERS; layer++ )
|
||||
{
|
||||
if ( ! aPrintAll && ! m_BoxSelectLayer[layer]->GetValue( ) )
|
||||
continue;
|
||||
|
||||
FullFileName = m_FileNameCtrl->GetValue();
|
||||
if( FullFileName.IsEmpty() )
|
||||
{
|
||||
FullFileName = screen->m_FileName;
|
||||
ChangeFileNameExt( FullFileName, wxT( "" ) );
|
||||
}
|
||||
|
||||
if( ! aPrintAll )
|
||||
{
|
||||
FullFileName << wxT("-") << m_BoxSelectLayer[layer]->GetLabel( );
|
||||
m_PrintMaskLayer = 1 << layer;
|
||||
if ( m_PrintBoardEdgesCtrl->IsChecked() )
|
||||
m_PrintMaskLayer |= EDGE_LAYER;
|
||||
|
||||
}
|
||||
|
||||
FullFileName += wxT( ".svg" );
|
||||
|
||||
bool success = DrawPage( FullFileName, screen, aPrint_Sheet_Ref );
|
||||
msg = _( "Create file " ) + FullFileName;
|
||||
if( !success )
|
||||
msg += _( " error" );
|
||||
msg += wxT( "\n" );
|
||||
m_MessagesBox->AppendText( msg );
|
||||
|
||||
if ( aPrintAll )
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*****************************************************************/
|
||||
bool DIALOG_SVG_PRINT::DrawPage( const wxString& FullFileName, BASE_SCREEN* screen,
|
||||
bool aPrint_Sheet_Ref )
|
||||
/*****************************************************************/
|
||||
|
||||
/*
|
||||
* Routine effective d'impression
|
||||
*/
|
||||
{
|
||||
int tmpzoom;
|
||||
wxPoint tmp_startvisu;
|
||||
wxSize SheetSize; // Sheet size in internal units
|
||||
wxPoint old_org;
|
||||
float dpi;
|
||||
bool success = true;
|
||||
|
||||
/* modification des cadrages et reglages locaux */
|
||||
tmp_startvisu = screen->m_StartVisu;
|
||||
tmpzoom = screen->GetZoom();
|
||||
old_org = screen->m_DrawOrg;
|
||||
screen->m_DrawOrg.x = screen->m_DrawOrg.y = 0;
|
||||
screen->m_StartVisu.x = screen->m_StartVisu.y = 0;
|
||||
SheetSize = screen->m_CurrentSheetDesc->m_Size; // size in 1/1000 inch
|
||||
SheetSize.x *= m_Parent->m_InternalUnits / 1000;
|
||||
SheetSize.y *= m_Parent->m_InternalUnits / 1000; // size in pixels
|
||||
|
||||
screen->SetZoom( 1 );
|
||||
dpi = (float) SheetSize.x * 25.4 / m_ImageXSize_mm;
|
||||
|
||||
WinEDA_DrawPanel* panel = m_Parent->DrawPanel;
|
||||
|
||||
wxSVGFileDC dc( FullFileName, SheetSize.x, SheetSize.y, dpi );
|
||||
|
||||
if( !dc.Ok() )
|
||||
{
|
||||
DisplayError( this, wxT( "SVGprint error: wxSVGFileDC not OK" ) );
|
||||
success = FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
EDA_Rect tmp = panel->m_ClipBox;
|
||||
GRResetPenAndBrush( &dc );
|
||||
s_SVGPenMinWidth = ReturnValueFromTextCtrl( *m_DialogPenWidth, m_Parent->m_InternalUnits );
|
||||
SetPenMinWidth( s_SVGPenMinWidth );
|
||||
GRForceBlackPen( m_ModeColorOption->GetSelection() == 0 ? FALSE : true );
|
||||
|
||||
|
||||
panel->m_ClipBox.SetX( 0 ); panel->m_ClipBox.SetY( 0 );
|
||||
panel->m_ClipBox.SetWidth( 0x7FFFFF0 ); panel->m_ClipBox.SetHeight( 0x7FFFFF0 );
|
||||
|
||||
g_IsPrinting = true;
|
||||
SetLocaleTo_C_standard(); // Switch the locale to standard C (needed to print floating point numbers like 1.3)
|
||||
panel->PrintPage( &dc, aPrint_Sheet_Ref, m_PrintMaskLayer, false );
|
||||
SetLocaleTo_Default(); // revert to the current locale
|
||||
g_IsPrinting = FALSE;
|
||||
panel->m_ClipBox = tmp;
|
||||
}
|
||||
|
||||
|
||||
GRForceBlackPen( FALSE );
|
||||
SetPenMinWidth( 1 );
|
||||
|
||||
screen->m_StartVisu = tmp_startvisu;
|
||||
screen->m_DrawOrg = old_org;
|
||||
screen->SetZoom( tmpzoom );
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
|
||||
/********************************************************************/
|
||||
void DIALOG_SVG_PRINT::OnButtonPrintBoardClick( wxCommandEvent& event )
|
||||
/********************************************************************/
|
||||
{
|
||||
s_Print_Frame_Ref = m_Print_Sheet_Ref->GetValue( );
|
||||
PrintSVGDoc( true, m_Print_Sheet_Ref->GetValue() );
|
||||
}
|
||||
|
||||
|
||||
/********************************************************************/
|
||||
void DIALOG_SVG_PRINT::OnButtonPrintSelectedClick( wxCommandEvent& event )
|
||||
/********************************************************************/
|
||||
{
|
||||
s_Print_Frame_Ref = m_Print_Sheet_Ref->GetValue( );
|
||||
PrintSVGDoc( false, m_Print_Sheet_Ref->GetValue() );
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************/
|
||||
void DIALOG_SVG_PRINT::OnButtonCancelClick( wxCommandEvent& event )
|
||||
/******************************************************************/
|
||||
{
|
||||
Close();
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************/
|
||||
void DIALOG_SVG_PRINT::OnCloseWindow( wxCloseEvent& event )
|
||||
/***********************************************************/
|
||||
{
|
||||
if( m_Config )
|
||||
{
|
||||
s_PlotBlackAndWhite = m_ModeColorOption->GetSelection();
|
||||
m_Config->Write( PLOTSVGPENWIDTH_KEY, s_SVGPenMinWidth );
|
||||
m_Config->Write( PLOTSVGMODECOLOR_KEY, s_PlotBlackAndWhite );
|
||||
wxString layerKey;
|
||||
for( int layer = 0; layer<NB_LAYERS; ++layer )
|
||||
{
|
||||
layerKey.Printf( OPTKEY_LAYERBASE, layer );
|
||||
m_Config->Write( layerKey, m_BoxSelectLayer[layer]->IsChecked() );
|
||||
}
|
||||
}
|
||||
EndModal( 0 );
|
||||
}
|
||||
|
||||
|
||||
/*********************************************************************/
|
||||
void DIALOG_SVG_PRINT::OnSetColorModeSelected( wxCommandEvent& event )
|
||||
/*********************************************************************/
|
||||
|
||||
/* called on radiobox color/black and white selection
|
||||
*/
|
||||
{
|
||||
s_PlotBlackAndWhite = m_ModeColorOption->GetSelection();
|
||||
}
|
|
@ -0,0 +1,127 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Apr 16 2008)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO "NOT" EDIT THIS FILE!
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "dialog_SVG_print_base.h"
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
DIALOG_SVG_PRINT_base::DIALOG_SVG_PRINT_base( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
|
||||
{
|
||||
this->SetSizeHints( wxSize( -1,350 ), wxDefaultSize );
|
||||
|
||||
wxBoxSizer* bMainSizer;
|
||||
bMainSizer = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
wxBoxSizer* bUpperSizer;
|
||||
bUpperSizer = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
wxStaticBoxSizer* sbLayersSizer;
|
||||
sbLayersSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Layers:") ), wxHORIZONTAL );
|
||||
|
||||
m_CopperLayersBoxSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Copper Layers:") ), wxVERTICAL );
|
||||
|
||||
sbLayersSizer->Add( m_CopperLayersBoxSizer, 1, wxEXPAND, 5 );
|
||||
|
||||
m_TechnicalBoxSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Technical Layers:") ), wxVERTICAL );
|
||||
|
||||
sbLayersSizer->Add( m_TechnicalBoxSizer, 1, wxEXPAND, 5 );
|
||||
|
||||
bUpperSizer->Add( sbLayersSizer, 1, wxEXPAND, 5 );
|
||||
|
||||
wxStaticBoxSizer* sbOptionsSizer;
|
||||
sbOptionsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Print SVG options:") ), wxVERTICAL );
|
||||
|
||||
m_TextPenWidth = new wxStaticText( this, wxID_ANY, _("Pen width mini"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_TextPenWidth->Wrap( -1 );
|
||||
sbOptionsSizer->Add( m_TextPenWidth, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_DialogPenWidth = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_DialogPenWidth->SetToolTip( _("Selection of the minimum pen thickness used to draw items.") );
|
||||
|
||||
sbOptionsSizer->Add( m_DialogPenWidth, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
|
||||
|
||||
wxString m_ModeColorOptionChoices[] = { _("Color"), _("Black and White") };
|
||||
int m_ModeColorOptionNChoices = sizeof( m_ModeColorOptionChoices ) / sizeof( wxString );
|
||||
m_ModeColorOption = new wxRadioBox( this, wxID_ANY, _("Print mode"), wxDefaultPosition, wxDefaultSize, m_ModeColorOptionNChoices, m_ModeColorOptionChoices, 1, wxRA_SPECIFY_COLS );
|
||||
m_ModeColorOption->SetSelection( 0 );
|
||||
m_ModeColorOption->SetToolTip( _("Choose if you wand to draw the sheet like it appears on screen,\nor in black and white mode, better to print it when using black and white printers") );
|
||||
|
||||
sbOptionsSizer->Add( m_ModeColorOption, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
m_Print_Sheet_Ref = new wxCheckBox( this, wxID_ANY, _("Print Frame Ref"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_Print_Sheet_Ref->SetValue(true);
|
||||
|
||||
m_Print_Sheet_Ref->SetToolTip( _("Print (or not) the Frame references.") );
|
||||
|
||||
sbOptionsSizer->Add( m_Print_Sheet_Ref, 0, wxALL, 5 );
|
||||
|
||||
m_PrintBoardEdgesCtrl = new wxCheckBox( this, wxID_ANY, _("Print Board Edges"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_PrintBoardEdgesCtrl->SetValue(true);
|
||||
|
||||
m_PrintBoardEdgesCtrl->SetToolTip( _("Print (or not) the edges layer with others layers") );
|
||||
|
||||
sbOptionsSizer->Add( m_PrintBoardEdgesCtrl, 0, wxALL, 5 );
|
||||
|
||||
bUpperSizer->Add( sbOptionsSizer, 1, wxEXPAND, 5 );
|
||||
|
||||
wxBoxSizer* bButtonsSizer;
|
||||
bButtonsSizer = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
m_buttonPrintSelected = new wxButton( this, wxID_PRINT_CURRENT, _("Print Selected"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bButtonsSizer->Add( m_buttonPrintSelected, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
|
||||
|
||||
m_buttonBoard = new wxButton( this, wxID_PRINT_BOARD, _("Print Board"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bButtonsSizer->Add( m_buttonBoard, 0, wxALL, 5 );
|
||||
|
||||
m_buttonQuit = new wxButton( this, wxID_CANCEL, _("Quit"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bButtonsSizer->Add( m_buttonQuit, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
|
||||
|
||||
bUpperSizer->Add( bButtonsSizer, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
bMainSizer->Add( bUpperSizer, 0, wxEXPAND, 5 );
|
||||
|
||||
m_staticText1 = new wxStaticText( this, wxID_ANY, _("Filename:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText1->Wrap( -1 );
|
||||
bMainSizer->Add( m_staticText1, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_FileNameCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_FileNameCtrl->SetToolTip( _("Enter a filename if you do not want to use defaults files names\nCan be used only when printing the current sheet") );
|
||||
m_FileNameCtrl->SetMinSize( wxSize( 450,-1 ) );
|
||||
|
||||
bMainSizer->Add( m_FileNameCtrl, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_staticText2 = new wxStaticText( this, wxID_ANY, _("Messages:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText2->Wrap( -1 );
|
||||
bMainSizer->Add( m_staticText2, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_MessagesBox = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE );
|
||||
m_MessagesBox->SetMinSize( wxSize( -1,100 ) );
|
||||
|
||||
bMainSizer->Add( m_MessagesBox, 1, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
|
||||
|
||||
this->SetSizer( bMainSizer );
|
||||
this->Layout();
|
||||
|
||||
// Connect Events
|
||||
this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_SVG_PRINT_base::OnCloseWindow ) );
|
||||
this->Connect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_SVG_PRINT_base::OnInitDialog ) );
|
||||
m_ModeColorOption->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_SVG_PRINT_base::OnSetColorModeSelected ), NULL, this );
|
||||
m_buttonPrintSelected->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SVG_PRINT_base::OnButtonPrintSelectedClick ), NULL, this );
|
||||
m_buttonBoard->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SVG_PRINT_base::OnButtonPrintBoardClick ), NULL, this );
|
||||
m_buttonQuit->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SVG_PRINT_base::OnButtonCancelClick ), NULL, this );
|
||||
}
|
||||
|
||||
DIALOG_SVG_PRINT_base::~DIALOG_SVG_PRINT_base()
|
||||
{
|
||||
// Disconnect Events
|
||||
this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_SVG_PRINT_base::OnCloseWindow ) );
|
||||
this->Disconnect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_SVG_PRINT_base::OnInitDialog ) );
|
||||
m_ModeColorOption->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_SVG_PRINT_base::OnSetColorModeSelected ), NULL, this );
|
||||
m_buttonPrintSelected->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SVG_PRINT_base::OnButtonPrintSelectedClick ), NULL, this );
|
||||
m_buttonBoard->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SVG_PRINT_base::OnButtonPrintBoardClick ), NULL, this );
|
||||
m_buttonQuit->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SVG_PRINT_base::OnButtonCancelClick ), NULL, this );
|
||||
}
|
|
@ -0,0 +1,791 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
|
||||
<wxFormBuilder_Project>
|
||||
<FileVersion major="1" minor="9" />
|
||||
<object class="Project" expanded="1">
|
||||
<property name="class_decoration"></property>
|
||||
<property name="code_generation">C++</property>
|
||||
<property name="disconnect_events">1</property>
|
||||
<property name="encoding">UTF-8</property>
|
||||
<property name="event_generation">connect</property>
|
||||
<property name="file">dialog_SVG_print_base</property>
|
||||
<property name="first_id">1000</property>
|
||||
<property name="help_provider">none</property>
|
||||
<property name="internationalize">1</property>
|
||||
<property name="name">DialogSVGPrint_base</property>
|
||||
<property name="namespace"></property>
|
||||
<property name="path">.</property>
|
||||
<property name="precompiled_header"></property>
|
||||
<property name="relative_path">1</property>
|
||||
<property name="use_enum">1</property>
|
||||
<property name="use_microsoft_bom">0</property>
|
||||
<object class="Dialog" expanded="1">
|
||||
<property name="bg"></property>
|
||||
<property name="center"></property>
|
||||
<property name="context_help"></property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="extra_style"></property>
|
||||
<property name="fg"></property>
|
||||
<property name="font"></property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="minimum_size">-1,350</property>
|
||||
<property name="name">DIALOG_SVG_PRINT_base</property>
|
||||
<property name="pos"></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="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnActivate"></event>
|
||||
<event name="OnActivateApp"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnClose">OnCloseWindow</event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnHibernate"></event>
|
||||
<event name="OnIconize"></event>
|
||||
<event name="OnIdle"></event>
|
||||
<event name="OnInitDialog">OnInitDialog</event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">bMainSizer</property>
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">bUpperSizer</property>
|
||||
<property name="orient">wxHORIZONTAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxStaticBoxSizer" expanded="1">
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Layers:</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">sbLayersSizer</property>
|
||||
<property name="orient">wxHORIZONTAL</property>
|
||||
<property name="permission">none</property>
|
||||
<event name="OnUpdateUI"></event>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxStaticBoxSizer" expanded="1">
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Copper Layers:</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">m_CopperLayersBoxSizer</property>
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
<property name="permission">protected</property>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxStaticBoxSizer" expanded="1">
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Technical Layers:</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">m_TechnicalBoxSizer</property>
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
<property name="permission">protected</property>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxStaticBoxSizer" expanded="1">
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Print SVG options:</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">sbOptionsSizer</property>
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
<property name="permission">none</property>
|
||||
<event name="OnUpdateUI"></event>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxTOP|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="1">
|
||||
<property name="bg"></property>
|
||||
<property name="context_help"></property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="font"></property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Pen width mini</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">m_TextPenWidth</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pos"></property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</property>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxTextCtrl" expanded="1">
|
||||
<property name="bg"></property>
|
||||
<property name="context_help"></property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="font"></property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="maxlength">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">m_DialogPenWidth</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pos"></property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="tooltip">Selection of the minimum pen thickness used to draw items.</property>
|
||||
<property name="value"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnText"></event>
|
||||
<event name="OnTextEnter"></event>
|
||||
<event name="OnTextMaxLen"></event>
|
||||
<event name="OnTextURL"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL|wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxRadioBox" expanded="1">
|
||||
<property name="bg"></property>
|
||||
<property name="choices">"Color" "Black and White"</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="font"></property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Print mode</property>
|
||||
<property name="majorDimension">1</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">m_ModeColorOption</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pos"></property>
|
||||
<property name="selection">0</property>
|
||||
<property name="size"></property>
|
||||
<property name="style">wxRA_SPECIFY_COLS</property>
|
||||
<property name="subclass"></property>
|
||||
<property name="tooltip">Choose if you wand to draw the sheet like it appears on screen,
or in black and white mode, better to print it when using black and white printers</property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRadioBox">OnSetColorModeSelected</event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxCheckBox" expanded="1">
|
||||
<property name="bg"></property>
|
||||
<property name="checked">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="font"></property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Print Frame Ref</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">m_Print_Sheet_Ref</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pos"></property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="tooltip">Print (or not) the Frame references.</property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnCheckBox"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxCheckBox" expanded="1">
|
||||
<property name="bg"></property>
|
||||
<property name="checked">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="font"></property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Print Board Edges</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">m_PrintBoardEdgesCtrl</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pos"></property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="tooltip">Print (or not) the edges layer with others layers</property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnCheckBox"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">bButtonsSizer</property>
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL|wxALIGN_CENTER_HORIZONTAL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxButton" expanded="1">
|
||||
<property name="bg"></property>
|
||||
<property name="context_help"></property>
|
||||
<property name="default">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="font"></property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_PRINT_CURRENT</property>
|
||||
<property name="label">Print Selected</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">m_buttonPrintSelected</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pos"></property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnButtonClick">OnButtonPrintSelectedClick</event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxButton" expanded="1">
|
||||
<property name="bg"></property>
|
||||
<property name="context_help"></property>
|
||||
<property name="default">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="font"></property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_PRINT_BOARD</property>
|
||||
<property name="label">Print Board</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">m_buttonBoard</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pos"></property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnButtonClick">OnButtonPrintBoardClick</event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL|wxALIGN_CENTER_HORIZONTAL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxButton" expanded="1">
|
||||
<property name="bg"></property>
|
||||
<property name="context_help"></property>
|
||||
<property name="default">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="font"></property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_CANCEL</property>
|
||||
<property name="label">Quit</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">m_buttonQuit</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pos"></property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnButtonClick">OnButtonCancelClick</event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxTOP|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="1">
|
||||
<property name="bg"></property>
|
||||
<property name="context_help"></property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="font"></property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Filename:</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">m_staticText1</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pos"></property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</property>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxTextCtrl" expanded="1">
|
||||
<property name="bg"></property>
|
||||
<property name="context_help"></property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="font"></property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="maxlength">0</property>
|
||||
<property name="minimum_size">450,-1</property>
|
||||
<property name="name">m_FileNameCtrl</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pos"></property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="tooltip">Enter a filename if you do not want to use defaults files names
Can be used only when printing the current sheet</property>
|
||||
<property name="value"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnText"></event>
|
||||
<event name="OnTextEnter"></event>
|
||||
<event name="OnTextMaxLen"></event>
|
||||
<event name="OnTextURL"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxTOP|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="1">
|
||||
<property name="bg"></property>
|
||||
<property name="context_help"></property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="font"></property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Messages:</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">m_staticText2</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pos"></property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</property>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxTextCtrl" expanded="1">
|
||||
<property name="bg"></property>
|
||||
<property name="context_help"></property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="font"></property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="maxlength">0</property>
|
||||
<property name="minimum_size">-1,100</property>
|
||||
<property name="name">m_MessagesBox</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pos"></property>
|
||||
<property name="size"></property>
|
||||
<property name="style">wxTE_MULTILINE</property>
|
||||
<property name="subclass"></property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="value"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnText"></event>
|
||||
<event name="OnTextEnter"></event>
|
||||
<event name="OnTextMaxLen"></event>
|
||||
<event name="OnTextURL"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</wxFormBuilder_Project>
|
|
@ -0,0 +1,73 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Apr 16 2008)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO "NOT" EDIT THIS FILE!
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __dialog_SVG_print_base__
|
||||
#define __dialog_SVG_print_base__
|
||||
|
||||
#include <wx/intl.h>
|
||||
|
||||
#include <wx/string.h>
|
||||
#include <wx/sizer.h>
|
||||
#include <wx/statbox.h>
|
||||
#include <wx/gdicmn.h>
|
||||
#include <wx/stattext.h>
|
||||
#include <wx/font.h>
|
||||
#include <wx/colour.h>
|
||||
#include <wx/settings.h>
|
||||
#include <wx/textctrl.h>
|
||||
#include <wx/radiobox.h>
|
||||
#include <wx/checkbox.h>
|
||||
#include <wx/button.h>
|
||||
#include <wx/dialog.h>
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Class DIALOG_SVG_PRINT_base
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class DIALOG_SVG_PRINT_base : public wxDialog
|
||||
{
|
||||
private:
|
||||
|
||||
protected:
|
||||
enum
|
||||
{
|
||||
wxID_PRINT_CURRENT = 1000,
|
||||
wxID_PRINT_BOARD,
|
||||
};
|
||||
|
||||
wxStaticBoxSizer* m_CopperLayersBoxSizer;
|
||||
wxStaticBoxSizer* m_TechnicalBoxSizer;
|
||||
wxStaticText* m_TextPenWidth;
|
||||
wxTextCtrl* m_DialogPenWidth;
|
||||
wxRadioBox* m_ModeColorOption;
|
||||
wxCheckBox* m_Print_Sheet_Ref;
|
||||
wxCheckBox* m_PrintBoardEdgesCtrl;
|
||||
wxButton* m_buttonPrintSelected;
|
||||
wxButton* m_buttonBoard;
|
||||
wxButton* m_buttonQuit;
|
||||
wxStaticText* m_staticText1;
|
||||
wxTextCtrl* m_FileNameCtrl;
|
||||
wxStaticText* m_staticText2;
|
||||
wxTextCtrl* m_MessagesBox;
|
||||
|
||||
// Virtual event handlers, overide them in your derived class
|
||||
virtual void OnCloseWindow( wxCloseEvent& event ){ event.Skip(); }
|
||||
virtual void OnInitDialog( wxInitDialogEvent& event ){ event.Skip(); }
|
||||
virtual void OnSetColorModeSelected( wxCommandEvent& event ){ event.Skip(); }
|
||||
virtual void OnButtonPrintSelectedClick( wxCommandEvent& event ){ event.Skip(); }
|
||||
virtual void OnButtonPrintBoardClick( wxCommandEvent& event ){ event.Skip(); }
|
||||
virtual void OnButtonCancelClick( wxCommandEvent& event ){ event.Skip(); }
|
||||
|
||||
|
||||
public:
|
||||
DIALOG_SVG_PRINT_base( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Create SVG file"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 507,375 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
|
||||
~DIALOG_SVG_PRINT_base();
|
||||
|
||||
};
|
||||
|
||||
#endif //__dialog_SVG_print_base__
|
|
@ -33,6 +33,8 @@ OBJECTS= $(TARGET).o classpcb.o\
|
|||
dialog_pad_properties.o\
|
||||
dialog_pad_properties_base.o\
|
||||
dialog_pcb_text_properties.o\
|
||||
dialog_SVG_print.o\
|
||||
dialog_SVG_print_base.o\
|
||||
onrightclick.o\
|
||||
onleftclick.o\
|
||||
modedit_onclick.o\
|
||||
|
|
|
@ -92,6 +92,11 @@ void WinEDA_PcbFrame::ReCreateMenuBar()
|
|||
item->SetBitmap(print_button);
|
||||
m_FilesMenu->Append(item);
|
||||
|
||||
item = new wxMenuItem(m_FilesMenu, ID_GEN_PLOT_SVG,
|
||||
_("Print S&VG"), _("Plot pcb board in SVG format"));
|
||||
item->SetBitmap(print_button);
|
||||
m_FilesMenu->Append(item);
|
||||
|
||||
// Add plot menu
|
||||
item = new wxMenuItem(m_FilesMenu, ID_GEN_PLOT, _("&Plot"),
|
||||
_("Plot (HPGL, PostScript, or Gerber format)"));
|
||||
|
|
|
@ -116,6 +116,7 @@ BEGIN_EVENT_TABLE( WinEDA_PcbFrame, WinEDA_BasePcbFrame )
|
|||
EVT_TOOL( wxID_PASTE, WinEDA_PcbFrame::Process_Special_Functions )
|
||||
EVT_TOOL( ID_UNDO_BUTT, WinEDA_PcbFrame::Process_Special_Functions )
|
||||
EVT_TOOL( ID_GEN_PRINT, WinEDA_DrawFrame::ToPrinter )
|
||||
EVT_TOOL( ID_GEN_PLOT_SVG, WinEDA_DrawFrame::SVG_Print )
|
||||
EVT_TOOL( ID_GEN_PLOT, WinEDA_DrawFrame::Process_Special_Functions )
|
||||
EVT_TOOL( ID_FIND_ITEMS, WinEDA_PcbFrame::Process_Special_Functions )
|
||||
EVT_TOOL( ID_GET_NETLIST, WinEDA_PcbFrame::Process_Special_Functions )
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/**********************************************/
|
||||
/*lay2plot.cpp: some functions to plot boards */
|
||||
/**********************************************/
|
||||
/************************************************************/
|
||||
/* print_board_functions.cpp: some functions to plot boards */
|
||||
/************************************************************/
|
||||
|
||||
#include "fctsys.h"
|
||||
#include "gr_basic.h"
|
||||
|
|
|
@ -1,544 +0,0 @@
|
|||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// Name: svg_print.cpp
|
||||
// Purpose:
|
||||
// Author: jean-pierre Charras
|
||||
// Modified by:
|
||||
// Created: 05/02/2006 11:05:19
|
||||
// RCS-ID:
|
||||
// Copyright: License GNU
|
||||
// Licence:
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// Generated by DialogBlocks (unregistered), 05/02/2006 11:05:19
|
||||
|
||||
#if defined (__GNUG__) && !defined (NO_GCC_PRAGMA)
|
||||
#pragma implementation "svg_print.h"
|
||||
#endif
|
||||
|
||||
// For compilers that support precompilation, includes "wx/wx.h".
|
||||
#include "wx/wxprec.h"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/wx.h"
|
||||
#endif
|
||||
|
||||
////@begin includes
|
||||
////@end includes
|
||||
|
||||
#include <ctype.h>
|
||||
#include "wx/metafile.h"
|
||||
#include "wx/image.h"
|
||||
|
||||
#include "fctsys.h"
|
||||
#include "gr_basic.h"
|
||||
|
||||
#include "common.h"
|
||||
|
||||
#include "dcsvg.h"
|
||||
#include "svg_print.h"
|
||||
|
||||
#ifdef EESCHEMA
|
||||
#include "program.h"
|
||||
#endif
|
||||
|
||||
////@begin XPM images
|
||||
////@end XPM images
|
||||
|
||||
|
||||
// Keys for configuration
|
||||
#define PLOTSVGPENWIDTH_KEY wxT( "PlotSVGPenWidth")
|
||||
#define PLOTSVGMODECOLOR_KEY wxT( "PlotSVGModeColor" )
|
||||
|
||||
extern BASE_SCREEN* ActiveScreen;
|
||||
#ifdef EESCHEMA
|
||||
#define WIDTH_MAX_VALUE 100
|
||||
#else
|
||||
#define WIDTH_MAX_VALUE 1000
|
||||
#endif
|
||||
#define WIDTH_MIN_VALUE 1
|
||||
|
||||
// Variables locales
|
||||
static int s_SVGPenMinWidth; /* Minimum pen width (in internal units) for printing */
|
||||
|
||||
static int Select_PrintAll = FALSE;
|
||||
static bool Print_Sheet_Ref = TRUE;
|
||||
static int s_PlotBlackAndWhite = 0;
|
||||
|
||||
|
||||
/*******************************************************/
|
||||
void WinEDA_DrawFrame::SVG_Print( wxCommandEvent& event )
|
||||
/*******************************************************/
|
||||
|
||||
/* Prepare les structures de donnees de gestion de l'impression
|
||||
* et affiche la fenetre de dialogue de gestion de l'impression des feuilles
|
||||
*/
|
||||
{
|
||||
// Arret des commandes en cours
|
||||
if( DrawPanel->ManageCurseur && DrawPanel->ForceCloseManageCurseur )
|
||||
{
|
||||
wxClientDC dc( DrawPanel );
|
||||
|
||||
DrawPanel->PrepareDC( dc );
|
||||
DrawPanel->ForceCloseManageCurseur( DrawPanel, &dc );
|
||||
}
|
||||
SetToolID( 0, wxCURSOR_ARROW, wxEmptyString );
|
||||
|
||||
WinEDA_PrintSVGFrame frame( this );
|
||||
|
||||
frame.ShowModal();
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* WinEDA_PrintSVGFrame type definition
|
||||
*/
|
||||
|
||||
IMPLEMENT_DYNAMIC_CLASS( WinEDA_PrintSVGFrame, wxDialog )
|
||||
|
||||
/*!
|
||||
* WinEDA_PrintSVGFrame event table definition
|
||||
*/
|
||||
|
||||
BEGIN_EVENT_TABLE( WinEDA_PrintSVGFrame, wxDialog )
|
||||
|
||||
////@begin WinEDA_PrintSVGFrame event table entries
|
||||
EVT_CLOSE( WinEDA_PrintSVGFrame::OnCloseWindow )
|
||||
|
||||
EVT_RADIOBOX( ID_RADIOBOX_SETPRINTMODE, WinEDA_PrintSVGFrame::OnRadioboxSetprintmodeSelected )
|
||||
|
||||
EVT_BUTTON( ID_PRINT_EXECUTE, WinEDA_PrintSVGFrame::OnPrintExecuteClick )
|
||||
|
||||
EVT_BUTTON( wxID_CANCEL, WinEDA_PrintSVGFrame::OnCancelClick )
|
||||
|
||||
////@end WinEDA_PrintSVGFrame event table entries
|
||||
|
||||
END_EVENT_TABLE()
|
||||
|
||||
/*!
|
||||
* WinEDA_PrintSVGFrame constructors
|
||||
*/
|
||||
|
||||
WinEDA_PrintSVGFrame::WinEDA_PrintSVGFrame()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
WinEDA_PrintSVGFrame::WinEDA_PrintSVGFrame( WinEDA_DrawFrame* parent,
|
||||
wxWindowID id,
|
||||
const wxString& caption,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
long style )
|
||||
{
|
||||
m_Parent = parent;
|
||||
m_ImageXSize_mm = 270;
|
||||
wxConfig* Config = wxGetApp().m_EDA_Config;
|
||||
if( Config )
|
||||
{
|
||||
Config->Read( PLOTSVGPENWIDTH_KEY, &s_SVGPenMinWidth );
|
||||
Config->Read( PLOTSVGMODECOLOR_KEY, &s_PlotBlackAndWhite );
|
||||
}
|
||||
|
||||
Create( parent, id, caption, pos, size, style );
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* WinEDA_PrintSVGFrame creator
|
||||
*/
|
||||
|
||||
bool WinEDA_PrintSVGFrame::Create( wxWindow* parent,
|
||||
wxWindowID id,
|
||||
const wxString& caption,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
long style )
|
||||
{
|
||||
////@begin WinEDA_PrintSVGFrame member initialisation
|
||||
m_DialogPenWidthSizer = NULL;
|
||||
m_ModeColorOption = NULL;
|
||||
m_Print_Sheet_Ref = NULL;
|
||||
m_PagesOption = NULL;
|
||||
m_FileNameCtrl = NULL;
|
||||
m_MessagesBox = NULL;
|
||||
////@end WinEDA_PrintSVGFrame member initialisation
|
||||
|
||||
////@begin WinEDA_PrintSVGFrame creation
|
||||
SetExtraStyle(wxWS_EX_BLOCK_EVENTS);
|
||||
wxDialog::Create( parent, id, caption, pos, size, style );
|
||||
|
||||
CreateControls();
|
||||
if (GetSizer())
|
||||
{
|
||||
GetSizer()->SetSizeHints(this);
|
||||
}
|
||||
Centre();
|
||||
////@end WinEDA_PrintSVGFrame creation
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* Control creation for WinEDA_PrintSVGFrame
|
||||
*/
|
||||
|
||||
void WinEDA_PrintSVGFrame::CreateControls()
|
||||
{
|
||||
SetFont( *g_DialogFont );
|
||||
|
||||
////@begin WinEDA_PrintSVGFrame content construction
|
||||
// Generated by DialogBlocks, 08/01/2009 12:58:57 (unregistered)
|
||||
|
||||
WinEDA_PrintSVGFrame* itemDialog1 = this;
|
||||
|
||||
wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxVERTICAL);
|
||||
itemDialog1->SetSizer(itemBoxSizer2);
|
||||
|
||||
wxBoxSizer* itemBoxSizer3 = new wxBoxSizer(wxHORIZONTAL);
|
||||
itemBoxSizer2->Add(itemBoxSizer3, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
|
||||
|
||||
wxBoxSizer* itemBoxSizer4 = new wxBoxSizer(wxVERTICAL);
|
||||
itemBoxSizer3->Add(itemBoxSizer4, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
|
||||
|
||||
m_DialogPenWidthSizer = new wxBoxSizer(wxVERTICAL);
|
||||
itemBoxSizer4->Add(m_DialogPenWidthSizer, 0, wxGROW|wxALL, 5);
|
||||
|
||||
wxArrayString m_ModeColorOptionStrings;
|
||||
m_ModeColorOptionStrings.Add(_("Color"));
|
||||
m_ModeColorOptionStrings.Add(_("Black and White"));
|
||||
m_ModeColorOption = new wxRadioBox( itemDialog1, ID_RADIOBOX_SETPRINTMODE, _("Print mode"), wxDefaultPosition, wxDefaultSize, m_ModeColorOptionStrings, 1, wxRA_SPECIFY_COLS );
|
||||
m_ModeColorOption->SetSelection(0);
|
||||
itemBoxSizer4->Add(m_ModeColorOption, 0, wxGROW|wxALL, 5);
|
||||
|
||||
m_Print_Sheet_Ref = new wxCheckBox( itemDialog1, ID_CHECKBOX, _("Print Sheet Ref"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE );
|
||||
m_Print_Sheet_Ref->SetValue(false);
|
||||
itemBoxSizer4->Add(m_Print_Sheet_Ref, 0, wxALIGN_LEFT|wxALL, 5);
|
||||
|
||||
itemBoxSizer3->Add(5, 5, 0, wxALIGN_CENTER_VERTICAL|wxALL, 15);
|
||||
|
||||
wxBoxSizer* itemBoxSizer9 = new wxBoxSizer(wxVERTICAL);
|
||||
itemBoxSizer3->Add(itemBoxSizer9, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
|
||||
|
||||
wxArrayString m_PagesOptionStrings;
|
||||
m_PagesOptionStrings.Add(_("Current"));
|
||||
m_PagesOptionStrings.Add(_("All"));
|
||||
m_PagesOption = new wxRadioBox( itemDialog1, ID_RADIOBOX_SELPAGE, _("Page Print:"), wxDefaultPosition, wxDefaultSize, m_PagesOptionStrings, 1, wxRA_SPECIFY_COLS );
|
||||
m_PagesOption->SetSelection(0);
|
||||
itemBoxSizer9->Add(m_PagesOption, 0, wxALIGN_LEFT|wxALL, 5);
|
||||
|
||||
wxButton* itemButton11 = new wxButton( itemDialog1, ID_PRINT_EXECUTE, _("Create &File"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
itemButton11->SetDefault();
|
||||
itemButton11->SetForegroundColour(wxColour(0, 128, 0));
|
||||
itemBoxSizer9->Add(itemButton11, 0, wxGROW|wxALL, 5);
|
||||
|
||||
wxButton* itemButton12 = new wxButton( itemDialog1, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
itemButton12->SetForegroundColour(wxColour(0, 0, 198));
|
||||
itemBoxSizer9->Add(itemButton12, 0, wxGROW|wxALL, 5);
|
||||
|
||||
wxStaticText* itemStaticText13 = new wxStaticText( itemDialog1, wxID_STATIC, _("Filename:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
itemBoxSizer2->Add(itemStaticText13, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5);
|
||||
|
||||
m_FileNameCtrl = new wxTextCtrl( itemDialog1, ID_TEXTCTRL, _T(""), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
itemBoxSizer2->Add(m_FileNameCtrl, 0, wxGROW|wxLEFT|wxRIGHT|wxBOTTOM, 5);
|
||||
|
||||
wxStaticText* itemStaticText15 = new wxStaticText( itemDialog1, wxID_STATIC, _("Messages:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
itemBoxSizer2->Add(itemStaticText15, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5);
|
||||
|
||||
m_MessagesBox = new wxTextCtrl( itemDialog1, ID_TEXTCTRL1, _T(""), wxDefaultPosition, wxSize(-1, 100), wxTE_MULTILINE|wxTE_READONLY );
|
||||
itemBoxSizer2->Add(m_MessagesBox, 0, wxGROW|wxLEFT|wxRIGHT|wxBOTTOM, 5);
|
||||
|
||||
// Set validators
|
||||
m_ModeColorOption->SetValidator( wxGenericValidator(& s_PlotBlackAndWhite) );
|
||||
m_Print_Sheet_Ref->SetValidator( wxGenericValidator(& Print_Sheet_Ref) );
|
||||
////@end WinEDA_PrintSVGFrame content construction
|
||||
|
||||
SetFocus(); // Make ESC key working
|
||||
m_DialogPenWidth = new WinEDA_ValueCtrl( this, _(
|
||||
"Pen width mini" ), s_SVGPenMinWidth,
|
||||
g_UnitMetric, m_DialogPenWidthSizer,
|
||||
m_Parent->m_InternalUnits );
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* Should we show tooltips?
|
||||
*/
|
||||
|
||||
bool WinEDA_PrintSVGFrame::ShowToolTips()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* Get bitmap resources
|
||||
*/
|
||||
|
||||
wxBitmap WinEDA_PrintSVGFrame::GetBitmapResource( const wxString& name )
|
||||
{
|
||||
// Bitmap retrieval
|
||||
////@begin WinEDA_PrintSVGFrame bitmap retrieval
|
||||
wxUnusedVar(name);
|
||||
return wxNullBitmap;
|
||||
////@end WinEDA_PrintSVGFrame bitmap retrieval
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* Get icon resources
|
||||
*/
|
||||
|
||||
wxIcon WinEDA_PrintSVGFrame::GetIconResource( const wxString& name )
|
||||
{
|
||||
// Icon retrieval
|
||||
////@begin WinEDA_PrintSVGFrame icon retrieval
|
||||
wxUnusedVar(name);
|
||||
return wxNullIcon;
|
||||
////@end WinEDA_PrintSVGFrame icon retrieval
|
||||
}
|
||||
|
||||
|
||||
/********************************************/
|
||||
void WinEDA_PrintSVGFrame::SetPenWidth()
|
||||
/********************************************/
|
||||
{
|
||||
s_SVGPenMinWidth = m_DialogPenWidth->GetValue();
|
||||
|
||||
if( s_SVGPenMinWidth > WIDTH_MAX_VALUE )
|
||||
{
|
||||
s_SVGPenMinWidth = WIDTH_MAX_VALUE;
|
||||
}
|
||||
|
||||
if( s_SVGPenMinWidth < WIDTH_MIN_VALUE )
|
||||
{
|
||||
s_SVGPenMinWidth = WIDTH_MIN_VALUE;
|
||||
}
|
||||
|
||||
m_DialogPenWidth->SetValue( s_SVGPenMinWidth );
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************/
|
||||
void WinEDA_PrintSVGFrame::PrintSVGDoc( wxCommandEvent& event )
|
||||
/**************************************************************/
|
||||
|
||||
/* Called on activate "Print CURRENT" button
|
||||
*/
|
||||
{
|
||||
bool print_ref = TRUE;
|
||||
wxString msg;
|
||||
|
||||
Select_PrintAll = FALSE;
|
||||
if( m_PagesOption && (m_PagesOption->GetSelection() == 1) )
|
||||
Select_PrintAll = TRUE;
|
||||
|
||||
if( (m_Print_Sheet_Ref == NULL) || (m_Print_Sheet_Ref->GetValue() == FALSE) )
|
||||
print_ref = FALSE;
|
||||
|
||||
SetPenWidth();
|
||||
|
||||
wxString FullFileName;
|
||||
BASE_SCREEN* screen = m_Parent->GetBaseScreen();
|
||||
BASE_SCREEN* oldscreen = screen;
|
||||
#ifndef EESCHEMA
|
||||
if( Select_PrintAll )
|
||||
while( screen->Pback )
|
||||
screen = (BASE_SCREEN*) screen->Pback;
|
||||
|
||||
#endif
|
||||
|
||||
if( (m_Parent->m_Ident == PCB_FRAME) || (m_Parent->m_Ident == GERBER_FRAME) )
|
||||
{
|
||||
if( Select_PrintAll )
|
||||
{
|
||||
m_PrintMaskLayer = 0xFFFFFFFF;
|
||||
}
|
||||
else
|
||||
m_PrintMaskLayer = 1;
|
||||
}
|
||||
|
||||
if( screen == NULL )
|
||||
return;
|
||||
|
||||
#ifdef EESCHEMA
|
||||
if( Select_PrintAll && m_Parent->m_Ident == SCHEMATIC_FRAME )
|
||||
{
|
||||
WinEDA_SchematicFrame* schframe = (WinEDA_SchematicFrame*) m_Parent;
|
||||
DrawSheetPath* sheetpath, *oldsheetpath = schframe->GetSheet();
|
||||
SCH_SCREEN* schscreen = schframe->GetScreen();
|
||||
oldscreen = schscreen;
|
||||
EDA_SheetList SheetList( NULL );
|
||||
sheetpath = SheetList.GetFirst();
|
||||
DrawSheetPath list;
|
||||
|
||||
for( ; ; )
|
||||
{
|
||||
if( sheetpath == NULL )
|
||||
break;
|
||||
list.Clear();
|
||||
if( list.BuildSheetPathInfoFromSheetPathValue( sheetpath->Path() ) )
|
||||
{
|
||||
schframe->m_CurrentSheet = &list;
|
||||
schframe->m_CurrentSheet->UpdateAllScreenReferences();
|
||||
schframe->SetSheetNumberAndCount();
|
||||
schscreen = schframe->m_CurrentSheet->LastScreen();
|
||||
ActiveScreen = schscreen;
|
||||
}
|
||||
else // Should not happen
|
||||
return;
|
||||
sheetpath = SheetList.GetNext();
|
||||
|
||||
FullFileName = schframe->GetUniqueFilenameForCurrentSheet( ) + wxT( ".svg" );
|
||||
|
||||
bool success = DrawPage( FullFileName, schscreen );
|
||||
msg = _( "Create file " ) + FullFileName;
|
||||
if( !success )
|
||||
msg += _( " error" );
|
||||
msg += wxT( "\n" );
|
||||
m_MessagesBox->AppendText( msg );
|
||||
}
|
||||
schframe->m_CurrentSheet = oldsheetpath;
|
||||
schframe->m_CurrentSheet->UpdateAllScreenReferences();
|
||||
schframe->SetSheetNumberAndCount();
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
FullFileName = m_FileNameCtrl->GetValue();
|
||||
if( FullFileName.IsEmpty() )
|
||||
{
|
||||
FullFileName = screen->m_FileName;
|
||||
ChangeFileNameExt( FullFileName, wxT( ".svg" ) );
|
||||
}
|
||||
bool success = DrawPage( FullFileName, screen );
|
||||
msg = _( "Create file " ) + FullFileName;
|
||||
if( !success )
|
||||
msg += _( " error" );
|
||||
msg += wxT( "\n" );
|
||||
m_MessagesBox->AppendText( msg );
|
||||
}
|
||||
ActiveScreen = oldscreen;
|
||||
}
|
||||
|
||||
|
||||
/*****************************************************************/
|
||||
bool WinEDA_PrintSVGFrame::DrawPage( const wxString& FullFileName, BASE_SCREEN* screen )
|
||||
/*****************************************************************/
|
||||
|
||||
/*
|
||||
* Routine effective d'impression
|
||||
*/
|
||||
{
|
||||
int tmpzoom;
|
||||
wxPoint tmp_startvisu;
|
||||
wxSize SheetSize; // Sheet size in internal units
|
||||
wxPoint old_org;
|
||||
float dpi;
|
||||
bool success = TRUE;
|
||||
|
||||
/* modification des cadrages et reglages locaux */
|
||||
tmp_startvisu = screen->m_StartVisu;
|
||||
tmpzoom = screen->GetZoom();
|
||||
old_org = screen->m_DrawOrg;
|
||||
screen->m_DrawOrg.x = screen->m_DrawOrg.y = 0;
|
||||
screen->m_StartVisu.x = screen->m_StartVisu.y = 0;
|
||||
SheetSize = screen->m_CurrentSheetDesc->m_Size; // size in 1/1000 inch
|
||||
SheetSize.x *= m_Parent->m_InternalUnits / 1000;
|
||||
SheetSize.y *= m_Parent->m_InternalUnits / 1000; // size in pixels
|
||||
|
||||
screen->SetZoom( 1 );
|
||||
dpi = (float) SheetSize.x * 25.4 / m_ImageXSize_mm;
|
||||
|
||||
WinEDA_DrawPanel* panel = m_Parent->DrawPanel;
|
||||
|
||||
wxSVGFileDC dc( FullFileName, SheetSize.x, SheetSize.y, dpi );
|
||||
|
||||
if( !dc.Ok() )
|
||||
{
|
||||
DisplayError( this, wxT( "SVGprint error: wxSVGFileDC not OK" ) );
|
||||
success = FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
EDA_Rect tmp = panel->m_ClipBox;
|
||||
GRResetPenAndBrush( &dc );
|
||||
s_SVGPenMinWidth = m_DialogPenWidth->GetValue();
|
||||
SetPenMinWidth( s_SVGPenMinWidth );
|
||||
GRForceBlackPen( m_ModeColorOption->GetSelection() == 0 ? FALSE : TRUE );
|
||||
|
||||
|
||||
panel->m_ClipBox.SetX( 0 ); panel->m_ClipBox.SetY( 0 );
|
||||
panel->m_ClipBox.SetWidth( 0x7FFFFF0 ); panel->m_ClipBox.SetHeight( 0x7FFFFF0 );
|
||||
|
||||
g_IsPrinting = TRUE;
|
||||
SetLocaleTo_C_standard( ); // Switch the locale to standard C (needed to print floating point numbers like 1.3)
|
||||
panel->PrintPage( &dc, m_Print_Sheet_Ref, m_PrintMaskLayer, false );
|
||||
SetLocaleTo_Default( ); // revert to the current locale
|
||||
g_IsPrinting = FALSE;
|
||||
panel->m_ClipBox = tmp;
|
||||
}
|
||||
|
||||
|
||||
GRForceBlackPen( FALSE );
|
||||
SetPenMinWidth( 1 );
|
||||
|
||||
screen->m_StartVisu = tmp_startvisu;
|
||||
screen->m_DrawOrg = old_org;
|
||||
screen->SetZoom( tmpzoom );
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_PRINT_EXECUTE
|
||||
*/
|
||||
|
||||
void WinEDA_PrintSVGFrame::OnPrintExecuteClick( wxCommandEvent& event )
|
||||
{
|
||||
PrintSVGDoc( event );
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CLOSE
|
||||
*/
|
||||
|
||||
void WinEDA_PrintSVGFrame::OnCancelClick( wxCommandEvent& event )
|
||||
{
|
||||
Close( );
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* wxEVT_CLOSE_WINDOW event handler for ID_DIALOG
|
||||
*/
|
||||
|
||||
void WinEDA_PrintSVGFrame::OnCloseWindow( wxCloseEvent& event )
|
||||
{
|
||||
wxConfig* Config = wxGetApp().m_EDA_Config;
|
||||
|
||||
if( Config )
|
||||
{
|
||||
s_PlotBlackAndWhite = m_ModeColorOption->GetSelection();
|
||||
Config->Write( PLOTSVGPENWIDTH_KEY, s_SVGPenMinWidth );
|
||||
Config->Write( PLOTSVGMODECOLOR_KEY, s_PlotBlackAndWhite );
|
||||
}
|
||||
EndModal( 0 );
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* wxEVT_COMMAND_RADIOBOX_SELECTED event handler for ID_RADIOBOX_SETPRINTMODE
|
||||
*/
|
||||
|
||||
void WinEDA_PrintSVGFrame::OnRadioboxSetprintmodeSelected( wxCommandEvent& event )
|
||||
{
|
||||
s_PlotBlackAndWhite = m_ModeColorOption->GetSelection();
|
||||
event.Skip();
|
||||
}
|
|
@ -1,137 +0,0 @@
|
|||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: svg_print.h
|
||||
// Purpose:
|
||||
// Author: jean-pierre Charras
|
||||
// Modified by:
|
||||
// Created: 05/02/2006 11:05:20
|
||||
// RCS-ID:
|
||||
// Copyright: License GNU
|
||||
// Licence:
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// Generated by DialogBlocks (unregistered), 05/02/2006 11:05:20
|
||||
|
||||
#ifndef _SVG_PRINT_H_
|
||||
#define _SVG_PRINT_H_
|
||||
|
||||
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
|
||||
#pragma interface "svg_print.h"
|
||||
#endif
|
||||
|
||||
/*!
|
||||
* Includes
|
||||
*/
|
||||
|
||||
////@begin includes
|
||||
#include "wx/valgen.h"
|
||||
////@end includes
|
||||
|
||||
/*!
|
||||
* Forward declarations
|
||||
*/
|
||||
|
||||
////@begin forward declarations
|
||||
class wxBoxSizer;
|
||||
////@end forward declarations
|
||||
|
||||
/*!
|
||||
* Control identifiers
|
||||
*/
|
||||
|
||||
////@begin control identifiers
|
||||
#define ID_DIALOG 10000
|
||||
#define ID_RADIOBOX_SETPRINTMODE 10007
|
||||
#define ID_CHECKBOX 10004
|
||||
#define ID_RADIOBOX_SELPAGE 10008
|
||||
#define ID_PRINT_EXECUTE 10002
|
||||
#define ID_TEXTCTRL 10001
|
||||
#define ID_TEXTCTRL1 10006
|
||||
#define SYMBOL_WINEDA_PRINTSVGFRAME_STYLE wxCAPTION|wxSYSTEM_MENU|wxCLOSE_BOX|wxFRAME_FLOAT_ON_PARENT|MAYBE_RESIZE_BORDER
|
||||
#define SYMBOL_WINEDA_PRINTSVGFRAME_TITLE _("Create SVG file")
|
||||
#define SYMBOL_WINEDA_PRINTSVGFRAME_IDNAME ID_DIALOG
|
||||
#define SYMBOL_WINEDA_PRINTSVGFRAME_SIZE wxSize(400, 300)
|
||||
#define SYMBOL_WINEDA_PRINTSVGFRAME_POSITION wxDefaultPosition
|
||||
////@end control identifiers
|
||||
|
||||
/*!
|
||||
* Compatibility
|
||||
*/
|
||||
|
||||
#ifndef wxCLOSE_BOX
|
||||
#define wxCLOSE_BOX 0x1000
|
||||
#endif
|
||||
|
||||
/*!
|
||||
* WinEDA_PrintSVGFrame class declaration
|
||||
*/
|
||||
|
||||
class WinEDA_PrintSVGFrame: public wxDialog
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS( WinEDA_PrintSVGFrame )
|
||||
DECLARE_EVENT_TABLE()
|
||||
|
||||
public:
|
||||
/// Constructors
|
||||
WinEDA_PrintSVGFrame( );
|
||||
WinEDA_PrintSVGFrame( WinEDA_DrawFrame* parent,
|
||||
wxWindowID id = SYMBOL_WINEDA_PRINTSVGFRAME_IDNAME,
|
||||
const wxString& caption = SYMBOL_WINEDA_PRINTSVGFRAME_TITLE,
|
||||
const wxPoint& pos = SYMBOL_WINEDA_PRINTSVGFRAME_POSITION,
|
||||
const wxSize& size = SYMBOL_WINEDA_PRINTSVGFRAME_SIZE,
|
||||
long style = SYMBOL_WINEDA_PRINTSVGFRAME_STYLE );
|
||||
|
||||
/// Creation
|
||||
bool Create( wxWindow* parent, wxWindowID id = SYMBOL_WINEDA_PRINTSVGFRAME_IDNAME, const wxString& caption = SYMBOL_WINEDA_PRINTSVGFRAME_TITLE, const wxPoint& pos = SYMBOL_WINEDA_PRINTSVGFRAME_POSITION, const wxSize& size = SYMBOL_WINEDA_PRINTSVGFRAME_SIZE, long style = SYMBOL_WINEDA_PRINTSVGFRAME_STYLE );
|
||||
|
||||
/// Creates the controls and sizers
|
||||
void CreateControls();
|
||||
|
||||
////@begin WinEDA_PrintSVGFrame event handler declarations
|
||||
|
||||
/// wxEVT_CLOSE_WINDOW event handler for ID_DIALOG
|
||||
void OnCloseWindow( wxCloseEvent& event );
|
||||
|
||||
/// wxEVT_COMMAND_RADIOBOX_SELECTED event handler for ID_RADIOBOX_SETPRINTMODE
|
||||
void OnRadioboxSetprintmodeSelected( wxCommandEvent& event );
|
||||
|
||||
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_PRINT_EXECUTE
|
||||
void OnPrintExecuteClick( wxCommandEvent& event );
|
||||
|
||||
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CANCEL
|
||||
void OnCancelClick( wxCommandEvent& event );
|
||||
|
||||
////@end WinEDA_PrintSVGFrame event handler declarations
|
||||
|
||||
////@begin WinEDA_PrintSVGFrame member function declarations
|
||||
|
||||
/// Retrieves bitmap resources
|
||||
wxBitmap GetBitmapResource( const wxString& name );
|
||||
|
||||
/// Retrieves icon resources
|
||||
wxIcon GetIconResource( const wxString& name );
|
||||
////@end WinEDA_PrintSVGFrame member function declarations
|
||||
|
||||
/// Should we show tooltips?
|
||||
static bool ShowToolTips();
|
||||
|
||||
void PrintSVGDoc(wxCommandEvent& event);
|
||||
bool DrawPage(const wxString & FullFileName, BASE_SCREEN* screen);
|
||||
|
||||
////@begin WinEDA_PrintSVGFrame member variables
|
||||
wxBoxSizer* m_DialogPenWidthSizer;
|
||||
wxRadioBox* m_ModeColorOption;
|
||||
wxCheckBox* m_Print_Sheet_Ref;
|
||||
wxRadioBox* m_PagesOption;
|
||||
wxTextCtrl* m_FileNameCtrl;
|
||||
wxTextCtrl* m_MessagesBox;
|
||||
////@end WinEDA_PrintSVGFrame member variables
|
||||
|
||||
WinEDA_DrawFrame * m_Parent;
|
||||
WinEDA_ValueCtrl * m_DialogPenWidth;
|
||||
void SetPenWidth();
|
||||
int m_PrintMaskLayer;
|
||||
int m_ImageXSize_mm;
|
||||
};
|
||||
|
||||
#endif
|
||||
// _SVG_PRINT_H_
|
1100
share/svg_print.pjd
1100
share/svg_print.pjd
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue