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* bSizerDir;
23 bSizerDir =
new wxBoxSizer( wxHORIZONTAL );
29 m_outputDirectoryName =
new wxTextCtrl(
this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
30 m_outputDirectoryName->SetToolTip(
_(
"Target directory for plot files. Can be absolute or relative to the schematic main file location.") );
35 bSizerDir->Add(
m_browseButton, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
38 bMainSizer->Add( bSizerDir, 0, wxALL|wxEXPAND, 7 );
42 wxString m_plotFormatOptChoices[] = {
_(
"Postscript"),
_(
"PDF"),
_(
"SVG"),
_(
"DXF"),
_(
"HPGL") };
43 int m_plotFormatOptNChoices =
sizeof( m_plotFormatOptChoices ) /
sizeof( wxString );
44 m_plotFormatOpt =
new wxRadioBox(
this, wxID_ANY,
_(
"Output Format"), wxDefaultPosition, wxDefaultSize, m_plotFormatOptNChoices, m_plotFormatOptChoices, 1, wxRA_SPECIFY_COLS );
48 wxStaticBoxSizer* sbOptions;
49 sbOptions =
new wxStaticBoxSizer(
new wxStaticBox(
this, wxID_ANY,
_(
"Options") ), wxVERTICAL );
51 wxGridBagSizer* gbSizer1;
52 gbSizer1 =
new wxGridBagSizer( 5, 3 );
53 gbSizer1->SetFlexibleDirection( wxBOTH );
54 gbSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
55 gbSizer1->SetEmptyCellSize( wxSize( -1,10 ) );
57 m_staticText4 =
new wxStaticText( sbOptions->GetStaticBox(), wxID_ANY,
_(
"Page size:"), wxDefaultPosition, wxDefaultSize, 0 );
59 gbSizer1->Add(
m_staticText4, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
61 wxString m_paperSizeOptionChoices[] = {
_(
"Schematic size"),
_(
"A4"),
_(
"A") };
62 int m_paperSizeOptionNChoices =
sizeof( m_paperSizeOptionChoices ) /
sizeof( wxString );
63 m_paperSizeOption =
new wxChoice( sbOptions->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_paperSizeOptionNChoices, m_paperSizeOptionChoices, 0 );
65 gbSizer1->Add(
m_paperSizeOption, wxGBPosition( 0, 1 ), wxGBSpan( 1, 2 ), wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
67 m_plotDrawingSheet =
new wxCheckBox( sbOptions->GetStaticBox(), wxID_ANY,
_(
"Plot drawing sheet"), wxDefaultPosition, wxDefaultSize, 0 );
71 gbSizer1->Add(
m_plotDrawingSheet, wxGBPosition( 1, 0 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL, 5 );
73 wxStaticText* bOutputModeLabel;
74 bOutputModeLabel =
new wxStaticText( sbOptions->GetStaticBox(), wxID_ANY,
_(
"Output mode:"), wxDefaultPosition, wxDefaultSize, 0 );
75 bOutputModeLabel->Wrap( -1 );
76 gbSizer1->Add( bOutputModeLabel, wxGBPosition( 3, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
78 wxString m_ModeColorOptionChoices[] = {
_(
"Color"),
_(
"Black and White") };
79 int m_ModeColorOptionNChoices =
sizeof( m_ModeColorOptionChoices ) /
sizeof( wxString );
80 m_ModeColorOption =
new wxChoice( sbOptions->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_ModeColorOptionNChoices, m_ModeColorOptionChoices, 0 );
82 gbSizer1->Add(
m_ModeColorOption, wxGBPosition( 3, 1 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
84 m_staticText9 =
new wxStaticText( sbOptions->GetStaticBox(), wxID_ANY,
_(
"Color theme:"), wxDefaultPosition, wxDefaultSize, 0 );
86 gbSizer1->Add(
m_staticText9, wxGBPosition( 4, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
88 wxArrayString m_colorThemeChoices;
89 m_colorTheme =
new wxChoice( sbOptions->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_colorThemeChoices, 0 );
91 m_colorTheme->SetToolTip(
_(
"Select the color theme to use for plotting") );
93 gbSizer1->Add(
m_colorTheme, wxGBPosition( 4, 1 ), wxGBSpan( 1, 2 ), wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
95 m_plotBackgroundColor =
new wxCheckBox( sbOptions->GetStaticBox(), wxID_ANY,
_(
"Plot background color"), wxDefaultPosition, wxDefaultSize, 0 );
98 gbSizer1->Add(
m_plotBackgroundColor, wxGBPosition( 5, 0 ), wxGBSpan( 1, 3 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
100 m_lineWidthLabel =
new wxStaticText( sbOptions->GetStaticBox(), wxID_ANY,
_(
"Minimum line width:"), wxDefaultPosition, wxDefaultSize, 0 );
102 gbSizer1->Add(
m_lineWidthLabel, wxGBPosition( 7, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
104 m_lineWidthCtrl =
new wxTextCtrl( sbOptions->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
105 m_lineWidthCtrl->SetToolTip(
_(
"Selection of the default pen thickness used to draw items, when their thickness is set to 0.") );
107 gbSizer1->Add(
m_lineWidthCtrl, wxGBPosition( 7, 1 ), wxGBSpan( 1, 1 ), wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
109 m_lineWidthUnits =
new wxStaticText( sbOptions->GetStaticBox(), wxID_ANY,
_(
"mm"), wxDefaultPosition, wxDefaultSize, 0 );
111 gbSizer1->Add(
m_lineWidthUnits, wxGBPosition( 7, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
114 gbSizer1->AddGrowableCol( 1 );
116 sbOptions->Add( gbSizer1, 1, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
121 wxBoxSizer* bOptionsRight;
122 bOptionsRight =
new wxBoxSizer( wxVERTICAL );
124 m_HPGLOptionsSizer =
new wxStaticBoxSizer(
new wxStaticBox(
this, wxID_ANY,
_(
"HPGL Options") ), wxVERTICAL );
126 wxGridBagSizer* gbSizer2;
127 gbSizer2 =
new wxGridBagSizer( 3, 3 );
128 gbSizer2->SetFlexibleDirection( wxBOTH );
129 gbSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
133 gbSizer2->Add(
m_plotOriginTitle, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
135 wxString m_plotOriginOptChoices[] = {
_(
"Bottom left, plotter units"),
_(
"Centered, plotter units"),
_(
"Page fit, user units"),
_(
"Content fit, user units") };
136 int m_plotOriginOptNChoices =
sizeof( m_plotOriginOptChoices ) /
sizeof( wxString );
137 m_plotOriginOpt =
new wxChoice(
m_HPGLOptionsSizer->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_plotOriginOptNChoices, m_plotOriginOptChoices, 0 );
139 gbSizer2->Add(
m_plotOriginOpt, wxGBPosition( 0, 1 ), wxGBSpan( 1, 2 ), wxEXPAND, 5 );
143 gbSizer2->Add(
m_penWidthLabel, wxGBPosition( 1, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
146 gbSizer2->Add(
m_penWidthCtrl, wxGBPosition( 1, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
150 gbSizer2->Add(
m_penWidthUnits, wxGBPosition( 1, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
153 gbSizer2->AddGrowableCol( 1 );
160 wxStaticBoxSizer* sbSizer4;
161 sbSizer4 =
new wxStaticBoxSizer(
new wxStaticBox(
this, wxID_ANY,
_(
"PDF Options") ), wxVERTICAL );
163 m_plotPDFPropertyPopups =
new wxCheckBox( sbSizer4->GetStaticBox(), wxID_ANY,
_(
"Generate property popups"), wxDefaultPosition, wxDefaultSize, 0 );
167 m_plotPDFMetadata =
new wxCheckBox( sbSizer4->GetStaticBox(), wxID_ANY,
_(
"Generate metadata from AUTHOR && SUBJECT variables"), wxDefaultPosition, wxDefaultSize, 0 );
168 m_plotPDFMetadata->SetToolTip(
_(
"Generate PDF document properties from AUTHOR and SUBJECT text variables") );
173 bOptionsRight->Add( sbSizer4, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
175 m_otherOptions =
new wxStaticBoxSizer(
new wxStaticBox(
this, wxID_ANY,
_(
"Other options") ), wxVERTICAL );
178 m_openFileAfterPlot->SetToolTip(
_(
"Open output file with associated application after successful plot") );
183 bOptionsRight->Add(
m_otherOptions, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
191 wxBoxSizer* bSizerMsgPanel;
192 bSizerMsgPanel =
new wxBoxSizer( wxVERTICAL );
197 bSizerMsgPanel->Add(
m_MessagesBox, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
200 bMainSizer->Add( bSizerMsgPanel, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
211 bMainSizer->Add(
m_sdbSizer1, 0, wxALL|wxEXPAND, 5 );
214 this->SetSizer( bMainSizer );
216 bMainSizer->Fit(
this );
wxTextCtrl * m_outputDirectoryName
wxRadioBox * m_plotFormatOpt
virtual void OnCloseWindow(wxCloseEvent &event)
wxStaticBoxSizer * m_otherOptions
wxStaticText * m_lineWidthUnits
wxCheckBox * m_plotPDFMetadata
wxTextCtrl * m_penWidthCtrl
DIALOG_PLOT_SCHEMATIC_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Plot Schematic Options"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
wxChoice * m_ModeColorOption
virtual void OnOutputDirectoryBrowseClicked(wxCommandEvent &event)
wxStaticText * m_plotOriginTitle
STD_BITMAP_BUTTON * m_browseButton
wxButton * m_sdbSizer1Cancel
wxStdDialogButtonSizer * m_sdbSizer1
wxCheckBox * m_plotDrawingSheet
wxBoxSizer * m_optionsSizer
wxCheckBox * m_plotPDFPropertyPopups
wxStaticText * m_penWidthLabel
~DIALOG_PLOT_SCHEMATIC_BASE()
WX_HTML_REPORT_PANEL * m_MessagesBox
wxStaticText * m_staticText9
wxStaticText * m_lineWidthLabel
virtual void OnPageSizeSelected(wxCommandEvent &event)
wxChoice * m_paperSizeOption
wxStaticText * m_staticText4
wxStaticBoxSizer * m_HPGLOptionsSizer
wxChoice * m_plotOriginOpt
wxStaticText * m_staticTextOutputDirectory
wxCheckBox * m_openFileAfterPlot
virtual void OnPlotAll(wxCommandEvent &event)
wxButton * m_sdbSizer1Apply
wxStaticText * m_penWidthUnits
wxCheckBox * m_plotBackgroundColor
virtual void OnPlotFormatSelection(wxCommandEvent &event)
virtual void OnPlotCurrent(wxCommandEvent &event)
wxTextCtrl * m_lineWidthCtrl
virtual void OnUpdateUI(wxUpdateUIEvent &event)
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
A widget for browsing a rich text error/status report.