KiCad PCB EDA Suite
Loading...
Searching...
No Matches
dialog_plot_schematic_base.cpp
Go to the documentation of this file.
1
2// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6)
3// http://www.wxformbuilder.org/
4//
5// PLEASE DO *NOT* EDIT THIS FILE!
7
10
12
14
15DIALOG_PLOT_SCHEMATIC_BASE::DIALOG_PLOT_SCHEMATIC_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
16{
17 this->SetSizeHints( wxSize( -1,-1 ), wxDefaultSize );
18
19 wxBoxSizer* bMainSizer;
20 bMainSizer = new wxBoxSizer( wxVERTICAL );
21
22 wxBoxSizer* bOutputDir;
23 bOutputDir = new wxBoxSizer( wxHORIZONTAL );
24
25 m_outputPathLabel = new wxStaticText( this, wxID_ANY, _("Output directory:"), wxDefaultPosition, wxDefaultSize, 0 );
26 m_outputPathLabel->Wrap( -1 );
27 bOutputDir->Add( m_outputPathLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
28
29 m_outputPath = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
30 m_outputPath->SetToolTip( _("Target directory for plot files. Can be absolute or relative to the schematic main file location.") );
31
32 bOutputDir->Add( m_outputPath, 1, wxEXPAND|wxLEFT, 5 );
33
34 m_browseButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
35 bOutputDir->Add( m_browseButton, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
36
37
38 bOutputDir->Add( 20, 0, 0, 0, 5 );
39
40 m_variantLabel = new wxStaticText( this, wxID_ANY, _("Design variant:"), wxDefaultPosition, wxDefaultSize, 0 );
41 m_variantLabel->Wrap( -1 );
42 bOutputDir->Add( m_variantLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
43
44 wxArrayString m_variantChoiceCtrlChoices;
45 m_variantChoiceCtrl = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_variantChoiceCtrlChoices, 0 );
46 m_variantChoiceCtrl->SetSelection( 0 );
47 bOutputDir->Add( m_variantChoiceCtrl, 0, wxEXPAND|wxLEFT|wxRIGHT, 5 );
48
49
50 bMainSizer->Add( bOutputDir, 0, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
51
52 m_optionsSizer = new wxBoxSizer( wxHORIZONTAL );
53
54 wxString m_plotFormatOptChoices[] = { _("Postscript"), _("PDF"), _("SVG"), _("DXF") };
55 int m_plotFormatOptNChoices = sizeof( m_plotFormatOptChoices ) / sizeof( wxString );
56 m_plotFormatOpt = new wxRadioBox( this, wxID_ANY, _("Output Format"), wxDefaultPosition, wxDefaultSize, m_plotFormatOptNChoices, m_plotFormatOptChoices, 1, wxRA_SPECIFY_COLS );
57 m_plotFormatOpt->SetSelection( 1 );
58 m_optionsSizer->Add( m_plotFormatOpt, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
59
60 wxStaticBoxSizer* sbOptions;
61 sbOptions = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Options") ), wxVERTICAL );
62
63 wxGridBagSizer* gbSizer1;
64 gbSizer1 = new wxGridBagSizer( 5, 3 );
65 gbSizer1->SetFlexibleDirection( wxBOTH );
66 gbSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
67 gbSizer1->SetEmptyCellSize( wxSize( -1,10 ) );
68
69 m_staticText4 = new wxStaticText( sbOptions->GetStaticBox(), wxID_ANY, _("Page size:"), wxDefaultPosition, wxDefaultSize, 0 );
70 m_staticText4->Wrap( -1 );
71 gbSizer1->Add( m_staticText4, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
72
73 wxString m_paperSizeOptionChoices[] = { _("Schematic size"), _("A4"), _("A") };
74 int m_paperSizeOptionNChoices = sizeof( m_paperSizeOptionChoices ) / sizeof( wxString );
75 m_paperSizeOption = new wxChoice( sbOptions->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_paperSizeOptionNChoices, m_paperSizeOptionChoices, 0 );
76 m_paperSizeOption->SetSelection( 0 );
77 gbSizer1->Add( m_paperSizeOption, wxGBPosition( 0, 1 ), wxGBSpan( 1, 2 ), wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
78
79 m_plotDrawingSheet = new wxCheckBox( sbOptions->GetStaticBox(), wxID_ANY, _("Plot drawing sheet"), wxDefaultPosition, wxDefaultSize, 0 );
80 m_plotDrawingSheet->SetValue(true);
81 m_plotDrawingSheet->SetToolTip( _("Plot the drawing sheet border and title block") );
82
83 gbSizer1->Add( m_plotDrawingSheet, wxGBPosition( 1, 0 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL, 5 );
84
85 wxStaticText* bOutputModeLabel;
86 bOutputModeLabel = new wxStaticText( sbOptions->GetStaticBox(), wxID_ANY, _("Output mode:"), wxDefaultPosition, wxDefaultSize, 0 );
87 bOutputModeLabel->Wrap( -1 );
88 gbSizer1->Add( bOutputModeLabel, wxGBPosition( 3, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
89
90 wxString m_ModeColorOptionChoices[] = { _("Color"), _("Black and White") };
91 int m_ModeColorOptionNChoices = sizeof( m_ModeColorOptionChoices ) / sizeof( wxString );
92 m_ModeColorOption = new wxChoice( sbOptions->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_ModeColorOptionNChoices, m_ModeColorOptionChoices, 0 );
93 m_ModeColorOption->SetSelection( 0 );
94 gbSizer1->Add( m_ModeColorOption, wxGBPosition( 3, 1 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
95
96 m_colorThemeLabel = new wxStaticText( sbOptions->GetStaticBox(), wxID_ANY, _("Color theme:"), wxDefaultPosition, wxDefaultSize, 0 );
97 m_colorThemeLabel->Wrap( -1 );
98 gbSizer1->Add( m_colorThemeLabel, wxGBPosition( 4, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
99
100 wxArrayString m_colorThemeChoices;
101 m_colorTheme = new wxChoice( sbOptions->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_colorThemeChoices, 0 );
102 m_colorTheme->SetSelection( 0 );
103 m_colorTheme->SetToolTip( _("Select the color theme to use for plotting") );
104
105 gbSizer1->Add( m_colorTheme, wxGBPosition( 4, 1 ), wxGBSpan( 1, 2 ), wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
106
107 m_plotBackgroundColor = new wxCheckBox( sbOptions->GetStaticBox(), wxID_ANY, _("Plot background color"), wxDefaultPosition, wxDefaultSize, 0 );
108 m_plotBackgroundColor->SetToolTip( _("Plot the background color if the output format supports it") );
109
110 gbSizer1->Add( m_plotBackgroundColor, wxGBPosition( 5, 0 ), wxGBSpan( 1, 3 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
111
112 m_lineWidthLabel = new wxStaticText( sbOptions->GetStaticBox(), wxID_ANY, _("Minimum line width:"), wxDefaultPosition, wxDefaultSize, 0 );
113 m_lineWidthLabel->Wrap( -1 );
114 gbSizer1->Add( m_lineWidthLabel, wxGBPosition( 7, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
115
116 m_lineWidthCtrl = new wxTextCtrl( sbOptions->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
117 m_lineWidthCtrl->SetToolTip( _("Selection of the default pen thickness used to draw items, when their thickness is set to 0.") );
118
119 gbSizer1->Add( m_lineWidthCtrl, wxGBPosition( 7, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxRIGHT, 5 );
120
121 m_lineWidthUnits = new wxStaticText( sbOptions->GetStaticBox(), wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
122 m_lineWidthUnits->Wrap( -1 );
123 gbSizer1->Add( m_lineWidthUnits, wxGBPosition( 7, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
124
125
126 gbSizer1->AddGrowableCol( 1 );
127
128 sbOptions->Add( gbSizer1, 1, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
129
130
131 m_optionsSizer->Add( sbOptions, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
132
133 wxBoxSizer* bOptionsRight;
134 bOptionsRight = new wxBoxSizer( wxVERTICAL );
135
136 wxStaticBoxSizer* m_sizerPDFOptions;
137 m_sizerPDFOptions = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("PDF Options") ), wxVERTICAL );
138
139 m_plotPDFPropertyPopups = new wxCheckBox( m_sizerPDFOptions->GetStaticBox(), wxID_ANY, _("Generate property popups"), wxDefaultPosition, wxDefaultSize, 0 );
140 m_plotPDFPropertyPopups->SetValue(true);
141 m_sizerPDFOptions->Add( m_plotPDFPropertyPopups, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
142
143 m_plotPDFHierarchicalLinks = new wxCheckBox( m_sizerPDFOptions->GetStaticBox(), wxID_ANY, _("Generate clickable links for hierarchical elements"), wxDefaultPosition, wxDefaultSize, 0 );
144 m_plotPDFHierarchicalLinks->SetValue(true);
145 m_sizerPDFOptions->Add( m_plotPDFHierarchicalLinks, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
146
147 m_plotPDFMetadata = new wxCheckBox( m_sizerPDFOptions->GetStaticBox(), wxID_ANY, _("Generate metadata from AUTHOR && SUBJECT variables"), wxDefaultPosition, wxDefaultSize, 0 );
148 m_plotPDFMetadata->SetValue(true);
149 m_plotPDFMetadata->SetToolTip( _("Generate PDF document properties from AUTHOR and SUBJECT text variables") );
150
151 m_sizerPDFOptions->Add( m_plotPDFMetadata, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
152
153
154 bOptionsRight->Add( m_sizerPDFOptions, 0, wxEXPAND|wxBOTTOM, 5 );
155
156 m_SizerDxfOption = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("DXF Options") ), wxVERTICAL );
157
158 wxBoxSizer* bSizerDxf;
159 bSizerDxf = new wxBoxSizer( wxHORIZONTAL );
160
161 m_staticTextDXF = new wxStaticText( m_SizerDxfOption->GetStaticBox(), wxID_ANY, _("Export units:"), wxDefaultPosition, wxDefaultSize, 0 );
162 m_staticTextDXF->Wrap( -1 );
163 bSizerDxf->Add( m_staticTextDXF, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 8 );
164
165 wxString m_DXF_plotUnitsChoices[] = { _("Inches"), _("Millimeters") };
166 int m_DXF_plotUnitsNChoices = sizeof( m_DXF_plotUnitsChoices ) / sizeof( wxString );
167 m_DXF_plotUnits = new wxChoice( m_SizerDxfOption->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_DXF_plotUnitsNChoices, m_DXF_plotUnitsChoices, 0 );
168 m_DXF_plotUnits->SetSelection( 0 );
169 bSizerDxf->Add( m_DXF_plotUnits, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
170
171
172 m_SizerDxfOption->Add( bSizerDxf, 1, wxEXPAND, 5 );
173
174
175 bOptionsRight->Add( m_SizerDxfOption, 1, wxEXPAND|wxTOP|wxBOTTOM, 5 );
176
177 m_otherOptions = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Other Options") ), wxVERTICAL );
178
179 m_openFileAfterPlot = new wxCheckBox( m_otherOptions->GetStaticBox(), wxID_ANY, _("Open file after plot"), wxDefaultPosition, wxDefaultSize, 0 );
180 m_openFileAfterPlot->SetToolTip( _("Open output file with associated application after successful plot") );
181
182 m_otherOptions->Add( m_openFileAfterPlot, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
183
184
185 bOptionsRight->Add( m_otherOptions, 1, wxEXPAND|wxTOP, 5 );
186
187
188 m_optionsSizer->Add( bOptionsRight, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
189
190
191 bMainSizer->Add( m_optionsSizer, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
192
193 wxBoxSizer* bSizerMsgPanel;
194 bSizerMsgPanel = new wxBoxSizer( wxVERTICAL );
195
196 m_MessagesBox = new WX_HTML_REPORT_PANEL( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
197 m_MessagesBox->SetMinSize( wxSize( 300,150 ) );
198
199 bSizerMsgPanel->Add( m_MessagesBox, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
200
201
202 bMainSizer->Add( bSizerMsgPanel, 1, wxEXPAND|wxLEFT|wxRIGHT, 5 );
203
204 m_sdbSizer1 = new wxStdDialogButtonSizer();
205 m_sdbSizer1OK = new wxButton( this, wxID_OK );
206 m_sdbSizer1->AddButton( m_sdbSizer1OK );
207 m_sdbSizer1Apply = new wxButton( this, wxID_APPLY );
208 m_sdbSizer1->AddButton( m_sdbSizer1Apply );
209 m_sdbSizer1Cancel = new wxButton( this, wxID_CANCEL );
210 m_sdbSizer1->AddButton( m_sdbSizer1Cancel );
211 m_sdbSizer1->Realize();
212
213 bMainSizer->Add( m_sdbSizer1, 0, wxALL|wxEXPAND, 5 );
214
215
216 this->SetSizer( bMainSizer );
217 this->Layout();
218 bMainSizer->Fit( this );
219
220 // Connect Events
221 this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_PLOT_SCHEMATIC_BASE::OnCloseWindow ) );
222 m_browseButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_SCHEMATIC_BASE::onOutputDirectoryBrowseClicked ), NULL, this );
223 m_plotFormatOpt->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_PLOT_SCHEMATIC_BASE::onPlotFormatSelection ), NULL, this );
224 m_ModeColorOption->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_PLOT_SCHEMATIC_BASE::onColorMode ), NULL, this );
225 m_sdbSizer1Apply->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_SCHEMATIC_BASE::OnPlotCurrent ), NULL, this );
226 m_sdbSizer1OK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_SCHEMATIC_BASE::OnPlotAll ), NULL, this );
227}
228
230{
231 // Disconnect Events
232 this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_PLOT_SCHEMATIC_BASE::OnCloseWindow ) );
233 m_browseButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_SCHEMATIC_BASE::onOutputDirectoryBrowseClicked ), NULL, this );
234 m_plotFormatOpt->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_PLOT_SCHEMATIC_BASE::onPlotFormatSelection ), NULL, this );
235 m_ModeColorOption->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_PLOT_SCHEMATIC_BASE::onColorMode ), NULL, this );
236 m_sdbSizer1Apply->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_SCHEMATIC_BASE::OnPlotCurrent ), NULL, this );
237 m_sdbSizer1OK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_SCHEMATIC_BASE::OnPlotAll ), NULL, this );
238
239}
virtual void OnCloseWindow(wxCloseEvent &event)
virtual void onColorMode(wxCommandEvent &event)
virtual void onPlotFormatSelection(wxCommandEvent &event)
DIALOG_PLOT_SCHEMATIC_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Plot Schematic"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
wxStdDialogButtonSizer * m_sdbSizer1
virtual void onOutputDirectoryBrowseClicked(wxCommandEvent &event)
virtual void OnPlotAll(wxCommandEvent &event)
virtual void OnPlotCurrent(wxCommandEvent &event)
DIALOG_SHIM(wxWindow *aParent, wxWindowID id, const wxString &title, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxDEFAULT_FRAME_STYLE|wxRESIZE_BORDER, const wxString &name=wxDialogNameStr)
A bitmap button widget that behaves like a standard dialog button except with an icon.
A widget for browsing a rich text error/status report.
#define _(s)