2018-10-05 14:41:17 +00:00
|
|
|
///////////////////////////////////////////////////////////////////////////
|
2023-01-11 20:29:16 +00:00
|
|
|
// C++ code generated with wxFormBuilder (version 3.10.1-254-gc2ef7767)
|
2018-10-05 14:41:17 +00:00
|
|
|
// http://www.wxformbuilder.org/
|
|
|
|
//
|
2020-08-11 18:52:18 +00:00
|
|
|
// PLEASE DO *NOT* EDIT THIS FILE!
|
2018-10-05 14:41:17 +00:00
|
|
|
///////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#include "dialog_print_generic_base.h"
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
DIALOG_PRINT_GENERIC_BASE::DIALOG_PRINT_GENERIC_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
|
|
|
|
{
|
|
|
|
this->SetSizeHints( wxSize( -1,-1 ), wxDefaultSize );
|
2020-08-11 18:52:18 +00:00
|
|
|
|
2018-10-05 14:41:17 +00:00
|
|
|
wxBoxSizer* bMainSizer;
|
|
|
|
bMainSizer = new wxBoxSizer( wxVERTICAL );
|
2020-08-11 18:52:18 +00:00
|
|
|
|
2021-04-16 12:12:55 +00:00
|
|
|
m_bUpperSizer = new wxBoxSizer( wxHORIZONTAL );
|
2020-08-11 18:52:18 +00:00
|
|
|
|
2021-04-16 12:12:55 +00:00
|
|
|
wxBoxSizer* bRightCol;
|
|
|
|
bRightCol = new wxBoxSizer( wxVERTICAL );
|
2020-08-11 18:52:18 +00:00
|
|
|
|
2021-04-16 12:12:55 +00:00
|
|
|
m_sbOptionsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Options") ), wxVERTICAL );
|
2020-08-11 18:52:18 +00:00
|
|
|
|
2021-04-16 12:12:55 +00:00
|
|
|
m_gbOptionsSizer = new wxGridBagSizer( 3, 0 );
|
|
|
|
m_gbOptionsSizer->SetFlexibleDirection( wxBOTH );
|
|
|
|
m_gbOptionsSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
|
|
|
m_gbOptionsSizer->SetEmptyCellSize( wxSize( -1,10 ) );
|
2020-08-11 18:52:18 +00:00
|
|
|
|
2021-04-16 12:12:55 +00:00
|
|
|
m_outputModeLabel = new wxStaticText( m_sbOptionsSizer->GetStaticBox(), wxID_ANY, _("Output mode:"), wxDefaultPosition, wxDefaultSize, 0 );
|
2018-10-05 14:41:17 +00:00
|
|
|
m_outputModeLabel->Wrap( -1 );
|
2021-04-16 12:12:55 +00:00
|
|
|
m_gbOptionsSizer->Add( m_outputModeLabel, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
2020-08-11 18:52:18 +00:00
|
|
|
|
2018-10-05 14:41:17 +00:00
|
|
|
wxString m_outputModeChoices[] = { _("Color"), _("Black and white") };
|
|
|
|
int m_outputModeNChoices = sizeof( m_outputModeChoices ) / sizeof( wxString );
|
2021-04-16 12:12:55 +00:00
|
|
|
m_outputMode = new wxChoice( m_sbOptionsSizer->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_outputModeNChoices, m_outputModeChoices, 0 );
|
2018-10-05 14:41:17 +00:00
|
|
|
m_outputMode->SetSelection( 0 );
|
2021-04-16 12:12:55 +00:00
|
|
|
m_gbOptionsSizer->Add( m_outputMode, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
2020-08-11 18:52:18 +00:00
|
|
|
|
2023-01-11 20:29:16 +00:00
|
|
|
m_titleBlock = new wxCheckBox( m_sbOptionsSizer->GetStaticBox(), wxID_FRAME_SEL, _("Print drawing sheet"), wxDefaultPosition, wxDefaultSize, 0 );
|
2020-08-11 18:52:18 +00:00
|
|
|
m_titleBlock->SetValue(true);
|
2018-10-05 14:41:17 +00:00
|
|
|
m_titleBlock->SetToolTip( _("Print Frame references.") );
|
2020-08-11 18:52:18 +00:00
|
|
|
|
2021-04-16 12:12:55 +00:00
|
|
|
m_gbOptionsSizer->Add( m_titleBlock, wxGBPosition( 1, 0 ), wxGBSpan( 1, 3 ), wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
2020-08-11 18:52:18 +00:00
|
|
|
|
|
|
|
|
2021-04-16 12:12:55 +00:00
|
|
|
m_gbOptionsSizer->AddGrowableCol( 1 );
|
2020-08-11 18:52:18 +00:00
|
|
|
|
2021-04-16 12:12:55 +00:00
|
|
|
m_sbOptionsSizer->Add( m_gbOptionsSizer, 1, wxEXPAND|wxBOTTOM|wxRIGHT, 5 );
|
2020-08-11 18:52:18 +00:00
|
|
|
|
|
|
|
|
2021-04-16 12:12:55 +00:00
|
|
|
bRightCol->Add( m_sbOptionsSizer, 1, wxEXPAND|wxALL, 5 );
|
2020-08-11 18:52:18 +00:00
|
|
|
|
2018-10-05 14:41:17 +00:00
|
|
|
wxStaticBoxSizer* bScaleSizer;
|
|
|
|
bScaleSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Scale") ), wxVERTICAL );
|
2020-08-11 18:52:18 +00:00
|
|
|
|
2018-10-05 14:41:17 +00:00
|
|
|
m_scale1 = new wxRadioButton( bScaleSizer->GetStaticBox(), wxID_ANY, _("1:1"), wxDefaultPosition, wxDefaultSize, 0 );
|
2021-04-16 12:12:55 +00:00
|
|
|
bScaleSizer->Add( m_scale1, 0, wxRIGHT|wxLEFT, 5 );
|
2020-08-11 18:52:18 +00:00
|
|
|
|
|
|
|
|
2021-04-16 12:12:55 +00:00
|
|
|
bScaleSizer->Add( 0, 5, 0, 0, 5 );
|
2020-08-11 18:52:18 +00:00
|
|
|
|
2018-10-05 14:41:17 +00:00
|
|
|
m_scaleFit = new wxRadioButton( bScaleSizer->GetStaticBox(), wxID_ANY, _("Fit to page"), wxDefaultPosition, wxDefaultSize, 0 );
|
2021-04-16 12:12:55 +00:00
|
|
|
bScaleSizer->Add( m_scaleFit, 0, wxRIGHT|wxLEFT, 5 );
|
|
|
|
|
|
|
|
|
|
|
|
bScaleSizer->Add( 0, 3, 0, wxEXPAND, 5 );
|
2020-08-11 18:52:18 +00:00
|
|
|
|
2020-08-22 14:40:56 +00:00
|
|
|
wxBoxSizer* bSizerScaleCustom;
|
|
|
|
bSizerScaleCustom = new wxBoxSizer( wxHORIZONTAL );
|
2020-08-11 18:52:18 +00:00
|
|
|
|
2018-10-05 14:41:17 +00:00
|
|
|
m_scaleCustom = new wxRadioButton( bScaleSizer->GetStaticBox(), wxID_ANY, _("Custom:"), wxDefaultPosition, wxDefaultSize, 0 );
|
2021-04-16 12:12:55 +00:00
|
|
|
bSizerScaleCustom->Add( m_scaleCustom, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
|
2020-08-11 18:52:18 +00:00
|
|
|
|
2018-10-05 14:41:17 +00:00
|
|
|
m_scaleCustomText = new wxTextCtrl( bScaleSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
m_scaleCustomText->SetToolTip( _("Set X scale adjust for exact scale plotting") );
|
2020-08-11 18:52:18 +00:00
|
|
|
|
2021-04-16 12:12:55 +00:00
|
|
|
bSizerScaleCustom->Add( m_scaleCustomText, 1, wxEXPAND|wxRIGHT, 5 );
|
2020-08-11 18:52:18 +00:00
|
|
|
|
|
|
|
|
2021-04-16 12:12:55 +00:00
|
|
|
bScaleSizer->Add( bSizerScaleCustom, 1, wxEXPAND|wxBOTTOM, 5 );
|
2020-08-11 18:52:18 +00:00
|
|
|
|
|
|
|
|
2021-04-16 12:12:55 +00:00
|
|
|
bRightCol->Add( bScaleSizer, 0, wxALL|wxEXPAND, 5 );
|
2020-08-11 18:52:18 +00:00
|
|
|
|
|
|
|
|
2021-08-21 08:52:51 +00:00
|
|
|
m_bUpperSizer->Add( bRightCol, 0, wxEXPAND, 5 );
|
2020-08-11 18:52:18 +00:00
|
|
|
|
|
|
|
|
2021-04-16 12:12:55 +00:00
|
|
|
bMainSizer->Add( m_bUpperSizer, 1, wxEXPAND|wxALL, 5 );
|
2020-08-11 18:52:18 +00:00
|
|
|
|
2022-03-18 13:10:18 +00:00
|
|
|
wxBoxSizer* bSizer6;
|
|
|
|
bSizer6 = new wxBoxSizer( wxVERTICAL );
|
|
|
|
|
|
|
|
m_infoText = new wxStaticText( this, wxID_ANY, _("Info text"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
m_infoText->Wrap( -1 );
|
|
|
|
m_infoText->Hide();
|
|
|
|
|
|
|
|
bSizer6->Add( m_infoText, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
|
|
|
|
|
|
|
|
|
|
|
bMainSizer->Add( bSizer6, 0, wxEXPAND|wxLEFT, 10 );
|
|
|
|
|
2018-10-05 14:41:17 +00:00
|
|
|
wxBoxSizer* bButtonsSizer;
|
|
|
|
bButtonsSizer = new wxBoxSizer( wxHORIZONTAL );
|
2020-08-11 18:52:18 +00:00
|
|
|
|
2018-10-05 14:41:17 +00:00
|
|
|
m_buttonOption = new wxButton( this, wxID_PRINT_OPTIONS, _("Page Setup..."), wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
m_buttonOption->SetMinSize( wxSize( 120,-1 ) );
|
2020-08-11 18:52:18 +00:00
|
|
|
|
2018-10-05 14:41:17 +00:00
|
|
|
bButtonsSizer->Add( m_buttonOption, 0, wxALL|wxEXPAND, 5 );
|
2020-08-11 18:52:18 +00:00
|
|
|
|
2018-10-05 14:41:17 +00:00
|
|
|
m_sdbSizer1 = new wxStdDialogButtonSizer();
|
|
|
|
m_sdbSizer1OK = new wxButton( this, wxID_OK );
|
|
|
|
m_sdbSizer1->AddButton( m_sdbSizer1OK );
|
|
|
|
m_sdbSizer1Apply = new wxButton( this, wxID_APPLY );
|
|
|
|
m_sdbSizer1->AddButton( m_sdbSizer1Apply );
|
|
|
|
m_sdbSizer1Cancel = new wxButton( this, wxID_CANCEL );
|
|
|
|
m_sdbSizer1->AddButton( m_sdbSizer1Cancel );
|
|
|
|
m_sdbSizer1->Realize();
|
2020-08-11 18:52:18 +00:00
|
|
|
|
2018-10-05 14:41:17 +00:00
|
|
|
bButtonsSizer->Add( m_sdbSizer1, 1, wxALL|wxEXPAND, 5 );
|
2020-08-11 18:52:18 +00:00
|
|
|
|
|
|
|
|
2018-10-05 14:41:17 +00:00
|
|
|
bMainSizer->Add( bButtonsSizer, 0, wxEXPAND|wxLEFT, 10 );
|
2020-08-11 18:52:18 +00:00
|
|
|
|
|
|
|
|
2018-10-05 14:41:17 +00:00
|
|
|
this->SetSizer( bMainSizer );
|
|
|
|
this->Layout();
|
2021-07-21 21:37:49 +00:00
|
|
|
bMainSizer->Fit( this );
|
2020-08-11 18:52:18 +00:00
|
|
|
|
2018-10-05 14:41:17 +00:00
|
|
|
this->Centre( wxBOTH );
|
2020-08-11 18:52:18 +00:00
|
|
|
|
2018-10-05 14:41:17 +00:00
|
|
|
// Connect Events
|
|
|
|
this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_PRINT_GENERIC_BASE::onClose ) );
|
|
|
|
m_scaleCustomText->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PRINT_GENERIC_BASE::onSetCustomScale ), NULL, this );
|
|
|
|
m_buttonOption->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_GENERIC_BASE::onPageSetup ), NULL, this );
|
|
|
|
m_sdbSizer1Apply->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_GENERIC_BASE::onPrintPreview ), NULL, this );
|
2021-07-21 21:37:49 +00:00
|
|
|
m_sdbSizer1Cancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_GENERIC_BASE::onCancelButtonClick ), NULL, this );
|
2018-10-05 14:41:17 +00:00
|
|
|
m_sdbSizer1OK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_GENERIC_BASE::onPrintButtonClick ), NULL, this );
|
|
|
|
}
|
|
|
|
|
|
|
|
DIALOG_PRINT_GENERIC_BASE::~DIALOG_PRINT_GENERIC_BASE()
|
|
|
|
{
|
|
|
|
// Disconnect Events
|
|
|
|
this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_PRINT_GENERIC_BASE::onClose ) );
|
|
|
|
m_scaleCustomText->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PRINT_GENERIC_BASE::onSetCustomScale ), NULL, this );
|
|
|
|
m_buttonOption->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_GENERIC_BASE::onPageSetup ), NULL, this );
|
|
|
|
m_sdbSizer1Apply->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_GENERIC_BASE::onPrintPreview ), NULL, this );
|
2021-07-21 21:37:49 +00:00
|
|
|
m_sdbSizer1Cancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_GENERIC_BASE::onCancelButtonClick ), NULL, this );
|
2018-10-05 14:41:17 +00:00
|
|
|
m_sdbSizer1OK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_GENERIC_BASE::onPrintButtonClick ), NULL, this );
|
2020-08-11 18:52:18 +00:00
|
|
|
|
2018-10-05 14:41:17 +00:00
|
|
|
}
|