KiCad PCB EDA Suite
dialog_print_generic_base.cpp
Go to the documentation of this file.
1 // C++ code generated with wxFormBuilder (version Jul 10 2019)
3 // http://www.wxformbuilder.org/
4 //
5 // PLEASE DO *NOT* EDIT THIS FILE!
7 
9 
11 
12 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 )
13 {
14  this->SetSizeHints( wxSize( -1,-1 ), wxDefaultSize );
15 
16  wxBoxSizer* bMainSizer;
17  bMainSizer = new wxBoxSizer( wxVERTICAL );
18 
19  bUpperSizer = new wxBoxSizer( wxHORIZONTAL );
20 
21  wxBoxSizer* bOptionsSizer;
22  bOptionsSizer = new wxBoxSizer( wxVERTICAL );
23 
24  sbOptionsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Options") ), wxVERTICAL );
25 
26  gbOptionsSizer = new wxGridBagSizer( 2, 0 );
27  gbOptionsSizer->SetFlexibleDirection( wxBOTH );
28  gbOptionsSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
29  gbOptionsSizer->SetEmptyCellSize( wxSize( -1,10 ) );
30 
31  m_outputModeLabel = new wxStaticText( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("Output mode:"), wxDefaultPosition, wxDefaultSize, 0 );
32  m_outputModeLabel->Wrap( -1 );
33  gbOptionsSizer->Add( m_outputModeLabel, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxALL, 5 );
34 
35  wxString m_outputModeChoices[] = { _("Color"), _("Black and white") };
36  int m_outputModeNChoices = sizeof( m_outputModeChoices ) / sizeof( wxString );
37  m_outputMode = new wxChoice( sbOptionsSizer->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_outputModeNChoices, m_outputModeChoices, 0 );
38  m_outputMode->SetSelection( 0 );
39  gbOptionsSizer->Add( m_outputMode, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), wxALL|wxEXPAND, 5 );
40 
41  m_titleBlock = new wxCheckBox( sbOptionsSizer->GetStaticBox(), wxID_FRAME_SEL, _("Print border and title block"), wxDefaultPosition, wxDefaultSize, 0 );
42  m_titleBlock->SetValue(true);
43  m_titleBlock->SetToolTip( _("Print Frame references.") );
44 
45  gbOptionsSizer->Add( m_titleBlock, wxGBPosition( 1, 0 ), wxGBSpan( 1, 3 ), wxALL|wxEXPAND, 5 );
46 
47 
48  gbOptionsSizer->AddGrowableCol( 1 );
49 
50  sbOptionsSizer->Add( gbOptionsSizer, 1, wxEXPAND, 5 );
51 
52 
53  bOptionsSizer->Add( sbOptionsSizer, 1, wxEXPAND|wxALL, 5 );
54 
55  wxStaticBoxSizer* bScaleSizer;
56  bScaleSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Scale") ), wxVERTICAL );
57 
58  m_scale1 = new wxRadioButton( bScaleSizer->GetStaticBox(), wxID_ANY, _("1:1"), wxDefaultPosition, wxDefaultSize, 0 );
59  bScaleSizer->Add( m_scale1, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
60 
61 
62  bScaleSizer->Add( 0, 2, 0, 0, 5 );
63 
64  m_scaleFit = new wxRadioButton( bScaleSizer->GetStaticBox(), wxID_ANY, _("Fit to page"), wxDefaultPosition, wxDefaultSize, 0 );
65  bScaleSizer->Add( m_scaleFit, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
66 
67  wxBoxSizer* bSizerScaleCustom;
68  bSizerScaleCustom = new wxBoxSizer( wxHORIZONTAL );
69 
70  m_scaleCustom = new wxRadioButton( bScaleSizer->GetStaticBox(), wxID_ANY, _("Custom:"), wxDefaultPosition, wxDefaultSize, 0 );
71  bSizerScaleCustom->Add( m_scaleCustom, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
72 
73  m_scaleCustomText = new wxTextCtrl( bScaleSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
74  m_scaleCustomText->SetToolTip( _("Set X scale adjust for exact scale plotting") );
75 
76  bSizerScaleCustom->Add( m_scaleCustomText, 1, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
77 
78 
79  bScaleSizer->Add( bSizerScaleCustom, 1, wxEXPAND, 5 );
80 
81 
82  bOptionsSizer->Add( bScaleSizer, 0, wxALL|wxEXPAND, 5 );
83 
84 
85  bUpperSizer->Add( bOptionsSizer, 1, wxEXPAND, 5 );
86 
87 
88  bMainSizer->Add( bUpperSizer, 1, wxEXPAND|wxALL, 5 );
89 
90  m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
91  bMainSizer->Add( m_staticline1, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 10 );
92 
93  wxBoxSizer* bButtonsSizer;
94  bButtonsSizer = new wxBoxSizer( wxHORIZONTAL );
95 
96  m_buttonOption = new wxButton( this, wxID_PRINT_OPTIONS, _("Page Setup..."), wxDefaultPosition, wxDefaultSize, 0 );
97  m_buttonOption->SetMinSize( wxSize( 120,-1 ) );
98 
99  bButtonsSizer->Add( m_buttonOption, 0, wxALL|wxEXPAND, 5 );
100 
101  m_sdbSizer1 = new wxStdDialogButtonSizer();
102  m_sdbSizer1OK = new wxButton( this, wxID_OK );
103  m_sdbSizer1->AddButton( m_sdbSizer1OK );
104  m_sdbSizer1Apply = new wxButton( this, wxID_APPLY );
105  m_sdbSizer1->AddButton( m_sdbSizer1Apply );
106  m_sdbSizer1Cancel = new wxButton( this, wxID_CANCEL );
107  m_sdbSizer1->AddButton( m_sdbSizer1Cancel );
108  m_sdbSizer1->Realize();
109 
110  bButtonsSizer->Add( m_sdbSizer1, 1, wxALL|wxEXPAND, 5 );
111 
112 
113  bMainSizer->Add( bButtonsSizer, 0, wxEXPAND|wxLEFT, 10 );
114 
115 
116  this->SetSizer( bMainSizer );
117  this->Layout();
118 
119  this->Centre( wxBOTH );
120 
121  // Connect Events
122  this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_PRINT_GENERIC_BASE::onClose ) );
123  m_scaleCustomText->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PRINT_GENERIC_BASE::onSetCustomScale ), NULL, this );
124  m_buttonOption->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_GENERIC_BASE::onPageSetup ), NULL, this );
125  m_sdbSizer1Apply->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_GENERIC_BASE::onPrintPreview ), NULL, this );
126  m_sdbSizer1Cancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_GENERIC_BASE::onCloseButton ), NULL, this );
127  m_sdbSizer1OK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_GENERIC_BASE::onPrintButtonClick ), NULL, this );
128 }
129 
131 {
132  // Disconnect Events
133  this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_PRINT_GENERIC_BASE::onClose ) );
134  m_scaleCustomText->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PRINT_GENERIC_BASE::onSetCustomScale ), NULL, this );
135  m_buttonOption->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_GENERIC_BASE::onPageSetup ), NULL, this );
136  m_sdbSizer1Apply->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_GENERIC_BASE::onPrintPreview ), NULL, this );
137  m_sdbSizer1Cancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_GENERIC_BASE::onCloseButton ), NULL, this );
138  m_sdbSizer1OK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_GENERIC_BASE::onPrintButtonClick ), NULL, this );
139 
140 }
virtual void onClose(wxCloseEvent &event)
virtual void onCloseButton(wxCommandEvent &event)
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
Definition: dialog_shim.h:83
virtual void onPrintButtonClick(wxCommandEvent &event)
virtual void onPageSetup(wxCommandEvent &event)
#define NULL
virtual void onPrintPreview(wxCommandEvent &event)
DIALOG_PRINT_GENERIC_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Print"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(410, 476), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
#define _(s)
Definition: 3d_actions.cpp:33
virtual void onSetCustomScale(wxCommandEvent &event)
wxStdDialogButtonSizer * m_sdbSizer1