28 changed files with 2833 additions and 2570 deletions
-
8CHANGELOG.txt
-
5eeschema/CMakeLists.txt
-
2eeschema/dialog_SVG_print_base.cpp
-
477eeschema/dialog_print_using_printer.cpp
-
98eeschema/dialog_print_using_printer_base.cpp
-
591eeschema/dialog_print_using_printer_base.fbp
-
71eeschema/dialog_print_using_printer_base.h
-
3eeschema/makefile.include
-
3gerbview/CMakeLists.txt
-
7gerbview/gerberframe.cpp
-
2gerbview/gerbview_config.cpp
-
2gerbview/gerbview_config.h
-
10gerbview/makefile.include
-
BINinternat/fr/kicad.mo
-
211internat/fr/kicad.po
-
5pcbnew/CMakeLists.txt
-
3pcbnew/dialog_SVG_print.cpp
-
2pcbnew/dialog_SVG_print_base.cpp
-
2pcbnew/dialog_SVG_print_base.fbp
-
417pcbnew/dialog_print_using_printer.cpp
-
156pcbnew/dialog_print_using_printer_base.cpp
-
1025pcbnew/dialog_print_using_printer_base.fbp
-
81pcbnew/dialog_print_using_printer_base.h
-
6pcbnew/makefile.include
-
18pcbnew/zones_convert_brd_items_to_polygons.cpp
-
352share/dialog_print.cpp
-
165share/dialog_print.h
-
1681share/dialog_print.pjd
@ -0,0 +1,477 @@ |
|||
/****************************************/ |
|||
/* File: dialog_print_using_printer.cpp */ |
|||
/****************************************/ |
|||
|
|||
// Set this to 1 if you want to test PostScript printing under MSW.
|
|||
#define wxTEST_POSTSCRIPT_IN_MSW 1
|
|||
#include "fctsys.h"
|
|||
|
|||
#include "common.h"
|
|||
|
|||
#include "program.h"
|
|||
#include "general.h"
|
|||
|
|||
#include "dialog_print_using_printer_base.h"
|
|||
|
|||
|
|||
#define DEFAULT_ORIENTATION_PAPER wxLANDSCAPE // other option is wxPORTRAIT
|
|||
#define WIDTH_MAX_VALUE 100
|
|||
#define WIDTH_MIN_VALUE 1
|
|||
|
|||
#define PRINTMODECOLOR_KEY wxT("PrintModeColor")
|
|||
|
|||
// static print data and page setup data, to remember settings during the session
|
|||
static wxPrintData* g_PrintData; |
|||
|
|||
// Variables locales
|
|||
static int s_OptionPrintPage = 0; |
|||
static int s_Print_Black_and_White = true; |
|||
static bool s_Print_Frame_Ref = true; |
|||
|
|||
|
|||
/* Dialog to print schematic. Class derived from DIALOG_PRINT_USING_PRINTER_base
|
|||
* created by wxFormBuilder |
|||
*/ |
|||
class DIALOG_PRINT_USING_PRINTER : public DIALOG_PRINT_USING_PRINTER_base |
|||
{ |
|||
private: |
|||
WinEDA_DrawFrame* m_Parent; |
|||
wxConfig* m_Config; |
|||
|
|||
public: |
|||
DIALOG_PRINT_USING_PRINTER( WinEDA_DrawFrame* parent ); |
|||
~DIALOG_PRINT_USING_PRINTER() {}; |
|||
|
|||
private: |
|||
void OnCloseWindow( wxCloseEvent& event ); |
|||
void OnInitDialog( wxInitDialogEvent& event ); |
|||
void OnPrintSetup( wxCommandEvent& event ); |
|||
void OnPrintPreview( wxCommandEvent& event ); |
|||
void OnPrintButtonClick( wxCommandEvent& event ); |
|||
void OnButtonCancelClick( wxCommandEvent& event ){ Close(); } |
|||
void SetPenWidth(); |
|||
}; |
|||
|
|||
/***************************/ |
|||
/* Gestion de l'impression */ |
|||
/***************************/ |
|||
|
|||
class EDA_Printout : public wxPrintout |
|||
{ |
|||
public: |
|||
bool m_Print_Sheet_Ref; |
|||
|
|||
public: |
|||
WinEDA_DrawFrame* m_Parent; |
|||
DIALOG_PRINT_USING_PRINTER* m_PrintFrame; |
|||
|
|||
EDA_Printout( DIALOG_PRINT_USING_PRINTER* aPrint_frame, |
|||
WinEDA_DrawFrame* aParent, |
|||
const wxString& aTitle, |
|||
bool aPrint_ref ) : |
|||
wxPrintout( aTitle ) |
|||
{ |
|||
m_PrintFrame = aPrint_frame; |
|||
m_Parent = aParent; |
|||
m_Print_Sheet_Ref = aPrint_ref; |
|||
} |
|||
|
|||
|
|||
bool OnPrintPage( int page ); |
|||
bool HasPage( int page ); |
|||
bool OnBeginDocument( int startPage, int endPage ); |
|||
void GetPageInfo( int* minPage, int* maxPage, int* selPageFrom, int* selPageTo ); |
|||
|
|||
void DrawPage(); |
|||
}; |
|||
|
|||
/*******************************************************/ |
|||
void WinEDA_DrawFrame::ToPrinter( wxCommandEvent& event ) |
|||
/*******************************************************/ |
|||
|
|||
/* Virtual function
|
|||
* Calls the print dialog for Eeschema |
|||
*/ |
|||
{ |
|||
if( g_PrintData == NULL ) // First call. creates print handlers
|
|||
{ |
|||
g_PrintData = new wxPrintData(); |
|||
|
|||
if( !g_PrintData->Ok() ) |
|||
{ |
|||
DisplayError( this, _( "Error Init Printer info" ) ); |
|||
} |
|||
g_PrintData->SetQuality( wxPRINT_QUALITY_HIGH ); // Default resolution = HIGHT;
|
|||
g_PrintData->SetOrientation( DEFAULT_ORIENTATION_PAPER ); |
|||
} |
|||
|
|||
DIALOG_PRINT_USING_PRINTER* frame = new DIALOG_PRINT_USING_PRINTER( this ); |
|||
|
|||
frame->ShowModal(); frame->Destroy(); |
|||
} |
|||
|
|||
|
|||
/*************************************************************************************/ |
|||
DIALOG_PRINT_USING_PRINTER::DIALOG_PRINT_USING_PRINTER( WinEDA_DrawFrame* parent ) : |
|||
DIALOG_PRINT_USING_PRINTER_base( parent ) |
|||
/*************************************************************************************/ |
|||
{ |
|||
m_Parent = parent; |
|||
m_Config = wxGetApp().m_EDA_Config; |
|||
} |
|||
|
|||
|
|||
/************************************************************************/ |
|||
void DIALOG_PRINT_USING_PRINTER::OnInitDialog( wxInitDialogEvent& event ) |
|||
/************************************************************************/ |
|||
{ |
|||
SetFont(*g_DialogFont); |
|||
SetFocus(); |
|||
|
|||
if( m_Config ) |
|||
{ |
|||
m_Config->Read( OPTKEY_PLOT_LINEWIDTH_VALUE, &g_PlotLine_Width ); |
|||
m_Config->Read( PRINTMODECOLOR_KEY, &s_Print_Black_and_White ); |
|||
} |
|||
|
|||
AddUnitSymbol(* m_TextPenWidth, g_UnitMetric ); |
|||
m_DialogPenWidth->SetValue( |
|||
ReturnStringFromValue(g_UnitMetric, g_PlotLine_Width, m_Parent->m_InternalUnits ) ); |
|||
m_Print_Sheet_Ref->SetValue( s_Print_Frame_Ref ); |
|||
|
|||
m_ModeColorOption->SetSelection( s_Print_Black_and_White ? 1 : 0); |
|||
m_Print_Sheet_Ref->SetValue(s_Print_Frame_Ref); |
|||
|
|||
if (GetSizer()) |
|||
{ |
|||
GetSizer()->SetSizeHints(this); |
|||
} |
|||
} |
|||
|
|||
|
|||
/*********************************************************************/ |
|||
void DIALOG_PRINT_USING_PRINTER::OnCloseWindow( wxCloseEvent& event ) |
|||
/*********************************************************************/ |
|||
{ |
|||
s_Print_Black_and_White = m_ModeColorOption->GetSelection(); |
|||
s_Print_Frame_Ref = m_Print_Sheet_Ref->GetValue(); |
|||
SetPenWidth(); |
|||
|
|||
if( m_Config ) |
|||
{ |
|||
m_Config->Write( OPTKEY_PLOT_LINEWIDTH_VALUE, g_PlotLine_Width ); |
|||
m_Config->Write( PRINTMODECOLOR_KEY, s_Print_Black_and_White ); |
|||
} |
|||
|
|||
EndModal( 0 ); |
|||
} |
|||
|
|||
|
|||
/****************************************/ |
|||
void DIALOG_PRINT_USING_PRINTER::SetPenWidth() |
|||
/****************************************/ |
|||
|
|||
/* Get the new pen width value, and verify min et max value
|
|||
* NOTE: g_PlotLine_Width is in internal units |
|||
*/ |
|||
{ |
|||
g_PlotLine_Width = ReturnValueFromTextCtrl( *m_DialogPenWidth, m_Parent->m_InternalUnits ); |
|||
|
|||
if( g_PlotLine_Width > WIDTH_MAX_VALUE ) |
|||
{ |
|||
g_PlotLine_Width = WIDTH_MAX_VALUE; |
|||
} |
|||
|
|||
if( g_PlotLine_Width < WIDTH_MIN_VALUE ) |
|||
{ |
|||
g_PlotLine_Width = WIDTH_MIN_VALUE; |
|||
} |
|||
|
|||
m_DialogPenWidth->SetValue( |
|||
ReturnStringFromValue(g_UnitMetric, g_PlotLine_Width, m_Parent->m_InternalUnits ) ); |
|||
} |
|||
|
|||
|
|||
/**********************************************************/ |
|||
void DIALOG_PRINT_USING_PRINTER::OnPrintSetup( wxCommandEvent& event ) |
|||
/**********************************************************/ |
|||
|
|||
/* Open a dialog box for printer setup (printer options, page size ...)
|
|||
*/ |
|||
{ |
|||
wxPrintDialogData printDialogData( *g_PrintData ); |
|||
|
|||
if( printDialogData.Ok() ) |
|||
{ |
|||
wxPrintDialog printerDialog( this, &printDialogData ); |
|||
|
|||
printerDialog.ShowModal(); |
|||
|
|||
*g_PrintData = printerDialog.GetPrintDialogData().GetPrintData(); |
|||
} |
|||
else |
|||
DisplayError( this, _( "Printer Problem!" ) ); |
|||
} |
|||
|
|||
|
|||
/***********************************************************************/ |
|||
void DIALOG_PRINT_USING_PRINTER::OnPrintPreview( wxCommandEvent& event ) |
|||
/***********************************************************************/ |
|||
|
|||
/* Open and display a previewer frame for printing
|
|||
*/ |
|||
{ |
|||
wxSize WSize; |
|||
wxPoint WPos; |
|||
bool print_ref = m_Print_Sheet_Ref->GetValue(); |
|||
|
|||
s_Print_Black_and_White = m_ModeColorOption->GetSelection(); |
|||
SetPenWidth(); |
|||
|
|||
s_OptionPrintPage = m_PagesOption->GetSelection(); |
|||
|
|||
// Pass two printout objects: for preview, and possible printing.
|
|||
wxString title = _("Preview"); |
|||
wxPrintPreview* preview = |
|||
new wxPrintPreview( new EDA_Printout( this, m_Parent, title, print_ref ), |
|||
new EDA_Printout( this, m_Parent, title, print_ref ), g_PrintData ); |
|||
|
|||
if( preview == NULL ) |
|||
{ |
|||
DisplayError( this, wxT( "OnPrintPreview() problem" ) ); |
|||
return; |
|||
} |
|||
|
|||
WPos = m_Parent->GetPosition( ); |
|||
WSize = m_Parent->GetSize(); |
|||
|
|||
wxPreviewFrame* frame = new wxPreviewFrame( preview, this, |
|||
title, WPos, WSize ); |
|||
|
|||
frame->Initialize(); |
|||
frame->Show( true ); |
|||
} |
|||
|
|||
|
|||
/**************************************************************************/ |
|||
void DIALOG_PRINT_USING_PRINTER::OnPrintButtonClick( wxCommandEvent& event ) |
|||
/**************************************************************************/ |
|||
{ |
|||
bool print_ref = m_Print_Sheet_Ref->GetValue(); |
|||
|
|||
s_Print_Black_and_White = m_ModeColorOption->GetSelection(); |
|||
|
|||
s_OptionPrintPage = 0; |
|||
if( m_PagesOption ) |
|||
s_OptionPrintPage = m_PagesOption->GetSelection(); |
|||
|
|||
SetPenWidth(); |
|||
|
|||
wxPrintDialogData printDialogData( *g_PrintData ); |
|||
|
|||
wxPrinter printer( &printDialogData ); |
|||
|
|||
wxString title = _("Preview"); |
|||
EDA_Printout printout( this, m_Parent, title, print_ref ); |
|||
|
|||
#ifndef __WINDOWS__
|
|||
wxDC* dc = printout.GetDC(); |
|||
( (wxPostScriptDC*) dc )->SetResolution( 600 ); // Postscript DC resolution is 600 ppi
|
|||
#endif
|
|||
|
|||
if( !printer.Print( this, &printout, true ) ) |
|||
{ |
|||
if( wxPrinter::GetLastError() == wxPRINTER_ERROR ) |
|||
DisplayError( this, _( "There was a problem printing" ) ); |
|||
return; |
|||
} |
|||
else |
|||
{ |
|||
*g_PrintData = printer.GetPrintDialogData().GetPrintData(); |
|||
} |
|||
} |
|||
|
|||
|
|||
/***************************************/ |
|||
bool EDA_Printout::OnPrintPage( int page ) |
|||
/***************************************/ |
|||
{ |
|||
wxString msg; |
|||
|
|||
msg.Printf( _( "Print page %d" ), page ); |
|||
m_Parent->Affiche_Message( msg ); |
|||
|
|||
WinEDA_SchematicFrame* schframe = (WinEDA_SchematicFrame*) m_Parent; |
|||
SCH_SCREEN* screen = schframe->GetScreen(); |
|||
SCH_SCREEN* oldscreen = screen; |
|||
DrawSheetPath* oldsheetpath = schframe->GetSheet(); |
|||
|
|||
|
|||
DrawSheetPath list; |
|||
if( s_OptionPrintPage == 1 ) |
|||
{ |
|||
/* Print all pages, so when called, the page is not the current page.
|
|||
* We must select it and setup references and others parameters |
|||
* because in complex hierarchies a SCH_SCREEN (a schematic drawings) |
|||
* is shared between many sheets |
|||
*/ |
|||
EDA_SheetList SheetList( NULL ); |
|||
DrawSheetPath* sheetpath = SheetList.GetSheet( page - 1 ); |
|||
if( list.BuildSheetPathInfoFromSheetPathValue( sheetpath->Path() ) ) |
|||
{ |
|||
schframe->m_CurrentSheet = &list; |
|||
schframe->m_CurrentSheet->UpdateAllScreenReferences(); |
|||
schframe->SetSheetNumberAndCount(); |
|||
screen = schframe->m_CurrentSheet->LastScreen(); |
|||
} |
|||
else |
|||
screen = NULL; |
|||
} |
|||
|
|||
if( screen == NULL ) |
|||
return false; |
|||
ActiveScreen = screen; |
|||
DrawPage(); |
|||
ActiveScreen = oldscreen; |
|||
schframe->m_CurrentSheet = oldsheetpath; |
|||
schframe->m_CurrentSheet->UpdateAllScreenReferences(); |
|||
schframe->SetSheetNumberAndCount(); |
|||
|
|||
return true; |
|||
} |
|||
|
|||
|
|||
/*********************************************************/ |
|||
void EDA_Printout::GetPageInfo( int* minPage, int* maxPage, |
|||
int* selPageFrom, int* selPageTo ) |
|||
/*********************************************************/ |
|||
{ |
|||
int ii = 1; |
|||
|
|||
*minPage = 1; |
|||
*selPageFrom = 1; |
|||
|
|||
if( s_OptionPrintPage == 1 ) |
|||
{ |
|||
ii = g_RootSheet->CountSheets(); |
|||
} |
|||
|
|||
*maxPage = ii; |
|||
*selPageTo = ii; |
|||
} |
|||
|
|||
|
|||
/**************************************/ |
|||
bool EDA_Printout::HasPage( int pageNum ) |
|||
/**************************************/ |
|||
{ |
|||
int pageCount; |
|||
|
|||
pageCount = g_RootSheet->CountSheets(); |
|||
if( pageCount >= pageNum ) |
|||
return true; |
|||
|
|||
return false; |
|||
} |
|||
|
|||
|
|||
/*************************************************************/ |
|||
bool EDA_Printout::OnBeginDocument( int startPage, int endPage ) |
|||
/*************************************************************/ |
|||
{ |
|||
if( !wxPrintout::OnBeginDocument( startPage, endPage ) ) |
|||
return false; |
|||
|
|||
return true; |
|||
} |
|||
|
|||
|
|||
/********************************/ |
|||
void EDA_Printout::DrawPage() |
|||
/********************************/ |
|||
|
|||
/*
|
|||
* This is the real print function: print the active screen |
|||
*/ |
|||
{ |
|||
int tmpzoom; |
|||
wxPoint tmp_startvisu; |
|||
wxSize PageSize_in_mm; |
|||
wxSize SheetSize; // Page size in internal units
|
|||
wxSize PlotAreaSize; // plot area size in pixels
|
|||
double scaleX, scaleY, scale; |
|||
wxPoint old_org; |
|||
wxPoint DrawOffset; // Offset de trace
|
|||
int DrawZoom = 1; |
|||
wxDC* dc = GetDC(); |
|||
|
|||
wxBusyCursor dummy; |
|||
|
|||
GetPageSizeMM( &PageSize_in_mm.x, &PageSize_in_mm.y ); |
|||
|
|||
/* Save old draw scale and draw offset */ |
|||
tmp_startvisu = ActiveScreen->m_StartVisu; |
|||
tmpzoom = ActiveScreen->GetZoom(); |
|||
old_org = ActiveScreen->m_DrawOrg; |
|||
/* Change draw scale and offset to draw the whole page */ |
|||
ActiveScreen->SetZoom( DrawZoom ); |
|||
ActiveScreen->m_DrawOrg.x = ActiveScreen->m_DrawOrg.y = 0; |
|||
ActiveScreen->m_StartVisu.x = ActiveScreen->m_StartVisu.y = 0; |
|||
|
|||
SheetSize = ActiveScreen->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
|
|||
|
|||
// Get the size of the DC in pixels
|
|||
dc->GetSize( &PlotAreaSize.x, &PlotAreaSize.y ); |
|||
|
|||
// Calculate a suitable scaling factor
|
|||
scaleX = (double) SheetSize.x / PlotAreaSize.x; |
|||
scaleY = (double) SheetSize.y / PlotAreaSize.y; |
|||
scale = wxMax( scaleX, scaleY ); // Use x or y scaling factor, whichever fits on the DC
|
|||
|
|||
// ajust the real draw scale
|
|||
dc->SetUserScale( DrawZoom / scale, DrawZoom / scale ); |
|||
|
|||
ActiveScreen->m_DrawOrg = DrawOffset; |
|||
|
|||
GRResetPenAndBrush( dc ); |
|||
if( s_Print_Black_and_White ) |
|||
GRForceBlackPen( true ); |
|||
|
|||
|
|||
/* set Pen min width */ |
|||
double ftmp, xdcscale, ydcscale; |
|||
|
|||
// g_PlotLine_Width is in internal units ( 1/1000 inch), and must be converted in pixels
|
|||
ftmp = (float) g_PlotLine_Width * 25.4 / EESCHEMA_INTERNAL_UNIT; // ftmp est en mm
|
|||
ftmp *= (float) PlotAreaSize.x / PageSize_in_mm.x; /* ftmp is in pixels */ |
|||
|
|||
/* because the pen size will be scaled by the dc scale, we modify the size
|
|||
* in order to keep the requested value */ |
|||
dc->GetUserScale( &xdcscale, &ydcscale ); |
|||
ftmp /= xdcscale; |
|||
SetPenMinWidth( (int) round( ftmp ) ); |
|||
|
|||
WinEDA_DrawPanel* panel = m_Parent->DrawPanel; |
|||
EDA_Rect tmp = panel->m_ClipBox; |
|||
|
|||
panel->m_ClipBox.SetOrigin( wxPoint( 0, 0 ) ); |
|||
panel->m_ClipBox.SetSize( wxSize( 0x7FFFFF0, 0x7FFFFF0 ) ); |
|||
|
|||
g_IsPrinting = true; |
|||
int bg_color = g_DrawBgColor; |
|||
|
|||
panel->PrintPage( dc, m_Print_Sheet_Ref, 0xFFFFFFFF, false ); |
|||
|
|||
g_DrawBgColor = bg_color; |
|||
g_IsPrinting = false; |
|||
panel->m_ClipBox = tmp; |
|||
|
|||
SetPenMinWidth( 1 ); |
|||
GRForceBlackPen( false ); |
|||
|
|||
ActiveScreen->m_StartVisu = tmp_startvisu; |
|||
ActiveScreen->m_DrawOrg = old_org; |
|||
ActiveScreen->SetZoom( tmpzoom ); |
|||
} |
|||
@ -0,0 +1,98 @@ |
|||
///////////////////////////////////////////////////////////////////////////
|
|||
// C++ code generated with wxFormBuilder (version Apr 16 2008)
|
|||
// http://www.wxformbuilder.org/
|
|||
//
|
|||
// PLEASE DO "NOT" EDIT THIS FILE!
|
|||
///////////////////////////////////////////////////////////////////////////
|
|||
|
|||
#include "dialog_print_using_printer_base.h"
|
|||
|
|||
///////////////////////////////////////////////////////////////////////////
|
|||
|
|||
DIALOG_PRINT_USING_PRINTER_base::DIALOG_PRINT_USING_PRINTER_base( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) |
|||
{ |
|||
this->SetSizeHints( wxSize( -1,-1 ), wxDefaultSize ); |
|||
|
|||
wxBoxSizer* bMainSizer; |
|||
bMainSizer = new wxBoxSizer( wxHORIZONTAL ); |
|||
|
|||
wxBoxSizer* bleftSizer; |
|||
bleftSizer = new wxBoxSizer( wxVERTICAL ); |
|||
|
|||
wxStaticBoxSizer* sbOptionsSizer; |
|||
sbOptionsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Options:") ), wxVERTICAL ); |
|||
|
|||
m_TextPenWidth = new wxStaticText( this, wxID_ANY, _("Pen Width Mini"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
m_TextPenWidth->Wrap( -1 ); |
|||
sbOptionsSizer->Add( m_TextPenWidth, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); |
|||
|
|||
m_DialogPenWidth = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); |
|||
m_DialogPenWidth->SetToolTip( _("Selection of the minimum pen thickness used to draw items.") ); |
|||
m_DialogPenWidth->SetMinSize( wxSize( 200,-1 ) ); |
|||
|
|||
sbOptionsSizer->Add( m_DialogPenWidth, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); |
|||
|
|||
m_Print_Sheet_Ref = new wxCheckBox( this, wxID_FRAME_SEL, _("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 ); |
|||
|
|||
bleftSizer->Add( sbOptionsSizer, 1, wxEXPAND|wxALL, 5 ); |
|||
|
|||
wxString m_ModeColorOptionChoices[] = { _("Color"), _("Black and white") }; |
|||
int m_ModeColorOptionNChoices = sizeof( m_ModeColorOptionChoices ) / sizeof( wxString ); |
|||
m_ModeColorOption = new wxRadioBox( this, wxID_PRINT_MODE, _("Print Mode"), wxDefaultPosition, wxDefaultSize, m_ModeColorOptionNChoices, m_ModeColorOptionChoices, 1, wxRA_SPECIFY_COLS ); |
|||
m_ModeColorOption->SetSelection( 1 ); |
|||
m_ModeColorOption->SetToolTip( _("Choose if you wand to draw the sheet like it appears on screen,\nor in black and white mode, better to print it when using black and white printers") ); |
|||
|
|||
bleftSizer->Add( m_ModeColorOption, 0, wxALL|wxEXPAND, 5 ); |
|||
|
|||
wxString m_PagesOptionChoices[] = { _("Current"), _("All") }; |
|||
int m_PagesOptionNChoices = sizeof( m_PagesOptionChoices ) / sizeof( wxString ); |
|||
m_PagesOption = new wxRadioBox( this, wxID_PAGE_MODE, _("Page Print"), wxDefaultPosition, wxDefaultSize, m_PagesOptionNChoices, m_PagesOptionChoices, 1, wxRA_SPECIFY_COLS ); |
|||
m_PagesOption->SetSelection( 0 ); |
|||
bleftSizer->Add( m_PagesOption, 0, wxALL|wxEXPAND, 5 ); |
|||
|
|||
bMainSizer->Add( bleftSizer, 1, wxEXPAND, 5 ); |
|||
|
|||
wxBoxSizer* bbuttonsSizer; |
|||
bbuttonsSizer = new wxBoxSizer( wxVERTICAL ); |
|||
|
|||
m_buttonOption = new wxButton( this, wxID_PRINT_OPTIONS, _("Page Options"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
bbuttonsSizer->Add( m_buttonOption, 0, wxALL, 5 ); |
|||
|
|||
m_buttonPreview = new wxButton( this, wxID_PREVIEW, _("Preview"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
bbuttonsSizer->Add( m_buttonPreview, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); |
|||
|
|||
m_buttonPrint = new wxButton( this, wxID_PRINT_ALL, _("Print"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
bbuttonsSizer->Add( m_buttonPrint, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); |
|||
|
|||
m_buttonQuit = new wxButton( this, wxID_CANCEL, _("Close"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
bbuttonsSizer->Add( m_buttonQuit, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); |
|||
|
|||
bMainSizer->Add( bbuttonsSizer, 0, wxALIGN_CENTER_VERTICAL, 5 ); |
|||
|
|||
this->SetSizer( bMainSizer ); |
|||
this->Layout(); |
|||
|
|||
// Connect Events
|
|||
this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_PRINT_USING_PRINTER_base::OnCloseWindow ) ); |
|||
this->Connect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_PRINT_USING_PRINTER_base::OnInitDialog ) ); |
|||
m_buttonOption->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_base::OnPrintSetup ), NULL, this ); |
|||
m_buttonPreview->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_base::OnPrintPreview ), NULL, this ); |
|||
m_buttonPrint->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_base::OnPrintButtonClick ), NULL, this ); |
|||
m_buttonQuit->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_base::OnButtonCancelClick ), NULL, this ); |
|||
} |
|||
|
|||
DIALOG_PRINT_USING_PRINTER_base::~DIALOG_PRINT_USING_PRINTER_base() |
|||
{ |
|||
// Disconnect Events
|
|||
this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_PRINT_USING_PRINTER_base::OnCloseWindow ) ); |
|||
this->Disconnect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_PRINT_USING_PRINTER_base::OnInitDialog ) ); |
|||
m_buttonOption->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_base::OnPrintSetup ), NULL, this ); |
|||
m_buttonPreview->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_base::OnPrintPreview ), NULL, this ); |
|||
m_buttonPrint->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_base::OnPrintButtonClick ), NULL, this ); |
|||
m_buttonQuit->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_base::OnButtonCancelClick ), NULL, this ); |
|||
} |
|||
@ -0,0 +1,591 @@ |
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> |
|||
<wxFormBuilder_Project> |
|||
<FileVersion major="1" minor="9" /> |
|||
<object class="Project" expanded="1"> |
|||
<property name="class_decoration"></property> |
|||
<property name="code_generation">C++</property> |
|||
<property name="disconnect_events">1</property> |
|||
<property name="encoding">UTF-8</property> |
|||
<property name="event_generation">connect</property> |
|||
<property name="file">dialog_print_using_printer_base</property> |
|||
<property name="first_id">1000</property> |
|||
<property name="help_provider">none</property> |
|||
<property name="internationalize">1</property> |
|||
<property name="name">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_PRINT_USING_PRINTER_base</property> |
|||
<property name="pos"></property> |
|||
<property name="size">336,268</property> |
|||
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property> |
|||
<property name="subclass"></property> |
|||
<property name="title">Print</property> |
|||
<property name="tooltip"></property> |
|||
<property name="window_extra_style"></property> |
|||
<property name="window_name"></property> |
|||
<property name="window_style"></property> |
|||
<event name="OnActivate"></event> |
|||
<event name="OnActivateApp"></event> |
|||
<event name="OnChar"></event> |
|||
<event name="OnClose">OnCloseWindow</event> |
|||
<event name="OnEnterWindow"></event> |
|||
<event name="OnEraseBackground"></event> |
|||
<event name="OnHibernate"></event> |
|||
<event name="OnIconize"></event> |
|||
<event name="OnIdle"></event> |
|||
<event name="OnInitDialog">OnInitDialog</event> |
|||
<event name="OnKeyDown"></event> |
|||
<event name="OnKeyUp"></event> |
|||
<event name="OnKillFocus"></event> |
|||
<event name="OnLeaveWindow"></event> |
|||
<event name="OnLeftDClick"></event> |
|||
<event name="OnLeftDown"></event> |
|||
<event name="OnLeftUp"></event> |
|||
<event name="OnMiddleDClick"></event> |
|||
<event name="OnMiddleDown"></event> |
|||
<event name="OnMiddleUp"></event> |
|||
<event name="OnMotion"></event> |
|||
<event name="OnMouseEvents"></event> |
|||
<event name="OnMouseWheel"></event> |
|||
<event name="OnPaint"></event> |
|||
<event name="OnRightDClick"></event> |
|||
<event name="OnRightDown"></event> |
|||
<event name="OnRightUp"></event> |
|||
<event name="OnSetFocus"></event> |
|||
<event name="OnSize"></event> |
|||
<event name="OnUpdateUI"></event> |
|||
<object class="wxBoxSizer" expanded="1"> |
|||
<property name="minimum_size"></property> |
|||
<property name="name">bMainSizer</property> |
|||
<property name="orient">wxHORIZONTAL</property> |
|||
<property name="permission">none</property> |
|||
<object class="sizeritem" expanded="1"> |
|||
<property name="border">5</property> |
|||
<property name="flag">wxEXPAND</property> |
|||
<property name="proportion">1</property> |
|||
<object class="wxBoxSizer" expanded="1"> |
|||
<property name="minimum_size"></property> |
|||
<property name="name">bleftSizer</property> |
|||
<property name="orient">wxVERTICAL</property> |
|||
<property name="permission">none</property> |
|||
<object class="sizeritem" expanded="1"> |
|||
<property name="border">5</property> |
|||
<property name="flag">wxEXPAND|wxALL</property> |
|||
<property name="proportion">1</property> |
|||
<object class="wxStaticBoxSizer" expanded="1"> |
|||
<property name="id">wxID_ANY</property> |
|||
<property name="label">Options:</property> |
|||
<property name="minimum_size"></property> |
|||
<property name="name">sbOptionsSizer</property> |
|||
<property name="orient">wxVERTICAL</property> |
|||
<property name="permission">none</property> |
|||
<event name="OnUpdateUI"></event> |
|||
<object class="sizeritem" expanded="1"> |
|||
<property name="border">5</property> |
|||
<property name="flag">wxTOP|wxRIGHT|wxLEFT</property> |
|||
<property name="proportion">0</property> |
|||
<object class="wxStaticText" expanded="1"> |
|||
<property name="bg"></property> |
|||
<property name="context_help"></property> |
|||
<property name="enabled">1</property> |
|||
<property name="fg"></property> |
|||
<property name="font"></property> |
|||
<property name="hidden">0</property> |
|||
<property name="id">wxID_ANY</property> |
|||
<property name="label">Pen Width Mini</property> |
|||
<property name="maximum_size"></property> |
|||
<property name="minimum_size"></property> |
|||
<property name="name">m_TextPenWidth</property> |
|||
<property name="permission">protected</property> |
|||
<property name="pos"></property> |
|||
<property name="size"></property> |
|||
<property name="style"></property> |
|||
<property name="subclass"></property> |
|||
<property name="tooltip"></property> |
|||
<property name="window_extra_style"></property> |
|||
<property name="window_name"></property> |
|||
<property name="window_style"></property> |
|||
<property name="wrap">-1</property> |
|||
<event name="OnChar"></event> |
|||
<event name="OnEnterWindow"></event> |
|||
<event name="OnEraseBackground"></event> |
|||
<event name="OnKeyDown"></event> |
|||
<event name="OnKeyUp"></event> |
|||
<event name="OnKillFocus"></event> |
|||
<event name="OnLeaveWindow"></event> |
|||
<event name="OnLeftDClick"></event> |
|||
<event name="OnLeftDown"></event> |
|||
<event name="OnLeftUp"></event> |
|||
<event name="OnMiddleDClick"></event> |
|||
<event name="OnMiddleDown"></event> |
|||
<event name="OnMiddleUp"></event> |
|||
<event name="OnMotion"></event> |
|||
<event name="OnMouseEvents"></event> |
|||
<event name="OnMouseWheel"></event> |
|||
<event name="OnPaint"></event> |
|||
<event name="OnRightDClick"></event> |
|||
<event name="OnRightDown"></event> |
|||
<event name="OnRightUp"></event> |
|||
<event name="OnSetFocus"></event> |
|||
<event name="OnSize"></event> |
|||
<event name="OnUpdateUI"></event> |
|||
</object> |
|||
</object> |
|||
<object class="sizeritem" expanded="1"> |
|||
<property name="border">5</property> |
|||
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND</property> |
|||
<property name="proportion">0</property> |
|||
<object class="wxTextCtrl" expanded="1"> |
|||
<property name="bg"></property> |
|||
<property name="context_help"></property> |
|||
<property name="enabled">1</property> |
|||
<property name="fg"></property> |
|||
<property name="font"></property> |
|||
<property name="hidden">0</property> |
|||
<property name="id">wxID_ANY</property> |
|||
<property name="maximum_size"></property> |
|||
<property name="maxlength">0</property> |
|||
<property name="minimum_size">200,-1</property> |
|||
<property name="name">m_DialogPenWidth</property> |
|||
<property name="permission">protected</property> |
|||
<property name="pos"></property> |
|||
<property name="size"></property> |
|||
<property name="style"></property> |
|||
<property name="subclass"></property> |
|||
<property name="tooltip">Selection of the minimum pen thickness used to draw items.</property> |
|||
<property name="value"></property> |
|||
<property name="window_extra_style"></property> |
|||
<property name="window_name"></property> |
|||
<property name="window_style"></property> |
|||
<event name="OnChar"></event> |
|||
<event name="OnEnterWindow"></event> |
|||
<event name="OnEraseBackground"></event> |
|||
<event name="OnKeyDown"></event> |
|||
<event name="OnKeyUp"></event> |
|||
<event name="OnKillFocus"></event> |
|||
<event name="OnLeaveWindow"></event> |
|||
<event name="OnLeftDClick"></event> |
|||
<event name="OnLeftDown"></event> |
|||
<event name="OnLeftUp"></event> |
|||
<event name="OnMiddleDClick"></event> |
|||
<event name="OnMiddleDown"></event> |
|||
<event name="OnMiddleUp"></event> |
|||
<event name="OnMotion"></event> |
|||
<event name="OnMouseEvents"></event> |
|||
<event name="OnMouseWheel"></event> |
|||
<event name="OnPaint"></event> |
|||
<event name="OnRightDClick"></event> |
|||
<event name="OnRightDown"></event> |
|||
<event name="OnRightUp"></event> |
|||
<event name="OnSetFocus"></event> |
|||
<event name="OnSize"></event> |
|||
<event name="OnText"></event> |
|||
<event name="OnTextEnter"></event> |
|||
<event name="OnTextMaxLen"></event> |
|||
<event name="OnTextURL"></event> |
|||
<event name="OnUpdateUI"></event> |
|||
</object> |
|||
</object> |
|||
<object class="sizeritem" expanded="1"> |
|||
<property name="border">5</property> |
|||
<property name="flag">wxALL</property> |
|||
<property name="proportion">0</property> |
|||
<object class="wxCheckBox" expanded="1"> |
|||
<property name="bg"></property> |
|||
<property name="checked">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_FRAME_SEL</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">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_PRINT_MODE</property> |
|||
<property name="label">Print Mode</property> |
|||
<property name="majorDimension">1</property> |
|||
<property name="maximum_size"></property> |
|||
<property name="minimum_size"></property> |
|||
<property name="name">m_ModeColorOption</property> |
|||
<property name="permission">protected</property> |
|||
<property name="pos"></property> |
|||
<property name="selection">1</property> |
|||
<property name="size"></property> |
|||
<property name="style">wxRA_SPECIFY_COLS</property> |
|||
<property name="subclass"></property> |
|||
<property name="tooltip">Choose if you wand to draw the sheet like it appears on screen,
or in black and white mode, better to print it when using black and white printers</property> |
|||
<property name="window_extra_style"></property> |
|||
<property name="window_name"></property> |
|||
<property name="window_style"></property> |
|||
<event name="OnChar"></event> |
|||
<event name="OnEnterWindow"></event> |
|||
<event name="OnEraseBackground"></event> |
|||
<event name="OnKeyDown"></event> |
|||
<event name="OnKeyUp"></event> |
|||
<event name="OnKillFocus"></event> |
|||
<event name="OnLeaveWindow"></event> |
|||
<event name="OnLeftDClick"></event> |
|||
<event name="OnLeftDown"></event> |
|||
<event name="OnLeftUp"></event> |
|||
<event name="OnMiddleDClick"></event> |
|||
<event name="OnMiddleDown"></event> |
|||
<event name="OnMiddleUp"></event> |
|||
<event name="OnMotion"></event> |
|||
<event name="OnMouseEvents"></event> |
|||
<event name="OnMouseWheel"></event> |
|||
<event name="OnPaint"></event> |
|||
<event name="OnRadioBox"></event> |
|||
<event name="OnRightDClick"></event> |
|||
<event name="OnRightDown"></event> |
|||
<event name="OnRightUp"></event> |
|||
<event name="OnSetFocus"></event> |
|||
<event name="OnSize"></event> |
|||
<event name="OnUpdateUI"></event> |
|||
</object> |
|||
</object> |
|||
<object class="sizeritem" expanded="1"> |
|||
<property name="border">5</property> |
|||
<property name="flag">wxALL|wxEXPAND</property> |
|||
<property name="proportion">0</property> |
|||
<object class="wxRadioBox" expanded="1"> |
|||
<property name="bg"></property> |
|||
<property name="choices">"Current" "All"</property> |
|||
<property name="context_help"></property> |
|||
<property name="enabled">1</property> |
|||
<property name="fg"></property> |
|||
<property name="font"></property> |
|||
<property name="hidden">0</property> |
|||
<property name="id">wxID_PAGE_MODE</property> |
|||
<property name="label">Page Print</property> |
|||
<property name="majorDimension">1</property> |
|||
<property name="maximum_size"></property> |
|||
<property name="minimum_size"></property> |
|||
<property name="name">m_PagesOption</property> |
|||
<property name="permission">protected</property> |
|||
<property name="pos"></property> |
|||
<property name="selection">0</property> |
|||
<property name="size"></property> |
|||
<property name="style">wxRA_SPECIFY_COLS</property> |
|||
<property name="subclass"></property> |
|||
<property name="tooltip"></property> |
|||
<property name="window_extra_style"></property> |
|||
<property name="window_name"></property> |
|||
<property name="window_style"></property> |
|||
<event name="OnChar"></event> |
|||
<event name="OnEnterWindow"></event> |
|||
<event name="OnEraseBackground"></event> |
|||
<event name="OnKeyDown"></event> |
|||
<event name="OnKeyUp"></event> |
|||
<event name="OnKillFocus"></event> |
|||
<event name="OnLeaveWindow"></event> |
|||
<event name="OnLeftDClick"></event> |
|||
<event name="OnLeftDown"></event> |
|||
<event name="OnLeftUp"></event> |
|||
<event name="OnMiddleDClick"></event> |
|||
<event name="OnMiddleDown"></event> |
|||
<event name="OnMiddleUp"></event> |
|||
<event name="OnMotion"></event> |
|||
<event name="OnMouseEvents"></event> |
|||
<event name="OnMouseWheel"></event> |
|||
<event name="OnPaint"></event> |
|||
<event name="OnRadioBox"></event> |
|||
<event name="OnRightDClick"></event> |
|||
<event name="OnRightDown"></event> |
|||
<event name="OnRightUp"></event> |
|||
<event name="OnSetFocus"></event> |
|||
<event name="OnSize"></event> |
|||
<event name="OnUpdateUI"></event> |
|||
</object> |
|||
</object> |
|||
</object> |
|||
</object> |
|||
<object class="sizeritem" expanded="1"> |
|||
<property name="border">5</property> |
|||
<property name="flag">wxALIGN_CENTER_VERTICAL</property> |
|||
<property name="proportion">0</property> |
|||
<object class="wxBoxSizer" expanded="1"> |
|||
<property name="minimum_size"></property> |
|||
<property name="name">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</property> |
|||
<property name="proportion">0</property> |
|||
<object class="wxButton" expanded="1"> |
|||
<property name="bg"></property> |
|||
<property name="context_help"></property> |
|||
<property name="default">0</property> |
|||
<property name="enabled">1</property> |
|||
<property name="fg"></property> |
|||
<property name="font"></property> |
|||
<property name="hidden">0</property> |
|||
<property name="id">wxID_PRINT_OPTIONS</property> |
|||
<property name="label">Page Options</property> |
|||
<property name="maximum_size"></property> |
|||
<property name="minimum_size"></property> |
|||
<property name="name">m_buttonOption</property> |
|||
<property name="permission">protected</property> |
|||
<property name="pos"></property> |
|||
<property name="size"></property> |
|||
<property name="style"></property> |
|||
<property name="subclass"></property> |
|||
<property name="tooltip"></property> |
|||
<property name="window_extra_style"></property> |
|||
<property name="window_name"></property> |
|||
<property name="window_style"></property> |
|||
<event name="OnButtonClick">OnPrintSetup</event> |
|||
<event name="OnChar"></event> |
|||
<event name="OnEnterWindow"></event> |
|||
<event name="OnEraseBackground"></event> |
|||
<event name="OnKeyDown"></event> |
|||
<event name="OnKeyUp"></event> |
|||
<event name="OnKillFocus"></event> |
|||
<event name="OnLeaveWindow"></event> |
|||
<event name="OnLeftDClick"></event> |
|||
<event name="OnLeftDown"></event> |
|||
<event name="OnLeftUp"></event> |
|||
<event name="OnMiddleDClick"></event> |
|||
<event name="OnMiddleDown"></event> |
|||
<event name="OnMiddleUp"></event> |
|||
<event name="OnMotion"></event> |
|||
<event name="OnMouseEvents"></event> |
|||
<event name="OnMouseWheel"></event> |
|||
<event name="OnPaint"></event> |
|||
<event name="OnRightDClick"></event> |
|||
<event name="OnRightDown"></event> |
|||
<event name="OnRightUp"></event> |
|||
<event name="OnSetFocus"></event> |
|||
<event name="OnSize"></event> |
|||
<event name="OnUpdateUI"></event> |
|||
</object> |
|||
</object> |
|||
<object class="sizeritem" expanded="1"> |
|||
<property name="border">5</property> |
|||
<property name="flag">wxALL|wxALIGN_CENTER_HORIZONTAL</property> |
|||
<property name="proportion">0</property> |
|||
<object class="wxButton" expanded="1"> |
|||
<property name="bg"></property> |
|||
<property name="context_help"></property> |
|||
<property name="default">0</property> |
|||
<property name="enabled">1</property> |
|||
<property name="fg"></property> |
|||
<property name="font"></property> |
|||
<property name="hidden">0</property> |
|||
<property name="id">wxID_PREVIEW</property> |
|||
<property name="label">Preview</property> |
|||
<property name="maximum_size"></property> |
|||
<property name="minimum_size"></property> |
|||
<property name="name">m_buttonPreview</property> |
|||
<property name="permission">protected</property> |
|||
<property name="pos"></property> |
|||
<property name="size"></property> |
|||
<property name="style"></property> |
|||
<property name="subclass"></property> |
|||
<property name="tooltip"></property> |
|||
<property name="window_extra_style"></property> |
|||
<property name="window_name"></property> |
|||
<property name="window_style"></property> |
|||
<event name="OnButtonClick">OnPrintPreview</event> |
|||
<event name="OnChar"></event> |
|||
<event name="OnEnterWindow"></event> |
|||
<event name="OnEraseBackground"></event> |
|||
<event name="OnKeyDown"></event> |
|||
<event name="OnKeyUp"></event> |
|||
<event name="OnKillFocus"></event> |
|||
<event name="OnLeaveWindow"></event> |
|||
<event name="OnLeftDClick"></event> |
|||
<event name="OnLeftDown"></event> |
|||
<event name="OnLeftUp"></event> |
|||
<event name="OnMiddleDClick"></event> |
|||
<event name="OnMiddleDown"></event> |
|||
<event name="OnMiddleUp"></event> |
|||
<event name="OnMotion"></event> |
|||
<event name="OnMouseEvents"></event> |
|||
<event name="OnMouseWheel"></event> |
|||
<event name="OnPaint"></event> |
|||
<event name="OnRightDClick"></event> |
|||
<event name="OnRightDown"></event> |
|||
<event name="OnRightUp"></event> |
|||
<event name="OnSetFocus"></event> |
|||
<event name="OnSize"></event> |
|||
<event name="OnUpdateUI"></event> |
|||
</object> |
|||
</object> |
|||
<object class="sizeritem" expanded="1"> |
|||
<property name="border">5</property> |
|||
<property name="flag">wxALL|wxALIGN_CENTER_HORIZONTAL</property> |
|||
<property name="proportion">0</property> |
|||
<object class="wxButton" expanded="1"> |
|||
<property name="bg"></property> |
|||
<property name="context_help"></property> |
|||
<property name="default">0</property> |
|||
<property name="enabled">1</property> |
|||
<property name="fg"></property> |
|||
<property name="font"></property> |
|||
<property name="hidden">0</property> |
|||
<property name="id">wxID_PRINT_ALL</property> |
|||
<property name="label">Print</property> |
|||
<property name="maximum_size"></property> |
|||
<property name="minimum_size"></property> |
|||
<property name="name">m_buttonPrint</property> |
|||
<property name="permission">protected</property> |
|||
<property name="pos"></property> |
|||
<property name="size"></property> |
|||
<property name="style"></property> |
|||
<property name="subclass"></property> |
|||
<property name="tooltip"></property> |
|||
<property name="window_extra_style"></property> |
|||
<property name="window_name"></property> |
|||
<property name="window_style"></property> |
|||
<event name="OnButtonClick">OnPrintButtonClick</event> |
|||
<event name="OnChar"></event> |
|||
<event name="OnEnterWindow"></event> |
|||
<event name="OnEraseBackground"></event> |
|||
<event name="OnKeyDown"></event> |
|||
<event name="OnKeyUp"></event> |
|||
<event name="OnKillFocus"></event> |
|||
<event name="OnLeaveWindow"></event> |
|||
<event name="OnLeftDClick"></event> |
|||
<event name="OnLeftDown"></event> |
|||
<event name="OnLeftUp"></event> |
|||
<event name="OnMiddleDClick"></event> |
|||
<event name="OnMiddleDown"></event> |
|||
<event name="OnMiddleUp"></event> |
|||
<event name="OnMotion"></event> |
|||
<event name="OnMouseEvents"></event> |
|||
<event name="OnMouseWheel"></event> |
|||
<event name="OnPaint"></event> |
|||
<event name="OnRightDClick"></event> |
|||
<event name="OnRightDown"></event> |
|||
<event name="OnRightUp"></event> |
|||
<event name="OnSetFocus"></event> |
|||
<event name="OnSize"></event> |
|||
<event name="OnUpdateUI"></event> |
|||
</object> |
|||
</object> |
|||
<object class="sizeritem" expanded="1"> |
|||
<property name="border">5</property> |
|||
<property name="flag">wxALL|wxALIGN_CENTER_HORIZONTAL</property> |
|||
<property name="proportion">0</property> |
|||
<object class="wxButton" expanded="1"> |
|||
<property name="bg"></property> |
|||
<property name="context_help"></property> |
|||
<property name="default">0</property> |
|||
<property name="enabled">1</property> |
|||
<property name="fg"></property> |
|||
<property name="font"></property> |
|||
<property name="hidden">0</property> |
|||
<property name="id">wxID_CANCEL</property> |
|||
<property name="label">Close</property> |
|||
<property name="maximum_size"></property> |
|||
<property name="minimum_size"></property> |
|||
<property name="name">m_buttonQuit</property> |
|||
<property name="permission">protected</property> |
|||
<property name="pos"></property> |
|||
<property name="size"></property> |
|||
<property name="style"></property> |
|||
<property name="subclass"></property> |
|||
<property name="tooltip"></property> |
|||
<property name="window_extra_style"></property> |
|||
<property name="window_name"></property> |
|||
<property name="window_style"></property> |
|||
<event name="OnButtonClick">OnButtonCancelClick</event> |
|||
<event name="OnChar"></event> |
|||
<event name="OnEnterWindow"></event> |
|||
<event name="OnEraseBackground"></event> |
|||
<event name="OnKeyDown"></event> |
|||
<event name="OnKeyUp"></event> |
|||
<event name="OnKillFocus"></event> |
|||
<event name="OnLeaveWindow"></event> |
|||
<event name="OnLeftDClick"></event> |
|||
<event name="OnLeftDown"></event> |
|||
<event name="OnLeftUp"></event> |
|||
<event name="OnMiddleDClick"></event> |
|||
<event name="OnMiddleDown"></event> |
|||
<event name="OnMiddleUp"></event> |
|||
<event name="OnMotion"></event> |
|||
<event name="OnMouseEvents"></event> |
|||
<event name="OnMouseWheel"></event> |
|||
<event name="OnPaint"></event> |
|||
<event name="OnRightDClick"></event> |
|||
<event name="OnRightDown"></event> |
|||
<event name="OnRightUp"></event> |
|||
<event name="OnSetFocus"></event> |
|||
<event name="OnSize"></event> |
|||
<event name="OnUpdateUI"></event> |
|||
</object> |
|||
</object> |
|||
</object> |
|||
</object> |
|||
</object> |
|||
</object> |
|||
</object> |
|||
</wxFormBuilder_Project> |
|||
@ -0,0 +1,71 @@ |
|||
/////////////////////////////////////////////////////////////////////////// |
|||
// C++ code generated with wxFormBuilder (version Apr 16 2008) |
|||
// http://www.wxformbuilder.org/ |
|||
// |
|||
// PLEASE DO "NOT" EDIT THIS FILE! |
|||
/////////////////////////////////////////////////////////////////////////// |
|||
|
|||
#ifndef __dialog_print_using_printer_base__ |
|||
#define __dialog_print_using_printer_base__ |
|||
|
|||
#include <wx/intl.h> |
|||
|
|||
#include <wx/string.h> |
|||
#include <wx/stattext.h> |
|||
#include <wx/gdicmn.h> |
|||
#include <wx/font.h> |
|||
#include <wx/colour.h> |
|||
#include <wx/settings.h> |
|||
#include <wx/textctrl.h> |
|||
#include <wx/checkbox.h> |
|||
#include <wx/sizer.h> |
|||
#include <wx/statbox.h> |
|||
#include <wx/radiobox.h> |
|||
#include <wx/button.h> |
|||
#include <wx/dialog.h> |
|||
|
|||
/////////////////////////////////////////////////////////////////////////// |
|||
|
|||
/////////////////////////////////////////////////////////////////////////////// |
|||
/// Class DIALOG_PRINT_USING_PRINTER_base |
|||
/////////////////////////////////////////////////////////////////////////////// |
|||
class DIALOG_PRINT_USING_PRINTER_base : public wxDialog |
|||
{ |
|||
private: |
|||
|
|||
protected: |
|||
enum |
|||
{ |
|||
wxID_FRAME_SEL = 1000, |
|||
wxID_PRINT_MODE, |
|||
wxID_PAGE_MODE, |
|||
wxID_PRINT_OPTIONS, |
|||
wxID_PRINT_ALL, |
|||
}; |
|||
|
|||
wxStaticText* m_TextPenWidth; |
|||
wxTextCtrl* m_DialogPenWidth; |
|||
wxCheckBox* m_Print_Sheet_Ref; |
|||
wxRadioBox* m_ModeColorOption; |
|||
wxRadioBox* m_PagesOption; |
|||
wxButton* m_buttonOption; |
|||
wxButton* m_buttonPreview; |
|||
wxButton* m_buttonPrint; |
|||
wxButton* m_buttonQuit; |
|||
|
|||
// Virtual event handlers, overide them in your derived class |
|||
virtual void OnCloseWindow( wxCloseEvent& event ){ event.Skip(); } |
|||
virtual void OnInitDialog( wxInitDialogEvent& event ){ event.Skip(); } |
|||
virtual void OnPrintSetup( wxCommandEvent& event ){ event.Skip(); } |
|||
virtual void OnPrintPreview( wxCommandEvent& event ){ event.Skip(); } |
|||
virtual void OnPrintButtonClick( wxCommandEvent& event ){ event.Skip(); } |
|||
virtual void OnButtonCancelClick( wxCommandEvent& event ){ event.Skip(); } |
|||
|
|||
|
|||
public: |
|||
DIALOG_PRINT_USING_PRINTER_base( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Print"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 336,268 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); |
|||
~DIALOG_PRINT_USING_PRINTER_base(); |
|||
|
|||
}; |
|||
|
|||
#endif //__dialog_print_using_printer_base__ |
|||
@ -0,0 +1,156 @@ |
|||
///////////////////////////////////////////////////////////////////////////
|
|||
// C++ code generated with wxFormBuilder (version Apr 16 2008)
|
|||
// http://www.wxformbuilder.org/
|
|||
//
|
|||
// PLEASE DO "NOT" EDIT THIS FILE!
|
|||
///////////////////////////////////////////////////////////////////////////
|
|||
|
|||
#include "dialog_print_using_printer_base.h"
|
|||
|
|||
///////////////////////////////////////////////////////////////////////////
|
|||
|
|||
DIALOG_PRINT_USING_PRINTER_base::DIALOG_PRINT_USING_PRINTER_base( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) |
|||
{ |
|||
this->SetSizeHints( wxSize( -1,-1 ), wxDefaultSize ); |
|||
|
|||
wxBoxSizer* bMainSizer; |
|||
bMainSizer = new wxBoxSizer( wxHORIZONTAL ); |
|||
|
|||
wxStaticBoxSizer* sbLayersSizer; |
|||
sbLayersSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Layers:") ), wxVERTICAL ); |
|||
|
|||
wxBoxSizer* bleftSizer; |
|||
bleftSizer = new wxBoxSizer( wxHORIZONTAL ); |
|||
|
|||
m_CopperLayersBoxSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Copper Layers:") ), wxVERTICAL ); |
|||
|
|||
bleftSizer->Add( m_CopperLayersBoxSizer, 1, wxALL, 5 ); |
|||
|
|||
m_TechnicalLayersBoxSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Technical Layers:") ), wxVERTICAL ); |
|||
|
|||
bleftSizer->Add( m_TechnicalLayersBoxSizer, 1, wxALL, 5 ); |
|||
|
|||
sbLayersSizer->Add( bleftSizer, 1, wxEXPAND, 5 ); |
|||
|
|||
m_Exclude_Edges_Pcb = new wxCheckBox( this, wxID_ANY, _("Exclude Edges_Pcb Layer"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
|
|||
m_Exclude_Edges_Pcb->SetToolTip( _("Exclude contents of Edges_Pcb layer from all other layers") ); |
|||
|
|||
sbLayersSizer->Add( m_Exclude_Edges_Pcb, 0, wxALL|wxEXPAND, 5 ); |
|||
|
|||
bMainSizer->Add( sbLayersSizer, 1, wxEXPAND, 5 ); |
|||
|
|||
wxBoxSizer* bmiddleLeftSizer; |
|||
bmiddleLeftSizer = new wxBoxSizer( wxVERTICAL ); |
|||
|
|||
wxString m_ScaleOptionChoices[] = { _("fit in page"), _("Scale 0.5"), _("Scale 0.7"), _("Approx. Scale 1"), _("Accurate Scale 1"), _("Scale 1.4"), _("Scale 2"), _("Scale 3"), _("Scale 4") }; |
|||
int m_ScaleOptionNChoices = sizeof( m_ScaleOptionChoices ) / sizeof( wxString ); |
|||
m_ScaleOption = new wxRadioBox( this, wxID_ANY, _("Approx. Scale:"), wxDefaultPosition, wxDefaultSize, m_ScaleOptionNChoices, m_ScaleOptionChoices, 1, wxRA_SPECIFY_COLS ); |
|||
m_ScaleOption->SetSelection( 3 ); |
|||
bmiddleLeftSizer->Add( m_ScaleOption, 0, wxALL, 5 ); |
|||
|
|||
m_FineAdjustXscaleTitle = new wxStaticText( this, wxID_ANY, _("X Scale Adjust"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
m_FineAdjustXscaleTitle->Wrap( -1 ); |
|||
bmiddleLeftSizer->Add( m_FineAdjustXscaleTitle, 0, wxRIGHT|wxLEFT, 5 ); |
|||
|
|||
m_FineAdjustXscaleOpt = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); |
|||
m_FineAdjustXscaleOpt->SetToolTip( _("Set X scale adjust for exact scale plotting") ); |
|||
|
|||
bmiddleLeftSizer->Add( m_FineAdjustXscaleOpt, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); |
|||
|
|||
m_FineAdjustYscaleTitle = new wxStaticText( this, wxID_ANY, _("Y Scale Adjust"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
m_FineAdjustYscaleTitle->Wrap( -1 ); |
|||
bmiddleLeftSizer->Add( m_FineAdjustYscaleTitle, 0, wxRIGHT|wxLEFT, 5 ); |
|||
|
|||
m_FineAdjustYscaleOpt = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); |
|||
m_FineAdjustYscaleOpt->SetToolTip( _("Set Y scale adjust for exact scale plotting") ); |
|||
|
|||
bmiddleLeftSizer->Add( m_FineAdjustYscaleOpt, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); |
|||
|
|||
bMainSizer->Add( bmiddleLeftSizer, 0, wxEXPAND, 5 ); |
|||
|
|||
wxBoxSizer* bmiddleRightSizer; |
|||
bmiddleRightSizer = new wxBoxSizer( wxVERTICAL ); |
|||
|
|||
wxStaticBoxSizer* sbOptionsSizer; |
|||
sbOptionsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Options:") ), wxVERTICAL ); |
|||
|
|||
m_TextPenWidth = new wxStaticText( this, wxID_ANY, _("Pen Width Mini"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
m_TextPenWidth->Wrap( -1 ); |
|||
sbOptionsSizer->Add( m_TextPenWidth, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); |
|||
|
|||
m_DialogPenWidth = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); |
|||
m_DialogPenWidth->SetToolTip( _("Selection of the minimum pen thickness used to draw items.") ); |
|||
|
|||
sbOptionsSizer->Add( m_DialogPenWidth, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); |
|||
|
|||
m_Print_Sheet_Ref = new wxCheckBox( this, wxID_FRAME_SEL, _("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_Print_Mirror = new wxCheckBox( this, wxID_ANY, _("Mirror"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
|
|||
sbOptionsSizer->Add( m_Print_Mirror, 0, wxALL, 5 ); |
|||
|
|||
bmiddleRightSizer->Add( sbOptionsSizer, 0, wxEXPAND|wxALL, 5 ); |
|||
|
|||
wxString m_ModeColorOptionChoices[] = { _("Color"), _("Black and white") }; |
|||
int m_ModeColorOptionNChoices = sizeof( m_ModeColorOptionChoices ) / sizeof( wxString ); |
|||
m_ModeColorOption = new wxRadioBox( this, wxID_PRINT_MODE, _("Print Mode"), wxDefaultPosition, wxDefaultSize, m_ModeColorOptionNChoices, m_ModeColorOptionChoices, 1, wxRA_SPECIFY_COLS ); |
|||
m_ModeColorOption->SetSelection( 1 ); |
|||
m_ModeColorOption->SetToolTip( _("Choose if you wand to draw the sheet like it appears on screen,\nor in black and white mode, better to print it when using black and white printers") ); |
|||
|
|||
bmiddleRightSizer->Add( m_ModeColorOption, 0, wxALL|wxEXPAND, 5 ); |
|||
|
|||
wxString m_PagesOptionChoices[] = { _("1 Page per Layer"), _("Single page") }; |
|||
int m_PagesOptionNChoices = sizeof( m_PagesOptionChoices ) / sizeof( wxString ); |
|||
m_PagesOption = new wxRadioBox( this, wxID_PAGE_MODE, _("Page Print"), wxDefaultPosition, wxDefaultSize, m_PagesOptionNChoices, m_PagesOptionChoices, 1, wxRA_SPECIFY_COLS ); |
|||
m_PagesOption->SetSelection( 0 ); |
|||
bmiddleRightSizer->Add( m_PagesOption, 0, wxALL|wxEXPAND, 5 ); |
|||
|
|||
bMainSizer->Add( bmiddleRightSizer, 0, wxEXPAND, 5 ); |
|||
|
|||
wxBoxSizer* bbuttonsSizer; |
|||
bbuttonsSizer = new wxBoxSizer( wxVERTICAL ); |
|||
|
|||
m_buttonOption = new wxButton( this, wxID_PRINT_OPTIONS, _("Page Options"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
bbuttonsSizer->Add( m_buttonOption, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); |
|||
|
|||
m_buttonPreview = new wxButton( this, wxID_PREVIEW, _("Preview"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
bbuttonsSizer->Add( m_buttonPreview, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); |
|||
|
|||
m_buttonPrint = new wxButton( this, wxID_PRINT_ALL, _("Print"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
bbuttonsSizer->Add( m_buttonPrint, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); |
|||
|
|||
m_buttonQuit = new wxButton( this, wxID_CANCEL, _("Close"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
bbuttonsSizer->Add( m_buttonQuit, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); |
|||
|
|||
bMainSizer->Add( bbuttonsSizer, 0, wxALIGN_CENTER_VERTICAL, 5 ); |
|||
|
|||
this->SetSizer( bMainSizer ); |
|||
this->Layout(); |
|||
|
|||
// Connect Events
|
|||
this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_PRINT_USING_PRINTER_base::OnCloseWindow ) ); |
|||
this->Connect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_PRINT_USING_PRINTER_base::OnInitDialog ) ); |
|||
m_ScaleOption->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_base::SetScale ), NULL, this ); |
|||
m_buttonOption->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_base::OnPrintSetup ), NULL, this ); |
|||
m_buttonPreview->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_base::OnPrintPreview ), NULL, this ); |
|||
m_buttonPrint->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_base::OnPrintButtonClick ), NULL, this ); |
|||
m_buttonQuit->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_base::OnButtonCancelClick ), NULL, this ); |
|||
} |
|||
|
|||
DIALOG_PRINT_USING_PRINTER_base::~DIALOG_PRINT_USING_PRINTER_base() |
|||
{ |
|||
// Disconnect Events
|
|||
this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_PRINT_USING_PRINTER_base::OnCloseWindow ) ); |
|||
this->Disconnect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_PRINT_USING_PRINTER_base::OnInitDialog ) ); |
|||
m_ScaleOption->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_base::SetScale ), NULL, this ); |
|||
m_buttonOption->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_base::OnPrintSetup ), NULL, this ); |
|||
m_buttonPreview->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_base::OnPrintPreview ), NULL, this ); |
|||
m_buttonPrint->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_base::OnPrintButtonClick ), NULL, this ); |
|||
m_buttonQuit->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_base::OnButtonCancelClick ), NULL, this ); |
|||
} |
|||
1025
pcbnew/dialog_print_using_printer_base.fbp
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1,81 @@ |
|||
/////////////////////////////////////////////////////////////////////////// |
|||
// C++ code generated with wxFormBuilder (version Apr 16 2008) |
|||
// http://www.wxformbuilder.org/ |
|||
// |
|||
// PLEASE DO "NOT" EDIT THIS FILE! |
|||
/////////////////////////////////////////////////////////////////////////// |
|||
|
|||
#ifndef __dialog_print_using_printer_base__ |
|||
#define __dialog_print_using_printer_base__ |
|||
|
|||
#include <wx/intl.h> |
|||
|
|||
#include <wx/string.h> |
|||
#include <wx/sizer.h> |
|||
#include <wx/statbox.h> |
|||
#include <wx/gdicmn.h> |
|||
#include <wx/checkbox.h> |
|||
#include <wx/font.h> |
|||
#include <wx/colour.h> |
|||
#include <wx/settings.h> |
|||
#include <wx/radiobox.h> |
|||
#include <wx/stattext.h> |
|||
#include <wx/textctrl.h> |
|||
#include <wx/button.h> |
|||
#include <wx/dialog.h> |
|||
|
|||
/////////////////////////////////////////////////////////////////////////// |
|||
|
|||
/////////////////////////////////////////////////////////////////////////////// |
|||
/// Class DIALOG_PRINT_USING_PRINTER_base |
|||
/////////////////////////////////////////////////////////////////////////////// |
|||
class DIALOG_PRINT_USING_PRINTER_base : public wxDialog |
|||
{ |
|||
private: |
|||
|
|||
protected: |
|||
enum |
|||
{ |
|||
wxID_FRAME_SEL = 1000, |
|||
wxID_PRINT_MODE, |
|||
wxID_PAGE_MODE, |
|||
wxID_PRINT_OPTIONS, |
|||
wxID_PRINT_ALL, |
|||
}; |
|||
|
|||
wxStaticBoxSizer* m_CopperLayersBoxSizer; |
|||
wxStaticBoxSizer* m_TechnicalLayersBoxSizer; |
|||
wxCheckBox* m_Exclude_Edges_Pcb; |
|||
wxRadioBox* m_ScaleOption; |
|||
wxStaticText* m_FineAdjustXscaleTitle; |
|||
wxTextCtrl* m_FineAdjustXscaleOpt; |
|||
wxStaticText* m_FineAdjustYscaleTitle; |
|||
wxTextCtrl* m_FineAdjustYscaleOpt; |
|||
wxStaticText* m_TextPenWidth; |
|||
wxTextCtrl* m_DialogPenWidth; |
|||
wxCheckBox* m_Print_Sheet_Ref; |
|||
wxCheckBox* m_Print_Mirror; |
|||
wxRadioBox* m_ModeColorOption; |
|||
wxRadioBox* m_PagesOption; |
|||
wxButton* m_buttonOption; |
|||
wxButton* m_buttonPreview; |
|||
wxButton* m_buttonPrint; |
|||
wxButton* m_buttonQuit; |
|||
|
|||
// Virtual event handlers, overide them in your derived class |
|||
virtual void OnCloseWindow( wxCloseEvent& event ){ event.Skip(); } |
|||
virtual void OnInitDialog( wxInitDialogEvent& event ){ event.Skip(); } |
|||
virtual void SetScale( wxCommandEvent& event ){ event.Skip(); } |
|||
virtual void OnPrintSetup( wxCommandEvent& event ){ event.Skip(); } |
|||
virtual void OnPrintPreview( wxCommandEvent& event ){ event.Skip(); } |
|||
virtual void OnPrintButtonClick( wxCommandEvent& event ){ event.Skip(); } |
|||
virtual void OnButtonCancelClick( wxCommandEvent& event ){ event.Skip(); } |
|||
|
|||
|
|||
public: |
|||
DIALOG_PRINT_USING_PRINTER_base( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Print"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 551,314 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); |
|||
~DIALOG_PRINT_USING_PRINTER_base(); |
|||
|
|||
}; |
|||
|
|||
#endif //__dialog_print_using_printer_base__ |
|||
@ -1,352 +0,0 @@ |
|||
/////////////////////////////////////////////////////////////////////////////
|
|||
// Name: dialog_print.cpp
|
|||
// Purpose:
|
|||
// Author: jean-pierre Charras
|
|||
// Modified by:
|
|||
// Created: 28/02/2006 18:30:16
|
|||
// RCS-ID:
|
|||
// Copyright: License GNU
|
|||
// Licence:
|
|||
/////////////////////////////////////////////////////////////////////////////
|
|||
|
|||
// Generated by DialogBlocks (unregistered), 28/02/2006 18:30:16
|
|||
|
|||
////@begin includes
|
|||
////@end includes
|
|||
|
|||
#include "dialog_print.h"
|
|||
|
|||
////@begin XPM images
|
|||
////@end XPM images
|
|||
|
|||
/*!
|
|||
* WinEDA_PrintFrame type definition |
|||
*/ |
|||
|
|||
IMPLEMENT_DYNAMIC_CLASS( WinEDA_PrintFrame, wxDialog ) |
|||
|
|||
/*!
|
|||
* WinEDA_PrintFrame event table definition |
|||
*/ |
|||
|
|||
BEGIN_EVENT_TABLE( WinEDA_PrintFrame, wxDialog ) |
|||
|
|||
////@begin WinEDA_PrintFrame event table entries
|
|||
EVT_RADIOBOX( ID_SET_PRINT_SCALE, WinEDA_PrintFrame::OnSetPrintScaleSelected ) |
|||
|
|||
EVT_RADIOBOX( ID_SET_BW, WinEDA_PrintFrame::OnSetBwSelected ) |
|||
|
|||
EVT_BUTTON( ID_PRINT_SETUP, WinEDA_PrintFrame::OnPrintSetupClick ) |
|||
|
|||
EVT_BUTTON( ID_PRINT_PREVIEW, WinEDA_PrintFrame::OnPrintPreviewClick ) |
|||
|
|||
EVT_BUTTON( ID_PRINT_EXECUTE, WinEDA_PrintFrame::OnPrintExecuteClick ) |
|||
|
|||
EVT_BUTTON( wxID_CANCEL, WinEDA_PrintFrame::OnCancelClick ) |
|||
|
|||
////@end WinEDA_PrintFrame event table entries
|
|||
|
|||
END_EVENT_TABLE() |
|||
|
|||
/*!
|
|||
* WinEDA_PrintFrame constructors |
|||
*/ |
|||
|
|||
WinEDA_PrintFrame::WinEDA_PrintFrame( ) |
|||
{ |
|||
} |
|||
|
|||
WinEDA_PrintFrame::WinEDA_PrintFrame( WinEDA_DrawFrame* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style ) |
|||
{ |
|||
m_Parent = parent; |
|||
m_XScaleAdjust = m_YScaleAdjust = 1.0; |
|||
m_PagesOption = NULL; |
|||
m_Config = wxGetApp().m_EDA_Config; |
|||
if ( m_Config ) |
|||
{ |
|||
m_Config->Read(OPTKEY_PLOT_LINEWIDTH_VALUE, &g_PlotLine_Width); |
|||
} |
|||
|
|||
|
|||
Create(parent, id, caption, pos, size, style); |
|||
} |
|||
|
|||
/*!
|
|||
* WinEDA_PrintFrame creator |
|||
*/ |
|||
|
|||
bool WinEDA_PrintFrame::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style ) |
|||
{ |
|||
////@begin WinEDA_PrintFrame member initialisation
|
|||
m_FullDialogBowSizer = NULL; |
|||
m_LeftBoxSizer = NULL; |
|||
m_LayersSelectionsBoxSizer = NULL; |
|||
m_CopperLayersBoxSizer = NULL; |
|||
m_TechLayersBoxSizer = NULL; |
|||
m_Exclude_Edges_Pcb = NULL; |
|||
m_ScaleBoxSizer = NULL; |
|||
m_ScaleOption = NULL; |
|||
m_FineAdjustXscaleTitle = NULL; |
|||
m_FineAdjustXscaleOpt = NULL; |
|||
m_FineAdjustYscaleTitle = NULL; |
|||
m_FineAdjustYscaleOpt = NULL; |
|||
m_OptionsBoxSizer = NULL; |
|||
m_DialogPenWidthSizer = NULL; |
|||
m_Print_Sheet_Ref = NULL; |
|||
m_Print_Mirror = NULL; |
|||
m_ColorOption = NULL; |
|||
m_PagesOptionPcb = NULL; |
|||
m_PagesOptionEeschema = NULL; |
|||
m_ButtonsBoxSizer = NULL; |
|||
m_CloseButton = NULL; |
|||
////@end WinEDA_PrintFrame member initialisation
|
|||
|
|||
////@begin WinEDA_PrintFrame creation
|
|||
SetExtraStyle(wxWS_EX_BLOCK_EVENTS); |
|||
wxDialog::Create( parent, id, caption, pos, size, style ); |
|||
|
|||
CreateControls(); |
|||
if (GetSizer()) |
|||
{ |
|||
GetSizer()->SetSizeHints(this); |
|||
} |
|||
Centre(); |
|||
////@end WinEDA_PrintFrame creation
|
|||
return true; |
|||
} |
|||
|
|||
/*!
|
|||
* Control creation for WinEDA_PrintFrame |
|||
*/ |
|||
|
|||
void WinEDA_PrintFrame::CreateControls() |
|||
{ |
|||
SetFont(*g_DialogFont); |
|||
|
|||
////@begin WinEDA_PrintFrame content construction
|
|||
// Generated by DialogBlocks, 25/08/2008 12:59:33 (unregistered)
|
|||
|
|||
WinEDA_PrintFrame* itemDialog1 = this; |
|||
|
|||
m_FullDialogBowSizer = new wxBoxSizer(wxHORIZONTAL); |
|||
itemDialog1->SetSizer(m_FullDialogBowSizer); |
|||
|
|||
m_LeftBoxSizer = new wxBoxSizer(wxVERTICAL); |
|||
m_FullDialogBowSizer->Add(m_LeftBoxSizer, 0, wxGROW|wxTOP|wxBOTTOM, 5); |
|||
|
|||
m_LayersSelectionsBoxSizer = new wxBoxSizer(wxHORIZONTAL); |
|||
m_LeftBoxSizer->Add(m_LayersSelectionsBoxSizer, 0, wxGROW|wxALL, 5); |
|||
|
|||
m_CopperLayersBoxSizer = new wxBoxSizer(wxVERTICAL); |
|||
m_LayersSelectionsBoxSizer->Add(m_CopperLayersBoxSizer, 0, wxALIGN_TOP|wxRIGHT|wxTOP|wxBOTTOM, 5); |
|||
|
|||
m_TechLayersBoxSizer = new wxBoxSizer(wxVERTICAL); |
|||
m_LayersSelectionsBoxSizer->Add(m_TechLayersBoxSizer, 0, wxALIGN_TOP|wxALL, 5); |
|||
|
|||
m_Exclude_Edges_Pcb = new wxCheckBox( itemDialog1, ID_EXCLUDE_EDGES_PCB, _("Exclude Edges_Pcb Layer"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
m_Exclude_Edges_Pcb->SetValue(false); |
|||
if (WinEDA_PrintFrame::ShowToolTips()) |
|||
m_Exclude_Edges_Pcb->SetToolTip(_("Exclude contents of Edges_Pcb layer from all other layers")); |
|||
m_Exclude_Edges_Pcb->Show(false); |
|||
m_LeftBoxSizer->Add(m_Exclude_Edges_Pcb, 0, wxGROW|wxALL, 5); |
|||
|
|||
m_ScaleBoxSizer = new wxBoxSizer(wxVERTICAL); |
|||
m_FullDialogBowSizer->Add(m_ScaleBoxSizer, 0, wxGROW|wxALL, 5); |
|||
|
|||
wxArrayString m_ScaleOptionStrings; |
|||
m_ScaleOptionStrings.Add(_("fit in page")); |
|||
m_ScaleOptionStrings.Add(_("Scale 0.5")); |
|||
m_ScaleOptionStrings.Add(_("Scale 0.7")); |
|||
m_ScaleOptionStrings.Add(_("Approx. Scale 1")); |
|||
m_ScaleOptionStrings.Add(_("Accurate Scale 1")); |
|||
m_ScaleOptionStrings.Add(_("Scale 1.4")); |
|||
m_ScaleOptionStrings.Add(_("Scale 2")); |
|||
m_ScaleOptionStrings.Add(_("Scale 3")); |
|||
m_ScaleOptionStrings.Add(_("Scale 4")); |
|||
m_ScaleOption = new wxRadioBox( itemDialog1, ID_SET_PRINT_SCALE, _("Approx. Scale:"), wxDefaultPosition, wxDefaultSize, m_ScaleOptionStrings, 1, wxRA_SPECIFY_COLS ); |
|||
m_ScaleOption->SetSelection(0); |
|||
m_ScaleBoxSizer->Add(m_ScaleOption, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5); |
|||
|
|||
m_FineAdjustXscaleTitle = new wxStaticText( itemDialog1, wxID_STATIC, _("X Scale Adjust"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
m_ScaleBoxSizer->Add(m_FineAdjustXscaleTitle, 0, wxGROW|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5); |
|||
|
|||
m_FineAdjustXscaleOpt = new wxTextCtrl( itemDialog1, ID_TEXTCTRL, _T(""), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
m_ScaleBoxSizer->Add(m_FineAdjustXscaleOpt, 0, wxGROW|wxLEFT|wxRIGHT|wxBOTTOM, 5); |
|||
|
|||
m_FineAdjustYscaleTitle = new wxStaticText( itemDialog1, wxID_STATIC, _("Y Scale Adjust"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
m_ScaleBoxSizer->Add(m_FineAdjustYscaleTitle, 0, wxGROW|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5); |
|||
|
|||
m_FineAdjustYscaleOpt = new wxTextCtrl( itemDialog1, ID_TEXTCTRL1, _T(""), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
m_ScaleBoxSizer->Add(m_FineAdjustYscaleOpt, 0, wxGROW|wxLEFT|wxRIGHT|wxBOTTOM, 5); |
|||
|
|||
m_FullDialogBowSizer->Add(5, 5, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); |
|||
|
|||
wxBoxSizer* itemBoxSizer15 = new wxBoxSizer(wxVERTICAL); |
|||
m_FullDialogBowSizer->Add(itemBoxSizer15, 0, wxGROW|wxALL, 5); |
|||
|
|||
m_OptionsBoxSizer = new wxStaticBox(itemDialog1, wxID_ANY, _("Options:")); |
|||
wxStaticBoxSizer* itemStaticBoxSizer16 = new wxStaticBoxSizer(m_OptionsBoxSizer, wxVERTICAL); |
|||
itemBoxSizer15->Add(itemStaticBoxSizer16, 0, wxGROW|wxALL, 5); |
|||
|
|||
m_DialogPenWidthSizer = new wxBoxSizer(wxVERTICAL); |
|||
itemStaticBoxSizer16->Add(m_DialogPenWidthSizer, 0, wxGROW|wxALL, 5); |
|||
|
|||
m_Print_Sheet_Ref = new wxCheckBox( itemDialog1, ID_PRINT_REF, _("Print Sheet Ref"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE ); |
|||
m_Print_Sheet_Ref->SetValue(false); |
|||
itemStaticBoxSizer16->Add(m_Print_Sheet_Ref, 0, wxGROW|wxALL, 5); |
|||
|
|||
m_Print_Mirror = new wxCheckBox( itemDialog1, ID_CHECK_PRINT_MIROR, _("Mirror"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE ); |
|||
m_Print_Mirror->SetValue(false); |
|||
itemStaticBoxSizer16->Add(m_Print_Mirror, 0, wxGROW|wxALL, 5); |
|||
|
|||
wxArrayString m_ColorOptionStrings; |
|||
m_ColorOptionStrings.Add(_("Color")); |
|||
m_ColorOptionStrings.Add(_("Black")); |
|||
m_ColorOption = new wxRadioBox( itemDialog1, ID_SET_BW, _("Color Print:"), wxDefaultPosition, wxDefaultSize, m_ColorOptionStrings, 1, wxRA_SPECIFY_COLS ); |
|||
m_ColorOption->SetSelection(0); |
|||
itemBoxSizer15->Add(m_ColorOption, 0, wxGROW|wxALL, 5); |
|||
|
|||
wxArrayString m_PagesOptionPcbStrings; |
|||
m_PagesOptionPcbStrings.Add(_("1 Page per Layer")); |
|||
m_PagesOptionPcbStrings.Add(_("Single Page")); |
|||
m_PagesOptionPcb = new wxRadioBox( itemDialog1, ID_PRINT_ALL_IN_ONE, _("Page Print:"), wxDefaultPosition, wxDefaultSize, m_PagesOptionPcbStrings, 1, wxRA_SPECIFY_COLS ); |
|||
m_PagesOptionPcb->SetSelection(0); |
|||
itemBoxSizer15->Add(m_PagesOptionPcb, 0, wxGROW|wxALL, 5); |
|||
|
|||
wxArrayString m_PagesOptionEeschemaStrings; |
|||
m_PagesOptionEeschemaStrings.Add(_("Current")); |
|||
m_PagesOptionEeschemaStrings.Add(_("All")); |
|||
m_PagesOptionEeschema = new wxRadioBox( itemDialog1, ID_PRINT_ALL, _("Page Print:"), wxDefaultPosition, wxDefaultSize, m_PagesOptionEeschemaStrings, 1, wxRA_SPECIFY_COLS ); |
|||
m_PagesOptionEeschema->SetSelection(0); |
|||
itemBoxSizer15->Add(m_PagesOptionEeschema, 0, wxGROW|wxALL, 5); |
|||
|
|||
m_FullDialogBowSizer->Add(5, 5, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); |
|||
|
|||
m_ButtonsBoxSizer = new wxBoxSizer(wxVERTICAL); |
|||
m_FullDialogBowSizer->Add(m_ButtonsBoxSizer, 0, wxALIGN_TOP|wxALL, 5); |
|||
|
|||
m_ButtonsBoxSizer->Add(5, 5, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5); |
|||
|
|||
wxButton* itemButton26 = new wxButton( itemDialog1, ID_PRINT_SETUP, _("Print S&etup"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
itemButton26->SetForegroundColour(wxColour(121, 118, 0)); |
|||
m_ButtonsBoxSizer->Add(itemButton26, 0, wxGROW|wxALL, 5); |
|||
|
|||
wxButton* itemButton27 = new wxButton( itemDialog1, ID_PRINT_PREVIEW, _("Pre&view"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
itemButton27->SetForegroundColour(wxColour(0, 0, 196)); |
|||
m_ButtonsBoxSizer->Add(itemButton27, 0, wxGROW|wxALL, 5); |
|||
|
|||
wxButton* itemButton28 = new wxButton( itemDialog1, ID_PRINT_EXECUTE, _("&Print"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
itemButton28->SetForegroundColour(wxColour(0, 128, 64)); |
|||
m_ButtonsBoxSizer->Add(itemButton28, 0, wxGROW|wxALL, 5); |
|||
|
|||
m_CloseButton = new wxButton( itemDialog1, wxID_CANCEL, _("&Close"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
m_CloseButton->SetDefault(); |
|||
m_ButtonsBoxSizer->Add(m_CloseButton, 0, wxGROW|wxALL, 5); |
|||
|
|||
// Set validators
|
|||
m_ScaleOption->SetValidator( wxGenericValidator(& s_Scale_Select) ); |
|||
m_Print_Sheet_Ref->SetValidator( wxGenericValidator(& s_Print_Sheet_Ref) ); |
|||
m_Print_Mirror->SetValidator( wxGenericValidator(& s_PrintMirror) ); |
|||
m_PagesOptionPcb->SetValidator( wxGenericValidator(& s_OptionPrintPage) ); |
|||
m_PagesOptionEeschema->SetValidator( wxGenericValidator(& s_OptionPrintPage) ); |
|||
////@end WinEDA_PrintFrame content construction
|
|||
|
|||
SetFocus( ); // add this line to close dialog by the escape key
|
|||
|
|||
m_DialogPenWidth = new WinEDA_ValueCtrl(this, _("Pen width mini"), g_PlotLine_Width, |
|||
g_UnitMetric, m_DialogPenWidthSizer, m_Parent->m_InternalUnits); |
|||
|
|||
SetOthersDatas(); |
|||
} |
|||
|
|||
/*!
|
|||
* Should we show tooltips? |
|||
*/ |
|||
|
|||
bool WinEDA_PrintFrame::ShowToolTips() |
|||
{ |
|||
return true; |
|||
} |
|||
|
|||
/*!
|
|||
* Get bitmap resources |
|||
*/ |
|||
|
|||
wxBitmap WinEDA_PrintFrame::GetBitmapResource( const wxString& name ) |
|||
{ |
|||
// Bitmap retrieval
|
|||
////@begin WinEDA_PrintFrame bitmap retrieval
|
|||
wxUnusedVar(name); |
|||
return wxNullBitmap; |
|||
////@end WinEDA_PrintFrame bitmap retrieval
|
|||
} |
|||
|
|||
/*!
|
|||
* Get icon resources |
|||
*/ |
|||
|
|||
wxIcon WinEDA_PrintFrame::GetIconResource( const wxString& name ) |
|||
{ |
|||
// Icon retrieval
|
|||
////@begin WinEDA_PrintFrame icon retrieval
|
|||
wxUnusedVar(name); |
|||
return wxNullIcon; |
|||
////@end WinEDA_PrintFrame icon retrieval
|
|||
} |
|||
/*!
|
|||
* wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_PRINT_SETUP |
|||
*/ |
|||
|
|||
void WinEDA_PrintFrame::OnPrintSetupClick( wxCommandEvent& event ) |
|||
{ |
|||
OnPrintSetup(event); |
|||
} |
|||
|
|||
/*!
|
|||
* wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_PRINT_PREVIEW |
|||
*/ |
|||
|
|||
void WinEDA_PrintFrame::OnPrintPreviewClick( wxCommandEvent& event ) |
|||
{ |
|||
OnPrintPreview(event); |
|||
} |
|||
|
|||
/*!
|
|||
* wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_PRINT_EXECUTE |
|||
*/ |
|||
|
|||
void WinEDA_PrintFrame::OnPrintExecuteClick( wxCommandEvent& event ) |
|||
{ |
|||
EDA_PrintPage(event); |
|||
} |
|||
|
|||
/*!
|
|||
* wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CLOSE |
|||
*/ |
|||
|
|||
void WinEDA_PrintFrame::OnCancelClick( wxCommandEvent& event ) |
|||
{ |
|||
OnClosePrintDialog(); |
|||
} |
|||
|
|||
|
|||
/*!
|
|||
* wxEVT_COMMAND_RADIOBOX_SELECTED event handler for ID_SET_PRINT_SCALE |
|||
*/ |
|||
|
|||
void WinEDA_PrintFrame::OnSetPrintScaleSelected( wxCommandEvent& event ) |
|||
{ |
|||
SetScale(event); |
|||
} |
|||
|
|||
|
|||
/*!
|
|||
* wxEVT_COMMAND_RADIOBOX_SELECTED event handler for ID_SET_BW |
|||
*/ |
|||
|
|||
void WinEDA_PrintFrame::OnSetBwSelected( wxCommandEvent& event ) |
|||
{ |
|||
SetColorOrBlack(event); |
|||
} |
|||
|
|||
|
|||
@ -1,165 +0,0 @@ |
|||
///////////////////////////////////////////////////////////////////////////// |
|||
// Name: dialog_print.h |
|||
// Purpose: |
|||
// Author: jean-pierre Charras |
|||
// Modified by: |
|||
// Created: 28/02/2006 18:30:16 |
|||
// RCS-ID: |
|||
// Copyright: License GNU |
|||
// Licence: |
|||
///////////////////////////////////////////////////////////////////////////// |
|||
|
|||
// Generated by DialogBlocks (unregistered), 28/02/2006 18:30:16 |
|||
|
|||
#ifndef _DIALOG_PRINT_H_ |
|||
#define _DIALOG_PRINT_H_ |
|||
|
|||
/*! |
|||
* 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_EXCLUDE_EDGES_PCB 10005 |
|||
#define ID_SET_PRINT_SCALE 10004 |
|||
#define ID_TEXTCTRL 10009 |
|||
#define ID_TEXTCTRL1 10010 |
|||
#define ID_PRINT_REF 10006 |
|||
#define ID_CHECK_PRINT_MIROR 10011 |
|||
#define ID_SET_BW 10007 |
|||
#define ID_PRINT_ALL_IN_ONE 10008 |
|||
#define ID_PRINT_ALL 10008 |
|||
#define ID_PRINT_SETUP 10001 |
|||
#define ID_PRINT_PREVIEW 10002 |
|||
#define ID_PRINT_EXECUTE 10003 |
|||
#define SYMBOL_WINEDA_PRINTFRAME_STYLE wxCAPTION|wxSYSTEM_MENU|wxCLOSE_BOX|MAYBE_RESIZE_BORDER |
|||
#define SYMBOL_WINEDA_PRINTFRAME_TITLE _("Print") |
|||
#define SYMBOL_WINEDA_PRINTFRAME_IDNAME ID_DIALOG |
|||
#define SYMBOL_WINEDA_PRINTFRAME_SIZE wxSize(400, 300) |
|||
#define SYMBOL_WINEDA_PRINTFRAME_POSITION wxDefaultPosition |
|||
////@end control identifiers |
|||
|
|||
/*! |
|||
* Compatibility |
|||
*/ |
|||
|
|||
#ifndef wxCLOSE_BOX |
|||
#define wxCLOSE_BOX 0x1000 |
|||
#endif |
|||
|
|||
/*! |
|||
* WinEDA_PrintFrame class declaration |
|||
*/ |
|||
|
|||
class WinEDA_PrintFrame: public wxDialog |
|||
{ |
|||
DECLARE_DYNAMIC_CLASS( WinEDA_PrintFrame ) |
|||
DECLARE_EVENT_TABLE() |
|||
|
|||
public: |
|||
/// Constructors |
|||
WinEDA_PrintFrame( ); |
|||
WinEDA_PrintFrame( WinEDA_DrawFrame* parent, wxWindowID id = SYMBOL_WINEDA_PRINTFRAME_IDNAME, const wxString& caption = SYMBOL_WINEDA_PRINTFRAME_TITLE, const wxPoint& pos = SYMBOL_WINEDA_PRINTFRAME_POSITION, const wxSize& size = SYMBOL_WINEDA_PRINTFRAME_SIZE, long style = SYMBOL_WINEDA_PRINTFRAME_STYLE ); |
|||
|
|||
/// Creation |
|||
bool Create( wxWindow* parent, wxWindowID id = SYMBOL_WINEDA_PRINTFRAME_IDNAME, const wxString& caption = SYMBOL_WINEDA_PRINTFRAME_TITLE, const wxPoint& pos = SYMBOL_WINEDA_PRINTFRAME_POSITION, const wxSize& size = SYMBOL_WINEDA_PRINTFRAME_SIZE, long style = SYMBOL_WINEDA_PRINTFRAME_STYLE ); |
|||
|
|||
/// Creates the controls and sizers |
|||
void CreateControls(); |
|||
|
|||
////@begin WinEDA_PrintFrame event handler declarations |
|||
|
|||
/// wxEVT_COMMAND_RADIOBOX_SELECTED event handler for ID_SET_PRINT_SCALE |
|||
void OnSetPrintScaleSelected( wxCommandEvent& event ); |
|||
|
|||
/// wxEVT_COMMAND_RADIOBOX_SELECTED event handler for ID_SET_BW |
|||
void OnSetBwSelected( wxCommandEvent& event ); |
|||
|
|||
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_PRINT_SETUP |
|||
void OnPrintSetupClick( wxCommandEvent& event ); |
|||
|
|||
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_PRINT_PREVIEW |
|||
void OnPrintPreviewClick( 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_PrintFrame event handler declarations |
|||
|
|||
////@begin WinEDA_PrintFrame member function declarations |
|||
|
|||
/// Retrieves bitmap resources |
|||
wxBitmap GetBitmapResource( const wxString& name ); |
|||
|
|||
/// Retrieves icon resources |
|||
wxIcon GetIconResource( const wxString& name ); |
|||
////@end WinEDA_PrintFrame member function declarations |
|||
|
|||
/// Should we show tooltips? |
|||
static bool ShowToolTips(); |
|||
|
|||
void OnClosePrintDialog(); |
|||
void OnPrintSetup(wxCommandEvent& event); |
|||
void OnPrintPreview(wxCommandEvent& event); |
|||
void EDA_PrintPage(wxCommandEvent& event); |
|||
void SetColorOrBlack(wxCommandEvent& event); |
|||
void SetScale(wxCommandEvent& event); |
|||
int SetLayerMaskFromListSelection(); |
|||
wxString BuildPrintTitle(); |
|||
void SetOthersDatas(); |
|||
void SetPenWidth(); |
|||
|
|||
|
|||
////@begin WinEDA_PrintFrame member variables |
|||
wxBoxSizer* m_FullDialogBowSizer; |
|||
wxBoxSizer* m_LeftBoxSizer; |
|||
wxBoxSizer* m_LayersSelectionsBoxSizer; |
|||
wxBoxSizer* m_CopperLayersBoxSizer; |
|||
wxBoxSizer* m_TechLayersBoxSizer; |
|||
wxCheckBox* m_Exclude_Edges_Pcb; |
|||
wxBoxSizer* m_ScaleBoxSizer; |
|||
wxRadioBox* m_ScaleOption; |
|||
wxStaticText* m_FineAdjustXscaleTitle; |
|||
wxTextCtrl* m_FineAdjustXscaleOpt; |
|||
wxStaticText* m_FineAdjustYscaleTitle; |
|||
wxTextCtrl* m_FineAdjustYscaleOpt; |
|||
wxStaticBox* m_OptionsBoxSizer; |
|||
wxBoxSizer* m_DialogPenWidthSizer; |
|||
wxCheckBox* m_Print_Sheet_Ref; |
|||
wxCheckBox* m_Print_Mirror; |
|||
wxRadioBox* m_ColorOption; |
|||
wxRadioBox* m_PagesOptionPcb; |
|||
wxRadioBox* m_PagesOptionEeschema; |
|||
wxBoxSizer* m_ButtonsBoxSizer; |
|||
wxButton* m_CloseButton; |
|||
////@end WinEDA_PrintFrame member variables |
|||
|
|||
WinEDA_DrawFrame * m_Parent; |
|||
wxRadioBox* m_PagesOption; |
|||
WinEDA_ValueCtrl * m_DialogPenWidth; |
|||
wxCheckBox * m_BoxSelecLayer[32]; |
|||
double m_XScaleAdjust, m_YScaleAdjust; |
|||
wxConfig * m_Config; |
|||
}; |
|||
|
|||
#endif |
|||
// _DIALOG_PRINT_H_ |
|||
1681
share/dialog_print.pjd
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
Write
Preview
Loading…
Cancel
Save
Reference in new issue