2013-05-26 04:36:44 +00:00
|
|
|
///////////////////////////////////////////////////////////////////////////
|
2018-04-23 20:10:53 +00:00
|
|
|
// C++ code generated with wxFormBuilder (version Apr 19 2018)
|
2013-05-26 04:36:44 +00:00
|
|
|
// http://www.wxformbuilder.org/
|
|
|
|
//
|
2017-12-27 17:09:27 +00:00
|
|
|
// PLEASE DO *NOT* EDIT THIS FILE!
|
2013-05-26 04:36:44 +00:00
|
|
|
///////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#include "dialog_print_using_printer_base.h"
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2013-09-29 18:24:38 +00:00
|
|
|
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 ) : DIALOG_SHIM( parent, id, title, pos, size, style )
|
2013-05-26 04:36:44 +00:00
|
|
|
{
|
|
|
|
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 );
|
|
|
|
|
2016-05-26 18:13:53 +00:00
|
|
|
m_leftLayersBoxSizer = new wxStaticBoxSizer( new wxStaticBox( sbLayersSizer->GetStaticBox(), wxID_ANY, _("Graphic layers:") ), wxVERTICAL );
|
2013-05-26 04:36:44 +00:00
|
|
|
|
|
|
|
|
|
|
|
bleftSizer->Add( m_leftLayersBoxSizer, 1, wxALL, 5 );
|
|
|
|
|
2016-05-26 18:13:53 +00:00
|
|
|
m_rightLayersBoxSizer = new wxStaticBoxSizer( new wxStaticBox( sbLayersSizer->GetStaticBox(), wxID_ANY, _("Graphic layers:") ), wxVERTICAL );
|
2013-05-26 04:36:44 +00:00
|
|
|
|
|
|
|
|
|
|
|
bleftSizer->Add( m_rightLayersBoxSizer, 1, wxALL, 5 );
|
|
|
|
|
|
|
|
|
|
|
|
sbLayersSizer->Add( bleftSizer, 1, wxEXPAND, 5 );
|
|
|
|
|
|
|
|
|
|
|
|
bMainSizer->Add( sbLayersSizer, 1, wxEXPAND, 5 );
|
|
|
|
|
|
|
|
wxBoxSizer* bmiddleLeftSizer;
|
|
|
|
bmiddleLeftSizer = new wxBoxSizer( wxVERTICAL );
|
|
|
|
|
2017-12-27 17:09:27 +00:00
|
|
|
wxString m_ScaleOptionChoices[] = { _("Fit to page"), _("Scale 0.5"), _("Scale 0.7"), _("Approximate scale 1"), _("Accurate scale 1"), _("Scale 1.4"), _("Scale 2"), _("Scale 3"), _("Scale 4") };
|
2013-05-26 04:36:44 +00:00
|
|
|
int m_ScaleOptionNChoices = sizeof( m_ScaleOptionChoices ) / sizeof( wxString );
|
2018-04-23 20:10:53 +00:00
|
|
|
m_ScaleOption = new wxRadioBox( this, wxID_ANY, _("Approximate Scale:"), wxDefaultPosition, wxDefaultSize, m_ScaleOptionNChoices, m_ScaleOptionChoices, 1, wxRA_SPECIFY_COLS );
|
2017-12-27 17:09:27 +00:00
|
|
|
m_ScaleOption->SetSelection( 0 );
|
2013-05-26 04:36:44 +00:00
|
|
|
bmiddleLeftSizer->Add( m_ScaleOption, 0, wxALL, 5 );
|
|
|
|
|
2018-04-23 20:14:06 +00:00
|
|
|
m_FineAdjustXscaleTitle = new wxStaticText( this, wxID_ANY, _("X scale:"), wxDefaultPosition, wxDefaultSize, 0 );
|
2013-05-26 04:36:44 +00:00
|
|
|
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 );
|
|
|
|
|
2018-04-23 20:14:06 +00:00
|
|
|
m_FineAdjustYscaleTitle = new wxStaticText( this, wxID_ANY, _("Y scale:"), wxDefaultPosition, wxDefaultSize, 0 );
|
2013-05-26 04:36:44 +00:00
|
|
|
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 );
|
|
|
|
|
2016-05-26 18:13:53 +00:00
|
|
|
m_Print_Mirror = new wxCheckBox( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("Mirror"), wxDefaultPosition, wxDefaultSize, 0 );
|
2013-05-26 04:36:44 +00:00
|
|
|
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 );
|
2018-04-23 20:10:53 +00:00
|
|
|
m_ModeColorOption = new wxRadioBox( this, wxID_PRINT_MODE, _("Print Mode:"), wxDefaultPosition, wxDefaultSize, m_ModeColorOptionNChoices, m_ModeColorOptionChoices, 1, wxRA_SPECIFY_COLS );
|
2013-05-26 04:36:44 +00:00
|
|
|
m_ModeColorOption->SetSelection( 0 );
|
|
|
|
m_ModeColorOption->SetToolTip( _("Choose if you want to print sheets in color, or force the black and white mode.") );
|
|
|
|
|
|
|
|
bmiddleRightSizer->Add( m_ModeColorOption, 0, wxALL|wxEXPAND, 5 );
|
|
|
|
|
|
|
|
|
|
|
|
bMainSizer->Add( bmiddleRightSizer, 0, wxEXPAND, 5 );
|
|
|
|
|
|
|
|
wxBoxSizer* b_buttonsSizer;
|
|
|
|
b_buttonsSizer = new wxBoxSizer( wxVERTICAL );
|
|
|
|
|
|
|
|
m_buttonOption = new wxButton( this, wxID_PRINT_OPTIONS, _("Page Options"), wxDefaultPosition, wxDefaultSize, 0 );
|
2015-06-15 13:54:58 +00:00
|
|
|
b_buttonsSizer->Add( m_buttonOption, 0, wxALL|wxEXPAND, 5 );
|
2013-05-26 04:36:44 +00:00
|
|
|
|
|
|
|
m_buttonPreview = new wxButton( this, wxID_PREVIEW, _("Preview"), wxDefaultPosition, wxDefaultSize, 0 );
|
2015-06-15 13:54:58 +00:00
|
|
|
b_buttonsSizer->Add( m_buttonPreview, 0, wxALL|wxEXPAND, 5 );
|
2013-05-26 04:36:44 +00:00
|
|
|
|
|
|
|
m_buttonPrint = new wxButton( this, wxID_PRINT_ALL, _("Print"), wxDefaultPosition, wxDefaultSize, 0 );
|
2013-09-29 18:24:38 +00:00
|
|
|
m_buttonPrint->SetDefault();
|
2015-06-15 13:54:58 +00:00
|
|
|
b_buttonsSizer->Add( m_buttonPrint, 0, wxALL|wxEXPAND, 5 );
|
2013-05-26 04:36:44 +00:00
|
|
|
|
|
|
|
m_buttonQuit = new wxButton( this, wxID_CANCEL, _("Close"), wxDefaultPosition, wxDefaultSize, 0 );
|
2015-06-15 13:54:58 +00:00
|
|
|
b_buttonsSizer->Add( m_buttonQuit, 0, wxALL|wxEXPAND, 5 );
|
2013-05-26 04:36:44 +00:00
|
|
|
|
|
|
|
|
|
|
|
bMainSizer->Add( b_buttonsSizer, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
|
|
|
|
|
|
|
|
|
|
|
this->SetSizer( bMainSizer );
|
|
|
|
this->Layout();
|
2017-12-27 17:09:27 +00:00
|
|
|
bMainSizer->Fit( this );
|
2013-05-26 04:36:44 +00:00
|
|
|
|
|
|
|
// Connect Events
|
2013-09-29 18:24:38 +00:00
|
|
|
this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_PRINT_USING_PRINTER_BASE::OnCloseWindow ) );
|
|
|
|
m_ScaleOption->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_BASE::OnScaleSelectionClick ), NULL, this );
|
|
|
|
m_buttonOption->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_BASE::OnPageSetup ), 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 );
|
2016-05-26 18:13:53 +00:00
|
|
|
m_buttonQuit->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_BASE::OnButtonCloseClick ), NULL, this );
|
2013-05-26 04:36:44 +00:00
|
|
|
}
|
|
|
|
|
2013-09-29 18:24:38 +00:00
|
|
|
DIALOG_PRINT_USING_PRINTER_BASE::~DIALOG_PRINT_USING_PRINTER_BASE()
|
2013-05-26 04:36:44 +00:00
|
|
|
{
|
|
|
|
// Disconnect Events
|
2013-09-29 18:24:38 +00:00
|
|
|
this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_PRINT_USING_PRINTER_BASE::OnCloseWindow ) );
|
|
|
|
m_ScaleOption->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_BASE::OnScaleSelectionClick ), NULL, this );
|
|
|
|
m_buttonOption->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_BASE::OnPageSetup ), 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 );
|
2016-05-26 18:13:53 +00:00
|
|
|
m_buttonQuit->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_BASE::OnButtonCloseClick ), NULL, this );
|
2013-05-26 04:36:44 +00:00
|
|
|
|
|
|
|
}
|