KiCad PCB EDA Suite
DIALOG_PLOT Class Reference

Class DIALOG_PLOT is the 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 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 ()
 
bool Show (bool show) override
 
bool Enable (bool enable) override
 
void OnPaint (wxPaintEvent &event)
 
EDA_UNITS_T GetUserUnits () const override
 
KIWAYKiway () const
 Function Kiway returns a reference to the KIWAY that this object has an opportunity to participate in. More...
 
PROJECTPrj () const
 Function Prj returns a reference to the PROJECT "associated with" this KIWAY. More...
 
void SetKiway (wxWindow *aDest, KIWAY *aKiway)
 Function SetKiway. More...
 

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)
 Convert an integer number of dialog units to pixels, horizontally. More...
 
int VertPixelsFromDU (int y)
 Convert an integer number of dialog units to pixels, vertically. More...
 

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_excludeEdgeLayerOpt
 
wxCheckBox * m_excludePadsFromSilkscreen
 
wxCheckBox * m_plotNoViaOnMaskOpt
 
wxCheckBox * m_useAuxOriginCheckBox
 
wxStaticText * drillMarksLabel
 
wxChoice * m_drillShapeOpt
 
wxStaticText * scalingLabel
 
wxChoice * m_scaleOpt
 
wxStaticText * plotModeLabel
 
wxChoice * m_plotModeOpt
 
wxStaticText * m_lineWidthLabel
 
wxTextCtrl * m_lineWidthCtrl
 
wxStaticText * m_lineWidthUnits
 
wxCheckBox * m_plotMirrorOpt
 
wxCheckBox * m_plotPSNegativeOpt
 
wxCheckBox * m_zoneFillCheck
 
wxStaticBoxSizer * m_GerberOptionsSizer
 
wxCheckBox * m_useGerberExtensions
 
wxCheckBox * m_generateGerberJobFile
 
wxCheckBox * m_subtractMaskFromSilk
 
wxStaticText * coordFormatLabel
 
wxChoice * m_coordFormatCtrl
 
wxCheckBox * m_useGerberX2Format
 
wxCheckBox * m_useGerberNetAttributes
 
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
 
WX_HTML_REPORT_PANELm_messagesPanel
 
wxBoxSizer * m_sizerButtons
 
wxButton * m_buttonDRC
 
wxStdDialogButtonSizer * m_sdbSizer1
 
wxButton * m_sdbSizer1OK
 
wxButton * m_sdbSizer1Apply
 
wxButton * m_sdbSizer1Cancel
 
wxMenu * m_popMenu
 
EDA_UNITS_T m_units
 
std::string m_hash_key
 
bool m_firstPaintEvent
 
wxWindow * m_initialFocusTarget
 
WX_EVENT_LOOPm_qmodal_loop
 
bool m_qmodal_showing
 
WDO_ENABLE_DISABLEm_qmodal_parent_disabler
 

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 init_Dialog ()
 
void reInitDialog ()
 
void applyPlotSettings ()
 
PlotFormat getPlotFormat ()
 
void setPlotModeChoiceSelection (EDA_DRAW_MODE_T aPlotMode)
 

Private Attributes

PCB_EDIT_FRAMEm_parent
 
wxConfigBase * m_config
 
LSEQ m_layerList
 
double m_XScaleAdjust
 
double m_YScaleAdjust
 
int m_PSWidthAdjust
 
int m_widthAdjustMinValue
 
int m_widthAdjustMaxValue
 
UNIT_BINDER m_defaultLineWidth
 
UNIT_BINDER m_defaultPenSize
 
UNIT_BINDER m_trackWidthCorrection
 
PCB_PLOT_PARAMS m_plotOpts
 

Detailed Description

Class DIALOG_PLOT is the dialog to set the plot options, and create plot files in various formats.

Definition at line 40 of file dialog_plot.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
protectedinherited

Constructor & Destructor Documentation

◆ DIALOG_PLOT()

DIALOG_PLOT::DIALOG_PLOT ( PCB_EDIT_FRAME parent)

Definition at line 40 of file dialog_plot.cpp.

References DLG_WINDOW_NAME, PCB_BASE_FRAME::GetPlotSettings(), init_Dialog(), Kiface(), KIFACE_I::KifaceSettings(), m_config, m_plotOpts, DIALOG_PLOT_BASE::m_sdbSizer1Apply, DIALOG_PLOT_BASE::m_sdbSizer1Cancel, DIALOG_PLOT_BASE::m_sdbSizer1OK, and DIALOG_PLOT_BASE::m_sizerButtons.

40  :
41  DIALOG_PLOT_BASE( aParent ), m_parent( aParent ),
45 {
46  SetName( DLG_WINDOW_NAME );
48  m_plotOpts = aParent->GetPlotSettings();
49  init_Dialog();
50 
51  // We use a sdbSizer to get platform-dependent ordering of the action buttons, but
52  // that requires us to correct the button labels here.
53  m_sdbSizer1OK->SetLabel( _( "Plot" ) );
54  m_sdbSizer1Apply->SetLabel( _( "Generate Drill Files..." ) );
55  m_sdbSizer1Cancel->SetLabel( _( "Close" ) );
56  m_sizerButtons->Layout();
57 
58  m_sdbSizer1OK->SetDefault();
59 
60  GetSizer()->Fit( this );
61  GetSizer()->SetSizeHints( this );
62 }
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_lineWidthLabel
wxConfigBase * KifaceSettings() const
Definition: kiface_i.h:103
wxStaticText * m_hpglPenUnits
wxButton * m_sdbSizer1OK
UNIT_BINDER m_trackWidthCorrection
Definition: dialog_plot.h:62
wxButton * m_sdbSizer1Apply
KIFACE_I & Kiface()
Global KIFACE_I "get" accessor.
Definition: kicad.cpp:52
wxStaticText * m_lineWidthUnits
wxTextCtrl * m_widthAdjustCtrl
PCB_EDIT_FRAME * m_parent
Definition: dialog_plot.h:46
wxStaticText * m_hpglPenLabel
PCB_PLOT_PARAMS m_plotOpts
Definition: dialog_plot.h:64
wxStaticText * m_widthAdjustUnits
wxTextCtrl * m_hpglPenCtrl
wxTextCtrl * m_lineWidthCtrl
UNIT_BINDER m_defaultLineWidth
Definition: dialog_plot.h:60
wxBoxSizer * m_sizerButtons
void init_Dialog()
Definition: dialog_plot.cpp:65
wxConfigBase * m_config
Definition: dialog_plot.h:47
UNIT_BINDER m_defaultPenSize
Definition: dialog_plot.h:61
#define DLG_WINDOW_NAME
Definition: dialog_plot.h:34

Member Function Documentation

◆ applyPlotSettings()

void DIALOG_PLOT::applyPlotSettings ( )
private

Definition at line 552 of file dialog_plot.cpp.

References LSET::AllCuMask(), CONFIG_PS_FINEWIDTH_ADJ, ConfigBaseWriteDouble(), FILLED, GetAbbreviatedUnitsLabel(), PCB_BASE_FRAME::GetBoard(), BOARD::GetEnabledLayers(), PCB_PLOT_PARAMS::GetHPGLPenDiameter(), PCB_PLOT_PARAMS::GetLineWidth(), getPlotFormat(), DIALOG_SHIM::GetUserUnits(), UNIT_BINDER::GetValue(), i, PCB_PLOT_PARAMS::IsSameAs(), IU_PER_MILS, m_config, DIALOG_PLOT_BASE::m_coordFormatCtrl, m_defaultLineWidth, m_defaultPenSize, DIALOG_PLOT_BASE::m_drillShapeOpt, DIALOG_PLOT_BASE::m_DXF_plotModeOpt, DIALOG_PLOT_BASE::m_DXF_plotTextStrokeFontOpt, DIALOG_PLOT_BASE::m_excludeEdgeLayerOpt, DIALOG_PLOT_BASE::m_excludePadsFromSilkscreen, DIALOG_PLOT_BASE::m_fineAdjustXCtrl, DIALOG_PLOT_BASE::m_fineAdjustYCtrl, DIALOG_PLOT_BASE::m_forcePSA4OutputOpt, DIALOG_PLOT_BASE::m_generateGerberJobFile, DIALOG_PLOT_BASE::m_layerCheckListBox, m_layerList, DIALOG_PLOT_BASE::m_messagesPanel, DIALOG_PLOT_BASE::m_outputDirectoryName, m_parent, 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_subtractMaskFromSilk, 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, PCB_EDIT_FRAME::OnModify(), OPTKEY_PLOT_CHECK_ZONES, OPTKEY_PLOT_X_FINESCALE_ADJ, OPTKEY_PLOT_Y_FINESCALE_ADJ, PLOT_FORMAT_HPGL, PLOT_MAX_SCALE, PLOT_MIN_SCALE, PLOTTEXTMODE_DEFAULT, PLOTTEXTMODE_NATIVE, REPORTER::Report(), WX_HTML_REPORT_PANEL::Reporter(), REPORTER::RPT_INFO, REPORTER::RPT_WARNING, PCB_PLOT_PARAMS::SetA4Output(), PCB_PLOT_PARAMS::SetCreateGerberJobFile(), setDouble(), PCB_PLOT_PARAMS::SetDrillMarksType(), PCB_PLOT_PARAMS::SetDXFPlotPolygonMode(), 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::SetLineWidth(), 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::SetPlotPadsOnSilkLayer(), PCB_PLOT_PARAMS::SetPlotReference(), PCB_BASE_FRAME::SetPlotSettings(), PCB_PLOT_PARAMS::SetPlotValue(), PCB_PLOT_PARAMS::SetPlotViaOnMaskLayer(), PCB_PLOT_PARAMS::SetScaleSelection(), PCB_PLOT_PARAMS::SetSubtractMaskFromSilk(), 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().

553 {
554  REPORTER& reporter = m_messagesPanel->Reporter();
555 
556  PCB_PLOT_PARAMS tempOptions;
557 
558  tempOptions.SetExcludeEdgeLayer( m_excludeEdgeLayerOpt->GetValue() );
559  tempOptions.SetSubtractMaskFromSilk( m_subtractMaskFromSilk->GetValue() );
560  tempOptions.SetPlotFrameRef( m_plotSheetRef->GetValue() );
561  tempOptions.SetPlotPadsOnSilkLayer( !m_excludePadsFromSilkscreen->GetValue() );
562  tempOptions.SetUseAuxOrigin( m_useAuxOriginCheckBox->GetValue() );
563  tempOptions.SetPlotValue( m_plotModuleValueOpt->GetValue() );
564  tempOptions.SetPlotReference( m_plotModuleRefOpt->GetValue() );
565  tempOptions.SetPlotInvisibleText( m_plotInvisibleText->GetValue() );
566  tempOptions.SetScaleSelection( m_scaleOpt->GetSelection() );
567  tempOptions.SetDrillMarksType( static_cast<PCB_PLOT_PARAMS::DrillMarksType>
568  ( m_drillShapeOpt->GetSelection() ) );
569  tempOptions.SetMirror( m_plotMirrorOpt->GetValue() );
570  tempOptions.SetPlotMode( m_plotModeOpt->GetSelection() == 1 ? SKETCH : FILLED );
571  tempOptions.SetDXFPlotPolygonMode( m_DXF_plotModeOpt->GetValue() );
572  tempOptions.SetPlotViaOnMaskLayer( m_plotNoViaOnMaskOpt->GetValue() );
573 
574  if( !m_DXF_plotTextStrokeFontOpt->IsEnabled() ) // Currently, only DXF supports this option
575  tempOptions.SetTextMode( PLOTTEXTMODE_DEFAULT );
576  else
577  tempOptions.SetTextMode( m_DXF_plotTextStrokeFontOpt->GetValue() ?
579 
580  // Update settings from text fields. Rewrite values back to the fields,
581  // since the values may have been constrained by the setters.
582  wxString msg;
583 
584  // read HPLG pen size (this param is stored in mils)
585  // However, due to issues when converting this value from or to mm
586  // that can slightly change the value, update this param only if it
587  // is in use
589  {
590  if( !tempOptions.SetHPGLPenDiameter( m_defaultPenSize.GetValue() / IU_PER_MILS ) )
591  {
593  msg.Printf( _( "HPGL pen size constrained." ) );
594  reporter.Report( msg, REPORTER::RPT_INFO );
595  }
596  }
597  else // keep the last value (initial value if no HPGL plot made)
599 
600  // Default linewidth
601  if( !tempOptions.SetLineWidth( m_defaultLineWidth.GetValue() ) )
602  {
603  m_defaultLineWidth.SetValue( tempOptions.GetLineWidth() );
604  msg.Printf( _( "Default line width constrained." ) );
605  reporter.Report( msg, REPORTER::RPT_INFO );
606  }
607 
608  // X scale
609  double tmpDouble;
610  msg = m_fineAdjustXCtrl->GetValue();
611  msg.ToDouble( &tmpDouble );
612 
613  if( !setDouble( &m_XScaleAdjust, tmpDouble, PLOT_MIN_SCALE, PLOT_MAX_SCALE ) )
614  {
615  msg.Printf( wxT( "%f" ), m_XScaleAdjust );
616  m_fineAdjustXCtrl->SetValue( msg );
617  msg.Printf( _( "X scale constrained." ) );
618  reporter.Report( msg, REPORTER::RPT_INFO );
619  }
620 
622 
623  // Y scale
624  msg = m_fineAdjustYCtrl->GetValue();
625  msg.ToDouble( &tmpDouble );
626 
627  if( !setDouble( &m_YScaleAdjust, tmpDouble, PLOT_MIN_SCALE, PLOT_MAX_SCALE ) )
628  {
629  msg.Printf( wxT( "%f" ), m_YScaleAdjust );
630  m_fineAdjustYCtrl->SetValue( msg );
631  msg.Printf( _( "Y scale constrained." ) );
632  reporter.Report( msg, REPORTER::RPT_INFO );
633  }
634 
636 
637  m_config->Write( OPTKEY_PLOT_CHECK_ZONES, m_zoneFillCheck->GetValue() );
638 
639  // PS Width correction
642  {
644  msg.Printf( _( "Width correction constrained. "
645  "The reasonable width correction value must be in a range of "
646  " [%s; %s] (%s) for current design rules." ),
650  reporter.Report( msg, REPORTER::RPT_WARNING );
651  }
652 
653  // Store m_PSWidthAdjust in mm in user config
655  (double)m_PSWidthAdjust / IU_PER_MM );
656 
657  tempOptions.SetFormat( getPlotFormat() );
658 
659  tempOptions.SetUseGerberProtelExtensions( m_useGerberExtensions->GetValue() );
660  tempOptions.SetUseGerberX2format( m_useGerberX2Format->GetValue() );
661  tempOptions.SetIncludeGerberNetlistInfo( m_useGerberNetAttributes->GetValue() );
662  tempOptions.SetCreateGerberJobFile( m_generateGerberJobFile->GetValue() );
663 
664  tempOptions.SetGerberPrecision( m_coordFormatCtrl->GetSelection() == 0 ? 5 : 6 );
665 
666  LSET selectedLayers;
667  for( unsigned i = 0; i < m_layerList.size(); i++ )
668  {
669  if( m_layerCheckListBox->IsChecked( i ) )
670  selectedLayers.set( m_layerList[i] );
671  }
672  // Get a list of copper layers that aren't being used by inverting enabled layers.
673  LSET disabledCopperLayers = LSET::AllCuMask() & ~m_parent->GetBoard()->GetEnabledLayers();
674  // Enable all of the disabled copper layers.
675  // If someone enables more copper layers they will be selected by default.
676  selectedLayers = selectedLayers | disabledCopperLayers;
677  tempOptions.SetLayerSelection( selectedLayers );
678 
679  tempOptions.SetNegative( m_plotPSNegativeOpt->GetValue() );
680  tempOptions.SetA4Output( m_forcePSA4OutputOpt->GetValue() );
681 
682  // Set output directory and replace backslashes with forward ones
683  wxString dirStr;
684  dirStr = m_outputDirectoryName->GetValue();
685  dirStr.Replace( wxT( "\\" ), wxT( "/" ) );
686  tempOptions.SetOutputDirectory( dirStr );
687 
688  if( !m_plotOpts.IsSameAs( tempOptions, false ) )
689  {
690  // First, mark board as modified only for parameters saved in file
691  if( !m_plotOpts.IsSameAs( tempOptions, true ) )
692  m_parent->OnModify();
693 
694  // Now, save any change, for the session
695  m_parent->SetPlotSettings( tempOptions );
696  m_plotOpts = tempOptions;
697  }
698 }
void SetTextMode(PlotTextMode aVal)
static LSET AllCuMask(int aCuLayerCount=MAX_CU_LAYERS)
Function AllCuMask returns a mask holding the requested number of Cu PCB_LAYER_IDs.
Definition: lset.cpp:676
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:48
void SetIncludeGerberNetlistInfo(bool aUse)
void SetDXFPlotPolygonMode(bool aFlag)
double m_YScaleAdjust
Definition: dialog_plot.h:51
virtual void OnModify() override
Function OnModify must be called after a board change to set the modified flag.
wxCheckBox * m_useGerberExtensions
void SetGerberPrecision(int aPrecision)
void SetPlotViaOnMaskLayer(bool aFlag)
#define OPTKEY_PLOT_Y_FINESCALE_ADJ
Definition: pcbplot.h:61
void SetLayerSelection(LSET aSelection)
void SetUseAuxOrigin(bool aAux)
wxCheckBox * m_plotPSNegativeOpt
#define PLOT_MIN_SCALE
Definition: pcbplot.h:68
void SetFormat(PlotFormat aFormat)
PlotFormat getPlotFormat()
wxCheckBox * m_excludeEdgeLayerOpt
void SetCreateGerberJobFile(bool aCreate)
void SetMirror(bool aFlag)
wxCheckBox * m_plotMirrorOpt
LSET GetEnabledLayers() const
Function GetEnabledLayers is a proxy function that calls the corresponding function in m_BoardSetting...
wxCheckBox * m_zoneFillCheck
void SetDrillMarksType(DrillMarksType aVal)
Class REPORTER is a pure virtual class used to derive REPORTER objects from.
Definition: reporter.h:61
wxChoice * m_coordFormatCtrl
UNIT_BINDER m_trackWidthCorrection
Definition: dialog_plot.h:62
void SetA4Output(int aForce)
double m_XScaleAdjust
Definition: dialog_plot.h:49
wxTextCtrl * m_fineAdjustYCtrl
wxCheckBox * m_DXF_plotModeOpt
bool SetLineWidth(int aValue)
void SetPlotValue(bool aFlag)
virtual int GetValue()
Function GetValue Returns the current value in Internal Units.
wxCheckBox * m_plotSheetRef
void SetPlotFrameRef(bool aFlag)
wxTextCtrl * m_fineAdjustXCtrl
Class LSET is a set of PCB_LAYER_IDs.
#define OPTKEY_PLOT_X_FINESCALE_ADJ
Definition: pcbplot.h:60
PCB_EDIT_FRAME * m_parent
Definition: dialog_plot.h:46
int m_widthAdjustMaxValue
Definition: dialog_plot.h:58
static bool setDouble(double *aResult, double aValue, double aMin, double aMax)
REPORTER & Reporter()
returns the reporter object that reports to this panel
#define PLOT_MAX_SCALE
Definition: pcbplot.h:69
int m_PSWidthAdjust
Definition: dialog_plot.h:53
wxCheckBox * m_forcePSA4OutputOpt
void SetSubtractMaskFromSilk(bool aSubtract)
#define CONFIG_PS_FINEWIDTH_ADJ
Definition: pcbplot.h:62
void SetUseGerberX2format(bool aUse)
virtual void SetPlotSettings(const PCB_PLOT_PARAMS &aSettings)
wxCheckBox * m_useGerberNetAttributes
void SetOutputDirectory(wxString aDir)
int m_widthAdjustMinValue
Definition: dialog_plot.h:57
wxCheckBox * m_generateGerberJobFile
Class PCB_PLOT_PARAMS handles plot parameters and options when plotting/printing a board...
wxTextCtrl * m_outputDirectoryName
void SetPlotInvisibleText(bool aFlag)
wxCheckBox * m_DXF_plotTextStrokeFontOpt
PCB_PLOT_PARAMS m_plotOpts
Definition: dialog_plot.h:64
void SetNegative(bool aFlag)
wxChoice * m_scaleOpt
int GetLineWidth() const
wxCheckBox * m_plotModuleRefOpt
void ConfigBaseWriteDouble(wxConfigBase *aConfig, const wxString &aKey, double aValue)
Function ConfigBaseWriteDouble This is a helper function to write doubles in config We cannot use wxC...
void SetPlotPadsOnSilkLayer(bool aFlag)
void SetPlotMode(EDA_DRAW_MODE_T aPlotMode)
UNIT_BINDER m_defaultLineWidth
Definition: dialog_plot.h:60
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)
Function SetValue Sets new value (in Internal Units) for the text field, taking care of units convers...
size_t i
Definition: json11.cpp:597
wxCheckBox * m_plotInvisibleText
double GetHPGLPenDiameter() const
bool IsSameAs(const PCB_PLOT_PARAMS &aPcbPlotParams, bool aCompareOnlySavedPrms) const
Compare current settings to aPcbPlotParams, including not saved parameters in brd file...
#define IU_PER_MILS
Definition: plotter.cpp:134
wxCheckBox * m_useAuxOriginCheckBox
wxChoice * m_plotModeOpt
wxConfigBase * m_config
Definition: dialog_plot.h:47
virtual REPORTER & Report(const wxString &aText, SEVERITY aSeverity=RPT_UNDEFINED)=0
Function Report is a pure virtual function to override in the derived object.
wxString StringFromValue(EDA_UNITS_T aUnits, int aValue, bool aAddUnitSymbol, bool aUseMils)
Function StringFromValue returns the string from aValue according to units (inch, mm ...
Definition: base_units.cpp:210
wxCheckBox * m_excludePadsFromSilkscreen
#define OPTKEY_PLOT_CHECK_ZONES
Definition: pcbplot.h:63
UNIT_BINDER m_defaultPenSize
Definition: dialog_plot.h:61
wxCheckBox * m_useGerberX2Format
BOARD * GetBoard() const
wxCheckListBox * m_layerCheckListBox
wxString GetAbbreviatedUnitsLabel(EDA_UNITS_T aUnit, bool aUseMils)
Get the units string for a given units type.
Definition: base_units.cpp:432
EDA_UNITS_T GetUserUnits() const override
Definition: dialog_shim.h:133

◆ CreateDrillFile()

void DIALOG_PLOT::CreateDrillFile ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_PLOT_BASE.

Definition at line 276 of file dialog_plot.cpp.

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

277 {
278  // Be sure drill file use the same settings (axis option, plot directory)
279  // than plot files:
281  m_parent->InstallDrillFrame( event );
282 
283  // a few plot settings can be modified: take them in account
285  reInitDialog();
286 }
virtual const PCB_PLOT_PARAMS & GetPlotSettings() const
Function GetPlotSettings returns the PCB_PLOT_PARAMS for the BOARD owned by this frame.
PCB_EDIT_FRAME * m_parent
Definition: dialog_plot.h:46
PCB_PLOT_PARAMS m_plotOpts
Definition: dialog_plot.h:64
void reInitDialog()
void applyPlotSettings()
void InstallDrillFrame(wxCommandEvent &event)

◆ DIALOG_PLOT_BASEOnContextMenu()

void DIALOG_PLOT_BASE::DIALOG_PLOT_BASEOnContextMenu ( wxMouseEvent &  event)
inlineinherited

Definition at line 141 of file dialog_plot_base.h.

References DIALOG_PLOT_BASE::m_popMenu.

Referenced by DIALOG_PLOT_BASE::DIALOG_PLOT_BASE().

142  {
143  this->PopupMenu( m_popMenu, event.GetPosition() );
144  }

◆ Enable()

bool DIALOG_SHIM::Enable ( bool  enable)
overrideinherited

Definition at line 230 of file dialog_shim.cpp.

231 {
232  // so we can do logging of this state change:
233 
234 #if defined(DEBUG)
235  const char* type_id = typeid( *this ).name();
236  printf( "wxDialog %s: %s\n", type_id, enable ? "enabled" : "disabled" );
237 #endif
238 
239  return wxDialog::Enable( enable );
240 }

◆ EndQuasiModal()

void DIALOG_SHIM::EndQuasiModal ( int  retCode)
inherited

Definition at line 390 of file dialog_shim.cpp.

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

Referenced by HK_PROMPT_DIALOG::EndFlexible(), DIALOG_SHIM::OnButton(), DIALOG_LIB_EDIT_PIN_TABLE::OnClose(), DIALOG_PRINT_GENERIC::onCloseButton(), DIALOG_CHOOSE_FOOTPRINT::OnCloseTimer(), DIALOG_CHOOSE_COMPONENT::OnCloseTimer(), DIALOG_SHIM::OnCloseWindow(), DIALOG_CHOOSE_FOOTPRINT::OnUseBrowser(), DIALOG_CHOOSE_COMPONENT::OnUseBrowser(), and DIALOG_SHIM::~DIALOG_SHIM().

391 {
392  // Hook up validator and transfer data from controls handling so quasi-modal dialogs
393  // handle validation in the same way as other dialogs.
394  if( ( retCode == wxID_OK ) && ( !Validate() || !TransferDataFromWindow() ) )
395  return;
396 
397  SetReturnCode( retCode );
398 
399  if( !IsQuasiModal() )
400  {
401  wxFAIL_MSG( wxT( "either DIALOG_SHIM::EndQuasiModal called twice or ShowQuasiModal wasn't called" ) );
402  return;
403  }
404 
405  if( m_qmodal_loop )
406  {
407  if( m_qmodal_loop->IsRunning() )
408  m_qmodal_loop->Exit( 0 );
409  else
410  m_qmodal_loop->ScheduleExit( 0 );
411 
412  m_qmodal_loop = NULL;
413  }
414 
417 
418  Show( false );
419 }
WX_EVENT_LOOP * m_qmodal_loop
Definition: dialog_shim.h:183
bool IsQuasiModal()
Definition: dialog_shim.h:125
bool Show(bool show) override
WDO_ENABLE_DISABLE * m_qmodal_parent_disabler
Definition: dialog_shim.h:185

◆ 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, when all widgets are initialized, and therefore their size fixed. If TransferDataToWindow() is used to initialize widgets, at end of TransferDataToWindow, or better at end of a wxInitDialogEvent handler

In any case, the best way is to call it in a wxInitDialogEvent handler after calling TransfertDataToWindow(), which is the default wxInitDialogEvent handler wxDialog

Definition at line 129 of file dialog_shim.cpp.

References PCAD2KICAD::Center.

Referenced by DIALOG_3D_VIEW_OPTIONS::DIALOG_3D_VIEW_OPTIONS(), DIALOG_ANNOTATE::DIALOG_ANNOTATE(), DIALOG_BOM::DIALOG_BOM(), DIALOG_COPPER_ZONE::DIALOG_COPPER_ZONE(), DIALOG_DRC_CONTROL::DIALOG_DRC_CONTROL(), DIALOG_EDIT_COMPONENT_IN_LIBRARY::DIALOG_EDIT_COMPONENT_IN_LIBRARY(), DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC(), DIALOG_EDIT_COMPONENTS_LIBID::DIALOG_EDIT_COMPONENTS_LIBID(), DIALOG_EDIT_LINE_STYLE::DIALOG_EDIT_LINE_STYLE(), DIALOG_ENUM_PADS::DIALOG_ENUM_PADS(), DIALOG_EXCHANGE_FOOTPRINTS::DIALOG_EXCHANGE_FOOTPRINTS(), DIALOG_EXIT::DIALOG_EXIT(), 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_FIELDS_EDITOR_GLOBAL::DIALOG_FIELDS_EDITOR_GLOBAL(), DIALOG_FOOTPRINT_BOARD_EDITOR::DIALOG_FOOTPRINT_BOARD_EDITOR(), DIALOG_FOOTPRINT_FP_EDITOR::DIALOG_FOOTPRINT_FP_EDITOR(), DIALOG_FOOTPRINT_WIZARD_LIST::DIALOG_FOOTPRINT_WIZARD_LIST(), DIALOG_FOOTPRINTS_DISPLAY_OPTIONS::DIALOG_FOOTPRINTS_DISPLAY_OPTIONS(), DIALOG_FP_BROWSER_DISPLAY_OPTIONS::DIALOG_FP_BROWSER_DISPLAY_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_IMAGE_EDITOR::DIALOG_IMAGE_EDITOR(), DIALOG_KEEPOUT_AREA_PROPERTIES::DIALOG_KEEPOUT_AREA_PROPERTIES(), DIALOG_LABEL_EDITOR::DIALOG_LABEL_EDITOR(), DIALOG_LIB_EDIT_DRAW_ITEM::DIALOG_LIB_EDIT_DRAW_ITEM(), DIALOG_LIB_EDIT_PIN::DIALOG_LIB_EDIT_PIN(), DIALOG_LIB_EDIT_TEXT::DIALOG_LIB_EDIT_TEXT(), DIALOG_LIB_NEW_COMPONENT::DIALOG_LIB_NEW_COMPONENT(), DIALOG_LIST_HOTKEYS::DIALOG_LIST_HOTKEYS(), DIALOG_MOVE_EXACT::DIALOG_MOVE_EXACT(), DIALOG_NETLIST::DIALOG_NETLIST(), DIALOG_NON_COPPER_ZONES_EDITOR::DIALOG_NON_COPPER_ZONES_EDITOR(), DIALOG_PAD_PRIMITIVES_PROPERTIES::DIALOG_PAD_PRIMITIVES_PROPERTIES(), DIALOG_PAD_PROPERTIES::DIALOG_PAD_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_SCH_EDIT_SHEET_PIN::DIALOG_SCH_EDIT_SHEET_PIN(), DIALOG_SCH_SHEET_PROPS::DIALOG_SCH_SHEET_PROPS(), DIALOG_SELECT_NET_FROM_LIST::DIALOG_SELECT_NET_FROM_LIST(), DIALOG_SET_GRID::DIALOG_SET_GRID(), DIALOG_SWAP_LAYERS::DIALOG_SWAP_LAYERS(), DIALOG_TARGET_PROPERTIES::DIALOG_TARGET_PROPERTIES(), DIALOG_TEXT_PROPERTIES::DIALOG_TEXT_PROPERTIES(), DIALOG_TRACK_VIA_PROPERTIES::DIALOG_TRACK_VIA_PROPERTIES(), DIALOG_TRACK_VIA_SIZE::DIALOG_TRACK_VIA_SIZE(), DIALOG_UPDATE_PCB::DIALOG_UPDATE_PCB(), PAGED_DIALOG::finishInitialization(), DIALOG_EDIT_ONE_FIELD::init(), DIALOG_EDIT_LIBRARY_TABLES::InstallPanel(), NETLIST_DIALOG::NETLIST_DIALOG(), DIALOG_GRAPHIC_ITEM_PROPERTIES::OnInitDlg(), DIALOG_SIM_SETTINGS::onInitDlg(), DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnInitDlg(), DIALOG_SPICE_MODEL::onInitDlg(), DIALOG_SIGNAL_LIST::TransferDataToWindow(), DIALOG_UPDATE_FIELDS::TransferDataToWindow(), and DIALOG_COLOR_PICKER::TransferDataToWindow().

130 {
131  // must be called from the constructor of derived classes,
132  // when all widgets are initialized, and therefore their size fixed
133 
134  // SetSizeHints fixes the minimal size of sizers in the dialog
135  // (SetSizeHints calls Fit(), so no need to call it)
136  GetSizer()->SetSizeHints( this );
137 
138  // the default position, when calling the first time the dlg
139  Center();
140 }

◆ getPlotFormat()

PlotFormat DIALOG_PLOT::getPlotFormat ( )
private

Definition at line 348 of file dialog_plot.cpp.

References DIALOG_PLOT_BASE::m_plotFormatOpt, PLOT_FORMAT_DXF, PLOT_FORMAT_GERBER, PLOT_FORMAT_HPGL, PLOT_FORMAT_PDF, PLOT_FORMAT_POST, and PLOT_FORMAT_SVG.

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

349 {
350  // plot format id's are ordered like displayed in m_plotFormatOpt
351  static const PlotFormat plotFmt[] =
352  {
359  };
360 
361  return plotFmt[ m_plotFormatOpt->GetSelection() ];
362 }
PlotFormat
Enum PlotFormat is the set of supported output plot formats.
Definition: plotter.h:50
wxChoice * m_plotFormatOpt

◆ GetUserUnits()

◆ HorizPixelsFromDU()

int DIALOG_SHIM::HorizPixelsFromDU ( int  x)
protectedinherited

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

See SetSizeInDU or wxDialog documentation for more information.

Definition at line 150 of file dialog_shim.cpp.

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

151 {
152  wxSize sz( x, 0 );
153  return ConvertDialogToPixels( sz ).x;
154 }

◆ init_Dialog()

void DIALOG_PLOT::init_Dialog ( )
private

Definition at line 65 of file dialog_plot.cpp.

References CONFIG_PS_FINEWIDTH_ADJ, PCB_PLOT_PARAMS::GetA4Output(), PCB_BASE_FRAME::GetBoard(), PCB_PLOT_PARAMS::GetCreateGerberJobFile(), BOARD::GetDesignSettings(), PCB_PLOT_PARAMS::GetDrillMarksType(), PCB_PLOT_PARAMS::GetDXFPlotPolygonMode(), 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::GetLineWidth(), PCB_PLOT_PARAMS::GetMirror(), PCB_PLOT_PARAMS::GetNegative(), PCB_PLOT_PARAMS::GetPlotFrameRef(), PCB_PLOT_PARAMS::GetPlotInvisibleText(), PCB_PLOT_PARAMS::GetPlotMode(), PCB_PLOT_PARAMS::GetPlotPadsOnSilkLayer(), PCB_PLOT_PARAMS::GetPlotReference(), PCB_PLOT_PARAMS::GetPlotValue(), PCB_PLOT_PARAMS::GetPlotViaOnMaskLayer(), PCB_PLOT_PARAMS::GetScaleSelection(), BOARD_DESIGN_SETTINGS::GetSmallestClearanceValue(), PCB_PLOT_PARAMS::GetSubtractMaskFromSilk(), PCB_PLOT_PARAMS::GetTextMode(), PCB_PLOT_PARAMS::GetUseGerberProtelExtensions(), PCB_PLOT_PARAMS::GetUseGerberX2format(), IU_PER_MILS, KiBitmap(), KiROUND(), DIALOG_PLOT_BASE::m_browseButton, m_config, DIALOG_PLOT_BASE::m_coordFormatCtrl, m_defaultLineWidth, m_defaultPenSize, DIALOG_PLOT_BASE::m_drillShapeOpt, DIALOG_PLOT_BASE::m_DXF_plotModeOpt, DIALOG_PLOT_BASE::m_DXF_plotTextStrokeFontOpt, DIALOG_PLOT_BASE::m_excludeEdgeLayerOpt, DIALOG_PLOT_BASE::m_excludePadsFromSilkscreen, DIALOG_PLOT_BASE::m_fineAdjustXCtrl, DIALOG_PLOT_BASE::m_fineAdjustYCtrl, DIALOG_PLOT_BASE::m_forcePSA4OutputOpt, DIALOG_PLOT_BASE::m_generateGerberJobFile, 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_subtractMaskFromSilk, BOARD_DESIGN_SETTINGS::m_TrackMinWidth, m_trackWidthCorrection, 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(), OPTKEY_PLOT_CHECK_ZONES, OPTKEY_PLOT_X_FINESCALE_ADJ, OPTKEY_PLOT_Y_FINESCALE_ADJ, PLOT_FORMAT_DXF, PLOT_FORMAT_GERBER, PLOT_FORMAT_HPGL, PLOT_FORMAT_PDF, PLOT_FORMAT_POST, PLOT_FORMAT_SVG, PLOT_MAX_SCALE, PLOT_MIN_SCALE, PLOTTEXTMODE_DEFAULT, reInitDialog(), SetPlotFormat(), setPlotModeChoiceSelection(), UNIT_BINDER::SetValue(), StringFromValue(), LSET::UIOrder(), and UNSCALED_UNITS.

Referenced by DIALOG_PLOT().

66 {
67  BOARD* board = m_parent->GetBoard();
68  wxFileName fileName;
69 
72 
73  bool checkZones;
74  m_config->Read( OPTKEY_PLOT_CHECK_ZONES, &checkZones, true );
75  m_zoneFillCheck->SetValue( checkZones );
76 
77  m_browseButton->SetBitmap( KiBitmap( folder_xpm ) );
78 
79  // m_PSWidthAdjust is stored in mm in user config
80  double dtmp;
81  m_config->Read( CONFIG_PS_FINEWIDTH_ADJ, &dtmp, 0 );
82  m_PSWidthAdjust = KiROUND( dtmp * IU_PER_MM );
83 
84  // The reasonable width correction value must be in a range of
85  // [-(MinTrackWidth-1), +(MinClearanceValue-1)] decimils.
88 
89  switch( m_plotOpts.GetFormat() )
90  {
91  default:
92  case PLOT_FORMAT_GERBER: m_plotFormatOpt->SetSelection( 0 ); break;
93  case PLOT_FORMAT_POST: m_plotFormatOpt->SetSelection( 1 ); break;
94  case PLOT_FORMAT_SVG: m_plotFormatOpt->SetSelection( 2 ); break;
95  case PLOT_FORMAT_DXF: m_plotFormatOpt->SetSelection( 3 ); break;
96  case PLOT_FORMAT_HPGL: m_plotFormatOpt->SetSelection( 4 ); break;
97  case PLOT_FORMAT_PDF: m_plotFormatOpt->SetSelection( 5 ); break;
98  }
99 
100  // Set units and value for HPGL pen size (this param is in mils).
102 
104 
105  // Test for a reasonable scale value. Set to 1 if problem
109 
112 
113  // Test for a reasonable PS width correction value. Set to 0 if problem.
114  if( m_PSWidthAdjust < m_widthAdjustMinValue || m_PSWidthAdjust > m_widthAdjustMaxValue )
115  m_PSWidthAdjust = 0.;
116 
118 
121 
122  // Could devote a PlotOrder() function in place of UIOrder().
123  m_layerList = board->GetEnabledLayers().UIOrder();
124 
125  // Populate the check list box by all enabled layers names
126  for( LSEQ seq = m_layerList; seq; ++seq )
127  {
128  PCB_LAYER_ID layer = *seq;
129 
130  int checkIndex = m_layerCheckListBox->Append( board->GetLayerName( layer ) );
131 
132  if( m_plotOpts.GetLayerSelection()[layer] )
133  m_layerCheckListBox->Check( checkIndex );
134  }
135 
136  // Option for using proper Gerber extensions. Note also Protel extensions are
137  // a broken feature. However, for now, we need to handle it.
139 
140  // Option for including Gerber attributes, from Gerber X2 format, in the output
141  // In X1 format, they will be added as comments
143 
144  // Option for including Gerber netlist info (from Gerber X2 format) in the output
146 
147  // Option to generate a Gerber job file
149 
150  // Gerber precision for coordinates
151  m_coordFormatCtrl->SetSelection( m_plotOpts.GetGerberPrecision() == 5 ? 0 : 1 );
152 
153  // Option for excluding contents of "Edges Pcb" layer
155 
156  // Option to exclude pads from silkscreen layers
158 
160 
161  // Option to plot page references:
163 
164  // Options to plot texts on footprints
168 
169  // Options to plot pads and vias holes
170  m_drillShapeOpt->SetSelection( m_plotOpts.GetDrillMarksType() );
171 
172  // Scale option
173  m_scaleOpt->SetSelection( m_plotOpts.GetScaleSelection() );
174 
175  // Plot mode
177 
178  // Plot outline mode
180 
181  // Plot text mode
183 
184  // Plot mirror option
185  m_plotMirrorOpt->SetValue( m_plotOpts.GetMirror() );
186 
187  // Put vias on mask layer
189 
190  // Initialize a few other parameters, which can also be modified
191  // from the drill dialog
192  reInitDialog();
193 
194  // Update options values:
195  wxCommandEvent cmd_event;
196  SetPlotFormat( cmd_event );
197  OnSetScaleOpt( cmd_event );
198 }
LSEQ m_layerList
Definition: dialog_plot.h:48
double m_YScaleAdjust
Definition: dialog_plot.h:51
bool GetCreateGerberJobFile() const
wxCheckBox * m_useGerberExtensions
const wxString GetLayerName(PCB_LAYER_ID aLayer) const
Function GetLayerName returns the name of a layer given by aLayer.
bool GetPlotFrameRef() const
bool GetDXFPlotPolygonMode() const
static int KiROUND(double v)
Round a floating point number to an integer using "round halfway cases away from zero".
Definition: common.h:121
#define OPTKEY_PLOT_Y_FINESCALE_ADJ
Definition: pcbplot.h:61
int GetSmallestClearanceValue()
Function GetSmallestClearanceValue.
wxCheckBox * m_plotPSNegativeOpt
#define PLOT_MIN_SCALE
Definition: pcbplot.h:68
PlotFormat GetFormat() const
wxCheckBox * m_excludeEdgeLayerOpt
BOARD_DESIGN_SETTINGS & GetDesignSettings() const
Function GetDesignSettings.
Definition: class_board.h:539
wxCheckBox * m_plotMirrorOpt
LSET GetEnabledLayers() const
Function GetEnabledLayers is a proxy function that calls the corresponding function in m_BoardSetting...
wxCheckBox * m_zoneFillCheck
wxChoice * m_plotFormatOpt
wxChoice * m_coordFormatCtrl
UNIT_BINDER m_trackWidthCorrection
Definition: dialog_plot.h:62
bool GetUseGerberX2format() const
double m_XScaleAdjust
Definition: dialog_plot.h:49
wxTextCtrl * m_fineAdjustYCtrl
wxCheckBox * m_DXF_plotModeOpt
bool GetMirror() const
wxCheckBox * m_plotSheetRef
wxBitmap KiBitmap(BITMAP_DEF aBitmap)
Construct a wxBitmap from a memory record, held in a BITMAP_DEF.
Definition: bitmap.cpp:79
void SetPlotFormat(wxCommandEvent &event) override
wxTextCtrl * m_fineAdjustXCtrl
PCB_LAYER_ID
A quick note on layer IDs:
bool GetA4Output() const
int GetGerberPrecision() const
#define OPTKEY_PLOT_X_FINESCALE_ADJ
Definition: pcbplot.h:60
PCB_EDIT_FRAME * m_parent
Definition: dialog_plot.h:46
int m_widthAdjustMaxValue
Definition: dialog_plot.h:58
bool GetUseGerberProtelExtensions() const
int m_TrackMinWidth
track min value for width ((min copper size value
#define PLOT_MAX_SCALE
Definition: pcbplot.h:69
bool GetIncludeGerberNetlistInfo() const
int m_PSWidthAdjust
Definition: dialog_plot.h:53
wxCheckBox * m_forcePSA4OutputOpt
#define CONFIG_PS_FINEWIDTH_ADJ
Definition: pcbplot.h:62
void setPlotModeChoiceSelection(EDA_DRAW_MODE_T aPlotMode)
Definition: dialog_plot.h:84
void OnSetScaleOpt(wxCommandEvent &event) override
wxCheckBox * m_useGerberNetAttributes
int m_widthAdjustMinValue
Definition: dialog_plot.h:57
wxCheckBox * m_generateGerberJobFile
Class LSEQ is a sequence (and therefore also a set) of PCB_LAYER_IDs.
wxCheckBox * m_DXF_plotTextStrokeFontOpt
PCB_PLOT_PARAMS m_plotOpts
Definition: dialog_plot.h:64
bool GetPlotValue() const
wxChoice * m_scaleOpt
int GetLineWidth() const
void reInitDialog()
wxCheckBox * m_plotModuleRefOpt
UNIT_BINDER m_defaultLineWidth
Definition: dialog_plot.h:60
wxCheckBox * m_subtractMaskFromSilk
wxCheckBox * m_plotNoViaOnMaskOpt
wxCheckBox * m_plotModuleValueOpt
bool GetPlotViaOnMaskLayer() const
wxChoice * m_drillShapeOpt
Class BOARD holds information pertinent to a Pcbnew printed circuit board.
Definition: class_board.h:171
bool GetSubtractMaskFromSilk() const
virtual void SetValue(int aValue)
Function SetValue Sets new value (in Internal Units) for the text field, taking care of units convers...
wxCheckBox * m_plotInvisibleText
double GetHPGLPenDiameter() const
#define IU_PER_MILS
Definition: plotter.cpp:134
PlotTextMode GetTextMode() const
bool GetPlotInvisibleText() const
wxConfigBase * m_config
Definition: dialog_plot.h:47
wxString StringFromValue(EDA_UNITS_T aUnits, int aValue, bool aAddUnitSymbol, bool aUseMils)
Function StringFromValue returns the string from aValue according to units (inch, mm ...
Definition: base_units.cpp:210
int GetScaleSelection() const
wxCheckBox * m_excludePadsFromSilkscreen
bool GetPlotPadsOnSilkLayer() const
#define OPTKEY_PLOT_CHECK_ZONES
Definition: pcbplot.h:63
UNIT_BINDER m_defaultPenSize
Definition: dialog_plot.h:61
wxBitmapButton * m_browseButton
bool GetNegative() const
wxCheckBox * m_useGerberX2Format
BOARD * GetBoard() const
wxCheckListBox * m_layerCheckListBox
LSET GetLayerSelection() const
LSEQ UIOrder() const
Definition: lset.cpp:803
DrillMarksType GetDrillMarksType() const
bool GetPlotReference() const
bool GetExcludeEdgeLayer() const
EDA_DRAW_MODE_T GetPlotMode() const

◆ IsQuasiModal()

◆ Kiway()

KIWAY& KIWAY_HOLDER::Kiway ( ) const
inlineinherited

Function Kiway returns 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 60 of file kiway_player.h.

References KIWAY_HOLDER::m_kiway.

Referenced by TREEPROJECT_ITEM::Activate(), PCB_BASE_EDIT_FRAME::AddLibrary(), SCH_EDIT_FRAME::AppendSchematic(), CVPCB_MAINFRAME::BuildLIBRARY_LISTBOX(), DIALOG_CHOOSE_FOOTPRINT::ConstructRightPanel(), DIALOG_CHOOSE_COMPONENT::ConstructRightPanel(), PCB_BASE_FRAME::CreateAndShow3D_Frame(), CVPCB_MAINFRAME::CreateScreenCmp(), SCH_EDIT_FRAME::CreateScreens(), CVPCB_MAINFRAME::CVPCB_MAINFRAME(), DIALOG_RESCUE_EACH::DIALOG_RESCUE_EACH(), DIALOG_SHIM::DIALOG_SHIM(), FIELDS_GRID_TRICKS::doPopupSelection(), FIELDS_EDITOR_GRID_TRICKS::doPopupSelection(), SCH_EDIT_FRAME::doUpdatePcb(), EDIT_TOOL::editFootprintInFpEditor(), SCH_EDIT_FRAME::EditSheet(), DISPLAY_FOOTPRINTS_FRAME::Get_Module(), LIB_MANAGER::GetBufferedPart(), LIB_MANAGER::getLibraryBuffer(), FOOTPRINT_EDIT_FRAME::GetPlotSettings(), PCB_EDIT_FRAME::importFile(), SCH_EDIT_FRAME::importFile(), SCH_EDIT_FRAME::KiwayMailIn(), KIWAY_PLAYER::language_change(), KICAD_MANAGER_FRAME::language_change(), CVPCB_MAINFRAME::LoadFootprintFiles(), KICAD_MANAGER_FRAME::LoadProject(), TEXT_BUTTON_SYMBOL_CHOOSER::OnButtonClick(), TEXT_BUTTON_FP_CHOOSER::OnButtonClick(), KICAD_MANAGER_FRAME::OnCloseWindow(), SCH_EDIT_FRAME::OnCloseWindow(), CVPCB_MAINFRAME::OnEditFootprintLibraryTable(), KICAD_MANAGER_FRAME::OnEditFpLibTable(), SCH_BASE_FRAME::OnEditSymbolLibTable(), KICAD_MANAGER_FRAME::OnEditSymLibTable(), KICAD_MANAGER_FRAME::OnImportEagleFiles(), DIALOG_CHOOSE_COMPONENT::OnInitDialog(), SCH_EDIT_FRAME::OnLeftClick(), SCH_EDIT_FRAME::OnOpenCvpcb(), SCH_EDIT_FRAME::OnOpenLibraryEditor(), SCH_BASE_FRAME::OnOpenLibraryViewer(), SCH_EDIT_FRAME::OnOpenPcbModuleEditor(), SCH_EDIT_FRAME::OnOpenPcbnew(), KICAD_MANAGER_FRAME::OnRunPcbFpEditor(), KICAD_MANAGER_FRAME::OnRunSchLibEditor(), SCH_EDIT_FRAME::OnSimulate(), DIALOG_EDIT_ONE_FIELD::OnTextValueSelectButtonClick(), FOOTPRINT_EDIT_FRAME::OnUpdateInsertModuleInBoard(), FOOTPRINT_EDIT_FRAME::OnUpdateLoadModuleFromBoard(), SCH_EDIT_FRAME::OpenProjectFiles(), KIWAY_HOLDER::Prj(), PCB_EDIT_FRAME::Process_Config(), PCB_EDIT_FRAME::Process_Special_Functions(), FOOTPRINT_EDIT_FRAME::ProcessPreferences(), CVPCB_MAINFRAME::ReadNetListAndFpFiles(), FOOTPRINT_VIEWER_FRAME::ReCreateFootprintList(), LIB_EDIT_FRAME::refreshSchematic(), SCH_EDIT_FRAME::rescueProject(), KICAD_MANAGER_FRAME::RunEeschema(), KICAD_MANAGER_FRAME::RunPcbNew(), SCH_EDIT_FRAME::SaveEEFile(), CVPCB_MAINFRAME::SaveFootprintAssociation(), FOOTPRINT_EDIT_FRAME::SaveFootprintToBoard(), SCH_BASE_FRAME::SelectComponentFromLibBrowser(), SCH_EDIT_FRAME::SendCrossProbeNetName(), PCB_EDIT_FRAME::SendCrossProbeNetName(), CVPCB_MAINFRAME::SendMessageToEESCHEMA(), PCB_EDIT_FRAME::SendMessageToEESCHEMA(), SCH_EDIT_FRAME::SendMessageToPCBNEW(), SCH_EDIT_FRAME::sendNetlist(), FOOTPRINT_EDIT_FRAME::SetPlotSettings(), FOOTPRINT_VIEWER_FRAME::Show3D_Frame(), FOOTPRINT_WIZARD_FRAME::Show3D_Frame(), EDA_BASE_FRAME::ShowPreferences(), SIM_PLOT_FRAME::SIM_PLOT_FRAME(), LIB_MANAGER::UpdatePart(), and DIALOG_EXCHANGE_FOOTPRINTS::ViewAndSelectFootprint().

61  {
62  wxASSERT( m_kiway ); // smoke out bugs in Debug build, then Release runs fine.
63  return *m_kiway;
64  }
KIWAY * m_kiway
Definition: kiway_player.h:94

◆ OnChangeDXFPlotMode()

void DIALOG_PLOT::OnChangeDXFPlotMode ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_PLOT_BASE.

Definition at line 289 of file dialog_plot.cpp.

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

Referenced by SetPlotFormat().

290 {
291  // m_DXF_plotTextStrokeFontOpt is disabled if m_DXF_plotModeOpt
292  // is checked (plot in DXF polygon mode)
293  m_DXF_plotTextStrokeFontOpt->Enable( !m_DXF_plotModeOpt->GetValue() );
294 
295  // if m_DXF_plotTextStrokeFontOpt option is disabled (plot DXF in polygon mode),
296  // force m_DXF_plotTextStrokeFontOpt to true to use Pcbnew stroke font
297  if( !m_DXF_plotTextStrokeFontOpt->IsEnabled() )
298  m_DXF_plotTextStrokeFontOpt->SetValue( true );
299 }
wxCheckBox * m_DXF_plotModeOpt
wxCheckBox * m_DXF_plotTextStrokeFontOpt

◆ OnGerberX2Checked()

void DIALOG_PLOT::OnGerberX2Checked ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_PLOT_BASE.

Definition at line 701 of file dialog_plot.cpp.

702 {
703  // Currently: do nothing
704 }

◆ OnInitDialog()

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

Definition at line 123 of file dialog_plot_base.h.

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

123 { event.Skip(); }

◆ OnOutputDirectoryBrowseClicked()

void DIALOG_PLOT::OnOutputDirectoryBrowseClicked ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_PLOT_BASE.

Definition at line 314 of file dialog_plot.cpp.

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

315 {
316  // Build the absolute path of current output plot directory
317  // to preselect it when opening the dialog.
318  wxFileName fn( m_outputDirectoryName->GetValue() );
319  wxString path = Prj().AbsolutePath( m_outputDirectoryName->GetValue() );
320 
321  wxDirDialog dirDialog( this, _( "Select Output Directory" ), path );
322 
323  if( dirDialog.ShowModal() == wxID_CANCEL )
324  return;
325 
326  wxFileName dirName = wxFileName::DirName( dirDialog.GetPath() );
327 
328  fn = Prj().AbsolutePath( m_parent->GetBoard()->GetFileName() );
329  wxString defaultPath = fn.GetPathWithSep();
330  wxString msg;
331  msg.Printf( _( "Do you want to use a path relative to\n\"%s\"" ),
332  GetChars( defaultPath ) );
333 
334  wxMessageDialog dialog( this, msg, _( "Plot Output Directory" ),
335  wxYES_NO | wxICON_QUESTION | wxYES_DEFAULT );
336 
337  if( dialog.ShowModal() == wxID_YES )
338  {
339  if( !dirName.MakeRelativeTo( defaultPath ) )
340  wxMessageBox( _( "Cannot make path relative (target volume different from file volume)!" ),
341  _( "Plot Output Directory" ), wxOK | wxICON_ERROR );
342  }
343 
344  m_outputDirectoryName->SetValue( dirName.GetFullPath() );
345 }
const wxString & GetFileName() const
Definition: class_board.h:238
VTBL_ENTRY const wxString AbsolutePath(const wxString &aFileName) const
Function AbsolutePath fixes up aFileName if it is relative to the project&#39;s directory to be an absolu...
Definition: project.cpp:380
PCB_EDIT_FRAME * m_parent
Definition: dialog_plot.h:46
PROJECT & Prj() const
Function Prj returns a reference to the PROJECT "associated with" this KIWAY.
wxTextCtrl * m_outputDirectoryName
static const wxChar * GetChars(const wxString &s)
Function GetChars returns a wxChar* to the actual wxChar* data within a wxString, and is helpful for ...
Definition: macros.h:92
BOARD * GetBoard() const

◆ OnPaint()

void DIALOG_SHIM::OnPaint ( wxPaintEvent &  event)
inherited

Definition at line 292 of file dialog_shim.cpp.

References DIALOG_SHIM::m_firstPaintEvent, and DIALOG_SHIM::m_initialFocusTarget.

Referenced by DIALOG_SHIM::DIALOG_SHIM().

293 {
294  if( m_firstPaintEvent )
295  {
296 #ifdef __WXMAC__
297  fixOSXCancelButtonIssue( this );
298  selectAllInTextCtrls( GetChildren() );
299 #endif
300 
302  m_initialFocusTarget->SetFocus();
303  else
304  SetFocus(); // Focus the dialog itself
305 
306  m_firstPaintEvent = false;
307  }
308 
309  event.Skip();
310 }
wxWindow * m_initialFocusTarget
Definition: dialog_shim.h:180
bool m_firstPaintEvent
Definition: dialog_shim.h:179

◆ OnPopUpLayers()

void DIALOG_PLOT::OnPopUpLayers ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_PLOT_BASE.

Definition at line 223 of file dialog_plot.cpp.

References LSET::AllCuMask(), LSET::AllTechMask(), B_CrtYd, F_CrtYd, i, 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.

224 {
225  // Build a list of layers for usual fabrication:
226  // copper layers + tech layers without courtyard
227  LSET fab_layer_set = ( LSET::AllCuMask() | LSET::AllTechMask() )
228  & ~LSET( 2, B_CrtYd, F_CrtYd );
229 
230  switch( event.GetId() )
231  {
232  case ID_LAYER_FAB: // Select layers usually needed to build a board
233  for( unsigned i = 0; i < m_layerList.size(); i++ )
234  {
235  LSET layermask( m_layerList[ i ] );
236 
237  if( ( layermask & fab_layer_set ).any() )
238  m_layerCheckListBox->Check( i, true );
239  else
240  m_layerCheckListBox->Check( i, false );
241  }
242  break;
243 
245  for( unsigned i = 0; i < m_layerList.size(); i++ )
246  {
247  if( IsCopperLayer( m_layerList[i] ) )
248  m_layerCheckListBox->Check( i, true );
249  }
250  break;
251 
253  for( unsigned i = 0; i < m_layerList.size(); i++ )
254  {
255  if( IsCopperLayer( m_layerList[i] ) )
256  m_layerCheckListBox->Check( i, false );
257  }
258  break;
259 
261  for( unsigned i = 0; i < m_layerList.size(); i++ )
262  m_layerCheckListBox->Check( i, true );
263  break;
264 
266  for( unsigned i = 0; i < m_layerList.size(); i++ )
267  m_layerCheckListBox->Check( i, false );
268  break;
269 
270  default:
271  break;
272  }
273 }
static LSET AllCuMask(int aCuLayerCount=MAX_CU_LAYERS)
Function AllCuMask returns a mask holding the requested number of Cu PCB_LAYER_IDs.
Definition: lset.cpp:676
LSEQ m_layerList
Definition: dialog_plot.h:48
static LSET AllTechMask()
Function AllTechMask returns a mask holding all technical layers (no CU layer) on both side...
Definition: lset.cpp:746
Class LSET is a set of PCB_LAYER_IDs.
size_t i
Definition: json11.cpp:597
bool IsCopperLayer(LAYER_NUM aLayerId)
Function IsCopperLayer tests whether a layer is a copper layer.
wxCheckListBox * m_layerCheckListBox

◆ OnRightClick()

void DIALOG_PLOT::OnRightClick ( wxMouseEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_PLOT_BASE.

Definition at line 215 of file dialog_plot.cpp.

References DIALOG_PLOT_BASE::m_popMenu.

216 {
217  PopupMenu( m_popMenu );
218 }

◆ onRunDRC()

void DIALOG_PLOT::onRunDRC ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_PLOT_BASE.

Definition at line 857 of file dialog_plot.cpp.

References DRC::DestroyDRCDialog(), PCB_EDIT_FRAME::GetDrcController(), and DRC::ShowDRCDialog().

858 {
859  PCB_EDIT_FRAME* parent = dynamic_cast<PCB_EDIT_FRAME*>( GetParent() );
860 
861  if( parent )
862  {
863  // First close an existing dialog if open
864  // (low probability, but can happen)
865  parent->GetDrcController()->DestroyDRCDialog( wxID_OK );
866 
867  // Open a new drc dialod, with the right parent frame, and in Modal Mode
868  parent->GetDrcController()->ShowDRCDialog( this );
869  }
870 }
void DestroyDRCDialog(int aReason)
Deletes this ui dialog box and zeros out its pointer to remember the state of the dialog&#39;s existence...
Definition: drc.cpp:119
void ShowDRCDialog(wxWindow *aParent=NULL)
Open a dialog and prompts the user, then if a test run button is clicked, runs the test(s) and create...
Definition: drc.cpp:61
Class PCB_EDIT_FRAME is the main frame for Pcbnew.
DRC * GetDrcController()
Function GetDrcController.

◆ OnSetScaleOpt()

void DIALOG_PLOT::OnSetScaleOpt ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_PLOT_BASE.

Definition at line 302 of file dialog_plot.cpp.

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

Referenced by init_Dialog(), and SetPlotFormat().

303 {
304  /* Disable sheet reference for scale != 1:1 */
305  bool scale1 = ( m_scaleOpt->GetSelection() == 1 );
306 
307  m_plotSheetRef->Enable( scale1 );
308 
309  if( !scale1 )
310  m_plotSheetRef->SetValue( false );
311 }
wxCheckBox * m_plotSheetRef
wxChoice * m_scaleOpt

◆ Plot()

void DIALOG_PLOT::Plot ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_PLOT_BASE.

Definition at line 707 of file dialog_plot.cpp.

References GERBER_JOBFILE_WRITER::AddGbrFile(), LSET::AllCuMask(), applyPlotSettings(), BuildPlotFileName(), PCB_EDIT_FRAME::Check_All_Zones(), GERBER_JOBFILE_WRITER::CreateJobFile(), DisplayError(), DisplayInfoMessage(), dummy(), PLOTTER::EndPlot(), EnsureFileDirectoryExists(), GerberJobFileExtension, PCB_BASE_FRAME::GetBoard(), GetChars(), PCB_PLOT_PARAMS::GetCreateGerberJobFile(), GetDefaultPlotExtension(), BOARD::GetEnabledLayers(), BOARD::GetFileName(), PCB_PLOT_PARAMS::GetFormat(), GetGerberProtelExtension(), BOARD::GetLayerName(), PCB_PLOT_PARAMS::GetLayerSelection(), PCB_PLOT_PARAMS::GetOutputDirectory(), getPlotFormat(), PCB_PLOT_PARAMS::GetScale(), PCB_PLOT_PARAMS::GetScaleSelection(), 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, PLOT_FORMAT_GERBER, PLOT_FORMAT_POST, PLOT_MAX_SCALE, PLOT_MIN_SCALE, PlotOneBoardLayer(), REPORTER::Report(), WX_HTML_REPORT_PANEL::Reporter(), REPORTER::RPT_ACTION, REPORTER::RPT_ERROR, PCB_PLOT_PARAMS::SetAutoScale(), PCB_PLOT_PARAMS::SetFineScaleAdjustX(), PCB_PLOT_PARAMS::SetFineScaleAdjustY(), PCB_BASE_FRAME::SetPlotSettings(), PCB_PLOT_PARAMS::SetScale(), PCB_PLOT_PARAMS::SetWidthAdjust(), StartPlotBoard(), and LSET::UIOrder().

708 {
709  BOARD* board = m_parent->GetBoard();
710 
712 
713  // If no layer selected, we have nothing plotted.
714  // Prompt user if it happens because he could think there is a bug in Pcbnew.
715  if( !m_plotOpts.GetLayerSelection().any() )
716  {
717  DisplayError( this, _( "No layer selected, Nothing to plot" ) );
718  return;
719  }
720 
721  // Create output directory if it does not exist (also transform it in
722  // absolute form). Bail if it fails
723  wxFileName outputDir = wxFileName::DirName( m_plotOpts.GetOutputDirectory() );
724  wxString boardFilename = m_parent->GetBoard()->GetFileName();
725  REPORTER& reporter = m_messagesPanel->Reporter();
726 
727  if( !EnsureFileDirectoryExists( &outputDir, boardFilename, &reporter ) )
728  {
729  wxString msg;
730  msg.Printf( _( "Could not write plot files to folder \"%s\"." ),
731  GetChars( outputDir.GetPath() ) );
732  DisplayError( this, msg );
733  return;
734  }
735 
736  if( m_zoneFillCheck->GetValue() )
737  m_parent->Check_All_Zones( this );
738 
739  m_plotOpts.SetAutoScale( false );
740  m_plotOpts.SetScale( 1 );
741 
742  switch( m_plotOpts.GetScaleSelection() )
743  {
744  default:
745  break;
746 
747  case 0: // Autoscale option
748  m_plotOpts.SetAutoScale( true );
749  break;
750 
751  case 2: // 3:2 option
752  m_plotOpts.SetScale( 1.5 );
753  break;
754 
755  case 3: // 2:1 option
756  m_plotOpts.SetScale( 2 );
757  break;
758 
759  case 4: // 3:1 option
760  m_plotOpts.SetScale( 3 );
761  break;
762  }
763 
764  /* If the scale factor edit controls are disabled or the scale value
765  * is 0, don't adjust the base scale factor. This fixes a bug when
766  * the default scale adjust is initialized to 0 and saved in program
767  * settings resulting in a divide by zero fault.
768  */
770  {
771  if( m_XScaleAdjust != 0.0 )
773 
774  if( m_YScaleAdjust != 0.0 )
776 
778  }
779 
780  wxString file_ext( GetDefaultPlotExtension( m_plotOpts.GetFormat() ) );
781 
782  // Test for a reasonable scale value
783  // XXX could this actually happen? isn't it constrained in the apply
784  // function?
786  DisplayInfoMessage( this, _( "Warning: Scale option set to a very small value" ) );
787 
789  DisplayInfoMessage( this, _( "Warning: Scale option set to a very large value" ) );
790 
791  GERBER_JOBFILE_WRITER jobfile_writer( board, &reporter );
792 
793  // Save the current plot options in the board
795 
796  wxBusyCursor dummy;
797 
798  for( LSEQ seq = m_plotOpts.GetLayerSelection().UIOrder(); seq; ++seq )
799  {
800  PCB_LAYER_ID layer = *seq;
801 
802  // All copper layers that are disabled are actually selected
803  // This is due to wonkyness in automatically selecting copper layers
804  // for plotting when adding more than two layers to a board.
805  // If plot options become accessible to the layers setup dialog
806  // please move this functionality there!
807  // This skips a copper layer if it is actually disabled on the board.
808  if( ( LSET::AllCuMask() & ~board->GetEnabledLayers() )[layer] )
809  continue;
810 
811  // Pick the basename from the board file
812  wxFileName fn( boardFilename );
813 
814  // Use Gerber Extensions based on layer number
815  // (See http://en.wikipedia.org/wiki/Gerber_File)
817  file_ext = GetGerberProtelExtension( layer );
818 
819  BuildPlotFileName( &fn, outputDir.GetPath(), board->GetLayerName( layer ), file_ext );
820  wxString fullname = fn.GetFullName();
821  jobfile_writer.AddGbrFile( layer, fullname );
822 
823  LOCALE_IO toggle;
824 
825  PLOTTER* plotter = StartPlotBoard( board, &m_plotOpts, layer, fn.GetFullPath(), wxEmptyString );
826 
827  // Print diags in messages box:
828  wxString msg;
829 
830  if( plotter )
831  {
832  PlotOneBoardLayer( board, plotter, layer, m_plotOpts );
833  plotter->EndPlot();
834  delete plotter;
835 
836  msg.Printf( _( "Plot file \"%s\" created." ), GetChars( fn.GetFullPath() ) );
837  reporter.Report( msg, REPORTER::RPT_ACTION );
838  }
839  else
840  {
841  msg.Printf( _( "Unable to create file \"%s\"." ), GetChars( fn.GetFullPath() ) );
842  reporter.Report( msg, REPORTER::RPT_ERROR );
843  }
844  }
845 
847  {
848  // Pick the basename from the board file
849  wxFileName fn( boardFilename );
850  // Build gerber job file from basename
851  BuildPlotFileName( &fn, outputDir.GetPath(), "job", GerberJobFileExtension );
852  jobfile_writer.CreateJobFile( fn.GetFullPath() );
853  }
854 }
static LSET AllCuMask(int aCuLayerCount=MAX_CU_LAYERS)
Function AllCuMask returns a mask holding the requested number of Cu PCB_LAYER_IDs.
Definition: lset.cpp:676
WX_HTML_REPORT_PANEL * m_messagesPanel
double m_YScaleAdjust
Definition: dialog_plot.h:51
bool GetCreateGerberJobFile() const
wxCheckBox * m_useGerberExtensions
const wxString GetLayerName(PCB_LAYER_ID aLayer) const
Function GetLayerName returns the name of a layer given by aLayer.
Instantiate the current locale within a scope in which you are expecting exceptions to be thrown...
Definition: common.h:180
void PlotOneBoardLayer(BOARD *aBoard, PLOTTER *aPlotter, PCB_LAYER_ID aLayer, const PCB_PLOT_PARAMS &aPlotOpt)
Function PlotOneBoardLayer main function to plot one copper or technical layer.
#define PLOT_MIN_SCALE
Definition: pcbplot.h:68
PlotFormat getPlotFormat()
wxString GetDefaultPlotExtension(PlotFormat aFormat)
Returns the default plot extension for a format.
void Check_All_Zones(wxWindow *aActiveWindow)
Function Check_All_Zones Checks for out-of-date fills and fills them if requested by the user...
PlotFormat GetFormat() const
const wxString GetGerberProtelExtension(LAYER_NUM aLayer)
Function GetGerberProtelExtension.
Definition: pcbplot.cpp:48
LSET GetEnabledLayers() const
Function GetEnabledLayers is a proxy function that calls the corresponding function in m_BoardSetting...
wxCheckBox * m_zoneFillCheck
Class REPORTER is a pure virtual class used to derive REPORTER objects from.
Definition: reporter.h:61
const wxString & GetFileName() const
Definition: class_board.h:238
double GetScale() const
double m_XScaleAdjust
Definition: dialog_plot.h:49
virtual bool EndPlot()=0
PCB_LAYER_ID
A quick note on layer IDs:
GERBER_JOBFILE_WRITER is a class used to create Gerber job file a Gerber job file stores info to make...
PCB_EDIT_FRAME * m_parent
Definition: dialog_plot.h:46
bool EnsureFileDirectoryExists(wxFileName *aTargetFullFileName, const wxString &aBaseFilename, REPORTER *aReporter)
Make aTargetFullFileName absolute and create the path of this file if it doesn&#39;t yet exist...
Definition: common.cpp:485
REPORTER & Reporter()
returns the reporter object that reports to this panel
#define PLOT_MAX_SCALE
Definition: pcbplot.h:69
int m_PSWidthAdjust
Definition: dialog_plot.h:53
const std::string GerberJobFileExtension
virtual void SetPlotSettings(const PCB_PLOT_PARAMS &aSettings)
void SetScale(double aVal)
Class LSEQ is a sequence (and therefore also a set) of PCB_LAYER_IDs.
PCB_PLOT_PARAMS m_plotOpts
Definition: dialog_plot.h:64
wxString GetOutputDirectory() const
void SetFineScaleAdjustX(double aVal)
void BuildPlotFileName(wxFileName *aFilename, const wxString &aOutputDir, const wxString &aSuffix, const wxString &aExtension)
Function BuildPlotFileName (helper function) Complete a plot filename: forces the output directory...
Definition: pcbplot.cpp:371
Base plotter engine class.
Definition: plotter.h:97
static const wxChar * GetChars(const wxString &s)
Function GetChars returns a wxChar* to the actual wxChar* data within a wxString, and is helpful for ...
Definition: macros.h:92
void applyPlotSettings()
void SetWidthAdjust(int aVal)
static LIB_PART * dummy()
Used when a LIB_PART is not found in library to draw a dummy shape This component is a 400 mils squar...
Class BOARD holds information pertinent to a Pcbnew printed circuit board.
Definition: class_board.h:171
void SetAutoScale(bool aFlag)
void SetFineScaleAdjustY(double aVal)
virtual REPORTER & Report(const wxString &aText, SEVERITY aSeverity=RPT_UNDEFINED)=0
Function Report is a pure virtual function to override in the derived object.
int GetScaleSelection() const
PLOTTER * StartPlotBoard(BOARD *aBoard, 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...
BOARD * GetBoard() const
LSET GetLayerSelection() const
LSEQ UIOrder() const
Definition: lset.cpp:803
void DisplayInfoMessage(wxWindow *aParent, const wxString &aMessage, const wxString &aExtraInfo)
Function DisplayInfoMessage displays an informational message box with aMessage.
Definition: confirm.cpp:277
void DisplayError(wxWindow *parent, const wxString &text, int displaytime)
Function DisplayError displays an error or warning message box with aMessage.
Definition: confirm.cpp:245

◆ Prj()

PROJECT & KIWAY_HOLDER::Prj ( ) const
inherited

Function Prj returns a reference to the PROJECT "associated with" this KIWAY.

Definition at line 34 of file kiway_holder.cpp.

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

Referenced by PCB_BASE_EDIT_FRAME::AddLibrary(), LIB_MANAGER::addLibrary(), SCH_EDIT_FRAME::AppendSchematic(), PCB_EDIT_FRAME::ArchiveModulesOnBoard(), DIALOG_SYMBOL_REMAP::backupProject(), LIB_VIEW_FRAME::BestZoom(), CVPCB_MAINFRAME::BuildLIBRARY_LISTBOX(), DIALOG_FOOTPRINT_FP_EDITOR::Cfg3DPath(), DIALOG_FOOTPRINT_BOARD_EDITOR::Cfg3DPath(), DIALOG_EDIT_COMPONENT_IN_LIBRARY::checkAliasName(), PCB_BASE_EDIT_FRAME::CreateNewLibrary(), KICAD_MANAGER_FRAME::CreateNewProject(), DIALOG_PLOT_SCHEMATIC::createPlotFileName(), DIALOG_SYMBOL_REMAP::createProjectSymbolLibTable(), FOOTPRINT_EDIT_FRAME::DeleteModuleFromLibrary(), DIALOG_CHOOSE_COMPONENT::DIALOG_CHOOSE_COMPONENT(), DIALOG_CHOOSE_FOOTPRINT::DIALOG_CHOOSE_FOOTPRINT(), DIALOG_CONFIG_EQUFILES::DIALOG_CONFIG_EQUFILES(), DIALOG_FOOTPRINT_BOARD_EDITOR::DIALOG_FOOTPRINT_BOARD_EDITOR(), DIALOG_FOOTPRINT_FP_EDITOR::DIALOG_FOOTPRINT_FP_EDITOR(), DIALOG_PAGES_SETTINGS::DIALOG_PAGES_SETTINGS(), DIALOG_SYMBOL_REMAP::DIALOG_SYMBOL_REMAP(), LIB_VIEW_FRAME::DisplayLibInfos(), SCH_BASE_FRAME::DisplayListComponentsInLib(), PCB_EDIT_FRAME::doAutoSave(), SCH_EDIT_FRAME::doUpdatePcb(), SCH_EDIT_FRAME::EditSheet(), PCB_EDIT_FRAME::Export_IDF3(), PCB_EDIT_FRAME::ExportVRML_File(), PCB_EDIT_FRAME::Files_io_from_id(), PCB_EDIT_FRAME::GenD356File(), NETLIST_DIALOG::GenNetlist(), DISPLAY_FOOTPRINTS_FRAME::Get_Module(), FOOTPRINT_VIEWER_FRAME::getCurFootprintName(), LIB_EDIT_FRAME::GetCurLib(), FOOTPRINT_VIEWER_FRAME::getCurNickname(), SCH_BASE_FRAME::GetLibAlias(), SCH_BASE_FRAME::GetLibPart(), DIALOG_SYMBOL_REMAP::getLibsNotInGlobalSymbolLibTable(), KICAD_MANAGER_FRAME::GetProjectFileName(), LIB_VIEW_FRAME::getSelectedAlias(), FP_THREAD_IFACE::GetTable(), PCB_EDIT_FRAME::importFile(), SCH_EDIT_FRAME::importFile(), FOOTPRINT_EDIT_FRAME::initLibraryTree(), PCB_EDIT_FRAME::InstallNetlistFrame(), SCH_EDIT_FRAME::IsSearchCacheObsolete(), LIB_EDIT_FRAME::KiwayMailIn(), EDA_DRAW_FRAME::LibraryFileBrowser(), SCH_EDIT_FRAME::Load_Component(), SCH_EDIT_FRAME::LoadCmpToFootprintLinkFile(), LIB_EDIT_FRAME::LoadComponentFromCurrentLib(), CVPCB_MAINFRAME::LoadFootprintFiles(), DIALOG_SPICE_MODEL::loadLibrary(), LIB_EDIT_FRAME::LoadOneSymbol(), KICAD_MANAGER_FRAME::LoadProject(), CVPCB_MAINFRAME::LoadProjectFile(), SCH_EDIT_FRAME::LoadProjectFile(), PCB_EDIT_FRAME::LoadProjectSettings(), DIALOG_DRC_CONTROL::makeValidFileNameReport(), DIALOG_FOOTPRINT_FP_EDITOR::On3DModelCellChanged(), DIALOG_FOOTPRINT_BOARD_EDITOR::On3DModelCellChanged(), FOOTPRINT_VIEWER_FRAME::OnActivate(), DIALOG_FOOTPRINT_FP_EDITOR::OnAdd3DModel(), DIALOG_FOOTPRINT_BOARD_EDITOR::OnAdd3DModel(), DIALOG_GENCAD_EXPORT_OPTIONS::onBrowse(), KICAD_MANAGER_FRAME::OnBrowseInFileExplorer(), DIALOG_DRC_CONTROL::OnButtonBrowseRptFileClick(), DIALOG_EDIT_COMPONENTS_LIBID::onClickOrphansButton(), SCH_EDIT_FRAME::OnCloseWindow(), CVPCB_MAINFRAME::OnConfigurePaths(), FOOTPRINT_EDIT_FRAME::OnConfigurePaths(), KICAD_MANAGER_FRAME::OnCreateProjectFromTemplate(), CVPCB_MAINFRAME::OnEditFootprintLibraryTable(), DIALOG_GENDRILL::OnGenReportFile(), SCH_EDIT_FRAME::OnImportProject(), DIALOG_CHOOSE_COMPONENT::OnInitDialog(), SCH_EDIT_FRAME::OnLoadProject(), SCH_EDIT_FRAME::OnOpenCvpcb(), KICAD_MANAGER_FRAME::OnOpenFileInTextEditor(), SCH_EDIT_FRAME::OnOpenLibraryEditor(), DIALOG_NETLIST::OnOpenNetlistClick(), SCH_EDIT_FRAME::OnOpenPcbModuleEditor(), SCH_EDIT_FRAME::OnOpenPcbnew(), DIALOG_EXPORT_SVG::OnOutputDirectoryBrowseClicked(), OnOutputDirectoryBrowseClicked(), DIALOG_GENDRILL::OnOutputDirectoryBrowseClicked(), DIALOG_PLOT_SCHEMATIC::OnOutputDirectoryBrowseClicked(), DIALOG_GEN_FOOTPRINT_POSITION::OnOutputDirectoryBrowseClicked(), LIB_EDIT_FRAME::OnPlotCurrentComponent(), SCH_EDIT_FRAME::OnPrint(), DIALOG_SYMBOL_REMAP::OnRemapSymbols(), SCH_EDIT_FRAME::OnRightClick(), KICAD_MANAGER_FRAME::OnRunGerbview(), DIALOG_BOM::OnRunPlugin(), FOOTPRINT_EDIT_FRAME::OnSaveFootprintAsPng(), KICAD_MANAGER_FRAME::OnSaveProject(), DIALOG_SPICE_MODEL::onSelectLibrary(), LIB_VIEW_FRAME::OnSelectSymbol(), KICAD_MANAGER_FRAME::OnUnarchiveFiles(), LIB_EDIT_FRAME::OnViewEntryDoc(), LIB_VIEW_FRAME::onViewSymbolDocument(), SCH_EDIT_FRAME::OpenProjectFiles(), PCB_EDIT_FRAME::OpenProjectFiles(), PANEL_PREV_3D::PANEL_PREV_3D(), SCH_EDIT_FRAME::PasteListOfItems(), PCB_BASE_EDIT_FRAME::PCB_BASE_EDIT_FRAME(), DIALOG_CHOOSE_COMPONENT::PopulateFootprintSelector(), SCH_EDIT_FRAME::PrintPage(), SCH_EDIT_FRAME::Process_Config(), CVPCB_MAINFRAME::ReadNetListAndFpFiles(), PCB_EDIT_FRAME::RecreateCmpFileFromBoard(), FOOTPRINT_VIEWER_FRAME::ReCreateFootprintList(), FOOTPRINT_VIEWER_FRAME::ReCreateLibraryList(), LIB_VIEW_FRAME::ReCreateListCmp(), LIB_VIEW_FRAME::ReCreateListLib(), EDA_3D_VIEWER::ReloadRequest(), DIALOG_SYMBOL_REMAP::remapSymbolToLibTable(), SCH_EDIT_FRAME::RescueLegacyProject(), SCH_EDIT_FRAME::RescueSymbolLibTableProject(), FOOTPRINT_EDIT_FRAME::restoreLastFootprint(), FOOTPRINT_EDIT_FRAME::retainLastFootprint(), SCH_EDIT_FRAME::SaveEEFile(), FOOTPRINT_EDIT_FRAME::SaveFootprint(), FOOTPRINT_EDIT_FRAME::SaveFootprintAs(), FOOTPRINT_EDIT_FRAME::saveFootprintInLibrary(), LIB_EDIT_FRAME::saveLibrary(), LIB_EDIT_FRAME::SaveOneSymbol(), LIB_EDIT_FRAME::savePartAs(), SCH_EDIT_FRAME::SaveProject(), CVPCB_MAINFRAME::SaveProjectFile(), SCH_EDIT_FRAME::SaveProjectSettings(), PCB_EDIT_FRAME::SaveProjectSettings(), SCH_BASE_FRAME::saveSymbolLibTables(), FOOTPRINT_VIEWER_FRAME::SelectAndViewFootprint(), SCH_BASE_FRAME::SelectComponentFromLibTree(), PCB_BASE_FRAME::SelectLibrary(), SCH_BASE_FRAME::SelectLibraryFromList(), LIB_EDIT_FRAME::selectSymLibTable(), FOOTPRINT_VIEWER_FRAME::setCurFootprintName(), LIB_EDIT_FRAME::SetCurLib(), FOOTPRINT_VIEWER_FRAME::setCurNickname(), LIB_EDIT_FRAME::SetCurPart(), KICAD_MANAGER_FRAME::SetProjectFileName(), DIALOG_CHOOSE_COMPONENT::ShowFootprintFor(), FOOTPRINT_VIEWER_FRAME::ShowModal(), SIM_PLOT_FRAME::SIM_PLOT_FRAME(), LIB_MANAGER::symTable(), FOOTPRINT_EDIT_FRAME::SyncLibraryTree(), EDA_3D_VIEWER::takeScreenshot(), DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::TransferDataFromWindow(), DIALOG_FOOTPRINT_FP_EDITOR::TransferDataToWindow(), DIALOG_FOOTPRINT_BOARD_EDITOR::TransferDataToWindow(), SIM_PLOT_FRAME::updateNetlistExporter(), SCH_SCREEN::UpdateSymbolLinks(), FOOTPRINT_VIEWER_FRAME::UpdateTitle(), FOOTPRINT_EDIT_FRAME::updateTitle(), SCH_EDIT_FRAME::UpdateTitle(), DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::Validate(), SCH_EDIT_FRAME::WriteNetListFile(), DIALOG_FOOTPRINT_BOARD_EDITOR::~DIALOG_FOOTPRINT_BOARD_EDITOR(), DIALOG_FOOTPRINT_FP_EDITOR::~DIALOG_FOOTPRINT_FP_EDITOR(), and PCB_BASE_EDIT_FRAME::~PCB_BASE_EDIT_FRAME().

35 {
36  return Kiway().Prj();
37 }
KIWAY & Kiway() const
Function Kiway returns a reference to the KIWAY that this object has an opportunity to participate in...
Definition: kiway_player.h:60
VTBL_ENTRY PROJECT & Prj() const
Function Prj returns the PROJECT associated with this KIWAY.
Definition: kiway.cpp:142

◆ reInitDialog()

void DIALOG_PLOT::reInitDialog ( )
private

Definition at line 201 of file dialog_plot.cpp.

References PCB_PLOT_PARAMS::GetOutputDirectory(), PCB_PLOT_PARAMS::GetUseAuxOrigin(), DIALOG_PLOT_BASE::m_outputDirectoryName, m_plotOpts, and DIALOG_PLOT_BASE::m_useAuxOriginCheckBox.

Referenced by CreateDrillFile(), and init_Dialog().

202 {
203  // after calling drill dialog, some parameters can be modified.
204  // update them
205 
206  // Output directory
208 
209  // Origin of coordinates:
211 }
wxTextCtrl * m_outputDirectoryName
PCB_PLOT_PARAMS m_plotOpts
Definition: dialog_plot.h:64
wxString GetOutputDirectory() const
wxCheckBox * m_useAuxOriginCheckBox
bool GetUseAuxOrigin() const

◆ 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 116 of file dialog_shim.h.

References DIALOG_SHIM::m_initialFocusTarget.

Referenced by DIALOG_BOM::DIALOG_BOM(), DIALOG_CHOOSE_COMPONENT::DIALOG_CHOOSE_COMPONENT(), DIALOG_CHOOSE_FOOTPRINT::DIALOG_CHOOSE_FOOTPRINT(), DIALOG_CONFIGURE_PATHS::DIALOG_CONFIGURE_PATHS(), DIALOG_EDIT_LINE_STYLE::DIALOG_EDIT_LINE_STYLE(), DIALOG_FIELDS_EDITOR_GLOBAL::DIALOG_FIELDS_EDITOR_GLOBAL(), DIALOG_FOOTPRINT_BOARD_EDITOR::DIALOG_FOOTPRINT_BOARD_EDITOR(), DIALOG_FOOTPRINT_FP_EDITOR::DIALOG_FOOTPRINT_FP_EDITOR(), DIALOG_FP_PLUGIN_OPTIONS::DIALOG_FP_PLUGIN_OPTIONS(), DIALOG_GRAPHIC_ITEM_PROPERTIES::DIALOG_GRAPHIC_ITEM_PROPERTIES(), DIALOG_LABEL_EDITOR::DIALOG_LABEL_EDITOR(), DIALOG_LIB_EDIT_DRAW_ITEM::DIALOG_LIB_EDIT_DRAW_ITEM(), DIALOG_LIB_EDIT_PIN::DIALOG_LIB_EDIT_PIN(), DIALOG_LIB_EDIT_TEXT::DIALOG_LIB_EDIT_TEXT(), DIALOG_PAD_PRIMITIVES_PROPERTIES::DIALOG_PAD_PRIMITIVES_PROPERTIES(), DIALOG_PAD_PROPERTIES::DIALOG_PAD_PROPERTIES(), DIALOG_SET_GRID::DIALOG_SET_GRID(), DIALOG_TARGET_PROPERTIES::DIALOG_TARGET_PROPERTIES(), DIALOG_TEXT_PROPERTIES::DIALOG_TEXT_PROPERTIES(), DIALOG_TRACK_VIA_PROPERTIES::DIALOG_TRACK_VIA_PROPERTIES(), DIALOG_EDIT_ONE_FIELD::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(), and LIB_EDIT_FRAME::savePartAs().

117  {
118  m_initialFocusTarget = aWindow;
119  }
wxWindow * m_initialFocusTarget
Definition: dialog_shim.h:180

◆ SetKiway()

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

Function SetKiway.

Parameters
aDestis the recipient of aKiway pointer. It is only used for debugging, since "this" is not a wxWindow*. "this" is a KIWAY_HOLDER mix-in.
aKiwayis often from a parent window, or from KIFACE::CreateWindow().

Definition at line 47 of file kiway_holder.cpp.

References KIWAY_HOLDER::m_kiway, and name.

Referenced by InvokePcbLibTableEditor(), and SIM_PLOT_FRAME::SIM_PLOT_FRAME().

48 {
49 #if defined(DEBUG)
50  // offer a trap point for debugging most any window
51  wxASSERT( aDest );
52  if( !strcmp( typeid(aDest).name(), "DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB" ) )
53  {
54  int breakhere=1;
55  (void) breakhere;
56  }
57 #endif
58 
59  (void) aDest;
60 
61  m_kiway = aKiway;
62 }
KIWAY * m_kiway
Definition: kiway_player.h:94
const char * name
Definition: DXF_plotter.cpp:61

◆ SetPlotFormat()

void DIALOG_PLOT::SetPlotFormat ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_PLOT_BASE.

Definition at line 367 of file dialog_plot.cpp.

References UNIT_BINDER::Enable(), FILLED, getPlotFormat(), m_defaultLineWidth, m_defaultPenSize, DIALOG_PLOT_BASE::m_drillShapeOpt, DIALOG_PLOT_BASE::m_DXF_plotModeOpt, DIALOG_PLOT_BASE::m_excludeEdgeLayerOpt, 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_MainSizer, 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, m_trackWidthCorrection, DIALOG_PLOT_BASE::m_useAuxOriginCheckBox, OnChangeDXFPlotMode(), OnSetScaleOpt(), PLOT_FORMAT_DXF, PLOT_FORMAT_GERBER, PLOT_FORMAT_HPGL, PLOT_FORMAT_PDF, PLOT_FORMAT_POST, PLOT_FORMAT_SVG, PLOT_FORMAT_UNDEFINED, and setPlotModeChoiceSelection().

Referenced by init_Dialog().

368 {
369  // this option exist only in DXF format:
371 
372  switch( getPlotFormat() )
373  {
374  case PLOT_FORMAT_PDF:
375  case PLOT_FORMAT_SVG:
376  m_drillShapeOpt->Enable( true );
377  m_plotModeOpt->Enable( false );
379  m_plotMirrorOpt->Enable( true );
380  m_useAuxOriginCheckBox->Enable( false );
381  m_useAuxOriginCheckBox->SetValue( false );
382  m_defaultLineWidth.Enable( true );
383  m_defaultPenSize.Enable( false );
384  m_excludeEdgeLayerOpt->Enable( true );
385  m_scaleOpt->Enable( false );
386  m_scaleOpt->SetSelection( 1 );
387  m_fineAdjustXCtrl->Enable( false );
388  m_fineAdjustYCtrl->Enable( false );
390  m_plotPSNegativeOpt->Enable( true );
391  m_forcePSA4OutputOpt->Enable( false );
392  m_forcePSA4OutputOpt->SetValue( false );
393 
398  break;
399 
400  case PLOT_FORMAT_POST:
401  m_drillShapeOpt->Enable( true );
402  m_plotModeOpt->Enable( true );
403  m_plotMirrorOpt->Enable( true );
404  m_useAuxOriginCheckBox->Enable( false );
405  m_useAuxOriginCheckBox->SetValue( false );
406  m_defaultLineWidth.Enable( true );
407  m_defaultPenSize.Enable( false );
408  m_excludeEdgeLayerOpt->Enable( true );
409  m_scaleOpt->Enable( true );
410  m_fineAdjustXCtrl->Enable( true );
411  m_fineAdjustYCtrl->Enable( true );
413  m_plotPSNegativeOpt->Enable( true );
414  m_forcePSA4OutputOpt->Enable( true );
415 
420  break;
421 
422  case PLOT_FORMAT_GERBER:
423  m_drillShapeOpt->Enable( false );
424  m_drillShapeOpt->SetSelection( 0 );
425  m_plotModeOpt->Enable( false );
427  m_plotMirrorOpt->Enable( false );
428  m_plotMirrorOpt->SetValue( false );
429  m_useAuxOriginCheckBox->Enable( true );
430  m_defaultLineWidth.Enable( true );
431  m_defaultPenSize.Enable( false );
432  m_excludeEdgeLayerOpt->Enable( true );
433  m_scaleOpt->Enable( false );
434  m_scaleOpt->SetSelection( 1 );
435  m_fineAdjustXCtrl->Enable( false );
436  m_fineAdjustYCtrl->Enable( false );
438  m_plotPSNegativeOpt->Enable( false );
439  m_plotPSNegativeOpt->SetValue( false );
440  m_forcePSA4OutputOpt->Enable( false );
441  m_forcePSA4OutputOpt->SetValue( false );
442 
447  break;
448 
449  case PLOT_FORMAT_HPGL:
450  m_drillShapeOpt->Enable( true );
451  m_plotModeOpt->Enable( true );
452  m_plotMirrorOpt->Enable( true );
453  m_useAuxOriginCheckBox->Enable( false );
454  m_useAuxOriginCheckBox->SetValue( false );
455  m_defaultLineWidth.Enable( false );
456  m_defaultPenSize.Enable( true );
457  m_excludeEdgeLayerOpt->Enable( true );
458  m_scaleOpt->Enable( true );
459  m_fineAdjustXCtrl->Enable( false );
460  m_fineAdjustYCtrl->Enable( false );
462  m_plotPSNegativeOpt->SetValue( false );
463  m_plotPSNegativeOpt->Enable( false );
464  m_forcePSA4OutputOpt->Enable( true );
465 
470  break;
471 
472  case PLOT_FORMAT_DXF:
473  m_drillShapeOpt->Enable( true );
474  m_plotModeOpt->Enable( false );
476  m_plotMirrorOpt->Enable( false );
477  m_plotMirrorOpt->SetValue( false );
478  m_useAuxOriginCheckBox->Enable( true );
479  m_defaultLineWidth.Enable( false );
480  m_defaultPenSize.Enable( false );
481  m_excludeEdgeLayerOpt->Enable( true );
482  m_scaleOpt->Enable( false );
483  m_scaleOpt->SetSelection( 1 );
484  m_fineAdjustXCtrl->Enable( false );
485  m_fineAdjustYCtrl->Enable( false );
487  m_plotPSNegativeOpt->Enable( false );
488  m_plotPSNegativeOpt->SetValue( false );
489  m_forcePSA4OutputOpt->Enable( false );
490  m_forcePSA4OutputOpt->SetValue( false );
491 
496 
497  OnChangeDXFPlotMode( event );
498  break;
499 
501  break;
502  }
503 
504  /* Update the interlock between scale and frame reference
505  * (scaling would mess up the frame border...) */
506  OnSetScaleOpt( event );
507 
508  Layout();
509  m_MainSizer->SetSizeHints( this );
510 }
wxStaticBoxSizer * m_HPGLOptionsSizer
void OnChangeDXFPlotMode(wxCommandEvent &event) override
wxCheckBox * m_plotPSNegativeOpt
PlotFormat getPlotFormat()
wxCheckBox * m_excludeEdgeLayerOpt
wxCheckBox * m_plotMirrorOpt
wxStaticBoxSizer * m_SizerDXF_options
UNIT_BINDER m_trackWidthCorrection
Definition: dialog_plot.h:62
wxTextCtrl * m_fineAdjustYCtrl
wxCheckBox * m_DXF_plotModeOpt
wxTextCtrl * m_fineAdjustXCtrl
wxCheckBox * m_forcePSA4OutputOpt
void setPlotModeChoiceSelection(EDA_DRAW_MODE_T aPlotMode)
Definition: dialog_plot.h:84
void OnSetScaleOpt(wxCommandEvent &event) override
wxStaticBoxSizer * m_GerberOptionsSizer
wxChoice * m_scaleOpt
UNIT_BINDER m_defaultLineWidth
Definition: dialog_plot.h:60
wxChoice * m_drillShapeOpt
wxCheckBox * m_useAuxOriginCheckBox
wxChoice * m_plotModeOpt
UNIT_BINDER m_defaultPenSize
Definition: dialog_plot.h:61
wxBoxSizer * m_MainSizer
wxStaticBoxSizer * m_PSOptionsSizer
wxBoxSizer * m_PlotOptionsSizer
void Enable(bool aEnable)
Function Enable Enables/diasables the label, widget and units label.

◆ setPlotModeChoiceSelection()

void DIALOG_PLOT::setPlotModeChoiceSelection ( EDA_DRAW_MODE_T  aPlotMode)
inlineprivate

Definition at line 84 of file dialog_plot.h.

References DIALOG_PLOT_BASE::m_plotModeOpt, and SKETCH.

Referenced by init_Dialog(), and SetPlotFormat().

85  {
86  m_plotModeOpt->SetSelection( aPlotMode == SKETCH ? 1 : 0 );
87  }
wxChoice * m_plotModeOpt

◆ 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 143 of file dialog_shim.cpp.

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

144 {
145  wxSize sz( x, y );
146  SetSize( ConvertDialogToPixels( sz ) );
147 }

◆ Show()

bool DIALOG_SHIM::Show ( bool  show)
overrideinherited

Definition at line 171 of file dialog_shim.cpp.

References class_map, EDA_RECT::GetPosition(), EDA_RECT::GetSize(), DIALOG_SHIM::m_hash_key, and max.

Referenced by DIALOG_SHIM::EndQuasiModal(), InvokeDialogERC(), SCH_EDIT_FRAME::OnAnnotate(), DIALOG_SCH_FIND::OnCancel(), SCH_EDIT_FRAME::OnFindItems(), DIALOG_DRC_CONTROL::OnLeftDClickClearance(), DIALOG_DRC_CONTROL::OnLeftDClickUnconnected(), POSITION_RELATIVE_TOOL::PositionRelative(), CVPCB_MAINFRAME::ReadNetListAndFpFiles(), DRC::ShowDRCDialog(), DIALOG_SHIM::ShowQuasiModal(), and DIALOG_POSITION_RELATIVE::UpdateAnchor().

172 {
173  bool ret;
174  const char* hash_key;
175 
176  if( m_hash_key.size() )
177  {
178  // a special case like EDA_LIST_DIALOG, which has multiple uses.
179  hash_key = m_hash_key.c_str();
180  }
181  else
182  {
183  hash_key = typeid(*this).name();
184  }
185 
186  // Show or hide the window. If hiding, save current position and size.
187  // If showing, use previous position and size.
188  if( show )
189  {
190 #ifndef __WINDOWS__
191  wxDialog::Raise(); // Needed on OS X and some other window managers (i.e. Unity)
192 #endif
193  ret = wxDialog::Show( show );
194 
195  // classname is key, returns a zeroed out default EDA_RECT if none existed before.
196  EDA_RECT savedDialogRect = class_map[ hash_key ];
197 
198  if( savedDialogRect.GetSize().x != 0 && savedDialogRect.GetSize().y != 0 )
199  {
200  SetSize( savedDialogRect.GetPosition().x,
201  savedDialogRect.GetPosition().y,
202  std::max( wxDialog::GetSize().x, savedDialogRect.GetSize().x ),
203  std::max( wxDialog::GetSize().y, savedDialogRect.GetSize().y ),
204  0 );
205  }
206 
207  // Be sure that the dialog appears in a visible area
208  // (the dialog position might have been stored at the time when it was
209  // shown on another display)
210  if( wxDisplay::GetFromWindow( this ) == wxNOT_FOUND )
211  Centre();
212  }
213  else
214  {
215  // Save the dialog's position & size before hiding, using classname as key
216  class_map[ hash_key ] = EDA_RECT( wxDialog::GetPosition(), wxDialog::GetSize() );
217 
218 #ifdef __WXMAC__
219  if ( m_eventLoop )
220  m_eventLoop->Exit( GetReturnCode() ); // Needed for APP-MODAL dlgs on OSX
221 #endif
222 
223  ret = wxDialog::Show( show );
224  }
225 
226  return ret;
227 }
std::string m_hash_key
Definition: dialog_shim.h:174
static RECT_MAP class_map
const wxPoint GetPosition() const
Definition: eda_rect.h:113
#define max(a, b)
Definition: auxiliary.h:86
Class EDA_RECT handles the component boundary box.
Definition: eda_rect.h:44
const wxSize GetSize() const
Definition: eda_rect.h:101

◆ ShowQuasiModal()

int DIALOG_SHIM::ShowQuasiModal ( )
inherited

Definition at line 336 of file dialog_shim.cpp.

References DBG, DIALOG_SHIM::m_qmodal_loop, DIALOG_SHIM::m_qmodal_parent_disabler, DIALOG_SHIM::m_qmodal_showing, DIALOG_SHIM::Show(), and WX_EVENT_LOOP.

Referenced by SCH_EDIT_FRAME::EditComponent(), SCH_EDIT_FRAME::EditComponentFieldText(), LIB_EDIT_FRAME::EditField(), EDIT_TOOL::ExchangeFootprints(), PCB_EDIT_FRAME::InstallExchangeModuleFrame(), SCH_EDIT_FRAME::InstallHierarchyFrame(), PCB_BASE_FRAME::InstallPadOptionsFrame(), InvokeDialogEditComponentsLibId(), InvokeDialogUpdateFields(), LIB_EDIT_FRAME::OnEditComponentProperties(), PCB_EDIT_FRAME::OnEditTracksAndVias(), SCH_EDIT_FRAME::OnLaunchBomManager(), SCH_EDIT_FRAME::OnRemapSymbols(), LIB_VIEW_FRAME::OnSelectSymbol(), SCH_EDIT_FRAME::OpenProjectFiles(), EDIT_TOOL::Properties(), SCH_BASE_FRAME::SelectComponentFromLibTree(), and PCB_BASE_FRAME::SelectFootprintFromLibTree().

337 {
338  // This is an exception safe way to zero a pointer before returning.
339  // Yes, even though DismissModal() clears this first normally, this is
340  // here in case there's an exception before the dialog is dismissed.
341  struct NULLER
342  {
343  void*& m_what;
344  NULLER( void*& aPtr ) : m_what( aPtr ) {}
345  ~NULLER() { m_what = 0; } // indeed, set it to NULL on destruction
346  } clear_this( (void*&) m_qmodal_loop );
347 
348  // release the mouse if it's currently captured as the window having it
349  // will be disabled when this dialog is shown -- but will still keep the
350  // capture making it impossible to do anything in the modal dialog itself
351  wxWindow* win = wxWindow::GetCapture();
352  if( win )
353  win->ReleaseMouse();
354 
355  // Get the optimal parent
356  wxWindow* parent = GetParentForModalDialog( GetParent(), GetWindowStyle() );
357 
358  // Show the optimal parent
359  DBG( if( parent ) printf( "%s: optimal parent: %s\n", __func__, typeid(*parent).name() );)
360 
361  wxASSERT_MSG( !m_qmodal_parent_disabler,
362  wxT( "Caller using ShowQuasiModal() twice on same window?" ) );
363 
364  // quasi-modal: disable only my "optimal" parent
366 
367 #ifdef __WXMAC__
368  // Apple in its infinite wisdom will raise a disabled window before even passing
369  // us the event, so we have no way to stop it. Instead, we must set an order on
370  // the windows so that the quasi-modal will be pushed in front of the disabled
371  // window when it is raised.
372  ReparentQuasiModal();
373 #endif
374  Show( true );
375 
376  m_qmodal_showing = true;
377 
378  WX_EVENT_LOOP event_loop;
379 
380  m_qmodal_loop = &event_loop;
381 
382  event_loop.Run();
383 
384  m_qmodal_showing = false;
385 
386  return GetReturnCode();
387 }
bool m_qmodal_showing
Definition: dialog_shim.h:184
#define WX_EVENT_LOOP
Definition: kiway_player.h:100
WX_EVENT_LOOP * m_qmodal_loop
Definition: dialog_shim.h:183
bool Show(bool show) override
WDO_ENABLE_DISABLE * m_qmodal_parent_disabler
Definition: dialog_shim.h:185
Toggle a window&#39;s "enable" status to disabled, then enabled on destruction.
Definition: dialog_shim.cpp:34
#define DBG(x)
Definition: fctsys.h:33

◆ VertPixelsFromDU()

int DIALOG_SHIM::VertPixelsFromDU ( int  y)
protectedinherited

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

See SetSizeInDU or wxDialog documentation for more information.

Definition at line 157 of file dialog_shim.cpp.

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

158 {
159  wxSize sz( 0, y );
160  return ConvertDialogToPixels( sz ).y;
161 }

Member Data Documentation

◆ coordFormatLabel

wxStaticText* DIALOG_PLOT_BASE::coordFormatLabel
protectedinherited

Definition at line 93 of file dialog_plot_base.h.

Referenced by DIALOG_PLOT_BASE::DIALOG_PLOT_BASE().

◆ drillMarksLabel

wxStaticText* DIALOG_PLOT_BASE::drillMarksLabel
protectedinherited

Definition at line 77 of file dialog_plot_base.h.

Referenced by DIALOG_PLOT_BASE::DIALOG_PLOT_BASE().

◆ m_browseButton

wxBitmapButton* DIALOG_PLOT_BASE::m_browseButton
protectedinherited

◆ m_buttonDRC

wxButton* DIALOG_PLOT_BASE::m_buttonDRC
protectedinherited

◆ m_config

wxConfigBase* DIALOG_PLOT::m_config
private

Definition at line 47 of file dialog_plot.h.

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

◆ m_coordFormatCtrl

wxChoice* DIALOG_PLOT_BASE::m_coordFormatCtrl
protectedinherited

◆ m_defaultLineWidth

UNIT_BINDER DIALOG_PLOT::m_defaultLineWidth
private

Definition at line 60 of file dialog_plot.h.

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

◆ m_defaultPenSize

UNIT_BINDER DIALOG_PLOT::m_defaultPenSize
private

Definition at line 61 of file dialog_plot.h.

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

◆ 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_excludeEdgeLayerOpt

wxCheckBox* DIALOG_PLOT_BASE::m_excludeEdgeLayerOpt
protectedinherited

◆ m_excludePadsFromSilkscreen

wxCheckBox* DIALOG_PLOT_BASE::m_excludePadsFromSilkscreen
protectedinherited

◆ m_fineAdjustXCtrl

wxTextCtrl* DIALOG_PLOT_BASE::m_fineAdjustXCtrl
protectedinherited

◆ m_fineAdjustXLabel

wxStaticText* DIALOG_PLOT_BASE::m_fineAdjustXLabel
protectedinherited

Definition at line 102 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 104 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 179 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 89 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 97 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 99 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 98 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 100 of file dialog_plot_base.h.

Referenced by DIALOG_PLOT_BASE::DIALOG_PLOT_BASE().

◆ m_initialFocusTarget

wxWindow* DIALOG_SHIM::m_initialFocusTarget
protectedinherited

Definition at line 180 of file dialog_shim.h.

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

◆ m_layerCheckListBox

wxCheckListBox* DIALOG_PLOT_BASE::m_layerCheckListBox
protectedinherited

◆ m_layerList

LSEQ DIALOG_PLOT::m_layerList
private

Definition at line 48 of file dialog_plot.h.

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

◆ m_LayersSizer

wxStaticBoxSizer* DIALOG_PLOT_BASE::m_LayersSizer
protectedinherited

Definition at line 66 of file dialog_plot_base.h.

Referenced by DIALOG_PLOT_BASE::DIALOG_PLOT_BASE().

◆ m_lineWidthCtrl

wxTextCtrl* DIALOG_PLOT_BASE::m_lineWidthCtrl
protectedinherited

Definition at line 84 of file dialog_plot_base.h.

Referenced by DIALOG_PLOT_BASE::DIALOG_PLOT_BASE().

◆ m_lineWidthLabel

wxStaticText* DIALOG_PLOT_BASE::m_lineWidthLabel
protectedinherited

Definition at line 83 of file dialog_plot_base.h.

Referenced by DIALOG_PLOT_BASE::DIALOG_PLOT_BASE().

◆ m_lineWidthUnits

wxStaticText* DIALOG_PLOT_BASE::m_lineWidthUnits
protectedinherited

Definition at line 85 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 60 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

Definition at line 113 of file dialog_plot_base.h.

Referenced by applyPlotSettings(), DIALOG_PLOT_BASE::DIALOG_PLOT_BASE(), and Plot().

◆ m_outputDirectoryName

wxTextCtrl* DIALOG_PLOT_BASE::m_outputDirectoryName
protectedinherited

◆ m_parent

PCB_EDIT_FRAME* DIALOG_PLOT::m_parent
private

◆ 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

Definition at line 68 of file dialog_plot_base.h.

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

◆ 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 101 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 53 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 183 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 184 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 116 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 119 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 114 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 110 of file dialog_plot_base.h.

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

◆ m_staticTextDir

wxStaticText* DIALOG_PLOT_BASE::m_staticTextDir
protectedinherited

Definition at line 63 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 61 of file dialog_plot_base.h.

Referenced by DIALOG_PLOT_BASE::DIALOG_PLOT_BASE().

◆ m_subtractMaskFromSilk

wxCheckBox* DIALOG_PLOT_BASE::m_subtractMaskFromSilk
protectedinherited

◆ m_trackWidthCorrection

UNIT_BINDER DIALOG_PLOT::m_trackWidthCorrection
private

Definition at line 62 of file dialog_plot.h.

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

◆ m_units

◆ m_useAuxOriginCheckBox

wxCheckBox* DIALOG_PLOT_BASE::m_useAuxOriginCheckBox
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 107 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 106 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 58 of file dialog_plot.h.

Referenced by applyPlotSettings(), and init_Dialog().

◆ m_widthAdjustMinValue

int DIALOG_PLOT::m_widthAdjustMinValue
private

Definition at line 57 of file dialog_plot.h.

Referenced by applyPlotSettings(), and init_Dialog().

◆ m_widthAdjustUnits

wxStaticText* DIALOG_PLOT_BASE::m_widthAdjustUnits
protectedinherited

Definition at line 108 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 49 of file dialog_plot.h.

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

◆ m_YScaleAdjust

double DIALOG_PLOT::m_YScaleAdjust
private

Definition at line 51 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 81 of file dialog_plot_base.h.

Referenced by DIALOG_PLOT_BASE::DIALOG_PLOT_BASE().

◆ scalingLabel

wxStaticText* DIALOG_PLOT_BASE::scalingLabel
protectedinherited

Definition at line 79 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: