KiCad PCB EDA Suite
DIALOG_PLOT Class Reference

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

#include <dialog_plot.h>

Inheritance diagram for DIALOG_PLOT:
DIALOG_PLOT_BASE DIALOG_SHIM KIWAY_HOLDER

Public Types

enum  HOLDER_TYPE { DIALOG , FRAME , PANEL }
 

Public Member Functions

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

Static Public Member Functions

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

Protected Types

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

Protected Member Functions

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

Protected Attributes

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

Private Member Functions

void Plot (wxCommandEvent &event) override
 
void OnOutputDirectoryBrowseClicked (wxCommandEvent &event) override
 
void OnRightClick (wxMouseEvent &event) override
 
void OnPopUpLayers (wxCommandEvent &event) override
 
void SetPlotFormat (wxCommandEvent &event) override
 
void OnChangeDXFPlotMode (wxCommandEvent &event) override
 
void OnSetScaleOpt (wxCommandEvent &event) override
 
void CreateDrillFile (wxCommandEvent &event) override
 
void OnGerberX2Checked (wxCommandEvent &event) override
 
void onRunDRC (wxCommandEvent &event) override
 
void onBoardSetup (wxHyperlinkEvent &aEvent) override
 
void onPlotAllListMoveUp (wxCommandEvent &aEvent)
 
void onPlotAllListMoveDown (wxCommandEvent &aEvent)
 
void init_Dialog ()
 
void reInitDialog ()
 
void applyPlotSettings ()
 
PLOT_FORMAT getPlotFormat ()
 
void setPlotModeChoiceSelection (OUTLINE_MODE aPlotMode)
 
void OnCloseWindow (wxCloseEvent &aEvent)
 Properly handle the wxCloseEvent when in the quasimodal mode when not calling EndQuasiModal which is possible with any dialog derived from DIALOG_SHIM. More...
 
void OnButton (wxCommandEvent &aEvent)
 Properly handle the default button events when in the quasimodal mode when not calling EndQuasiModal which is possible with any dialog derived from DIALOG_SHIM. More...
 
void OnGridEditorShown (wxGridEvent &event)
 
void OnGridEditorHidden (wxGridEvent &event)
 
 DECLARE_EVENT_TABLE ()
 

Private Attributes

PCB_EDIT_FRAMEm_parent
 
LSEQ m_layerList
 
double m_XScaleAdjust
 
double m_YScaleAdjust
 
int m_PSWidthAdjust
 
int m_widthAdjustMinValue
 
int m_widthAdjustMaxValue
 
UNIT_BINDER m_defaultPenSize
 
UNIT_BINDER m_trackWidthCorrection
 
wxString m_DRCWarningTemplate
 
PCB_PLOT_PARAMS m_plotOpts
 
wxRearrangeList * m_plotAllLayersList
 
wxBitmapButton * m_bpMoveUp
 
wxBitmapButton * m_bpMoveDown
 
KIWAYm_kiway
 
HOLDER_TYPE m_type
 

Static Private Attributes

static LSET m_lastLayerSet
 The plot layer set that last time the dialog was opened. More...
 
static LSEQ m_lastPlotOnAllLayersOrder
 The plot on all layers ordering the last time the dialog was opened. More...
 

Detailed Description

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

Definition at line 39 of file dialog_plot.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
protectedinherited
Enumerator
ID_PRINT_REF 
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 

Definition at line 52 of file dialog_plot_base.h.

◆ HOLDER_TYPE

enum KIWAY_HOLDER::HOLDER_TYPE
inherited
Enumerator
DIALOG 
FRAME 
PANEL 

Definition at line 39 of file kiway_holder.h.

Constructor & Destructor Documentation

◆ DIALOG_PLOT()

DIALOG_PLOT::DIALOG_PLOT ( PCB_EDIT_FRAME parent)

Definition at line 78 of file dialog_plot.cpp.

78 :
79 DIALOG_PLOT_BASE( aParent ),
80 m_parent( aParent ),
83{
84 BOARD* board = m_parent->GetBoard();
85
86 SetName( DLG_WINDOW_NAME );
87 m_plotOpts = aParent->GetPlotSettings();
89
90 m_messagesPanel->SetFileName( Prj().GetProjectPath() + wxT( "report.txt" ) );
91
92 int order = 0;
93 LSET plotOnAllLayersSelection = m_plotOpts.GetPlotOnAllLayersSelection();
94 wxArrayInt plotAllLayersOrder;
95 wxArrayString plotAllLayersChoicesStrings;
96 std::vector<PCB_LAYER_ID> layersIdChoiceList;
97 int textWidth = 0;
98
99 for( LSEQ seq = board->GetEnabledLayers().UIOrder(); seq; ++seq )
100 {
101 PCB_LAYER_ID id = *seq;
102 wxString layerName = board->GetLayerName( id );
103
104 // wxCOL_WIDTH_AUTOSIZE doesn't work on all platforms, so we calculate width here
105 textWidth = std::max( textWidth, KIUI::GetTextSize( layerName, m_layerCheckListBox ).x );
106
107 plotAllLayersChoicesStrings.Add( layerName );
108 layersIdChoiceList.push_back( id );
109
110 size_t size = plotOnAllLayersSelection.size();
111
112 if( ( static_cast<size_t>( id ) <= size ) && plotOnAllLayersSelection.test( id ) )
113 plotAllLayersOrder.push_back( order );
114 else
115 plotAllLayersOrder.push_back( ~order );
116
117 order += 1;
118 }
119
120 int checkColSize = 22;
121 int layerColSize = textWidth + 15;
122
123#ifdef __WXMAC__
124 // TODO: something in wxWidgets 3.1.x pads checkbox columns with extra space. (It used to
125 // also be that the width of the column would get set too wide (to 30), but that's patched in
126 // our local wxWidgets fork.)
127 checkColSize += 30;
128#endif
129
130 m_layerCheckListBox->SetMinClientSize( wxSize( checkColSize + layerColSize,
131 m_layerCheckListBox->GetMinClientSize().y ) );
132
133 wxStaticBox* allLayersLabel = new wxStaticBox( this, wxID_ANY, _( "Plot on All Layers" ) );
134 wxStaticBoxSizer* sbSizer = new wxStaticBoxSizer( allLayersLabel, wxVERTICAL );
135
136 m_plotAllLayersList = new wxRearrangeList( sbSizer->GetStaticBox(), wxID_ANY,
137 wxDefaultPosition, wxDefaultSize,
138 plotAllLayersOrder, plotAllLayersChoicesStrings, 0 );
139
140 m_plotAllLayersList->SetMinClientSize( wxSize( checkColSize + layerColSize,
141 m_plotAllLayersList->GetMinClientSize().y ) );
142
143 // Attach the LAYER_ID to each item in m_plotAllLayersList
144 // plotAllLayersChoicesStrings and layersIdChoiceList are in the same order,
145 // but m_plotAllLayersList has these strings in a different order
146 for( size_t idx = 0; idx < layersIdChoiceList.size(); idx++ )
147 {
148 wxString& txt = plotAllLayersChoicesStrings[idx];
149 int list_idx = m_plotAllLayersList->FindString( txt, true );
150
151 PCB_LAYER_ID layer_id = layersIdChoiceList[idx];
152 m_plotAllLayersList->SetClientObject( list_idx, new PCB_LAYER_ID_CLIENT_DATA( layer_id ) );
153 }
154
155 sbSizer->Add( m_plotAllLayersList, 1, wxALL | wxEXPAND, 5 );
156
157 wxBoxSizer* bButtonSizer;
158 bButtonSizer = new wxBoxSizer( wxHORIZONTAL );
159
160 m_bpMoveUp = new wxBitmapButton( sbSizer->GetStaticBox(), wxID_ANY, wxNullBitmap,
161 wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW | 0 );
162 m_bpMoveUp->SetToolTip( _( "Move current selection up" ) );
163 m_bpMoveUp->SetBitmap( KiBitmap( BITMAPS::small_up ) );
164
165 bButtonSizer->Add( m_bpMoveUp, 0, wxALIGN_CENTER_VERTICAL | wxRIGHT, 5 );
166
167 m_bpMoveDown = new wxBitmapButton( sbSizer->GetStaticBox(), wxID_ANY, wxNullBitmap,
168 wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW | 0 );
169 m_bpMoveDown->SetToolTip( _( "Move current selection down" ) );
171
172 bButtonSizer->Add( m_bpMoveDown, 0, wxALIGN_CENTER_VERTICAL | wxRIGHT, 5 );
173
174 sbSizer->Add( bButtonSizer, 0, wxALL | wxEXPAND, 5 );
175 bmiddleSizer->Insert( 1, sbSizer, 1, wxALL | wxEXPAND, 3 );
176
177 init_Dialog();
178
179 SetupStandardButtons( { { wxID_OK, _( "Plot" ) },
180 { wxID_APPLY, _( "Generate Drill Files..." ) },
181 { wxID_CANCEL, _( "Close" ) } } );
182
183 GetSizer()->Fit( this );
184 GetSizer()->SetSizeHints( this );
185
186 m_bpMoveUp->Bind( wxEVT_COMMAND_BUTTON_CLICKED, &DIALOG_PLOT::onPlotAllListMoveUp, this );
187 m_bpMoveDown->Bind( wxEVT_COMMAND_BUTTON_CLICKED, &DIALOG_PLOT::onPlotAllListMoveDown, this );
188}
wxBitmap KiBitmap(BITMAPS aBitmap, int aHeightTag)
Construct a wxBitmap from an image identifier Returns the image from the active theme if the image ha...
Definition: bitmap.cpp:105
Information pertinent to a Pcbnew printed circuit board.
Definition: board.h:265
LSET GetEnabledLayers() const
A proxy function that calls the corresponding function in m_BoardSettings.
Definition: board.cpp:565
const wxString GetLayerName(PCB_LAYER_ID aLayer) const
Return the name of a aLayer.
Definition: board.cpp:452
wxStaticText * m_DRCExclusionsWarning
wxTextCtrl * m_widthAdjustCtrl
wxBoxSizer * bmiddleSizer
wxStaticText * m_hpglPenUnits
wxStaticText * m_widthAdjustLabel
wxTextCtrl * m_hpglPenCtrl
wxCheckListBox * m_layerCheckListBox
wxStaticText * m_widthAdjustUnits
wxStaticText * m_hpglPenLabel
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)
WX_HTML_REPORT_PANEL * m_messagesPanel
PCB_PLOT_PARAMS m_plotOpts
Definition: dialog_plot.h:92
void onPlotAllListMoveUp(wxCommandEvent &aEvent)
UNIT_BINDER m_trackWidthCorrection
Definition: dialog_plot.h:88
wxBitmapButton * m_bpMoveUp
Definition: dialog_plot.h:95
PCB_EDIT_FRAME * m_parent
Definition: dialog_plot.h:74
wxString m_DRCWarningTemplate
Definition: dialog_plot.h:90
wxRearrangeList * m_plotAllLayersList
Definition: dialog_plot.h:94
void onPlotAllListMoveDown(wxCommandEvent &aEvent)
wxBitmapButton * m_bpMoveDown
Definition: dialog_plot.h:96
UNIT_BINDER m_defaultPenSize
Definition: dialog_plot.h:87
void init_Dialog()
void SetupStandardButtons(std::map< int, wxString > aLabels={})
PROJECT & Prj() const
Return a reference to the PROJECT associated with this KIWAY.
LSEQ is a sequence (and therefore also a set) of PCB_LAYER_IDs.
Definition: layer_ids.h:491
LSET is a set of PCB_LAYER_IDs.
Definition: layer_ids.h:530
LSEQ UIOrder() const
Definition: lset.cpp:922
BOARD * GetBoard() const
A helper wxWidgets control client data object to store layer IDs.
Definition: dialog_plot.cpp:64
LSET GetPlotOnAllLayersSelection() const
void SetFileName(const wxString &aReportFileName)
#define DLG_WINDOW_NAME
#define _(s)
PCB_LAYER_ID
A quick note on layer IDs:
Definition: layer_ids.h:59
wxSize GetTextSize(const wxString &aSingleLine, wxWindow *aWindow)
Return the size of aSingleLine of text when it is rendered in aWindow using whatever font is currentl...
Definition: ui_common.cpp:70

References _, DIALOG_PLOT_BASE::bmiddleSizer, DLG_WINDOW_NAME, PCB_BASE_FRAME::GetBoard(), BOARD::GetEnabledLayers(), BOARD::GetLayerName(), PCB_PLOT_PARAMS::GetPlotOnAllLayersSelection(), PCB_BASE_FRAME::GetPlotSettings(), KIUI::GetTextSize(), init_Dialog(), KiBitmap(), m_bpMoveDown, m_bpMoveUp, DIALOG_PLOT_BASE::m_DRCExclusionsWarning, m_DRCWarningTemplate, DIALOG_PLOT_BASE::m_layerCheckListBox, DIALOG_PLOT_BASE::m_messagesPanel, m_parent, m_plotAllLayersList, m_plotOpts, onPlotAllListMoveDown(), onPlotAllListMoveUp(), KIWAY_HOLDER::Prj(), WX_HTML_REPORT_PANEL::SetFileName(), DIALOG_SHIM::SetupStandardButtons(), small_down, small_up, and LSET::UIOrder().

◆ ~DIALOG_PLOT()

DIALOG_PLOT::~DIALOG_PLOT ( )
virtual

Definition at line 191 of file dialog_plot.cpp.

192{
193 m_bpMoveDown->Unbind( wxEVT_COMMAND_BUTTON_CLICKED, &DIALOG_PLOT::onPlotAllListMoveDown, this );
194 m_bpMoveUp->Unbind( wxEVT_COMMAND_BUTTON_CLICKED, &DIALOG_PLOT::onPlotAllListMoveUp, this );
195}

References m_bpMoveDown, m_bpMoveUp, onPlotAllListMoveDown(), and onPlotAllListMoveUp().

Member Function Documentation

◆ applyPlotSettings()

void DIALOG_PLOT::applyPlotSettings ( )
private

Definition at line 768 of file dialog_plot.cpp.

769{
770 REPORTER& reporter = m_messagesPanel->Reporter();
771 PCB_PLOT_PARAMS tempOptions;
772
773 tempOptions.SetSubtractMaskFromSilk( m_subtractMaskFromSilk->GetValue() );
774 tempOptions.SetPlotFrameRef( m_plotSheetRef->GetValue() );
775 tempOptions.SetSketchPadsOnFabLayers( m_sketchPadsOnFabLayers->GetValue() );
776 tempOptions.SetUseAuxOrigin( m_useAuxOriginCheckBox->GetValue() );
777 tempOptions.SetPlotValue( m_plotModuleValueOpt->GetValue() );
778 tempOptions.SetPlotReference( m_plotModuleRefOpt->GetValue() );
779 tempOptions.SetPlotInvisibleText( m_plotInvisibleText->GetValue() );
780 tempOptions.SetScaleSelection( m_scaleOpt->GetSelection() );
781
782 int sel = m_drillShapeOpt->GetSelection();
783 tempOptions.SetDrillMarksType( static_cast<DRILL_MARKS>( sel ) );
784
785 tempOptions.SetMirror( m_plotMirrorOpt->GetValue() );
786 tempOptions.SetPlotMode( m_plotModeOpt->GetSelection() == 1 ? SKETCH : FILLED );
787 tempOptions.SetDXFPlotPolygonMode( m_DXF_plotModeOpt->GetValue() );
788
789 sel = m_DXF_plotUnits->GetSelection();
790 tempOptions.SetDXFPlotUnits( sel == 0 ? DXF_UNITS::INCHES : DXF_UNITS::MILLIMETERS );
791
792 tempOptions.SetPlotViaOnMaskLayer( m_plotNoViaOnMaskOpt->GetValue() );
793
794 if( !m_DXF_plotTextStrokeFontOpt->IsEnabled() ) // Currently, only DXF supports this option
796 else
799
801 tempOptions.SetBlackAndWhite( !!m_SVGColorChoice->GetSelection() );
802 else if( getPlotFormat() == PLOT_FORMAT::PDF )
803 tempOptions.SetBlackAndWhite( !!m_PDFColorChoice->GetSelection() );
804 else
805 tempOptions.SetBlackAndWhite( true );
806
807 // Update settings from text fields. Rewrite values back to the fields,
808 // since the values may have been constrained by the setters.
809 wxString msg;
810
811 // read HPLG pen size (this param is stored in mils)
812 // However, due to issues when converting this value from or to mm
813 // that can slightly change the value, update this param only if it
814 // is in use
816 {
818 {
820 msg.Printf( _( "HPGL pen size constrained." ) );
821 reporter.Report( msg, RPT_SEVERITY_INFO );
822 }
823 }
824 else // keep the last value (initial value if no HPGL plot made)
825 {
827 }
828
829 // X scale
830 double tmpDouble;
831 msg = m_fineAdjustXCtrl->GetValue();
832 msg.ToDouble( &tmpDouble );
833
835 {
836 msg.Printf( wxT( "%f" ), m_XScaleAdjust );
837 m_fineAdjustXCtrl->SetValue( msg );
838 msg.Printf( _( "X scale constrained." ) );
839 reporter.Report( msg, RPT_SEVERITY_INFO );
840 }
841
842 // Y scale
843 msg = m_fineAdjustYCtrl->GetValue();
844 msg.ToDouble( &tmpDouble );
845
847 {
848 msg.Printf( wxT( "%f" ), m_YScaleAdjust );
849 m_fineAdjustYCtrl->SetValue( msg );
850 msg.Printf( _( "Y scale constrained." ) );
851 reporter.Report( msg, RPT_SEVERITY_INFO );
852 }
853
854 auto cfg = m_parent->GetPcbNewSettings();
855
857 cfg->m_Plot.fine_scale_y = m_YScaleAdjust;
858
859 cfg->m_Plot.check_zones_before_plotting = m_zoneFillCheck->GetValue();
860
861 // PS Width correction
864 {
866 msg.Printf( _( "Width correction constrained. The width correction value must be in the"
867 " range of [%s; %s] for the current design rules." ),
870 reporter.Report( msg, RPT_SEVERITY_WARNING );
871 }
872
873 // Store m_PSWidthAdjust in mm in user config
874 cfg->m_Plot.ps_fine_width_adjust = pcbIUScale.IUTomm( m_PSWidthAdjust );
875
876 tempOptions.SetFormat( getPlotFormat() );
877
878 tempOptions.SetDisableGerberMacros( m_disableApertMacros->GetValue() );
879 tempOptions.SetUseGerberProtelExtensions( m_useGerberExtensions->GetValue() );
880 tempOptions.SetUseGerberX2format( m_useGerberX2Format->GetValue() );
881 tempOptions.SetIncludeGerberNetlistInfo( m_useGerberNetAttributes->GetValue() );
882 tempOptions.SetCreateGerberJobFile( m_generateGerberJobFile->GetValue() );
883
884 tempOptions.SetGerberPrecision( m_coordFormatCtrl->GetSelection() == 0 ? 5 : 6 );
885 tempOptions.SetSvgPrecision( m_svgPrecsision->GetValue() );
886
887 LSET selectedLayers;
888
889 for( unsigned i = 0; i < m_layerList.size(); i++ )
890 {
891 if( m_layerCheckListBox->IsChecked( i ) )
892 selectedLayers.set( m_layerList[i] );
893 }
894
895 // Get a list of copper layers that aren't being used by inverting enabled layers.
896 LSET disabledCopperLayers = LSET::AllCuMask() & ~m_parent->GetBoard()->GetEnabledLayers();
897
898 LSET plotOnAllLayers;
899
900 // Add selected layers from plot on all layers list in order set by user.
901 wxArrayInt plotOnAllLayersSelections;
902
903 m_plotAllLayersList->GetCheckedItems( plotOnAllLayersSelections );
904
905 size_t count = plotOnAllLayersSelections.GetCount();
906
907 for( size_t i = 0; i < count; i++ )
908 {
909 int index = plotOnAllLayersSelections.Item( i );
910 wxClientData* tmp = m_plotAllLayersList->GetClientObject( index );
911 PCB_LAYER_ID_CLIENT_DATA* layerId = dynamic_cast<PCB_LAYER_ID_CLIENT_DATA*>( tmp );
912
913 wxCHECK2( layerId, continue );
914
915 plotOnAllLayers.set( layerId->GetData() );
916 }
917
918 tempOptions.SetPlotOnAllLayersSelection( plotOnAllLayers );
919
920 // Enable all of the disabled copper layers.
921 // If someone enables more copper layers they will be selected by default.
922 selectedLayers = selectedLayers | disabledCopperLayers;
923 tempOptions.SetLayerSelection( selectedLayers );
924
925 tempOptions.SetNegative( m_plotPSNegativeOpt->GetValue() );
926 tempOptions.SetA4Output( m_forcePSA4OutputOpt->GetValue() );
927
928 // Set output directory and replace backslashes with forward ones
929 wxString dirStr;
930 dirStr = m_outputDirectoryName->GetValue();
931 dirStr.Replace( wxT( "\\" ), wxT( "/" ) );
932 tempOptions.SetOutputDirectory( dirStr );
933
934 if( !m_plotOpts.IsSameAs( tempOptions ) )
935 {
936 m_parent->SetPlotSettings( tempOptions );
938 m_plotOpts = tempOptions;
939 }
940}
constexpr EDA_IU_SCALE pcbIUScale
Definition: base_units.h:109
wxTextCtrl * m_fineAdjustXCtrl
wxCheckBox * m_disableApertMacros
wxChoice * m_scaleOpt
wxChoice * m_coordFormatCtrl
wxCheckBox * m_DXF_plotModeOpt
wxChoice * m_SVGColorChoice
wxTextCtrl * m_outputDirectoryName
wxSpinCtrl * m_svgPrecsision
wxTextCtrl * m_fineAdjustYCtrl
wxCheckBox * m_useAuxOriginCheckBox
wxCheckBox * m_plotPSNegativeOpt
wxCheckBox * m_DXF_plotTextStrokeFontOpt
wxChoice * m_plotModeOpt
wxCheckBox * m_useGerberExtensions
wxCheckBox * m_plotSheetRef
wxCheckBox * m_generateGerberJobFile
wxCheckBox * m_useGerberX2Format
wxCheckBox * m_plotMirrorOpt
wxCheckBox * m_forcePSA4OutputOpt
wxCheckBox * m_useGerberNetAttributes
wxCheckBox * m_plotNoViaOnMaskOpt
wxCheckBox * m_sketchPadsOnFabLayers
wxCheckBox * m_subtractMaskFromSilk
wxChoice * m_DXF_plotUnits
wxCheckBox * m_plotModuleRefOpt
wxCheckBox * m_plotInvisibleText
wxChoice * m_drillShapeOpt
wxCheckBox * m_plotModuleValueOpt
wxCheckBox * m_zoneFillCheck
wxChoice * m_PDFColorChoice
int m_widthAdjustMinValue
Definition: dialog_plot.h:84
int m_PSWidthAdjust
Definition: dialog_plot.h:80
double m_YScaleAdjust
Definition: dialog_plot.h:78
double m_XScaleAdjust
Definition: dialog_plot.h:76
PLOT_FORMAT getPlotFormat()
int m_widthAdjustMaxValue
Definition: dialog_plot.h:85
LSEQ m_layerList
Definition: dialog_plot.h:75
static LSET AllCuMask(int aCuLayerCount=MAX_CU_LAYERS)
Return a mask holding the requested number of Cu PCB_LAYER_IDs.
Definition: lset.cpp:773
DIALOG_PLOT m_Plot
PCBNEW_SETTINGS * GetPcbNewSettings() const
virtual void SetPlotSettings(const PCB_PLOT_PARAMS &aSettings)
void OnModify() override
Must be called after a board change to set the modified flag.
PCB_LAYER_ID GetData() const
Definition: dialog_plot.cpp:71
Parameters and options when plotting/printing a board.
void SetDrillMarksType(DRILL_MARKS aVal)
void SetLayerSelection(LSET aSelection)
void SetOutputDirectory(const wxString &aDir)
void SetPlotReference(bool aFlag)
void SetSketchPadsOnFabLayers(bool aFlag)
void SetUseGerberX2format(bool aUse)
void SetA4Output(int aForce)
void SetDXFPlotPolygonMode(bool aFlag)
double GetHPGLPenDiameter() const
void SetPlotFrameRef(bool aFlag)
void SetPlotOnAllLayersSelection(LSET aSelection)
bool SetHPGLPenDiameter(double aValue)
void SetDisableGerberMacros(bool aDisable)
void SetScaleSelection(int aSelection)
void SetMirror(bool aFlag)
void SetBlackAndWhite(bool blackAndWhite)
void SetPlotViaOnMaskLayer(bool aFlag)
void SetGerberPrecision(int aPrecision)
void SetSubtractMaskFromSilk(bool aSubtract)
void SetPlotValue(bool aFlag)
void SetUseGerberProtelExtensions(bool aUse)
void SetDXFPlotUnits(DXF_UNITS aUnit)
bool IsSameAs(const PCB_PLOT_PARAMS &aPcbPlotParams) const
Compare current settings to aPcbPlotParams, including not saved parameters in brd file.
void SetIncludeGerberNetlistInfo(bool aUse)
void SetPlotInvisibleText(bool aFlag)
void SetCreateGerberJobFile(bool aCreate)
void SetNegative(bool aFlag)
void SetPlotMode(OUTLINE_MODE aPlotMode)
void SetUseAuxOrigin(bool aAux)
void SetTextMode(PLOT_TEXT_MODE aVal)
void SetSvgPrecision(unsigned aPrecision)
void SetFormat(PLOT_FORMAT aFormat)
A pure virtual class used to derive REPORTER objects from.
Definition: reporter.h:71
virtual REPORTER & Report(const wxString &aText, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED)=0
Report a string with a given severity.
wxString StringFromValue(double aValue, bool aAddUnitLabel=false, EDA_DATA_TYPE aType=EDA_DATA_TYPE::DISTANCE)
Converts aValue in internal units into a united string.
virtual long long int GetValue()
Return the current value in Internal Units.
virtual void SetValue(long long int aValue)
Set new value (in Internal Units) for the text field, taking care of units conversion.
static bool setDouble(double *aResult, double aValue, double aMin, double aMax)
static bool setInt(int *aResult, int aValue, int aMin, int aMax)
@ SKETCH
Definition: outline_mode.h:26
@ FILLED
Definition: outline_mode.h:27
#define PLOT_MIN_SCALE
Definition: pcbplot.h:50
#define PLOT_MAX_SCALE
Definition: pcbplot.h:51
DRILL_MARKS
Plots and prints can show holes in pads and vias 3 options are available:
@ RPT_SEVERITY_WARNING
@ RPT_SEVERITY_INFO
constexpr double IUTomm(int iu) const
Definition: base_units.h:87
const double IU_PER_MILS
Definition: base_units.h:78

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

Referenced by CreateDrillFile(), and Plot().

◆ CreateDrillFile()

void DIALOG_PLOT::CreateDrillFile ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_PLOT_BASE.

Definition at line 462 of file dialog_plot.cpp.

463{
464 // Be sure drill file use the same settings (axis option, plot directory) as plot files:
466
467 DIALOG_GENDRILL dlg( m_parent, this );
468 dlg.ShowModal();
469
470 // a few plot settings can be modified: take them in account
472 reInitDialog();
473}
void reInitDialog()
void applyPlotSettings()
virtual const PCB_PLOT_PARAMS & GetPlotSettings() const
Return the PCB_PLOT_PARAMS for the BOARD owned by this frame.

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

◆ DECLARE_EVENT_TABLE()

DIALOG_SHIM::DECLARE_EVENT_TABLE ( )
privateinherited

◆ DIALOG_PLOT_BASEOnContextMenu()

void DIALOG_PLOT_BASE::DIALOG_PLOT_BASEOnContextMenu ( wxMouseEvent &  event)
inlineinherited

Definition at line 161 of file dialog_plot_base.h.

162 {
163 this->PopupMenu( m_popMenu, event.GetPosition() );
164 }

References DIALOG_PLOT_BASE::m_popMenu.

Referenced by DIALOG_PLOT_BASE::DIALOG_PLOT_BASE().

◆ Enable()

bool DIALOG_SHIM::Enable ( bool  enable)
overrideinherited

Definition at line 318 of file dialog_shim.cpp.

319{
320 // so we can do logging of this state change:
321 return wxDialog::Enable( enable );
322}

◆ EndQuasiModal()

void DIALOG_SHIM::EndQuasiModal ( int  retCode)
inherited

Definition at line 486 of file dialog_shim.cpp.

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

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

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

◆ finishDialogSettings()

void DIALOG_SHIM::finishDialogSettings ( )
protectedinherited

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

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

Definition at line 157 of file dialog_shim.cpp.

158{
159 // must be called from the constructor of derived classes,
160 // when all widgets are initialized, and therefore their size fixed
161
162 // SetSizeHints fixes the minimal size of sizers in the dialog
163 // (SetSizeHints calls Fit(), so no need to call it)
164 GetSizer()->SetSizeHints( this );
165}

Referenced by CONVERT_SETTINGS_DIALOG::CONVERT_SETTINGS_DIALOG(), DIALOG_ANNOTATE::DIALOG_ANNOTATE(), DIALOG_ASSIGN_NETCLASS::DIALOG_ASSIGN_NETCLASS(), DIALOG_BOARD_REANNOTATE::DIALOG_BOARD_REANNOTATE(), DIALOG_BOARD_SETUP::DIALOG_BOARD_SETUP(), DIALOG_BOM::DIALOG_BOM(), DIALOG_CHANGE_SYMBOLS::DIALOG_CHANGE_SYMBOLS(), DIALOG_CLEANUP_TRACKS_AND_VIAS::DIALOG_CLEANUP_TRACKS_AND_VIAS(), DIALOG_COPPER_ZONE::DIALOG_COPPER_ZONE(), DIALOG_DIMENSION_PROPERTIES::DIALOG_DIMENSION_PROPERTIES(), DIALOG_DRC::DIALOG_DRC(), DIALOG_EDIT_SYMBOLS_LIBID::DIALOG_EDIT_SYMBOLS_LIBID(), DIALOG_ENUM_PADS::DIALOG_ENUM_PADS(), DIALOG_ERC::DIALOG_ERC(), DIALOG_EXCHANGE_FOOTPRINTS::DIALOG_EXCHANGE_FOOTPRINTS(), DIALOG_EXPORT_3DFILE::DIALOG_EXPORT_3DFILE(), DIALOG_EXPORT_IDF3::DIALOG_EXPORT_IDF3(), DIALOG_EXPORT_NETLIST::DIALOG_EXPORT_NETLIST(), DIALOG_EXPORT_STEP::DIALOG_EXPORT_STEP(), DIALOG_EXPORT_SVG::DIALOG_EXPORT_SVG(), DIALOG_FOOTPRINT_CHECKER::DIALOG_FOOTPRINT_CHECKER(), DIALOG_FOOTPRINT_PROPERTIES::DIALOG_FOOTPRINT_PROPERTIES(), DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR(), DIALOG_FOOTPRINT_WIZARD_LIST::DIALOG_FOOTPRINT_WIZARD_LIST(), DIALOG_GENCAD_EXPORT_OPTIONS::DIALOG_GENCAD_EXPORT_OPTIONS(), DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS(), DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS(), DIALOG_GLOBAL_LIB_TABLE_CONFIG::DIALOG_GLOBAL_LIB_TABLE_CONFIG(), DIALOG_GRID_SETTINGS::DIALOG_GRID_SETTINGS(), DIALOG_GROUP_PROPERTIES::DIALOG_GROUP_PROPERTIES(), DIALOG_IBIS_PARSER_REPORTER::DIALOG_IBIS_PARSER_REPORTER(), DIALOG_IMAGE_PROPERTIES::DIALOG_IMAGE_PROPERTIES(), DIALOG_IMPORT_NETLIST::DIALOG_IMPORT_NETLIST(), DIALOG_IMPORTED_LAYERS::DIALOG_IMPORTED_LAYERS(), DIALOG_INSPECTOR::DIALOG_INSPECTOR(), DIALOG_JUNCTION_PROPS::DIALOG_JUNCTION_PROPS(), DIALOG_LABEL_PROPERTIES::DIALOG_LABEL_PROPERTIES(), DIALOG_LIB_NEW_SYMBOL::DIALOG_LIB_NEW_SYMBOL(), DIALOG_LIB_SHAPE_PROPERTIES::DIALOG_LIB_SHAPE_PROPERTIES(), DIALOG_LIB_SYMBOL_PROPERTIES::DIALOG_LIB_SYMBOL_PROPERTIES(), DIALOG_LIB_TEXT_PROPERTIES::DIALOG_LIB_TEXT_PROPERTIES(), DIALOG_LIB_TEXTBOX_PROPERTIES::DIALOG_LIB_TEXTBOX_PROPERTIES(), DIALOG_LINE_PROPERTIES::DIALOG_LINE_PROPERTIES(), DIALOG_LIST_HOTKEYS::DIALOG_LIST_HOTKEYS(), DIALOG_LOCKED_ITEMS_QUERY::DIALOG_LOCKED_ITEMS_QUERY(), DIALOG_MANAGE_REPOSITORIES::DIALOG_MANAGE_REPOSITORIES(), DIALOG_MOVE_EXACT::DIALOG_MOVE_EXACT(), DIALOG_NET_INSPECTOR::DIALOG_NET_INSPECTOR(), DIALOG_NON_COPPER_ZONES_EDITOR::DIALOG_NON_COPPER_ZONES_EDITOR(), DIALOG_PAD_PRIMITIVE_POLY_PROPS::DIALOG_PAD_PRIMITIVE_POLY_PROPS(), DIALOG_PAD_PRIMITIVES_PROPERTIES::DIALOG_PAD_PRIMITIVES_PROPERTIES(), DIALOG_PAD_PROPERTIES::DIALOG_PAD_PROPERTIES(), DIALOG_PASTE_SPECIAL::DIALOG_PASTE_SPECIAL(), DIALOG_PCM::DIALOG_PCM(), DIALOG_PIN_PROPERTIES::DIALOG_PIN_PROPERTIES(), DIALOG_PLOT_SCHEMATIC::DIALOG_PLOT_SCHEMATIC(), DIALOG_PNS_SETTINGS::DIALOG_PNS_SETTINGS(), DIALOG_POSITION_RELATIVE::DIALOG_POSITION_RELATIVE(), DIALOG_PRINT_GENERIC::DIALOG_PRINT_GENERIC(), DIALOG_PRINT_PCBNEW::DIALOG_PRINT_PCBNEW(), DIALOG_PRINT_USING_PRINTER::DIALOG_PRINT_USING_PRINTER(), DIALOG_PUSH_PAD_PROPERTIES::DIALOG_PUSH_PAD_PROPERTIES(), DIALOG_REGULATOR_FORM::DIALOG_REGULATOR_FORM(), DIALOG_RULE_AREA_PROPERTIES::DIALOG_RULE_AREA_PROPERTIES(), DIALOG_SCHEMATIC_SETUP::DIALOG_SCHEMATIC_SETUP(), DIALOG_SELECT_3DMODEL::DIALOG_SELECT_3DMODEL(), DIALOG_SHAPE_PROPERTIES::DIALOG_SHAPE_PROPERTIES(), DIALOG_SHEET_PIN_PROPERTIES::DIALOG_SHEET_PIN_PROPERTIES(), DIALOG_SIM_MODEL< T_symbol, T_field >::DIALOG_SIM_MODEL(), DIALOG_SWAP_LAYERS::DIALOG_SWAP_LAYERS(), DIALOG_SYMBOL_FIELDS_TABLE::DIALOG_SYMBOL_FIELDS_TABLE(), DIALOG_SYMBOL_PROPERTIES::DIALOG_SYMBOL_PROPERTIES(), DIALOG_TARGET_PROPERTIES::DIALOG_TARGET_PROPERTIES(), DIALOG_TEXT_PROPERTIES::DIALOG_TEXT_PROPERTIES(), DIALOG_TEXTBOX_PROPERTIES::DIALOG_TEXTBOX_PROPERTIES(), DIALOG_TRACK_VIA_PROPERTIES::DIALOG_TRACK_VIA_PROPERTIES(), DIALOG_TRACK_VIA_SIZE::DIALOG_TRACK_VIA_SIZE(), DIALOG_UNUSED_PAD_LAYERS::DIALOG_UNUSED_PAD_LAYERS(), DIALOG_UPDATE_FROM_PCB::DIALOG_UPDATE_FROM_PCB(), DIALOG_UPDATE_PCB::DIALOG_UPDATE_PCB(), DIALOG_UPDATE_SYMBOL_FIELDS::DIALOG_UPDATE_SYMBOL_FIELDS(), DIALOG_WIRE_BUS_PROPERTIES::DIALOG_WIRE_BUS_PROPERTIES(), PAGED_DIALOG::finishInitialization(), DIALOG_CONSTRAINTS_REPORTER::FinishInitialization(), DIALOG_FIELD_PROPERTIES::init(), DIALOG_EDIT_LIBRARY_TABLES::InstallPanel(), NETLIST_VIEW_DIALOG::NETLIST_VIEW_DIALOG(), DIALOG_SHEET_PROPERTIES::OnInitDlg(), DIALOG_SIM_COMMAND::onInitDlg(), DIALOG_SYMBOL_PROPERTIES::OnInitDlg(), DIALOG_GRAPHIC_ITEM_PROPERTIES::OnInitDlg(), TEARDROP_DIALOG::TEARDROP_DIALOG(), DIALOG_SIGNAL_LIST::TransferDataToWindow(), DIALOG_COLOR_PICKER::TransferDataToWindow(), and DIALOG_BOARD_STATISTICS::TransferDataToWindow().

◆ getPlotFormat()

PLOT_FORMAT DIALOG_PLOT::getPlotFormat ( )
private

Definition at line 545 of file dialog_plot.cpp.

546{
547 // plot format id's are ordered like displayed in m_plotFormatOpt
548 static const PLOT_FORMAT plotFmt[] = {
555
556 return plotFmt[m_plotFormatOpt->GetSelection()];
557}
wxChoice * m_plotFormatOpt
PLOT_FORMAT
The set of supported output plot formats.
Definition: plotter.h:70

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

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

◆ GetType()

HOLDER_TYPE KIWAY_HOLDER::GetType ( ) const
inlineinherited

Definition at line 46 of file kiway_holder.h.

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

References KIWAY_HOLDER::m_type.

Referenced by DIALOG_SHIM::DIALOG_SHIM().

◆ GetUserUnits()

◆ HasKiway()

bool KIWAY_HOLDER::HasKiway ( ) const
inlineinherited

Safety check before asking for the Kiway reference.

Returns
true if kiway is non-null

Definition at line 63 of file kiway_holder.h.

64 {
65 return m_kiway != nullptr;
66 }
KIWAY * m_kiway
Definition: kiway_holder.h:84

References KIWAY_HOLDER::m_kiway.

Referenced by DIALOG_SHIM::~DIALOG_SHIM().

◆ horizPixelsFromDU()

int DIALOG_SHIM::horizPixelsFromDU ( int  x) const
protectedinherited

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

See SetSizeInDU or wxDialog documentation for more information.

Definition at line 175 of file dialog_shim.cpp.

176{
177 wxSize sz( x, 0 );
178 return ConvertDialogToPixels( sz ).x;
179}

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

◆ init_Dialog()

void DIALOG_PLOT::init_Dialog ( )
private

Definition at line 198 of file dialog_plot.cpp.

199{
200 BOARD* board = m_parent->GetBoard();
201 wxFileName fileName;
202
203 auto cfg = m_parent->GetPcbNewSettings();
204
205 m_XScaleAdjust = cfg->m_Plot.fine_scale_x;
206 m_YScaleAdjust = cfg->m_Plot.fine_scale_y;
207
208 m_zoneFillCheck->SetValue( cfg->m_Plot.check_zones_before_plotting );
209
211
212 // m_PSWidthAdjust is stored in mm in user config
213 m_PSWidthAdjust = KiROUND( cfg->m_Plot.ps_fine_width_adjust * pcbIUScale.IU_PER_MM );
214
215 // The reasonable width correction value must be in a range of
216 // [-(MinTrackWidth-1), +(MinClearanceValue-1)] decimils.
219
220 switch( m_plotOpts.GetFormat() )
221 {
222 default:
223 case PLOT_FORMAT::GERBER: m_plotFormatOpt->SetSelection( 0 ); break;
224 case PLOT_FORMAT::POST: m_plotFormatOpt->SetSelection( 1 ); break;
225 case PLOT_FORMAT::SVG: m_plotFormatOpt->SetSelection( 2 ); break;
226 case PLOT_FORMAT::DXF: m_plotFormatOpt->SetSelection( 3 ); break;
227 case PLOT_FORMAT::HPGL: m_plotFormatOpt->SetSelection( 4 ); break;
228 case PLOT_FORMAT::PDF: m_plotFormatOpt->SetSelection( 5 ); break;
229 }
230
231 // Set units and value for HPGL pen size (this param is in mils).
233
234 // Test for a reasonable scale value. Set to 1 if problem
237 {
239 }
240
243 m_XScaleAdjust ) );
244
247 m_YScaleAdjust ) );
248
249 // Test for a reasonable PS width correction value. Set to 0 if problem.
250 if( m_PSWidthAdjust < m_widthAdjustMinValue || m_PSWidthAdjust > m_widthAdjustMaxValue )
251 m_PSWidthAdjust = 0.;
252
254
257
258 // Could devote a PlotOrder() function in place of UIOrder().
260
261 // Populate the check list box by all enabled layers names.
262 for( LSEQ seq = m_layerList; seq; ++seq )
263 {
264 PCB_LAYER_ID layer = *seq;
265
266 int checkIndex = m_layerCheckListBox->Append( board->GetLayerName( layer ) );
267
268 if( m_plotOpts.GetLayerSelection()[layer] )
269 m_layerCheckListBox->Check( checkIndex );
270 }
271
272 // Option for disabling Gerber Aperture Macro (for broken Gerber readers)
274
275 // Option for using proper Gerber extensions. Note also Protel extensions are
276 // a broken feature. However, for now, we need to handle it.
278
279 // Option for including Gerber attributes, from Gerber X2 format, in the output
280 // In X1 format, they will be added as comments
282
283 // Option for including Gerber netlist info (from Gerber X2 format) in the output
285
286 // Option to generate a Gerber job file
288
289 // Gerber precision for coordinates
290 m_coordFormatCtrl->SetSelection( m_plotOpts.GetGerberPrecision() == 5 ? 0 : 1 );
291
292 // SVG precision and units for coordinates
294
295 // Option to exclude pads from silkscreen layers
297
298 // Option to tent vias
300
301 // Option to use aux origin
303
304 // Option to plot page references:
306
307 // Options to plot texts on footprints
311
312 // Options to plot pads and vias holes
313 m_drillShapeOpt->SetSelection( (int)m_plotOpts.GetDrillMarksType() );
314
315 // Scale option
316 m_scaleOpt->SetSelection( m_plotOpts.GetScaleSelection() );
317
318 // Plot mode
320
321 // DXF outline mode
323
324 // DXF text mode
326
327 // DXF units selection
328 m_DXF_plotUnits->SetSelection( m_plotOpts.GetDXFPlotUnits() == DXF_UNITS::INCHES ? 0 : 1);
329
330 // Plot mirror option
331 m_plotMirrorOpt->SetValue( m_plotOpts.GetMirror() );
332
333 // Put vias on mask layer
335
336 // Black and white plotting
337 m_SVGColorChoice->SetSelection( m_plotOpts.GetBlackAndWhite() ? 1 : 0 );
338 m_PDFColorChoice->SetSelection( m_plotOpts.GetBlackAndWhite() ? 1 : 0 );
339
340 // Initialize a few other parameters, which can also be modified
341 // from the drill dialog
342 reInitDialog();
343
344 // Update options values:
345 wxCommandEvent cmd_event;
346 SetPlotFormat( cmd_event );
347 OnSetScaleOpt( cmd_event );
348}
constexpr EDA_IU_SCALE unityScale
Definition: base_units.h:112
@ small_folder
BOARD_DESIGN_SETTINGS & GetDesignSettings() const
Definition: board.cpp:682
STD_BITMAP_BUTTON * m_browseButton
void setPlotModeChoiceSelection(OUTLINE_MODE aPlotMode)
Definition: dialog_plot.h:69
void OnSetScaleOpt(wxCommandEvent &event) override
void SetPlotFormat(wxCommandEvent &event) override
bool GetNegative() const
PLOT_FORMAT GetFormat() const
bool GetUseAuxOrigin() const
bool GetMirror() const
DXF_UNITS GetDXFPlotUnits() const
bool GetPlotInvisibleText() const
PLOT_TEXT_MODE GetTextMode() const
unsigned GetSvgPrecision() const
unsigned GetBlackAndWhite() const
bool GetCreateGerberJobFile() const
bool GetDXFPlotPolygonMode() const
LSET GetLayerSelection() const
bool GetPlotReference() const
int GetScaleSelection() const
bool GetSketchPadsOnFabLayers() const
bool GetSubtractMaskFromSilk() const
int GetGerberPrecision() const
bool GetA4Output() const
DRILL_MARKS GetDrillMarksType() const
bool GetUseGerberX2format() const
bool GetPlotValue() const
bool GetIncludeGerberNetlistInfo() const
bool GetUseGerberProtelExtensions() const
bool GetPlotFrameRef() const
bool GetPlotViaOnMaskLayer() const
bool GetDisableGerberMacros() const
OUTLINE_MODE GetPlotMode() const
void SetBitmap(const wxBitmap &aBmp)
wxString StringFromValue(const EDA_IU_SCALE &aIuScale, EDA_UNITS aUnits, double aValue, bool aAddUnitsText=false, EDA_DATA_TYPE aType=EDA_DATA_TYPE::DISTANCE)
Returns the string from aValue according to aUnits (inch, mm ...) for display.
Definition: eda_units.cpp:236
const double IU_PER_MM
Definition: base_units.h:77
constexpr ret_type KiROUND(fp_type v)
Round a floating point number to an integer using "round halfway cases away from zero".
Definition: util.h:85

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

Referenced by DIALOG_PLOT().

◆ IsCtrl()

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

Definition at line 128 of file dialog_shim.h.

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

◆ IsQuasiModal()

◆ IsShiftCtrl()

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

Definition at line 134 of file dialog_shim.h.

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

◆ Kiway()

KIWAY & KIWAY_HOLDER::Kiway ( ) const
inlineinherited

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

A KIWAY_HOLDER is not necessarily a KIWAY_PLAYER.

Definition at line 53 of file kiway_holder.h.

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

References KIWAY_HOLDER::m_kiway.

Referenced by PROJECT_TREE_ITEM::Activate(), FOOTPRINT_VIEWER_FRAME::AddFootprintToPCB(), PCB_BASE_EDIT_FRAME::AddLibrary(), SYMBOL_EDIT_FRAME::AddLibraryFile(), SYMBOL_EDITOR_CONTROL::AddSymbolToSchematic(), SCH_EDIT_FRAME::AskToSaveChanges(), IMPORT_PROJ_HELPER::AssociateFileWithProj(), CVPCB_MAINFRAME::BuildLibrariesListBox(), FOOTPRINT_EDIT_FRAME::buildSaveAsDialog(), SYMBOL_EDIT_FRAME::buildSaveAsDialog(), SYMBOL_EDIT_FRAME::CanCloseSymbolFromSchematic(), SCH_EDIT_FRAME::canCloseWindow(), PCB_EDIT_FRAME::canCloseWindow(), KICAD_MANAGER_FRAME::CloseProject(), COMMON_CONTROL::ConfigurePaths(), DIALOG_CHOOSE_SYMBOL::ConstructRightPanel(), DIALOG_CHOOSE_FOOTPRINT::ConstructRightPanel(), PCB_BASE_FRAME::CreateAndShow3D_Frame(), FOOTPRINT_EDITOR_CONTROL::CreateFootprint(), CVPCB_MAINFRAME::CVPCB_MAINFRAME(), SYMBOL_EDIT_FRAME::DdAddLibrary(), DIALOG_LIST_HOTKEYS::DIALOG_LIST_HOTKEYS(), DIALOG_RESCUE_EACH::DIALOG_RESCUE_EACH(), DIALOG_SHIM::DIALOG_SHIM(), SCH_EDIT_FRAME::doCloseWindow(), FIELDS_EDITOR_GRID_TRICKS::doPopupSelection(), FIELDS_GRID_TRICKS::doPopupSelection(), BOARD_EDITOR_CONTROL::EditFpInFpEditor(), SCH_EDITOR_CONTROL::EditWithSymbolEditor(), BACK_ANNOTATE::FetchNetlistFromPCB(), PCB_EDIT_FRAME::FetchNetlistFromSchematic(), SCRIPTING_TOOL::Init(), EDA_DRAW_FRAME::IsScriptingConsoleVisible(), KIWAY_PLAYER::language_change(), KICAD_MANAGER_FRAME::language_change(), DIALOG_CHANGE_SYMBOLS::launchMatchIdSymbolBrowser(), DIALOG_CHANGE_SYMBOLS::launchNewIdSymbolBrowser(), FOOTPRINT_EDIT_FRAME::LoadFootprintFromBoard(), PGM_SINGLE_TOP::MacOpenFile(), SIM_PLOT_FRAME::menuExit(), TEXT_BUTTON_SYMBOL_CHOOSER::OnButtonClick(), TEXT_BUTTON_FP_CHOOSER::OnButtonClick(), PL_EDITOR_FRAME::OnExit(), SCH_EDIT_FRAME::OnExit(), FOOTPRINT_EDIT_FRAME::OnExitKiCad(), SYMBOL_EDIT_FRAME::OnExitKiCad(), FOOTPRINT_VIEWER_FRAME::OnExitKiCad(), SAVE_AS_TRAVERSER::OnFile(), DIALOG_CHOOSE_SYMBOL::OnInitDialog(), KIGFX::WX_VIEW_CONTROLS::onMotion(), SCH_EDIT_FRAME::OnOpenCvpcb(), SCH_EDIT_FRAME::OnOpenPcbnew(), SIM_PLOT_FRAME::onProbe(), PCB_EDIT_FRAME::OnQuit(), DIALOG_SYMBOL_REMAP::OnRemapSymbols(), DIALOG_FIELD_PROPERTIES::OnTextValueSelectButtonClick(), SIM_PLOT_FRAME::onTune(), KICAD_MANAGER_FRAME::OnUnarchiveFiles(), FOOTPRINT_EDIT_FRAME::OnUpdateLoadFootprintFromBoard(), SCH_EDIT_FRAME::OnUpdatePCB(), FOOTPRINT_EDIT_FRAME::OnUpdateSaveFootprintToBoard(), SCH_BASE_FRAME::PickSymbolFromLibBrowser(), KIWAY_HOLDER::Prj(), SCH_EDIT_TOOL::Properties(), BACK_ANNOTATE::PushNewLinksToPCB(), FOOTPRINT_WIZARD_FRAME::PythonPluginsReload(), FOOTPRINT_VIEWER_FRAME::ReCreateFootprintList(), SYMBOL_VIEWER_FRAME::ReCreateLibList(), FOOTPRINT_VIEWER_FRAME::ReCreateLibraryList(), SCH_EDITOR_CONTROL::rescueProject(), PCB_EDIT_FRAME::RunEeschema(), EE_INSPECTION_TOOL::RunSimulation(), SYMBOL_EDIT_FRAME::Save(), SYMBOL_EDIT_FRAME::saveCurrentSymbol(), CVPCB_MAINFRAME::SaveFootprintAssociation(), FOOTPRINT_EDIT_FRAME::SaveFootprintToBoard(), EDA_DRAW_FRAME::ScriptingConsoleEnableDisable(), PCB_BASE_FRAME::SelectFootprintFromLibBrowser(), PCB_BASE_FRAME::SelectLibrary(), CVPCB_MAINFRAME::SendComponentSelectionToSch(), SCH_EDIT_FRAME::SendCrossProbeClearHighlight(), PCB_EDIT_FRAME::SendCrossProbeItem(), SCH_EDIT_FRAME::SendCrossProbeNetName(), PCB_EDIT_FRAME::SendCrossProbeNetName(), SCH_EDIT_FRAME::sendNetlistToCvpcb(), SCH_EDIT_FRAME::SendSelectItemsToPcb(), PCB_EDIT_FRAME::SendSelectItemsToSch(), SCH_EDIT_FRAME::SetCrossProbeConnection(), SYMBOL_EDIT_FRAME::SetCurSymbol(), PCB_EDIT_FRAME::ShowBoardSetupDialog(), PCB_EDIT_FRAME::ShowFootprintPropertiesDialog(), CVPCB_CONTROL::ShowFootprintViewer(), COMMON_CONTROL::ShowLibraryTable(), COMMON_CONTROL::ShowPlayer(), KICAD_MANAGER_CONTROL::ShowPlayer(), EDA_BASE_FRAME::ShowPreferences(), SCH_EDIT_FRAME::ShowSchematicSetupDialog(), SIM_PLOT_FRAME::SIM_PLOT_FRAME(), PCB_EDIT_FRAME::TestStandalone(), BOARD_EDITOR_CONTROL::UpdateSchematicFromPCB(), DIALOG_EXCHANGE_FOOTPRINTS::ViewAndSelectFootprint(), and DIALOG_SHIM::~DIALOG_SHIM().

◆ onBoardSetup()

void DIALOG_PLOT::onBoardSetup ( wxHyperlinkEvent &  aEvent)
overrideprivatevirtual

Reimplemented from DIALOG_PLOT_BASE.

Definition at line 1162 of file dialog_plot.cpp.

1163{
1164 PCB_EDIT_FRAME* parent = dynamic_cast<PCB_EDIT_FRAME*>( GetParent() );
1165
1166 if( parent )
1167 {
1168 parent->ShowBoardSetupDialog( _( "Solder Mask/Paste" ) );
1169
1170 // Update warnings on return to this dialog
1171 reInitDialog();
1172 }
1173}
The main frame for Pcbnew.
void ShowBoardSetupDialog(const wxString &aInitialPage=wxEmptyString)

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

◆ OnButton()

void DIALOG_SHIM::OnButton ( wxCommandEvent &  aEvent)
privateinherited

Properly handle the default button events when in the quasimodal mode when not calling EndQuasiModal which is possible with any dialog derived from DIALOG_SHIM.

Definition at line 532 of file dialog_shim.cpp.

533{
534 const int id = aEvent.GetId();
535
536 // If we are pressing a button to exit, we need to enable the escapeID
537 // otherwise the dialog does not process cancel
538 if( id == wxID_CANCEL )
539 SetEscapeId( wxID_ANY );
540
541 if( IsQuasiModal() )
542 {
543 if( id == GetAffirmativeId() )
544 {
545 EndQuasiModal( id );
546 }
547 else if( id == wxID_APPLY )
548 {
549 // Dialogs that provide Apply buttons should make sure data is valid before
550 // allowing a transfer, as there is no other way to indicate failure
551 // (i.e. the dialog can't refuse to close as it might with OK, because it
552 // isn't closing anyway)
553 if( Validate() )
554 {
555 ignore_unused( TransferDataFromWindow() );
556 }
557 }
558 else if( id == GetEscapeId() || (id == wxID_CANCEL && GetEscapeId() == wxID_ANY) )
559 {
560 EndQuasiModal( wxID_CANCEL );
561 }
562 else // not a standard button
563 {
564 aEvent.Skip();
565 }
566
567 return;
568 }
569
570 // This is mandatory to allow wxDialogBase::OnButton() to be called.
571 aEvent.Skip();
572}
void EndQuasiModal(int retCode)
void ignore_unused(const T &)
Definition: ignore.h:24

References DIALOG_SHIM::EndQuasiModal(), ignore_unused(), and DIALOG_SHIM::IsQuasiModal().

Referenced by DIALOG_SHIM::DIALOG_SHIM().

◆ OnChangeDXFPlotMode()

void DIALOG_PLOT::OnChangeDXFPlotMode ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_PLOT_BASE.

Definition at line 476 of file dialog_plot.cpp.

477{
478 // m_DXF_plotTextStrokeFontOpt is disabled if m_DXF_plotModeOpt is checked (plot in DXF
479 // polygon mode)
480 m_DXF_plotTextStrokeFontOpt->Enable( !m_DXF_plotModeOpt->GetValue() );
481
482 // if m_DXF_plotTextStrokeFontOpt option is disabled (plot DXF in polygon mode), force
483 // m_DXF_plotTextStrokeFontOpt to true to use Pcbnew stroke font
484 if( !m_DXF_plotTextStrokeFontOpt->IsEnabled() )
485 m_DXF_plotTextStrokeFontOpt->SetValue( true );
486}

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

Referenced by SetPlotFormat().

◆ OnCharHook()

void DIALOG_SHIM::OnCharHook ( wxKeyEvent &  aEvt)
protectedvirtualinherited

Reimplemented in HK_PROMPT_DIALOG, DIALOG_CHOOSE_SYMBOL, and HTML_MESSAGE_BOX.

Definition at line 575 of file dialog_shim.cpp.

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

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

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

◆ OnCloseWindow()

void DIALOG_SHIM::OnCloseWindow ( wxCloseEvent &  aEvent)
privateinherited

Properly handle the wxCloseEvent when in the quasimodal mode when not calling EndQuasiModal which is possible with any dialog derived from DIALOG_SHIM.

Definition at line 519 of file dialog_shim.cpp.

520{
521 if( IsQuasiModal() )
522 {
523 EndQuasiModal( wxID_CANCEL );
524 return;
525 }
526
527 // This is mandatory to allow wxDialogBase::OnCloseWindow() to be called.
528 aEvent.Skip();
529}

References DIALOG_SHIM::EndQuasiModal(), and DIALOG_SHIM::IsQuasiModal().

Referenced by DIALOG_SHIM::DIALOG_SHIM().

◆ OnGerberX2Checked()

void DIALOG_PLOT::OnGerberX2Checked ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_PLOT_BASE.

Definition at line 943 of file dialog_plot.cpp.

944{
945 // Currently: do nothing
946}

◆ OnGridEditorHidden()

void DIALOG_SHIM::OnGridEditorHidden ( wxGridEvent &  event)
privateinherited

Definition at line 641 of file dialog_shim.cpp.

642{
643 SetEscapeId( wxID_ANY );
644 event.Skip();
645}

◆ OnGridEditorShown()

void DIALOG_SHIM::OnGridEditorShown ( wxGridEvent &  event)
privateinherited

Definition at line 634 of file dialog_shim.cpp.

635{
636 SetEscapeId( wxID_NONE );
637 event.Skip();
638}

◆ OnInitDialog()

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

Definition at line 141 of file dialog_plot_base.h.

141{ event.Skip(); }

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

◆ OnModify()

◆ OnOutputDirectoryBrowseClicked()

void DIALOG_PLOT::OnOutputDirectoryBrowseClicked ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_PLOT_BASE.

Definition at line 501 of file dialog_plot.cpp.

502{
503 // Build the absolute path of current output directory to preselect it in the file browser.
504 std::function<bool( wxString* )> textResolver =
505 [&]( wxString* token ) -> bool
506 {
507 return m_parent->GetBoard()->ResolveTextVar( token, 0 );
508 };
509
510 wxString path = m_outputDirectoryName->GetValue();
511 path = ExpandTextVars( path, &textResolver );
513 path = Prj().AbsolutePath( path );
514
515 wxDirDialog dirDialog( this, _( "Select Output Directory" ), path );
516
517 if( dirDialog.ShowModal() == wxID_CANCEL )
518 return;
519
520 wxFileName dirName = wxFileName::DirName( dirDialog.GetPath() );
521
522 wxFileName fn( Prj().AbsolutePath( m_parent->GetBoard()->GetFileName() ) );
523 wxString defaultPath = fn.GetPathWithSep();
524 wxString msg;
525 wxFileName relPathTest; // Used to test if we can make the path relative
526
527 relPathTest.Assign( dirDialog.GetPath() );
528
529 // Test if making the path relative is possible before asking the user if they want to do it
530 if( relPathTest.MakeRelativeTo( defaultPath ) )
531 {
532 msg.Printf( _( "Do you want to use a path relative to\n'%s'?" ), defaultPath );
533
534 wxMessageDialog dialog( this, msg, _( "Plot Output Directory" ),
535 wxYES_NO | wxICON_QUESTION | wxYES_DEFAULT );
536
537 if( dialog.ShowModal() == wxID_YES )
538 dirName.MakeRelativeTo( defaultPath );
539 }
540
541 m_outputDirectoryName->SetValue( dirName.GetFullPath() );
542}
bool ResolveTextVar(wxString *token, int aDepth) const
Definition: board.cpp:328
const wxString & GetFileName() const
Definition: board.h:302
virtual const wxString AbsolutePath(const wxString &aFileName) const
Fix up aFileName if it is relative to the project's directory to be an absolute path and filename.
Definition: project.cpp:305
const wxString ExpandEnvVarSubstitutions(const wxString &aString, const PROJECT *aProject)
Replace any environment variable & text variable references with their values.
Definition: common.cpp:299
wxString ExpandTextVars(const wxString &aSource, const PROJECT *aProject)
Definition: common.cpp:58

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

◆ OnPaint()

void DIALOG_SHIM::OnPaint ( wxPaintEvent &  event)
inherited

Definition at line 386 of file dialog_shim.cpp.

387{
389 {
391
392 selectAllInTextCtrls( GetChildren() );
393
396 else
397 KIPLATFORM::UI::ForceFocus( this ); // Focus the dialog itself
398
399 m_firstPaintEvent = false;
400 }
401
402 event.Skip();
403}
bool m_firstPaintEvent
Definition: dialog_shim.h:212
wxWindow * m_initialFocusTarget
Definition: dialog_shim.h:213
static void selectAllInTextCtrls(wxWindowList &children)
void FixupCancelButtonCmdKeyCollision(wxWindow *aWindow)
Definition: gtk/ui.cpp:71
void ForceFocus(wxWindow *aWindow)
Pass the current focus to the window.
Definition: gtk/ui.cpp:44

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

Referenced by DIALOG_SHIM::DIALOG_SHIM().

◆ onPlotAllListMoveDown()

void DIALOG_PLOT::onPlotAllListMoveDown ( wxCommandEvent &  aEvent)
private

Definition at line 1183 of file dialog_plot.cpp.

1184{
1185 if( m_plotAllLayersList->CanMoveCurrentDown() )
1186 m_plotAllLayersList->MoveCurrentDown();
1187}

References m_plotAllLayersList.

Referenced by DIALOG_PLOT(), and ~DIALOG_PLOT().

◆ onPlotAllListMoveUp()

void DIALOG_PLOT::onPlotAllListMoveUp ( wxCommandEvent &  aEvent)
private

Definition at line 1176 of file dialog_plot.cpp.

1177{
1178 if( m_plotAllLayersList->CanMoveCurrentUp() )
1179 m_plotAllLayersList->MoveCurrentUp();
1180}

References m_plotAllLayersList.

Referenced by DIALOG_PLOT(), and ~DIALOG_PLOT().

◆ OnPopUpLayers()

void DIALOG_PLOT::OnPopUpLayers ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_PLOT_BASE.

Definition at line 406 of file dialog_plot.cpp.

407{
408 // Build a list of layers for usual fabrication: copper layers + tech layers without courtyard
409 LSET fab_layer_set = ( LSET::AllCuMask() | LSET::AllTechMask() ) & ~LSET( 2, B_CrtYd, F_CrtYd );
410
411 switch( event.GetId() )
412 {
413 case ID_LAYER_FAB: // Select layers usually needed to build a board
414 for( unsigned i = 0; i < m_layerList.size(); i++ )
415 {
416 LSET layermask( m_layerList[ i ] );
417
418 if( ( layermask & fab_layer_set ).any() )
419 m_layerCheckListBox->Check( i, true );
420 else
421 m_layerCheckListBox->Check( i, false );
422 }
423
424 break;
425
427 for( unsigned i = 0; i < m_layerList.size(); i++ )
428 {
429 if( IsCopperLayer( m_layerList[i] ) )
430 m_layerCheckListBox->Check( i, true );
431 }
432
433 break;
434
436 for( unsigned i = 0; i < m_layerList.size(); i++ )
437 {
438 if( IsCopperLayer( m_layerList[i] ) )
439 m_layerCheckListBox->Check( i, false );
440 }
441
442 break;
443
445 for( unsigned i = 0; i < m_layerList.size(); i++ )
446 m_layerCheckListBox->Check( i, true );
447
448 break;
449
451 for( unsigned i = 0; i < m_layerList.size(); i++ )
452 m_layerCheckListBox->Check( i, false );
453
454 break;
455
456 default:
457 break;
458 }
459}
static LSET AllTechMask()
Return a mask holding all technical layers (no CU layer) on both side.
Definition: lset.cpp:841
bool IsCopperLayer(int aLayerId)
Tests whether a layer is a copper layer.
Definition: layer_ids.h:825
@ F_CrtYd
Definition: layer_ids.h:117
@ B_CrtYd
Definition: layer_ids.h:116

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

◆ OnRightClick()

void DIALOG_PLOT::OnRightClick ( wxMouseEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_PLOT_BASE.

Definition at line 399 of file dialog_plot.cpp.

400{
401 PopupMenu( m_popMenu );
402}

References DIALOG_PLOT_BASE::m_popMenu.

◆ onRunDRC()

void DIALOG_PLOT::onRunDRC ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_PLOT_BASE.

Definition at line 1141 of file dialog_plot.cpp.

1142{
1143 PCB_EDIT_FRAME* parent = dynamic_cast<PCB_EDIT_FRAME*>( GetParent() );
1144
1145 if( parent )
1146 {
1147 DRC_TOOL* drcTool = parent->GetToolManager()->GetTool<DRC_TOOL>();
1148
1149 // First close an existing dialog if open
1150 // (low probability, but can happen)
1151 drcTool->DestroyDRCDialog();
1152
1153 // Open a new drc dialog, with the right parent frame, and in Modal Mode
1154 drcTool->ShowDRCDialog( this );
1155
1156 // Update DRC warnings on return to this dialog
1157 reInitDialog();
1158 }
1159}
void ShowDRCDialog(wxWindow *aParent)
Opens the DRC dialog.
Definition: drc_tool.cpp:70
void DestroyDRCDialog()
Close and free the DRC dialog.
Definition: drc_tool.cpp:121
TOOL_MANAGER * GetToolManager() const
Return the MVC controller.
Definition: tools_holder.h:54

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

◆ OnSetScaleOpt()

void DIALOG_PLOT::OnSetScaleOpt ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_PLOT_BASE.

Definition at line 489 of file dialog_plot.cpp.

490{
491 /* Disable sheet reference for scale != 1:1 */
492 bool scale1 = ( m_scaleOpt->GetSelection() == 1 );
493
494 m_plotSheetRef->Enable( scale1 );
495
496 if( !scale1 )
497 m_plotSheetRef->SetValue( false );
498}

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

Referenced by init_Dialog(), and SetPlotFormat().

◆ Plot()

void DIALOG_PLOT::Plot ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_PLOT_BASE.

Definition at line 949 of file dialog_plot.cpp.

950{
951 BOARD* board = m_parent->GetBoard();
952
954
955 SETTINGS_MANAGER& mgr = Pgm().GetSettingsManager();
957
959
961
962 // If no layer selected, we have nothing plotted.
963 // Prompt user if it happens because he could think there is a bug in Pcbnew.
964 if( !m_plotOpts.GetLayerSelection().any() )
965 {
966 DisplayError( this, _( "No layer selected, Nothing to plot" ) );
967 return;
968 }
969
970 // Create output directory if it does not exist (also transform it in absolute form).
971 // Bail if it fails.
972
973 std::function<bool( wxString* )> textResolver =
974 [&]( wxString* token ) -> bool
975 {
976 // Handles board->GetTitleBlock() *and* board->GetProject()
977 return m_parent->GetBoard()->ResolveTextVar( token, 0 );
978 };
979
981 path = ExpandTextVars( path, &textResolver );
983
984 wxFileName outputDir = wxFileName::DirName( path );
985 wxString boardFilename = m_parent->GetBoard()->GetFileName();
986 REPORTER& reporter = m_messagesPanel->Reporter();
987
988 if( !EnsureFileDirectoryExists( &outputDir, boardFilename, &reporter ) )
989 {
990 wxString msg;
991 msg.Printf( _( "Could not write plot files to folder '%s'." ), outputDir.GetPath() );
992 DisplayError( this, msg );
993 return;
994 }
995
996 if( m_zoneFillCheck->GetValue() )
997 m_parent->GetToolManager()->GetTool<ZONE_FILLER_TOOL>()->CheckAllZones( this );
998
999 m_plotOpts.SetAutoScale( false );
1000
1001 switch( m_plotOpts.GetScaleSelection() )
1002 {
1003 default: m_plotOpts.SetScale( 1 ); break;
1004 case 0: m_plotOpts.SetAutoScale( true ); break;
1005 case 2: m_plotOpts.SetScale( 1.5 ); break;
1006 case 3: m_plotOpts.SetScale( 2 ); break;
1007 case 4: m_plotOpts.SetScale( 3 ); break;
1008 }
1009
1010 /* If the scale factor edit controls are disabled or the scale value
1011 * is 0, don't adjust the base scale factor. This fixes a bug when
1012 * the default scale adjust is initialized to 0 and saved in program
1013 * settings resulting in a divide by zero fault.
1014 */
1016 {
1017 if( m_XScaleAdjust != 0.0 )
1019
1020 if( m_YScaleAdjust != 0.0 )
1022
1024 }
1025
1026 wxString file_ext( GetDefaultPlotExtension( m_plotOpts.GetFormat() ) );
1027
1028 // Test for a reasonable scale value
1029 // XXX could this actually happen? isn't it constrained in the apply function?
1031 DisplayInfoMessage( this, _( "Warning: Scale option set to a very small value" ) );
1032
1034 DisplayInfoMessage( this, _( "Warning: Scale option set to a very large value" ) );
1035
1036 GERBER_JOBFILE_WRITER jobfile_writer( board, &reporter );
1037
1038 // Save the current plot options in the board
1040
1041 wxBusyCursor dummy;
1042
1043 for( LSEQ seq = m_plotOpts.GetLayerSelection().UIOrder(); seq; ++seq )
1044 {
1045 LSEQ plotSequence;
1046
1047 // Base layer always gets plotted first.
1048 plotSequence.push_back( *seq );
1049
1050 // Add selected layers from plot on all layers list in order set by user.
1051 wxArrayInt plotOnAllLayers;
1052
1053 if( m_plotAllLayersList->GetCheckedItems( plotOnAllLayers ) )
1054 {
1055 size_t count = plotOnAllLayers.GetCount();
1056
1057 for( size_t i = 0; i < count; i++ )
1058 {
1059 int index = plotOnAllLayers.Item( i );
1060 wxClientData* tmp = m_plotAllLayersList->GetClientObject( index );
1061 PCB_LAYER_ID_CLIENT_DATA* layerId = dynamic_cast<PCB_LAYER_ID_CLIENT_DATA*>( tmp );
1062
1063 wxCHECK2( layerId, continue );
1064
1065 // Don't plot the same layer more than once;
1066 if( find( plotSequence.begin(), plotSequence.end(), layerId->GetData() ) !=
1067 plotSequence.end() )
1068 continue;
1069
1070 plotSequence.push_back( layerId->GetData() );
1071 }
1072 }
1073
1074 PCB_LAYER_ID layer = *seq;
1075
1076 // All copper layers that are disabled are actually selected
1077 // This is due to wonkyness in automatically selecting copper layers
1078 // for plotting when adding more than two layers to a board.
1079 // If plot options become accessible to the layers setup dialog
1080 // please move this functionality there!
1081 // This skips a copper layer if it is actually disabled on the board.
1082 if( ( LSET::AllCuMask() & ~board->GetEnabledLayers() )[layer] )
1083 continue;
1084
1085 // Pick the basename from the board file
1086 wxFileName fn( boardFilename );
1087
1088 // Use Gerber Extensions based on layer number
1089 // (See http://en.wikipedia.org/wiki/Gerber_File)
1091 file_ext = GetGerberProtelExtension( layer );
1092
1093 BuildPlotFileName( &fn, outputDir.GetPath(), board->GetLayerName( layer ), file_ext );
1094 wxString fullname = fn.GetFullName();
1095 jobfile_writer.AddGbrFile( layer, fullname );
1096
1097 LOCALE_IO toggle;
1098
1099 //@todo allow controlling the sheet name and path that will be displayed in the title block
1100 // Leave blank for now
1101 PLOTTER* plotter = StartPlotBoard( board, &m_plotOpts, layer, fn.GetFullPath(),
1102 wxEmptyString, wxEmptyString );
1103
1104 // Print diags in messages box:
1105 wxString msg;
1106
1107 if( plotter )
1108 {
1109 PlotBoardLayers( board, plotter, plotSequence, m_plotOpts );
1110 PlotInteractiveLayer( board, plotter );
1111 plotter->EndPlot();
1112 delete plotter->RenderSettings();
1113 delete plotter;
1114
1115 msg.Printf( _( "Plotted to '%s'." ), fn.GetFullPath() );
1116 reporter.Report( msg, RPT_SEVERITY_ACTION );
1117 }
1118 else
1119 {
1120 msg.Printf( _( "Failed to create file '%s'." ), fn.GetFullPath() );
1121 reporter.Report( msg, RPT_SEVERITY_ERROR );
1122 }
1123
1124 wxSafeYield(); // displays report message.
1125 }
1126
1128 {
1129 // Pick the basename from the board file
1130 wxFileName fn( boardFilename );
1131
1132 // Build gerber job file from basename
1133 BuildPlotFileName( &fn, outputDir.GetPath(), wxT( "job" ), GerberJobFileExtension );
1134 jobfile_writer.CreateJobFile( fn.GetFullPath() );
1135 }
1136
1137 reporter.ReportTail( _( "Done." ), RPT_SEVERITY_INFO );
1138}
wxString m_ColorTheme
Active color theme name.
Definition: app_settings.h:190
int GetLineThickness(PCB_LAYER_ID aLayer) const
Return the default graphic segment thickness from the layer class for the given layer.
PROJECT * GetProject() const
Definition: board.h:440
GERBER_JOBFILE_WRITER is a class used to create Gerber job file a Gerber job file stores info to make...
Instantiate the current locale within a scope in which you are expecting exceptions to be thrown.
Definition: locale_io.h:41
void SetAutoScale(bool aFlag)
double GetScale() const
void SetSketchPadLineWidth(int aWidth)
wxString GetOutputDirectory() const
void SetScale(double aVal)
void SetFineScaleAdjustX(double aVal)
void SetColorSettings(COLOR_SETTINGS *aSettings)
void SetFineScaleAdjustY(double aVal)
void SetWidthAdjust(int aVal)
Base plotter engine class.
Definition: plotter.h:110
virtual bool EndPlot()=0
RENDER_SETTINGS * RenderSettings()
Definition: plotter.h:141
virtual REPORTER & ReportTail(const wxString &aText, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED)
Places the report at the end of the list, for objects that support report ordering.
Definition: reporter.h:99
T * GetAppSettings(bool aLoadNow=true)
Returns a handle to the a given settings by type If the settings have already been loaded,...
COLOR_SETTINGS * GetColorSettings(const wxString &aName="user")
Retrieves a color settings object that applications can read colors from.
Handle actions specific to filling copper zones.
bool EnsureFileDirectoryExists(wxFileName *aTargetFullFileName, const wxString &aBaseFilename, REPORTER *aReporter)
Make aTargetFullFileName absolute and create the path of this file if it doesn't yet exist.
Definition: common.cpp:327
wxString GetDefaultPlotExtension(PLOT_FORMAT aFormat)
Returns the default plot extension for a format.
void DisplayError(wxWindow *aParent, const wxString &aText, int aDisplayTime)
Display an error or warning message box with aMessage.
Definition: confirm.cpp:300
void DisplayInfoMessage(wxWindow *aParent, const wxString &aMessage, const wxString &aExtraInfo)
Display an informational message box with aMessage.
Definition: confirm.cpp:352
const std::string GerberJobFileExtension
@ F_Fab
Definition: layer_ids.h:120
const wxString GetGerberProtelExtension(int aLayer)
Definition: pcbplot.cpp:42
void BuildPlotFileName(wxFileName *aFilename, const wxString &aOutputDir, const wxString &aSuffix, const wxString &aExtension)
Complete a plot filename.
Definition: pcbplot.cpp:361
void PlotInteractiveLayer(BOARD *aBoard, PLOTTER *aPlotter)
Plot interactive items (hypertext links, properties, etc.).
PLOTTER * StartPlotBoard(BOARD *aBoard, const PCB_PLOT_PARAMS *aPlotOpts, int aLayer, const wxString &aFullFileName, const wxString &aSheetName, const wxString &aSheetPath)
Open a new plotfile using the options (and especially the format) specified in the options and prepar...
void PlotBoardLayers(BOARD *aBoard, PLOTTER *aPlotter, const LSEQ &aLayerSequence, const PCB_PLOT_PARAMS &aPlotOptions)
Plot a sequence of board layer IDs.
@ RPT_SEVERITY_ERROR
@ RPT_SEVERITY_ACTION
KIWAY Kiway & Pgm(), KFCTL_STANDALONE
The global Program "get" accessor.
Definition: single_top.cpp:111
std::vector< FAB_LAYER_COLOR > dummy

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

◆ Prj()

PROJECT & KIWAY_HOLDER::Prj ( ) const
inherited

Return a reference to the PROJECT associated with this KIWAY.

Definition at line 36 of file kiway_holder.cpp.

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

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

Referenced by SYMBOL_TREE_MODEL_ADAPTER::AddLibraries(), FP_TREE_MODEL_ADAPTER::AddLibraries(), SYMBOL_LIBRARY_MANAGER::addLibrary(), PCB_BASE_EDIT_FRAME::AddLibrary(), SYMBOL_EDIT_FRAME::addLibTableEntry(), SCH_EDIT_FRAME::AppendSchematic(), AskSaveBoardFileName(), DIALOG_SYMBOL_REMAP::backupProject(), CVPCB_MAINFRAME::buildEquivalenceList(), CVPCB_MAINFRAME::BuildLibrariesListBox(), FOOTPRINT_EDIT_FRAME::buildSaveAsDialog(), SYMBOL_EDIT_FRAME::buildSaveAsDialog(), PCB_BASE_FRAME::canCloseWindow(), SIM_PLOT_FRAME::canCloseWindow(), PANEL_FP_PROPERTIES_3D_MODEL::Cfg3DPath(), SYMBOL_VIEWER_FRAME::ClickOnLibList(), KICAD_MANAGER_FRAME::CloseProject(), PCB_BASE_EDIT_FRAME::createNewLibrary(), PCB_BASE_EDIT_FRAME::CreateNewProjectLibrary(), DIALOG_SYMBOL_REMAP::createProjectSymbolLibTable(), SCH_EDIT_FRAME::CreateScreens(), FOOTPRINT_EDIT_FRAME::DeleteFootprintFromLibrary(), DIALOG_ANNOTATE::DIALOG_ANNOTATE(), DIALOG_ASSIGN_NETCLASS::DIALOG_ASSIGN_NETCLASS(), DIALOG_BOARD_REANNOTATE::DIALOG_BOARD_REANNOTATE(), DIALOG_BOARD_SETUP::DIALOG_BOARD_SETUP(), DIALOG_BOARD_STATISTICS::DIALOG_BOARD_STATISTICS(), DIALOG_CHANGE_SYMBOLS::DIALOG_CHANGE_SYMBOLS(), DIALOG_CHOOSE_FOOTPRINT::DIALOG_CHOOSE_FOOTPRINT(), DIALOG_CHOOSE_SYMBOL::DIALOG_CHOOSE_SYMBOL(), DIALOG_CONFIG_EQUFILES::DIALOG_CONFIG_EQUFILES(), DIALOG_EXCHANGE_FOOTPRINTS::DIALOG_EXCHANGE_FOOTPRINTS(), DIALOG_EXPORT_SVG::DIALOG_EXPORT_SVG(), DIALOG_GEN_FOOTPRINT_POSITION::DIALOG_GEN_FOOTPRINT_POSITION(), DIALOG_IBIS_PARSER_REPORTER::DIALOG_IBIS_PARSER_REPORTER(), DIALOG_IMPORT_NETLIST::DIALOG_IMPORT_NETLIST(), DIALOG_LIB_SYMBOL_PROPERTIES::DIALOG_LIB_SYMBOL_PROPERTIES(), DIALOG_PAGES_SETTINGS::DIALOG_PAGES_SETTINGS(), DIALOG_PLOT(), DIALOG_PLOT_SCHEMATIC::DIALOG_PLOT_SCHEMATIC(), DIALOG_SCHEMATIC_SETUP::DIALOG_SCHEMATIC_SETUP(), DIALOG_SYMBOL_FIELDS_TABLE::DIALOG_SYMBOL_FIELDS_TABLE(), DIALOG_SYMBOL_REMAP::DIALOG_SYMBOL_REMAP(), DIALOG_UPDATE_FROM_PCB::DIALOG_UPDATE_FROM_PCB(), DIALOG_UPDATE_PCB::DIALOG_UPDATE_PCB(), PL_DRAW_PANEL_GAL::DisplayDrawingSheet(), FOOTPRINT_PREVIEW_PANEL::DisplayFootprint(), SYMBOL_VIEWER_FRAME::DisplayLibInfos(), CVPCB_MAINFRAME::DisplayStatus(), SCH_EDIT_FRAME::doAutoSave(), PCB_EDIT_FRAME::doAutoSave(), SCH_EDIT_FRAME::doCloseWindow(), FOOTPRINT_EDIT_FRAME::doCloseWindow(), PCB_BASE_EDIT_FRAME::doCloseWindow(), FIELDS_EDITOR_GRID_TRICKS::doPopupSelection(), FIELDS_GRID_TRICKS::doPopupSelection(), FOOTPRINT_EDIT_FRAME::DuplicateFootprint(), KICAD_MANAGER_CONTROL::Execute(), PCB_EDIT_FRAME::Export_IDF3(), PCB_EDIT_FRAME::ExportFootprintsToLibrary(), BOARD_EDITOR_CONTROL::ExportNetlist(), SYMBOL_EDITOR_CONTROL::ExportSymbolAsSVG(), SYMBOL_EDITOR_CONTROL::ExportView(), PCB_EDIT_FRAME::ExportVRML_File(), BACK_ANNOTATE::FetchNetlistFromPCB(), PCB_EDIT_FRAME::Files_io_from_id(), PCB_EDIT_FRAME::GenD356File(), FOOTPRINT_VIEWER_FRAME::getCurFootprintName(), SYMBOL_EDIT_FRAME::GetCurLib(), FOOTPRINT_VIEWER_FRAME::getCurNickname(), SIM_PLOT_FRAME::getDefaultFilename(), SIM_PLOT_FRAME::getDefaultPath(), PCB_BASE_EDIT_FRAME::GetDesignRulesPath(), DISPLAY_FOOTPRINTS_FRAME::GetFootprint(), PCB_EDIT_FRAME::GetLastPath(), DIALOG_SYMBOL_REMAP::getLibsNotInGlobalSymbolLibTable(), SCH_BASE_FRAME::GetLibSymbol(), DIALOG_PLOT_SCHEMATIC::getOutputPath(), KICAD_MANAGER_FRAME::GetProjectFileName(), SCH_EDIT_FRAME::GetSchematicJunctionSize(), SYMBOL_VIEWER_FRAME::GetSelectedSymbol(), SCH_NAVIGATE_TOOL::HypertextCommand(), SCH_EDIT_FRAME::importFile(), SCH_EDITOR_CONTROL::ImportFPAssignments(), DIALOG_CONFIG_EQUFILES::Init(), FIELDS_GRID_TABLE< T >::initGrid(), FOOTPRINT_EDIT_FRAME::initLibraryTree(), SYMBOL_EDIT_FRAME::KiwayMailIn(), FOOTPRINT_EDIT_FRAME::KiwayMailIn(), EDA_DRAW_FRAME::LibraryFileBrowser(), SYMBOL_VIEWER_FRAME::loadAllLibraries(), PCB_BASE_FRAME::loadFootprint(), CVPCB_MAINFRAME::LoadFootprintFiles(), PCB_EDIT_FRAME::LoadFootprints(), SCH_EDIT_FRAME::LoadProject(), KICAD_MANAGER_FRAME::LoadProject(), SCH_EDIT_FRAME::LoadProjectSettings(), PCB_EDIT_FRAME::LoadProjectSettings(), SIM_PLOT_FRAME::LoadSettings(), SCH_EDIT_FRAME::LoadSheetFromFile(), SYMBOL_EDIT_FRAME::LoadSymbol(), SYMBOL_EDIT_FRAME::LoadSymbolFromCurrentLib(), EDA_BASE_FRAME::LoadWindowState(), SIM_PLOT_FRAME::loadWorkbook(), SIM_PLOT_FRAME::menuSaveWorkbook(), SIM_PLOT_FRAME::menuSaveWorkbookAs(), PANEL_FP_PROPERTIES_3D_MODEL::On3DModelCellChanged(), FOOTPRINT_VIEWER_FRAME::OnActivate(), PANEL_FP_PROPERTIES_3D_MODEL::OnAdd3DModel(), DIALOG_BOARD_SETUP::onAuxiliaryAction(), PCB_EDIT_FRAME::onBoardLoaded(), KICAD_MANAGER_FRAME::OnBrowseInFileExplorer(), DIALOG_IMPORT_NETLIST::onBrowseNetlistFiles(), WX_HTML_REPORT_PANEL::onBtnSaveToFile(), TEXT_BUTTON_URL::OnButtonClick(), TEXT_BUTTON_FILE_BROWSER::OnButtonClick(), DIALOG_EDIT_SYMBOLS_LIBID::onClickOrphansButton(), DIALOG_SYMBOL_FIELDS_TABLE::OnExport(), DIALOG_GENDRILL::OnGenReportFile(), KICAD_MANAGER_FRAME::OnIdle(), SCH_EDIT_FRAME::OnImportProject(), DIALOG_CHOOSE_SYMBOL::OnInitDialog(), DIALOG_CONFIG_EQUFILES::OnOkClick(), SCH_EDIT_FRAME::OnOpenCvpcb(), KICAD_MANAGER_FRAME::OnOpenFileInTextEditor(), SCH_EDIT_FRAME::OnOpenPcbnew(), DIALOG_PLOT_SCHEMATIC::OnOutputDirectoryBrowseClicked(), DIALOG_EXPORT_SVG::OnOutputDirectoryBrowseClicked(), DIALOG_GEN_FOOTPRINT_POSITION::OnOutputDirectoryBrowseClicked(), DIALOG_GENDRILL::OnOutputDirectoryBrowseClicked(), OnOutputDirectoryBrowseClicked(), DIALOG_SCHEMATIC_SETUP::onPageChanged(), DIALOG_BOARD_SETUP::onPageChanged(), DIALOG_SYMBOL_REMAP::OnRemapSymbols(), FOOTPRINT_EDIT_FRAME::OnSaveFootprintAsPng(), DIALOG_ERC::OnSaveReport(), DIALOG_DRC::OnSaveReport(), DIALOG_SCH_FIELD_PROPERTIES::onScintillaCharAdded(), DIALOG_TEXT_PROPERTIES::onScintillaCharAdded(), PROPERTIES_FRAME::onScintillaCharAdded(), SYMBOL_VIEWER_FRAME::OnSelectSymbol(), KICAD_MANAGER_FRAME::OnUnarchiveFiles(), SCH_EDIT_FRAME::OnUpdatePCB(), DIALOG_PAGES_SETTINGS::OnWksFileSelection(), SCH_EDIT_FRAME::OpenProjectFiles(), PCB_EDIT_FRAME::OpenProjectFiles(), PANEL_FP_PROPERTIES_3D_MODEL::PANEL_FP_PROPERTIES_3D_MODEL(), PANEL_PREVIEW_3D_MODEL::PANEL_PREVIEW_3D_MODEL(), SCH_EDITOR_CONTROL::Paste(), FOOTPRINT_EDITOR_CONTROL::PasteFootprint(), SCH_BASE_FRAME::PickSymbolFromLibTree(), SYMBOL_EDITOR_CONTROL::PinLibrary(), FOOTPRINT_EDITOR_CONTROL::PinLibrary(), LIB_TREE_MODEL_ADAPTER::PinLibrary(), DIALOG_CHOOSE_SYMBOL::PopulateFootprintSelector(), SCH_EDITOR_CONTROL::Print(), EDA_DRAW_FRAME::PrintDrawingSheet(), SCH_EDIT_FRAME::PrintPage(), KICAD_MANAGER_FRAME::PrintPrjInfo(), CVPCB_MAINFRAME::readNetListAndFpFiles(), APPEARANCE_CONTROLS::rebuildNets(), PCB_EDIT_FRAME::RecreateCmpFileFromBoard(), FOOTPRINT_VIEWER_FRAME::ReCreateFootprintList(), SYMBOL_VIEWER_FRAME::ReCreateLibList(), FOOTPRINT_VIEWER_FRAME::ReCreateLibraryList(), SYMBOL_VIEWER_FRAME::ReCreateSymbolList(), PANEL_FP_PROPERTIES_3D_MODEL::ReloadModelsFromFootprint(), EDA_3D_VIEWER_FRAME::ReloadRequest(), DIALOG_SYMBOL_REMAP::remapSymbolToLibTable(), FOOTPRINT_EDITOR_CONTROL::RenameFootprint(), SYMBOL_EDIT_FRAME::replaceLibTableEntry(), SCH_EDITOR_CONTROL::RescueLegacyProject(), SCH_EDITOR_CONTROL::RescueSymbolLibTableProject(), FOOTPRINT_EDIT_FRAME::restoreLastFootprint(), FOOTPRINT_EDIT_FRAME::retainLastFootprint(), PCB_EDIT_FRAME::RunEeschema(), FOOTPRINT_EDITOR_CONTROL::SaveAs(), FOOTPRINT_EDIT_FRAME::SaveFootprint(), FOOTPRINT_EDIT_FRAME::SaveFootprintAs(), FOOTPRINT_EDIT_FRAME::SaveFootprintInLibrary(), SYMBOL_EDIT_FRAME::saveLibrary(), PCB_EDIT_FRAME::SavePcbFile(), SCH_EDIT_FRAME::SaveProject(), SCH_EDIT_FRAME::SaveProjectSettings(), PCB_EDIT_FRAME::SaveProjectSettings(), DIALOG_BOARD_STATISTICS::saveReportClicked(), SCH_EDIT_FRAME::saveSchematicFile(), EDA_BASE_FRAME::SaveSettings(), SIM_PLOT_FRAME::SaveSettings(), SCH_BASE_FRAME::saveSymbolLibTables(), SIM_PLOT_FRAME::saveWorkbook(), FOOTPRINT_VIEWER_FRAME::SelectAndViewFootprint(), PCB_BASE_FRAME::SelectFootprintFromLibTree(), PCB_BASE_FRAME::SelectLibrary(), SCH_BASE_FRAME::SelectLibraryFromList(), PCB_BASE_EDIT_FRAME::selectLibTable(), SCH_BASE_FRAME::SelectSymLibTable(), PCB_EDIT_FRAME::SetBoard(), FOOTPRINT_VIEWER_FRAME::setCurFootprintName(), SYMBOL_EDIT_FRAME::SetCurLib(), FOOTPRINT_VIEWER_FRAME::setCurNickname(), SYMBOL_EDIT_FRAME::SetCurSymbol(), PCB_EDIT_FRAME::SetLastPath(), GERBVIEW_FRAME::SetPageSettings(), EE_INSPECTION_TOOL::ShowDatasheet(), DIALOG_CHOOSE_SYMBOL::ShowFootprintFor(), COMMON_CONTROL::ShowHelp(), FOOTPRINT_VIEWER_FRAME::ShowModal(), SYMBOL_VIEWER_FRAME::ShowModal(), APPEARANCE_CONTROLS::showNetclass(), SYMBOL_LIBRARY_MANAGER::symTable(), FP_TREE_SYNCHRONIZING_ADAPTER::Sync(), SYMBOL_TREE_SYNCHRONIZING_ADAPTER::Sync(), FOOTPRINT_EDIT_FRAME::SyncLibraryTree(), EDA_3D_VIEWER_FRAME::takeScreenshot(), PCB_EDIT_FRAME::TestStandalone(), DIALOG_EDIT_SYMBOLS_LIBID::TransferDataFromWindow(), DIALOG_EXPORT_NETLIST::TransferDataFromWindow(), DIALOG_SHEET_PROPERTIES::TransferDataFromWindow(), DIALOG_ASSIGN_NETCLASS::TransferDataFromWindow(), PANEL_SETUP_RULES::TransferDataFromWindow(), PANEL_SETUP_RULES::TransferDataToWindow(), SYMBOL_EDITOR_CONTROL::UnpinLibrary(), FOOTPRINT_EDITOR_CONTROL::UnpinLibrary(), LIB_TREE_MODEL_ADAPTER::UnpinLibrary(), SCH_EDIT_FRAME::updateAutoSaveFile(), DIALOG_PAGES_SETTINGS::UpdateDrawingSheetExample(), SCH_EDIT_FRAME::updateTitle(), SIM_PLOT_FRAME::updateTitle(), FOOTPRINT_EDIT_FRAME::UpdateTitle(), FOOTPRINT_VIEWER_FRAME::UpdateTitle(), SIM_PLOT_FRAME::UpdateTunerValue(), PANEL_FP_PROPERTIES_3D_MODEL::validateModelExists(), SCH_EDIT_FRAME::WriteNetListFile(), DIALOG_FOOTPRINT_PROPERTIES::~DIALOG_FOOTPRINT_PROPERTIES(), EDA_3D_VIEWER_FRAME::~EDA_3D_VIEWER_FRAME(), PANEL_FP_PROPERTIES_3D_MODEL::~PANEL_FP_PROPERTIES_3D_MODEL(), and SCH_EDIT_FRAME::~SCH_EDIT_FRAME().

◆ reInitDialog()

void DIALOG_PLOT::reInitDialog ( )
private

Definition at line 351 of file dialog_plot.cpp.

352{
353 // after calling the Drill or DRC dialogs some parameters can be modified....
354
355 // Output directory
357
358 // Origin of coordinates:
360
361 int knownViolations = 0;
362 int exclusions = 0;
363
364 for( PCB_MARKER* marker : m_parent->GetBoard()->Markers() )
365 {
366 if( marker->GetSeverity() == RPT_SEVERITY_EXCLUSION )
367 exclusions++;
368 else
369 knownViolations++;
370 }
371
372 if( knownViolations || exclusions )
373 {
375 exclusions ) );
377 }
378 else
379 {
381 }
382
383 BOARD* board = m_parent->GetBoard();
384 const BOARD_DESIGN_SETTINGS& brd_settings = board->GetDesignSettings();
385
387 ( brd_settings.m_SolderMaskExpansion || brd_settings.m_SolderMaskMinWidth ) )
388 {
390 }
391 else
392 {
394 }
395}
Container for design settings for a BOARD object.
MARKERS & Markers()
Definition: board.h:316
wxBoxSizer * m_SizerSolderMaskAlert
wxBoxSizer * m_PlotOptionsSizer
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, const CPTREE &aTree)
Output a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
Definition: ptree.cpp:200
@ RPT_SEVERITY_EXCLUSION

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

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

◆ resetSize()

void DIALOG_SHIM::resetSize ( )
protectedinherited

Clear the existing dialog size and position.

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

Definition at line 293 of file dialog_shim.cpp.

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

References class_map, and DIALOG_SHIM::m_hash_key.

Referenced by DIALOG_LIB_SYMBOL_PROPERTIES::DIALOG_LIB_SYMBOL_PROPERTIES().

◆ SetInitialFocus()

void DIALOG_SHIM::SetInitialFocus ( wxWindow *  aWindow)
inlineinherited

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

Definition at line 97 of file dialog_shim.h.

98 {
99 m_initialFocusTarget = aWindow;
100 }

References DIALOG_SHIM::m_initialFocusTarget.

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

◆ SetKiway()

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

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

"this" is a KIWAY_HOLDER mix-in.

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

Definition at line 43 of file kiway_holder.cpp.

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

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

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

◆ SetPlotFormat()

void DIALOG_PLOT::SetPlotFormat ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_PLOT_BASE.

Definition at line 560 of file dialog_plot.cpp.

561{
562 // this option exist only in DXF format:
564
565 // The alert message about non 0 solder mask min width and margin is shown
566 // only in gerber format and if min mask width or mask margin is not 0
567 BOARD* board = m_parent->GetBoard();
568 const BOARD_DESIGN_SETTINGS& brd_settings = board->GetDesignSettings();
569
571 && ( brd_settings.m_SolderMaskExpansion || brd_settings.m_SolderMaskMinWidth ) )
572 {
574 }
575 else
576 {
578 }
579
580 switch( getPlotFormat() )
581 {
582 case PLOT_FORMAT::SVG:
583 case PLOT_FORMAT::PDF:
584 m_drillShapeOpt->Enable( true );
585 m_plotModeOpt->Enable( false );
587 m_plotMirrorOpt->Enable( true );
588 m_useAuxOriginCheckBox->Enable( false );
589 m_useAuxOriginCheckBox->SetValue( false );
590 m_defaultPenSize.Enable( false );
591 m_scaleOpt->Enable( false );
592 m_scaleOpt->SetSelection( 1 );
593 m_fineAdjustXCtrl->Enable( false );
594 m_fineAdjustYCtrl->Enable( false );
596 m_plotPSNegativeOpt->Enable( true );
597 m_forcePSA4OutputOpt->Enable( false );
598 m_forcePSA4OutputOpt->SetValue( false );
599
601 {
604 }
605 else
606 {
609 }
610
615 break;
616
618 m_drillShapeOpt->Enable( true );
619 m_plotModeOpt->Enable( true );
620 m_plotMirrorOpt->Enable( true );
621 m_useAuxOriginCheckBox->Enable( false );
622 m_useAuxOriginCheckBox->SetValue( false );
623 m_defaultPenSize.Enable( false );
624 m_scaleOpt->Enable( true );
625 m_fineAdjustXCtrl->Enable( true );
626 m_fineAdjustYCtrl->Enable( true );
628 m_plotPSNegativeOpt->Enable( true );
629 m_forcePSA4OutputOpt->Enable( true );
630
637 break;
638
640 m_drillShapeOpt->Enable( false );
641 m_drillShapeOpt->SetSelection( 0 );
642 m_plotModeOpt->Enable( false );
644 m_plotMirrorOpt->Enable( false );
645 m_plotMirrorOpt->SetValue( false );
646 m_useAuxOriginCheckBox->Enable( true );
647 m_defaultPenSize.Enable( false );
648 m_scaleOpt->Enable( false );
649 m_scaleOpt->SetSelection( 1 );
650 m_fineAdjustXCtrl->Enable( false );
651 m_fineAdjustYCtrl->Enable( false );
653 m_plotPSNegativeOpt->Enable( false );
654 m_plotPSNegativeOpt->SetValue( false );
655 m_forcePSA4OutputOpt->Enable( false );
656 m_forcePSA4OutputOpt->SetValue( false );
657
664 break;
665
667 m_drillShapeOpt->Enable( true );
668 m_plotModeOpt->Enable( true );
669 m_plotMirrorOpt->Enable( true );
670 m_useAuxOriginCheckBox->Enable( false );
671 m_useAuxOriginCheckBox->SetValue( false );
672 m_defaultPenSize.Enable( true );
673 m_scaleOpt->Enable( true );
674 m_fineAdjustXCtrl->Enable( false );
675 m_fineAdjustYCtrl->Enable( false );
677 m_plotPSNegativeOpt->SetValue( false );
678 m_plotPSNegativeOpt->Enable( false );
679 m_forcePSA4OutputOpt->Enable( true );
680
687 break;
688
689 case PLOT_FORMAT::DXF:
690 m_drillShapeOpt->Enable( true );
691 m_plotModeOpt->Enable( false );
693 m_plotMirrorOpt->Enable( false );
694 m_plotMirrorOpt->SetValue( false );
695 m_useAuxOriginCheckBox->Enable( true );
696 m_defaultPenSize.Enable( false );
697 m_scaleOpt->Enable( false );
698 m_scaleOpt->SetSelection( 1 );
699 m_fineAdjustXCtrl->Enable( false );
700 m_fineAdjustYCtrl->Enable( false );
702 m_plotPSNegativeOpt->Enable( false );
703 m_plotPSNegativeOpt->SetValue( false );
704 m_forcePSA4OutputOpt->Enable( false );
705 m_forcePSA4OutputOpt->SetValue( false );
706
713
714 OnChangeDXFPlotMode( event );
715 break;
716
718 break;
719 }
720
721 /* Update the interlock between scale and frame reference
722 * (scaling would mess up the frame border...) */
723 OnSetScaleOpt( event );
724
725 Layout();
726 m_MainSizer->SetSizeHints( this );
727}
wxStaticBoxSizer * m_PDFOptionsSizer
wxStaticBoxSizer * m_HPGLOptionsSizer
wxStaticBoxSizer * m_PSOptionsSizer
wxStaticBoxSizer * m_svgOptionsSizer
wxStaticBoxSizer * m_SizerDXF_options
wxStaticBoxSizer * m_GerberOptionsSizer
wxBoxSizer * m_MainSizer
void OnChangeDXFPlotMode(wxCommandEvent &event) override
void Enable(bool aEnable)
Enable/disable the label, widget and units label.

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

Referenced by init_Dialog().

◆ setPlotModeChoiceSelection()

void DIALOG_PLOT::setPlotModeChoiceSelection ( OUTLINE_MODE  aPlotMode)
inlineprivate

Definition at line 69 of file dialog_plot.h.

70 {
71 m_plotModeOpt->SetSelection( aPlotMode == SKETCH ? 1 : 0 );
72 }

References DIALOG_PLOT_BASE::m_plotModeOpt, and SKETCH.

Referenced by init_Dialog(), and SetPlotFormat().

◆ SetPosition()

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

Force the position of the dialog to a new position.

Parameters
aNewPositionis the new forced position

Definition at line 196 of file dialog_shim.cpp.

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

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

Referenced by PCB_BASE_FRAME::SelectOneLayer().

◆ setSizeInDU()

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

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

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

Definition at line 168 of file dialog_shim.cpp.

169{
170 wxSize sz( x, y );
171 SetSize( ConvertDialogToPixels( sz ) );
172}

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

◆ SetupStandardButtons()

void DIALOG_SHIM::SetupStandardButtons ( std::map< int, wxString >  aLabels = {})
inherited

Definition at line 708 of file dialog_shim.cpp.

709{
710 recursiveDescent( GetSizer(), aLabels );
711}
static void recursiveDescent(wxSizer *aSizer, std::map< int, wxString > &aLabels)

References recursiveDescent().

Referenced by CONVERT_SETTINGS_DIALOG::CONVERT_SETTINGS_DIALOG(), DIALOG_ANNOTATE::DIALOG_ANNOTATE(), DIALOG_ASSIGN_NETCLASS::DIALOG_ASSIGN_NETCLASS(), DIALOG_BOM::DIALOG_BOM(), DIALOG_CHANGE_SYMBOLS::DIALOG_CHANGE_SYMBOLS(), DIALOG_CHOOSE_FOOTPRINT::DIALOG_CHOOSE_FOOTPRINT(), DIALOG_CHOOSE_SYMBOL::DIALOG_CHOOSE_SYMBOL(), DIALOG_CLEANUP_GRAPHICS::DIALOG_CLEANUP_GRAPHICS(), DIALOG_COLOR_PICKER::DIALOG_COLOR_PICKER(), DIALOG_CONFIG_EQUFILES::DIALOG_CONFIG_EQUFILES(), DIALOG_CONFIGURE_PATHS::DIALOG_CONFIGURE_PATHS(), DIALOG_COPPER_ZONE::DIALOG_COPPER_ZONE(), DIALOG_CREATE_ARRAY::DIALOG_CREATE_ARRAY(), DIALOG_DIELECTRIC_MATERIAL::DIALOG_DIELECTRIC_MATERIAL(), DIALOG_DIMENSION_PROPERTIES::DIALOG_DIMENSION_PROPERTIES(), DIALOG_DRC::DIALOG_DRC(), DIALOG_ERC::DIALOG_ERC(), DIALOG_EXCHANGE_FOOTPRINTS::DIALOG_EXCHANGE_FOOTPRINTS(), DIALOG_EXPORT_3DFILE::DIALOG_EXPORT_3DFILE(), DIALOG_EXPORT_IDF3::DIALOG_EXPORT_IDF3(), DIALOG_EXPORT_NETLIST::DIALOG_EXPORT_NETLIST(), DIALOG_EXPORT_SVG::DIALOG_EXPORT_SVG(), DIALOG_FILTER_SELECTION::DIALOG_FILTER_SELECTION(), DIALOG_FOOTPRINT_CHECKER::DIALOG_FOOTPRINT_CHECKER(), DIALOG_FOOTPRINT_PROPERTIES::DIALOG_FOOTPRINT_PROPERTIES(), DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR(), DIALOG_FOOTPRINT_WIZARD_LIST::DIALOG_FOOTPRINT_WIZARD_LIST(), DIALOG_FP_PLUGIN_OPTIONS::DIALOG_FP_PLUGIN_OPTIONS(), DIALOG_GEN_FOOTPRINT_POSITION::DIALOG_GEN_FOOTPRINT_POSITION(), DIALOG_GENDRILL::DIALOG_GENDRILL(), DIALOG_GET_FOOTPRINT_BY_NAME::DIALOG_GET_FOOTPRINT_BY_NAME(), DIALOG_GLOBAL_DELETION::DIALOG_GLOBAL_DELETION(), DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS(), DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS(), DIALOG_GLOBAL_LIB_TABLE_CONFIG::DIALOG_GLOBAL_LIB_TABLE_CONFIG(), DIALOG_GRAPHIC_ITEM_PROPERTIES::DIALOG_GRAPHIC_ITEM_PROPERTIES(), DIALOG_GRID_SETTINGS::DIALOG_GRID_SETTINGS(), DIALOG_GROUP_PROPERTIES::DIALOG_GROUP_PROPERTIES(), DIALOG_IBIS_PARSER_REPORTER::DIALOG_IBIS_PARSER_REPORTER(), DIALOG_IMAGE_PROPERTIES::DIALOG_IMAGE_PROPERTIES(), DIALOG_IMPORT_GFX::DIALOG_IMPORT_GFX(), DIALOG_IMPORT_NETLIST::DIALOG_IMPORT_NETLIST(), DIALOG_IMPORT_SETTINGS::DIALOG_IMPORT_SETTINGS(), DIALOG_IMPORTED_LAYERS::DIALOG_IMPORTED_LAYERS(), DIALOG_JUNCTION_PROPS::DIALOG_JUNCTION_PROPS(), DIALOG_LABEL_PROPERTIES::DIALOG_LABEL_PROPERTIES(), DIALOG_LIB_EDIT_PIN_TABLE::DIALOG_LIB_EDIT_PIN_TABLE(), DIALOG_LIB_NEW_SYMBOL::DIALOG_LIB_NEW_SYMBOL(), DIALOG_LIB_SHAPE_PROPERTIES::DIALOG_LIB_SHAPE_PROPERTIES(), DIALOG_LIB_SYMBOL_PROPERTIES::DIALOG_LIB_SYMBOL_PROPERTIES(), DIALOG_LIB_TEXT_PROPERTIES::DIALOG_LIB_TEXT_PROPERTIES(), DIALOG_LIB_TEXTBOX_PROPERTIES::DIALOG_LIB_TEXTBOX_PROPERTIES(), DIALOG_LINE_PROPERTIES::DIALOG_LINE_PROPERTIES(), DIALOG_LOCKED_ITEMS_QUERY::DIALOG_LOCKED_ITEMS_QUERY(), DIALOG_MIGRATE_SETTINGS::DIALOG_MIGRATE_SETTINGS(), DIALOG_MOVE_EXACT::DIALOG_MOVE_EXACT(), DIALOG_NET_INSPECTOR::DIALOG_NET_INSPECTOR(), DIALOG_NON_COPPER_ZONES_EDITOR::DIALOG_NON_COPPER_ZONES_EDITOR(), DIALOG_PAD_PRIMITIVE_POLY_PROPS::DIALOG_PAD_PRIMITIVE_POLY_PROPS(), DIALOG_PAD_PRIMITIVES_PROPERTIES::DIALOG_PAD_PRIMITIVES_PROPERTIES(), DIALOG_PAD_PRIMITIVES_TRANSFORM::DIALOG_PAD_PRIMITIVES_TRANSFORM(), DIALOG_PAD_PROPERTIES::DIALOG_PAD_PROPERTIES(), DIALOG_PAGES_SETTINGS::DIALOG_PAGES_SETTINGS(), DIALOG_PCM::DIALOG_PCM(), DIALOG_PIN_PROPERTIES::DIALOG_PIN_PROPERTIES(), DIALOG_PLOT(), DIALOG_PLOT_SCHEMATIC::DIALOG_PLOT_SCHEMATIC(), DIALOG_PNS_DIFF_PAIR_DIMENSIONS::DIALOG_PNS_DIFF_PAIR_DIMENSIONS(), DIALOG_PNS_LENGTH_TUNING_SETTINGS::DIALOG_PNS_LENGTH_TUNING_SETTINGS(), DIALOG_PNS_SETTINGS::DIALOG_PNS_SETTINGS(), DIALOG_POSITION_RELATIVE::DIALOG_POSITION_RELATIVE(), DIALOG_PRINT_GENERIC::DIALOG_PRINT_GENERIC(), DIALOG_PRINT_USING_PRINTER::DIALOG_PRINT_USING_PRINTER(), DIALOG_PUSH_PAD_PROPERTIES::DIALOG_PUSH_PAD_PROPERTIES(), DIALOG_REGULATOR_FORM::DIALOG_REGULATOR_FORM(), DIALOG_RESCUE_EACH::DIALOG_RESCUE_EACH(), DIALOG_RULE_AREA_PROPERTIES::DIALOG_RULE_AREA_PROPERTIES(), DIALOG_SCH_IMPORT_SETTINGS::DIALOG_SCH_IMPORT_SETTINGS(), DIALOG_SHAPE_PROPERTIES::DIALOG_SHAPE_PROPERTIES(), DIALOG_SHEET_PIN_PROPERTIES::DIALOG_SHEET_PIN_PROPERTIES(), DIALOG_SHEET_PROPERTIES::DIALOG_SHEET_PROPERTIES(), DIALOG_SIM_COMMAND::DIALOG_SIM_COMMAND(), DIALOG_SWAP_LAYERS::DIALOG_SWAP_LAYERS(), DIALOG_SYMBOL_FIELDS_TABLE::DIALOG_SYMBOL_FIELDS_TABLE(), DIALOG_SYMBOL_PROPERTIES::DIALOG_SYMBOL_PROPERTIES(), DIALOG_TARGET_PROPERTIES::DIALOG_TARGET_PROPERTIES(), DIALOG_TEXT_PROPERTIES::DIALOG_TEXT_PROPERTIES(), DIALOG_TEXTBOX_PROPERTIES::DIALOG_TEXTBOX_PROPERTIES(), DIALOG_TRACK_VIA_PROPERTIES::DIALOG_TRACK_VIA_PROPERTIES(), DIALOG_TRACK_VIA_SIZE::DIALOG_TRACK_VIA_SIZE(), DIALOG_UNUSED_PAD_LAYERS::DIALOG_UNUSED_PAD_LAYERS(), DIALOG_UPDATE_FROM_PCB::DIALOG_UPDATE_FROM_PCB(), DIALOG_UPDATE_PCB::DIALOG_UPDATE_PCB(), DIALOG_UPDATE_SYMBOL_FIELDS::DIALOG_UPDATE_SYMBOL_FIELDS(), DIALOG_WIRE_BUS_PROPERTIES::DIALOG_WIRE_BUS_PROPERTIES(), EDA_LIST_DIALOG::EDA_LIST_DIALOG(), EDA_REORDERABLE_LIST_DIALOG::EDA_REORDERABLE_LIST_DIALOG(), DIALOG_CONSTRAINTS_REPORTER::FinishInitialization(), HTML_MESSAGE_BOX::HTML_MESSAGE_BOX(), DIALOG_FIELD_PROPERTIES::init(), DIALOG_EDIT_LIBRARY_TABLES::InstallPanel(), NETLIST_DIALOG_ADD_GENERATOR::NETLIST_DIALOG_ADD_GENERATOR(), PAGED_DIALOG::PAGED_DIALOG(), DIALOG_CLEANUP_TRACKS_AND_VIAS::setupOKButtonLabel(), WX_TEXT_ENTRY_DIALOG::WX_TEXT_ENTRY_DIALOG(), and WX_UNIT_ENTRY_DIALOG::WX_UNIT_ENTRY_DIALOG().

◆ Show()

bool DIALOG_SHIM::Show ( bool  show)
overrideinherited

Definition at line 225 of file dialog_shim.cpp.

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

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

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

◆ ShowQuasiModal()

int DIALOG_SHIM::ShowQuasiModal ( )
inherited

Definition at line 436 of file dialog_shim.cpp.

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

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

Referenced by SCH_EDIT_TOOL::ChangeSymbols(), S3D::Configure3DPaths(), MICROWAVE_TOOL::createFootprint(), PCB::IFACE::CreateKiWindow(), MICROWAVE_TOOL::createMicrowaveInductor(), SCH_DRAWING_TOOLS::createNewText(), SYMBOL_EDITOR_DRAWING_TOOLS::DrawShape(), SYMBOL_EDITOR_EDIT_TOOL::editFieldProperties(), SCH_EDIT_TOOL::editFieldText(), SCH_EDITOR_CONTROL::EditSymbolFields(), SYMBOL_EDITOR_EDIT_TOOL::editSymbolProperties(), GLOBAL_EDIT_TOOL::EditTracksAndVias(), GLOBAL_EDIT_TOOL::ExchangeFootprints(), InvokeCopperZonesEditor(), InvokeDialogCreateBOM(), InvokeDialogEditSymbolsLibId(), InvokeDialogRescueEach(), InvokeNonCopperZonesEditor(), FOOTPRINT_EDIT_FRAME::OnEditItemRequest(), PCB_EDIT_FRAME::OnEditItemRequest(), SYMBOL_VIEWER_FRAME::OnSelectSymbol(), SCH_EDIT_FRAME::OpenProjectFiles(), SCH_EDIT_TOOL::Properties(), EDIT_TOOL::Properties(), SCH_EDITOR_CONTROL::RemapSymbols(), S3D::Select3DModel(), PCB_BASE_FRAME::SelectFootprintFromLibTree(), PCB_EDIT_FRAME::ShowBoardSetupDialog(), PCB_EDIT_FRAME::ShowExchangeFootprintsDialog(), PCB_BASE_EDIT_FRAME::ShowGraphicItemPropertiesDialog(), PCB_BASE_FRAME::ShowPadPropertiesDialog(), SCH_EDIT_FRAME::ShowSchematicSetupDialog(), PCB_BASE_EDIT_FRAME::ShowTextBoxPropertiesDialog(), PCB_BASE_EDIT_FRAME::ShowTextPropertiesDialog(), and PCB_EDIT_FRAME::ToPlotter().

◆ vertPixelsFromDU()

int DIALOG_SHIM::vertPixelsFromDU ( int  y) const
protectedinherited

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

See SetSizeInDU or wxDialog documentation for more information.

Definition at line 182 of file dialog_shim.cpp.

183{
184 wxSize sz( 0, y );
185 return ConvertDialogToPixels( sz ).y;
186}

Referenced by DIALOG_CHOOSE_SYMBOL::DIALOG_CHOOSE_SYMBOL().

Member Data Documentation

◆ bmiddleSizer

wxBoxSizer* DIALOG_PLOT_BASE::bmiddleSizer
protectedinherited

Definition at line 70 of file dialog_plot_base.h.

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

◆ coordFormatLabel

wxStaticText* DIALOG_PLOT_BASE::coordFormatLabel
protectedinherited

Definition at line 99 of file dialog_plot_base.h.

Referenced by DIALOG_PLOT_BASE::DIALOG_PLOT_BASE().

◆ drillMarksLabel

wxStaticText* DIALOG_PLOT_BASE::drillMarksLabel
protectedinherited

Definition at line 81 of file dialog_plot_base.h.

Referenced by DIALOG_PLOT_BASE::DIALOG_PLOT_BASE().

◆ DXF_exportUnitsLabel

wxStaticText* DIALOG_PLOT_BASE::DXF_exportUnitsLabel
protectedinherited

Definition at line 120 of file dialog_plot_base.h.

Referenced by DIALOG_PLOT_BASE::DIALOG_PLOT_BASE().

◆ m_bitmapAlert

wxStaticBitmap* DIALOG_PLOT_BASE::m_bitmapAlert
protectedinherited

Definition at line 91 of file dialog_plot_base.h.

Referenced by DIALOG_PLOT_BASE::DIALOG_PLOT_BASE().

◆ m_boardSetup

wxHyperlinkCtrl* DIALOG_PLOT_BASE::m_boardSetup
protectedinherited

◆ m_bpMoveDown

wxBitmapButton* DIALOG_PLOT::m_bpMoveDown
private

Definition at line 96 of file dialog_plot.h.

Referenced by DIALOG_PLOT(), and ~DIALOG_PLOT().

◆ m_bpMoveUp

wxBitmapButton* DIALOG_PLOT::m_bpMoveUp
private

Definition at line 95 of file dialog_plot.h.

Referenced by DIALOG_PLOT(), and ~DIALOG_PLOT().

◆ m_browseButton

STD_BITMAP_BUTTON* DIALOG_PLOT_BASE::m_browseButton
protectedinherited

◆ m_buttonDRC

wxButton* DIALOG_PLOT_BASE::m_buttonDRC
protectedinherited

◆ m_coordFormatCtrl

wxChoice* DIALOG_PLOT_BASE::m_coordFormatCtrl
protectedinherited

◆ m_defaultPenSize

UNIT_BINDER DIALOG_PLOT::m_defaultPenSize
private

Definition at line 87 of file dialog_plot.h.

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

◆ m_disableApertMacros

wxCheckBox* DIALOG_PLOT_BASE::m_disableApertMacros
protectedinherited

◆ m_DRCExclusionsWarning

wxStaticText* DIALOG_PLOT_BASE::m_DRCExclusionsWarning
protectedinherited

◆ m_DRCWarningTemplate

wxString DIALOG_PLOT::m_DRCWarningTemplate
private

Definition at line 90 of file dialog_plot.h.

Referenced by DIALOG_PLOT(), and reInitDialog().

◆ m_drillShapeOpt

wxChoice* DIALOG_PLOT_BASE::m_drillShapeOpt
protectedinherited

◆ m_DXF_plotModeOpt

wxCheckBox* DIALOG_PLOT_BASE::m_DXF_plotModeOpt
protectedinherited

◆ m_DXF_plotTextStrokeFontOpt

wxCheckBox* DIALOG_PLOT_BASE::m_DXF_plotTextStrokeFontOpt
protectedinherited

◆ m_DXF_plotUnits

wxChoice* DIALOG_PLOT_BASE::m_DXF_plotUnits
protectedinherited

◆ m_fineAdjustXCtrl

wxTextCtrl* DIALOG_PLOT_BASE::m_fineAdjustXCtrl
protectedinherited

◆ m_fineAdjustXLabel

wxStaticText* DIALOG_PLOT_BASE::m_fineAdjustXLabel
protectedinherited

Definition at line 109 of file dialog_plot_base.h.

Referenced by DIALOG_PLOT_BASE::DIALOG_PLOT_BASE().

◆ m_fineAdjustYCtrl

wxTextCtrl* DIALOG_PLOT_BASE::m_fineAdjustYCtrl
protectedinherited

◆ m_fineAdjustYLabel

wxStaticText* DIALOG_PLOT_BASE::m_fineAdjustYLabel
protectedinherited

Definition at line 111 of file dialog_plot_base.h.

Referenced by DIALOG_PLOT_BASE::DIALOG_PLOT_BASE().

◆ m_firstPaintEvent

bool DIALOG_SHIM::m_firstPaintEvent
protectedinherited

Definition at line 212 of file dialog_shim.h.

Referenced by DIALOG_SHIM::OnPaint().

◆ m_forcePSA4OutputOpt

wxCheckBox* DIALOG_PLOT_BASE::m_forcePSA4OutputOpt
protectedinherited

◆ m_generateGerberJobFile

wxCheckBox* DIALOG_PLOT_BASE::m_generateGerberJobFile
protectedinherited

◆ m_GerberOptionsSizer

wxStaticBoxSizer* DIALOG_PLOT_BASE::m_GerberOptionsSizer
protectedinherited

Definition at line 95 of file dialog_plot_base.h.

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

◆ m_hash_key

◆ m_HPGLOptionsSizer

wxStaticBoxSizer* DIALOG_PLOT_BASE::m_HPGLOptionsSizer
protectedinherited

Definition at line 104 of file dialog_plot_base.h.

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

◆ m_hpglPenCtrl

wxTextCtrl* DIALOG_PLOT_BASE::m_hpglPenCtrl
protectedinherited

Definition at line 106 of file dialog_plot_base.h.

Referenced by DIALOG_PLOT_BASE::DIALOG_PLOT_BASE().

◆ m_hpglPenLabel

wxStaticText* DIALOG_PLOT_BASE::m_hpglPenLabel
protectedinherited

Definition at line 105 of file dialog_plot_base.h.

Referenced by DIALOG_PLOT_BASE::DIALOG_PLOT_BASE().

◆ m_hpglPenUnits

wxStaticText* DIALOG_PLOT_BASE::m_hpglPenUnits
protectedinherited

Definition at line 107 of file dialog_plot_base.h.

Referenced by DIALOG_PLOT_BASE::DIALOG_PLOT_BASE().

◆ m_initialFocusTarget

wxWindow* DIALOG_SHIM::m_initialFocusTarget
protectedinherited

Definition at line 213 of file dialog_shim.h.

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

◆ m_initialSize

wxSize DIALOG_SHIM::m_initialSize
protectedinherited

Definition at line 225 of file dialog_shim.h.

Referenced by DIALOG_SHIM::Show().

◆ m_kiway

KIWAY* KIWAY_HOLDER::m_kiway
privateinherited

◆ m_lastLayerSet

LSET DIALOG_PLOT::m_lastLayerSet
staticprivate

The plot layer set that last time the dialog was opened.

Definition at line 99 of file dialog_plot.h.

◆ m_lastPlotOnAllLayersOrder

LSEQ DIALOG_PLOT::m_lastPlotOnAllLayersOrder
staticprivate

The plot on all layers ordering the last time the dialog was opened.

Definition at line 102 of file dialog_plot.h.

◆ m_layerCheckListBox

wxCheckListBox* DIALOG_PLOT_BASE::m_layerCheckListBox
protectedinherited

◆ m_layerList

LSEQ DIALOG_PLOT::m_layerList
private

Definition at line 75 of file dialog_plot.h.

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

◆ m_LayersSizer

wxStaticBoxSizer* DIALOG_PLOT_BASE::m_LayersSizer
protectedinherited

Definition at line 71 of file dialog_plot_base.h.

Referenced by DIALOG_PLOT_BASE::DIALOG_PLOT_BASE().

◆ m_MainSizer

wxBoxSizer* DIALOG_PLOT_BASE::m_MainSizer
protectedinherited

Definition at line 64 of file dialog_plot_base.h.

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

◆ m_messagesPanel

WX_HTML_REPORT_PANEL* DIALOG_PLOT_BASE::m_messagesPanel
protectedinherited

◆ m_outputDirectoryName

wxTextCtrl* DIALOG_PLOT_BASE::m_outputDirectoryName
protectedinherited

◆ m_parent

◆ m_parentFrame

◆ m_PDFColorChoice

wxChoice* DIALOG_PLOT_BASE::m_PDFColorChoice
protectedinherited

◆ m_PDFOptionsSizer

wxStaticBoxSizer* DIALOG_PLOT_BASE::m_PDFOptionsSizer
protectedinherited

Definition at line 127 of file dialog_plot_base.h.

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

◆ m_plotAllLayersList

wxRearrangeList* DIALOG_PLOT::m_plotAllLayersList
private

◆ m_plotFormatOpt

wxChoice* DIALOG_PLOT_BASE::m_plotFormatOpt
protectedinherited

◆ m_plotInvisibleText

wxCheckBox* DIALOG_PLOT_BASE::m_plotInvisibleText
protectedinherited

◆ m_plotMirrorOpt

wxCheckBox* DIALOG_PLOT_BASE::m_plotMirrorOpt
protectedinherited

◆ m_plotModeOpt

wxChoice* DIALOG_PLOT_BASE::m_plotModeOpt
protectedinherited

◆ m_plotModuleRefOpt

wxCheckBox* DIALOG_PLOT_BASE::m_plotModuleRefOpt
protectedinherited

◆ m_plotModuleValueOpt

wxCheckBox* DIALOG_PLOT_BASE::m_plotModuleValueOpt
protectedinherited

◆ m_plotNoViaOnMaskOpt

wxCheckBox* DIALOG_PLOT_BASE::m_plotNoViaOnMaskOpt
protectedinherited

◆ m_PlotOptionsSizer

wxBoxSizer* DIALOG_PLOT_BASE::m_PlotOptionsSizer
protectedinherited

◆ m_plotOpts

PCB_PLOT_PARAMS DIALOG_PLOT::m_plotOpts
private

◆ m_plotPSNegativeOpt

wxCheckBox* DIALOG_PLOT_BASE::m_plotPSNegativeOpt
protectedinherited

◆ m_plotSheetRef

wxCheckBox* DIALOG_PLOT_BASE::m_plotSheetRef
protectedinherited

◆ m_popMenu

wxMenu* DIALOG_PLOT_BASE::m_popMenu
protectedinherited

◆ m_PSOptionsSizer

wxStaticBoxSizer* DIALOG_PLOT_BASE::m_PSOptionsSizer
protectedinherited

Definition at line 108 of file dialog_plot_base.h.

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

◆ m_PSWidthAdjust

int DIALOG_PLOT::m_PSWidthAdjust
private

Definition at line 80 of file dialog_plot.h.

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

◆ m_qmodal_loop

WX_EVENT_LOOP* DIALOG_SHIM::m_qmodal_loop
protectedinherited

Definition at line 215 of file dialog_shim.h.

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

◆ m_qmodal_parent_disabler

WDO_ENABLE_DISABLE* DIALOG_SHIM::m_qmodal_parent_disabler
protectedinherited

◆ m_qmodal_showing

bool DIALOG_SHIM::m_qmodal_showing
protectedinherited

Definition at line 217 of file dialog_shim.h.

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

◆ m_scaleOpt

wxChoice* DIALOG_PLOT_BASE::m_scaleOpt
protectedinherited

◆ m_sdbSizer1

wxStdDialogButtonSizer* DIALOG_PLOT_BASE::m_sdbSizer1
protectedinherited

Definition at line 134 of file dialog_plot_base.h.

Referenced by DIALOG_PLOT_BASE::DIALOG_PLOT_BASE().

◆ m_sdbSizer1Apply

wxButton* DIALOG_PLOT_BASE::m_sdbSizer1Apply
protectedinherited

◆ m_sdbSizer1Cancel

wxButton* DIALOG_PLOT_BASE::m_sdbSizer1Cancel
protectedinherited

Definition at line 137 of file dialog_plot_base.h.

Referenced by DIALOG_PLOT_BASE::DIALOG_PLOT_BASE().

◆ m_sdbSizer1OK

wxButton* DIALOG_PLOT_BASE::m_sdbSizer1OK
protectedinherited

◆ m_sizerButtons

wxBoxSizer* DIALOG_PLOT_BASE::m_sizerButtons
protectedinherited

Definition at line 131 of file dialog_plot_base.h.

Referenced by DIALOG_PLOT_BASE::DIALOG_PLOT_BASE().

◆ m_SizerDXF_options

wxStaticBoxSizer* DIALOG_PLOT_BASE::m_SizerDXF_options
protectedinherited

Definition at line 117 of file dialog_plot_base.h.

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

◆ m_SizerSolderMaskAlert

wxBoxSizer* DIALOG_PLOT_BASE::m_SizerSolderMaskAlert
protectedinherited

◆ m_sketchPadsOnFabLayers

wxCheckBox* DIALOG_PLOT_BASE::m_sketchPadsOnFabLayers
protectedinherited

◆ m_staticText18

wxStaticText* DIALOG_PLOT_BASE::m_staticText18
protectedinherited

Definition at line 126 of file dialog_plot_base.h.

Referenced by DIALOG_PLOT_BASE::DIALOG_PLOT_BASE().

◆ m_staticText19

wxStaticText* DIALOG_PLOT_BASE::m_staticText19
protectedinherited

Definition at line 129 of file dialog_plot_base.h.

Referenced by DIALOG_PLOT_BASE::DIALOG_PLOT_BASE().

◆ m_staticTextAlert

wxStaticText* DIALOG_PLOT_BASE::m_staticTextAlert
protectedinherited

Definition at line 92 of file dialog_plot_base.h.

Referenced by DIALOG_PLOT_BASE::DIALOG_PLOT_BASE().

◆ m_staticTextAlert1

wxStaticText* DIALOG_PLOT_BASE::m_staticTextAlert1
protectedinherited

Definition at line 93 of file dialog_plot_base.h.

Referenced by DIALOG_PLOT_BASE::DIALOG_PLOT_BASE().

◆ m_staticTextDir

wxStaticText* DIALOG_PLOT_BASE::m_staticTextDir
protectedinherited

Definition at line 67 of file dialog_plot_base.h.

Referenced by DIALOG_PLOT_BASE::DIALOG_PLOT_BASE().

◆ m_staticTextPlotFmt

wxStaticText* DIALOG_PLOT_BASE::m_staticTextPlotFmt
protectedinherited

Definition at line 65 of file dialog_plot_base.h.

Referenced by DIALOG_PLOT_BASE::DIALOG_PLOT_BASE().

◆ m_subtractMaskFromSilk

wxCheckBox* DIALOG_PLOT_BASE::m_subtractMaskFromSilk
protectedinherited

◆ m_SVGColorChoice

wxChoice* DIALOG_PLOT_BASE::m_SVGColorChoice
protectedinherited

◆ m_svgOptionsSizer

wxStaticBoxSizer* DIALOG_PLOT_BASE::m_svgOptionsSizer
protectedinherited

Definition at line 122 of file dialog_plot_base.h.

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

◆ m_svgPrecsision

wxSpinCtrl* DIALOG_PLOT_BASE::m_svgPrecsision
protectedinherited

◆ m_tabOrder

◆ m_trackWidthCorrection

UNIT_BINDER DIALOG_PLOT::m_trackWidthCorrection
private

Definition at line 88 of file dialog_plot.h.

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

◆ m_type

HOLDER_TYPE KIWAY_HOLDER::m_type
privateinherited

Definition at line 85 of file kiway_holder.h.

Referenced by KIWAY_HOLDER::GetType(), and SIM_PLOT_FRAME::onSimFinished().

◆ m_units

◆ m_useAuxOriginCheckBox

wxCheckBox* DIALOG_PLOT_BASE::m_useAuxOriginCheckBox
protectedinherited

◆ m_useCalculatedSize

bool DIALOG_SHIM::m_useCalculatedSize
protectedinherited

◆ m_useGerberExtensions

wxCheckBox* DIALOG_PLOT_BASE::m_useGerberExtensions
protectedinherited

◆ m_useGerberNetAttributes

wxCheckBox* DIALOG_PLOT_BASE::m_useGerberNetAttributes
protectedinherited

◆ m_useGerberX2Format

wxCheckBox* DIALOG_PLOT_BASE::m_useGerberX2Format
protectedinherited

◆ m_widthAdjustCtrl

wxTextCtrl* DIALOG_PLOT_BASE::m_widthAdjustCtrl
protectedinherited

Definition at line 114 of file dialog_plot_base.h.

Referenced by DIALOG_PLOT_BASE::DIALOG_PLOT_BASE().

◆ m_widthAdjustLabel

wxStaticText* DIALOG_PLOT_BASE::m_widthAdjustLabel
protectedinherited

Definition at line 113 of file dialog_plot_base.h.

Referenced by DIALOG_PLOT_BASE::DIALOG_PLOT_BASE().

◆ m_widthAdjustMaxValue

int DIALOG_PLOT::m_widthAdjustMaxValue
private

Definition at line 85 of file dialog_plot.h.

Referenced by applyPlotSettings(), and init_Dialog().

◆ m_widthAdjustMinValue

int DIALOG_PLOT::m_widthAdjustMinValue
private

Definition at line 84 of file dialog_plot.h.

Referenced by applyPlotSettings(), and init_Dialog().

◆ m_widthAdjustUnits

wxStaticText* DIALOG_PLOT_BASE::m_widthAdjustUnits
protectedinherited

Definition at line 115 of file dialog_plot_base.h.

Referenced by DIALOG_PLOT_BASE::DIALOG_PLOT_BASE().

◆ m_XScaleAdjust

double DIALOG_PLOT::m_XScaleAdjust
private

Definition at line 76 of file dialog_plot.h.

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

◆ m_YScaleAdjust

double DIALOG_PLOT::m_YScaleAdjust
private

Definition at line 78 of file dialog_plot.h.

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

◆ m_zoneFillCheck

wxCheckBox* DIALOG_PLOT_BASE::m_zoneFillCheck
protectedinherited

◆ plotModeLabel

wxStaticText* DIALOG_PLOT_BASE::plotModeLabel
protectedinherited

Definition at line 85 of file dialog_plot_base.h.

Referenced by DIALOG_PLOT_BASE::DIALOG_PLOT_BASE().

◆ scalingLabel

wxStaticText* DIALOG_PLOT_BASE::scalingLabel
protectedinherited

Definition at line 83 of file dialog_plot_base.h.

Referenced by DIALOG_PLOT_BASE::DIALOG_PLOT_BASE().

◆ svgPrecisionLabel

wxStaticText* DIALOG_PLOT_BASE::svgPrecisionLabel
protectedinherited

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