KiCad PCB EDA Suite
DIALOG_PLOT Class Reference

A dialog to set the plot options and create plot files in various formats. More...

#include <dialog_plot.h>

Inheritance diagram for DIALOG_PLOT:
DIALOG_PLOT_BASE DIALOG_SHIM KIWAY_HOLDER

Public Types

enum  HOLDER_TYPE { DIALOG, FRAME, PANEL }
 

Public Member Functions

 DIALOG_PLOT (PCB_EDIT_FRAME *parent)
 
void DIALOG_PLOT_BASEOnContextMenu (wxMouseEvent &event)
 
void SetInitialFocus (wxWindow *aWindow)
 Sets the window (usually a wxTextCtrl) that should be focused when the dialog is shown. More...
 
int ShowQuasiModal ()
 
void EndQuasiModal (int retCode)
 
bool IsQuasiModal () const
 
bool Show (bool show) override
 
bool Enable (bool enable) override
 
void OnPaint (wxPaintEvent &event)
 
void OnModify ()
 
void SetPosition (const wxPoint &aNewPosition)
 Force the position of the dialog to a new position. More...
 
EDA_UNITS GetUserUnits () const
 
HOLDER_TYPE GetType () const
 
KIWAYKiway () const
 Return a reference to the KIWAY that this object has an opportunity to participate in. More...
 
PROJECTPrj () const
 Return a reference to the PROJECT associated with this KIWAY. More...
 
void SetKiway (wxWindow *aDest, KIWAY *aKiway)
 It is only used for debugging, since "this" is not a wxWindow*. More...
 

Static Public Member Functions

static bool IsCtrl (int aChar, const wxKeyEvent &e)
 
static bool IsShiftCtrl (int aChar, const wxKeyEvent &e)
 

Protected Types

enum  {
  ID_PRINT_REF = 1000, ID_ALLOW_PRINT_PAD_ON_SILKSCREEN, ID_MIROR_OPT, ID_LAYER_FAB,
  ID_SELECT_COPPER_LAYERS, ID_DESELECT_COPPER_LAYERS, ID_SELECT_ALL_LAYERS, ID_DESELECT_ALL_LAYERS
}
 

Protected Member Functions

virtual void OnInitDialog (wxInitDialogEvent &event)
 
void finishDialogSettings ()
 In all dialogs, we must call the same functions to fix minimal dlg size, the default position and perhaps some others to fix a few issues depending on Windows Managers this helper function does these calls. More...
 
void setSizeInDU (int x, int y)
 Set the dialog to the given dimensions in "dialog units". More...
 
int horizPixelsFromDU (int x) const
 Convert an integer number of dialog units to pixels, horizontally. More...
 
int vertPixelsFromDU (int y) const
 Convert an integer number of dialog units to pixels, vertically. More...
 
void resetSize ()
 Clear the existing dialog size and position. More...
 
virtual void OnCharHook (wxKeyEvent &aEvt)
 

Protected Attributes

wxBoxSizer * m_MainSizer
 
wxStaticText * m_staticTextPlotFmt
 
wxChoice * m_plotFormatOpt
 
wxStaticText * m_staticTextDir
 
wxTextCtrl * m_outputDirectoryName
 
wxBitmapButton * m_browseButton
 
wxStaticBoxSizer * m_LayersSizer
 
wxCheckListBox * m_layerCheckListBox
 
wxBoxSizer * m_PlotOptionsSizer
 
wxCheckBox * m_plotSheetRef
 
wxCheckBox * m_plotModuleValueOpt
 
wxCheckBox * m_plotModuleRefOpt
 
wxCheckBox * m_plotInvisibleText
 
wxCheckBox * m_includeEdgeLayerOpt
 
wxCheckBox * m_sketchPadsOnFabLayers
 
wxCheckBox * m_plotNoViaOnMaskOpt
 
wxCheckBox * m_useAuxOriginCheckBox
 
wxStaticText * drillMarksLabel
 
wxChoice * m_drillShapeOpt
 
wxStaticText * scalingLabel
 
wxChoice * m_scaleOpt
 
wxStaticText * plotModeLabel
 
wxChoice * m_plotModeOpt
 
wxCheckBox * m_plotMirrorOpt
 
wxCheckBox * m_plotPSNegativeOpt
 
wxCheckBox * m_zoneFillCheck
 
wxBoxSizer * m_SizerSolderMaskAlert
 
wxStaticBitmap * m_bitmapAlert
 
wxStaticText * m_staticTextAlert
 
wxStaticText * m_staticTextAlert1
 
wxHyperlinkCtrl * m_boardSetup
 
wxStaticBoxSizer * m_GerberOptionsSizer
 
wxCheckBox * m_useGerberExtensions
 
wxCheckBox * m_generateGerberJobFile
 
wxCheckBox * m_subtractMaskFromSilk
 
wxStaticText * coordFormatLabel
 
wxChoice * m_coordFormatCtrl
 
wxCheckBox * m_useGerberX2Format
 
wxCheckBox * m_useGerberNetAttributes
 
wxCheckBox * m_disableApertMacros
 
wxStaticBoxSizer * m_HPGLOptionsSizer
 
wxStaticText * m_hpglPenLabel
 
wxTextCtrl * m_hpglPenCtrl
 
wxStaticText * m_hpglPenUnits
 
wxStaticBoxSizer * m_PSOptionsSizer
 
wxStaticText * m_fineAdjustXLabel
 
wxTextCtrl * m_fineAdjustXCtrl
 
wxStaticText * m_fineAdjustYLabel
 
wxTextCtrl * m_fineAdjustYCtrl
 
wxStaticText * m_widthAdjustLabel
 
wxTextCtrl * m_widthAdjustCtrl
 
wxStaticText * m_widthAdjustUnits
 
wxCheckBox * m_forcePSA4OutputOpt
 
wxStaticBoxSizer * m_SizerDXF_options
 
wxCheckBox * m_DXF_plotModeOpt
 
wxCheckBox * m_DXF_plotTextStrokeFontOpt
 
wxStaticText * DXF_exportUnitsLabel
 
wxChoice * m_DXF_plotUnits
 
wxStaticBoxSizer * m_svgOptionsSizer
 
wxStaticText * svgUnitLabel
 
wxChoice * m_svgUnits
 
wxStaticText * svgPrecisionLabel
 
wxSpinCtrl * m_svgPrecsision
 
WX_HTML_REPORT_PANELm_messagesPanel
 
wxBoxSizer * m_sizerButtons
 
wxButton * m_buttonDRC
 
wxStaticText * m_DRCExclusionsWarning
 
wxStdDialogButtonSizer * m_sdbSizer1
 
wxButton * m_sdbSizer1OK
 
wxButton * m_sdbSizer1Apply
 
wxButton * m_sdbSizer1Cancel
 
wxMenu * m_popMenu
 
EDA_UNITS m_units
 
std::string m_hash_key
 
bool m_useCalculatedSize
 
bool m_firstPaintEvent
 
wxWindow * m_initialFocusTarget
 
WX_EVENT_LOOPm_qmodal_loop
 
bool m_qmodal_showing
 
WDO_ENABLE_DISABLEm_qmodal_parent_disabler
 
EDA_BASE_FRAMEm_parentFrame
 
std::vector< wxWindow * > m_tabOrder
 
wxSize m_initialSize
 

Private Member Functions

void Plot (wxCommandEvent &event) override
 
void OnOutputDirectoryBrowseClicked (wxCommandEvent &event) override
 
void OnRightClick (wxMouseEvent &event) override
 
void OnPopUpLayers (wxCommandEvent &event) override
 
void SetPlotFormat (wxCommandEvent &event) override
 
void OnChangeDXFPlotMode (wxCommandEvent &event) override
 
void OnSetScaleOpt (wxCommandEvent &event) override
 
void CreateDrillFile (wxCommandEvent &event) override
 
void OnGerberX2Checked (wxCommandEvent &event) override
 
void onRunDRC (wxCommandEvent &event) override
 
void onBoardSetup (wxHyperlinkEvent &aEvent) override
 
void init_Dialog ()
 
void reInitDialog ()
 
void applyPlotSettings ()
 
PLOT_FORMAT getPlotFormat ()
 
void setPlotModeChoiceSelection (OUTLINE_MODE aPlotMode)
 

Private Attributes

PCB_EDIT_FRAMEm_parent
 
LSEQ m_layerList
 
double m_XScaleAdjust
 
double m_YScaleAdjust
 
int m_PSWidthAdjust
 
int m_widthAdjustMinValue
 
int m_widthAdjustMaxValue
 
UNIT_BINDER m_defaultPenSize
 
UNIT_BINDER m_trackWidthCorrection
 
wxString m_DRCWarningTemplate
 
PCB_PLOT_PARAMS m_plotOpts
 

Detailed Description

A dialog to set the plot options and create plot files in various formats.

Definition at line 39 of file dialog_plot.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
protectedinherited

◆ HOLDER_TYPE

enum KIWAY_HOLDER::HOLDER_TYPE
inherited
Enumerator
DIALOG 
FRAME 
PANEL 

Definition at line 39 of file kiway_holder.h.

Constructor & Destructor Documentation

◆ DIALOG_PLOT()

DIALOG_PLOT::DIALOG_PLOT ( PCB_EDIT_FRAME parent)

Definition at line 53 of file dialog_plot.cpp.

53  :
54  DIALOG_PLOT_BASE( aParent ), m_parent( aParent ),
57 {
58  SetName( DLG_WINDOW_NAME );
59  m_plotOpts = aParent->GetPlotSettings();
61 
62  m_messagesPanel->SetFileName( Prj().GetProjectPath() + wxT( "report.txt" ) );
63 
64  init_Dialog();
65 
66  // We use a sdbSizer to get platform-dependent ordering of the action buttons, but
67  // that requires us to correct the button labels here.
68  m_sdbSizer1OK->SetLabel( _( "Plot" ) );
69  m_sdbSizer1Apply->SetLabel( _( "Generate Drill Files..." ) );
70  m_sdbSizer1Cancel->SetLabel( _( "Close" ) );
71  m_sizerButtons->Layout();
72 
73  m_sdbSizer1OK->SetDefault();
74 
75  GetSizer()->Fit( this );
76  GetSizer()->SetSizeHints( this );
77 }
WX_HTML_REPORT_PANEL * m_messagesPanel
wxStaticText * m_widthAdjustLabel
DIALOG_PLOT_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Plot"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
wxButton * m_sdbSizer1Cancel
wxStaticText * m_hpglPenUnits
wxButton * m_sdbSizer1OK
UNIT_BINDER m_trackWidthCorrection
Definition: dialog_plot.h:83
wxButton * m_sdbSizer1Apply
wxTextCtrl * m_widthAdjustCtrl
PCB_EDIT_FRAME * m_parent
Definition: dialog_plot.h:69
PROJECT & Prj() const
Return a reference to the PROJECT associated with this KIWAY.
wxStaticText * m_hpglPenLabel
#define _(s)
PCB_PLOT_PARAMS m_plotOpts
Definition: dialog_plot.h:87
wxStaticText * m_widthAdjustUnits
wxTextCtrl * m_hpglPenCtrl
wxString m_DRCWarningTemplate
Definition: dialog_plot.h:85
wxBoxSizer * m_sizerButtons
void init_Dialog()
Definition: dialog_plot.cpp:80
UNIT_BINDER m_defaultPenSize
Definition: dialog_plot.h:82
void SetFileName(const wxString &aReportFileName)
#define DLG_WINDOW_NAME
wxStaticText * m_DRCExclusionsWarning

References _, DLG_WINDOW_NAME, PCB_BASE_FRAME::GetPlotSettings(), init_Dialog(), DIALOG_PLOT_BASE::m_DRCExclusionsWarning, m_DRCWarningTemplate, DIALOG_PLOT_BASE::m_messagesPanel, m_plotOpts, DIALOG_PLOT_BASE::m_sdbSizer1Apply, DIALOG_PLOT_BASE::m_sdbSizer1Cancel, DIALOG_PLOT_BASE::m_sdbSizer1OK, DIALOG_PLOT_BASE::m_sizerButtons, KIWAY_HOLDER::Prj(), and WX_HTML_REPORT_PANEL::SetFileName().

Member Function Documentation

◆ applyPlotSettings()

void DIALOG_PLOT::applyPlotSettings ( )
private

Definition at line 630 of file dialog_plot.cpp.

631 {
632  REPORTER& reporter = m_messagesPanel->Reporter();
633  int sel;
634  PCB_PLOT_PARAMS tempOptions;
635 
636  tempOptions.SetExcludeEdgeLayer( !m_includeEdgeLayerOpt->GetValue() );
637  tempOptions.SetSubtractMaskFromSilk( m_subtractMaskFromSilk->GetValue() );
638  tempOptions.SetPlotFrameRef( m_plotSheetRef->GetValue() );
639  tempOptions.SetSketchPadsOnFabLayers( m_sketchPadsOnFabLayers->GetValue() );
640  tempOptions.SetUseAuxOrigin( m_useAuxOriginCheckBox->GetValue() );
641  tempOptions.SetPlotValue( m_plotModuleValueOpt->GetValue() );
642  tempOptions.SetPlotReference( m_plotModuleRefOpt->GetValue() );
643  tempOptions.SetPlotInvisibleText( m_plotInvisibleText->GetValue() );
644  tempOptions.SetScaleSelection( m_scaleOpt->GetSelection() );
645 
646  sel = m_drillShapeOpt->GetSelection();
647  tempOptions.SetDrillMarksType( static_cast<PCB_PLOT_PARAMS::DrillMarksType>( sel ) );
648 
649  tempOptions.SetMirror( m_plotMirrorOpt->GetValue() );
650  tempOptions.SetPlotMode( m_plotModeOpt->GetSelection() == 1 ? SKETCH : FILLED );
651  tempOptions.SetDXFPlotPolygonMode( m_DXF_plotModeOpt->GetValue() );
652 
653  sel = m_DXF_plotUnits->GetSelection();
654  tempOptions.SetDXFPlotUnits( sel == 0 ? DXF_UNITS::INCHES : DXF_UNITS::MILLIMETERS );
655 
656  tempOptions.SetPlotViaOnMaskLayer( m_plotNoViaOnMaskOpt->GetValue() );
657 
658  if( !m_DXF_plotTextStrokeFontOpt->IsEnabled() ) // Currently, only DXF supports this option
659  tempOptions.SetTextMode( PLOT_TEXT_MODE::DEFAULT );
660  else
663 
664  // Update settings from text fields. Rewrite values back to the fields,
665  // since the values may have been constrained by the setters.
666  wxString msg;
667 
668  // read HPLG pen size (this param is stored in mils)
669  // However, due to issues when converting this value from or to mm
670  // that can slightly change the value, update this param only if it
671  // is in use
673  {
674  if( !tempOptions.SetHPGLPenDiameter( m_defaultPenSize.GetValue() / IU_PER_MILS ) )
675  {
677  msg.Printf( _( "HPGL pen size constrained." ) );
678  reporter.Report( msg, RPT_SEVERITY_INFO );
679  }
680  }
681  else // keep the last value (initial value if no HPGL plot made)
682  {
684  }
685 
686  // X scale
687  double tmpDouble;
688  msg = m_fineAdjustXCtrl->GetValue();
689  msg.ToDouble( &tmpDouble );
690 
691  if( !setDouble( &m_XScaleAdjust, tmpDouble, PLOT_MIN_SCALE, PLOT_MAX_SCALE ) )
692  {
693  msg.Printf( wxT( "%f" ), m_XScaleAdjust );
694  m_fineAdjustXCtrl->SetValue( msg );
695  msg.Printf( _( "X scale constrained." ) );
696  reporter.Report( msg, RPT_SEVERITY_INFO );
697  }
698 
699  // Y scale
700  msg = m_fineAdjustYCtrl->GetValue();
701  msg.ToDouble( &tmpDouble );
702 
703  if( !setDouble( &m_YScaleAdjust, tmpDouble, PLOT_MIN_SCALE, PLOT_MAX_SCALE ) )
704  {
705  msg.Printf( wxT( "%f" ), m_YScaleAdjust );
706  m_fineAdjustYCtrl->SetValue( msg );
707  msg.Printf( _( "Y scale constrained." ) );
708  reporter.Report( msg, RPT_SEVERITY_INFO );
709  }
710 
711  auto cfg = m_parent->GetPcbNewSettings();
712 
714  cfg->m_Plot.fine_scale_y = m_YScaleAdjust;
715 
716  cfg->m_Plot.check_zones_before_plotting = m_zoneFillCheck->GetValue();
717 
718  // PS Width correction
721  {
723  msg.Printf( _( "Width correction constrained. "
724  "The reasonable width correction value must be in a range of "
725  " [%s; %s] (%s) for current design rules." ),
729  reporter.Report( msg, RPT_SEVERITY_WARNING );
730  }
731 
732  // Store m_PSWidthAdjust in mm in user config
733  cfg->m_Plot.ps_fine_width_adjust = Iu2Millimeter( m_PSWidthAdjust );
734 
735  tempOptions.SetFormat( getPlotFormat() );
736 
737  tempOptions.SetDisableGerberMacros( m_disableApertMacros->GetValue() );
738  tempOptions.SetUseGerberProtelExtensions( m_useGerberExtensions->GetValue() );
739  tempOptions.SetUseGerberX2format( m_useGerberX2Format->GetValue() );
740  tempOptions.SetIncludeGerberNetlistInfo( m_useGerberNetAttributes->GetValue() );
741  tempOptions.SetCreateGerberJobFile( m_generateGerberJobFile->GetValue() );
742 
743  tempOptions.SetGerberPrecision( m_coordFormatCtrl->GetSelection() == 0 ? 5 : 6 );
744  tempOptions.SetSvgPrecision( m_svgPrecsision->GetValue(), m_svgUnits->GetSelection() );
745 
746  LSET selectedLayers;
747 
748  for( unsigned i = 0; i < m_layerList.size(); i++ )
749  {
750  if( m_layerCheckListBox->IsChecked( i ) )
751  selectedLayers.set( m_layerList[i] );
752  }
753 
754  // Get a list of copper layers that aren't being used by inverting enabled layers.
755  LSET disabledCopperLayers = LSET::AllCuMask() & ~m_parent->GetBoard()->GetEnabledLayers();
756  // Enable all of the disabled copper layers.
757  // If someone enables more copper layers they will be selected by default.
758  selectedLayers = selectedLayers | disabledCopperLayers;
759  tempOptions.SetLayerSelection( selectedLayers );
760 
761  tempOptions.SetNegative( m_plotPSNegativeOpt->GetValue() );
762  tempOptions.SetA4Output( m_forcePSA4OutputOpt->GetValue() );
763 
764  // Set output directory and replace backslashes with forward ones
765  wxString dirStr;
766  dirStr = m_outputDirectoryName->GetValue();
767  dirStr.Replace( wxT( "\\" ), wxT( "/" ) );
768  tempOptions.SetOutputDirectory( dirStr );
769 
770  if( !m_plotOpts.IsSameAs( tempOptions ) )
771  {
772  m_parent->SetPlotSettings( tempOptions );
773  m_parent->OnModify();
774  m_plotOpts = tempOptions;
775  }
776 }
static LSET AllCuMask(int aCuLayerCount=MAX_CU_LAYERS)
Return a mask holding the requested number of Cu PCB_LAYER_IDs.
Definition: lset.cpp:750
void SetUseGerberProtelExtensions(bool aUse)
void SetPlotReference(bool aFlag)
void SetExcludeEdgeLayer(bool aFlag)
WX_HTML_REPORT_PANEL * m_messagesPanel
void SetScaleSelection(int aSelection)
LSEQ m_layerList
Definition: dialog_plot.h:70
void SetIncludeGerberNetlistInfo(bool aUse)
void SetDXFPlotPolygonMode(bool aFlag)
double m_YScaleAdjust
Definition: dialog_plot.h:73
void OnModify() override
Must be called after a board change to set the modified flag.
wxCheckBox * m_useGerberExtensions
void SetGerberPrecision(int aPrecision)
void SetPlotViaOnMaskLayer(bool aFlag)
wxCheckBox * m_includeEdgeLayerOpt
void SetLayerSelection(LSET aSelection)
void SetUseAuxOrigin(bool aAux)
wxCheckBox * m_plotPSNegativeOpt
#define PLOT_MIN_SCALE
Definition: pcbplot.h:54
void SetCreateGerberJobFile(bool aCreate)
void SetOutputDirectory(const wxString &aDir)
void SetMirror(bool aFlag)
wxCheckBox * m_plotMirrorOpt
void SetTextMode(PLOT_TEXT_MODE aVal)
LSET GetEnabledLayers() const
A proxy function that calls the corresponding function in m_BoardSettings.
Definition: board.cpp:467
wxString GetAbbreviatedUnitsLabel(EDA_UNITS aUnit, EDA_DATA_TYPE aType)
Get the units string for a given units type.
Definition: base_units.cpp:424
wxCheckBox * m_zoneFillCheck
void SetDrillMarksType(DrillMarksType aVal)
A pure virtual class used to derive REPORTER objects from.
Definition: reporter.h:70
wxChoice * m_coordFormatCtrl
void SetDXFPlotUnits(DXF_UNITS aUnit)
virtual REPORTER & Report(const wxString &aText, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED)=0
Report a string with a given severity.
UNIT_BINDER m_trackWidthCorrection
Definition: dialog_plot.h:83
void SetA4Output(int aForce)
double m_XScaleAdjust
Definition: dialog_plot.h:71
wxTextCtrl * m_fineAdjustYCtrl
wxCheckBox * m_DXF_plotModeOpt
void SetPlotValue(bool aFlag)
EDA_UNITS GetUserUnits() const
Definition: dialog_shim.h:121
wxCheckBox * m_plotSheetRef
void SetPlotFrameRef(bool aFlag)
wxTextCtrl * m_fineAdjustXCtrl
void SetDisableGerberMacros(bool aDisable)
wxSpinCtrl * m_svgPrecsision
LSET is a set of PCB_LAYER_IDs.
Definition: layer_ids.h:504
PCB_EDIT_FRAME * m_parent
Definition: dialog_plot.h:69
int m_widthAdjustMaxValue
Definition: dialog_plot.h:80
bool IsSameAs(const PCB_PLOT_PARAMS &aPcbPlotParams) const
Compare current settings to aPcbPlotParams, including not saved parameters in brd file.
PLOT_FORMAT getPlotFormat()
static bool setDouble(double *aResult, double aValue, double aMin, double aMax)
#define PLOT_MAX_SCALE
Definition: pcbplot.h:55
int m_PSWidthAdjust
Definition: dialog_plot.h:75
wxCheckBox * m_forcePSA4OutputOpt
void SetSubtractMaskFromSilk(bool aSubtract)
#define _(s)
void SetUseGerberX2format(bool aUse)
virtual void SetPlotSettings(const PCB_PLOT_PARAMS &aSettings)
wxCheckBox * m_useGerberNetAttributes
wxCheckBox * m_disableApertMacros
wxChoice * m_DXF_plotUnits
void SetFormat(PLOT_FORMAT aFormat)
int m_widthAdjustMinValue
Definition: dialog_plot.h:79
wxCheckBox * m_generateGerberJobFile
Parameters and options when plotting/printing a board.
wxTextCtrl * m_outputDirectoryName
void SetPlotInvisibleText(bool aFlag)
wxCheckBox * m_DXF_plotTextStrokeFontOpt
void SetPlotMode(OUTLINE_MODE aPlotMode)
PCB_PLOT_PARAMS m_plotOpts
Definition: dialog_plot.h:87
void SetNegative(bool aFlag)
void SetSvgPrecision(unsigned aPrecision, bool aUseInch)
wxChoice * m_scaleOpt
wxCheckBox * m_plotModuleRefOpt
bool SetHPGLPenDiameter(double aValue)
wxCheckBox * m_subtractMaskFromSilk
wxCheckBox * m_plotNoViaOnMaskOpt
wxCheckBox * m_plotModuleValueOpt
wxChoice * m_drillShapeOpt
static bool setInt(int *aResult, int aValue, int aMin, int aMax)
virtual void SetValue(int aValue)
Set new value (in Internal Units) for the text field, taking care of units conversion.
wxCheckBox * m_plotInvisibleText
double GetHPGLPenDiameter() const
wxCheckBox * m_sketchPadsOnFabLayers
PCBNEW_SETTINGS * GetPcbNewSettings() const
#define IU_PER_MILS
Definition: plotter.cpp:136
wxCheckBox * m_useAuxOriginCheckBox
DIALOG_PLOT m_Plot
wxChoice * m_plotModeOpt
virtual long long int GetValue()
Return the current value in Internal Units.
wxString StringFromValue(EDA_UNITS aUnits, double aValue, bool aAddUnitSymbol, EDA_DATA_TYPE aType)
Convert a value to a string using double notation.
Definition: base_units.cpp:204
UNIT_BINDER m_defaultPenSize
Definition: dialog_plot.h:82
wxCheckBox * m_useGerberX2Format
BOARD * GetBoard() const
wxCheckListBox * m_layerCheckListBox
void SetSketchPadsOnFabLayers(bool aFlag)

References _, LSET::AllCuMask(), DEFAULT, FILLED, PCBNEW_SETTINGS::DIALOG_PLOT::fine_scale_x, GetAbbreviatedUnitsLabel(), PCB_BASE_FRAME::GetBoard(), BOARD::GetEnabledLayers(), PCB_PLOT_PARAMS::GetHPGLPenDiameter(), PCB_BASE_FRAME::GetPcbNewSettings(), getPlotFormat(), DIALOG_SHIM::GetUserUnits(), UNIT_BINDER::GetValue(), HPGL, INCHES, PCB_PLOT_PARAMS::IsSameAs(), IU_PER_MILS, DIALOG_PLOT_BASE::m_coordFormatCtrl, m_defaultPenSize, DIALOG_PLOT_BASE::m_disableApertMacros, DIALOG_PLOT_BASE::m_drillShapeOpt, DIALOG_PLOT_BASE::m_DXF_plotModeOpt, DIALOG_PLOT_BASE::m_DXF_plotTextStrokeFontOpt, DIALOG_PLOT_BASE::m_DXF_plotUnits, DIALOG_PLOT_BASE::m_fineAdjustXCtrl, DIALOG_PLOT_BASE::m_fineAdjustYCtrl, DIALOG_PLOT_BASE::m_forcePSA4OutputOpt, DIALOG_PLOT_BASE::m_generateGerberJobFile, DIALOG_PLOT_BASE::m_includeEdgeLayerOpt, DIALOG_PLOT_BASE::m_layerCheckListBox, m_layerList, DIALOG_PLOT_BASE::m_messagesPanel, DIALOG_PLOT_BASE::m_outputDirectoryName, m_parent, PCBNEW_SETTINGS::m_Plot, DIALOG_PLOT_BASE::m_plotInvisibleText, DIALOG_PLOT_BASE::m_plotMirrorOpt, DIALOG_PLOT_BASE::m_plotModeOpt, DIALOG_PLOT_BASE::m_plotModuleRefOpt, DIALOG_PLOT_BASE::m_plotModuleValueOpt, DIALOG_PLOT_BASE::m_plotNoViaOnMaskOpt, m_plotOpts, DIALOG_PLOT_BASE::m_plotPSNegativeOpt, DIALOG_PLOT_BASE::m_plotSheetRef, m_PSWidthAdjust, DIALOG_PLOT_BASE::m_scaleOpt, DIALOG_PLOT_BASE::m_sketchPadsOnFabLayers, DIALOG_PLOT_BASE::m_subtractMaskFromSilk, DIALOG_PLOT_BASE::m_svgPrecsision, DIALOG_PLOT_BASE::m_svgUnits, m_trackWidthCorrection, DIALOG_PLOT_BASE::m_useAuxOriginCheckBox, DIALOG_PLOT_BASE::m_useGerberExtensions, DIALOG_PLOT_BASE::m_useGerberNetAttributes, DIALOG_PLOT_BASE::m_useGerberX2Format, m_widthAdjustMaxValue, m_widthAdjustMinValue, m_XScaleAdjust, m_YScaleAdjust, DIALOG_PLOT_BASE::m_zoneFillCheck, MILLIMETERS, NATIVE, PCB_EDIT_FRAME::OnModify(), PLOT_MAX_SCALE, PLOT_MIN_SCALE, REPORTER::Report(), WX_HTML_REPORT_PANEL::Reporter(), RPT_SEVERITY_INFO, RPT_SEVERITY_WARNING, PCB_PLOT_PARAMS::SetA4Output(), PCB_PLOT_PARAMS::SetCreateGerberJobFile(), PCB_PLOT_PARAMS::SetDisableGerberMacros(), setDouble(), PCB_PLOT_PARAMS::SetDrillMarksType(), PCB_PLOT_PARAMS::SetDXFPlotPolygonMode(), PCB_PLOT_PARAMS::SetDXFPlotUnits(), PCB_PLOT_PARAMS::SetExcludeEdgeLayer(), PCB_PLOT_PARAMS::SetFormat(), PCB_PLOT_PARAMS::SetGerberPrecision(), PCB_PLOT_PARAMS::SetHPGLPenDiameter(), PCB_PLOT_PARAMS::SetIncludeGerberNetlistInfo(), setInt(), PCB_PLOT_PARAMS::SetLayerSelection(), PCB_PLOT_PARAMS::SetMirror(), PCB_PLOT_PARAMS::SetNegative(), PCB_PLOT_PARAMS::SetOutputDirectory(), PCB_PLOT_PARAMS::SetPlotFrameRef(), PCB_PLOT_PARAMS::SetPlotInvisibleText(), PCB_PLOT_PARAMS::SetPlotMode(), PCB_PLOT_PARAMS::SetPlotReference(), PCB_BASE_FRAME::SetPlotSettings(), PCB_PLOT_PARAMS::SetPlotValue(), PCB_PLOT_PARAMS::SetPlotViaOnMaskLayer(), PCB_PLOT_PARAMS::SetScaleSelection(), PCB_PLOT_PARAMS::SetSketchPadsOnFabLayers(), PCB_PLOT_PARAMS::SetSubtractMaskFromSilk(), PCB_PLOT_PARAMS::SetSvgPrecision(), PCB_PLOT_PARAMS::SetTextMode(), PCB_PLOT_PARAMS::SetUseAuxOrigin(), PCB_PLOT_PARAMS::SetUseGerberProtelExtensions(), PCB_PLOT_PARAMS::SetUseGerberX2format(), UNIT_BINDER::SetValue(), SKETCH, and StringFromValue().

Referenced by CreateDrillFile(), and Plot().

◆ CreateDrillFile()

void DIALOG_PLOT::CreateDrillFile ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_PLOT_BASE.

Definition at line 334 of file dialog_plot.cpp.

335 {
336  // Be sure drill file use the same settings (axis option, plot directory) as plot files:
338 
339  DIALOG_GENDRILL dlg( m_parent, this );
340  dlg.ShowModal();
341 
342  // a few plot settings can be modified: take them in account
344  reInitDialog();
345 }
virtual const PCB_PLOT_PARAMS & GetPlotSettings() const
Return the PCB_PLOT_PARAMS for the BOARD owned by this frame.
PCB_EDIT_FRAME * m_parent
Definition: dialog_plot.h:69
PCB_PLOT_PARAMS m_plotOpts
Definition: dialog_plot.h:87
void reInitDialog()
void applyPlotSettings()

References applyPlotSettings(), PCB_BASE_FRAME::GetPlotSettings(), m_parent, m_plotOpts, and reInitDialog().

◆ DIALOG_PLOT_BASEOnContextMenu()

void DIALOG_PLOT_BASE::DIALOG_PLOT_BASEOnContextMenu ( wxMouseEvent &  event)
inlineinherited

Definition at line 156 of file dialog_plot_base.h.

157  {
158  this->PopupMenu( m_popMenu, event.GetPosition() );
159  }

References DIALOG_PLOT_BASE::m_popMenu.

Referenced by DIALOG_PLOT_BASE::DIALOG_PLOT_BASE().

◆ Enable()

bool DIALOG_SHIM::Enable ( bool  enable)
overrideinherited

Definition at line 312 of file dialog_shim.cpp.

313 {
314  // so we can do logging of this state change:
315  return wxDialog::Enable( enable );
316 }

◆ EndQuasiModal()

void DIALOG_SHIM::EndQuasiModal ( int  retCode)
inherited

Definition at line 480 of file dialog_shim.cpp.

481 {
482  // Hook up validator and transfer data from controls handling so quasi-modal dialogs
483  // handle validation in the same way as other dialogs.
484  if( ( retCode == wxID_OK ) && ( !Validate() || !TransferDataFromWindow() ) )
485  return;
486 
487  SetReturnCode( retCode );
488 
489  if( !IsQuasiModal() )
490  {
491  wxFAIL_MSG( "either DIALOG_SHIM::EndQuasiModal called twice or ShowQuasiModal"
492  "wasn't called" );
493  return;
494  }
495 
496  if( m_qmodal_loop )
497  {
498  if( m_qmodal_loop->IsRunning() )
499  m_qmodal_loop->Exit( 0 );
500  else
501  m_qmodal_loop->ScheduleExit( 0 );
502 
503  m_qmodal_loop = nullptr;
504  }
505 
507  m_qmodal_parent_disabler = nullptr;
508 
509  Show( false );
510 }
bool IsQuasiModal() const
Definition: dialog_shim.h:106
WX_EVENT_LOOP * m_qmodal_loop
Definition: dialog_shim.h:213
bool Show(bool show) override
WDO_ENABLE_DISABLE * m_qmodal_parent_disabler
Definition: dialog_shim.h:216

References DIALOG_SHIM::IsQuasiModal(), DIALOG_SHIM::m_qmodal_loop, DIALOG_SHIM::m_qmodal_parent_disabler, and DIALOG_SHIM::Show().

Referenced by NETLIST_DIALOG::OnAddGenerator(), DIALOG_SHIM::OnButton(), DIALOG_EDIT_SYMBOLS_LIBID::onCancel(), DIALOG_LIB_SYMBOL_PROPERTIES::OnCancelButtonClick(), DIALOG_SYMBOL_PROPERTIES::OnCancelButtonClick(), DIALOG_LIB_EDIT_PIN_TABLE::OnClose(), DIALOG_CHOOSE_FOOTPRINT::OnCloseTimer(), DIALOG_SHIM::OnCloseWindow(), NETLIST_DIALOG::OnDelGenerator(), DIALOG_SYMBOL_PROPERTIES::OnEditLibrarySymbol(), DIALOG_SYMBOL_PROPERTIES::OnEditSymbol(), DIALOG_SYMBOL_PROPERTIES::OnExchangeSymbol(), PCB_ONE_LAYER_SELECTOR::OnLeftGridCellClick(), PCB_ONE_LAYER_SELECTOR::OnRightGridCellClick(), DIALOG_SYMBOL_PROPERTIES::OnUpdateSymbol(), DIALOG_CHOOSE_FOOTPRINT::OnUseBrowser(), DIALOG_PUSH_PAD_PROPERTIES::PadPropertiesAccept(), and DIALOG_SHIM::~DIALOG_SHIM().

◆ finishDialogSettings()

void DIALOG_SHIM::finishDialogSettings ( )
protectedinherited

In all dialogs, we must call the same functions to fix minimal dlg size, the default position and perhaps some others to fix a few issues depending on Windows Managers this helper function does these calls.

finishDialogSettings must be called from derived classes after all widgets have been initialized, and therefore their size fixed. If TransferDataToWindow() is used to initialize widgets, at the end of TransferDataToWindow, or better yet, at end of a wxInitDialogEvent handler.

Definition at line 151 of file dialog_shim.cpp.

152 {
153  // must be called from the constructor of derived classes,
154  // when all widgets are initialized, and therefore their size fixed
155 
156  // SetSizeHints fixes the minimal size of sizers in the dialog
157  // (SetSizeHints calls Fit(), so no need to call it)
158  GetSizer()->SetSizeHints( this );
159 }

Referenced by DIALOG_ANNOTATE::DIALOG_ANNOTATE(), DIALOG_BOARD_REANNOTATE::DIALOG_BOARD_REANNOTATE(), DIALOG_BOARD_SETUP::DIALOG_BOARD_SETUP(), DIALOG_BOM::DIALOG_BOM(), DIALOG_BUS_MANAGER::DIALOG_BUS_MANAGER(), DIALOG_CHANGE_SYMBOLS::DIALOG_CHANGE_SYMBOLS(), DIALOG_CLEANUP_TRACKS_AND_VIAS::DIALOG_CLEANUP_TRACKS_AND_VIAS(), DIALOG_DIMENSION_PROPERTIES::DIALOG_DIMENSION_PROPERTIES(), DIALOG_DRC::DIALOG_DRC(), DIALOG_EDIT_SYMBOLS_LIBID::DIALOG_EDIT_SYMBOLS_LIBID(), DIALOG_ENUM_PADS::DIALOG_ENUM_PADS(), DIALOG_ERC::DIALOG_ERC(), DIALOG_EXCHANGE_FOOTPRINTS::DIALOG_EXCHANGE_FOOTPRINTS(), DIALOG_EXPORT_3DFILE::DIALOG_EXPORT_3DFILE(), DIALOG_EXPORT_IDF3::DIALOG_EXPORT_IDF3(), DIALOG_EXPORT_STEP::DIALOG_EXPORT_STEP(), DIALOG_EXPORT_SVG::DIALOG_EXPORT_SVG(), DIALOG_FOOTPRINT_CHECKER::DIALOG_FOOTPRINT_CHECKER(), DIALOG_FOOTPRINT_PROPERTIES::DIALOG_FOOTPRINT_PROPERTIES(), DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR(), DIALOG_FOOTPRINT_WIZARD_LIST::DIALOG_FOOTPRINT_WIZARD_LIST(), DIALOG_GENCAD_EXPORT_OPTIONS::DIALOG_GENCAD_EXPORT_OPTIONS(), DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS(), DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS(), DIALOG_GLOBAL_LIB_TABLE_CONFIG::DIALOG_GLOBAL_LIB_TABLE_CONFIG(), DIALOG_GRID_SETTINGS::DIALOG_GRID_SETTINGS(), DIALOG_GROUP_PROPERTIES::DIALOG_GROUP_PROPERTIES(), DIALOG_IMAGE_EDITOR::DIALOG_IMAGE_EDITOR(), DIALOG_IMPORTED_LAYERS::DIALOG_IMPORTED_LAYERS(), DIALOG_INSPECTOR::DIALOG_INSPECTOR(), DIALOG_JUNCTION_PROPS::DIALOG_JUNCTION_PROPS(), DIALOG_LIB_NEW_SYMBOL::DIALOG_LIB_NEW_SYMBOL(), DIALOG_LIB_SHAPE_PROPERTIES::DIALOG_LIB_SHAPE_PROPERTIES(), DIALOG_LIB_SYMBOL_PROPERTIES::DIALOG_LIB_SYMBOL_PROPERTIES(), DIALOG_LIB_TEXT_PROPERTIES::DIALOG_LIB_TEXT_PROPERTIES(), DIALOG_LINE_WIRE_BUS_PROPERTIES::DIALOG_LINE_WIRE_BUS_PROPERTIES(), DIALOG_LIST_HOTKEYS::DIALOG_LIST_HOTKEYS(), DIALOG_LOCKED_ITEMS_QUERY::DIALOG_LOCKED_ITEMS_QUERY(), DIALOG_MOVE_EXACT::DIALOG_MOVE_EXACT(), DIALOG_NET_INSPECTOR::DIALOG_NET_INSPECTOR(), DIALOG_NETLIST::DIALOG_NETLIST(), DIALOG_NON_COPPER_ZONES_EDITOR::DIALOG_NON_COPPER_ZONES_EDITOR(), DIALOG_PAD_PRIMITIVE_POLY_PROPS::DIALOG_PAD_PRIMITIVE_POLY_PROPS(), DIALOG_PAD_PRIMITIVES_PROPERTIES::DIALOG_PAD_PRIMITIVES_PROPERTIES(), DIALOG_PAD_PROPERTIES::DIALOG_PAD_PROPERTIES(), DIALOG_PASTE_SPECIAL::DIALOG_PASTE_SPECIAL(), DIALOG_PIN_PROPERTIES::DIALOG_PIN_PROPERTIES(), DIALOG_PLOT_SCHEMATIC::DIALOG_PLOT_SCHEMATIC(), DIALOG_POSITION_RELATIVE::DIALOG_POSITION_RELATIVE(), DIALOG_PRINT_GENERIC::DIALOG_PRINT_GENERIC(), DIALOG_PRINT_USING_PRINTER::DIALOG_PRINT_USING_PRINTER(), DIALOG_PUSH_PAD_PROPERTIES::DIALOG_PUSH_PAD_PROPERTIES(), DIALOG_REGULATOR_FORM::DIALOG_REGULATOR_FORM(), DIALOG_RULE_AREA_PROPERTIES::DIALOG_RULE_AREA_PROPERTIES(), DIALOG_SCHEMATIC_SETUP::DIALOG_SCHEMATIC_SETUP(), DIALOG_SELECT_3DMODEL::DIALOG_SELECT_3DMODEL(), DIALOG_SHEET_PIN_PROPERTIES::DIALOG_SHEET_PIN_PROPERTIES(), DIALOG_SHEET_PROPERTIES::DIALOG_SHEET_PROPERTIES(), DIALOG_SWAP_LAYERS::DIALOG_SWAP_LAYERS(), DIALOG_SYMBOL_FIELDS_TABLE::DIALOG_SYMBOL_FIELDS_TABLE(), DIALOG_SYMBOL_PROPERTIES::DIALOG_SYMBOL_PROPERTIES(), DIALOG_TARGET_PROPERTIES::DIALOG_TARGET_PROPERTIES(), DIALOG_TEXT_AND_LABEL_PROPERTIES::DIALOG_TEXT_AND_LABEL_PROPERTIES(), DIALOG_TEXT_PROPERTIES::DIALOG_TEXT_PROPERTIES(), DIALOG_TRACK_VIA_PROPERTIES::DIALOG_TRACK_VIA_PROPERTIES(), DIALOG_TRACK_VIA_SIZE::DIALOG_TRACK_VIA_SIZE(), DIALOG_UNUSED_PAD_LAYERS::DIALOG_UNUSED_PAD_LAYERS(), DIALOG_UPDATE_FROM_PCB::DIALOG_UPDATE_FROM_PCB(), DIALOG_UPDATE_PCB::DIALOG_UPDATE_PCB(), DIALOG_UPDATE_SYMBOL_FIELDS::DIALOG_UPDATE_SYMBOL_FIELDS(), DIALOG_CONSTRAINTS_REPORTER::FinishInitialization(), PAGED_DIALOG::finishInitialization(), DIALOG_FIELD_PROPERTIES::init(), DIALOG_EDIT_LIBRARY_TABLES::InstallPanel(), NETLIST_DIALOG::NETLIST_DIALOG(), DIALOG_GRAPHIC_ITEM_PROPERTIES::OnInitDlg(), DIALOG_SHEET_PROPERTIES::OnInitDlg(), DIALOG_SYMBOL_PROPERTIES::OnInitDlg(), DIALOG_SPICE_MODEL::onInitDlg(), DIALOG_SIM_SETTINGS::onInitDlg(), DIALOG_SIGNAL_LIST::TransferDataToWindow(), DIALOG_BOARD_STATISTICS::TransferDataToWindow(), and DIALOG_COLOR_PICKER::TransferDataToWindow().

◆ getPlotFormat()

PLOT_FORMAT DIALOG_PLOT::getPlotFormat ( )
private

Definition at line 409 of file dialog_plot.cpp.

410 {
411  // plot format id's are ordered like displayed in m_plotFormatOpt
412  static const PLOT_FORMAT plotFmt[] = {
419 
420  return plotFmt[m_plotFormatOpt->GetSelection()];
421 }
wxChoice * m_plotFormatOpt
PLOT_FORMAT
The set of supported output plot formats.
Definition: plotter.h:67

References DXF, GERBER, HPGL, DIALOG_PLOT_BASE::m_plotFormatOpt, PDF, POST, and SVG.

Referenced by applyPlotSettings(), Plot(), reInitDialog(), and SetPlotFormat().

◆ GetType()

HOLDER_TYPE KIWAY_HOLDER::GetType ( ) const
inlineinherited

Definition at line 46 of file kiway_holder.h.

46 { return m_type; }
HOLDER_TYPE m_type
Definition: kiway_holder.h:76

References KIWAY_HOLDER::m_type.

Referenced by DIALOG_SHIM::DIALOG_SHIM().

◆ GetUserUnits()

◆ horizPixelsFromDU()

int DIALOG_SHIM::horizPixelsFromDU ( int  x) const
protectedinherited

Convert an integer number of dialog units to pixels, horizontally.

See SetSizeInDU or wxDialog documentation for more information.

Definition at line 169 of file dialog_shim.cpp.

170 {
171  wxSize sz( x, 0 );
172  return ConvertDialogToPixels( sz ).x;
173 }

Referenced by DIALOG_CHOOSE_FOOTPRINT::DIALOG_CHOOSE_FOOTPRINT(), and DIALOG_CHOOSE_SYMBOL::DIALOG_CHOOSE_SYMBOL().

◆ init_Dialog()

void DIALOG_PLOT::init_Dialog ( )
private

Definition at line 80 of file dialog_plot.cpp.

81 {
82  BOARD* board = m_parent->GetBoard();
83  wxFileName fileName;
84 
85  auto cfg = m_parent->GetPcbNewSettings();
86 
87  m_XScaleAdjust = cfg->m_Plot.fine_scale_x;
88  m_YScaleAdjust = cfg->m_Plot.fine_scale_y;
89 
90  m_zoneFillCheck->SetValue( cfg->m_Plot.check_zones_before_plotting );
91 
93 
94  // m_PSWidthAdjust is stored in mm in user config
95  m_PSWidthAdjust = KiROUND( cfg->m_Plot.ps_fine_width_adjust * IU_PER_MM );
96 
97  // The reasonable width correction value must be in a range of
98  // [-(MinTrackWidth-1), +(MinClearanceValue-1)] decimils.
101 
102  switch( m_plotOpts.GetFormat() )
103  {
104  default:
105  case PLOT_FORMAT::GERBER: m_plotFormatOpt->SetSelection( 0 ); break;
106  case PLOT_FORMAT::POST: m_plotFormatOpt->SetSelection( 1 ); break;
107  case PLOT_FORMAT::SVG: m_plotFormatOpt->SetSelection( 2 ); break;
108  case PLOT_FORMAT::DXF: m_plotFormatOpt->SetSelection( 3 ); break;
109  case PLOT_FORMAT::HPGL: m_plotFormatOpt->SetSelection( 4 ); break;
110  case PLOT_FORMAT::PDF: m_plotFormatOpt->SetSelection( 5 ); break;
111  }
112 
113  // Set units and value for HPGL pen size (this param is in mils).
115 
116  // Test for a reasonable scale value. Set to 1 if problem
119  {
121  }
122 
125 
126  // Test for a reasonable PS width correction value. Set to 0 if problem.
127  if( m_PSWidthAdjust < m_widthAdjustMinValue || m_PSWidthAdjust > m_widthAdjustMaxValue )
128  m_PSWidthAdjust = 0.;
129 
131 
134 
135  // Could devote a PlotOrder() function in place of UIOrder().
136  m_layerList = board->GetEnabledLayers().UIOrder();
137 
138  // Populate the check list box by all enabled layers names
139  for( LSEQ seq = m_layerList; seq; ++seq )
140  {
141  PCB_LAYER_ID layer = *seq;
142 
143  int checkIndex = m_layerCheckListBox->Append( board->GetLayerName( layer ) );
144 
145  if( m_plotOpts.GetLayerSelection()[layer] )
146  m_layerCheckListBox->Check( checkIndex );
147  }
148 
149  // Option for disabling Gerber Aperture Macro (for broken Gerber readers)
151 
152  // Option for using proper Gerber extensions. Note also Protel extensions are
153  // a broken feature. However, for now, we need to handle it.
155 
156  // Option for including Gerber attributes, from Gerber X2 format, in the output
157  // In X1 format, they will be added as comments
159 
160  // Option for including Gerber netlist info (from Gerber X2 format) in the output
162 
163  // Option to generate a Gerber job file
165 
166  // Gerber precision for coordinates
167  m_coordFormatCtrl->SetSelection( m_plotOpts.GetGerberPrecision() == 5 ? 0 : 1 );
168 
169  // SVG precision and units for coordinates
171  m_svgUnits->SetSelection( m_plotOpts.GetSvgUseInch() );
172 
173  // Option for excluding contents of "Edges Pcb" layer
175 
176  // Option to exclude pads from silkscreen layers
178 
179  // Option to tent vias
181 
182  // Option to use aux origin
184 
185  // Option to plot page references:
187 
188  // Options to plot texts on footprints
192 
193  // Options to plot pads and vias holes
194  m_drillShapeOpt->SetSelection( m_plotOpts.GetDrillMarksType() );
195 
196  // Scale option
197  m_scaleOpt->SetSelection( m_plotOpts.GetScaleSelection() );
198 
199  // Plot mode
201 
202  // DXF outline mode
204 
205  // DXF text mode
207 
208  // DXF units selection
209  m_DXF_plotUnits->SetSelection( m_plotOpts.GetDXFPlotUnits() == DXF_UNITS::INCHES ? 0 : 1);
210 
211  // Plot mirror option
212  m_plotMirrorOpt->SetValue( m_plotOpts.GetMirror() );
213 
214  // Put vias on mask layer
216 
217  // Initialize a few other parameters, which can also be modified
218  // from the drill dialog
219  reInitDialog();
220 
221  // Update options values:
222  wxCommandEvent cmd_event;
223  SetPlotFormat( cmd_event );
224  OnSetScaleOpt( cmd_event );
225 }
OUTLINE_MODE GetPlotMode() const
LSEQ m_layerList
Definition: dialog_plot.h:70
double m_YScaleAdjust
Definition: dialog_plot.h:73
bool GetCreateGerberJobFile() const
wxCheckBox * m_useGerberExtensions
const wxString GetLayerName(PCB_LAYER_ID aLayer) const
Return the name of a aLayer.
Definition: board.cpp:362
bool GetPlotFrameRef() const
wxCheckBox * m_includeEdgeLayerOpt
bool GetDXFPlotPolygonMode() const
static constexpr double IU_PER_MM
Mock up a conversion function.
wxCheckBox * m_plotPSNegativeOpt
#define PLOT_MIN_SCALE
Definition: pcbplot.h:54
bool GetDisableGerberMacros() const
wxCheckBox * m_plotMirrorOpt
LSET GetEnabledLayers() const
A proxy function that calls the corresponding function in m_BoardSettings.
Definition: board.cpp:467
wxCheckBox * m_zoneFillCheck
wxChoice * m_plotFormatOpt
wxChoice * m_coordFormatCtrl
BOARD_DESIGN_SETTINGS & GetDesignSettings() const
Definition: board.cpp:590
UNIT_BINDER m_trackWidthCorrection
Definition: dialog_plot.h:83
bool GetUseGerberX2format() const
double m_XScaleAdjust
Definition: dialog_plot.h:71
wxTextCtrl * m_fineAdjustYCtrl
wxCheckBox * m_DXF_plotModeOpt
bool GetMirror() const
wxCheckBox * m_plotSheetRef
void SetPlotFormat(wxCommandEvent &event) override
wxTextCtrl * m_fineAdjustXCtrl
bool GetA4Output() const
int GetGerberPrecision() const
wxSpinCtrl * m_svgPrecsision
PLOT_FORMAT GetFormat() const
PCB_EDIT_FRAME * m_parent
Definition: dialog_plot.h:69
int m_widthAdjustMaxValue
Definition: dialog_plot.h:80
bool GetUseGerberProtelExtensions() const
unsigned GetSvgPrecision() const
#define PLOT_MAX_SCALE
Definition: pcbplot.h:55
bool GetIncludeGerberNetlistInfo() const
int m_PSWidthAdjust
Definition: dialog_plot.h:75
PLOT_TEXT_MODE GetTextMode() const
wxCheckBox * m_forcePSA4OutputOpt
void setPlotModeChoiceSelection(OUTLINE_MODE aPlotMode)
Definition: dialog_plot.h:64
void OnSetScaleOpt(wxCommandEvent &event) override
wxCheckBox * m_useGerberNetAttributes
wxCheckBox * m_disableApertMacros
wxChoice * m_DXF_plotUnits
int m_widthAdjustMinValue
Definition: dialog_plot.h:79
wxCheckBox * m_generateGerberJobFile
wxBitmap KiBitmap(BITMAPS aBitmap, int aHeightTag)
Construct a wxBitmap from an image identifier Returns the image from the active theme if the image ha...
Definition: bitmap.cpp:105
LSEQ is a sequence (and therefore also a set) of PCB_LAYER_IDs.
Definition: layer_ids.h:465
wxCheckBox * m_DXF_plotTextStrokeFontOpt
PCB_PLOT_PARAMS m_plotOpts
Definition: dialog_plot.h:87
bool GetPlotValue() const
wxChoice * m_scaleOpt
void reInitDialog()
wxCheckBox * m_plotModuleRefOpt
wxCheckBox * m_subtractMaskFromSilk
bool GetSketchPadsOnFabLayers() const
wxCheckBox * m_plotNoViaOnMaskOpt
wxCheckBox * m_plotModuleValueOpt
bool GetPlotViaOnMaskLayer() const
wxChoice * m_drillShapeOpt
Information pertinent to a Pcbnew printed circuit board.
Definition: board.h:190
bool GetSubtractMaskFromSilk() const
PCB_LAYER_ID
A quick note on layer IDs:
Definition: layer_ids.h:65
virtual void SetValue(int aValue)
Set new value (in Internal Units) for the text field, taking care of units conversion.
wxCheckBox * m_plotInvisibleText
double GetHPGLPenDiameter() const
wxCheckBox * m_sketchPadsOnFabLayers
PCBNEW_SETTINGS * GetPcbNewSettings() const
#define IU_PER_MILS
Definition: plotter.cpp:136
constexpr ret_type KiROUND(fp_type v)
Round a floating point number to an integer using "round halfway cases away from zero".
Definition: util.h:73
wxCheckBox * m_useAuxOriginCheckBox
bool GetPlotInvisibleText() const
wxString StringFromValue(EDA_UNITS aUnits, double aValue, bool aAddUnitSymbol, EDA_DATA_TYPE aType)
Convert a value to a string using double notation.
Definition: base_units.cpp:204
int GetScaleSelection() const
DXF_UNITS GetDXFPlotUnits() const
UNIT_BINDER m_defaultPenSize
Definition: dialog_plot.h:82
bool GetSvgUseInch() const
wxBitmapButton * m_browseButton
bool GetNegative() const
wxCheckBox * m_useGerberX2Format
BOARD * GetBoard() const
bool GetUseAuxOrigin() const
wxCheckListBox * m_layerCheckListBox
LSET GetLayerSelection() const
LSEQ UIOrder() const
Definition: lset.cpp:895
DrillMarksType GetDrillMarksType() const
bool GetPlotReference() const
bool GetExcludeEdgeLayer() const

References DEFAULT, DXF, GERBER, PCB_PLOT_PARAMS::GetA4Output(), PCB_BASE_FRAME::GetBoard(), PCB_PLOT_PARAMS::GetCreateGerberJobFile(), BOARD::GetDesignSettings(), PCB_PLOT_PARAMS::GetDisableGerberMacros(), PCB_PLOT_PARAMS::GetDrillMarksType(), PCB_PLOT_PARAMS::GetDXFPlotPolygonMode(), PCB_PLOT_PARAMS::GetDXFPlotUnits(), BOARD::GetEnabledLayers(), PCB_PLOT_PARAMS::GetExcludeEdgeLayer(), PCB_PLOT_PARAMS::GetFormat(), PCB_PLOT_PARAMS::GetGerberPrecision(), PCB_PLOT_PARAMS::GetHPGLPenDiameter(), PCB_PLOT_PARAMS::GetIncludeGerberNetlistInfo(), BOARD::GetLayerName(), PCB_PLOT_PARAMS::GetLayerSelection(), PCB_PLOT_PARAMS::GetMirror(), PCB_PLOT_PARAMS::GetNegative(), PCB_BASE_FRAME::GetPcbNewSettings(), PCB_PLOT_PARAMS::GetPlotFrameRef(), PCB_PLOT_PARAMS::GetPlotInvisibleText(), PCB_PLOT_PARAMS::GetPlotMode(), PCB_PLOT_PARAMS::GetPlotReference(), PCB_PLOT_PARAMS::GetPlotValue(), PCB_PLOT_PARAMS::GetPlotViaOnMaskLayer(), PCB_PLOT_PARAMS::GetScaleSelection(), PCB_PLOT_PARAMS::GetSketchPadsOnFabLayers(), BOARD_DESIGN_SETTINGS::GetSmallestClearanceValue(), PCB_PLOT_PARAMS::GetSubtractMaskFromSilk(), PCB_PLOT_PARAMS::GetSvgPrecision(), PCB_PLOT_PARAMS::GetSvgUseInch(), PCB_PLOT_PARAMS::GetTextMode(), PCB_PLOT_PARAMS::GetUseAuxOrigin(), PCB_PLOT_PARAMS::GetUseGerberProtelExtensions(), PCB_PLOT_PARAMS::GetUseGerberX2format(), HPGL, INCHES, IU_PER_MILS, IU_PER_MM, KiBitmap(), KiROUND(), DIALOG_PLOT_BASE::m_browseButton, DIALOG_PLOT_BASE::m_coordFormatCtrl, m_defaultPenSize, DIALOG_PLOT_BASE::m_disableApertMacros, DIALOG_PLOT_BASE::m_drillShapeOpt, DIALOG_PLOT_BASE::m_DXF_plotModeOpt, DIALOG_PLOT_BASE::m_DXF_plotTextStrokeFontOpt, DIALOG_PLOT_BASE::m_DXF_plotUnits, DIALOG_PLOT_BASE::m_fineAdjustXCtrl, DIALOG_PLOT_BASE::m_fineAdjustYCtrl, DIALOG_PLOT_BASE::m_forcePSA4OutputOpt, DIALOG_PLOT_BASE::m_generateGerberJobFile, DIALOG_PLOT_BASE::m_includeEdgeLayerOpt, DIALOG_PLOT_BASE::m_layerCheckListBox, m_layerList, m_parent, DIALOG_PLOT_BASE::m_plotFormatOpt, DIALOG_PLOT_BASE::m_plotInvisibleText, DIALOG_PLOT_BASE::m_plotMirrorOpt, DIALOG_PLOT_BASE::m_plotModuleRefOpt, DIALOG_PLOT_BASE::m_plotModuleValueOpt, DIALOG_PLOT_BASE::m_plotNoViaOnMaskOpt, m_plotOpts, DIALOG_PLOT_BASE::m_plotPSNegativeOpt, DIALOG_PLOT_BASE::m_plotSheetRef, m_PSWidthAdjust, DIALOG_PLOT_BASE::m_scaleOpt, DIALOG_PLOT_BASE::m_sketchPadsOnFabLayers, DIALOG_PLOT_BASE::m_subtractMaskFromSilk, DIALOG_PLOT_BASE::m_svgPrecsision, DIALOG_PLOT_BASE::m_svgUnits, BOARD_DESIGN_SETTINGS::m_TrackMinWidth, m_trackWidthCorrection, DIALOG_PLOT_BASE::m_useAuxOriginCheckBox, DIALOG_PLOT_BASE::m_useGerberExtensions, DIALOG_PLOT_BASE::m_useGerberNetAttributes, DIALOG_PLOT_BASE::m_useGerberX2Format, m_widthAdjustMaxValue, m_widthAdjustMinValue, m_XScaleAdjust, m_YScaleAdjust, DIALOG_PLOT_BASE::m_zoneFillCheck, OnSetScaleOpt(), PDF, PLOT_MAX_SCALE, PLOT_MIN_SCALE, POST, reInitDialog(), SetPlotFormat(), setPlotModeChoiceSelection(), UNIT_BINDER::SetValue(), small_folder, StringFromValue(), SVG, LSET::UIOrder(), and UNSCALED.

Referenced by DIALOG_PLOT().

◆ IsCtrl()

static bool DIALOG_SHIM::IsCtrl ( int  aChar,
const wxKeyEvent &  e 
)
inlinestaticinherited

Definition at line 126 of file dialog_shim.h.

127  {
128  return e.GetKeyCode() == aChar && e.ControlDown() && !e.AltDown() &&
129  !e.ShiftDown() && !e.MetaDown();
130  }

◆ IsQuasiModal()

◆ IsShiftCtrl()

static bool DIALOG_SHIM::IsShiftCtrl ( int  aChar,
const wxKeyEvent &  e 
)
inlinestaticinherited

Definition at line 132 of file dialog_shim.h.

133  {
134  return e.GetKeyCode() == aChar && e.ControlDown() && !e.AltDown() &&
135  e.ShiftDown() && !e.MetaDown();
136  }

◆ Kiway()

KIWAY& KIWAY_HOLDER::Kiway ( ) const
inlineinherited

Return a reference to the KIWAY that this object has an opportunity to participate in.

A KIWAY_HOLDER is not necessarily a KIWAY_PLAYER.

Definition at line 53 of file kiway_holder.h.

54  {
55  wxASSERT( m_kiway ); // smoke out bugs in Debug build, then Release runs fine.
56  return *m_kiway;
57  }
KIWAY * m_kiway
Definition: kiway_holder.h:75

References KIWAY_HOLDER::m_kiway.

Referenced by PROJECT_TREE_ITEM::Activate(), FOOTPRINT_VIEWER_FRAME::AddFootprintToPCB(), PCB_BASE_EDIT_FRAME::AddLibrary(), SYMBOL_EDIT_FRAME::AddLibraryFile(), SYMBOL_EDITOR_CONTROL::AddSymbolToSchematic(), SYMBOL_EDIT_FRAME::canCloseWindow(), SCH_EDIT_FRAME::canCloseWindow(), KICAD_MANAGER_FRAME::CloseProject(), COMMON_CONTROL::ConfigurePaths(), DIALOG_CHOOSE_FOOTPRINT::ConstructRightPanel(), DIALOG_CHOOSE_SYMBOL::ConstructRightPanel(), PCB_BASE_FRAME::CreateAndShow3D_Frame(), FOOTPRINT_EDITOR_CONTROL::CreateFootprint(), CVPCB_MAINFRAME::CVPCB_MAINFRAME(), DIALOG_RESCUE_EACH::DIALOG_RESCUE_EACH(), DIALOG_SHIM::DIALOG_SHIM(), SCH_EDIT_FRAME::doCloseWindow(), FIELDS_GRID_TRICKS::doPopupSelection(), FIELDS_EDITOR_GRID_TRICKS::doPopupSelection(), BOARD_EDITOR_CONTROL::EditFpInFpEditor(), SCH_EDITOR_CONTROL::EditWithSymbolEditor(), BACK_ANNOTATE::FetchNetlistFromPCB(), KICAD_MANAGER_FRAME::ImportNonKiCadProject(), SCRIPTING_TOOL::Init(), EDA_DRAW_FRAME::IsScriptingConsoleVisible(), KICAD_MANAGER_FRAME::language_change(), KIWAY_PLAYER::language_change(), DIALOG_CHANGE_SYMBOLS::launchMatchIdSymbolBrowser(), DIALOG_CHANGE_SYMBOLS::launchNewIdSymbolBrowser(), LIB_TREE_MODEL_ADAPTER::LIB_TREE_MODEL_ADAPTER(), TEXT_BUTTON_SYMBOL_CHOOSER::OnButtonClick(), TEXT_BUTTON_FP_CHOOSER::OnButtonClick(), PL_EDITOR_FRAME::OnExit(), SCH_EDIT_FRAME::OnExit(), FOOTPRINT_EDIT_FRAME::OnExitKiCad(), FOOTPRINT_VIEWER_FRAME::OnExitKiCad(), SYMBOL_EDIT_FRAME::OnExitKiCad(), SAVE_AS_TRAVERSER::OnFile(), DIALOG_CHOOSE_SYMBOL::OnInitDialog(), SCH_EDIT_FRAME::OnOpenCvpcb(), SCH_EDIT_FRAME::OnOpenPcbnew(), EDA_BASE_FRAME::OnPreferences(), DIALOG_SYMBOL_REMAP::OnRemapSymbols(), DIALOG_FIELD_PROPERTIES::OnTextValueSelectButtonClick(), KICAD_MANAGER_FRAME::OnUnarchiveFiles(), FOOTPRINT_EDIT_FRAME::OnUpdateLoadFootprintFromBoard(), SCH_EDIT_FRAME::OnUpdatePCB(), FOOTPRINT_EDIT_FRAME::OnUpdateSaveFootprintToBoard(), PANEL_PCBNEW_COLOR_SETTINGS::PANEL_PCBNEW_COLOR_SETTINGS(), SCH_BASE_FRAME::PickSymbolFromLibBrowser(), KIWAY_HOLDER::Prj(), SCH_EDIT_TOOL::Properties(), BACK_ANNOTATE::PushNewLinksToPCB(), FOOTPRINT_WIZARD_FRAME::PythonPluginsReload(), FOOTPRINT_VIEWER_FRAME::ReCreateFootprintList(), SCH_EDITOR_CONTROL::rescueProject(), EE_INSPECTION_TOOL::RunSimulation(), SYMBOL_EDIT_FRAME::Save(), CVPCB_MAINFRAME::SaveFootprintAssociation(), FOOTPRINT_EDIT_FRAME::SaveFootprintToBoard(), LIB_TREE_MODEL_ADAPTER::SavePinnedItems(), EDA_DRAW_FRAME::ScriptingConsoleEnableDisable(), SCH_EDIT_FRAME::SendCrossProbeClearHighlight(), SCH_EDIT_FRAME::SendCrossProbeNetName(), PCB_EDIT_FRAME::SendCrossProbeNetName(), CVPCB_MAINFRAME::SendMessageToEESCHEMA(), PCB_EDIT_FRAME::SendMessageToEESCHEMA(), SCH_EDIT_FRAME::SendMessageToPCBNEW(), SCH_EDIT_FRAME::sendNetlistToCvpcb(), SCH_EDIT_FRAME::SetCrossProbeConnection(), SYMBOL_EDIT_FRAME::SetCurSymbol(), CVPCB_CONTROL::ShowFootprintViewer(), COMMON_CONTROL::ShowLibraryTable(), COMMON_CONTROL::ShowPlayer(), KICAD_MANAGER_CONTROL::ShowPlayer(), SCH_EDIT_FRAME::ShowSchematicSetupDialog(), SIM_PLOT_FRAME::SIM_PLOT_FRAME(), BOARD_EDITOR_CONTROL::UpdateSchematicFromPCB(), and DIALOG_EXCHANGE_FOOTPRINTS::ViewAndSelectFootprint().

◆ onBoardSetup()

void DIALOG_PLOT::onBoardSetup ( wxHyperlinkEvent &  aEvent)
overrideprivatevirtual

Reimplemented from DIALOG_PLOT_BASE.

Definition at line 954 of file dialog_plot.cpp.

955 {
956  PCB_EDIT_FRAME* parent = dynamic_cast<PCB_EDIT_FRAME*>( GetParent() );
957 
958  if( parent )
959  {
960  parent->ShowBoardSetupDialog( _( "Solder Mask/Paste" ) );
961 
962  // Update warnings on return to this dialog
963  reInitDialog();
964  }
965 }
void ShowBoardSetupDialog(const wxString &aInitialPage=wxEmptyString)
#define _(s)
void reInitDialog()
The main frame for Pcbnew.

References _, reInitDialog(), and PCB_EDIT_FRAME::ShowBoardSetupDialog().

◆ OnChangeDXFPlotMode()

void DIALOG_PLOT::OnChangeDXFPlotMode ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_PLOT_BASE.

Definition at line 348 of file dialog_plot.cpp.

349 {
350  // m_DXF_plotTextStrokeFontOpt is disabled if m_DXF_plotModeOpt is checked (plot in DXF
351  // polygon mode)
352  m_DXF_plotTextStrokeFontOpt->Enable( !m_DXF_plotModeOpt->GetValue() );
353 
354  // if m_DXF_plotTextStrokeFontOpt option is disabled (plot DXF in polygon mode), force
355  // m_DXF_plotTextStrokeFontOpt to true to use Pcbnew stroke font
356  if( !m_DXF_plotTextStrokeFontOpt->IsEnabled() )
357  m_DXF_plotTextStrokeFontOpt->SetValue( true );
358 }
wxCheckBox * m_DXF_plotModeOpt
wxCheckBox * m_DXF_plotTextStrokeFontOpt

References DIALOG_PLOT_BASE::m_DXF_plotModeOpt, and DIALOG_PLOT_BASE::m_DXF_plotTextStrokeFontOpt.

Referenced by SetPlotFormat().

◆ OnCharHook()

void DIALOG_SHIM::OnCharHook ( wxKeyEvent &  aEvt)
protectedvirtualinherited

Reimplemented in DIALOG_CHOOSE_SYMBOL, HK_PROMPT_DIALOG, and HTML_MESSAGE_BOX.

Definition at line 570 of file dialog_shim.cpp.

571 {
572  if( aEvt.GetKeyCode() == 'U' && aEvt.GetModifiers() == wxMOD_CONTROL )
573  {
574  if( m_parentFrame )
575  {
577  return;
578  }
579  }
580  // shift-return (Mac default) or Ctrl-Return (GTK) for OK
581  else if( aEvt.GetKeyCode() == WXK_RETURN && ( aEvt.ShiftDown() || aEvt.ControlDown() ) )
582  {
583  wxPostEvent( this, wxCommandEvent( wxEVT_COMMAND_BUTTON_CLICKED, wxID_OK ) );
584  return;
585  }
586  else if( aEvt.GetKeyCode() == WXK_TAB && !aEvt.ControlDown() )
587  {
588  wxWindow* currentWindow = wxWindow::FindFocus();
589  int currentIdx = -1;
590  int delta = aEvt.ShiftDown() ? -1 : 1;
591 
592  auto advance = [&]( int& idx )
593  {
594  // Wrap-around modulus
595  int size = m_tabOrder.size();
596  idx = ( ( idx + delta ) % size + size ) % size;
597  };
598 
599  for( size_t i = 0; i < m_tabOrder.size(); ++i )
600  {
601  if( m_tabOrder[i] == currentWindow )
602  {
603  currentIdx = (int) i;
604  break;
605  }
606  }
607 
608  if( currentIdx >= 0 )
609  {
610  advance( currentIdx );
611 
612  //todo: We don't currently have non-textentry dialog boxes but this will break if
613  // we add them.
614 #ifdef __APPLE__
615  while( dynamic_cast<wxTextEntry*>( m_tabOrder[ currentIdx ] ) == nullptr )
616  advance( currentIdx );
617 #endif
618 
619  m_tabOrder[ currentIdx ]->SetFocus();
620  return;
621  }
622  }
623 
624  aEvt.Skip();
625 }
std::vector< wxWindow * > m_tabOrder
Definition: dialog_shim.h:220
EDA_BASE_FRAME * m_parentFrame
Definition: dialog_shim.h:218
virtual void ToggleUserUnits()
constexpr int delta

References delta, DIALOG_SHIM::m_parentFrame, DIALOG_SHIM::m_tabOrder, and EDA_BASE_FRAME::ToggleUserUnits().

Referenced by DIALOG_TEXT_PROPERTIES::DIALOG_TEXT_PROPERTIES(), and DIALOG_TEXT_PROPERTIES::~DIALOG_TEXT_PROPERTIES().

◆ OnGerberX2Checked()

void DIALOG_PLOT::OnGerberX2Checked ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_PLOT_BASE.

Definition at line 779 of file dialog_plot.cpp.

780 {
781  // Currently: do nothing
782 }

◆ OnInitDialog()

virtual void DIALOG_PLOT_BASE::OnInitDialog ( wxInitDialogEvent &  event)
inlineprotectedvirtualinherited

Definition at line 137 of file dialog_plot_base.h.

137 { event.Skip(); }

Referenced by DIALOG_PLOT_BASE::DIALOG_PLOT_BASE(), and DIALOG_PLOT_BASE::~DIALOG_PLOT_BASE().

◆ OnModify()

◆ OnOutputDirectoryBrowseClicked()

void DIALOG_PLOT::OnOutputDirectoryBrowseClicked ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_PLOT_BASE.

Definition at line 373 of file dialog_plot.cpp.

374 {
375  // Build the absolute path of current output directory to preselect it in the file browser.
376  wxString path = ExpandEnvVarSubstitutions( m_outputDirectoryName->GetValue(), &Prj() );
377  path = Prj().AbsolutePath( path );
378 
379  wxDirDialog dirDialog( this, _( "Select Output Directory" ), path );
380 
381  if( dirDialog.ShowModal() == wxID_CANCEL )
382  return;
383 
384  wxFileName dirName = wxFileName::DirName( dirDialog.GetPath() );
385 
386  wxFileName fn( Prj().AbsolutePath( m_parent->GetBoard()->GetFileName() ) );
387  wxString defaultPath = fn.GetPathWithSep();
388  wxString msg;
389  wxFileName relPathTest; // Used to test if we can make the path relative
390 
391  relPathTest.Assign( dirDialog.GetPath() );
392 
393  // Test if making the path relative is possible before asking the user if they want to do it
394  if( relPathTest.MakeRelativeTo( defaultPath ) )
395  {
396  msg.Printf( _( "Do you want to use a path relative to\n'%s'?" ), defaultPath );
397 
398  wxMessageDialog dialog( this, msg, _( "Plot Output Directory" ),
399  wxYES_NO | wxICON_QUESTION | wxYES_DEFAULT );
400 
401  if( dialog.ShowModal() == wxID_YES )
402  dirName.MakeRelativeTo( defaultPath );
403  }
404 
405  m_outputDirectoryName->SetValue( dirName.GetFullPath() );
406 }
const wxString ExpandEnvVarSubstitutions(const wxString &aString, PROJECT *aProject)
Replace any environment variable & text variable references with their values.
Definition: common.cpp:267
const wxString & GetFileName() const
Definition: board.h:228
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.
Definition: project.cpp:269
PCB_EDIT_FRAME * m_parent
Definition: dialog_plot.h:69
PROJECT & Prj() const
Return a reference to the PROJECT associated with this KIWAY.
#define _(s)
wxTextCtrl * m_outputDirectoryName
BOARD * GetBoard() const

References _, PROJECT::AbsolutePath(), ExpandEnvVarSubstitutions(), PCB_BASE_FRAME::GetBoard(), BOARD::GetFileName(), DIALOG_PLOT_BASE::m_outputDirectoryName, m_parent, path, and KIWAY_HOLDER::Prj().

◆ OnPaint()

void DIALOG_SHIM::OnPaint ( wxPaintEvent &  event)
inherited

Definition at line 380 of file dialog_shim.cpp.

381 {
382  if( m_firstPaintEvent )
383  {
385 
386  selectAllInTextCtrls( GetChildren() );
387 
390  else
391  KIPLATFORM::UI::ForceFocus( this ); // Focus the dialog itself
392 
393  m_firstPaintEvent = false;
394  }
395 
396  event.Skip();
397 }
wxWindow * m_initialFocusTarget
Definition: dialog_shim.h:211
bool m_firstPaintEvent
Definition: dialog_shim.h:210
void ForceFocus(wxWindow *aWindow)
Pass the current focus to the window.
Definition: gtk/ui.cpp:44
void FixupCancelButtonCmdKeyCollision(wxWindow *aWindow)
Definition: gtk/ui.cpp:71
static void selectAllInTextCtrls(wxWindowList &children)

References KIPLATFORM::UI::FixupCancelButtonCmdKeyCollision(), KIPLATFORM::UI::ForceFocus(), DIALOG_SHIM::m_firstPaintEvent, DIALOG_SHIM::m_initialFocusTarget, and selectAllInTextCtrls().

Referenced by DIALOG_SHIM::DIALOG_SHIM().

◆ OnPopUpLayers()

void DIALOG_PLOT::OnPopUpLayers ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_PLOT_BASE.

Definition at line 283 of file dialog_plot.cpp.

284 {
285  // Build a list of layers for usual fabrication: copper layers + tech layers without courtyard
286  LSET fab_layer_set = ( LSET::AllCuMask() | LSET::AllTechMask() ) & ~LSET( 2, B_CrtYd, F_CrtYd );
287 
288  switch( event.GetId() )
289  {
290  case ID_LAYER_FAB: // Select layers usually needed to build a board
291  for( unsigned i = 0; i < m_layerList.size(); i++ )
292  {
293  LSET layermask( m_layerList[ i ] );
294 
295  if( ( layermask & fab_layer_set ).any() )
296  m_layerCheckListBox->Check( i, true );
297  else
298  m_layerCheckListBox->Check( i, false );
299  }
300  break;
301 
303  for( unsigned i = 0; i < m_layerList.size(); i++ )
304  {
305  if( IsCopperLayer( m_layerList[i] ) )
306  m_layerCheckListBox->Check( i, true );
307  }
308  break;
309 
311  for( unsigned i = 0; i < m_layerList.size(); i++ )
312  {
313  if( IsCopperLayer( m_layerList[i] ) )
314  m_layerCheckListBox->Check( i, false );
315  }
316  break;
317 
319  for( unsigned i = 0; i < m_layerList.size(); i++ )
320  m_layerCheckListBox->Check( i, true );
321  break;
322 
324  for( unsigned i = 0; i < m_layerList.size(); i++ )
325  m_layerCheckListBox->Check( i, false );
326  break;
327 
328  default:
329  break;
330  }
331 }
static LSET AllCuMask(int aCuLayerCount=MAX_CU_LAYERS)
Return a mask holding the requested number of Cu PCB_LAYER_IDs.
Definition: lset.cpp:750
LSEQ m_layerList
Definition: dialog_plot.h:70
static LSET AllTechMask()
Return a mask holding all technical layers (no CU layer) on both side.
Definition: lset.cpp:820
LSET is a set of PCB_LAYER_IDs.
Definition: layer_ids.h:504
bool IsCopperLayer(LAYER_NUM aLayerId)
Tests whether a layer is a copper layer.
Definition: layer_ids.h:796
wxCheckListBox * m_layerCheckListBox

References LSET::AllCuMask(), LSET::AllTechMask(), B_CrtYd, F_CrtYd, DIALOG_PLOT_BASE::ID_DESELECT_ALL_LAYERS, DIALOG_PLOT_BASE::ID_DESELECT_COPPER_LAYERS, DIALOG_PLOT_BASE::ID_LAYER_FAB, DIALOG_PLOT_BASE::ID_SELECT_ALL_LAYERS, DIALOG_PLOT_BASE::ID_SELECT_COPPER_LAYERS, IsCopperLayer(), DIALOG_PLOT_BASE::m_layerCheckListBox, and m_layerList.

◆ OnRightClick()

void DIALOG_PLOT::OnRightClick ( wxMouseEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_PLOT_BASE.

Definition at line 276 of file dialog_plot.cpp.

277 {
278  PopupMenu( m_popMenu );
279 }

References DIALOG_PLOT_BASE::m_popMenu.

◆ onRunDRC()

void DIALOG_PLOT::onRunDRC ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_PLOT_BASE.

Definition at line 933 of file dialog_plot.cpp.

934 {
935  PCB_EDIT_FRAME* parent = dynamic_cast<PCB_EDIT_FRAME*>( GetParent() );
936 
937  if( parent )
938  {
939  DRC_TOOL* drcTool = parent->GetToolManager()->GetTool<DRC_TOOL>();
940 
941  // First close an existing dialog if open
942  // (low probability, but can happen)
943  drcTool->DestroyDRCDialog();
944 
945  // Open a new drc dialod, with the right parent frame, and in Modal Mode
946  drcTool->ShowDRCDialog( this );
947 
948  // Update DRC warnings on return to this dialog
949  reInitDialog();
950  }
951 }
void ShowDRCDialog(wxWindow *aParent)
Opens the DRC dialog.
Definition: drc_tool.cpp:71
void reInitDialog()
The main frame for Pcbnew.
TOOL_MANAGER * GetToolManager() const
Return the MVC controller.
Definition: tools_holder.h:54
void DestroyDRCDialog()
Close and free the DRC dialog.
Definition: drc_tool.cpp:122

References DRC_TOOL::DestroyDRCDialog(), TOOL_MANAGER::GetTool(), TOOLS_HOLDER::GetToolManager(), reInitDialog(), and DRC_TOOL::ShowDRCDialog().

◆ OnSetScaleOpt()

void DIALOG_PLOT::OnSetScaleOpt ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_PLOT_BASE.

Definition at line 361 of file dialog_plot.cpp.

362 {
363  /* Disable sheet reference for scale != 1:1 */
364  bool scale1 = ( m_scaleOpt->GetSelection() == 1 );
365 
366  m_plotSheetRef->Enable( scale1 );
367 
368  if( !scale1 )
369  m_plotSheetRef->SetValue( false );
370 }
wxCheckBox * m_plotSheetRef
wxChoice * m_scaleOpt

References DIALOG_PLOT_BASE::m_plotSheetRef, and DIALOG_PLOT_BASE::m_scaleOpt.

Referenced by init_Dialog(), and SetPlotFormat().

◆ Plot()

void DIALOG_PLOT::Plot ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_PLOT_BASE.

Definition at line 785 of file dialog_plot.cpp.

786 {
787  BOARD* board = m_parent->GetBoard();
788 
790 
791  SETTINGS_MANAGER& mgr = Pgm().GetSettingsManager();
793 
795 
797 
798  // If no layer selected, we have nothing plotted.
799  // Prompt user if it happens because he could think there is a bug in Pcbnew.
800  if( !m_plotOpts.GetLayerSelection().any() )
801  {
802  DisplayError( this, _( "No layer selected, Nothing to plot" ) );
803  return;
804  }
805 
806  // Create output directory if it does not exist (also transform it in
807  // absolute form). Bail if it fails
809  wxFileName outputDir = wxFileName::DirName( path );
810  wxString boardFilename = m_parent->GetBoard()->GetFileName();
811  REPORTER& reporter = m_messagesPanel->Reporter();
812 
813  if( !EnsureFileDirectoryExists( &outputDir, boardFilename, &reporter ) )
814  {
815  wxString msg;
816  msg.Printf( _( "Could not write plot files to folder '%s'." ), outputDir.GetPath() );
817  DisplayError( this, msg );
818  return;
819  }
820 
821  if( m_zoneFillCheck->GetValue() )
822  m_parent->GetToolManager()->GetTool<ZONE_FILLER_TOOL>()->CheckAllZones( this );
823 
824  m_plotOpts.SetAutoScale( false );
825 
826  switch( m_plotOpts.GetScaleSelection() )
827  {
828  default: m_plotOpts.SetScale( 1 ); break;
829  case 0: m_plotOpts.SetAutoScale( true ); break;
830  case 2: m_plotOpts.SetScale( 1.5 ); break;
831  case 3: m_plotOpts.SetScale( 2 ); break;
832  case 4: m_plotOpts.SetScale( 3 ); break;
833  }
834 
835  /* If the scale factor edit controls are disabled or the scale value
836  * is 0, don't adjust the base scale factor. This fixes a bug when
837  * the default scale adjust is initialized to 0 and saved in program
838  * settings resulting in a divide by zero fault.
839  */
841  {
842  if( m_XScaleAdjust != 0.0 )
844 
845  if( m_YScaleAdjust != 0.0 )
847 
849  }
850 
851  wxString file_ext( GetDefaultPlotExtension( m_plotOpts.GetFormat() ) );
852 
853  // Test for a reasonable scale value
854  // XXX could this actually happen? isn't it constrained in the apply
855  // function?
857  DisplayInfoMessage( this, _( "Warning: Scale option set to a very small value" ) );
858 
860  DisplayInfoMessage( this, _( "Warning: Scale option set to a very large value" ) );
861 
862  GERBER_JOBFILE_WRITER jobfile_writer( board, &reporter );
863 
864  // Save the current plot options in the board
866 
867  wxBusyCursor dummy;
868 
869  for( LSEQ seq = m_plotOpts.GetLayerSelection().UIOrder(); seq; ++seq )
870  {
871  PCB_LAYER_ID layer = *seq;
872 
873  // All copper layers that are disabled are actually selected
874  // This is due to wonkyness in automatically selecting copper layers
875  // for plotting when adding more than two layers to a board.
876  // If plot options become accessible to the layers setup dialog
877  // please move this functionality there!
878  // This skips a copper layer if it is actually disabled on the board.
879  if( ( LSET::AllCuMask() & ~board->GetEnabledLayers() )[layer] )
880  continue;
881 
882  // Pick the basename from the board file
883  wxFileName fn( boardFilename );
884 
885  // Use Gerber Extensions based on layer number
886  // (See http://en.wikipedia.org/wiki/Gerber_File)
888  file_ext = GetGerberProtelExtension( layer );
889 
890  BuildPlotFileName( &fn, outputDir.GetPath(), board->GetLayerName( layer ), file_ext );
891  wxString fullname = fn.GetFullName();
892  jobfile_writer.AddGbrFile( layer, fullname );
893 
894  LOCALE_IO toggle;
895 
896  PLOTTER* plotter = StartPlotBoard( board, &m_plotOpts, layer, fn.GetFullPath(), wxEmptyString );
897 
898  // Print diags in messages box:
899  wxString msg;
900 
901  if( plotter )
902  {
903  PlotOneBoardLayer( board, plotter, layer, m_plotOpts );
904  plotter->EndPlot();
905  delete plotter->RenderSettings();
906  delete plotter;
907 
908  msg.Printf( _( "Plotted to '%s'." ), fn.GetFullPath() );
909  reporter.Report( msg, RPT_SEVERITY_ACTION );
910  }
911  else
912  {
913  msg.Printf( _( "Failed to create file '%s'." ), fn.GetFullPath() );
914  reporter.Report( msg, RPT_SEVERITY_ERROR );
915  }
916 
917  wxSafeYield(); // displays report message.
918  }
919 
921  {
922  // Pick the basename from the board file
923  wxFileName fn( boardFilename );
924  // Build gerber job file from basename
925  BuildPlotFileName( &fn, outputDir.GetPath(), "job", GerberJobFileExtension );
926  jobfile_writer.CreateJobFile( fn.GetFullPath() );
927  }
928 
929  reporter.ReportTail( _( "Done." ), RPT_SEVERITY_INFO );
930 }
static LSET AllCuMask(int aCuLayerCount=MAX_CU_LAYERS)
Return a mask holding the requested number of Cu PCB_LAYER_IDs.
Definition: lset.cpp:750
void DisplayError(wxWindow *aParent, const wxString &aText, int aDisplayTime)
Display an error or warning message box with aMessage.
Definition: confirm.cpp:279
WX_HTML_REPORT_PANEL * m_messagesPanel
double m_YScaleAdjust
Definition: dialog_plot.h:73
bool GetCreateGerberJobFile() const
wxCheckBox * m_useGerberExtensions
const wxString GetLayerName(PCB_LAYER_ID aLayer) const
Return the name of a aLayer.
Definition: board.cpp:362
Instantiate the current locale within a scope in which you are expecting exceptions to be thrown.
Definition: locale_io.h:40
wxString GetDefaultPlotExtension(PLOT_FORMAT aFormat)
Returns the default plot extension for a format.
void SetSketchPadLineWidth(int aWidth)
void PlotOneBoardLayer(BOARD *aBoard, PLOTTER *aPlotter, PCB_LAYER_ID aLayer, const PCB_PLOT_PARAMS &aPlotOpt)
Plot one copper or technical layer.
#define PLOT_MIN_SCALE
Definition: pcbplot.h:54
PLOTTER * StartPlotBoard(BOARD *aBoard, const PCB_PLOT_PARAMS *aPlotOpts, int aLayer, const wxString &aFullFileName, const wxString &aSheetDesc)
Open a new plotfile using the options (and especially the format) specified in the options and prepar...
virtual REPORTER & ReportTail(const wxString &aText, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED)
Places the report at the end of the list, for objects that support report ordering.
Definition: reporter.h:99
const wxString GetGerberProtelExtension(LAYER_NUM aLayer)
Definition: pcbplot.cpp:46
LSET GetEnabledLayers() const
A proxy function that calls the corresponding function in m_BoardSettings.
Definition: board.cpp:467
wxCheckBox * m_zoneFillCheck
const wxString ExpandEnvVarSubstitutions(const wxString &aString, PROJECT *aProject)
Replace any environment variable & text variable references with their values.
Definition: common.cpp:267
A pure virtual class used to derive REPORTER objects from.
Definition: reporter.h:70
KIWAY Kiway & Pgm(), KFCTL_STANDALONE
The global Program "get" accessor.
Definition: single_top.cpp:106
const wxString & GetFileName() const
Definition: board.h:228
BOARD_DESIGN_SETTINGS & GetDesignSettings() const
Definition: board.cpp:590
virtual REPORTER & Report(const wxString &aText, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED)=0
Report a string with a given severity.
double GetScale() const
double m_XScaleAdjust
Definition: dialog_plot.h:71
static LIB_SYMBOL * dummy()
Used to draw a dummy shape when a LIB_SYMBOL is not found in library.
Definition: sch_symbol.cpp:72
int GetLineThickness(PCB_LAYER_ID aLayer) const
Return the default graphic segment thickness from the layer class for the given layer.
virtual bool EndPlot()=0
Handle actions specific to filling copper zones.
GERBER_JOBFILE_WRITER is a class used to create Gerber job file a Gerber job file stores info to make...
PLOT_FORMAT GetFormat() const
PCB_EDIT_FRAME * m_parent
Definition: dialog_plot.h:69
void SetColorSettings(COLOR_SETTINGS *aSettings)
PLOT_FORMAT getPlotFormat()
PROJECT & Prj() const
Return a reference to the PROJECT associated with this KIWAY.
bool EnsureFileDirectoryExists(wxFileName *aTargetFullFileName, const wxString &aBaseFilename, REPORTER *aReporter)
Make aTargetFullFileName absolute and create the path of this file if it doesn't yet exist.
Definition: common.cpp:295
#define PLOT_MAX_SCALE
Definition: pcbplot.h:55
int m_PSWidthAdjust
Definition: dialog_plot.h:75
T * GetAppSettings(bool aLoadNow=true)
Returns a handle to the a given settings by type If the settings have already been loaded,...
const std::string GerberJobFileExtension
#define _(s)
virtual void SetPlotSettings(const PCB_PLOT_PARAMS &aSettings)
void SetScale(double aVal)
LSEQ is a sequence (and therefore also a set) of PCB_LAYER_IDs.
Definition: layer_ids.h:465
PCB_PLOT_PARAMS m_plotOpts
Definition: dialog_plot.h:87
wxString GetOutputDirectory() const
void SetFineScaleAdjustX(double aVal)
void BuildPlotFileName(wxFileName *aFilename, const wxString &aOutputDir, const wxString &aSuffix, const wxString &aExtension)
Complete a plot filename.
Definition: pcbplot.cpp:372
COLOR_SETTINGS * GetColorSettings(const wxString &aName="user")
Retrieves a color settings object that applications can read colors from.
Base plotter engine class.
Definition: plotter.h:121
RENDER_SETTINGS * RenderSettings()
Definition: plotter.h:156
void applyPlotSettings()
void SetWidthAdjust(int aVal)
Information pertinent to a Pcbnew printed circuit board.
Definition: board.h:190
PCB_LAYER_ID
A quick note on layer IDs:
Definition: layer_ids.h:65
void SetAutoScale(bool aFlag)
void SetFineScaleAdjustY(double aVal)
int GetScaleSelection() const
TOOL_MANAGER * GetToolManager() const
Return the MVC controller.
Definition: tools_holder.h:54
BOARD * GetBoard() const
LSET GetLayerSelection() const
LSEQ UIOrder() const
Definition: lset.cpp:895
void DisplayInfoMessage(wxWindow *aParent, const wxString &aMessage, const wxString &aExtraInfo)
Display an informational message box with aMessage.
Definition: confirm.cpp:307
wxString m_ColorTheme
Active color theme name.
Definition: app_settings.h:184

References _, GERBER_JOBFILE_WRITER::AddGbrFile(), LSET::AllCuMask(), applyPlotSettings(), BuildPlotFileName(), GERBER_JOBFILE_WRITER::CreateJobFile(), DisplayError(), DisplayInfoMessage(), dummy(), PLOTTER::EndPlot(), EnsureFileDirectoryExists(), ExpandEnvVarSubstitutions(), F_Fab, GERBER, GerberJobFileExtension, SETTINGS_MANAGER::GetAppSettings(), PCB_BASE_FRAME::GetBoard(), SETTINGS_MANAGER::GetColorSettings(), PCB_PLOT_PARAMS::GetCreateGerberJobFile(), GetDefaultPlotExtension(), BOARD::GetDesignSettings(), BOARD::GetEnabledLayers(), BOARD::GetFileName(), PCB_PLOT_PARAMS::GetFormat(), GetGerberProtelExtension(), BOARD::GetLayerName(), PCB_PLOT_PARAMS::GetLayerSelection(), BOARD_DESIGN_SETTINGS::GetLineThickness(), PCB_PLOT_PARAMS::GetOutputDirectory(), getPlotFormat(), PCB_PLOT_PARAMS::GetScale(), PCB_PLOT_PARAMS::GetScaleSelection(), TOOL_MANAGER::GetTool(), TOOLS_HOLDER::GetToolManager(), APP_SETTINGS_BASE::m_ColorTheme, DIALOG_PLOT_BASE::m_messagesPanel, m_parent, m_plotOpts, m_PSWidthAdjust, DIALOG_PLOT_BASE::m_useGerberExtensions, m_XScaleAdjust, m_YScaleAdjust, DIALOG_PLOT_BASE::m_zoneFillCheck, path, Pgm(), PLOT_MAX_SCALE, PLOT_MIN_SCALE, PlotOneBoardLayer(), POST, KIWAY_HOLDER::Prj(), PLOTTER::RenderSettings(), REPORTER::Report(), WX_HTML_REPORT_PANEL::Reporter(), REPORTER::ReportTail(), RPT_SEVERITY_ACTION, RPT_SEVERITY_ERROR, RPT_SEVERITY_INFO, PCB_PLOT_PARAMS::SetAutoScale(), PCB_PLOT_PARAMS::SetColorSettings(), PCB_PLOT_PARAMS::SetFineScaleAdjustX(), PCB_PLOT_PARAMS::SetFineScaleAdjustY(), PCB_BASE_FRAME::SetPlotSettings(), PCB_PLOT_PARAMS::SetScale(), PCB_PLOT_PARAMS::SetSketchPadLineWidth(), PCB_PLOT_PARAMS::SetWidthAdjust(), StartPlotBoard(), and LSET::UIOrder().

◆ Prj()

PROJECT & KIWAY_HOLDER::Prj ( ) const
inherited

Return a reference to the PROJECT associated with this KIWAY.

Definition at line 36 of file kiway_holder.cpp.

37 {
38  return Kiway().Prj();
39 }
KIWAY & Kiway() const
Return a reference to the KIWAY that this object has an opportunity to participate in.
Definition: kiway_holder.h:53
virtual PROJECT & Prj() const
Return the PROJECT associated with this KIWAY.
Definition: kiway.cpp:190

References KIWAY_HOLDER::Kiway(), and KIWAY::Prj().

Referenced by PCB_BASE_EDIT_FRAME::AddLibrary(), SYMBOL_LIBRARY_MANAGER::addLibrary(), SYMBOL_EDIT_FRAME::addLibTableEntry(), SCH_EDIT_FRAME::AppendSchematic(), AskSaveBoardFileName(), DIALOG_SYMBOL_REMAP::backupProject(), CVPCB_MAINFRAME::buildEquivalenceList(), CVPCB_MAINFRAME::BuildLibrariesListBox(), SIM_PLOT_FRAME::canCloseWindow(), PANEL_FP_PROPERTIES_3D_MODEL::Cfg3DPath(), KICAD_MANAGER_FRAME::CloseProject(), DIALOG_GEN_FOOTPRINT_POSITION::CreateAsciiFiles(), DIALOG_GEN_FOOTPRINT_POSITION::CreateGerberFiles(), PCB_BASE_EDIT_FRAME::createNewLibrary(), PCB_BASE_EDIT_FRAME::CreateNewProjectLibrary(), DIALOG_SYMBOL_REMAP::createProjectSymbolLibTable(), SCH_EDIT_FRAME::CreateScreens(), FOOTPRINT_EDIT_FRAME::DeleteFootprintFromLibrary(), DIALOG_ANNOTATE::DIALOG_ANNOTATE(), DIALOG_BOARD_REANNOTATE::DIALOG_BOARD_REANNOTATE(), DIALOG_BOARD_SETUP::DIALOG_BOARD_SETUP(), DIALOG_BOARD_STATISTICS::DIALOG_BOARD_STATISTICS(), DIALOG_CHANGE_SYMBOLS::DIALOG_CHANGE_SYMBOLS(), DIALOG_CHOOSE_FOOTPRINT::DIALOG_CHOOSE_FOOTPRINT(), DIALOG_CHOOSE_SYMBOL::DIALOG_CHOOSE_SYMBOL(), DIALOG_CONFIG_EQUFILES::DIALOG_CONFIG_EQUFILES(), DIALOG_EXCHANGE_FOOTPRINTS::DIALOG_EXCHANGE_FOOTPRINTS(), DIALOG_EXPORT_SVG::DIALOG_EXPORT_SVG(), DIALOG_GEN_FOOTPRINT_POSITION::DIALOG_GEN_FOOTPRINT_POSITION(), DIALOG_NETLIST::DIALOG_NETLIST(), DIALOG_PAGES_SETTINGS::DIALOG_PAGES_SETTINGS(), DIALOG_PLOT(), DIALOG_PLOT_SCHEMATIC::DIALOG_PLOT_SCHEMATIC(), DIALOG_SCHEMATIC_SETUP::DIALOG_SCHEMATIC_SETUP(), DIALOG_SYMBOL_REMAP::DIALOG_SYMBOL_REMAP(), DIALOG_UPDATE_FROM_PCB::DIALOG_UPDATE_FROM_PCB(), DIALOG_UPDATE_PCB::DIALOG_UPDATE_PCB(), PL_DRAW_PANEL_GAL::DisplayDrawingSheet(), FOOTPRINT_PREVIEW_PANEL::DisplayFootprint(), SYMBOL_VIEWER_FRAME::DisplayLibInfos(), CVPCB_MAINFRAME::DisplayStatus(), PCB_EDIT_FRAME::doAutoSave(), SCH_EDIT_FRAME::doAutoSave(), PCB_BASE_EDIT_FRAME::doCloseWindow(), FOOTPRINT_EDIT_FRAME::doCloseWindow(), SCH_EDIT_FRAME::doCloseWindow(), FIELDS_GRID_TRICKS::doPopupSelection(), FIELDS_EDITOR_GRID_TRICKS::doPopupSelection(), KICAD_MANAGER_CONTROL::Execute(), PCB_EDIT_FRAME::Export_IDF3(), PCB_EDIT_FRAME::ExportFootprintsToLibrary(), BOARD_EDITOR_CONTROL::ExportNetlist(), DIALOG_EXPORT_SVG::ExportSVGFile(), SYMBOL_EDITOR_CONTROL::ExportSymbolAsSVG(), SYMBOL_EDITOR_CONTROL::ExportView(), PCB_EDIT_FRAME::ExportVRML_File(), BACK_ANNOTATE::FetchNetlistFromPCB(), PCB_EDIT_FRAME::Files_io_from_id(), PCB_EDIT_FRAME::GenD356File(), DIALOG_GENDRILL::GenDrillAndMapFiles(), FOOTPRINT_VIEWER_FRAME::getCurFootprintName(), SYMBOL_EDIT_FRAME::GetCurLib(), FOOTPRINT_VIEWER_FRAME::getCurNickname(), SIM_PLOT_FRAME::getDefaultFilename(), SIM_PLOT_FRAME::getDefaultPath(), PCB_BASE_EDIT_FRAME::GetDesignRulesPath(), DISPLAY_FOOTPRINTS_FRAME::GetFootprint(), DIALOG_SYMBOL_REMAP::getLibsNotInGlobalSymbolLibTable(), SCH_BASE_FRAME::GetLibSymbol(), DIALOG_PLOT_SCHEMATIC::getOutputPath(), KICAD_MANAGER_FRAME::GetProjectFileName(), SCH_EDIT_FRAME::GetSchematicJunctionSize(), SYMBOL_VIEWER_FRAME::GetSelectedSymbol(), SCH_EDIT_FRAME::importFile(), SCH_EDITOR_CONTROL::ImportFPAssignments(), DIALOG_CONFIG_EQUFILES::Init(), FOOTPRINT_EDIT_FRAME::initLibraryTree(), SCH_EDIT_FRAME::KiwayMailIn(), SYMBOL_EDIT_FRAME::KiwayMailIn(), EDA_DRAW_FRAME::LibraryFileBrowser(), CVPCB_MAINFRAME::LoadFootprintFiles(), DIALOG_SPICE_MODEL::loadLibrary(), KICAD_MANAGER_FRAME::LoadProject(), SCH_EDIT_FRAME::LoadProject(), SCH_EDIT_FRAME::LoadProjectSettings(), PCB_EDIT_FRAME::LoadProjectSettings(), SIM_PLOT_FRAME::LoadSettings(), SCH_EDIT_FRAME::LoadSheetFromFile(), SYMBOL_EDIT_FRAME::LoadSymbolFromCurrentLib(), EDA_BASE_FRAME::LoadWindowState(), SIM_PLOT_FRAME::loadWorkbook(), SIM_PLOT_FRAME::menuSaveWorkbook(), SIM_PLOT_FRAME::menuSaveWorkbookAs(), PANEL_FP_PROPERTIES_3D_MODEL::On3DModelCellChanged(), FOOTPRINT_VIEWER_FRAME::OnActivate(), PANEL_FP_PROPERTIES_3D_MODEL::OnAdd3DModel(), DIALOG_BOARD_SETUP::OnAuxiliaryAction(), KICAD_MANAGER_FRAME::OnBrowseInFileExplorer(), TEXT_BUTTON_URL::OnButtonClick(), TEXT_BUTTON_FILE_BROWSER::OnButtonClick(), DIALOG_EDIT_SYMBOLS_LIBID::onClickOrphansButton(), DIALOG_EXPORT_STEP::onExportButton(), DIALOG_GENDRILL::OnGenReportFile(), KICAD_MANAGER_FRAME::OnIdle(), SCH_EDIT_FRAME::OnImportProject(), DIALOG_CHOOSE_SYMBOL::OnInitDialog(), DIALOG_CONFIG_EQUFILES::OnOkClick(), SCH_EDIT_FRAME::OnOpenCvpcb(), KICAD_MANAGER_FRAME::OnOpenFileInTextEditor(), DIALOG_NETLIST::OnOpenNetlistClick(), SCH_EDIT_FRAME::OnOpenPcbnew(), OnOutputDirectoryBrowseClicked(), DIALOG_EXPORT_SVG::OnOutputDirectoryBrowseClicked(), DIALOG_GEN_FOOTPRINT_POSITION::OnOutputDirectoryBrowseClicked(), DIALOG_GENDRILL::OnOutputDirectoryBrowseClicked(), DIALOG_PLOT_SCHEMATIC::OnOutputDirectoryBrowseClicked(), DIALOG_SCHEMATIC_SETUP::OnPageChange(), DIALOG_BOARD_SETUP::OnPageChange(), DIALOG_SYMBOL_REMAP::OnRemapSymbols(), FOOTPRINT_EDIT_FRAME::OnSaveFootprintAsPng(), DIALOG_ERC::OnSaveReport(), DIALOG_DRC::OnSaveReport(), DIALOG_TEXT_AND_LABEL_PROPERTIES::onScintillaCharAdded(), PROPERTIES_FRAME::onScintillaCharAdded(), DIALOG_SCH_FIELD_PROPERTIES::onScintillaCharAdded(), DIALOG_SPICE_MODEL::onSelectLibrary(), SYMBOL_VIEWER_FRAME::OnSelectSymbol(), KICAD_MANAGER_FRAME::OnUnarchiveFiles(), SCH_EDIT_FRAME::OnUpdatePCB(), PCB_EDIT_FRAME::OpenProjectFiles(), SCH_EDIT_FRAME::OpenProjectFiles(), PANEL_FP_PROPERTIES_3D_MODEL::PANEL_FP_PROPERTIES_3D_MODEL(), PANEL_PREVIEW_3D_MODEL::PANEL_PREVIEW_3D_MODEL(), SCH_EDITOR_CONTROL::Paste(), FOOTPRINT_EDITOR_CONTROL::PasteFootprint(), SCH_BASE_FRAME::PickSymbolFromLibTree(), Plot(), DIALOG_PLOT_SCHEMATIC::plotOneSheetDXF(), DIALOG_PLOT_SCHEMATIC::plotOneSheetHpgl(), DIALOG_CHOOSE_SYMBOL::PopulateFootprintSelector(), SCH_EDITOR_CONTROL::Print(), EDA_DRAW_FRAME::PrintDrawingSheet(), SCH_EDIT_FRAME::PrintPage(), KICAD_MANAGER_FRAME::PrintPrjInfo(), CVPCB_MAINFRAME::ReadNetListAndFpFiles(), PCB_EDIT_FRAME::RecreateCmpFileFromBoard(), FOOTPRINT_VIEWER_FRAME::ReCreateFootprintList(), SYMBOL_VIEWER_FRAME::ReCreateLibList(), FOOTPRINT_VIEWER_FRAME::ReCreateLibraryList(), SYMBOL_VIEWER_FRAME::ReCreateSymbolList(), PANEL_FP_PROPERTIES_3D_MODEL::ReloadModelsFromFootprint(), EDA_3D_VIEWER_FRAME::ReloadRequest(), DIALOG_SYMBOL_REMAP::remapSymbolToLibTable(), SYMBOL_EDIT_FRAME::replaceLibTableEntry(), SCH_EDITOR_CONTROL::RescueLegacyProject(), SCH_EDITOR_CONTROL::RescueSymbolLibTableProject(), FOOTPRINT_EDIT_FRAME::restoreLastFootprint(), FOOTPRINT_EDIT_FRAME::retainLastFootprint(), FOOTPRINT_EDITOR_CONTROL::SaveAs(), FOOTPRINT_EDIT_FRAME::SaveFootprint(), FOOTPRINT_EDIT_FRAME::SaveFootprintAs(), FOOTPRINT_EDIT_FRAME::SaveFootprintInLibrary(), SYMBOL_EDIT_FRAME::saveLibrary(), PCB_EDIT_FRAME::SavePcbFile(), SCH_EDIT_FRAME::SaveProject(), PCB_EDIT_FRAME::SaveProjectSettings(), DIALOG_BOARD_STATISTICS::saveReportClicked(), SCH_EDIT_FRAME::saveSchematicFile(), SIM_PLOT_FRAME::SaveSettings(), EDA_BASE_FRAME::SaveSettings(), SYMBOL_EDIT_FRAME::saveSymbolAs(), SCH_BASE_FRAME::saveSymbolLibTables(), SIM_PLOT_FRAME::saveWorkbook(), FOOTPRINT_VIEWER_FRAME::SelectAndViewFootprint(), PCB_BASE_FRAME::SelectLibrary(), SYMBOL_EDIT_FRAME::SelectLibraryFromList(), PCB_BASE_EDIT_FRAME::selectLibTable(), SYMBOL_EDIT_FRAME::selectSymLibTable(), FOOTPRINT_VIEWER_FRAME::setCurFootprintName(), SYMBOL_EDIT_FRAME::SetCurLib(), FOOTPRINT_VIEWER_FRAME::setCurNickname(), SYMBOL_EDIT_FRAME::SetCurSymbol(), GERBVIEW_FRAME::SetPageSettings(), EE_INSPECTION_TOOL::ShowDatasheet(), DIALOG_CHOOSE_SYMBOL::ShowFootprintFor(), COMMON_CONTROL::ShowHelp(), SYMBOL_VIEWER_FRAME::ShowModal(), FOOTPRINT_VIEWER_FRAME::ShowModal(), SCH_EDIT_FRAME::ShowSchematicSetupDialog(), SYMBOL_LIBRARY_MANAGER::symTable(), SYMBOL_TREE_SYNCHRONIZING_ADAPTER::Sync(), FOOTPRINT_EDIT_FRAME::SyncLibraryTree(), EDA_3D_VIEWER_FRAME::takeScreenshot(), PANEL_SETUP_RULES::TransferDataFromWindow(), DIALOG_SHEET_PROPERTIES::TransferDataFromWindow(), NETLIST_DIALOG::TransferDataFromWindow(), DIALOG_EDIT_SYMBOLS_LIBID::TransferDataFromWindow(), PANEL_SETUP_RULES::TransferDataToWindow(), SCH_EDIT_FRAME::updateAutoSaveFile(), DIALOG_PAGES_SETTINGS::UpdateDrawingSheetExample(), FOOTPRINT_VIEWER_FRAME::UpdateTitle(), SIM_PLOT_FRAME::updateTitle(), FOOTPRINT_EDIT_FRAME::UpdateTitle(), SCH_EDIT_FRAME::UpdateTitle(), PANEL_FP_PROPERTIES_3D_MODEL::validateModelExists(), SCH_EDIT_FRAME::WriteNetListFile(), DIALOG_FOOTPRINT_PROPERTIES::~DIALOG_FOOTPRINT_PROPERTIES(), PANEL_FP_PROPERTIES_3D_MODEL::~PANEL_FP_PROPERTIES_3D_MODEL(), and SCH_EDIT_FRAME::~SCH_EDIT_FRAME().

◆ reInitDialog()

void DIALOG_PLOT::reInitDialog ( )
private

Definition at line 228 of file dialog_plot.cpp.

229 {
230  // after calling the Drill or DRC dialogs some parameters can be modified....
231 
232  // Output directory
234 
235  // Origin of coordinates:
237 
238  int knownViolations = 0;
239  int exclusions = 0;
240 
241  for( PCB_MARKER* marker : m_parent->GetBoard()->Markers() )
242  {
243  if( marker->IsExcluded() )
244  exclusions++;
245  else
246  knownViolations++;
247  }
248 
249  if( knownViolations || exclusions )
250  {
251  m_DRCExclusionsWarning->SetLabel( wxString::Format( m_DRCWarningTemplate, knownViolations,
252  exclusions ) );
253  m_DRCExclusionsWarning->Show();
254  }
255  else
256  {
257  m_DRCExclusionsWarning->Hide();
258  }
259 
260  BOARD* board = m_parent->GetBoard();
261  const BOARD_DESIGN_SETTINGS& brd_settings = board->GetDesignSettings();
262 
264  ( brd_settings.m_SolderMaskMargin || brd_settings.m_SolderMaskMinWidth ) )
265  {
267  }
268  else
269  {
271  }
272 }
MARKERS & Markers()
Definition: board.h:242
BOARD_DESIGN_SETTINGS & GetDesignSettings() const
Definition: board.cpp:590
wxBoxSizer * m_SizerSolderMaskAlert
PCB_EDIT_FRAME * m_parent
Definition: dialog_plot.h:69
PLOT_FORMAT getPlotFormat()
wxTextCtrl * m_outputDirectoryName
PCB_PLOT_PARAMS m_plotOpts
Definition: dialog_plot.h:87
wxString GetOutputDirectory() const
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, const CPTREE &aTree)
Output a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
Definition: ptree.cpp:200
wxString m_DRCWarningTemplate
Definition: dialog_plot.h:85
Information pertinent to a Pcbnew printed circuit board.
Definition: board.h:190
wxCheckBox * m_useAuxOriginCheckBox
BOARD * GetBoard() const
bool GetUseAuxOrigin() const
wxBoxSizer * m_PlotOptionsSizer
wxStaticText * m_DRCExclusionsWarning
Container for design settings for a BOARD object.

References Format(), GERBER, PCB_BASE_FRAME::GetBoard(), BOARD::GetDesignSettings(), PCB_PLOT_PARAMS::GetOutputDirectory(), getPlotFormat(), PCB_PLOT_PARAMS::GetUseAuxOrigin(), DIALOG_PLOT_BASE::m_DRCExclusionsWarning, m_DRCWarningTemplate, DIALOG_PLOT_BASE::m_outputDirectoryName, m_parent, DIALOG_PLOT_BASE::m_PlotOptionsSizer, m_plotOpts, DIALOG_PLOT_BASE::m_SizerSolderMaskAlert, BOARD_DESIGN_SETTINGS::m_SolderMaskMargin, BOARD_DESIGN_SETTINGS::m_SolderMaskMinWidth, DIALOG_PLOT_BASE::m_useAuxOriginCheckBox, and BOARD::Markers().

Referenced by CreateDrillFile(), init_Dialog(), onBoardSetup(), and onRunDRC().

◆ resetSize()

void DIALOG_SHIM::resetSize ( )
protectedinherited

Clear the existing dialog size and position.

This will cause the dialog size to be clear so the next time the dialog is shown the sizers will layout the dialog accordingly. This useful when there are dialog windows that size changes due to layout dependency hidden controls.

Definition at line 287 of file dialog_shim.cpp.

288 {
289  const char* hash_key;
290 
291  if( m_hash_key.size() )
292  {
293  // a special case like EDA_LIST_DIALOG, which has multiple uses.
294  hash_key = m_hash_key.c_str();
295  }
296  else
297  {
298  hash_key = typeid(*this).name();
299  }
300 
301  std::unordered_map<std::string, wxRect>::iterator it = class_map.find( hash_key );
302 
303  if( it == class_map.end() )
304  return;
305 
306  wxRect rect = it->second;
307  rect.SetSize( wxSize( 0, 0 ) );
308  class_map[ hash_key ] = rect;
309 }
std::string m_hash_key
Definition: dialog_shim.h:201
static std::unordered_map< std::string, wxRect > class_map

References class_map, and DIALOG_SHIM::m_hash_key.

Referenced by DIALOG_LIB_SYMBOL_PROPERTIES::DIALOG_LIB_SYMBOL_PROPERTIES().

◆ SetInitialFocus()

void DIALOG_SHIM::SetInitialFocus ( wxWindow *  aWindow)
inlineinherited

Sets the window (usually a wxTextCtrl) that should be focused when the dialog is shown.

Definition at line 97 of file dialog_shim.h.

98  {
99  m_initialFocusTarget = aWindow;
100  }
wxWindow * m_initialFocusTarget
Definition: dialog_shim.h:211

References DIALOG_SHIM::m_initialFocusTarget.

Referenced by DIALOG_BOM::DIALOG_BOM(), DIALOG_CHOOSE_FOOTPRINT::DIALOG_CHOOSE_FOOTPRINT(), DIALOG_CHOOSE_SYMBOL::DIALOG_CHOOSE_SYMBOL(), DIALOG_CONFIGURE_PATHS::DIALOG_CONFIGURE_PATHS(), DIALOG_FIND::DIALOG_FIND(), DIALOG_FOOTPRINT_PROPERTIES::DIALOG_FOOTPRINT_PROPERTIES(), DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR(), DIALOG_FP_PLUGIN_OPTIONS::DIALOG_FP_PLUGIN_OPTIONS(), DIALOG_GRAPHIC_ITEM_PROPERTIES::DIALOG_GRAPHIC_ITEM_PROPERTIES(), DIALOG_GRID_SETTINGS::DIALOG_GRID_SETTINGS(), DIALOG_GROUP_PROPERTIES::DIALOG_GROUP_PROPERTIES(), DIALOG_IMPORT_GFX::DIALOG_IMPORT_GFX(), DIALOG_JUNCTION_PROPS::DIALOG_JUNCTION_PROPS(), DIALOG_LIB_SHAPE_PROPERTIES::DIALOG_LIB_SHAPE_PROPERTIES(), DIALOG_LIB_TEXT_PROPERTIES::DIALOG_LIB_TEXT_PROPERTIES(), DIALOG_LINE_WIRE_BUS_PROPERTIES::DIALOG_LINE_WIRE_BUS_PROPERTIES(), DIALOG_PAD_PRIMITIVES_PROPERTIES::DIALOG_PAD_PRIMITIVES_PROPERTIES(), DIALOG_PAD_PROPERTIES::DIALOG_PAD_PROPERTIES(), DIALOG_PIN_PROPERTIES::DIALOG_PIN_PROPERTIES(), DIALOG_POSITION_RELATIVE::DIALOG_POSITION_RELATIVE(), DIALOG_SCH_FIND::DIALOG_SCH_FIND(), DIALOG_SHEET_PIN_PROPERTIES::DIALOG_SHEET_PIN_PROPERTIES(), DIALOG_SYMBOL_FIELDS_TABLE::DIALOG_SYMBOL_FIELDS_TABLE(), DIALOG_TARGET_PROPERTIES::DIALOG_TARGET_PROPERTIES(), DIALOG_TEXT_AND_LABEL_PROPERTIES::DIALOG_TEXT_AND_LABEL_PROPERTIES(), DIALOG_TEXT_PROPERTIES::DIALOG_TEXT_PROPERTIES(), DIALOG_TRACK_VIA_PROPERTIES::DIALOG_TRACK_VIA_PROPERTIES(), EDA_VIEW_SWITCHER::EDA_VIEW_SWITCHER(), HK_PROMPT_DIALOG::HK_PROMPT_DIALOG(), DIALOG_FIELD_PROPERTIES::init(), DIALOG_EXCHANGE_FOOTPRINTS::OnMatchAllClicked(), DIALOG_EXCHANGE_FOOTPRINTS::OnMatchIDClicked(), DIALOG_EXCHANGE_FOOTPRINTS::OnMatchRefClicked(), DIALOG_EXCHANGE_FOOTPRINTS::OnMatchSelectedClicked(), DIALOG_EXCHANGE_FOOTPRINTS::OnMatchValueClicked(), PANEL_FP_LIB_TABLE::PANEL_FP_LIB_TABLE(), PANEL_SYM_LIB_TABLE::PANEL_SYM_LIB_TABLE(), FOOTPRINT_EDIT_FRAME::SaveFootprintAs(), SYMBOL_EDIT_FRAME::saveSymbolAs(), DIALOG_NON_COPPER_ZONES_EDITOR::TransferDataToWindow(), DIALOG_RULE_AREA_PROPERTIES::TransferDataToWindow(), DIALOG_COPPER_ZONE::TransferDataToWindow(), and WX_TEXT_ENTRY_DIALOG::WX_TEXT_ENTRY_DIALOG().

◆ SetKiway()

void KIWAY_HOLDER::SetKiway ( wxWindow *  aDest,
KIWAY aKiway 
)
inherited

It is only used for debugging, since "this" is not a wxWindow*.

"this" is a KIWAY_HOLDER mix-in.

Parameters
aDestis the recipient of aKiway pointer.
aKiwayis often from a parent window or from KIFACE::CreateWindow().

Definition at line 43 of file kiway_holder.cpp.

44 {
45 #if defined(DEBUG)
46  // offer a trap point for debugging most any window
47  wxASSERT( aDest );
48  if( !strcmp( typeid(aDest).name(), "DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB" ) )
49  {
50  int breakhere=1;
51  ignore_unused( breakhere );
52  }
53 #endif
54 
55  ignore_unused( aDest );
56 
57  m_kiway = aKiway;
58 }
KIWAY * m_kiway
Definition: kiway_holder.h:75
const char * name
Definition: DXF_plotter.cpp:56
void ignore_unused(const T &)
Definition: ignore.h:24

References ignore_unused(), KIWAY_HOLDER::m_kiway, and name.

Referenced by BM2CMP_FRAME::BM2CMP_FRAME(), PCB::IFACE::CreateWindow(), InvokePcbLibTableEditor(), InvokeSchEditSymbolLibTable(), PCB_CALCULATOR_FRAME::PCB_CALCULATOR_FRAME(), and SIM_PLOT_FRAME::SIM_PLOT_FRAME().

◆ SetPlotFormat()

void DIALOG_PLOT::SetPlotFormat ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_PLOT_BASE.

Definition at line 426 of file dialog_plot.cpp.

427 {
428  // this option exist only in DXF format:
430 
431  // The alert message about non 0 solder mask min width and margin is shown
432  // only in gerber format and if min mask width or mask margin is not 0
433  BOARD* board = m_parent->GetBoard();
434  const BOARD_DESIGN_SETTINGS& brd_settings = board->GetDesignSettings();
435 
437  && ( brd_settings.m_SolderMaskMargin || brd_settings.m_SolderMaskMinWidth ) )
438  {
440  }
441  else
442  {
444  }
445 
446 
447  switch( getPlotFormat() )
448  {
449  case PLOT_FORMAT::SVG:
450  case PLOT_FORMAT::PDF:
451  m_drillShapeOpt->Enable( true );
452  m_plotModeOpt->Enable( false );
454  m_plotMirrorOpt->Enable( true );
455  m_useAuxOriginCheckBox->Enable( false );
456  m_useAuxOriginCheckBox->SetValue( false );
457  m_defaultPenSize.Enable( false );
458  m_includeEdgeLayerOpt->Enable( true );
459  m_scaleOpt->Enable( false );
460  m_scaleOpt->SetSelection( 1 );
461  m_fineAdjustXCtrl->Enable( false );
462  m_fineAdjustYCtrl->Enable( false );
464  m_plotPSNegativeOpt->Enable( true );
465  m_forcePSA4OutputOpt->Enable( false );
466  m_forcePSA4OutputOpt->SetValue( false );
467 
470  else
472 
477  break;
478 
479  case PLOT_FORMAT::POST:
480  m_drillShapeOpt->Enable( true );
481  m_plotModeOpt->Enable( true );
482  m_plotMirrorOpt->Enable( true );
483  m_useAuxOriginCheckBox->Enable( false );
484  m_useAuxOriginCheckBox->SetValue( false );
485  m_defaultPenSize.Enable( false );
486  m_includeEdgeLayerOpt->Enable( true );
487  m_scaleOpt->Enable( true );
488  m_fineAdjustXCtrl->Enable( true );
489  m_fineAdjustYCtrl->Enable( true );
491  m_plotPSNegativeOpt->Enable( true );
492  m_forcePSA4OutputOpt->Enable( true );
493 
499  break;
500 
501  case PLOT_FORMAT::GERBER:
502  m_drillShapeOpt->Enable( false );
503  m_drillShapeOpt->SetSelection( 0 );
504  m_plotModeOpt->Enable( false );
506  m_plotMirrorOpt->Enable( false );
507  m_plotMirrorOpt->SetValue( false );
508  m_useAuxOriginCheckBox->Enable( true );
509  m_defaultPenSize.Enable( false );
510  m_includeEdgeLayerOpt->Enable( true );
511  m_scaleOpt->Enable( false );
512  m_scaleOpt->SetSelection( 1 );
513  m_fineAdjustXCtrl->Enable( false );
514  m_fineAdjustYCtrl->Enable( false );
516  m_plotPSNegativeOpt->Enable( false );
517  m_plotPSNegativeOpt->SetValue( false );
518  m_forcePSA4OutputOpt->Enable( false );
519  m_forcePSA4OutputOpt->SetValue( false );
520 
526  break;
527 
528  case PLOT_FORMAT::HPGL:
529  m_drillShapeOpt->Enable( true );
530  m_plotModeOpt->Enable( true );
531  m_plotMirrorOpt->Enable( true );
532  m_useAuxOriginCheckBox->Enable( false );
533  m_useAuxOriginCheckBox->SetValue( false );
534  m_defaultPenSize.Enable( true );
535  m_includeEdgeLayerOpt->Enable( true );
536  m_scaleOpt->Enable( true );
537  m_fineAdjustXCtrl->Enable( false );
538  m_fineAdjustYCtrl->Enable( false );
540  m_plotPSNegativeOpt->SetValue( false );
541  m_plotPSNegativeOpt->Enable( false );
542  m_forcePSA4OutputOpt->Enable( true );
543 
549  break;
550 
551  case PLOT_FORMAT::DXF:
552  m_drillShapeOpt->Enable( true );
553  m_plotModeOpt->Enable( false );
555  m_plotMirrorOpt->Enable( false );
556  m_plotMirrorOpt->SetValue( false );
557  m_useAuxOriginCheckBox->Enable( true );
558  m_defaultPenSize.Enable( false );
559  m_includeEdgeLayerOpt->Enable( true );
560  m_scaleOpt->Enable( false );
561  m_scaleOpt->SetSelection( 1 );
562  m_fineAdjustXCtrl->Enable( false );
563  m_fineAdjustYCtrl->Enable( false );
565  m_plotPSNegativeOpt->Enable( false );
566  m_plotPSNegativeOpt->SetValue( false );
567  m_forcePSA4OutputOpt->Enable( false );
568  m_forcePSA4OutputOpt->SetValue( false );
569 
575 
576  OnChangeDXFPlotMode( event );
577  break;
578 
580  break;
581  }
582 
583  /* Update the interlock between scale and frame reference
584  * (scaling would mess up the frame border...) */
585  OnSetScaleOpt( event );
586 
587  Layout();
588  m_MainSizer->SetSizeHints( this );
589 }
wxStaticBoxSizer * m_HPGLOptionsSizer
wxCheckBox * m_includeEdgeLayerOpt
void OnChangeDXFPlotMode(wxCommandEvent &event) override
wxCheckBox * m_plotPSNegativeOpt
wxCheckBox * m_plotMirrorOpt
BOARD_DESIGN_SETTINGS & GetDesignSettings() const
Definition: board.cpp:590
wxStaticBoxSizer * m_SizerDXF_options
UNIT_BINDER m_trackWidthCorrection
Definition: dialog_plot.h:83
wxTextCtrl * m_fineAdjustYCtrl
wxCheckBox * m_DXF_plotModeOpt
wxBoxSizer * m_SizerSolderMaskAlert
wxTextCtrl * m_fineAdjustXCtrl
PCB_EDIT_FRAME * m_parent
Definition: dialog_plot.h:69
PLOT_FORMAT getPlotFormat()
wxCheckBox * m_forcePSA4OutputOpt
void setPlotModeChoiceSelection(OUTLINE_MODE aPlotMode)
Definition: dialog_plot.h:64
void OnSetScaleOpt(wxCommandEvent &event) override
wxStaticBoxSizer * m_GerberOptionsSizer
wxChoice * m_scaleOpt
wxChoice * m_drillShapeOpt
Information pertinent to a Pcbnew printed circuit board.
Definition: board.h:190
wxCheckBox * m_useAuxOriginCheckBox
wxChoice * m_plotModeOpt
UNIT_BINDER m_defaultPenSize
Definition: dialog_plot.h:82
wxBoxSizer * m_MainSizer
wxStaticBoxSizer * m_svgOptionsSizer
BOARD * GetBoard() const
wxStaticBoxSizer * m_PSOptionsSizer
wxBoxSizer * m_PlotOptionsSizer
void Enable(bool aEnable)
Enable/disable the label, widget and units label.
Container for design settings for a BOARD object.

References DXF, UNIT_BINDER::Enable(), FILLED, GERBER, PCB_BASE_FRAME::GetBoard(), BOARD::GetDesignSettings(), getPlotFormat(), HPGL, m_defaultPenSize, DIALOG_PLOT_BASE::m_drillShapeOpt, DIALOG_PLOT_BASE::m_DXF_plotModeOpt, DIALOG_PLOT_BASE::m_fineAdjustXCtrl, DIALOG_PLOT_BASE::m_fineAdjustYCtrl, DIALOG_PLOT_BASE::m_forcePSA4OutputOpt, DIALOG_PLOT_BASE::m_GerberOptionsSizer, DIALOG_PLOT_BASE::m_HPGLOptionsSizer, DIALOG_PLOT_BASE::m_includeEdgeLayerOpt, DIALOG_PLOT_BASE::m_MainSizer, m_parent, DIALOG_PLOT_BASE::m_plotMirrorOpt, DIALOG_PLOT_BASE::m_plotModeOpt, DIALOG_PLOT_BASE::m_PlotOptionsSizer, DIALOG_PLOT_BASE::m_plotPSNegativeOpt, DIALOG_PLOT_BASE::m_PSOptionsSizer, DIALOG_PLOT_BASE::m_scaleOpt, DIALOG_PLOT_BASE::m_SizerDXF_options, DIALOG_PLOT_BASE::m_SizerSolderMaskAlert, BOARD_DESIGN_SETTINGS::m_SolderMaskMargin, BOARD_DESIGN_SETTINGS::m_SolderMaskMinWidth, DIALOG_PLOT_BASE::m_svgOptionsSizer, m_trackWidthCorrection, DIALOG_PLOT_BASE::m_useAuxOriginCheckBox, OnChangeDXFPlotMode(), OnSetScaleOpt(), PDF, POST, setPlotModeChoiceSelection(), SVG, and UNDEFINED.

Referenced by init_Dialog().

◆ setPlotModeChoiceSelection()

void DIALOG_PLOT::setPlotModeChoiceSelection ( OUTLINE_MODE  aPlotMode)
inlineprivate

Definition at line 64 of file dialog_plot.h.

65  {
66  m_plotModeOpt->SetSelection( aPlotMode == SKETCH ? 1 : 0 );
67  }
wxChoice * m_plotModeOpt

References DIALOG_PLOT_BASE::m_plotModeOpt, and SKETCH.

Referenced by init_Dialog(), and SetPlotFormat().

◆ SetPosition()

void DIALOG_SHIM::SetPosition ( const wxPoint &  aNewPosition)
inherited

Force the position of the dialog to a new position.

Parameters
aNewPositionis the new forced position

Definition at line 190 of file dialog_shim.cpp.

191 {
192  wxDialog::SetPosition( aNewPosition );
193 
194  // Now update the stored position:
195  const char* hash_key;
196 
197  if( m_hash_key.size() )
198  {
199  // a special case like EDA_LIST_DIALOG, which has multiple uses.
200  hash_key = m_hash_key.c_str();
201  }
202  else
203  {
204  hash_key = typeid(*this).name();
205  }
206 
207  std::unordered_map<std::string, wxRect>::iterator it = class_map.find( hash_key );
208 
209  if( it == class_map.end() )
210  return;
211 
212  wxRect rect = it->second;
213  rect.SetPosition( aNewPosition );
214 
215  class_map[ hash_key ] = rect;
216 }
std::string m_hash_key
Definition: dialog_shim.h:201
static std::unordered_map< std::string, wxRect > class_map
void SetPosition(const wxString &aStr, const wxString &aDefaultMeasurementUnit, int *aX, int *aY, const wxString &aActualConversion)

References class_map, DIALOG_SHIM::m_hash_key, and PCAD2KICAD::SetPosition().

Referenced by PCB_BASE_FRAME::SelectOneLayer().

◆ setSizeInDU()

void DIALOG_SHIM::setSizeInDU ( int  x,
int  y 
)
protectedinherited

Set the dialog to the given dimensions in "dialog units".

These are units equivalent to 4* the average character width and 8* the average character height, allowing a dialog to be sized in a way that scales it with the system font.

Definition at line 162 of file dialog_shim.cpp.

163 {
164  wxSize sz( x, y );
165  SetSize( ConvertDialogToPixels( sz ) );
166 }

Referenced by DIALOG_RESCUE_EACH::DIALOG_RESCUE_EACH(), HTML_MESSAGE_BOX::HTML_MESSAGE_BOX(), and HTML_MESSAGE_BOX::SetDialogSizeInDU().

◆ Show()

bool DIALOG_SHIM::Show ( bool  show)
overrideinherited

Definition at line 219 of file dialog_shim.cpp.

220 {
221  bool ret;
222  const char* hash_key;
223 
224  if( m_hash_key.size() )
225  {
226  // a special case like EDA_LIST_DIALOG, which has multiple uses.
227  hash_key = m_hash_key.c_str();
228  }
229  else
230  {
231  hash_key = typeid(*this).name();
232  }
233 
234  // Show or hide the window. If hiding, save current position and size.
235  // If showing, use previous position and size.
236  if( show )
237  {
238 #ifndef __WINDOWS__
239  wxDialog::Raise(); // Needed on OS X and some other window managers (i.e. Unity)
240 #endif
241  ret = wxDialog::Show( show );
242 
243  // classname is key, returns a zeroed out default EDA_RECT if none existed before.
244  wxRect savedDialogRect = class_map[ hash_key ];
245 
246  if( savedDialogRect.GetSize().x != 0 && savedDialogRect.GetSize().y != 0 )
247  {
248  if( m_useCalculatedSize )
249  {
250  SetSize( savedDialogRect.GetPosition().x, savedDialogRect.GetPosition().y,
251  wxDialog::GetSize().x, wxDialog::GetSize().y, 0 );
252  }
253  else
254  {
255  SetSize( savedDialogRect.GetPosition().x, savedDialogRect.GetPosition().y,
256  std::max( wxDialog::GetSize().x, savedDialogRect.GetSize().x ),
257  std::max( wxDialog::GetSize().y, savedDialogRect.GetSize().y ),
258  0 );
259  }
260  }
261  else if( m_initialSize != wxDefaultSize )
262  SetSize( m_initialSize );
263 
264  // Be sure that the dialog appears in a visible area
265  // (the dialog position might have been stored at the time when it was
266  // shown on another display)
267  if( wxDisplay::GetFromWindow( this ) == wxNOT_FOUND )
268  Centre();
269  }
270  else
271  {
272  // Save the dialog's position & size before hiding, using classname as key
273  class_map[ hash_key ] = wxRect( wxDialog::GetPosition(), wxDialog::GetSize() );
274 
275 #ifdef __WXMAC__
276  if ( m_eventLoop )
277  m_eventLoop->Exit( GetReturnCode() ); // Needed for APP-MODAL dlgs on OSX
278 #endif
279 
280  ret = wxDialog::Show( show );
281  }
282 
283  return ret;
284 }
std::string m_hash_key
Definition: dialog_shim.h:201
static std::unordered_map< std::string, wxRect > class_map
bool m_useCalculatedSize
Definition: dialog_shim.h:205
wxSize m_initialSize
Definition: dialog_shim.h:223

References class_map, DIALOG_SHIM::m_hash_key, DIALOG_SHIM::m_initialSize, and DIALOG_SHIM::m_useCalculatedSize.

Referenced by FOOTPRINT_EDITOR_CONTROL::CheckFootprint(), DRC_TOOL::CrossProbe(), DIALOG_SHIM::EndQuasiModal(), GROUP_TOOL::GroupProperties(), EE_INSPECTION_TOOL::NextMarker(), DRC_TOOL::NextMarker(), SCH_EDIT_FRAME::OnAnnotate(), DIALOG_DRC::OnDRCItemDClick(), DIALOG_ERC::OnERCItemDClick(), DIALOG_CLEANUP_GRAPHICS::OnLeftDClickItem(), DIALOG_CLEANUP_TRACKS_AND_VIAS::OnLeftDClickItem(), DIALOG_FOOTPRINT_CHECKER::OnLeftDClickItem(), GROUP_TOOL::PickNewMember(), POSITION_RELATIVE_TOOL::PositionRelative(), EE_INSPECTION_TOOL::PrevMarker(), DRC_TOOL::PrevMarker(), CVPCB_MAINFRAME::ReadNetListAndFpFiles(), EDA_VIEW_SWITCHER::Show(), DIALOG_PAD_PROPERTIES::Show(), DRC_TOOL::ShowDRCDialog(), EE_INSPECTION_TOOL::ShowERCDialog(), SCH_EDIT_FRAME::ShowFindReplaceDialog(), HTML_MESSAGE_BOX::ShowModeless(), DIALOG_SHIM::ShowQuasiModal(), DIALOG_POSITION_RELATIVE::UpdateAnchor(), and SCH_EDIT_FRAME::UpdateHierarchyNavigator().

◆ ShowQuasiModal()

int DIALOG_SHIM::ShowQuasiModal ( )
inherited

Definition at line 430 of file dialog_shim.cpp.

431 {
432  // This is an exception safe way to zero a pointer before returning.
433  // Yes, even though DismissModal() clears this first normally, this is
434  // here in case there's an exception before the dialog is dismissed.
435  struct NULLER
436  {
437  void*& m_what;
438  NULLER( void*& aPtr ) : m_what( aPtr ) {}
439  ~NULLER() { m_what = nullptr; } // indeed, set it to NULL on destruction
440  } clear_this( (void*&) m_qmodal_loop );
441 
442  // release the mouse if it's currently captured as the window having it
443  // will be disabled when this dialog is shown -- but will still keep the
444  // capture making it impossible to do anything in the modal dialog itself
445  wxWindow* win = wxWindow::GetCapture();
446  if( win )
447  win->ReleaseMouse();
448 
449  // Get the optimal parent
450  wxWindow* parent = GetParentForModalDialog( GetParent(), GetWindowStyle() );
451 
452  wxASSERT_MSG( !m_qmodal_parent_disabler,
453  wxT( "Caller using ShowQuasiModal() twice on same window?" ) );
454 
455  // quasi-modal: disable only my "optimal" parent
457 
458  // Apple in its infinite wisdom will raise a disabled window before even passing
459  // us the event, so we have no way to stop it. Instead, we must set an order on
460  // the windows so that the quasi-modal will be pushed in front of the disabled
461  // window when it is raised.
463 
464  Show( true );
465 
466  m_qmodal_showing = true;
467 
468  WX_EVENT_LOOP event_loop;
469 
470  m_qmodal_loop = &event_loop;
471 
472  event_loop.Run();
473 
474  m_qmodal_showing = false;
475 
476  return GetReturnCode();
477 }
bool m_qmodal_showing
Definition: dialog_shim.h:215
#define WX_EVENT_LOOP
Definition: kiway_player.h:41
WX_EVENT_LOOP * m_qmodal_loop
Definition: dialog_shim.h:213
bool Show(bool show) override
WDO_ENABLE_DISABLE * m_qmodal_parent_disabler
Definition: dialog_shim.h:216
Toggle a window's "enable" status to disabled, then enabled on destruction.
Definition: dialog_shim.cpp:44
void ReparentQuasiModal(wxNonOwnedWindow *aWindow)
Move a window's parent to be the top-level window and force the window to be on top.
Definition: gtk/ui.cpp:65

References DIALOG_SHIM::m_qmodal_loop, DIALOG_SHIM::m_qmodal_parent_disabler, DIALOG_SHIM::m_qmodal_showing, KIPLATFORM::UI::ReparentQuasiModal(), DIALOG_SHIM::Show(), and WX_EVENT_LOOP.

Referenced by SCH_EDIT_TOOL::ChangeSymbols(), S3D::Configure3DPaths(), COMMON_CONTROL::ConfigurePaths(), MICROWAVE_TOOL::createFootprint(), MICROWAVE_TOOL::createMicrowaveInductor(), SCH_DRAWING_TOOLS::createNewText(), SYMBOL_EDITOR_EDIT_TOOL::editFieldProperties(), SCH_EDIT_TOOL::editFieldText(), SCH_EDITOR_CONTROL::EditSymbolFields(), SYMBOL_EDITOR_EDIT_TOOL::editSymbolProperties(), GLOBAL_EDIT_TOOL::EditTracksAndVias(), GLOBAL_EDIT_TOOL::ExchangeFootprints(), InvokeCopperZonesEditor(), InvokeDialogCreateBOM(), InvokeDialogEditSymbolsLibId(), InvokeDialogRescueEach(), InvokeNonCopperZonesEditor(), SYMBOL_VIEWER_FRAME::OnSelectSymbol(), SCH_EDIT_FRAME::OpenProjectFiles(), SCH_EDIT_TOOL::Properties(), EDIT_TOOL::Properties(), SCH_EDITOR_CONTROL::RemapSymbols(), S3D::Select3DModel(), PCB_BASE_FRAME::SelectFootprintFromLibTree(), PCB_EDIT_FRAME::ShowBoardSetupDialog(), PCB_EDIT_FRAME::ShowDimensionPropertiesDialog(), PCB_EDIT_FRAME::ShowExchangeFootprintsDialog(), PCB_EDIT_FRAME::ShowFootprintPropertiesDialog(), PCB_BASE_EDIT_FRAME::ShowGraphicItemPropertiesDialog(), PCB_BASE_FRAME::ShowPadPropertiesDialog(), SCH_EDIT_FRAME::ShowSchematicSetupDialog(), and PCB_BASE_EDIT_FRAME::ShowTextPropertiesDialog().

◆ vertPixelsFromDU()

int DIALOG_SHIM::vertPixelsFromDU ( int  y) const
protectedinherited

Convert an integer number of dialog units to pixels, vertically.

See SetSizeInDU or wxDialog documentation for more information.

Definition at line 176 of file dialog_shim.cpp.

177 {
178  wxSize sz( 0, y );
179  return ConvertDialogToPixels( sz ).y;
180 }

Referenced by DIALOG_CHOOSE_SYMBOL::DIALOG_CHOOSE_SYMBOL().

Member Data Documentation

◆ coordFormatLabel

wxStaticText* DIALOG_PLOT_BASE::coordFormatLabel
protectedinherited

Definition at line 98 of file dialog_plot_base.h.

Referenced by DIALOG_PLOT_BASE::DIALOG_PLOT_BASE().

◆ drillMarksLabel

wxStaticText* DIALOG_PLOT_BASE::drillMarksLabel
protectedinherited

Definition at line 80 of file dialog_plot_base.h.

Referenced by DIALOG_PLOT_BASE::DIALOG_PLOT_BASE().

◆ DXF_exportUnitsLabel

wxStaticText* DIALOG_PLOT_BASE::DXF_exportUnitsLabel
protectedinherited

Definition at line 119 of file dialog_plot_base.h.

Referenced by DIALOG_PLOT_BASE::DIALOG_PLOT_BASE().

◆ m_bitmapAlert

wxStaticBitmap* DIALOG_PLOT_BASE::m_bitmapAlert
protectedinherited

Definition at line 90 of file dialog_plot_base.h.

Referenced by DIALOG_PLOT_BASE::DIALOG_PLOT_BASE().

◆ m_boardSetup

wxHyperlinkCtrl* DIALOG_PLOT_BASE::m_boardSetup
protectedinherited

◆ m_browseButton

wxBitmapButton* DIALOG_PLOT_BASE::m_browseButton
protectedinherited

◆ m_buttonDRC

wxButton* DIALOG_PLOT_BASE::m_buttonDRC
protectedinherited

◆ m_coordFormatCtrl

wxChoice* DIALOG_PLOT_BASE::m_coordFormatCtrl
protectedinherited

◆ m_defaultPenSize

UNIT_BINDER DIALOG_PLOT::m_defaultPenSize
private

Definition at line 82 of file dialog_plot.h.

Referenced by applyPlotSettings(), init_Dialog(), and SetPlotFormat().

◆ m_disableApertMacros

wxCheckBox* DIALOG_PLOT_BASE::m_disableApertMacros
protectedinherited

◆ m_DRCExclusionsWarning

wxStaticText* DIALOG_PLOT_BASE::m_DRCExclusionsWarning
protectedinherited

◆ m_DRCWarningTemplate

wxString DIALOG_PLOT::m_DRCWarningTemplate
private

Definition at line 85 of file dialog_plot.h.

Referenced by DIALOG_PLOT(), and reInitDialog().

◆ m_drillShapeOpt

wxChoice* DIALOG_PLOT_BASE::m_drillShapeOpt
protectedinherited

◆ m_DXF_plotModeOpt

wxCheckBox* DIALOG_PLOT_BASE::m_DXF_plotModeOpt
protectedinherited

◆ m_DXF_plotTextStrokeFontOpt

wxCheckBox* DIALOG_PLOT_BASE::m_DXF_plotTextStrokeFontOpt
protectedinherited

◆ m_DXF_plotUnits

wxChoice* DIALOG_PLOT_BASE::m_DXF_plotUnits
protectedinherited

◆ m_fineAdjustXCtrl

wxTextCtrl* DIALOG_PLOT_BASE::m_fineAdjustXCtrl
protectedinherited

◆ m_fineAdjustXLabel

wxStaticText* DIALOG_PLOT_BASE::m_fineAdjustXLabel
protectedinherited

Definition at line 108 of file dialog_plot_base.h.

Referenced by DIALOG_PLOT_BASE::DIALOG_PLOT_BASE().

◆ m_fineAdjustYCtrl

wxTextCtrl* DIALOG_PLOT_BASE::m_fineAdjustYCtrl
protectedinherited

◆ m_fineAdjustYLabel

wxStaticText* DIALOG_PLOT_BASE::m_fineAdjustYLabel
protectedinherited

Definition at line 110 of file dialog_plot_base.h.

Referenced by DIALOG_PLOT_BASE::DIALOG_PLOT_BASE().

◆ m_firstPaintEvent

bool DIALOG_SHIM::m_firstPaintEvent
protectedinherited

Definition at line 210 of file dialog_shim.h.

Referenced by DIALOG_SHIM::OnPaint().

◆ m_forcePSA4OutputOpt

wxCheckBox* DIALOG_PLOT_BASE::m_forcePSA4OutputOpt
protectedinherited

◆ m_generateGerberJobFile

wxCheckBox* DIALOG_PLOT_BASE::m_generateGerberJobFile
protectedinherited

◆ m_GerberOptionsSizer

wxStaticBoxSizer* DIALOG_PLOT_BASE::m_GerberOptionsSizer
protectedinherited

Definition at line 94 of file dialog_plot_base.h.

Referenced by DIALOG_PLOT_BASE::DIALOG_PLOT_BASE(), and SetPlotFormat().

◆ m_hash_key

◆ m_HPGLOptionsSizer

wxStaticBoxSizer* DIALOG_PLOT_BASE::m_HPGLOptionsSizer
protectedinherited

Definition at line 103 of file dialog_plot_base.h.

Referenced by DIALOG_PLOT_BASE::DIALOG_PLOT_BASE(), and SetPlotFormat().

◆ m_hpglPenCtrl

wxTextCtrl* DIALOG_PLOT_BASE::m_hpglPenCtrl
protectedinherited

Definition at line 105 of file dialog_plot_base.h.

Referenced by DIALOG_PLOT_BASE::DIALOG_PLOT_BASE().

◆ m_hpglPenLabel

wxStaticText* DIALOG_PLOT_BASE::m_hpglPenLabel
protectedinherited

Definition at line 104 of file dialog_plot_base.h.

Referenced by DIALOG_PLOT_BASE::DIALOG_PLOT_BASE().

◆ m_hpglPenUnits

wxStaticText* DIALOG_PLOT_BASE::m_hpglPenUnits
protectedinherited

Definition at line 106 of file dialog_plot_base.h.

Referenced by DIALOG_PLOT_BASE::DIALOG_PLOT_BASE().

◆ m_includeEdgeLayerOpt

wxCheckBox* DIALOG_PLOT_BASE::m_includeEdgeLayerOpt
protectedinherited

◆ m_initialFocusTarget

wxWindow* DIALOG_SHIM::m_initialFocusTarget
protectedinherited

Definition at line 211 of file dialog_shim.h.

Referenced by DIALOG_SHIM::OnPaint(), and DIALOG_SHIM::SetInitialFocus().

◆ m_initialSize

wxSize DIALOG_SHIM::m_initialSize
protectedinherited

Definition at line 223 of file dialog_shim.h.

Referenced by DIALOG_SHIM::Show().

◆ m_layerCheckListBox

wxCheckListBox* DIALOG_PLOT_BASE::m_layerCheckListBox
protectedinherited

◆ m_layerList

LSEQ DIALOG_PLOT::m_layerList
private

Definition at line 70 of file dialog_plot.h.

Referenced by applyPlotSettings(), init_Dialog(), and OnPopUpLayers().

◆ m_LayersSizer

wxStaticBoxSizer* DIALOG_PLOT_BASE::m_LayersSizer
protectedinherited

Definition at line 69 of file dialog_plot_base.h.

Referenced by DIALOG_PLOT_BASE::DIALOG_PLOT_BASE().

◆ m_MainSizer

wxBoxSizer* DIALOG_PLOT_BASE::m_MainSizer
protectedinherited

Definition at line 63 of file dialog_plot_base.h.

Referenced by DIALOG_PLOT_BASE::DIALOG_PLOT_BASE(), and SetPlotFormat().

◆ m_messagesPanel

WX_HTML_REPORT_PANEL* DIALOG_PLOT_BASE::m_messagesPanel
protectedinherited

◆ m_outputDirectoryName

wxTextCtrl* DIALOG_PLOT_BASE::m_outputDirectoryName
protectedinherited

◆ m_parent

◆ m_parentFrame

EDA_BASE_FRAME* DIALOG_SHIM::m_parentFrame
protectedinherited

◆ m_plotFormatOpt

wxChoice* DIALOG_PLOT_BASE::m_plotFormatOpt
protectedinherited

◆ m_plotInvisibleText

wxCheckBox* DIALOG_PLOT_BASE::m_plotInvisibleText
protectedinherited

◆ m_plotMirrorOpt

wxCheckBox* DIALOG_PLOT_BASE::m_plotMirrorOpt
protectedinherited

◆ m_plotModeOpt

wxChoice* DIALOG_PLOT_BASE::m_plotModeOpt
protectedinherited

◆ m_plotModuleRefOpt

wxCheckBox* DIALOG_PLOT_BASE::m_plotModuleRefOpt
protectedinherited

◆ m_plotModuleValueOpt

wxCheckBox* DIALOG_PLOT_BASE::m_plotModuleValueOpt
protectedinherited

◆ m_plotNoViaOnMaskOpt

wxCheckBox* DIALOG_PLOT_BASE::m_plotNoViaOnMaskOpt
protectedinherited

◆ m_PlotOptionsSizer

wxBoxSizer* DIALOG_PLOT_BASE::m_PlotOptionsSizer
protectedinherited

◆ m_plotOpts

PCB_PLOT_PARAMS DIALOG_PLOT::m_plotOpts
private

◆ m_plotPSNegativeOpt

wxCheckBox* DIALOG_PLOT_BASE::m_plotPSNegativeOpt
protectedinherited

◆ m_plotSheetRef

wxCheckBox* DIALOG_PLOT_BASE::m_plotSheetRef
protectedinherited

◆ m_popMenu

wxMenu* DIALOG_PLOT_BASE::m_popMenu
protectedinherited

◆ m_PSOptionsSizer

wxStaticBoxSizer* DIALOG_PLOT_BASE::m_PSOptionsSizer
protectedinherited

Definition at line 107 of file dialog_plot_base.h.

Referenced by DIALOG_PLOT_BASE::DIALOG_PLOT_BASE(), and SetPlotFormat().

◆ m_PSWidthAdjust

int DIALOG_PLOT::m_PSWidthAdjust
private

Definition at line 75 of file dialog_plot.h.

Referenced by applyPlotSettings(), init_Dialog(), and Plot().

◆ m_qmodal_loop

WX_EVENT_LOOP* DIALOG_SHIM::m_qmodal_loop
protectedinherited

Definition at line 213 of file dialog_shim.h.

Referenced by DIALOG_SHIM::EndQuasiModal(), and DIALOG_SHIM::ShowQuasiModal().

◆ m_qmodal_parent_disabler

WDO_ENABLE_DISABLE* DIALOG_SHIM::m_qmodal_parent_disabler
protectedinherited

◆ m_qmodal_showing

bool DIALOG_SHIM::m_qmodal_showing
protectedinherited

Definition at line 215 of file dialog_shim.h.

Referenced by DIALOG_SHIM::IsQuasiModal(), and DIALOG_SHIM::ShowQuasiModal().

◆ m_scaleOpt

wxChoice* DIALOG_PLOT_BASE::m_scaleOpt
protectedinherited

◆ m_sdbSizer1

wxStdDialogButtonSizer* DIALOG_PLOT_BASE::m_sdbSizer1
protectedinherited

Definition at line 130 of file dialog_plot_base.h.

Referenced by DIALOG_PLOT_BASE::DIALOG_PLOT_BASE().

◆ m_sdbSizer1Apply

wxButton* DIALOG_PLOT_BASE::m_sdbSizer1Apply
protectedinherited

◆ m_sdbSizer1Cancel

wxButton* DIALOG_PLOT_BASE::m_sdbSizer1Cancel
protectedinherited

Definition at line 133 of file dialog_plot_base.h.

Referenced by DIALOG_PLOT(), and DIALOG_PLOT_BASE::DIALOG_PLOT_BASE().

◆ m_sdbSizer1OK

wxButton* DIALOG_PLOT_BASE::m_sdbSizer1OK
protectedinherited

◆ m_sizerButtons

wxBoxSizer* DIALOG_PLOT_BASE::m_sizerButtons
protectedinherited

Definition at line 127 of file dialog_plot_base.h.

Referenced by DIALOG_PLOT(), and DIALOG_PLOT_BASE::DIALOG_PLOT_BASE().

◆ m_SizerDXF_options

wxStaticBoxSizer* DIALOG_PLOT_BASE::m_SizerDXF_options
protectedinherited

Definition at line 116 of file dialog_plot_base.h.

Referenced by DIALOG_PLOT_BASE::DIALOG_PLOT_BASE(), and SetPlotFormat().

◆ m_SizerSolderMaskAlert

wxBoxSizer* DIALOG_PLOT_BASE::m_SizerSolderMaskAlert
protectedinherited

◆ m_sketchPadsOnFabLayers

wxCheckBox* DIALOG_PLOT_BASE::m_sketchPadsOnFabLayers
protectedinherited

◆ m_staticTextAlert

wxStaticText* DIALOG_PLOT_BASE::m_staticTextAlert
protectedinherited

Definition at line 91 of file dialog_plot_base.h.

Referenced by DIALOG_PLOT_BASE::DIALOG_PLOT_BASE().

◆ m_staticTextAlert1

wxStaticText* DIALOG_PLOT_BASE::m_staticTextAlert1
protectedinherited

Definition at line 92 of file dialog_plot_base.h.

Referenced by DIALOG_PLOT_BASE::DIALOG_PLOT_BASE().

◆ m_staticTextDir

wxStaticText* DIALOG_PLOT_BASE::m_staticTextDir
protectedinherited

Definition at line 66 of file dialog_plot_base.h.

Referenced by DIALOG_PLOT_BASE::DIALOG_PLOT_BASE().

◆ m_staticTextPlotFmt

wxStaticText* DIALOG_PLOT_BASE::m_staticTextPlotFmt
protectedinherited

Definition at line 64 of file dialog_plot_base.h.

Referenced by DIALOG_PLOT_BASE::DIALOG_PLOT_BASE().

◆ m_subtractMaskFromSilk

wxCheckBox* DIALOG_PLOT_BASE::m_subtractMaskFromSilk
protectedinherited

◆ m_svgOptionsSizer

wxStaticBoxSizer* DIALOG_PLOT_BASE::m_svgOptionsSizer
protectedinherited

Definition at line 121 of file dialog_plot_base.h.

Referenced by DIALOG_PLOT_BASE::DIALOG_PLOT_BASE(), and SetPlotFormat().

◆ m_svgPrecsision

wxSpinCtrl* DIALOG_PLOT_BASE::m_svgPrecsision
protectedinherited

◆ m_svgUnits

wxChoice* DIALOG_PLOT_BASE::m_svgUnits
protectedinherited

◆ m_tabOrder

◆ m_trackWidthCorrection

UNIT_BINDER DIALOG_PLOT::m_trackWidthCorrection
private

Definition at line 83 of file dialog_plot.h.

Referenced by applyPlotSettings(), init_Dialog(), and SetPlotFormat().

◆ m_units

◆ m_useAuxOriginCheckBox

wxCheckBox* DIALOG_PLOT_BASE::m_useAuxOriginCheckBox
protectedinherited

◆ m_useCalculatedSize

bool DIALOG_SHIM::m_useCalculatedSize
protectedinherited

◆ m_useGerberExtensions

wxCheckBox* DIALOG_PLOT_BASE::m_useGerberExtensions
protectedinherited

◆ m_useGerberNetAttributes

wxCheckBox* DIALOG_PLOT_BASE::m_useGerberNetAttributes
protectedinherited

◆ m_useGerberX2Format

wxCheckBox* DIALOG_PLOT_BASE::m_useGerberX2Format
protectedinherited

◆ m_widthAdjustCtrl

wxTextCtrl* DIALOG_PLOT_BASE::m_widthAdjustCtrl
protectedinherited

Definition at line 113 of file dialog_plot_base.h.

Referenced by DIALOG_PLOT_BASE::DIALOG_PLOT_BASE().

◆ m_widthAdjustLabel

wxStaticText* DIALOG_PLOT_BASE::m_widthAdjustLabel
protectedinherited

Definition at line 112 of file dialog_plot_base.h.

Referenced by DIALOG_PLOT_BASE::DIALOG_PLOT_BASE().

◆ m_widthAdjustMaxValue

int DIALOG_PLOT::m_widthAdjustMaxValue
private

Definition at line 80 of file dialog_plot.h.

Referenced by applyPlotSettings(), and init_Dialog().

◆ m_widthAdjustMinValue

int DIALOG_PLOT::m_widthAdjustMinValue
private

Definition at line 79 of file dialog_plot.h.

Referenced by applyPlotSettings(), and init_Dialog().

◆ m_widthAdjustUnits

wxStaticText* DIALOG_PLOT_BASE::m_widthAdjustUnits
protectedinherited

Definition at line 114 of file dialog_plot_base.h.

Referenced by DIALOG_PLOT_BASE::DIALOG_PLOT_BASE().

◆ m_XScaleAdjust

double DIALOG_PLOT::m_XScaleAdjust
private

Definition at line 71 of file dialog_plot.h.

Referenced by applyPlotSettings(), init_Dialog(), and Plot().

◆ m_YScaleAdjust

double DIALOG_PLOT::m_YScaleAdjust
private

Definition at line 73 of file dialog_plot.h.

Referenced by applyPlotSettings(), init_Dialog(), and Plot().

◆ m_zoneFillCheck

wxCheckBox* DIALOG_PLOT_BASE::m_zoneFillCheck
protectedinherited

◆ plotModeLabel

wxStaticText* DIALOG_PLOT_BASE::plotModeLabel
protectedinherited

Definition at line 84 of file dialog_plot_base.h.

Referenced by DIALOG_PLOT_BASE::DIALOG_PLOT_BASE().

◆ scalingLabel

wxStaticText* DIALOG_PLOT_BASE::scalingLabel
protectedinherited

Definition at line 82 of file dialog_plot_base.h.

Referenced by DIALOG_PLOT_BASE::DIALOG_PLOT_BASE().

◆ svgPrecisionLabel

wxStaticText* DIALOG_PLOT_BASE::svgPrecisionLabel
protectedinherited

Definition at line 124 of file dialog_plot_base.h.

Referenced by DIALOG_PLOT_BASE::DIALOG_PLOT_BASE().

◆ svgUnitLabel

wxStaticText* DIALOG_PLOT_BASE::svgUnitLabel
protectedinherited

Definition at line 122 of file dialog_plot_base.h.

Referenced by DIALOG_PLOT_BASE::DIALOG_PLOT_BASE().


The documentation for this class was generated from the following files: