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 )
17 this->SetSizeHints( wxSize( -1,-1 ), wxDefaultSize );
19 wxBoxSizer* bMainSizer;
20 bMainSizer =
new wxBoxSizer( wxVERTICAL );
22 wxBoxSizer* bOutputDir;
23 bOutputDir =
new wxBoxSizer( wxHORIZONTAL );
25 m_outputPathLabel =
new wxStaticText(
this, wxID_ANY,
_(
"Output directory:"), wxDefaultPosition, wxDefaultSize, 0 );
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.") );
35 bOutputDir->Add(
m_browseButton, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
38 bOutputDir->Add( 20, 0, 0, 0, 5 );
40 m_variantLabel =
new wxStaticText(
this, wxID_ANY,
_(
"Design variant:"), wxDefaultPosition, wxDefaultSize, 0 );
42 bOutputDir->Add(
m_variantLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
44 wxArrayString m_variantChoiceCtrlChoices;
45 m_variantChoiceCtrl =
new wxChoice(
this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_variantChoiceCtrlChoices, 0 );
50 bMainSizer->Add( bOutputDir, 0, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
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 );
60 wxStaticBoxSizer* sbOptions;
61 sbOptions =
new wxStaticBoxSizer(
new wxStaticBox(
this, wxID_ANY,
_(
"Options") ), wxVERTICAL );
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 ) );
69 m_staticText4 =
new wxStaticText( sbOptions->GetStaticBox(), wxID_ANY,
_(
"Page size:"), wxDefaultPosition, wxDefaultSize, 0 );
71 gbSizer1->Add(
m_staticText4, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
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 );
77 gbSizer1->Add(
m_paperSizeOption, wxGBPosition( 0, 1 ), wxGBSpan( 1, 2 ), wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
79 m_plotDrawingSheet =
new wxCheckBox( sbOptions->GetStaticBox(), wxID_ANY,
_(
"Plot drawing sheet"), wxDefaultPosition, wxDefaultSize, 0 );
83 gbSizer1->Add(
m_plotDrawingSheet, wxGBPosition( 1, 0 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL, 5 );
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 );
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 );
94 gbSizer1->Add(
m_ModeColorOption, wxGBPosition( 3, 1 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
96 m_colorThemeLabel =
new wxStaticText( sbOptions->GetStaticBox(), wxID_ANY,
_(
"Color theme:"), wxDefaultPosition, wxDefaultSize, 0 );
98 gbSizer1->Add(
m_colorThemeLabel, wxGBPosition( 4, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
100 wxArrayString m_colorThemeChoices;
101 m_colorTheme =
new wxChoice( sbOptions->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_colorThemeChoices, 0 );
103 m_colorTheme->SetToolTip(
_(
"Select the color theme to use for plotting") );
105 gbSizer1->Add(
m_colorTheme, wxGBPosition( 4, 1 ), wxGBSpan( 1, 2 ), wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
107 m_plotBackgroundColor =
new wxCheckBox( sbOptions->GetStaticBox(), wxID_ANY,
_(
"Plot background color"), wxDefaultPosition, wxDefaultSize, 0 );
110 gbSizer1->Add(
m_plotBackgroundColor, wxGBPosition( 5, 0 ), wxGBSpan( 1, 3 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
112 m_lineWidthLabel =
new wxStaticText( sbOptions->GetStaticBox(), wxID_ANY,
_(
"Minimum line width:"), wxDefaultPosition, wxDefaultSize, 0 );
114 gbSizer1->Add(
m_lineWidthLabel, wxGBPosition( 7, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
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.") );
119 gbSizer1->Add(
m_lineWidthCtrl, wxGBPosition( 7, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxRIGHT, 5 );
121 m_lineWidthUnits =
new wxStaticText( sbOptions->GetStaticBox(), wxID_ANY,
_(
"mm"), wxDefaultPosition, wxDefaultSize, 0 );
123 gbSizer1->Add(
m_lineWidthUnits, wxGBPosition( 7, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
126 gbSizer1->AddGrowableCol( 1 );
128 sbOptions->Add( gbSizer1, 1, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
131 m_optionsSizer->Add( sbOptions, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
133 wxBoxSizer* bOptionsRight;
134 bOptionsRight =
new wxBoxSizer( wxVERTICAL );
136 wxStaticBoxSizer* m_sizerPDFOptions;
137 m_sizerPDFOptions =
new wxStaticBoxSizer(
new wxStaticBox(
this, wxID_ANY,
_(
"PDF Options") ), wxVERTICAL );
139 m_plotPDFPropertyPopups =
new wxCheckBox( m_sizerPDFOptions->GetStaticBox(), wxID_ANY,
_(
"Generate property popups"), wxDefaultPosition, wxDefaultSize, 0 );
143 m_plotPDFHierarchicalLinks =
new wxCheckBox( m_sizerPDFOptions->GetStaticBox(), wxID_ANY,
_(
"Generate clickable links for hierarchical elements"), wxDefaultPosition, wxDefaultSize, 0 );
147 m_plotPDFMetadata =
new wxCheckBox( m_sizerPDFOptions->GetStaticBox(), wxID_ANY,
_(
"Generate metadata from AUTHOR && SUBJECT variables"), wxDefaultPosition, wxDefaultSize, 0 );
149 m_plotPDFMetadata->SetToolTip(
_(
"Generate PDF document properties from AUTHOR and SUBJECT text variables") );
154 bOptionsRight->Add( m_sizerPDFOptions, 0, wxEXPAND|wxBOTTOM, 5 );
156 m_SizerDxfOption =
new wxStaticBoxSizer(
new wxStaticBox(
this, wxID_ANY,
_(
"DXF Options") ), wxVERTICAL );
158 wxBoxSizer* bSizerDxf;
159 bSizerDxf =
new wxBoxSizer( wxHORIZONTAL );
163 bSizerDxf->Add(
m_staticTextDXF, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 8 );
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 );
169 bSizerDxf->Add(
m_DXF_plotUnits, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
177 m_otherOptions =
new wxStaticBoxSizer(
new wxStaticBox(
this, wxID_ANY,
_(
"Other Options") ), wxVERTICAL );
180 m_openFileAfterPlot->SetToolTip(
_(
"Open output file with associated application after successful plot") );
188 m_optionsSizer->Add( bOptionsRight, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
191 bMainSizer->Add(
m_optionsSizer, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
193 wxBoxSizer* bSizerMsgPanel;
194 bSizerMsgPanel =
new wxBoxSizer( wxVERTICAL );
199 bSizerMsgPanel->Add(
m_MessagesBox, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
202 bMainSizer->Add( bSizerMsgPanel, 1, wxEXPAND|wxLEFT|wxRIGHT, 5 );
213 bMainSizer->Add(
m_sdbSizer1, 0, wxALL|wxEXPAND, 5 );
216 this->SetSizer( bMainSizer );
218 bMainSizer->Fit(
this );