62 m_editFrame( aEditFrame ),
63 m_defaultLineWidth( aEditFrame, m_lineWidthLabel, m_lineWidthCtrl, m_lineWidthUnits ),
72 { wxID_APPLY,
_(
"Plot Current Page" ) },
73 { wxID_CANCEL,
_(
"Close" ) } } );
93 m_colorTheme->Append( settings->GetName(),
static_cast<void*
>( settings ) );
128 if( paperSizeIndex >= 0 && paperSizeIndex < (
int)
m_paperSizeOption->GetCount() )
142 case SCH_PLOT_FORMAT::HPGL:
break;
151 wxCommandEvent
dummy;
169 if(
Prj().IsNullProject() )
180 wxDirDialog dirDialog(
this,
_(
"Select Output Directory" ),
path );
182 if( dirDialog.ShowModal() == wxID_CANCEL )
185 wxFileName dirName = wxFileName::DirName( dirDialog.GetPath() );
188 wxString defaultPath = fn.GetPathWithSep();
190 wxFileName relPathTest;
192 relPathTest.Assign( dirDialog.GetPath() );
195 if( relPathTest.MakeRelativeTo( defaultPath ) )
197 if(
IsOK(
this, wxString::Format(
_(
"Do you want to use a path relative to\n'%s'?" ), defaultPath ) ) )
198 dirName.MakeRelativeTo( defaultPath );
209 case 0:
return PLOT_FORMAT::POST;
211 case 1:
return PLOT_FORMAT::PDF;
212 case 2:
return PLOT_FORMAT::SVG;
213 case 3:
return PLOT_FORMAT::DXF;
273 wxCommandEvent
dummy;
321 std::unique_ptr<SCH_PLOTTER> schPlotter = std::make_unique<SCH_PLOTTER>(
m_editFrame );
339 wxLaunchDefaultApplication( schPlotter->GetLastOutputFilePath() );
345 wxString extMsg = wxString::Format(
_(
"Falling back to user path '%s'." ),
351 std::function<bool( wxString* )> textResolver =
352 [&]( wxString* token ) ->
bool
365 if( fn.IsAbsolute() )
370 if(
Prj().IsNullProject() )
382 fn.SetName( wxEmptyString );
383 fn.SetExt( wxEmptyString );
397 DisplayErrorMessage(
this,
_(
"No project or path defined for the current schematic." ), extMsg );
constexpr EDA_IU_SCALE schIUScale
KIFACE_BASE & Kiface()
Global KIFACE_BASE "get" accessor.
wxBitmapBundle KiBitmapBundle(BITMAPS aBitmap, int aMinHeight)
Color settings are a bit different than most of the settings objects in that there can be more than o...
static const wxString COLOR_BUILTIN_DEFAULT
COLOR4D GetColor(int aLayer) const
const wxString & GetName() const
Class DIALOG_PLOT_SCHEMATIC_BASE.
wxRadioBox * m_plotFormatOpt
wxCheckBox * m_plotPDFMetadata
wxChoice * m_ModeColorOption
wxStaticText * m_colorThemeLabel
STD_BITMAP_BUTTON * m_browseButton
wxCheckBox * m_plotDrawingSheet
wxCheckBox * m_plotPDFPropertyPopups
WX_HTML_REPORT_PANEL * m_MessagesBox
wxCheckBox * m_plotPDFHierarchicalLinks
wxChoice * m_paperSizeOption
wxCheckBox * m_openFileAfterPlot
wxButton * m_sdbSizer1Apply
wxCheckBox * m_plotBackgroundColor
wxTextCtrl * m_outputPath
wxTextCtrl * m_lineWidthCtrl
UNIT_BINDER m_defaultLineWidth
void OnPlotAll(wxCommandEvent &event) override
PLOT_FORMAT getPlotFileFormat()
void onColorMode(wxCommandEvent &aEvent) override
void OnPlotCurrent(wxCommandEvent &event) override
void onPlotFormatSelection(wxCommandEvent &event) override
JOB_EXPORT_SCH_PLOT * m_job
SCH_EDIT_FRAME * m_editFrame
void getPlotOptions(RENDER_SETTINGS *aSettings)
COLOR_SETTINGS * getColorSettings()
bool TransferDataToWindow() override
void plotSchematic(bool aPlotAll)
void onOutputDirectoryBrowseClicked(wxCommandEvent &event) override
DIALOG_PLOT_SCHEMATIC(SCH_EDIT_FRAME *aEditFrame)
wxString getOutputPath()
Determine the best absolute path to plot files given the contents of the path edit control.
void SetupStandardButtons(std::map< int, wxString > aLabels={})
void finishDialogSettings()
In all dialogs, we must call the same functions to fix minimal dlg size, the default position and per...
JOB_PAGE_SIZE m_pageSizeSelect
SCH_PLOT_FORMAT m_plotFormat
bool m_useBackgroundColor
bool m_PDFHierarchicalLinks
void SetConfiguredOutputPath(const wxString &aPath)
Sets the configured output path for the job, this path is always saved to file.
virtual wxString GetSettingsDialogTitle() const
wxString GetConfiguredOutputPath() const
Returns the configured output path for the job.
wxString GetFilename() const
APP_SETTINGS_BASE * KifaceSettings() const
Container for all the knowledge about how graphical objects are drawn on any output surface/device.
virtual void LoadColors(const COLOR_SETTINGS *aSettings)
void SetDefaultFont(const wxString &aFont)
virtual void SetBackgroundColor(const COLOR4D &aColor)=0
Set the background color.
void SetMinPenWidth(int aWidth)
PROJECT & Prj() const
Return a reference to the PROJECT associated with this KIWAY.
virtual const wxString GetProjectPath() const
Return the full path of the project.
virtual const wxString AbsolutePath(const wxString &aFileName) const
Fix up aFileName if it is relative to the project's directory to be an absolute path and filename.
Holds all the data relating to one schematic.
SCHEMATIC_SETTINGS & Settings() const
SCH_SCREEN * RootScreen() const
Helper to retrieve the screen of the root sheet.
bool ResolveTextVar(const SCH_SHEET_PATH *aSheetPath, wxString *token, int aDepth) const
SCH_SHEET_PATH & CurrentSheet() const
SCH_RENDER_SETTINGS * GetRenderSettings()
Schematic editor (Eeschema) main window.
SCHEMATIC & Schematic() const
const wxString & GetFileName() const
wxString GetFileName() const
Return the filename corresponding to this sheet.
virtual long long int GetValue()
Return the current value in Internal Units.
void Enable(bool aEnable)
Enable/disable the label, widget and units label.
virtual void SetValue(long long int aValue)
Set new value (in Internal Units) for the text field, taking care of units conversion.
void SetFileName(const wxString &aReportFileName)
Set the report full file name to the string.
REPORTER & Reporter()
Return the reporter object that reports to this panel.
const wxString ExpandEnvVarSubstitutions(const wxString &aString, const PROJECT *aProject)
Replace any environment variable & text variable references with their values.
wxString ExpandTextVars(const wxString &aSource, const PROJECT *aProject, int aFlags)
bool IsOK(wxWindow *aParent, const wxString &aMessage)
Display a yes/no dialog with aMessage and returns the user response.
void DisplayErrorMessage(wxWindow *aParent, const wxString &aText, const wxString &aExtraInfo)
Display an error message with aMessage.
This file is part of the common library.
@ LAYER_SCHEMATIC_BACKGROUND
SETTINGS_MANAGER * GetSettingsManager()
PGM_BASE & Pgm()
The global program "get" accessor.
PLOT_FORMAT
The set of supported output plot formats.
Plotting engines similar to ps (PostScript, Gerber, svg)
std::vector< FAB_LAYER_COLOR > dummy
#define TO_UTF8(wxstring)
Convert a wxString to a UTF8 encoded C string for all wxWidgets build modes.
constexpr int MilsToIU(int mils) const
int default_line_thickness
wxString m_outputDirectory
bool m_PDFHierarchicalLinks
bool m_useBackgroundColor
wxLogTrace helper definitions.
#define FN_NORMALIZE_FLAGS
Default flags to pass to wxFileName::Normalize().