KiCad PCB EDA Suite
dialog_print_generic_base.cpp
Go to the documentation of this file.
1 // C++ code generated with wxFormBuilder (version Jul 17 2016)
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 
30  m_outputModeLabel = new wxStaticText( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("Output mode:"), wxDefaultPosition, wxDefaultSize, 0 );
31  m_outputModeLabel->Wrap( -1 );
32  gbOptionsSizer->Add( m_outputModeLabel, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxALL, 5 );
33 
34  wxString m_outputModeChoices[] = { _("Color"), _("Black and white") };
35  int m_outputModeNChoices = sizeof( m_outputModeChoices ) / sizeof( wxString );
36  m_outputMode = new wxChoice( sbOptionsSizer->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_outputModeNChoices, m_outputModeChoices, 0 );
37  m_outputMode->SetSelection( 0 );
38  gbOptionsSizer->Add( m_outputMode, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), wxALL|wxEXPAND, 5 );
39 
40  m_titleBlock = new wxCheckBox( sbOptionsSizer->GetStaticBox(), wxID_FRAME_SEL, _("Print border and title block"), wxDefaultPosition, wxDefaultSize, 0 );
41  m_titleBlock->SetValue(true);
42  m_titleBlock->SetToolTip( _("Print Frame references.") );
43 
44  gbOptionsSizer->Add( m_titleBlock, wxGBPosition( 1, 0 ), wxGBSpan( 1, 3 ), wxALL|wxEXPAND, 5 );
45 
46 
47  gbOptionsSizer->AddGrowableCol( 1 );
48 
49  sbOptionsSizer->Add( gbOptionsSizer, 1, wxEXPAND, 5 );
50 
51 
52  bOptionsSizer->Add( sbOptionsSizer, 1, wxEXPAND|wxALL, 5 );
53 
54  wxStaticBoxSizer* bScaleSizer;
55  bScaleSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Scale") ), wxVERTICAL );
56 
57  m_scale1 = new wxRadioButton( bScaleSizer->GetStaticBox(), wxID_ANY, _("1:1"), wxDefaultPosition, wxDefaultSize, 0 );
58  bScaleSizer->Add( m_scale1, 0, wxALL, 5 );
59 
60  m_scaleFit = new wxRadioButton( bScaleSizer->GetStaticBox(), wxID_ANY, _("Fit to page"), wxDefaultPosition, wxDefaultSize, 0 );
61  bScaleSizer->Add( m_scaleFit, 0, wxALL|wxTOP, 5 );
62 
63  wxBoxSizer* bSizer10;
64  bSizer10 = new wxBoxSizer( wxHORIZONTAL );
65 
66  m_scaleCustom = new wxRadioButton( bScaleSizer->GetStaticBox(), wxID_ANY, _("Custom:"), wxDefaultPosition, wxDefaultSize, 0 );
67  bSizer10->Add( m_scaleCustom, 0, wxALL|wxTOP, 5 );
68 
69  m_scaleCustomText = new wxTextCtrl( bScaleSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
70  m_scaleCustomText->SetToolTip( _("Set X scale adjust for exact scale plotting") );
71 
72  bSizer10->Add( m_scaleCustomText, 1, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
73 
74 
75  bScaleSizer->Add( bSizer10, 1, wxEXPAND, 5 );
76 
77 
78  bOptionsSizer->Add( bScaleSizer, 0, wxALL|wxEXPAND, 5 );
79 
80 
81  bUpperSizer->Add( bOptionsSizer, 1, wxEXPAND, 5 );
82 
83 
84  bMainSizer->Add( bUpperSizer, 1, wxEXPAND|wxALL, 5 );
85 
86  m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
87  bMainSizer->Add( m_staticline1, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 10 );
88 
89  wxBoxSizer* bButtonsSizer;
90  bButtonsSizer = new wxBoxSizer( wxHORIZONTAL );
91 
92  m_buttonOption = new wxButton( this, wxID_PRINT_OPTIONS, _("Page Setup..."), wxDefaultPosition, wxDefaultSize, 0 );
93  m_buttonOption->SetMinSize( wxSize( 120,-1 ) );
94 
95  bButtonsSizer->Add( m_buttonOption, 0, wxALL|wxEXPAND, 5 );
96 
97  m_sdbSizer1 = new wxStdDialogButtonSizer();
98  m_sdbSizer1OK = new wxButton( this, wxID_OK );
99  m_sdbSizer1->AddButton( m_sdbSizer1OK );
100  m_sdbSizer1Apply = new wxButton( this, wxID_APPLY );
101  m_sdbSizer1->AddButton( m_sdbSizer1Apply );
102  m_sdbSizer1Cancel = new wxButton( this, wxID_CANCEL );
103  m_sdbSizer1->AddButton( m_sdbSizer1Cancel );
104  m_sdbSizer1->Realize();
105 
106  bButtonsSizer->Add( m_sdbSizer1, 1, wxALL|wxEXPAND, 5 );
107 
108 
109  bMainSizer->Add( bButtonsSizer, 0, wxEXPAND|wxLEFT, 10 );
110 
111 
112  this->SetSizer( bMainSizer );
113  this->Layout();
114 
115  this->Centre( wxBOTH );
116 
117  // Connect Events
118  this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_PRINT_GENERIC_BASE::onClose ) );
119  m_scaleCustomText->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PRINT_GENERIC_BASE::onSetCustomScale ), NULL, this );
120  m_buttonOption->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_GENERIC_BASE::onPageSetup ), NULL, this );
121  m_sdbSizer1Apply->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_GENERIC_BASE::onPrintPreview ), NULL, this );
122  m_sdbSizer1Cancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_GENERIC_BASE::onCloseButton ), NULL, this );
123  m_sdbSizer1OK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_GENERIC_BASE::onPrintButtonClick ), NULL, this );
124 }
125 
127 {
128  // Disconnect Events
129  this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_PRINT_GENERIC_BASE::onClose ) );
130  m_scaleCustomText->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PRINT_GENERIC_BASE::onSetCustomScale ), NULL, this );
131  m_buttonOption->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_GENERIC_BASE::onPageSetup ), NULL, this );
132  m_sdbSizer1Apply->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_GENERIC_BASE::onPrintPreview ), NULL, this );
133  m_sdbSizer1Cancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_GENERIC_BASE::onCloseButton ), NULL, this );
134  m_sdbSizer1OK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_GENERIC_BASE::onPrintButtonClick ), NULL, this );
135 
136 }
virtual void onClose(wxCloseEvent &event)
virtual void onCloseButton(wxCommandEvent &event)
Class DIALOG_SHIM may sit in the inheritance tree between wxDialog and any class written by wxFormBui...
Definition: dialog_shim.h:82
virtual void onPrintButtonClick(wxCommandEvent &event)
virtual void onPageSetup(wxCommandEvent &event)
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)
virtual void onSetCustomScale(wxCommandEvent &event)
wxStdDialogButtonSizer * m_sdbSizer1