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 41 of file dialog_plot.cpp.

41  :
42  DIALOG_PLOT_BASE( aParent ), m_parent( aParent ),
46 {
47  SetName( DLG_WINDOW_NAME );
49  m_plotOpts = aParent->GetPlotSettings();
50  init_Dialog();
51 
52  // We use a sdbSizer to get platform-dependent ordering of the action buttons, but
53  // that requires us to correct the button labels here.
54  m_sdbSizer1OK->SetLabel( _( "Plot" ) );
55  m_sdbSizer1Apply->SetLabel( _( "Generate Drill Files..." ) );
56  m_sdbSizer1Cancel->SetLabel( _( "Close" ) );
57  m_sizerButtons->Layout();
58 
59  m_sdbSizer1OK->SetDefault();
60 
61  GetSizer()->Fit( this );
62  GetSizer()->SetSizeHints( this );
63 }
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:66
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

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.

Member Function Documentation

◆ applyPlotSettings()

void DIALOG_PLOT::applyPlotSettings ( )
private

Definition at line 555 of file dialog_plot.cpp.

556 {
557  REPORTER& reporter = m_messagesPanel->Reporter();
558 
559  PCB_PLOT_PARAMS tempOptions;
560 
561  tempOptions.SetExcludeEdgeLayer( m_excludeEdgeLayerOpt->GetValue() );
562  tempOptions.SetSubtractMaskFromSilk( m_subtractMaskFromSilk->GetValue() );
563  tempOptions.SetPlotFrameRef( m_plotSheetRef->GetValue() );
564  tempOptions.SetPlotPadsOnSilkLayer( !m_excludePadsFromSilkscreen->GetValue() );
565  tempOptions.SetUseAuxOrigin( m_useAuxOriginCheckBox->GetValue() );
566  tempOptions.SetPlotValue( m_plotModuleValueOpt->GetValue() );
567  tempOptions.SetPlotReference( m_plotModuleRefOpt->GetValue() );
568  tempOptions.SetPlotInvisibleText( m_plotInvisibleText->GetValue() );
569  tempOptions.SetScaleSelection( m_scaleOpt->GetSelection() );
570  tempOptions.SetDrillMarksType( static_cast<PCB_PLOT_PARAMS::DrillMarksType>
571  ( m_drillShapeOpt->GetSelection() ) );
572  tempOptions.SetMirror( m_plotMirrorOpt->GetValue() );
573  tempOptions.SetPlotMode( m_plotModeOpt->GetSelection() == 1 ? SKETCH : FILLED );
574  tempOptions.SetDXFPlotPolygonMode( m_DXF_plotModeOpt->GetValue() );
575  tempOptions.SetPlotViaOnMaskLayer( m_plotNoViaOnMaskOpt->GetValue() );
576 
577  if( !m_DXF_plotTextStrokeFontOpt->IsEnabled() ) // Currently, only DXF supports this option
578  tempOptions.SetTextMode( PLOTTEXTMODE_DEFAULT );
579  else
580  tempOptions.SetTextMode( m_DXF_plotTextStrokeFontOpt->GetValue() ?
582 
583  // Update settings from text fields. Rewrite values back to the fields,
584  // since the values may have been constrained by the setters.
585  wxString msg;
586 
587  // read HPLG pen size (this param is stored in mils)
588  // However, due to issues when converting this value from or to mm
589  // that can slightly change the value, update this param only if it
590  // is in use
592  {
593  if( !tempOptions.SetHPGLPenDiameter( m_defaultPenSize.GetValue() / IU_PER_MILS ) )
594  {
596  msg.Printf( _( "HPGL pen size constrained." ) );
597  reporter.Report( msg, REPORTER::RPT_INFO );
598  }
599  }
600  else // keep the last value (initial value if no HPGL plot made)
602 
603  // Default linewidth
604  if( !tempOptions.SetLineWidth( m_defaultLineWidth.GetValue() ) )
605  {
606  m_defaultLineWidth.SetValue( tempOptions.GetLineWidth() );
607  msg.Printf( _( "Default line width constrained." ) );
608  reporter.Report( msg, REPORTER::RPT_INFO );
609  }
610 
611  // X scale
612  double tmpDouble;
613  msg = m_fineAdjustXCtrl->GetValue();
614  msg.ToDouble( &tmpDouble );
615 
616  if( !setDouble( &m_XScaleAdjust, tmpDouble, PLOT_MIN_SCALE, PLOT_MAX_SCALE ) )
617  {
618  msg.Printf( wxT( "%f" ), m_XScaleAdjust );
619  m_fineAdjustXCtrl->SetValue( msg );
620  msg.Printf( _( "X scale constrained." ) );
621  reporter.Report( msg, REPORTER::RPT_INFO );
622  }
623 
625 
626  // Y scale
627  msg = m_fineAdjustYCtrl->GetValue();
628  msg.ToDouble( &tmpDouble );
629 
630  if( !setDouble( &m_YScaleAdjust, tmpDouble, PLOT_MIN_SCALE, PLOT_MAX_SCALE ) )
631  {
632  msg.Printf( wxT( "%f" ), m_YScaleAdjust );
633  m_fineAdjustYCtrl->SetValue( msg );
634  msg.Printf( _( "Y scale constrained." ) );
635  reporter.Report( msg, REPORTER::RPT_INFO );
636  }
637 
639 
640  m_config->Write( OPTKEY_PLOT_CHECK_ZONES, m_zoneFillCheck->GetValue() );
641 
642  // PS Width correction
645  {
647  msg.Printf( _( "Width correction constrained. "
648  "The reasonable width correction value must be in a range of "
649  " [%s; %s] (%s) for current design rules." ),
653  reporter.Report( msg, REPORTER::RPT_WARNING );
654  }
655 
656  // Store m_PSWidthAdjust in mm in user config
658  (double)m_PSWidthAdjust / IU_PER_MM );
659 
660  tempOptions.SetFormat( getPlotFormat() );
661 
662  tempOptions.SetUseGerberProtelExtensions( m_useGerberExtensions->GetValue() );
663  tempOptions.SetUseGerberX2format( m_useGerberX2Format->GetValue() );
664  tempOptions.SetIncludeGerberNetlistInfo( m_useGerberNetAttributes->GetValue() );
665  tempOptions.SetCreateGerberJobFile( m_generateGerberJobFile->GetValue() );
666 
667  tempOptions.SetGerberPrecision( m_coordFormatCtrl->GetSelection() == 0 ? 5 : 6 );
668 
669  LSET selectedLayers;
670  for( unsigned i = 0; i < m_layerList.size(); i++ )
671  {
672  if( m_layerCheckListBox->IsChecked( i ) )
673  selectedLayers.set( m_layerList[i] );
674  }
675  // Get a list of copper layers that aren't being used by inverting enabled layers.
676  LSET disabledCopperLayers = LSET::AllCuMask() & ~m_parent->GetBoard()->GetEnabledLayers();
677  // Enable all of the disabled copper layers.
678  // If someone enables more copper layers they will be selected by default.
679  selectedLayers = selectedLayers | disabledCopperLayers;
680  tempOptions.SetLayerSelection( selectedLayers );
681 
682  tempOptions.SetNegative( m_plotPSNegativeOpt->GetValue() );
683  tempOptions.SetA4Output( m_forcePSA4OutputOpt->GetValue() );
684 
685  // Set output directory and replace backslashes with forward ones
686  wxString dirStr;
687  dirStr = m_outputDirectoryName->GetValue();
688  dirStr.Replace( wxT( "\\" ), wxT( "/" ) );
689  tempOptions.SetOutputDirectory( dirStr );
690 
691  if( !m_plotOpts.IsSameAs( tempOptions, false ) )
692  {
693  // First, mark board as modified only for parameters saved in file
694  if( !m_plotOpts.IsSameAs( tempOptions, true ) )
695  m_parent->OnModify();
696 
697  // Now, save any change, for the session
698  m_parent->SetPlotSettings( tempOptions );
699  m_plotOpts = tempOptions;
700  }
701 }
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

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().

◆ CreateDrillFile()

void DIALOG_PLOT::CreateDrillFile ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_PLOT_BASE.

Definition at line 277 of file dialog_plot.cpp.

278 {
279  // Be sure drill file use the same settings (axis option, plot directory)
280  // as plot files:
282 
283  DIALOG_GENDRILL dlg( m_parent, this );
284  dlg.ShowModal();
285 
286  // a few plot settings can be modified: take them in account
288  reInitDialog();
289 }
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()

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

◆ DIALOG_PLOT_BASEOnContextMenu()

void DIALOG_PLOT_BASE::DIALOG_PLOT_BASEOnContextMenu ( wxMouseEvent &  event)
inlineinherited

Definition at line 141 of file dialog_plot_base.h.

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

References DIALOG_PLOT_BASE::m_popMenu.

Referenced by DIALOG_PLOT_BASE::DIALOG_PLOT_BASE().

◆ Enable()

bool DIALOG_SHIM::Enable ( bool  enable)
overrideinherited

Definition at line 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  fflush(0); //Needed on msys2 to immediately print the message
238 #endif
239 
240  return wxDialog::Enable( enable );
241 }

◆ EndQuasiModal()

void DIALOG_SHIM::EndQuasiModal ( int  retCode)
inherited

Definition at line 391 of file dialog_shim.cpp.

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

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_EDIT_COMPONENTS_LIBID::onCancel(), DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnCancelButtonClick(), DIALOG_EDIT_COMPONENT_IN_LIBRARY::OnCancelButtonClick(), 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().

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

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 }

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_EDIT_COMPONENT_IN_SCHEMATIC::OnInitDlg(), DIALOG_SIM_SETTINGS::onInitDlg(), DIALOG_SPICE_MODEL::onInitDlg(), DIALOG_SIGNAL_LIST::TransferDataToWindow(), DIALOG_UPDATE_FIELDS::TransferDataToWindow(), and DIALOG_COLOR_PICKER::TransferDataToWindow().

◆ getPlotFormat()

PlotFormat DIALOG_PLOT::getPlotFormat ( )
private

Definition at line 351 of file dialog_plot.cpp.

352 {
353  // plot format id's are ordered like displayed in m_plotFormatOpt
354  static const PlotFormat plotFmt[] =
355  {
362  };
363 
364  return plotFmt[ m_plotFormatOpt->GetSelection() ];
365 }
PlotFormat
Enum PlotFormat is the set of supported output plot formats.
Definition: plotter.h:50
wxChoice * m_plotFormatOpt

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().

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

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

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

◆ init_Dialog()

void DIALOG_PLOT::init_Dialog ( )
private

Definition at line 66 of file dialog_plot.cpp.

67 {
68  BOARD* board = m_parent->GetBoard();
69  wxFileName fileName;
70 
73 
74  bool checkZones;
75  m_config->Read( OPTKEY_PLOT_CHECK_ZONES, &checkZones, true );
76  m_zoneFillCheck->SetValue( checkZones );
77 
78  m_browseButton->SetBitmap( KiBitmap( folder_xpm ) );
79 
80  // m_PSWidthAdjust is stored in mm in user config
81  double dtmp;
82  m_config->Read( CONFIG_PS_FINEWIDTH_ADJ, &dtmp, 0 );
83  m_PSWidthAdjust = KiROUND( dtmp * IU_PER_MM );
84 
85  // The reasonable width correction value must be in a range of
86  // [-(MinTrackWidth-1), +(MinClearanceValue-1)] decimils.
89 
90  switch( m_plotOpts.GetFormat() )
91  {
92  default:
93  case PLOT_FORMAT_GERBER: m_plotFormatOpt->SetSelection( 0 ); break;
94  case PLOT_FORMAT_POST: m_plotFormatOpt->SetSelection( 1 ); break;
95  case PLOT_FORMAT_SVG: m_plotFormatOpt->SetSelection( 2 ); break;
96  case PLOT_FORMAT_DXF: m_plotFormatOpt->SetSelection( 3 ); break;
97  case PLOT_FORMAT_HPGL: m_plotFormatOpt->SetSelection( 4 ); break;
98  case PLOT_FORMAT_PDF: m_plotFormatOpt->SetSelection( 5 ); break;
99  }
100 
101  // Set units and value for HPGL pen size (this param is in mils).
103 
105 
106  // Test for a reasonable scale value. Set to 1 if problem
110 
113 
114  // Test for a reasonable PS width correction value. Set to 0 if problem.
115  if( m_PSWidthAdjust < m_widthAdjustMinValue || m_PSWidthAdjust > m_widthAdjustMaxValue )
116  m_PSWidthAdjust = 0.;
117 
119 
122 
123  // Could devote a PlotOrder() function in place of UIOrder().
124  m_layerList = board->GetEnabledLayers().UIOrder();
125 
126  // Populate the check list box by all enabled layers names
127  for( LSEQ seq = m_layerList; seq; ++seq )
128  {
129  PCB_LAYER_ID layer = *seq;
130 
131  int checkIndex = m_layerCheckListBox->Append( board->GetLayerName( layer ) );
132 
133  if( m_plotOpts.GetLayerSelection()[layer] )
134  m_layerCheckListBox->Check( checkIndex );
135  }
136 
137  // Option for using proper Gerber extensions. Note also Protel extensions are
138  // a broken feature. However, for now, we need to handle it.
140 
141  // Option for including Gerber attributes, from Gerber X2 format, in the output
142  // In X1 format, they will be added as comments
144 
145  // Option for including Gerber netlist info (from Gerber X2 format) in the output
147 
148  // Option to generate a Gerber job file
150 
151  // Gerber precision for coordinates
152  m_coordFormatCtrl->SetSelection( m_plotOpts.GetGerberPrecision() == 5 ? 0 : 1 );
153 
154  // Option for excluding contents of "Edges Pcb" layer
156 
157  // Option to exclude pads from silkscreen layers
159 
161 
162  // Option to plot page references:
164 
165  // Options to plot texts on footprints
169 
170  // Options to plot pads and vias holes
171  m_drillShapeOpt->SetSelection( m_plotOpts.GetDrillMarksType() );
172 
173  // Scale option
174  m_scaleOpt->SetSelection( m_plotOpts.GetScaleSelection() );
175 
176  // Plot mode
178 
179  // Plot outline mode
181 
182  // Plot text mode
184 
185  // Plot mirror option
186  m_plotMirrorOpt->SetValue( m_plotOpts.GetMirror() );
187 
188  // Put vias on mask layer
190 
191  // Initialize a few other parameters, which can also be modified
192  // from the drill dialog
193  reInitDialog();
194 
195  // Update options values:
196  wxCommandEvent cmd_event;
197  SetPlotFormat( cmd_event );
198  OnSetScaleOpt( cmd_event );
199 }
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

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().

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

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

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(), DIALOG_SYMBOL_REMAP::OnRemapSymbols(), 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().

◆ OnChangeDXFPlotMode()

void DIALOG_PLOT::OnChangeDXFPlotMode ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_PLOT_BASE.

Definition at line 292 of file dialog_plot.cpp.

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

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

Referenced by SetPlotFormat().

◆ OnGerberX2Checked()

void DIALOG_PLOT::OnGerberX2Checked ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_PLOT_BASE.

Definition at line 704 of file dialog_plot.cpp.

705 {
706  // Currently: do nothing
707 }

◆ OnInitDialog()

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

Definition at line 123 of file dialog_plot_base.h.

123 { event.Skip(); }

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

◆ OnOutputDirectoryBrowseClicked()

void DIALOG_PLOT::OnOutputDirectoryBrowseClicked ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_PLOT_BASE.

Definition at line 317 of file dialog_plot.cpp.

318 {
319  // Build the absolute path of current output plot directory
320  // to preselect it when opening the dialog.
321  wxFileName fn( m_outputDirectoryName->GetValue() );
322  wxString path = Prj().AbsolutePath( m_outputDirectoryName->GetValue() );
323 
324  wxDirDialog dirDialog( this, _( "Select Output Directory" ), path );
325 
326  if( dirDialog.ShowModal() == wxID_CANCEL )
327  return;
328 
329  wxFileName dirName = wxFileName::DirName( dirDialog.GetPath() );
330 
331  fn = Prj().AbsolutePath( m_parent->GetBoard()->GetFileName() );
332  wxString defaultPath = fn.GetPathWithSep();
333  wxString msg;
334  msg.Printf( _( "Do you want to use a path relative to\n\"%s\"" ),
335  GetChars( defaultPath ) );
336 
337  wxMessageDialog dialog( this, msg, _( "Plot Output Directory" ),
338  wxYES_NO | wxICON_QUESTION | wxYES_DEFAULT );
339 
340  if( dialog.ShowModal() == wxID_YES )
341  {
342  if( !dirName.MakeRelativeTo( defaultPath ) )
343  wxMessageBox( _( "Cannot make path relative (target volume different from file volume)!" ),
344  _( "Plot Output Directory" ), wxOK | wxICON_ERROR );
345  }
346 
347  m_outputDirectoryName->SetValue( dirName.GetFullPath() );
348 }
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's directory to be an absolu...
Definition: project.cpp:385
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

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

◆ OnPaint()

void DIALOG_SHIM::OnPaint ( wxPaintEvent &  event)
inherited

Definition at line 293 of file dialog_shim.cpp.

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

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

Referenced by DIALOG_SHIM::DIALOG_SHIM().

◆ OnPopUpLayers()

void DIALOG_PLOT::OnPopUpLayers ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_PLOT_BASE.

Definition at line 224 of file dialog_plot.cpp.

225 {
226  // Build a list of layers for usual fabrication:
227  // copper layers + tech layers without courtyard
228  LSET fab_layer_set = ( LSET::AllCuMask() | LSET::AllTechMask() )
229  & ~LSET( 2, B_CrtYd, F_CrtYd );
230 
231  switch( event.GetId() )
232  {
233  case ID_LAYER_FAB: // Select layers usually needed to build a board
234  for( unsigned i = 0; i < m_layerList.size(); i++ )
235  {
236  LSET layermask( m_layerList[ i ] );
237 
238  if( ( layermask & fab_layer_set ).any() )
239  m_layerCheckListBox->Check( i, true );
240  else
241  m_layerCheckListBox->Check( i, false );
242  }
243  break;
244 
246  for( unsigned i = 0; i < m_layerList.size(); i++ )
247  {
248  if( IsCopperLayer( m_layerList[i] ) )
249  m_layerCheckListBox->Check( i, true );
250  }
251  break;
252 
254  for( unsigned i = 0; i < m_layerList.size(); i++ )
255  {
256  if( IsCopperLayer( m_layerList[i] ) )
257  m_layerCheckListBox->Check( i, false );
258  }
259  break;
260 
262  for( unsigned i = 0; i < m_layerList.size(); i++ )
263  m_layerCheckListBox->Check( i, true );
264  break;
265 
267  for( unsigned i = 0; i < m_layerList.size(); i++ )
268  m_layerCheckListBox->Check( i, false );
269  break;
270 
271  default:
272  break;
273  }
274 }
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

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.

◆ OnRightClick()

void DIALOG_PLOT::OnRightClick ( wxMouseEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_PLOT_BASE.

Definition at line 216 of file dialog_plot.cpp.

217 {
218  PopupMenu( m_popMenu );
219 }

References DIALOG_PLOT_BASE::m_popMenu.

◆ onRunDRC()

void DIALOG_PLOT::onRunDRC ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_PLOT_BASE.

Definition at line 860 of file dialog_plot.cpp.

861 {
862  PCB_EDIT_FRAME* parent = dynamic_cast<PCB_EDIT_FRAME*>( GetParent() );
863 
864  if( parent )
865  {
866  // First close an existing dialog if open
867  // (low probability, but can happen)
868  parent->GetDrcController()->DestroyDRCDialog( wxID_OK );
869 
870  // Open a new drc dialod, with the right parent frame, and in Modal Mode
871  parent->GetDrcController()->ShowDRCDialog( this );
872  }
873 }
void DestroyDRCDialog(int aReason)
Deletes this ui dialog box and zeros out its pointer to remember the state of the dialog's existence.
Definition: drc.cpp:121
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:63
Class PCB_EDIT_FRAME is the main frame for Pcbnew.
DRC * GetDrcController()
Function GetDrcController.

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

◆ OnSetScaleOpt()

void DIALOG_PLOT::OnSetScaleOpt ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_PLOT_BASE.

Definition at line 305 of file dialog_plot.cpp.

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

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

Referenced by init_Dialog(), and SetPlotFormat().

◆ Plot()

void DIALOG_PLOT::Plot ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_PLOT_BASE.

Definition at line 710 of file dialog_plot.cpp.

711 {
712  BOARD* board = m_parent->GetBoard();
713 
715 
716  // If no layer selected, we have nothing plotted.
717  // Prompt user if it happens because he could think there is a bug in Pcbnew.
718  if( !m_plotOpts.GetLayerSelection().any() )
719  {
720  DisplayError( this, _( "No layer selected, Nothing to plot" ) );
721  return;
722  }
723 
724  // Create output directory if it does not exist (also transform it in
725  // absolute form). Bail if it fails
726  wxFileName outputDir = wxFileName::DirName( m_plotOpts.GetOutputDirectory() );
727  wxString boardFilename = m_parent->GetBoard()->GetFileName();
728  REPORTER& reporter = m_messagesPanel->Reporter();
729 
730  if( !EnsureFileDirectoryExists( &outputDir, boardFilename, &reporter ) )
731  {
732  wxString msg;
733  msg.Printf( _( "Could not write plot files to folder \"%s\"." ),
734  GetChars( outputDir.GetPath() ) );
735  DisplayError( this, msg );
736  return;
737  }
738 
739  if( m_zoneFillCheck->GetValue() )
740  m_parent->Check_All_Zones( this );
741 
742  m_plotOpts.SetAutoScale( false );
743  m_plotOpts.SetScale( 1 );
744 
745  switch( m_plotOpts.GetScaleSelection() )
746  {
747  default:
748  break;
749 
750  case 0: // Autoscale option
751  m_plotOpts.SetAutoScale( true );
752  break;
753 
754  case 2: // 3:2 option
755  m_plotOpts.SetScale( 1.5 );
756  break;
757 
758  case 3: // 2:1 option
759  m_plotOpts.SetScale( 2 );
760  break;
761 
762  case 4: // 3:1 option
763  m_plotOpts.SetScale( 3 );
764  break;
765  }
766 
767  /* If the scale factor edit controls are disabled or the scale value
768  * is 0, don't adjust the base scale factor. This fixes a bug when
769  * the default scale adjust is initialized to 0 and saved in program
770  * settings resulting in a divide by zero fault.
771  */
773  {
774  if( m_XScaleAdjust != 0.0 )
776 
777  if( m_YScaleAdjust != 0.0 )
779 
781  }
782 
783  wxString file_ext( GetDefaultPlotExtension( m_plotOpts.GetFormat() ) );
784 
785  // Test for a reasonable scale value
786  // XXX could this actually happen? isn't it constrained in the apply
787  // function?
789  DisplayInfoMessage( this, _( "Warning: Scale option set to a very small value" ) );
790 
792  DisplayInfoMessage( this, _( "Warning: Scale option set to a very large value" ) );
793 
794  GERBER_JOBFILE_WRITER jobfile_writer( board, &reporter );
795 
796  // Save the current plot options in the board
798 
799  wxBusyCursor dummy;
800 
801  for( LSEQ seq = m_plotOpts.GetLayerSelection().UIOrder(); seq; ++seq )
802  {
803  PCB_LAYER_ID layer = *seq;
804 
805  // All copper layers that are disabled are actually selected
806  // This is due to wonkyness in automatically selecting copper layers
807  // for plotting when adding more than two layers to a board.
808  // If plot options become accessible to the layers setup dialog
809  // please move this functionality there!
810  // This skips a copper layer if it is actually disabled on the board.
811  if( ( LSET::AllCuMask() & ~board->GetEnabledLayers() )[layer] )
812  continue;
813 
814  // Pick the basename from the board file
815  wxFileName fn( boardFilename );
816 
817  // Use Gerber Extensions based on layer number
818  // (See http://en.wikipedia.org/wiki/Gerber_File)
820  file_ext = GetGerberProtelExtension( layer );
821 
822  BuildPlotFileName( &fn, outputDir.GetPath(), board->GetLayerName( layer ), file_ext );
823  wxString fullname = fn.GetFullName();
824  jobfile_writer.AddGbrFile( layer, fullname );
825 
826  LOCALE_IO toggle;
827 
828  PLOTTER* plotter = StartPlotBoard( board, &m_plotOpts, layer, fn.GetFullPath(), wxEmptyString );
829 
830  // Print diags in messages box:
831  wxString msg;
832 
833  if( plotter )
834  {
835  PlotOneBoardLayer( board, plotter, layer, m_plotOpts );
836  plotter->EndPlot();
837  delete plotter;
838 
839  msg.Printf( _( "Plot file \"%s\" created." ), GetChars( fn.GetFullPath() ) );
840  reporter.Report( msg, REPORTER::RPT_ACTION );
841  }
842  else
843  {
844  msg.Printf( _( "Unable to create file \"%s\"." ), GetChars( fn.GetFullPath() ) );
845  reporter.Report( msg, REPORTER::RPT_ERROR );
846  }
847  }
848 
850  {
851  // Pick the basename from the board file
852  wxFileName fn( boardFilename );
853  // Build gerber job file from basename
854  BuildPlotFileName( &fn, outputDir.GetPath(), "job", GerberJobFileExtension );
855  jobfile_writer.CreateJobFile( fn.GetFullPath() );
856  }
857 }
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'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:275
void DisplayError(wxWindow *parent, const wxString &text, int displaytime)
Function DisplayError displays an error or warning message box with aMessage.
Definition: confirm.cpp:243

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().

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

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

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_PLOT_SCHEMATIC::OnOutputDirectoryBrowseClicked(), DIALOG_GENDRILL::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(), LIB_VIEW_FRAME::ShowModal(), 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().

◆ reInitDialog()

void DIALOG_PLOT::reInitDialog ( )
private

Definition at line 202 of file dialog_plot.cpp.

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

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().

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

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

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_POSITION_RELATIVE::DIALOG_POSITION_RELATIVE(), DIALOG_SCH_SHEET_PROPS::DIALOG_SCH_SHEET_PROPS(), 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(), LIB_EDIT_FRAME::savePartAs(), DIALOG_KEEPOUT_AREA_PROPERTIES::TransferDataToWindow(), DIALOG_NON_COPPER_ZONES_EDITOR::TransferDataToWindow(), and DIALOG_COPPER_ZONE::TransferDataToWindow().

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

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

References KIWAY_HOLDER::m_kiway, and name.

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

◆ SetPlotFormat()

void DIALOG_PLOT::SetPlotFormat ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_PLOT_BASE.

Definition at line 370 of file dialog_plot.cpp.

371 {
372  // this option exist only in DXF format:
374 
375  switch( getPlotFormat() )
376  {
377  case PLOT_FORMAT_PDF:
378  case PLOT_FORMAT_SVG:
379  m_drillShapeOpt->Enable( true );
380  m_plotModeOpt->Enable( false );
382  m_plotMirrorOpt->Enable( true );
383  m_useAuxOriginCheckBox->Enable( false );
384  m_useAuxOriginCheckBox->SetValue( false );
385  m_defaultLineWidth.Enable( true );
386  m_defaultPenSize.Enable( false );
387  m_excludeEdgeLayerOpt->Enable( true );
388  m_scaleOpt->Enable( false );
389  m_scaleOpt->SetSelection( 1 );
390  m_fineAdjustXCtrl->Enable( false );
391  m_fineAdjustYCtrl->Enable( false );
393  m_plotPSNegativeOpt->Enable( true );
394  m_forcePSA4OutputOpt->Enable( false );
395  m_forcePSA4OutputOpt->SetValue( false );
396 
401  break;
402 
403  case PLOT_FORMAT_POST:
404  m_drillShapeOpt->Enable( true );
405  m_plotModeOpt->Enable( true );
406  m_plotMirrorOpt->Enable( true );
407  m_useAuxOriginCheckBox->Enable( false );
408  m_useAuxOriginCheckBox->SetValue( false );
409  m_defaultLineWidth.Enable( true );
410  m_defaultPenSize.Enable( false );
411  m_excludeEdgeLayerOpt->Enable( true );
412  m_scaleOpt->Enable( true );
413  m_fineAdjustXCtrl->Enable( true );
414  m_fineAdjustYCtrl->Enable( true );
416  m_plotPSNegativeOpt->Enable( true );
417  m_forcePSA4OutputOpt->Enable( true );
418 
423  break;
424 
425  case PLOT_FORMAT_GERBER:
426  m_drillShapeOpt->Enable( false );
427  m_drillShapeOpt->SetSelection( 0 );
428  m_plotModeOpt->Enable( false );
430  m_plotMirrorOpt->Enable( false );
431  m_plotMirrorOpt->SetValue( false );
432  m_useAuxOriginCheckBox->Enable( true );
433  m_defaultLineWidth.Enable( true );
434  m_defaultPenSize.Enable( false );
435  m_excludeEdgeLayerOpt->Enable( true );
436  m_scaleOpt->Enable( false );
437  m_scaleOpt->SetSelection( 1 );
438  m_fineAdjustXCtrl->Enable( false );
439  m_fineAdjustYCtrl->Enable( false );
441  m_plotPSNegativeOpt->Enable( false );
442  m_plotPSNegativeOpt->SetValue( false );
443  m_forcePSA4OutputOpt->Enable( false );
444  m_forcePSA4OutputOpt->SetValue( false );
445 
450  break;
451 
452  case PLOT_FORMAT_HPGL:
453  m_drillShapeOpt->Enable( true );
454  m_plotModeOpt->Enable( true );
455  m_plotMirrorOpt->Enable( true );
456  m_useAuxOriginCheckBox->Enable( false );
457  m_useAuxOriginCheckBox->SetValue( false );
458  m_defaultLineWidth.Enable( false );
459  m_defaultPenSize.Enable( true );
460  m_excludeEdgeLayerOpt->Enable( true );
461  m_scaleOpt->Enable( true );
462  m_fineAdjustXCtrl->Enable( false );
463  m_fineAdjustYCtrl->Enable( false );
465  m_plotPSNegativeOpt->SetValue( false );
466  m_plotPSNegativeOpt->Enable( false );
467  m_forcePSA4OutputOpt->Enable( true );
468 
473  break;
474 
475  case PLOT_FORMAT_DXF:
476  m_drillShapeOpt->Enable( true );
477  m_plotModeOpt->Enable( false );
479  m_plotMirrorOpt->Enable( false );
480  m_plotMirrorOpt->SetValue( false );
481  m_useAuxOriginCheckBox->Enable( true );
482  m_defaultLineWidth.Enable( false );
483  m_defaultPenSize.Enable( false );
484  m_excludeEdgeLayerOpt->Enable( true );
485  m_scaleOpt->Enable( false );
486  m_scaleOpt->SetSelection( 1 );
487  m_fineAdjustXCtrl->Enable( false );
488  m_fineAdjustYCtrl->Enable( false );
490  m_plotPSNegativeOpt->Enable( false );
491  m_plotPSNegativeOpt->SetValue( false );
492  m_forcePSA4OutputOpt->Enable( false );
493  m_forcePSA4OutputOpt->SetValue( false );
494 
499 
500  OnChangeDXFPlotMode( event );
501  break;
502 
504  break;
505  }
506 
507  /* Update the interlock between scale and frame reference
508  * (scaling would mess up the frame border...) */
509  OnSetScaleOpt( event );
510 
511  Layout();
512  m_MainSizer->SetSizeHints( this );
513 }
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.

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().

◆ setPlotModeChoiceSelection()

void DIALOG_PLOT::setPlotModeChoiceSelection ( EDA_DRAW_MODE_T  aPlotMode)
inlineprivate

Definition at line 84 of file dialog_plot.h.

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

References DIALOG_PLOT_BASE::m_plotModeOpt, and SKETCH.

Referenced by init_Dialog(), and SetPlotFormat().

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

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

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().

◆ Show()

bool DIALOG_SHIM::Show ( bool  show)
overrideinherited

Definition at line 171 of file dialog_shim.cpp.

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

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().

◆ ShowQuasiModal()

int DIALOG_SHIM::ShowQuasiModal ( )
inherited

Definition at line 337 of file dialog_shim.cpp.

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

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(), InvokeDialogRescueEach(), 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().

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

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

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

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: