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