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_useGerberX2Attributes
 
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
protectedinherited

Constructor & Destructor Documentation

DIALOG_PLOT::DIALOG_PLOT ( PCB_EDIT_FRAME parent)

Definition at line 40 of file dialog_plot.cpp.

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

40  :
41  DIALOG_PLOT_BASE( aParent ), m_parent( aParent ),
45 {
46  SetName( DLG_WINDOW_NAME );
48  m_plotOpts = aParent->GetPlotSettings();
49  init_Dialog();
50 
51  // We use a sdbSizer to get platform-dependent ordering of the action buttons, but
52  // that requires us to correct the button labels here.
53  m_sdbSizer1OK->SetLabel( _( "Plot" ) );
54  m_sdbSizer1Apply->SetLabel( _( "Generate Drill Files..." ) );
55  m_sdbSizer1Cancel->SetLabel( _( "Close" ) );
56  m_sizerButtons->Layout();
57 
58  m_sdbSizer1OK->SetDefault();
59 
60  GetSizer()->Fit( this );
61  GetSizer()->SetSizeHints( this );
62 }
wxStaticText * m_widthAdjustLabel
DIALOG_PLOT_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Plot"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
wxButton * m_sdbSizer1Cancel
wxStaticText * m_lineWidthLabel
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
wxConfigBase * KifaceSettings() const
Definition: kiface_i.h:103
PCB_PLOT_PARAMS m_plotOpts
Definition: dialog_plot.h:64
wxStaticText * m_widthAdjustUnits
wxTextCtrl * m_hpglPenCtrl
wxTextCtrl * m_lineWidthCtrl
UNIT_BINDER m_defaultLineWidth
Definition: dialog_plot.h:60
wxBoxSizer * m_sizerButtons
void init_Dialog()
Definition: dialog_plot.cpp:65
wxConfigBase * m_config
Definition: dialog_plot.h:47
UNIT_BINDER m_defaultPenSize
Definition: dialog_plot.h:61
#define DLG_WINDOW_NAME
Definition: dialog_plot.h:34

Member Function Documentation

void DIALOG_PLOT::applyPlotSettings ( )
private

Definition at line 550 of file dialog_plot.cpp.

References LSET::AllCuMask(), CONFIG_PS_FINEWIDTH_ADJ, ConfigBaseWriteDouble(), FILLED, GetAbbreviatedUnitsLabel(), PCB_BASE_FRAME::GetBoard(), BOARD::GetEnabledLayers(), PCB_PLOT_PARAMS::GetHPGLPenDiameter(), PCB_PLOT_PARAMS::GetLineWidth(), getPlotFormat(), DIALOG_SHIM::GetUserUnits(), UNIT_BINDER::GetValue(), i, PCB_PLOT_PARAMS::IsSameAs(), IU_PER_MILS, m_config, DIALOG_PLOT_BASE::m_coordFormatCtrl, m_defaultLineWidth, m_defaultPenSize, DIALOG_PLOT_BASE::m_drillShapeOpt, DIALOG_PLOT_BASE::m_DXF_plotModeOpt, DIALOG_PLOT_BASE::m_DXF_plotTextStrokeFontOpt, DIALOG_PLOT_BASE::m_excludeEdgeLayerOpt, DIALOG_PLOT_BASE::m_excludePadsFromSilkscreen, DIALOG_PLOT_BASE::m_fineAdjustXCtrl, DIALOG_PLOT_BASE::m_fineAdjustYCtrl, DIALOG_PLOT_BASE::m_forcePSA4OutputOpt, DIALOG_PLOT_BASE::m_generateGerberJobFile, DIALOG_PLOT_BASE::m_layerCheckListBox, m_layerList, DIALOG_PLOT_BASE::m_messagesPanel, DIALOG_PLOT_BASE::m_outputDirectoryName, m_parent, DIALOG_PLOT_BASE::m_plotInvisibleText, DIALOG_PLOT_BASE::m_plotMirrorOpt, DIALOG_PLOT_BASE::m_plotModeOpt, DIALOG_PLOT_BASE::m_plotModuleRefOpt, DIALOG_PLOT_BASE::m_plotModuleValueOpt, DIALOG_PLOT_BASE::m_plotNoViaOnMaskOpt, m_plotOpts, DIALOG_PLOT_BASE::m_plotPSNegativeOpt, DIALOG_PLOT_BASE::m_plotSheetRef, m_PSWidthAdjust, DIALOG_PLOT_BASE::m_scaleOpt, DIALOG_PLOT_BASE::m_subtractMaskFromSilk, m_trackWidthCorrection, DIALOG_PLOT_BASE::m_useAuxOriginCheckBox, DIALOG_PLOT_BASE::m_useGerberExtensions, DIALOG_PLOT_BASE::m_useGerberNetAttributes, DIALOG_PLOT_BASE::m_useGerberX2Attributes, 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::SetUseGerberAttributes(), PCB_PLOT_PARAMS::SetUseGerberProtelExtensions(), UNIT_BINDER::SetValue(), SKETCH, and StringFromValue().

Referenced by CreateDrillFile(), and Plot().

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

Reimplemented from DIALOG_PLOT_BASE.

Definition at line 274 of file dialog_plot.cpp.

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

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

Definition at line 142 of file dialog_plot_base.h.

Referenced by DIALOG_PLOT_BASE::DIALOG_PLOT_BASE().

143  {
144  this->PopupMenu( m_popMenu, event.GetPosition() );
145  }
bool DIALOG_SHIM::Enable ( bool  enable)
overrideinherited

Definition at line 221 of file dialog_shim.cpp.

Referenced by DIALOG_SHIM::IsQuasiModal().

222 {
223  // so we can do logging of this state change:
224 
225 #if defined(DEBUG)
226  const char* type_id = typeid( *this ).name();
227  printf( "wxDialog %s: %s\n", type_id, enable ? "enabled" : "disabled" );
228 #endif
229 
230  return wxDialog::Enable( enable );
231 }
void DIALOG_SHIM::EndQuasiModal ( int  retCode)
inherited

Definition at line 381 of file dialog_shim.cpp.

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

Referenced by DIALOG_SHIM::OnButton(), DIALOG_PRINT_GENERIC::onCloseButton(), DIALOG_CHOOSE_FOOTPRINT::OnCloseTimer(), DIALOG_CHOOSE_COMPONENT::OnCloseTimer(), DIALOG_SHIM::OnCloseWindow(), DIALOG_CHOOSE_FOOTPRINT::OnUseBrowser(), DIALOG_CHOOSE_COMPONENT::OnUseBrowser(), DIALOG_SHIM::SetInitialFocus(), and DIALOG_SHIM::~DIALOG_SHIM().

382 {
383  // Hook up validator and transfer data from controls handling so quasi-modal dialogs
384  // handle validation in the same way as other dialogs.
385  if( ( retCode == wxID_OK ) && ( !Validate() || !TransferDataFromWindow() ) )
386  return;
387 
388  SetReturnCode( retCode );
389 
390  if( !IsQuasiModal() )
391  {
392  wxFAIL_MSG( wxT( "either DIALOG_SHIM::EndQuasiModal called twice or ShowQuasiModal wasn't called" ) );
393  return;
394  }
395 
396  if( m_qmodal_loop )
397  {
398  if( m_qmodal_loop->IsRunning() )
399  m_qmodal_loop->Exit( 0 );
400  else
401  m_qmodal_loop->ScheduleExit( 0 );
402 
403  m_qmodal_loop = NULL;
404  }
405 
408 
409  Show( false );
410 }
WX_EVENT_LOOP * m_qmodal_loop
Definition: dialog_shim.h:153
bool IsQuasiModal()
Definition: dialog_shim.h:95
bool Show(bool show) override
WDO_ENABLE_DISABLE * m_qmodal_parent_disabler
Definition: dialog_shim.h:155
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 120 of file dialog_shim.cpp.

References PCAD2KICAD::Center.

Referenced by DIALOG_3D_VIEW_OPTIONS::DIALOG_3D_VIEW_OPTIONS(), DIALOG_ANNOTATE::DIALOG_ANNOTATE(), DIALOG_BOM::DIALOG_BOM(), DIALOG_COPPER_ZONE::DIALOG_COPPER_ZONE(), DIALOG_DRC_CONTROL::DIALOG_DRC_CONTROL(), DIALOG_EDIT_COMPONENT_IN_LIBRARY::DIALOG_EDIT_COMPONENT_IN_LIBRARY(), DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC(), DIALOG_EDIT_COMPONENTS_LIBID::DIALOG_EDIT_COMPONENTS_LIBID(), DIALOG_EDIT_LINE_STYLE::DIALOG_EDIT_LINE_STYLE(), DIALOG_ENUM_PADS::DIALOG_ENUM_PADS(), DIALOG_EXCHANGE_FOOTPRINTS::DIALOG_EXCHANGE_FOOTPRINTS(), DIALOG_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_SYM_LIB_TABLE_CONFIG::DIALOG_GLOBAL_SYM_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_SHIM::GetUserUnits(), DIALOG_EDIT_ONE_FIELD::init(), DIALOG_EDIT_LIBRARY_TABLES::InstallPanel(), NETLIST_DIALOG::NETLIST_DIALOG(), DIALOG_GRAPHIC_ITEM_PROPERTIES::OnInitDlg(), DIALOG_SIM_SETTINGS::onInitDlg(), DIALOG_SPICE_MODEL::onInitDlg(), DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnInitDlg(), DIALOG_SIGNAL_LIST::TransferDataToWindow(), DIALOG_UPDATE_FIELDS::TransferDataToWindow(), and DIALOG_COLOR_PICKER::TransferDataToWindow().

121 {
122  // must be called from the constructor of derived classes,
123  // when all widgets are initialized, and therefore their size fixed
124 
125  // SetSizeHints fixes the minimal size of sizers in the dialog
126  // (SetSizeHints calls Fit(), so no need to call it)
127  GetSizer()->SetSizeHints( this );
128 
129  // the default position, when calling the first time the dlg
130  Center();
131 }
PlotFormat DIALOG_PLOT::getPlotFormat ( )
private

Definition at line 346 of file dialog_plot.cpp.

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

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

347 {
348  // plot format id's are ordered like displayed in m_plotFormatOpt
349  static const PlotFormat plotFmt[] =
350  {
357  };
358 
359  return plotFmt[ m_plotFormatOpt->GetSelection() ];
360 }
PlotFormat
Enum PlotFormat is the set of supported output plot formats.
Definition: plotter.h:50
wxChoice * m_plotFormatOpt
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 141 of file dialog_shim.cpp.

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

142 {
143  wxSize sz( x, 0 );
144  return ConvertDialogToPixels( sz ).x;
145 }
void DIALOG_PLOT::init_Dialog ( )
private

Definition at line 65 of file dialog_plot.cpp.

References CONFIG_PS_FINEWIDTH_ADJ, PCB_PLOT_PARAMS::GetA4Output(), PCB_BASE_FRAME::GetBoard(), PCB_PLOT_PARAMS::GetCreateGerberJobFile(), BOARD::GetDesignSettings(), PCB_PLOT_PARAMS::GetDrillMarksType(), PCB_PLOT_PARAMS::GetDXFPlotPolygonMode(), BOARD::GetEnabledLayers(), PCB_PLOT_PARAMS::GetExcludeEdgeLayer(), PCB_PLOT_PARAMS::GetFormat(), PCB_PLOT_PARAMS::GetGerberPrecision(), PCB_PLOT_PARAMS::GetHPGLPenDiameter(), PCB_PLOT_PARAMS::GetIncludeGerberNetlistInfo(), BOARD::GetLayerName(), PCB_PLOT_PARAMS::GetLayerSelection(), PCB_PLOT_PARAMS::GetLineWidth(), PCB_PLOT_PARAMS::GetMirror(), PCB_PLOT_PARAMS::GetNegative(), PCB_PLOT_PARAMS::GetPlotFrameRef(), PCB_PLOT_PARAMS::GetPlotInvisibleText(), PCB_PLOT_PARAMS::GetPlotMode(), PCB_PLOT_PARAMS::GetPlotPadsOnSilkLayer(), PCB_PLOT_PARAMS::GetPlotReference(), PCB_PLOT_PARAMS::GetPlotValue(), PCB_PLOT_PARAMS::GetPlotViaOnMaskLayer(), PCB_PLOT_PARAMS::GetScaleSelection(), BOARD_DESIGN_SETTINGS::GetSmallestClearanceValue(), PCB_PLOT_PARAMS::GetSubtractMaskFromSilk(), PCB_PLOT_PARAMS::GetTextMode(), PCB_PLOT_PARAMS::GetUseGerberAttributes(), PCB_PLOT_PARAMS::GetUseGerberProtelExtensions(), 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_useGerberX2Attributes, m_widthAdjustMaxValue, m_widthAdjustMinValue, m_XScaleAdjust, m_YScaleAdjust, DIALOG_PLOT_BASE::m_zoneFillCheck, OnSetScaleOpt(), OPTKEY_PLOT_CHECK_ZONES, OPTKEY_PLOT_X_FINESCALE_ADJ, OPTKEY_PLOT_Y_FINESCALE_ADJ, PLOT_FORMAT_DXF, PLOT_FORMAT_GERBER, PLOT_FORMAT_HPGL, PLOT_FORMAT_PDF, PLOT_FORMAT_POST, PLOT_FORMAT_SVG, PLOT_MAX_SCALE, PLOT_MIN_SCALE, PLOTTEXTMODE_DEFAULT, reInitDialog(), SetPlotFormat(), setPlotModeChoiceSelection(), UNIT_BINDER::SetValue(), StringFromValue(), LSET::UIOrder(), and UNSCALED_UNITS.

Referenced by DIALOG_PLOT().

66 {
67  BOARD* board = m_parent->GetBoard();
68  wxFileName fileName;
69 
72 
73  bool checkZones;
74  m_config->Read( OPTKEY_PLOT_CHECK_ZONES, &checkZones, true );
75  m_zoneFillCheck->SetValue( checkZones );
76 
77  m_browseButton->SetBitmap( KiBitmap( folder_xpm ) );
78 
79  // m_PSWidthAdjust is stored in mm in user config
80  double dtmp;
81  m_config->Read( CONFIG_PS_FINEWIDTH_ADJ, &dtmp, 0 );
82  m_PSWidthAdjust = KiROUND( dtmp * IU_PER_MM );
83 
84  // The reasonable width correction value must be in a range of
85  // [-(MinTrackWidth-1), +(MinClearanceValue-1)] decimils.
88 
89  switch( m_plotOpts.GetFormat() )
90  {
91  default:
92  case PLOT_FORMAT_GERBER: m_plotFormatOpt->SetSelection( 0 ); break;
93  case PLOT_FORMAT_POST: m_plotFormatOpt->SetSelection( 1 ); break;
94  case PLOT_FORMAT_SVG: m_plotFormatOpt->SetSelection( 2 ); break;
95  case PLOT_FORMAT_DXF: m_plotFormatOpt->SetSelection( 3 ); break;
96  case PLOT_FORMAT_HPGL: m_plotFormatOpt->SetSelection( 4 ); break;
97  case PLOT_FORMAT_PDF: m_plotFormatOpt->SetSelection( 5 ); break;
98  }
99 
100  // Set units and value for HPGL pen size (this param is in mils).
102 
104 
105  // Test for a reasonable scale value. Set to 1 if problem
109 
112 
113  // Test for a reasonable PS width correction value. Set to 0 if problem.
114  if( m_PSWidthAdjust < m_widthAdjustMinValue || m_PSWidthAdjust > m_widthAdjustMaxValue )
115  m_PSWidthAdjust = 0.;
116 
118 
121 
122  // Could devote a PlotOrder() function in place of UIOrder().
123  m_layerList = board->GetEnabledLayers().UIOrder();
124 
125  // Populate the check list box by all enabled layers names
126  for( LSEQ seq = m_layerList; seq; ++seq )
127  {
128  PCB_LAYER_ID layer = *seq;
129 
130  int checkIndex = m_layerCheckListBox->Append( board->GetLayerName( layer ) );
131 
132  if( m_plotOpts.GetLayerSelection()[layer] )
133  m_layerCheckListBox->Check( checkIndex );
134  }
135 
136  // Option for using proper Gerber extensions
138 
139  // Option for including Gerber attributes (from Gerber X2 format) in the output
141 
142  // Option for including Gerber netlist info (from Gerber X2 format) in the output
144 
145  // Grey out if m_useGerberX2Attributes is not checked
146  m_useGerberNetAttributes->Enable( m_useGerberX2Attributes->GetValue() );
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 }
bool GetUseGerberProtelExtensions() const
LSEQ m_layerList
Definition: dialog_plot.h:48
double GetHPGLPenDiameter() const
bool GetMirror() const
double m_YScaleAdjust
Definition: dialog_plot.h:51
bool GetSubtractMaskFromSilk() const
wxCheckBox * m_useGerberExtensions
static int KiROUND(double v)
Round a floating point number to an integer using "round halfway cases away from zero".
Definition: common.h:120
#define OPTKEY_PLOT_Y_FINESCALE_ADJ
Definition: pcbplot.h:61
int GetSmallestClearanceValue()
Function GetSmallestClearanceValue.
bool GetUseGerberAttributes() const
wxCheckBox * m_plotPSNegativeOpt
#define PLOT_MIN_SCALE
Definition: pcbplot.h:68
wxCheckBox * m_excludeEdgeLayerOpt
BOARD * GetBoard() const
wxCheckBox * m_plotMirrorOpt
wxCheckBox * m_zoneFillCheck
LSET GetLayerSelection() const
wxChoice * m_plotFormatOpt
wxChoice * m_coordFormatCtrl
LSET GetEnabledLayers() const
Function GetEnabledLayers is a proxy function that calls the corresponding function in m_BoardSetting...
bool GetPlotValue() const
UNIT_BINDER m_trackWidthCorrection
Definition: dialog_plot.h:62
wxCheckBox * m_useGerberX2Attributes
double m_XScaleAdjust
Definition: dialog_plot.h:49
wxTextCtrl * m_fineAdjustYCtrl
wxCheckBox * m_DXF_plotModeOpt
bool GetA4Output() const
bool GetExcludeEdgeLayer() 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
DrillMarksType GetDrillMarksType() const
PCB_LAYER_ID
A quick note on layer IDs:
bool GetIncludeGerberNetlistInfo() const
#define OPTKEY_PLOT_X_FINESCALE_ADJ
Definition: pcbplot.h:60
PCB_EDIT_FRAME * m_parent
Definition: dialog_plot.h:46
int GetLineWidth() const
int m_widthAdjustMaxValue
Definition: dialog_plot.h:58
PlotTextMode GetTextMode() const
int m_TrackMinWidth
track min value for width ((min copper size value
#define PLOT_MAX_SCALE
Definition: pcbplot.h:69
const wxString GetLayerName(PCB_LAYER_ID aLayer) const
Function GetLayerName returns the name of a layer given by aLayer.
int m_PSWidthAdjust
Definition: dialog_plot.h:53
wxCheckBox * m_forcePSA4OutputOpt
BOARD_DESIGN_SETTINGS & GetDesignSettings() const
Function GetDesignSettings.
Definition: class_board.h:538
#define CONFIG_PS_FINEWIDTH_ADJ
Definition: pcbplot.h:62
void setPlotModeChoiceSelection(EDA_DRAW_MODE_T aPlotMode)
Definition: dialog_plot.h:84
bool GetPlotViaOnMaskLayer() const
int GetScaleSelection() const
void OnSetScaleOpt(wxCommandEvent &event) override
bool GetCreateGerberJobFile() const
wxCheckBox * m_useGerberNetAttributes
bool GetPlotReference() const
int m_widthAdjustMinValue
Definition: dialog_plot.h:57
PlotFormat GetFormat() const
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 GetDXFPlotPolygonMode() const
wxChoice * m_scaleOpt
void reInitDialog()
wxCheckBox * m_plotModuleRefOpt
UNIT_BINDER m_defaultLineWidth
Definition: dialog_plot.h:60
wxCheckBox * m_subtractMaskFromSilk
wxCheckBox * m_plotNoViaOnMaskOpt
wxCheckBox * m_plotModuleValueOpt
bool GetPlotInvisibleText() const
wxChoice * m_drillShapeOpt
Class BOARD holds information pertinent to a Pcbnew printed circuit board.
Definition: class_board.h:170
bool GetNegative() const
bool GetPlotFrameRef() 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
EDA_DRAW_MODE_T GetPlotMode() const
bool GetPlotPadsOnSilkLayer() const
#define IU_PER_MILS
Definition: plotter.cpp:134
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
wxCheckBox * m_excludePadsFromSilkscreen
#define OPTKEY_PLOT_CHECK_ZONES
Definition: pcbplot.h:63
UNIT_BINDER m_defaultPenSize
Definition: dialog_plot.h:61
wxBitmapButton * m_browseButton
wxCheckListBox * m_layerCheckListBox
LSEQ UIOrder() const
Definition: lset.cpp:800
int GetGerberPrecision() const
KIWAY& KIWAY_HOLDER::Kiway ( ) const
inlineinherited

Function Kiway returns a reference to the KIWAY that this object has an opportunity to participate in.

A KIWAY_HOLDER is not necessarily a KIWAY_PLAYER.

Definition at line 60 of file kiway_player.h.

References KIWAY_HOLDER::GetUserUnits(), KIWAY_HOLDER::m_kiway, KIWAY_HOLDER::Prj(), KIWAY_HOLDER::SetKiway(), and VTBL_ENTRY.

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(), CVPCB_MAINFRAME::CVPCB_MAINFRAME(), DIALOG_RESCUE_EACH::DIALOG_RESCUE_EACH(), DIALOG_SHIM::DIALOG_SHIM(), FIELDS_GRID_TRICKS::doPopupSelection(), FIELDS_EDITOR_GRID_TRICKS::doPopupSelection(), 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(), 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_BASE_FRAME::OnOpenLibraryViewer(), 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(), FOOTPRINT_WIZARD_FRAME::ReCreateVToolbar(), LIB_EDIT_FRAME::refreshSchematic(), KICAD_MANAGER_FRAME::RunEeschema(), KICAD_MANAGER_FRAME::RunPcbNew(), SCH_EDIT_FRAME::SaveEEFile(), CVPCB_MAINFRAME::SaveFootprintAssociation(), FOOTPRINT_EDIT_FRAME::SaveFootprintToBoard(), SCH_BASE_FRAME::SelectComponentFromLibBrowser(), SCH_EDIT_FRAME::SendCrossProbeNetName(), PCB_EDIT_FRAME::SendCrossProbeNetName(), CVPCB_MAINFRAME::SendMessageToEESCHEMA(), PCB_EDIT_FRAME::SendMessageToEESCHEMA(), SCH_EDIT_FRAME::SendMessageToPCBNEW(), SCH_EDIT_FRAME::sendNetlist(), FOOTPRINT_EDIT_FRAME::SetPlotSettings(), FOOTPRINT_VIEWER_FRAME::Show3D_Frame(), FOOTPRINT_WIZARD_FRAME::Show3D_Frame(), EDA_BASE_FRAME::ShowPreferences(), SIM_PLOT_FRAME::SIM_PLOT_FRAME(), LIB_MANAGER::UpdatePart(), and DIALOG_EXCHANGE_FOOTPRINTS::ViewAndSelectFootprint().

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

Reimplemented from DIALOG_PLOT_BASE.

Definition at line 287 of file dialog_plot.cpp.

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

Referenced by SetPlotFormat().

288 {
289  // m_DXF_plotTextStrokeFontOpt is disabled if m_DXF_plotModeOpt
290  // is checked (plot in DXF polygon mode)
291  m_DXF_plotTextStrokeFontOpt->Enable( !m_DXF_plotModeOpt->GetValue() );
292 
293  // if m_DXF_plotTextStrokeFontOpt option is disabled (plot DXF in polygon mode),
294  // force m_DXF_plotTextStrokeFontOpt to true to use Pcbnew stroke font
295  if( !m_DXF_plotTextStrokeFontOpt->IsEnabled() )
296  m_DXF_plotTextStrokeFontOpt->SetValue( true );
297 }
wxCheckBox * m_DXF_plotModeOpt
wxCheckBox * m_DXF_plotTextStrokeFontOpt
void DIALOG_PLOT::OnGerberX2Checked ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_PLOT_BASE.

Definition at line 699 of file dialog_plot.cpp.

References DIALOG_PLOT_BASE::m_useGerberNetAttributes, and DIALOG_PLOT_BASE::m_useGerberX2Attributes.

700 {
701  // m_useGerberNetAttributes is useless if m_useGerberX2Attributes
702  // is not checked. So disabled (greyed out) when Gerber X2 gets unchecked
703  // to make it clear to the user.
704  if( m_useGerberX2Attributes->GetValue() )
705  {
706  m_useGerberNetAttributes->Enable( true );
707  }
708  else
709  {
710  m_useGerberNetAttributes->Enable( false );
711  m_useGerberNetAttributes->SetValue( false );
712  }
713 }
wxCheckBox * m_useGerberX2Attributes
wxCheckBox * m_useGerberNetAttributes
virtual void DIALOG_PLOT_BASE::OnInitDialog ( wxInitDialogEvent &  event)
inlineprotectedvirtualinherited

Definition at line 124 of file dialog_plot_base.h.

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

124 { event.Skip(); }
void DIALOG_PLOT::OnOutputDirectoryBrowseClicked ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_PLOT_BASE.

Definition at line 312 of file dialog_plot.cpp.

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

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

Definition at line 283 of file dialog_shim.cpp.

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

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

284 {
285  if( m_firstPaintEvent )
286  {
287 #ifdef __WXMAC__
288  fixOSXCancelButtonIssue( this );
289  selectAllInTextCtrls( GetChildren() );
290 #endif
291 
293  m_initialFocusTarget->SetFocus();
294  else
295  SetFocus(); // Focus the dialog itself
296 
297  m_firstPaintEvent = false;
298  }
299 
300  event.Skip();
301 }
wxWindow * m_initialFocusTarget
Definition: dialog_shim.h:150
bool m_firstPaintEvent
Definition: dialog_shim.h:149
void DIALOG_PLOT::OnPopUpLayers ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_PLOT_BASE.

Definition at line 224 of file dialog_plot.cpp.

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

225 {
226  unsigned int i;
227 
228  switch( event.GetId() )
229  {
230  case ID_LAYER_FAB: // Select layers usually needed to build a board
231  for( i = 0; i < m_layerList.size(); i++ )
232  {
233  LSET layermask( m_layerList[ i ] );
234 
235  if( ( layermask & ( LSET::AllCuMask() | LSET::AllTechMask() ) ).any() )
236  m_layerCheckListBox->Check( i, true );
237  else
238  m_layerCheckListBox->Check( i, false );
239  }
240  break;
241 
243  for( i = 0; i < m_layerList.size(); i++ )
244  {
245  if( IsCopperLayer( m_layerList[i] ) )
246  m_layerCheckListBox->Check( i, true );
247  }
248  break;
249 
251  for( i = 0; i < m_layerList.size(); i++ )
252  {
253  if( IsCopperLayer( m_layerList[i] ) )
254  m_layerCheckListBox->Check( i, false );
255  }
256  break;
257 
259  for( i = 0; i < m_layerList.size(); i++ )
260  m_layerCheckListBox->Check( i, true );
261  break;
262 
264  for( i = 0; i < m_layerList.size(); i++ )
265  m_layerCheckListBox->Check( i, false );
266  break;
267 
268  default:
269  break;
270  }
271 }
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:673
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:743
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
void DIALOG_PLOT::OnRightClick ( wxMouseEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_PLOT_BASE.

Definition at line 216 of file dialog_plot.cpp.

References DIALOG_PLOT_BASE::m_popMenu.

217 {
218  PopupMenu( m_popMenu );
219 }
void DIALOG_PLOT::onRunDRC ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_PLOT_BASE.

Definition at line 866 of file dialog_plot.cpp.

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

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

Reimplemented from DIALOG_PLOT_BASE.

Definition at line 300 of file dialog_plot.cpp.

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

Referenced by init_Dialog(), and SetPlotFormat().

301 {
302  /* Disable sheet reference for scale != 1:1 */
303  bool scale1 = ( m_scaleOpt->GetSelection() == 1 );
304 
305  m_plotSheetRef->Enable( scale1 );
306 
307  if( !scale1 )
308  m_plotSheetRef->SetValue( false );
309 }
wxCheckBox * m_plotSheetRef
wxChoice * m_scaleOpt
void DIALOG_PLOT::Plot ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_PLOT_BASE.

Definition at line 716 of file dialog_plot.cpp.

References GERBER_JOBFILE_WRITER::AddGbrFile(), LSET::AllCuMask(), applyPlotSettings(), BuildPlotFileName(), PCB_EDIT_FRAME::Check_All_Zones(), GERBER_JOBFILE_WRITER::CreateJobFile(), DisplayError(), DisplayInfoMessage(), dummy(), PLOTTER::EndPlot(), EnsureFileDirectoryExists(), GerberJobFileExtension, PCB_BASE_FRAME::GetBoard(), GetChars(), PCB_PLOT_PARAMS::GetCreateGerberJobFile(), GetDefaultPlotExtension(), BOARD::GetEnabledLayers(), BOARD::GetFileName(), PCB_PLOT_PARAMS::GetFormat(), GetGerberProtelExtension(), BOARD::GetLayerName(), PCB_PLOT_PARAMS::GetLayerSelection(), PCB_PLOT_PARAMS::GetOutputDirectory(), getPlotFormat(), PCB_PLOT_PARAMS::GetScale(), PCB_PLOT_PARAMS::GetScaleSelection(), DIALOG_PLOT_BASE::m_messagesPanel, m_parent, m_plotOpts, m_PSWidthAdjust, DIALOG_PLOT_BASE::m_useGerberExtensions, m_XScaleAdjust, m_YScaleAdjust, DIALOG_PLOT_BASE::m_zoneFillCheck, PLOT_FORMAT_GERBER, PLOT_FORMAT_POST, PLOT_MAX_SCALE, PLOT_MIN_SCALE, PlotOneBoardLayer(), REPORTER::Report(), WX_HTML_REPORT_PANEL::Reporter(), REPORTER::RPT_ACTION, REPORTER::RPT_ERROR, PCB_PLOT_PARAMS::SetAutoScale(), PCB_PLOT_PARAMS::SetFineScaleAdjustX(), PCB_PLOT_PARAMS::SetFineScaleAdjustY(), PCB_BASE_FRAME::SetPlotSettings(), PCB_PLOT_PARAMS::SetScale(), PCB_PLOT_PARAMS::SetWidthAdjust(), StartPlotBoard(), and LSET::UIOrder().

717 {
718  BOARD* board = m_parent->GetBoard();
719 
721 
722  // If no layer selected, we have nothing plotted.
723  // Prompt user if it happens because he could think there is a bug in Pcbnew.
724  if( !m_plotOpts.GetLayerSelection().any() )
725  {
726  DisplayError( this, _( "No layer selected, Nothing to plot" ) );
727  return;
728  }
729 
730  // Create output directory if it does not exist (also transform it in
731  // absolute form). Bail if it fails
732  wxFileName outputDir = wxFileName::DirName( m_plotOpts.GetOutputDirectory() );
733  wxString boardFilename = m_parent->GetBoard()->GetFileName();
734  REPORTER& reporter = m_messagesPanel->Reporter();
735 
736  if( !EnsureFileDirectoryExists( &outputDir, boardFilename, &reporter ) )
737  {
738  wxString msg;
739  msg.Printf( _( "Could not write plot files to folder \"%s\"." ),
740  GetChars( outputDir.GetPath() ) );
741  DisplayError( this, msg );
742  return;
743  }
744 
745  if( m_zoneFillCheck->GetValue() )
746  m_parent->Check_All_Zones( this );
747 
748  m_plotOpts.SetAutoScale( false );
749  m_plotOpts.SetScale( 1 );
750 
751  switch( m_plotOpts.GetScaleSelection() )
752  {
753  default:
754  break;
755 
756  case 0: // Autoscale option
757  m_plotOpts.SetAutoScale( true );
758  break;
759 
760  case 2: // 3:2 option
761  m_plotOpts.SetScale( 1.5 );
762  break;
763 
764  case 3: // 2:1 option
765  m_plotOpts.SetScale( 2 );
766  break;
767 
768  case 4: // 3:1 option
769  m_plotOpts.SetScale( 3 );
770  break;
771  }
772 
773  /* If the scale factor edit controls are disabled or the scale value
774  * is 0, don't adjust the base scale factor. This fixes a bug when
775  * the default scale adjust is initialized to 0 and saved in program
776  * settings resulting in a divide by zero fault.
777  */
779  {
780  if( m_XScaleAdjust != 0.0 )
782 
783  if( m_YScaleAdjust != 0.0 )
785 
787  }
788 
789  wxString file_ext( GetDefaultPlotExtension( m_plotOpts.GetFormat() ) );
790 
791  // Test for a reasonable scale value
792  // XXX could this actually happen? isn't it constrained in the apply
793  // function?
795  DisplayInfoMessage( this, _( "Warning: Scale option set to a very small value" ) );
796 
798  DisplayInfoMessage( this, _( "Warning: Scale option set to a very large value" ) );
799 
800  GERBER_JOBFILE_WRITER jobfile_writer( board, &reporter );
801 
802  // Save the current plot options in the board
804 
805  wxBusyCursor dummy;
806 
807  for( LSEQ seq = m_plotOpts.GetLayerSelection().UIOrder(); seq; ++seq )
808  {
809  PCB_LAYER_ID layer = *seq;
810 
811  // All copper layers that are disabled are actually selected
812  // This is due to wonkyness in automatically selecting copper layers
813  // for plotting when adding more than two layers to a board.
814  // If plot options become accessible to the layers setup dialog
815  // please move this functionality there!
816  // This skips a copper layer if it is actually disabled on the board.
817  if( ( LSET::AllCuMask() & ~board->GetEnabledLayers() )[layer] )
818  continue;
819 
820  // Pick the basename from the board file
821  wxFileName fn( boardFilename );
822 
823  // Use Gerber Extensions based on layer number
824  // (See http://en.wikipedia.org/wiki/Gerber_File)
826  file_ext = GetGerberProtelExtension( layer );
827 
828  BuildPlotFileName( &fn, outputDir.GetPath(), board->GetLayerName( layer ), file_ext );
829  wxString fullname = fn.GetFullName();
830  jobfile_writer.AddGbrFile( layer, fullname );
831 
832  LOCALE_IO toggle;
833 
834  PLOTTER* plotter = StartPlotBoard( board, &m_plotOpts, layer, fn.GetFullPath(), wxEmptyString );
835 
836  // Print diags in messages box:
837  wxString msg;
838 
839  if( plotter )
840  {
841  PlotOneBoardLayer( board, plotter, layer, m_plotOpts );
842  plotter->EndPlot();
843  delete plotter;
844 
845  msg.Printf( _( "Plot file \"%s\" created." ), GetChars( fn.GetFullPath() ) );
846  reporter.Report( msg, REPORTER::RPT_ACTION );
847  }
848  else
849  {
850  msg.Printf( _( "Unable to create file \"%s\"." ), GetChars( fn.GetFullPath() ) );
851  reporter.Report( msg, REPORTER::RPT_ERROR );
852  }
853  }
854 
856  {
857  // Pick the basename from the board file
858  wxFileName fn( boardFilename );
859  // Build gerber job file from basename
860  BuildPlotFileName( &fn, outputDir.GetPath(), "job", GerberJobFileExtension );
861  jobfile_writer.CreateJobFile( fn.GetFullPath() );
862  }
863 }
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:673
WX_HTML_REPORT_PANEL * m_messagesPanel
double m_YScaleAdjust
Definition: dialog_plot.h:51
wxCheckBox * m_useGerberExtensions
double GetScale() const
Instantiate the current locale within a scope in which you are expecting exceptions to be thrown...
Definition: common.h:179
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...
const wxString GetGerberProtelExtension(LAYER_NUM aLayer)
Function GetGerberProtelExtension.
Definition: pcbplot.cpp:48
BOARD * GetBoard() const
wxCheckBox * m_zoneFillCheck
Class REPORTER is a pure virtual class used to derive REPORTER objects from.
Definition: reporter.h:61
LSET GetLayerSelection() const
LSET GetEnabledLayers() const
Function GetEnabledLayers is a proxy function that calls the corresponding function in m_BoardSetting...
double m_XScaleAdjust
Definition: dialog_plot.h:49
virtual bool EndPlot()=0
wxString GetOutputDirectory() const
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
const wxString & GetFileName() const
Definition: class_board.h:237
bool EnsureFileDirectoryExists(wxFileName *aTargetFullFileName, const wxString &aBaseFilename, REPORTER *aReporter)
Make aTargetFullFileName absolute and create the path of this file if it doesn&#39;t yet exist...
Definition: common.cpp:469
REPORTER & Reporter()
returns the reporter object that reports to this panel
#define PLOT_MAX_SCALE
Definition: pcbplot.h:69
const wxString GetLayerName(PCB_LAYER_ID aLayer) const
Function GetLayerName returns the name of a layer given by aLayer.
int m_PSWidthAdjust
Definition: dialog_plot.h:53
const std::string GerberJobFileExtension
int GetScaleSelection() const
virtual void SetPlotSettings(const PCB_PLOT_PARAMS &aSettings)
bool GetCreateGerberJobFile() const
PlotFormat GetFormat() const
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
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:380
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:170
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.
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...
void DisplayInfoMessage(wxWindow *aParent, const wxString &aMessage, const wxString &aExtraInfo)
Function DisplayInfoMessage displays an informational message box with aMessage.
Definition: confirm.cpp:277
void DisplayError(wxWindow *parent, const wxString &text, int displaytime)
Function DisplayError displays an error or warning message box with aMessage.
Definition: confirm.cpp:245
LSEQ UIOrder() const
Definition: lset.cpp:800
PROJECT & KIWAY_HOLDER::Prj ( ) const
inherited

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

Definition at line 34 of file kiway_holder.cpp.

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

Referenced by PCB_BASE_EDIT_FRAME::AddLibrary(), LIB_MANAGER::addLibrary(), SCH_EDIT_FRAME::AppendSchematic(), PCB_EDIT_FRAME::ArchiveModulesOnBoard(), DIALOG_SYMBOL_REMAP::backupProject(), LIB_VIEW_FRAME::BestZoom(), CVPCB_MAINFRAME::BuildLIBRARY_LISTBOX(), DIALOG_FOOTPRINT_FP_EDITOR::Cfg3DPath(), DIALOG_FOOTPRINT_BOARD_EDITOR::Cfg3DPath(), DIALOG_EDIT_COMPONENT_IN_LIBRARY::checkAliasName(), PCB_BASE_EDIT_FRAME::CreateNewLibrary(), KICAD_MANAGER_FRAME::CreateNewProject(), DIALOG_PLOT_SCHEMATIC::createPlotFileName(), DIALOG_SYMBOL_REMAP::createProjectSymbolLibTable(), FOOTPRINT_EDIT_FRAME::DeleteModuleFromLibrary(), DIALOG_CHOOSE_COMPONENT::DIALOG_CHOOSE_COMPONENT(), DIALOG_CHOOSE_FOOTPRINT::DIALOG_CHOOSE_FOOTPRINT(), DIALOG_CONFIG_EQUFILES::DIALOG_CONFIG_EQUFILES(), DIALOG_FOOTPRINT_BOARD_EDITOR::DIALOG_FOOTPRINT_BOARD_EDITOR(), DIALOG_FOOTPRINT_FP_EDITOR::DIALOG_FOOTPRINT_FP_EDITOR(), DIALOG_PAGES_SETTINGS::DIALOG_PAGES_SETTINGS(), DIALOG_SYMBOL_REMAP::DIALOG_SYMBOL_REMAP(), LIB_VIEW_FRAME::DisplayLibInfos(), SCH_BASE_FRAME::DisplayListComponentsInLib(), PCB_EDIT_FRAME::doAutoSave(), SCH_EDIT_FRAME::EditSheet(), PCB_EDIT_FRAME::Export_IDF3(), PCB_EDIT_FRAME::Files_io_from_id(), 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(), DIALOG_BOM::getPluginFileName(), 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(), KIWAY_HOLDER::Kiway(), 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(), 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(), KICAD_MANAGER_FRAME::OnOpenFileInTextEditor(), DIALOG_NETLIST::OnOpenNetlistClick(), DIALOG_EXPORT_SVG::OnOutputDirectoryBrowseClicked(), OnOutputDirectoryBrowseClicked(), DIALOG_GENDRILL::OnOutputDirectoryBrowseClicked(), DIALOG_PLOT_SCHEMATIC::OnOutputDirectoryBrowseClicked(), LIB_EDIT_FRAME::OnPlotCurrentComponent(), 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::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(), FOOTPRINT_EDIT_FRAME::restoreLastFootprint(), FOOTPRINT_EDIT_FRAME::retainLastFootprint(), SCH_EDIT_FRAME::SaveEEFile(), FOOTPRINT_EDIT_FRAME::SaveFootprint(), FOOTPRINT_EDIT_FRAME::SaveFootprintAs(), FOOTPRINT_EDIT_FRAME::saveFootprintInLibrary(), LIB_EDIT_FRAME::saveLibrary(), LIB_EDIT_FRAME::SaveOneSymbol(), LIB_EDIT_FRAME::savePartAs(), SCH_EDIT_FRAME::SaveProject(), CVPCB_MAINFRAME::SaveProjectFile(), SCH_EDIT_FRAME::SaveProjectSettings(), PCB_EDIT_FRAME::SaveProjectSettings(), SCH_BASE_FRAME::saveSymbolLibTables(), FOOTPRINT_VIEWER_FRAME::SelectAndViewFootprint(), SCH_BASE_FRAME::SelectComponentFromLibTree(), PCB_BASE_FRAME::SelectLibrary(), SCH_BASE_FRAME::SelectLibraryFromList(), LIB_EDIT_FRAME::selectSymLibTable(), FOOTPRINT_VIEWER_FRAME::setCurFootprintName(), LIB_EDIT_FRAME::SetCurLib(), FOOTPRINT_VIEWER_FRAME::setCurNickname(), LIB_EDIT_FRAME::SetCurPart(), KICAD_MANAGER_FRAME::SetProjectFileName(), DIALOG_CHOOSE_COMPONENT::ShowFootprintFor(), FOOTPRINT_VIEWER_FRAME::ShowModal(), SIM_PLOT_FRAME::SIM_PLOT_FRAME(), LIB_MANAGER::symTable(), FOOTPRINT_EDIT_FRAME::SyncLibraryTree(), EDA_3D_VIEWER::takeScreenshot(), DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::TransferDataFromWindow(), DIALOG_FOOTPRINT_FP_EDITOR::TransferDataToWindow(), DIALOG_FOOTPRINT_BOARD_EDITOR::TransferDataToWindow(), SIM_PLOT_FRAME::updateNetlistExporter(), SCH_SCREEN::UpdateSymbolLinks(), FOOTPRINT_VIEWER_FRAME::UpdateTitle(), FOOTPRINT_EDIT_FRAME::updateTitle(), 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(), LAUNCHER_PANEL::~LAUNCHER_PANEL(), and PCB_BASE_EDIT_FRAME::~PCB_BASE_EDIT_FRAME().

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

Definition at line 202 of file dialog_plot.cpp.

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

Referenced by CreateDrillFile(), and init_Dialog().

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

References DIALOG_SHIM::EndQuasiModal(), DIALOG_SHIM::m_initialFocusTarget, and DIALOG_SHIM::ShowQuasiModal().

Referenced by DIALOG_BOM::DIALOG_BOM(), DIALOG_CHOOSE_COMPONENT::DIALOG_CHOOSE_COMPONENT(), DIALOG_CHOOSE_FOOTPRINT::DIALOG_CHOOSE_FOOTPRINT(), DIALOG_CONFIGURE_PATHS::DIALOG_CONFIGURE_PATHS(), DIALOG_EDIT_LINE_STYLE::DIALOG_EDIT_LINE_STYLE(), DIALOG_FIELDS_EDITOR_GLOBAL::DIALOG_FIELDS_EDITOR_GLOBAL(), DIALOG_FOOTPRINT_BOARD_EDITOR::DIALOG_FOOTPRINT_BOARD_EDITOR(), DIALOG_FOOTPRINT_FP_EDITOR::DIALOG_FOOTPRINT_FP_EDITOR(), DIALOG_FP_PLUGIN_OPTIONS::DIALOG_FP_PLUGIN_OPTIONS(), DIALOG_GRAPHIC_ITEM_PROPERTIES::DIALOG_GRAPHIC_ITEM_PROPERTIES(), DIALOG_LABEL_EDITOR::DIALOG_LABEL_EDITOR(), DIALOG_LIB_EDIT_DRAW_ITEM::DIALOG_LIB_EDIT_DRAW_ITEM(), DIALOG_LIB_EDIT_PIN::DIALOG_LIB_EDIT_PIN(), DIALOG_LIB_EDIT_TEXT::DIALOG_LIB_EDIT_TEXT(), DIALOG_PAD_PRIMITIVES_PROPERTIES::DIALOG_PAD_PRIMITIVES_PROPERTIES(), DIALOG_PAD_PROPERTIES::DIALOG_PAD_PROPERTIES(), DIALOG_SET_GRID::DIALOG_SET_GRID(), DIALOG_TARGET_PROPERTIES::DIALOG_TARGET_PROPERTIES(), DIALOG_TEXT_PROPERTIES::DIALOG_TEXT_PROPERTIES(), DIALOG_TRACK_VIA_PROPERTIES::DIALOG_TRACK_VIA_PROPERTIES(), DIALOG_EDIT_ONE_FIELD::init(), DIALOG_EXCHANGE_FOOTPRINTS::OnMatchAllClicked(), DIALOG_EXCHANGE_FOOTPRINTS::OnMatchIDClicked(), DIALOG_EXCHANGE_FOOTPRINTS::OnMatchRefClicked(), DIALOG_EXCHANGE_FOOTPRINTS::OnMatchSelectedClicked(), DIALOG_EXCHANGE_FOOTPRINTS::OnMatchValueClicked(), PANEL_FP_LIB_TABLE::PANEL_FP_LIB_TABLE(), PANEL_SYM_LIB_TABLE::PANEL_SYM_LIB_TABLE(), FOOTPRINT_EDIT_FRAME::SaveFootprintAs(), and LIB_EDIT_FRAME::savePartAs().

87  {
88  m_initialFocusTarget = aWindow;
89  }
wxWindow * m_initialFocusTarget
Definition: dialog_shim.h:150
void KIWAY_HOLDER::SetKiway ( wxWindow *  aDest,
KIWAY aKiway 
)
inherited

Function SetKiway.

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

Definition at line 47 of file kiway_holder.cpp.

References KIWAY_HOLDER::m_kiway, and name.

Referenced by DIALOG_SHIM::DIALOG_SHIM(), InvokePcbLibTableEditor(), KIWAY_HOLDER::Kiway(), and SIM_PLOT_FRAME::SIM_PLOT_FRAME().

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

Reimplemented from DIALOG_PLOT_BASE.

Definition at line 365 of file dialog_plot.cpp.

References UNIT_BINDER::Enable(), FILLED, getPlotFormat(), m_defaultLineWidth, m_defaultPenSize, DIALOG_PLOT_BASE::m_drillShapeOpt, DIALOG_PLOT_BASE::m_DXF_plotModeOpt, DIALOG_PLOT_BASE::m_excludeEdgeLayerOpt, DIALOG_PLOT_BASE::m_fineAdjustXCtrl, DIALOG_PLOT_BASE::m_fineAdjustYCtrl, DIALOG_PLOT_BASE::m_forcePSA4OutputOpt, DIALOG_PLOT_BASE::m_GerberOptionsSizer, DIALOG_PLOT_BASE::m_HPGLOptionsSizer, DIALOG_PLOT_BASE::m_MainSizer, DIALOG_PLOT_BASE::m_plotMirrorOpt, DIALOG_PLOT_BASE::m_plotModeOpt, DIALOG_PLOT_BASE::m_PlotOptionsSizer, DIALOG_PLOT_BASE::m_plotPSNegativeOpt, DIALOG_PLOT_BASE::m_PSOptionsSizer, DIALOG_PLOT_BASE::m_scaleOpt, DIALOG_PLOT_BASE::m_SizerDXF_options, m_trackWidthCorrection, DIALOG_PLOT_BASE::m_useAuxOriginCheckBox, OnChangeDXFPlotMode(), OnSetScaleOpt(), PLOT_FORMAT_DXF, PLOT_FORMAT_GERBER, PLOT_FORMAT_HPGL, PLOT_FORMAT_PDF, PLOT_FORMAT_POST, PLOT_FORMAT_SVG, PLOT_FORMAT_UNDEFINED, and setPlotModeChoiceSelection().

Referenced by init_Dialog().

366 {
367  // this option exist only in DXF format:
369 
370  switch( getPlotFormat() )
371  {
372  case PLOT_FORMAT_PDF:
373  case PLOT_FORMAT_SVG:
374  m_drillShapeOpt->Enable( true );
375  m_plotModeOpt->Enable( false );
377  m_plotMirrorOpt->Enable( true );
378  m_useAuxOriginCheckBox->Enable( false );
379  m_useAuxOriginCheckBox->SetValue( false );
380  m_defaultLineWidth.Enable( true );
381  m_defaultPenSize.Enable( false );
382  m_excludeEdgeLayerOpt->Enable( true );
383  m_scaleOpt->Enable( false );
384  m_scaleOpt->SetSelection( 1 );
385  m_fineAdjustXCtrl->Enable( false );
386  m_fineAdjustYCtrl->Enable( false );
388  m_plotPSNegativeOpt->Enable( true );
389  m_forcePSA4OutputOpt->Enable( false );
390  m_forcePSA4OutputOpt->SetValue( false );
391 
396  break;
397 
398  case PLOT_FORMAT_POST:
399  m_drillShapeOpt->Enable( true );
400  m_plotModeOpt->Enable( true );
401  m_plotMirrorOpt->Enable( true );
402  m_useAuxOriginCheckBox->Enable( false );
403  m_useAuxOriginCheckBox->SetValue( false );
404  m_defaultLineWidth.Enable( true );
405  m_defaultPenSize.Enable( false );
406  m_excludeEdgeLayerOpt->Enable( true );
407  m_scaleOpt->Enable( true );
408  m_fineAdjustXCtrl->Enable( true );
409  m_fineAdjustYCtrl->Enable( true );
411  m_plotPSNegativeOpt->Enable( true );
412  m_forcePSA4OutputOpt->Enable( true );
413 
418  break;
419 
420  case PLOT_FORMAT_GERBER:
421  m_drillShapeOpt->Enable( false );
422  m_drillShapeOpt->SetSelection( 0 );
423  m_plotModeOpt->Enable( false );
425  m_plotMirrorOpt->Enable( false );
426  m_plotMirrorOpt->SetValue( false );
427  m_useAuxOriginCheckBox->Enable( true );
428  m_defaultLineWidth.Enable( true );
429  m_defaultPenSize.Enable( false );
430  m_excludeEdgeLayerOpt->Enable( true );
431  m_scaleOpt->Enable( false );
432  m_scaleOpt->SetSelection( 1 );
433  m_fineAdjustXCtrl->Enable( false );
434  m_fineAdjustYCtrl->Enable( false );
436  m_plotPSNegativeOpt->Enable( false );
437  m_plotPSNegativeOpt->SetValue( false );
438  m_forcePSA4OutputOpt->Enable( false );
439  m_forcePSA4OutputOpt->SetValue( false );
440 
445  break;
446 
447  case PLOT_FORMAT_HPGL:
448  m_drillShapeOpt->Enable( true );
449  m_plotModeOpt->Enable( true );
450  m_plotMirrorOpt->Enable( true );
451  m_useAuxOriginCheckBox->Enable( false );
452  m_useAuxOriginCheckBox->SetValue( false );
453  m_defaultLineWidth.Enable( false );
454  m_defaultPenSize.Enable( true );
455  m_excludeEdgeLayerOpt->Enable( true );
456  m_scaleOpt->Enable( true );
457  m_fineAdjustXCtrl->Enable( false );
458  m_fineAdjustYCtrl->Enable( false );
460  m_plotPSNegativeOpt->SetValue( false );
461  m_plotPSNegativeOpt->Enable( false );
462  m_forcePSA4OutputOpt->Enable( true );
463 
468  break;
469 
470  case PLOT_FORMAT_DXF:
471  m_drillShapeOpt->Enable( true );
472  m_plotModeOpt->Enable( false );
474  m_plotMirrorOpt->Enable( false );
475  m_plotMirrorOpt->SetValue( false );
476  m_useAuxOriginCheckBox->Enable( true );
477  m_defaultLineWidth.Enable( false );
478  m_defaultPenSize.Enable( false );
479  m_excludeEdgeLayerOpt->Enable( true );
480  m_scaleOpt->Enable( false );
481  m_scaleOpt->SetSelection( 1 );
482  m_fineAdjustXCtrl->Enable( false );
483  m_fineAdjustYCtrl->Enable( false );
485  m_plotPSNegativeOpt->Enable( false );
486  m_plotPSNegativeOpt->SetValue( false );
487  m_forcePSA4OutputOpt->Enable( false );
488  m_forcePSA4OutputOpt->SetValue( false );
489 
494 
495  OnChangeDXFPlotMode( event );
496  break;
497 
499  break;
500  }
501 
502  /* Update the interlock between scale and frame reference
503  * (scaling would mess up the frame border...) */
504  OnSetScaleOpt( event );
505 
506  Layout();
507  m_MainSizer->SetSizeHints( this );
508 }
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.
void DIALOG_PLOT::setPlotModeChoiceSelection ( EDA_DRAW_MODE_T  aPlotMode)
inlineprivate

Definition at line 84 of file dialog_plot.h.

References DIALOG_PLOT_BASE::m_plotModeOpt, and SKETCH.

Referenced by init_Dialog(), and SetPlotFormat().

85  {
86  m_plotModeOpt->SetSelection( aPlotMode == SKETCH ? 1 : 0 );
87  }
wxChoice * m_plotModeOpt
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 134 of file dialog_shim.cpp.

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

135 {
136  wxSize sz( x, y );
137  SetSize( ConvertDialogToPixels( sz ) );
138 }
bool DIALOG_SHIM::Show ( bool  show)
overrideinherited

Definition at line 162 of file dialog_shim.cpp.

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

Referenced by DIALOG_SHIM::EndQuasiModal(), InvokeDialogERC(), DIALOG_SHIM::IsQuasiModal(), SCH_EDIT_FRAME::OnAnnotate(), DIALOG_SCH_FIND::OnCancel(), 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().

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

Definition at line 327 of file dialog_shim.cpp.

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

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

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

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

149 {
150  wxSize sz( 0, y );
151  return ConvertDialogToPixels( sz ).y;
152 }

Member Data Documentation

wxStaticText* DIALOG_PLOT_BASE::coordFormatLabel
protectedinherited

Definition at line 94 of file dialog_plot_base.h.

Referenced by DIALOG_PLOT_BASE::DIALOG_PLOT_BASE().

wxStaticText* DIALOG_PLOT_BASE::drillMarksLabel
protectedinherited

Definition at line 78 of file dialog_plot_base.h.

Referenced by DIALOG_PLOT_BASE::DIALOG_PLOT_BASE().

wxBitmapButton* DIALOG_PLOT_BASE::m_browseButton
protectedinherited
wxButton* DIALOG_PLOT_BASE::m_buttonDRC
protectedinherited
wxConfigBase* DIALOG_PLOT::m_config
private

Definition at line 47 of file dialog_plot.h.

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

wxChoice* DIALOG_PLOT_BASE::m_coordFormatCtrl
protectedinherited
UNIT_BINDER DIALOG_PLOT::m_defaultLineWidth
private

Definition at line 60 of file dialog_plot.h.

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

UNIT_BINDER DIALOG_PLOT::m_defaultPenSize
private

Definition at line 61 of file dialog_plot.h.

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

wxChoice* DIALOG_PLOT_BASE::m_drillShapeOpt
protectedinherited
wxCheckBox* DIALOG_PLOT_BASE::m_DXF_plotModeOpt
protectedinherited
wxCheckBox* DIALOG_PLOT_BASE::m_DXF_plotTextStrokeFontOpt
protectedinherited
wxCheckBox* DIALOG_PLOT_BASE::m_excludeEdgeLayerOpt
protectedinherited
wxCheckBox* DIALOG_PLOT_BASE::m_excludePadsFromSilkscreen
protectedinherited
wxTextCtrl* DIALOG_PLOT_BASE::m_fineAdjustXCtrl
protectedinherited
wxStaticText* DIALOG_PLOT_BASE::m_fineAdjustXLabel
protectedinherited

Definition at line 103 of file dialog_plot_base.h.

Referenced by DIALOG_PLOT_BASE::DIALOG_PLOT_BASE().

wxTextCtrl* DIALOG_PLOT_BASE::m_fineAdjustYCtrl
protectedinherited
wxStaticText* DIALOG_PLOT_BASE::m_fineAdjustYLabel
protectedinherited

Definition at line 105 of file dialog_plot_base.h.

Referenced by DIALOG_PLOT_BASE::DIALOG_PLOT_BASE().

bool DIALOG_SHIM::m_firstPaintEvent
protectedinherited

Definition at line 149 of file dialog_shim.h.

Referenced by DIALOG_SHIM::OnPaint().

wxCheckBox* DIALOG_PLOT_BASE::m_forcePSA4OutputOpt
protectedinherited
wxCheckBox* DIALOG_PLOT_BASE::m_generateGerberJobFile
protectedinherited
wxStaticBoxSizer* DIALOG_PLOT_BASE::m_GerberOptionsSizer
protectedinherited

Definition at line 90 of file dialog_plot_base.h.

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

wxStaticBoxSizer* DIALOG_PLOT_BASE::m_HPGLOptionsSizer
protectedinherited

Definition at line 98 of file dialog_plot_base.h.

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

wxTextCtrl* DIALOG_PLOT_BASE::m_hpglPenCtrl
protectedinherited

Definition at line 100 of file dialog_plot_base.h.

Referenced by DIALOG_PLOT_BASE::DIALOG_PLOT_BASE().

wxStaticText* DIALOG_PLOT_BASE::m_hpglPenLabel
protectedinherited

Definition at line 99 of file dialog_plot_base.h.

Referenced by DIALOG_PLOT_BASE::DIALOG_PLOT_BASE().

wxStaticText* DIALOG_PLOT_BASE::m_hpglPenUnits
protectedinherited

Definition at line 101 of file dialog_plot_base.h.

Referenced by DIALOG_PLOT_BASE::DIALOG_PLOT_BASE().

wxWindow* DIALOG_SHIM::m_initialFocusTarget
protectedinherited

Definition at line 150 of file dialog_shim.h.

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

wxCheckListBox* DIALOG_PLOT_BASE::m_layerCheckListBox
protectedinherited
LSEQ DIALOG_PLOT::m_layerList
private

Definition at line 48 of file dialog_plot.h.

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

wxStaticBoxSizer* DIALOG_PLOT_BASE::m_LayersSizer
protectedinherited

Definition at line 67 of file dialog_plot_base.h.

Referenced by DIALOG_PLOT_BASE::DIALOG_PLOT_BASE().

wxTextCtrl* DIALOG_PLOT_BASE::m_lineWidthCtrl
protectedinherited

Definition at line 85 of file dialog_plot_base.h.

Referenced by DIALOG_PLOT_BASE::DIALOG_PLOT_BASE().

wxStaticText* DIALOG_PLOT_BASE::m_lineWidthLabel
protectedinherited

Definition at line 84 of file dialog_plot_base.h.

Referenced by DIALOG_PLOT_BASE::DIALOG_PLOT_BASE().

wxStaticText* DIALOG_PLOT_BASE::m_lineWidthUnits
protectedinherited

Definition at line 86 of file dialog_plot_base.h.

Referenced by DIALOG_PLOT_BASE::DIALOG_PLOT_BASE().

wxBoxSizer* DIALOG_PLOT_BASE::m_MainSizer
protectedinherited

Definition at line 61 of file dialog_plot_base.h.

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

WX_HTML_REPORT_PANEL* DIALOG_PLOT_BASE::m_messagesPanel
protectedinherited

Definition at line 114 of file dialog_plot_base.h.

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

wxTextCtrl* DIALOG_PLOT_BASE::m_outputDirectoryName
protectedinherited
PCB_EDIT_FRAME* DIALOG_PLOT::m_parent
private
wxChoice* DIALOG_PLOT_BASE::m_plotFormatOpt
protectedinherited
wxCheckBox* DIALOG_PLOT_BASE::m_plotInvisibleText
protectedinherited
wxCheckBox* DIALOG_PLOT_BASE::m_plotMirrorOpt
protectedinherited
wxChoice* DIALOG_PLOT_BASE::m_plotModeOpt
protectedinherited
wxCheckBox* DIALOG_PLOT_BASE::m_plotModuleRefOpt
protectedinherited
wxCheckBox* DIALOG_PLOT_BASE::m_plotModuleValueOpt
protectedinherited
wxCheckBox* DIALOG_PLOT_BASE::m_plotNoViaOnMaskOpt
protectedinherited
wxBoxSizer* DIALOG_PLOT_BASE::m_PlotOptionsSizer
protectedinherited

Definition at line 69 of file dialog_plot_base.h.

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

PCB_PLOT_PARAMS DIALOG_PLOT::m_plotOpts
private
wxCheckBox* DIALOG_PLOT_BASE::m_plotPSNegativeOpt
protectedinherited
wxCheckBox* DIALOG_PLOT_BASE::m_plotSheetRef
protectedinherited
wxMenu* DIALOG_PLOT_BASE::m_popMenu
protectedinherited
wxStaticBoxSizer* DIALOG_PLOT_BASE::m_PSOptionsSizer
protectedinherited

Definition at line 102 of file dialog_plot_base.h.

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

int DIALOG_PLOT::m_PSWidthAdjust
private

Definition at line 53 of file dialog_plot.h.

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

WX_EVENT_LOOP* DIALOG_SHIM::m_qmodal_loop
protectedinherited

Definition at line 153 of file dialog_shim.h.

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

WDO_ENABLE_DISABLE* DIALOG_SHIM::m_qmodal_parent_disabler
protectedinherited
bool DIALOG_SHIM::m_qmodal_showing
protectedinherited

Definition at line 154 of file dialog_shim.h.

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

wxChoice* DIALOG_PLOT_BASE::m_scaleOpt
protectedinherited
wxStdDialogButtonSizer* DIALOG_PLOT_BASE::m_sdbSizer1
protectedinherited

Definition at line 117 of file dialog_plot_base.h.

Referenced by DIALOG_PLOT_BASE::DIALOG_PLOT_BASE().

wxButton* DIALOG_PLOT_BASE::m_sdbSizer1Apply
protectedinherited
wxButton* DIALOG_PLOT_BASE::m_sdbSizer1Cancel
protectedinherited

Definition at line 120 of file dialog_plot_base.h.

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

wxButton* DIALOG_PLOT_BASE::m_sdbSizer1OK
protectedinherited
wxBoxSizer* DIALOG_PLOT_BASE::m_sizerButtons
protectedinherited

Definition at line 115 of file dialog_plot_base.h.

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

wxStaticBoxSizer* DIALOG_PLOT_BASE::m_SizerDXF_options
protectedinherited

Definition at line 111 of file dialog_plot_base.h.

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

wxStaticText* DIALOG_PLOT_BASE::m_staticTextDir
protectedinherited

Definition at line 64 of file dialog_plot_base.h.

Referenced by DIALOG_PLOT_BASE::DIALOG_PLOT_BASE().

wxStaticText* DIALOG_PLOT_BASE::m_staticTextPlotFmt
protectedinherited

Definition at line 62 of file dialog_plot_base.h.

Referenced by DIALOG_PLOT_BASE::DIALOG_PLOT_BASE().

wxCheckBox* DIALOG_PLOT_BASE::m_subtractMaskFromSilk
protectedinherited
UNIT_BINDER DIALOG_PLOT::m_trackWidthCorrection
private

Definition at line 62 of file dialog_plot.h.

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

wxCheckBox* DIALOG_PLOT_BASE::m_useAuxOriginCheckBox
protectedinherited
wxCheckBox* DIALOG_PLOT_BASE::m_useGerberExtensions
protectedinherited
wxCheckBox* DIALOG_PLOT_BASE::m_useGerberNetAttributes
protectedinherited
wxCheckBox* DIALOG_PLOT_BASE::m_useGerberX2Attributes
protectedinherited
wxTextCtrl* DIALOG_PLOT_BASE::m_widthAdjustCtrl
protectedinherited

Definition at line 108 of file dialog_plot_base.h.

Referenced by DIALOG_PLOT_BASE::DIALOG_PLOT_BASE().

wxStaticText* DIALOG_PLOT_BASE::m_widthAdjustLabel
protectedinherited

Definition at line 107 of file dialog_plot_base.h.

Referenced by DIALOG_PLOT_BASE::DIALOG_PLOT_BASE().

int DIALOG_PLOT::m_widthAdjustMaxValue
private

Definition at line 58 of file dialog_plot.h.

Referenced by applyPlotSettings(), and init_Dialog().

int DIALOG_PLOT::m_widthAdjustMinValue
private

Definition at line 57 of file dialog_plot.h.

Referenced by applyPlotSettings(), and init_Dialog().

wxStaticText* DIALOG_PLOT_BASE::m_widthAdjustUnits
protectedinherited

Definition at line 109 of file dialog_plot_base.h.

Referenced by DIALOG_PLOT_BASE::DIALOG_PLOT_BASE().

double DIALOG_PLOT::m_XScaleAdjust
private

Definition at line 49 of file dialog_plot.h.

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

double DIALOG_PLOT::m_YScaleAdjust
private

Definition at line 51 of file dialog_plot.h.

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

wxCheckBox* DIALOG_PLOT_BASE::m_zoneFillCheck
protectedinherited
wxStaticText* DIALOG_PLOT_BASE::plotModeLabel
protectedinherited

Definition at line 82 of file dialog_plot_base.h.

Referenced by DIALOG_PLOT_BASE::DIALOG_PLOT_BASE().

wxStaticText* DIALOG_PLOT_BASE::scalingLabel
protectedinherited

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