KiCad PCB EDA Suite
DIALOG_PAD_PROPERTIES Class Reference

class DIALOG_PAD_PROPERTIES, derived from DIALOG_PAD_PROPERTIES_BASE, created by wxFormBuilder More...

#include <dialog_pad_properties.h>

Inheritance diagram for DIALOG_PAD_PROPERTIES:
DIALOG_PAD_PROPERTIES_BASE DIALOG_SHIM KIWAY_HOLDER

Public Member Functions

 DIALOG_PAD_PROPERTIES (PCB_BASE_FRAME *aParent, D_PAD *aPad)
 
void OnInitDialog (wxInitDialogEvent &event) override
 
 ~DIALOG_PAD_PROPERTIES ()
 
int ShowQuasiModal ()
 
void EndQuasiModal (int retCode)
 
bool IsQuasiModal ()
 
bool Show (bool show) override
 
bool Enable (bool enable) override
 
KIWAYKiway () const
 Function Kiway returns a reference to the KIWAY that this object has an opportunity to participate in. More...
 
PROJECTPrj () const
 Function Prj returns a reference to the PROJECT "associated with" this KIWAY. More...
 
void SetKiway (wxWindow *aDest, KIWAY *aKiway)
 Function SetKiway. More...
 

Protected Types

enum  { wxID_DIALOG_EDIT_PAD = 1000, wxID_PADNUMCTRL, wxID_PADNETNAMECTRL }
 

Protected Member Functions

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 FixOSXCancelButtonIssue ()
 A ugly hack to fix an issue on OSX: when typing ctrl+c in a wxTextCtrl inside a dialog, it is closed instead of copying a text if a button with wxID_CANCEL is used in a wxStdDialogButtonSizer, when the dlg is created by wxFormBuilder: the label is &Cancel, and this accelerator key has priority to copy text standard accelerator, and the dlg is closed when trying to copy text this function do nothing on other platforms. More...
 

Protected Attributes

wxNotebook * m_notebook
 
wxPanel * m_panelGeneral
 
wxStaticText * m_PadNumText
 
wxTextCtrl * m_PadNumCtrl
 
wxStaticText * m_PadNameText
 
wxTextCtrl * m_PadNetNameCtrl
 
wxStaticText * m_staticText44
 
wxChoice * m_PadType
 
wxStaticText * m_staticText45
 
wxChoice * m_PadShape
 
wxStaticText * m_staticText4
 
wxTextCtrl * m_PadPosition_X_Ctrl
 
wxStaticText * m_PadPosX_Unit
 
wxStaticText * m_staticText41
 
wxTextCtrl * m_PadPosition_Y_Ctrl
 
wxStaticText * m_PadPosY_Unit
 
wxStaticText * m_staticText12
 
wxTextCtrl * m_ShapeSize_X_Ctrl
 
wxStaticText * m_PadShapeSizeX_Unit
 
wxStaticText * m_staticText15
 
wxTextCtrl * m_ShapeSize_Y_Ctrl
 
wxStaticText * m_PadShapeSizeY_Unit
 
wxStaticText * m_PadOrientText
 
wxChoice * m_PadOrient
 
wxStaticText * m_staticText491
 
wxTextCtrl * m_PadOrientCtrl
 
wxStaticText * m_customOrientUnits
 
wxStaticText * m_staticText17
 
wxTextCtrl * m_ShapeOffset_X_Ctrl
 
wxStaticText * m_PadShapeOffsetX_Unit
 
wxStaticText * m_staticText19
 
wxTextCtrl * m_ShapeOffset_Y_Ctrl
 
wxStaticText * m_PadShapeOffsetY_Unit
 
wxStaticText * m_staticText38
 
wxTextCtrl * m_LengthPadToDieCtrl
 
wxStaticText * m_PadLengthDie_Unit
 
wxStaticLine * m_staticline4
 
wxStaticLine * m_staticline5
 
wxStaticLine * m_staticline6
 
wxStaticText * m_staticText21
 
wxTextCtrl * m_ShapeDelta_Ctrl
 
wxStaticText * m_PadShapeDelta_Unit
 
wxStaticText * m_staticText23
 
wxChoice * m_trapDeltaDirChoice
 
wxStaticLine * m_staticline7
 
wxStaticLine * m_staticline8
 
wxStaticLine * m_staticline9
 
wxStaticText * m_staticTextCornerSizeRatio
 
wxTextCtrl * m_tcCornerSizeRatio
 
wxStaticText * m_staticTextCornerSizeRatioUnit
 
wxStaticText * m_staticTextCornerRadius
 
wxStaticText * m_staticTextCornerRadiusValue
 
wxStaticText * m_staticTextCornerSizeUnit
 
wxStaticText * m_staticText47
 
wxChoice * m_DrillShapeCtrl
 
wxStaticText * m_staticText51
 
wxStaticText * m_textPadDrillX
 
wxTextCtrl * m_PadDrill_X_Ctrl
 
wxStaticText * m_PadDrill_X_Unit
 
wxStaticText * m_textPadDrillY
 
wxTextCtrl * m_PadDrill_Y_Ctrl
 
wxStaticText * m_PadDrill_Y_Unit
 
wxStaticText * m_staticText511
 
wxChoice * m_rbCopperLayersSel
 
wxCheckBox * m_PadLayerAdhCmp
 
wxCheckBox * m_PadLayerAdhCu
 
wxCheckBox * m_PadLayerPateCmp
 
wxCheckBox * m_PadLayerPateCu
 
wxCheckBox * m_PadLayerSilkCmp
 
wxCheckBox * m_PadLayerSilkCu
 
wxCheckBox * m_PadLayerMaskCmp
 
wxCheckBox * m_PadLayerMaskCu
 
wxCheckBox * m_PadLayerDraft
 
wxCheckBox * m_PadLayerECO1
 
wxCheckBox * m_PadLayerECO2
 
wxStaticText * m_staticTitleModuleRot
 
wxStaticText * m_staticModuleRotValue
 
wxStaticText * m_staticTitleModuleSide
 
wxStaticText * m_staticModuleSideValue
 
wxPanel * m_localSettingsPanel
 
wxStaticText * m_staticTextNetClearance
 
wxTextCtrl * m_NetClearanceValueCtrl
 
wxStaticText * m_NetClearanceUnits
 
wxStaticText * m_MaskClearanceTitle
 
wxTextCtrl * m_SolderMaskMarginCtrl
 
wxStaticText * m_SolderMaskMarginUnits
 
wxStaticText * m_staticTextSolderPaste
 
wxTextCtrl * m_SolderPasteMarginCtrl
 
wxStaticText * m_SolderPasteMarginUnits
 
wxStaticText * m_staticTextRatio
 
wxTextCtrl * m_SolderPasteMarginRatioCtrl
 
wxStaticText * m_SolderPasteRatioMarginUnits
 
wxStaticText * m_staticText40
 
wxChoice * m_ZoneConnectionChoice
 
wxStaticText * m_staticText53
 
wxStaticText * m_staticText49
 
wxTextCtrl * m_ThermalWidthCtrl
 
wxStaticText * m_ThermalWidthUnits
 
wxStaticText * m_staticText52
 
wxTextCtrl * m_ThermalGapCtrl
 
wxStaticText * m_ThermalGapUnits
 
wxStaticText * m_staticTextWarning
 
wxPanel * m_panelShowPad
 
PCB_DRAW_PANEL_GALm_panelShowPadGal
 
KIGFX::GAL_DISPLAY_OPTIONS m_galOptions
 
wxStaticText * m_staticTextWarningPadFlipped
 
wxStdDialogButtonSizer * m_sdbSizer
 
wxButton * m_sdbSizerOK
 
wxButton * m_sdbSizerCancel
 
std::string m_hash_key
 
EVENT_LOOPm_qmodal_loop
 
bool m_qmodal_showing
 
WDO_ENABLE_DISABLEm_qmodal_parent_disabler
 

Private Member Functions

void initValues ()
 
bool padValuesOK ()
 test if all values are acceptable for the pad More...
 
void redraw ()
 
void updateRoundRectCornerValues ()
 
void setPadLayersList (LSET layer_mask)
 Function setPadLayersList updates the CheckBox states in pad layers list,. More...
 
bool transferDataToPad (D_PAD *aPad)
 Copy values from dialog field to aPad's members. More...
 
void OnResize (wxSizeEvent &event)
 
void OnPadShapeSelection (wxCommandEvent &event) override
 
void OnDrillShapeSelected (wxCommandEvent &event) override
 
void PadOrientEvent (wxCommandEvent &event) override
 
void PadTypeSelected (wxCommandEvent &event) override
 
void OnSetLayers (wxCommandEvent &event) override
 
void OnPaintShowPanel (wxPaintEvent &event) override
 
void onCornerSizePercentChange (wxCommandEvent &event) override
 
void OnValuesChanged (wxCommandEvent &event) override
 Called when a dimension has changed. More...
 
bool TransferDataFromWindow () override
 Updates the different parameters for the component being edited. More...
 
bool TransferDataToWindow () override
 

Private Attributes

PCB_BASE_FRAMEm_parent
 
KIGFX::ORIGIN_VIEWITEMm_axisOrigin
 
D_PADm_currentPad
 
D_PADm_dummyPad
 
D_PADm_padMaster
 
BOARDm_board
 
bool m_isFlipped
 
bool m_canUpdate
 
bool m_canEditNetName
 
wxFloatingPointValidator< double > m_OrientValidator
 
double m_OrientValue
 

Detailed Description

class DIALOG_PAD_PROPERTIES, derived from DIALOG_PAD_PROPERTIES_BASE, created by wxFormBuilder

Definition at line 55 of file dialog_pad_properties.h.

Member Enumeration Documentation

anonymous enum
protectedinherited

Constructor & Destructor Documentation

DIALOG_PAD_PROPERTIES::DIALOG_PAD_PROPERTIES ( PCB_BASE_FRAME aParent,
D_PAD aPad 
)

Definition at line 101 of file dialog_pad_properties.cpp.

References KIGFX::VIEW::Add(), PCB_GENERAL_SETTINGS::Colors(), KIGFX::ORIGIN_VIEWITEM::CROSS, DIALOG_SHIM::FinishDialogSettings(), EDA_DRAW_PANEL_GAL::GetBackend(), PCB_BASE_FRAME::GetBoard(), PCB_BASE_FRAME::GetDesignSettings(), EDA_DRAW_FRAME::GetGalCanvas(), D_PAD::GetPosition(), EDA_DRAW_PANEL_GAL::GetView(), initValues(), EDA_DRAW_FRAME::IsGalCanvasActive(), m_axisOrigin, m_board, m_canUpdate, m_currentPad, m_dummyPad, m_OrientValidator, BOARD_DESIGN_SETTINGS::m_Pad_Master, m_padMaster, DIALOG_PAD_PROPERTIES_BASE::m_PadOrientCtrl, DIALOG_PAD_PROPERTIES_BASE::m_panelShowPad, DIALOG_PAD_PROPERTIES_BASE::m_panelShowPadGal, m_parent, DIALOG_PAD_PROPERTIES_BASE::m_sdbSizerOK, OnResize(), KIGFX::ORIGIN_VIEWITEM::SetDrawAtZero(), PCB_BASE_FRAME::Settings(), EDA_DRAW_PANEL_GAL::StartDrawing(), PCB_DRAW_PANEL_GAL::SwitchBackend(), TransferDataToWindow(), and PCB_DRAW_PANEL_GAL::UseColorScheme().

101  :
102  DIALOG_PAD_PROPERTIES_BASE( aParent ),
104 {
105  m_canUpdate = false;
106  m_parent = aParent;
107  m_currentPad = aPad; // aPad can be NULL, if the dialog is called
108  // from the footprint editor to set default pad setup
109 
111 
112  m_OrientValidator.SetRange( -360.0, 360.0 );
113  m_PadOrientCtrl->SetValidator( m_OrientValidator );
114  m_OrientValidator.SetWindow( m_PadOrientCtrl );
115 
117  m_dummyPad = new D_PAD( (MODULE*) NULL );
118 
119  if( aPad )
120  *m_dummyPad = *aPad;
121  else // We are editing a "master" pad, i.e. a template to create new pads
123 
124  // Show the X and Y axis. It is usefull because pad shape can have an offset
125  // or be a complex shape.
126  m_axisOrigin = new KIGFX::ORIGIN_VIEWITEM( KIGFX::COLOR4D(0.0, 0.0, 0.8, 1.0),
128  Millimeter2iu( 0.2 ),
130  m_axisOrigin->SetDrawAtZero( true );
131 
132  if( m_parent->IsGalCanvasActive() )
133  {
134 
137  m_panelShowPadGal->Show();
138  m_panelShowPad->Hide();
142  Connect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_PAD_PROPERTIES::OnResize ) );
143  }
144  else
145  {
146  m_panelShowPad->Show();
147  m_panelShowPadGal->Hide();
148  }
149 
150  initValues();
152 
153  m_sdbSizerOK->SetDefault();
154  m_canUpdate = true;
155 
156  // Now all widgets have the size fixed, call FinishDialogSettings
158 }
GAL_TYPE GetBackend() const
Function GetBackend Returns the type of backend currently used by GAL canvas.
void FinishDialogSettings()
In all dialogs, we must call the same functions to fix minimal dlg size, the default position and per...
wxFloatingPointValidator< double > m_OrientValidator
BOARD * GetBoard() const
bool TransferDataToWindow() override
KIGFX::VIEW * GetView() const
Function GetView() Returns a pointer to the VIEW instance used in the panel.
KIGFX::ORIGIN_VIEWITEM * m_axisOrigin
VECTOR2< double > VECTOR2D
Definition: vector2d.h:589
PCB_GENERAL_SETTINGS & Settings()
const wxPoint & GetPosition() const override
Definition: class_pad.h:170
void SetDrawAtZero(bool aDrawFlag)
Function SetDrawAtZero() Set the draw at zero flag.
void OnResize(wxSizeEvent &event)
bool IsGalCanvasActive() const
Function IsGalCanvasActive is used to check which canvas (GAL-based or standard) is currently in use...
Definition: draw_frame.h:809
virtual BOARD_DESIGN_SETTINGS & GetDesignSettings() const
Function GetDesignSettings returns the BOARD_DESIGN_SETTINGS for the BOARD owned by this frame...
void StartDrawing()
Function StartDrawing() Begins drawing if it was stopped previously.
void UseColorScheme(const COLORS_DESIGN_SETTINGS *aSettings)
Function UseColorScheme Applies layer color settings.
COLORS_DESIGN_SETTINGS & Colors()
bool SwitchBackend(GAL_TYPE aGalType) override
Function SwitchBackend Switches method of rendering graphics.
DIALOG_PAD_PROPERTIES_BASE(wxWindow *parent, wxWindowID id=wxID_DIALOG_EDIT_PAD, const wxString &title=_("Pad Properties"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(785, 659), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxSUNKEN_BORDER)
D_PAD m_Pad_Master
A dummy pad to store all default parameters.
EDA_DRAW_PANEL_GAL * GetGalCanvas() const
Function GetGalCanvas returns a pointer to GAL-based canvas of given EDA draw frame.
Definition: draw_frame.h:817
void Add(VIEW_ITEM *aItem, int aDrawPriority=-1)
Function Add() Adds a VIEW_ITEM to the view.
Definition: view.cpp:311
Class COLOR4D is the color representation with 4 components: red, green, blue, alpha.
Definition: color4d.h:39
DIALOG_PAD_PROPERTIES::~DIALOG_PAD_PROPERTIES ( )
inline

Definition at line 60 of file dialog_pad_properties.h.

References m_axisOrigin, and m_dummyPad.

61  {
62  delete m_dummyPad;
63  delete m_axisOrigin;
64  }
KIGFX::ORIGIN_VIEWITEM * m_axisOrigin

Member Function Documentation

bool DIALOG_SHIM::Enable ( bool  enable)
overrideinherited

Definition at line 182 of file dialog_shim.cpp.

Referenced by DIALOG_PRINT_USING_PRINTER::InitValues().

183 {
184  // so we can do logging of this state change:
185 
186 #if defined(DEBUG)
187  const char* type_id = typeid( *this ).name();
188  printf( "wxDialog %s: %s\n", type_id, enable ? "enabled" : "disabled" );
189 #endif
190 
191  return wxDialog::Enable( enable );
192 }
void DIALOG_SHIM::EndQuasiModal ( int  retCode)
inherited

Definition at line 540 of file dialog_shim.cpp.

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

Referenced by HK_PROMPT_DIALOG::EndFlexible(), DIALOG_SHIM::OnButton(), DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::OnCancelButtonClick(), DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnCancelButtonClick(), DIALOG_EDIT_ONE_FIELD::OnCancelClick(), DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::OnCloseDialog(), DIALOG_EDIT_ONE_FIELD::OnCloseDialog(), DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnCloseDialog(), DIALOG_CHOOSE_COMPONENT::OnCloseTimer(), DIALOG_SHIM::OnCloseWindow(), DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::OnOKButtonClick(), DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnOKButtonClick(), DIALOG_EDIT_ONE_FIELD::OnOkClick(), DIALOG_EXCHANGE_MODULE::OnQuit(), DIALOG_CHOOSE_COMPONENT::OnSchViewDClick(), DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::SetInitCmp(), and DIALOG_SHIM::~DIALOG_SHIM().

541 {
542  // Hook up validator and transfer data from controls handling so quasi-modal dialogs
543  // handle validation in the same way as other dialogs.
544  if( ( retCode == wxID_OK ) && ( !Validate() || !TransferDataFromWindow() ) )
545  return;
546 
547  SetReturnCode( retCode );
548 
549  if( !IsQuasiModal() )
550  {
551  wxFAIL_MSG( wxT( "either DIALOG_SHIM::EndQuasiModal called twice or ShowQuasiModal wasn't called" ) );
552  return;
553  }
554 
555  m_qmodal_showing = false;
556 
557  if( m_qmodal_loop )
558  {
559  if( m_qmodal_loop->IsRunning() )
560  m_qmodal_loop->Exit( 0 );
561  else
562  m_qmodal_loop->ScheduleExit( 0 );
563 
564  m_qmodal_loop = NULL;
565  }
566 
569 
570  Show( false );
571 }
bool m_qmodal_showing
Definition: dialog_shim.h:132
EVENT_LOOP * m_qmodal_loop
Definition: dialog_shim.h:131
bool IsQuasiModal()
Definition: dialog_shim.h:93
bool Show(bool show) override
WDO_ENABLE_DISABLE * m_qmodal_parent_disabler
Definition: dialog_shim.h:133
void DIALOG_SHIM::FinishDialogSettings ( )
protectedinherited

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

FinishDialogSettings must be called from derived classes, when all widgets are initialized, and therefore their size fixed. If TransferDataToWindow() is used to initialize widgets, at end of TransferDataToWindow, or better at end of a wxInitDialogEvent handler

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

Definition at line 104 of file dialog_shim.cpp.

References PCAD2KICAD::Center.

Referenced by COLOR4D_PICKER_DLG::COLOR4D_PICKER_DLG(), DIALOG_BOM::DIALOG_BOM(), DIALOG_COPPER_ZONE::DIALOG_COPPER_ZONE(), DIALOG_DESIGN_RULES::DIALOG_DESIGN_RULES(), DIALOG_DIMENSION_EDITOR::DIALOG_DIMENSION_EDITOR(), DIALOG_DISPLAY_OPTIONS::DIALOG_DISPLAY_OPTIONS(), DIALOG_DRC_CONTROL::DIALOG_DRC_CONTROL(), DIALOG_EDIT_COMPONENT_IN_LIBRARY::DIALOG_EDIT_COMPONENT_IN_LIBRARY(), DIALOG_EESCHEMA_OPTIONS::DIALOG_EESCHEMA_OPTIONS(), DIALOG_ENUM_PADS::DIALOG_ENUM_PADS(), DIALOG_EXPORT_3DFILE::DIALOG_EXPORT_3DFILE(), DIALOG_EXPORT_IDF3::DIALOG_EXPORT_IDF3(), DIALOG_EXPORT_STEP::DIALOG_EXPORT_STEP(), DIALOG_FOOTPRINT_WIZARD_LIST::DIALOG_FOOTPRINT_WIZARD_LIST(), DIALOG_GLOBAL_SYM_LIB_TABLE_CONFIG::DIALOG_GLOBAL_SYM_LIB_TABLE_CONFIG(), DIALOG_KEEPOUT_AREA_PROPERTIES::DIALOG_KEEPOUT_AREA_PROPERTIES(), DIALOG_LABEL_EDITOR::DIALOG_LABEL_EDITOR(), DIALOG_LIB_EDIT_DRAW_ITEM::DIALOG_LIB_EDIT_DRAW_ITEM(), DIALOG_LIB_EDIT_TEXT::DIALOG_LIB_EDIT_TEXT(), DIALOG_LIB_NEW_COMPONENT::DIALOG_LIB_NEW_COMPONENT(), DIALOG_LIBEDIT_OPTIONS::DIALOG_LIBEDIT_OPTIONS(), DIALOG_PAD_PROPERTIES(), DIALOG_PLOT_SCHEMATIC::DIALOG_PLOT_SCHEMATIC(), DIALOG_SCH_EDIT_SHEET_PIN::DIALOG_SCH_EDIT_SHEET_PIN(), DIALOG_SCH_SHEET_PROPS::DIALOG_SCH_SHEET_PROPS(), DIALOG_SELECT_PRETTY_LIB::DIALOG_SELECT_PRETTY_LIB(), DIALOG_TRACK_VIA_SIZE::DIALOG_TRACK_VIA_SIZE(), DIALOG_EDIT_ONE_FIELD::init(), NETLIST_DIALOG::NETLIST_DIALOG(), DIALOG_LIB_EDIT_PIN::OnInitDialog(), DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::OnInitDialog(), DIALOG_TRACK_VIA_PROPERTIES::OnInitDlg(), DIALOG_GRAPHIC_ITEMS_OPTIONS::OnInitDlg(), DialogEditModuleText::OnInitDlg(), DIALOG_SET_GRID::OnInitDlg(), DIALOG_PCB_TEXT_PROPERTIES::OnInitDlg(), DIALOG_PRINT_FOR_MODEDIT::OnInitDlg(), DIALOG_GRAPHIC_ITEM_PROPERTIES::OnInitDlg(), DIALOG_MODULE_MODULE_EDITOR::OnInitDlg(), DIALOG_SIM_SETTINGS::onInitDlg(), DIALOG_SPICE_MODEL::onInitDlg(), DIALOG_MODULE_BOARD_EDITOR::OnInitDlg(), DIALOG_PRINT_USING_PRINTER::OnInitDlg(), DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnInitDlg(), TARGET_PROPERTIES_DIALOG_EDITOR::TARGET_PROPERTIES_DIALOG_EDITOR(), and DIALOG_SIGNAL_LIST::TransferDataToWindow().

105 {
106  // must be called from the constructor of derived classes,
107  // when all widgets are initialized, and therefore their size fixed
108 
109  // SetSizeHints fixes the minimal size of sizers in the dialog
110  // (SetSizeHints calls Fit(), so no need to call it)
111  GetSizer()->SetSizeHints( this );
112 
113  // the default position, when calling the first time the dlg
114  Center();
115 }
void DIALOG_SHIM::FixOSXCancelButtonIssue ( )
protectedinherited

A ugly hack to fix an issue on OSX: when typing ctrl+c in a wxTextCtrl inside a dialog, it is closed instead of copying a text if a button with wxID_CANCEL is used in a wxStdDialogButtonSizer, when the dlg is created by wxFormBuilder: the label is &Cancel, and this accelerator key has priority to copy text standard accelerator, and the dlg is closed when trying to copy text this function do nothing on other platforms.

Definition at line 117 of file dialog_shim.cpp.

Referenced by DIALOG_SHIM::Show().

118 {
119 #ifdef __WXMAC__
120  // A ugly hack to fix an issue on OSX: ctrl+c closes the dialog instead of
121  // copying a text if a button with wxID_CANCEL is used in a wxStdDialogButtonSizer
122  // created by wxFormBuilder: the label is &Cancel, and this accelerator key has priority
123  // to copy text standard accelerator, and the dlg is closed when trying to copy text
124  wxButton* button = dynamic_cast< wxButton* > ( wxWindow::FindWindowById( wxID_CANCEL, this ) );
125 
126  if( button )
127  button->SetLabel( _( "Cancel" ) );
128 #endif
129 }
void DIALOG_PAD_PROPERTIES::initValues ( )
private

Definition at line 320 of file dialog_pad_properties.cpp.

References PNS::angle(), B_Adhes, B_Cu, B_Mask, B_Paste, B_SilkS, CHOICE_SHAPE_CIRCLE, CHOICE_SHAPE_OVAL, CHOICE_SHAPE_RECT, CHOICE_SHAPE_ROUNDRECT, CHOICE_SHAPE_TRAPEZOID, code_type, DIM, Dwgs_User, Eco1_User, Eco2_User, F_Adhes, F_Cu, F_Mask, F_Paste, F_SilkS, FlipLayerMask(), FRAME_PCB, g_UserUnit, GetAbbreviatedUnitsLabel(), D_PAD::GetAttribute(), D_PAD::GetDelta(), D_PAD::GetDrillShape(), D_PAD::GetDrillSize(), BOARD::GetLayerName(), D_PAD::GetLayerSet(), D_PAD::GetLocalClearance(), D_PAD::GetLocalSolderMaskMargin(), D_PAD::GetLocalSolderPasteMargin(), D_PAD::GetLocalSolderPasteMarginRatio(), BOARD_CONNECTED_ITEM::GetNetname(), D_PAD::GetOffset(), MODULE::GetOrientation(), D_PAD::GetOrientation(), MODULE::GetOrientationDegrees(), D_PAD::GetPadName(), D_PAD::GetPadToDieLength(), D_PAD::GetParent(), D_PAD::GetPosition(), D_PAD::GetShape(), D_PAD::GetSize(), D_PAD::GetThermalGap(), D_PAD::GetThermalWidth(), D_PAD::GetZoneConnection(), D_PAD::IsFlipped(), EDA_BASE_FRAME::IsType(), m_board, m_canEditNetName, m_currentPad, DIALOG_PAD_PROPERTIES_BASE::m_DrillShapeCtrl, m_dummyPad, m_isFlipped, DIALOG_PAD_PROPERTIES_BASE::m_LengthPadToDieCtrl, DIALOG_PAD_PROPERTIES_BASE::m_NetClearanceUnits, DIALOG_PAD_PROPERTIES_BASE::m_NetClearanceValueCtrl, m_OrientValue, DIALOG_PAD_PROPERTIES_BASE::m_PadDrill_X_Ctrl, DIALOG_PAD_PROPERTIES_BASE::m_PadDrill_X_Unit, DIALOG_PAD_PROPERTIES_BASE::m_PadDrill_Y_Ctrl, DIALOG_PAD_PROPERTIES_BASE::m_PadDrill_Y_Unit, DIALOG_PAD_PROPERTIES_BASE::m_PadLayerAdhCmp, DIALOG_PAD_PROPERTIES_BASE::m_PadLayerAdhCu, DIALOG_PAD_PROPERTIES_BASE::m_PadLayerDraft, DIALOG_PAD_PROPERTIES_BASE::m_PadLayerECO1, DIALOG_PAD_PROPERTIES_BASE::m_PadLayerECO2, DIALOG_PAD_PROPERTIES_BASE::m_PadLayerMaskCmp, DIALOG_PAD_PROPERTIES_BASE::m_PadLayerMaskCu, DIALOG_PAD_PROPERTIES_BASE::m_PadLayerPateCmp, DIALOG_PAD_PROPERTIES_BASE::m_PadLayerPateCu, DIALOG_PAD_PROPERTIES_BASE::m_PadLayerSilkCmp, DIALOG_PAD_PROPERTIES_BASE::m_PadLayerSilkCu, DIALOG_PAD_PROPERTIES_BASE::m_PadLengthDie_Unit, DIALOG_PAD_PROPERTIES_BASE::m_PadNetNameCtrl, DIALOG_PAD_PROPERTIES_BASE::m_PadNumCtrl, DIALOG_PAD_PROPERTIES_BASE::m_PadOrient, DIALOG_PAD_PROPERTIES_BASE::m_PadPosition_X_Ctrl, DIALOG_PAD_PROPERTIES_BASE::m_PadPosition_Y_Ctrl, DIALOG_PAD_PROPERTIES_BASE::m_PadPosX_Unit, DIALOG_PAD_PROPERTIES_BASE::m_PadPosY_Unit, DIALOG_PAD_PROPERTIES_BASE::m_PadShape, DIALOG_PAD_PROPERTIES_BASE::m_PadShapeDelta_Unit, DIALOG_PAD_PROPERTIES_BASE::m_PadShapeOffsetX_Unit, DIALOG_PAD_PROPERTIES_BASE::m_PadShapeOffsetY_Unit, DIALOG_PAD_PROPERTIES_BASE::m_PadShapeSizeX_Unit, DIALOG_PAD_PROPERTIES_BASE::m_PadShapeSizeY_Unit, DIALOG_PAD_PROPERTIES_BASE::m_PadType, m_parent, DIALOG_PAD_PROPERTIES_BASE::m_rbCopperLayersSel, DIALOG_PAD_PROPERTIES_BASE::m_ShapeDelta_Ctrl, DIALOG_PAD_PROPERTIES_BASE::m_ShapeOffset_X_Ctrl, DIALOG_PAD_PROPERTIES_BASE::m_ShapeOffset_Y_Ctrl, DIALOG_PAD_PROPERTIES_BASE::m_ShapeSize_X_Ctrl, DIALOG_PAD_PROPERTIES_BASE::m_ShapeSize_Y_Ctrl, DIALOG_PAD_PROPERTIES_BASE::m_SolderMaskMarginCtrl, DIALOG_PAD_PROPERTIES_BASE::m_SolderMaskMarginUnits, DIALOG_PAD_PROPERTIES_BASE::m_SolderPasteMarginCtrl, DIALOG_PAD_PROPERTIES_BASE::m_SolderPasteMarginRatioCtrl, DIALOG_PAD_PROPERTIES_BASE::m_SolderPasteMarginUnits, DIALOG_PAD_PROPERTIES_BASE::m_staticModuleRotValue, DIALOG_PAD_PROPERTIES_BASE::m_staticModuleSideValue, DIALOG_PAD_PROPERTIES_BASE::m_staticTextCornerSizeUnit, DIALOG_PAD_PROPERTIES_BASE::m_staticTextWarningPadFlipped, DIALOG_PAD_PROPERTIES_BASE::m_ThermalGapCtrl, DIALOG_PAD_PROPERTIES_BASE::m_ThermalGapUnits, DIALOG_PAD_PROPERTIES_BASE::m_ThermalWidthCtrl, DIALOG_PAD_PROPERTIES_BASE::m_ThermalWidthUnits, DIALOG_PAD_PROPERTIES_BASE::m_trapDeltaDirChoice, DIALOG_PAD_PROPERTIES_BASE::m_ZoneConnectionChoice, NORMALIZE_ANGLE_180(), OnDrillShapeSelected(), OnPadShapeSelection(), PAD_ATTRIB_HOLE_NOT_PLATED, PAD_DRILL_SHAPE_OBLONG, PAD_SHAPE_CIRCLE, PAD_SHAPE_OVAL, PAD_SHAPE_RECT, PAD_SHAPE_ROUNDRECT, PAD_SHAPE_TRAPEZOID, PAD_ZONE_CONN_FULL, PAD_ZONE_CONN_INHERITED, PAD_ZONE_CONN_NONE, PAD_ZONE_CONN_THERMAL, PutValueInLocalUnits(), D_PAD::SetDelta(), D_PAD::SetLayerSet(), D_PAD::SetOffset(), D_PAD::SetOrientation(), setPadLayersList(), updateRoundRectCornerValues(), wxPoint::x, and wxPoint::y.

Referenced by DIALOG_PAD_PROPERTIES().

321 {
322  wxString msg;
323  double angle;
324 
325  // Disable pad net name wxTextCtrl if the caller is the footprint editor
326  // because nets are living only in the board managed by the board editor
328 
329 
330  // Setup layers names from board
331  // Should be made first, before calling m_rbCopperLayersSel->SetSelection()
332  m_rbCopperLayersSel->SetString( 0, m_board->GetLayerName( F_Cu ) );
333  m_rbCopperLayersSel->SetString( 1, m_board->GetLayerName( B_Cu ) );
334 
335  m_PadLayerAdhCmp->SetLabel( m_board->GetLayerName( F_Adhes ) );
336  m_PadLayerAdhCu->SetLabel( m_board->GetLayerName( B_Adhes ) );
338  m_PadLayerPateCu->SetLabel( m_board->GetLayerName( B_Paste ) );
340  m_PadLayerSilkCu->SetLabel( m_board->GetLayerName( B_SilkS ) );
341  m_PadLayerMaskCmp->SetLabel( m_board->GetLayerName( F_Mask ) );
342  m_PadLayerMaskCu->SetLabel( m_board->GetLayerName( B_Mask ) );
343  m_PadLayerECO1->SetLabel( m_board->GetLayerName( Eco1_User ) );
344  m_PadLayerECO2->SetLabel( m_board->GetLayerName( Eco2_User ) );
346 
347  m_isFlipped = false;
348 
349  if( m_currentPad )
350  {
352 
353  if( m_isFlipped )
354  m_staticModuleSideValue->SetLabel( _( "Back side (footprint is mirrored)" ) );
355 
356  // Diplay footprint rotation ( angles are in 0.1 degree )
357  MODULE* footprint = m_currentPad->GetParent();
358 
359  if( footprint )
360  msg.Printf( "%.1f", footprint->GetOrientationDegrees() );
361  else
362  msg = _("No footprint" );
363 
364  m_staticModuleRotValue->SetLabel( msg );
365  }
366 
367  if( m_isFlipped )
368  {
369  wxPoint pt = m_dummyPad->GetOffset();
370  pt.y = -pt.y;
371  m_dummyPad->SetOffset( pt );
372 
373  wxSize sz = m_dummyPad->GetDelta();
374  sz.y = -sz.y;
375  m_dummyPad->SetDelta( sz );
376 
377  // flip pad's layers
379  }
380 
382 
383  m_PadNumCtrl->SetValue( m_dummyPad->GetPadName() );
384  m_PadNetNameCtrl->SetValue( m_dummyPad->GetNetname() );
385 
386  // Set the unit name in dialog:
387  wxStaticText* unitTexts[] =
388  {
396  };
397 
398  for( unsigned ii = 0; ii < DIM( unitTexts ); ++ii )
399  unitTexts[ii]->SetLabel( GetAbbreviatedUnitsLabel( g_UserUnit ) );
400 
401  // Display current pad parameters units:
404 
407 
410 
413 
414  if( m_dummyPad->GetDelta().x )
415  {
417  m_trapDeltaDirChoice->SetSelection( 0 );
418  }
419  else
420  {
422  m_trapDeltaDirChoice->SetSelection( 1 );
423  }
424 
426 
431 
432  // These 2 parameters are usually < 0, so prepare entering a negative value, if current is 0
434 
436  m_SolderPasteMarginCtrl->SetValue( wxT( "-" ) + m_SolderPasteMarginCtrl->GetValue() );
437 
438  msg.Printf( wxT( "%f" ), m_dummyPad->GetLocalSolderPasteMarginRatio() * 100.0 );
439 
440  if( m_dummyPad->GetLocalSolderPasteMarginRatio() == 0.0 && msg[0] == '0' )
441  // Sometimes Printf adds a sign if the value is small
442  m_SolderPasteMarginRatioCtrl->SetValue( wxT( "-" ) + msg );
443  else
444  m_SolderPasteMarginRatioCtrl->SetValue( msg );
445 
446  switch( m_dummyPad->GetZoneConnection() )
447  {
448  default:
450  m_ZoneConnectionChoice->SetSelection( 0 );
451  break;
452 
453  case PAD_ZONE_CONN_FULL:
454  m_ZoneConnectionChoice->SetSelection( 1 );
455  break;
456 
458  m_ZoneConnectionChoice->SetSelection( 2 );
459  break;
460 
461  case PAD_ZONE_CONN_NONE:
462  m_ZoneConnectionChoice->SetSelection( 3 );
463  break;
464  }
465 
466  if( m_currentPad )
467  {
468  angle = m_currentPad->GetOrientation();
469  MODULE* footprint = m_currentPad->GetParent();
470 
471  if( footprint )
472  angle -= footprint->GetOrientation();
473 
474  if( m_isFlipped )
475  angle = -angle;
476 
477  m_dummyPad->SetOrientation( angle );
478  }
479 
480  angle = m_dummyPad->GetOrientation();
481 
482  NORMALIZE_ANGLE_180( angle ); // ? normalizing is in D_PAD::SetOrientation()
483 
484  // Set layers used by this pad: :
486 
487  // Pad Orient
488  switch( int( angle ) )
489  {
490  case 0:
491  m_PadOrient->SetSelection( 0 );
492  break;
493 
494  case 900:
495  m_PadOrient->SetSelection( 1 );
496  break;
497 
498  case -900:
499  m_PadOrient->SetSelection( 2 );
500  break;
501 
502  case 1800:
503  case -1800:
504  m_PadOrient->SetSelection( 3 );
505  break;
506 
507  default:
508  m_PadOrient->SetSelection( 4 );
509  break;
510  }
511 
512  switch( m_dummyPad->GetShape() )
513  {
514  default:
515  case PAD_SHAPE_CIRCLE:
516  m_PadShape->SetSelection( CHOICE_SHAPE_CIRCLE );
517  break;
518 
519  case PAD_SHAPE_OVAL:
520  m_PadShape->SetSelection( CHOICE_SHAPE_OVAL );
521  break;
522 
523  case PAD_SHAPE_RECT:
524  m_PadShape->SetSelection( CHOICE_SHAPE_RECT );
525  break;
526 
527  case PAD_SHAPE_TRAPEZOID:
528  m_PadShape->SetSelection( CHOICE_SHAPE_TRAPEZOID );
529  break;
530 
531  case PAD_SHAPE_ROUNDRECT:
532  m_PadShape->SetSelection( CHOICE_SHAPE_ROUNDRECT );
533  break;
534  }
535 
536  m_OrientValue = angle / 10.0;
537 
538  // Type of pad selection
539  m_PadType->SetSelection( 0 );
540 
541  for( unsigned ii = 0; ii < DIM( code_type ); ii++ )
542  {
543  if( code_type[ii] == m_dummyPad->GetAttribute() )
544  {
545  m_PadType->SetSelection( ii );
546  break;
547  }
548  }
549 
550  // Enable/disable Pad name,and pad length die
551  // (disable for NPTH pads (mechanical pads)
553 
554  m_PadNumCtrl->Enable( enable );
555  m_PadNetNameCtrl->Enable( m_canEditNetName && enable && m_currentPad != NULL );
556  m_LengthPadToDieCtrl->Enable( enable );
557 
559  m_DrillShapeCtrl->SetSelection( 0 );
560  else
561  m_DrillShapeCtrl->SetSelection( 1 );
562 
563  // Update some dialog widgets state (Enable/disable options):
564  wxCommandEvent cmd_event;
566  OnDrillShapeSelected( cmd_event );
567  OnPadShapeSelection( cmd_event );
569 }
#define DIM(x)
of elements in an array
Definition: macros.h:98
LSET FlipLayerMask(LSET aMask, int aCopperLayersCount)
Calculate the mask layer when flipping a footprint BACK and FRONT copper layers, mask, paste, solder layers are swapped internal layers are flipped only if the copper layers count is known.
Definition: lset.cpp:491
PAD_ATTR_T GetAttribute() const
Definition: class_pad.h:238
like PAD_STANDARD, but not plated mechanical use only, no connection allowed
Definition: pad_shapes.h:63
int GetPadToDieLength() const
Definition: class_pad.h:241
void setPadLayersList(LSET layer_mask)
Function setPadLayersList updates the CheckBox states in pad layers list,.
int GetLocalSolderMaskMargin() const
Definition: class_pad.h:243
MODULE * GetParent() const
Definition: class_pad.h:108
PAD_DRILL_SHAPE_T GetDrillShape() const
Definition: class_pad.h:221
void NORMALIZE_ANGLE_180(T &Angle)
Definition: trigo.h:292
const wxSize & GetDrillSize() const
Definition: class_pad.h:188
PAD_SHAPE_T GetShape() const
Function GetShape.
Definition: class_pad.h:166
Pads are not covered.
Definition: zones.h:57
static PAD_ATTR_T code_type[]
double GetOrientationDegrees() const
Definition: class_module.h:161
double GetOrientation() const
Definition: class_module.h:160
const wxPoint & GetPosition() const override
Definition: class_pad.h:170
wxString GetAbbreviatedUnitsLabel(EDA_UNITS_T aUnit)
Definition: base_units.cpp:479
ZoneConnection GetZoneConnection() const
Definition: class_pad.cpp:610
LSET GetLayerSet() const override
Function GetLayerSet returns a "layer mask", which is a bitmap of all layers on which the TRACK segme...
Definition: class_pad.h:235
const wxString GetLayerName(PCB_LAYER_ID aLayer) const
Function GetLayerName returns the name of a layer given by aLayer.
int GetThermalWidth() const
Definition: class_pad.cpp:621
void OnPadShapeSelection(wxCommandEvent &event) override
int GetThermalGap() const
Definition: class_pad.cpp:632
const wxSize & GetSize() const
Definition: class_pad.h:182
void OnDrillShapeSelected(wxCommandEvent &event) override
int GetLocalSolderPasteMargin() const
Definition: class_pad.h:249
bool IsFlipped() const
Definition: class_pad.cpp:124
int GetLocalClearance() const
Definition: class_pad.h:246
double GetLocalSolderPasteMarginRatio() const
Definition: class_pad.h:252
EDA_UNITS_T g_UserUnit
Global variables definitions.
Definition: common.cpp:56
void PutValueInLocalUnits(wxTextCtrl &aTextCtr, int aValue)
Function PutValueInLocalUnits converts aValue from internal units to user units and append the units ...
Definition: base_units.cpp:265
void SetLayerSet(LSET aLayerMask)
Definition: class_pad.h:234
const wxString & GetNetname() const
Function GetNetname.
static DIRECTION_45::AngleType angle(const VECTOR2I &a, const VECTOR2I &b)
double GetOrientation() const
Function GetOrientation returns the rotation angle of the pad in tenths of degrees, but soon degrees.
Definition: class_pad.h:214
const wxSize & GetDelta() const
Definition: class_pad.h:185
void SetOrientation(double aAngle)
Function SetOrientation sets the rotation angle of the pad.
Definition: class_pad.cpp:357
wxString GetPadName() const
Definition: class_pad.cpp:433
bool IsType(FRAME_T aType) const
Definition: wxstruct.h:217
void SetOffset(const wxPoint &aOffset)
Definition: class_pad.h:190
Use thermal relief for pads.
Definition: zones.h:58
const wxPoint & GetOffset() const
Definition: class_pad.h:191
void SetDelta(const wxSize &aSize)
Definition: class_pad.h:184
pads are covered by copper
Definition: zones.h:59
KIWAY& KIWAY_HOLDER::Kiway ( ) const
inlineinherited

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

A KIWAY_HOLDER is not necessarily a KIWAY_PLAYER.

Definition at line 60 of file kiway_player.h.

References KIWAY_HOLDER::m_kiway.

Referenced by SCH_EDIT_FRAME::AppendOneEEProject(), CVPCB_MAINFRAME::BuildLIBRARY_LISTBOX(), DIALOG_CHOOSE_COMPONENT::ConstructRightPanel(), CVPCB_MAINFRAME::CreateScreenCmp(), CVPCB_MAINFRAME::CVPCB_MAINFRAME(), DIALOG_SHIM::DIALOG_SHIM(), EDIT_TOOL::editFootprintInFpEditor(), SCH_EDIT_FRAME::EditSheet(), DISPLAY_FOOTPRINTS_FRAME::Get_Module(), FOOTPRINT_EDIT_FRAME::GetPlotSettings(), DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::initBuffers(), LIB_EDIT_FRAME::InstallConfigFrame(), PCB_EDIT_FRAME::InstallModuleOptionsFrame(), KIWAY_PLAYER::language_change(), SCH_SHEET::Load(), CVPCB_MAINFRAME::LoadFootprintFiles(), KIWAY_PLAYER::OnChangeIconsOptions(), CVPCB_MAINFRAME::OnEditFootprintLibraryTable(), SCH_BASE_FRAME::OnEditSymbolLibTable(), DIALOG_CHOOSE_COMPONENT::OnInitDialog(), SCH_EDIT_FRAME::OnLeftClick(), SCH_BASE_FRAME::OnOpenLibraryViewer(), SCH_EDIT_FRAME::OnSimulate(), DIALOG_EDIT_ONE_FIELD::OnTextValueSelectButtonClick(), FOOTPRINT_EDIT_FRAME::OnUpdateInsertModuleInBoard(), FOOTPRINT_EDIT_FRAME::OnUpdateLoadModuleFromBoard(), FOOTPRINT_EDIT_FRAME::OnUpdateReplaceModuleInBoard(), SCH_EDIT_FRAME::OpenProjectFiles(), KIWAY_HOLDER::Prj(), PCB_EDIT_FRAME::Process_Config(), PCB_EDIT_FRAME::Process_Special_Functions(), FOOTPRINT_EDIT_FRAME::ProcessPreferences(), CVPCB_MAINFRAME::ReadNetListAndFpFiles(), FOOTPRINT_VIEWER_FRAME::ReCreateFootprintList(), LIB_EDIT_FRAME::refreshSchematic(), SCH_EDIT_FRAME::SaveEEFile(), CVPCB_MAINFRAME::SaveFootprintAssociation(), SCH_BASE_FRAME::SelectComponentFromLibBrowser(), CVPCB_MAINFRAME::SendMessageToEESCHEMA(), PCB_EDIT_FRAME::SendMessageToEESCHEMA(), SCH_EDIT_FRAME::SendMessageToPCBNEW(), SCH_EDIT_FRAME::sendNetlist(), FOOTPRINT_EDIT_FRAME::SetPlotSettings(), DISPLAY_FOOTPRINTS_FRAME::Show3D_Frame(), FOOTPRINT_VIEWER_FRAME::Show3D_Frame(), FOOTPRINT_EDIT_FRAME::Show3D_Frame(), FOOTPRINT_WIZARD_FRAME::Show3D_Frame(), DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::showButtonHandler(), DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::showButtonHandler(), SIM_PLOT_FRAME::SIM_PLOT_FRAME(), and DIALOG_EXCHANGE_MODULE::ViewAndSelectFootprint().

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

Reimplemented from DIALOG_PAD_PROPERTIES_BASE.

Definition at line 289 of file dialog_pad_properties.cpp.

References g_UserUnit, D_PAD::GetRoundRectCornerRadius(), D_PAD::GetShape(), m_dummyPad, DIALOG_PAD_PROPERTIES_BASE::m_staticTextCornerRadiusValue, DIALOG_PAD_PROPERTIES_BASE::m_tcCornerSizeRatio, PAD_SHAPE_ROUNDRECT, redraw(), StringFromValue(), and transferDataToPad().

290 {
292  return;
293 
294  wxString value = m_tcCornerSizeRatio->GetValue();
295  double rrRadiusRatioPercent;
296 
297  if( value.ToDouble( &rrRadiusRatioPercent ) )
298  {
299  // Clamp rrRadiusRatioPercent to acceptable value (0.0 to 50.0)
300  if( rrRadiusRatioPercent < 0.0 )
301  {
302  rrRadiusRatioPercent = 0.0;
303  m_tcCornerSizeRatio->ChangeValue( "0.0" );
304  }
305 
306  if( rrRadiusRatioPercent > 50.0 )
307  {
308  rrRadiusRatioPercent = 0.5;
309  m_tcCornerSizeRatio->ChangeValue( "50.0" );
310  }
311 
315  redraw();
316  }
317 }
bool transferDataToPad(D_PAD *aPad)
Copy values from dialog field to aPad's members.
wxString StringFromValue(EDA_UNITS_T aUnit, int aValue, bool aAddUnitSymbol)
Function StringFromValue returns the string from aValue according to units (inch, mm ...
Definition: base_units.cpp:203
int GetRoundRectCornerRadius() const
Function GetRoundRectCornerRadius Has meaning only for rounded rect pads.
Definition: class_pad.h:351
PAD_SHAPE_T GetShape() const
Function GetShape.
Definition: class_pad.h:166
EDA_UNITS_T g_UserUnit
Global variables definitions.
Definition: common.cpp:56
void DIALOG_PAD_PROPERTIES::OnDrillShapeSelected ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_PAD_PROPERTIES_BASE.

Definition at line 637 of file dialog_pad_properties.cpp.

References DIALOG_PAD_PROPERTIES_BASE::m_DrillShapeCtrl, m_dummyPad, DIALOG_PAD_PROPERTIES_BASE::m_PadDrill_X_Ctrl, DIALOG_PAD_PROPERTIES_BASE::m_PadDrill_Y_Ctrl, DIALOG_PAD_PROPERTIES_BASE::m_PadType, redraw(), and transferDataToPad().

Referenced by initValues(), and PadTypeSelected().

638 {
639  if( m_PadType->GetSelection() == 1 || m_PadType->GetSelection() == 2 )
640  {
641  // pad type = SMD or CONN: no hole allowed
642  m_PadDrill_X_Ctrl->Enable( false );
643  m_PadDrill_Y_Ctrl->Enable( false );
644  }
645  else
646  {
647  switch( m_DrillShapeCtrl->GetSelection() )
648  {
649  case 0: //CIRCLE:
650  m_PadDrill_X_Ctrl->Enable( true );
651  m_PadDrill_Y_Ctrl->Enable( false );
652  break;
653 
654  case 1: //OVALE:
655  m_PadDrill_X_Ctrl->Enable( true );
656  m_PadDrill_Y_Ctrl->Enable( true );
657  break;
658  }
659  }
660 
662  redraw();
663 }
bool transferDataToPad(D_PAD *aPad)
Copy values from dialog field to aPad's members.
void DIALOG_PAD_PROPERTIES::OnInitDialog ( wxInitDialogEvent &  event)
overridevirtual

Reimplemented from DIALOG_PAD_PROPERTIES_BASE.

Definition at line 160 of file dialog_pad_properties.cpp.

References DIALOG_PAD_PROPERTIES_BASE::m_PadNumCtrl.

161 {
162  m_PadNumCtrl->SetFocus();
163  m_PadNumCtrl->SetSelection( -1, -1 );
164 }
void DIALOG_PAD_PROPERTIES::OnPadShapeSelection ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_PAD_PROPERTIES_BASE.

Definition at line 579 of file dialog_pad_properties.cpp.

References CHOICE_SHAPE_CIRCLE, CHOICE_SHAPE_OVAL, CHOICE_SHAPE_RECT, CHOICE_SHAPE_ROUNDRECT, CHOICE_SHAPE_TRAPEZOID, Format(), D_PAD::GetRoundRectRadiusRatio(), m_dummyPad, DIALOG_PAD_PROPERTIES_BASE::m_PadShape, DIALOG_PAD_PROPERTIES_BASE::m_ShapeDelta_Ctrl, DIALOG_PAD_PROPERTIES_BASE::m_ShapeOffset_X_Ctrl, DIALOG_PAD_PROPERTIES_BASE::m_ShapeOffset_Y_Ctrl, DIALOG_PAD_PROPERTIES_BASE::m_ShapeSize_Y_Ctrl, DIALOG_PAD_PROPERTIES_BASE::m_tcCornerSizeRatio, DIALOG_PAD_PROPERTIES_BASE::m_trapDeltaDirChoice, redraw(), transferDataToPad(), and updateRoundRectCornerValues().

Referenced by initValues().

580 {
581  switch( m_PadShape->GetSelection() )
582  {
583  case CHOICE_SHAPE_CIRCLE:
584  m_ShapeDelta_Ctrl->Enable( false );
585  m_trapDeltaDirChoice->Enable( false );
586  m_ShapeSize_Y_Ctrl->Enable( false );
587  m_ShapeOffset_X_Ctrl->Enable( false );
588  m_ShapeOffset_Y_Ctrl->Enable( false );
589  break;
590 
591  case CHOICE_SHAPE_OVAL:
592  m_ShapeDelta_Ctrl->Enable( false );
593  m_trapDeltaDirChoice->Enable( false );
594  m_ShapeSize_Y_Ctrl->Enable( true );
595  m_ShapeOffset_X_Ctrl->Enable( true );
596  m_ShapeOffset_Y_Ctrl->Enable( true );
597  break;
598 
599  case CHOICE_SHAPE_RECT:
600  m_ShapeDelta_Ctrl->Enable( false );
601  m_trapDeltaDirChoice->Enable( false );
602  m_ShapeSize_Y_Ctrl->Enable( true );
603  m_ShapeOffset_X_Ctrl->Enable( true );
604  m_ShapeOffset_Y_Ctrl->Enable( true );
605  break;
606 
608  m_ShapeDelta_Ctrl->Enable( true );
609  m_trapDeltaDirChoice->Enable( true );
610  m_ShapeSize_Y_Ctrl->Enable( true );
611  m_ShapeOffset_X_Ctrl->Enable( true );
612  m_ShapeOffset_Y_Ctrl->Enable( true );
613  break;
614 
616  m_ShapeDelta_Ctrl->Enable( false );
617  m_trapDeltaDirChoice->Enable( false );
618  m_ShapeSize_Y_Ctrl->Enable( true );
619  m_ShapeOffset_X_Ctrl->Enable( true );
620  m_ShapeOffset_Y_Ctrl->Enable( true );
621  // Ensure m_tcCornerSizeRatio contains the right value:
622  m_tcCornerSizeRatio->ChangeValue( wxString::Format( "%.1f",
624  break;
625  }
626 
627  // A few widgets are enabled only for rounded rect pads:
628  m_tcCornerSizeRatio->Enable( m_PadShape->GetSelection() == CHOICE_SHAPE_ROUNDRECT );
629 
631 
633  redraw();
634 }
bool transferDataToPad(D_PAD *aPad)
Copy values from dialog field to aPad's members.
double GetRoundRectRadiusRatio() const
has meaning only for rounded rect pads
Definition: class_pad.h:450
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, CPTREE &aTree)
Function Format outputs a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
Definition: ptree.cpp:205
void DIALOG_PAD_PROPERTIES::OnPaintShowPanel ( wxPaintEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_PAD_PROPERTIES_BASE.

Definition at line 166 of file dialog_pad_properties.cpp.

References abs, B_Cu, BLACK, color, PCB_GENERAL_SETTINGS::Colors(), DARKGRAY, D_PAD::DrawShape(), F_Cu, D_PAD::GetAttribute(), D_PAD::GetBoundingRadius(), D_PAD::GetDelta(), D_PAD::GetDrillSize(), COLORS_DESIGN_SETTINGS::GetItemColor(), D_PAD::GetLayerSet(), D_PAD::GetLocalClearance(), D_PAD::GetPosition(), D_PAD::GetShape(), D_PAD::GetSize(), GRLine(), GRResetPenAndBrush(), LAYER_PAD_BK, LAYER_PAD_FR, LIGHTBLUE, LIGHTGRAY, PAD_DRAWINFO::m_Color, PAD_DRAWINFO::m_Display_netname, PAD_DRAWINFO::m_Display_padnum, m_dummyPad, PAD_DRAWINFO::m_HoleColor, PAD_DRAWINFO::m_Offset, PAD_DRAWINFO::m_PadClearance, DIALOG_PAD_PROPERTIES_BASE::m_panelShowPad, m_parent, PAD_DRAWINFO::m_ShowNotPlatedHole, min, PAD_ATTRIB_HOLE_NOT_PLATED, PAD_SHAPE_CIRCLE, scale, and PCB_BASE_FRAME::Settings().

167 {
168  wxPaintDC dc( m_panelShowPad );
169  PAD_DRAWINFO drawInfo;
170 
172 
173  if( m_dummyPad->GetLayerSet()[F_Cu] )
174  {
176  }
177 
178  if( m_dummyPad->GetLayerSet()[B_Cu] )
179  {
180  color = color.LegacyMix( m_parent->Settings().Colors().GetItemColor( LAYER_PAD_BK ) );
181  }
182 
183  // What could happen: the pad color is *actually* black, or no
184  // copper was selected
185  if( color == BLACK )
186  color = LIGHTGRAY;
187 
188  drawInfo.m_Color = color;
189  drawInfo.m_HoleColor = DARKGRAY;
190  drawInfo.m_Offset = m_dummyPad->GetPosition();
191  drawInfo.m_Display_padnum = true;
192  drawInfo.m_Display_netname = true;
193 
195  drawInfo.m_ShowNotPlatedHole = true;
196 
197  // Shows the local pad clearance
199 
200  wxSize dc_size = dc.GetSize();
201  dc.SetDeviceOrigin( dc_size.x / 2, dc_size.y / 2 );
202 
203  // Calculate a suitable scale to fit the available draw area
204  int dim = m_dummyPad->GetBoundingRadius() *2;
205 
206  // Invalid x size. User could enter zero, or have deleted all text prior to
207  // entering a new value; this is also treated as zero. If dim is left at
208  // zero, the drawing scale is zero and we get a crash.
209  if( dim == 0 )
210  {
211  // If drill size has been set, use that. Otherwise default to 1mm.
212  dim = m_dummyPad->GetDrillSize().x;
213  if( dim == 0 )
214  dim = Millimeter2iu( 1.0 );
215  }
216 
217  if( m_dummyPad->GetLocalClearance() > 0 )
218  dim += m_dummyPad->GetLocalClearance() * 2;
219 
220  double scale = (double) dc_size.x / dim;
221 
222  // If the pad is a circle, use the x size here instead.
223  int ysize;
225  ysize = m_dummyPad->GetSize().x;
226  else
227  ysize = m_dummyPad->GetSize().y;
228 
229  dim = ysize + std::abs( m_dummyPad->GetDelta().x );
230 
231  // Invalid y size. See note about x size above.
232  if( dim == 0 )
233  {
234  dim = m_dummyPad->GetDrillSize().y;
235  if( dim == 0 )
236  dim = Millimeter2iu( 0.1 );
237  }
238 
239  if( m_dummyPad->GetLocalClearance() > 0 )
240  dim += m_dummyPad->GetLocalClearance() * 2;
241 
242  double altscale = (double) dc_size.y / dim;
243  scale = std::min( scale, altscale );
244 
245  // Give a margin
246  scale *= 0.7;
247  dc.SetUserScale( scale, scale );
248 
249  GRResetPenAndBrush( &dc );
250  m_dummyPad->DrawShape( NULL, &dc, drawInfo );
251 
252  // Draw X and Y axis. Hhis is particularly useful to show the
253  // reference position of pads with offset and no hole, or custom pad shapes
254  const int linethickness = 0;
255  GRLine( NULL, &dc, -int( dc_size.x/scale ), 0, int( dc_size.x/scale ), 0,
256  linethickness, LIGHTBLUE ); // X axis
257  GRLine( NULL, &dc, 0, -int( dc_size.y/scale ), 0, int( dc_size.y/scale ),
258  linethickness, LIGHTBLUE ); // Y axis
259 
260  event.Skip();
261 }
void GRResetPenAndBrush(wxDC *DC)
Definition: gr_basic.cpp:196
bool m_Display_padnum
Definition: class_pad.h:66
PAD_ATTR_T GetAttribute() const
Definition: class_pad.h:238
like PAD_STANDARD, but not plated mechanical use only, no connection allowed
Definition: pad_shapes.h:63
void GRLine(EDA_RECT *ClipBox, wxDC *DC, int x1, int y1, int x2, int y2, int width, COLOR4D Color)
Definition: gr_basic.cpp:352
const wxSize & GetDrillSize() const
Definition: class_pad.h:188
PAD_SHAPE_T GetShape() const
Function GetShape.
Definition: class_pad.h:166
#define abs(a)
Definition: auxiliary.h:84
smd pads, back layer
COLOR4D GetItemColor(int aItemIdx) const
Function GetItemColor.
int GetBoundingRadius() const
Function GetBoundingRadius returns the radius of a minimum sized circle which fully encloses this pad...
Definition: class_pad.h:428
PCB_GENERAL_SETTINGS & Settings()
const wxPoint & GetPosition() const override
Definition: class_pad.h:170
LSET GetLayerSet() const override
Function GetLayerSet returns a "layer mask", which is a bitmap of all layers on which the TRACK segme...
Definition: class_pad.h:235
COLOR4D m_HoleColor
Definition: class_pad.h:62
const wxSize & GetSize() const
Definition: class_pad.h:182
bool m_ShowNotPlatedHole
Definition: class_pad.h:71
void DrawShape(EDA_RECT *aClipBox, wxDC *aDC, PAD_DRAWINFO &aDrawInfo)
Function DrawShape basic function to draw a pad.
int m_PadClearance
Definition: class_pad.h:64
int GetLocalClearance() const
Definition: class_pad.h:246
COLORS_DESIGN_SETTINGS & Colors()
wxPoint m_Offset
Definition: class_pad.h:74
const int scale
smd pads, front layer
const wxSize & GetDelta() const
Definition: class_pad.h:185
COLOR4D m_Color
Definition: class_pad.h:60
Definition: colors.h:45
bool m_Display_netname
Definition: class_pad.h:67
#define min(a, b)
Definition: auxiliary.h:85
Class COLOR4D is the color representation with 4 components: red, green, blue, alpha.
Definition: color4d.h:39
void DIALOG_PAD_PROPERTIES::OnResize ( wxSizeEvent &  event)
private

Definition at line 572 of file dialog_pad_properties.cpp.

References redraw().

Referenced by DIALOG_PAD_PROPERTIES().

573 {
574  redraw();
575  event.Skip();
576 }
void DIALOG_PAD_PROPERTIES::OnSetLayers ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_PAD_PROPERTIES_BASE.

Definition at line 759 of file dialog_pad_properties.cpp.

References m_dummyPad, redraw(), and transferDataToPad().

760 {
762  redraw();
763 }
bool transferDataToPad(D_PAD *aPad)
Copy values from dialog field to aPad's members.
void DIALOG_PAD_PROPERTIES::OnValuesChanged ( wxCommandEvent &  event)
overrideprivatevirtual

Called when a dimension has changed.

Update the graphical pad shown in the panel.

Reimplemented from DIALOG_PAD_PROPERTIES_BASE.

Definition at line 1352 of file dialog_pad_properties.cpp.

References m_canUpdate, m_dummyPad, redraw(), transferDataToPad(), and updateRoundRectCornerValues().

1353 {
1354  if( m_canUpdate )
1355  {
1357  // If the pad size has changed, update the displayed values
1358  // for rounded rect pads
1360 
1361  redraw();
1362  }
1363 }
bool transferDataToPad(D_PAD *aPad)
Copy values from dialog field to aPad's members.
void DIALOG_PAD_PROPERTIES::PadOrientEvent ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_PAD_PROPERTIES_BASE.

Definition at line 666 of file dialog_pad_properties.cpp.

References D_PAD::GetOrientation(), m_dummyPad, m_OrientValidator, m_OrientValue, DIALOG_PAD_PROPERTIES_BASE::m_PadOrient, redraw(), D_PAD::SetOrientation(), and transferDataToPad().

667 {
668  switch( m_PadOrient->GetSelection() )
669  {
670  case 0:
672  break;
673 
674  case 1:
675  m_dummyPad->SetOrientation( 900 );
676  break;
677 
678  case 2:
679  m_dummyPad->SetOrientation( -900 );
680  break;
681 
682  case 3:
683  m_dummyPad->SetOrientation( 1800 );
684  break;
685 
686  default:
687  break;
688  }
689 
691  m_OrientValidator.TransferToWindow();
692 
694  redraw();
695 }
bool transferDataToPad(D_PAD *aPad)
Copy values from dialog field to aPad's members.
wxFloatingPointValidator< double > m_OrientValidator
double GetOrientation() const
Function GetOrientation returns the rotation angle of the pad in tenths of degrees, but soon degrees.
Definition: class_pad.h:214
void SetOrientation(double aAngle)
Function SetOrientation sets the rotation angle of the pad.
Definition: class_pad.cpp:357
void DIALOG_PAD_PROPERTIES::PadTypeSelected ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_PAD_PROPERTIES_BASE.

Definition at line 698 of file dialog_pad_properties.cpp.

References code_type, DIM, m_canEditNetName, m_currentPad, DIALOG_PAD_PROPERTIES_BASE::m_DrillShapeCtrl, DIALOG_PAD_PROPERTIES_BASE::m_LengthPadToDieCtrl, DIALOG_PAD_PROPERTIES_BASE::m_PadNetNameCtrl, DIALOG_PAD_PROPERTIES_BASE::m_PadNumCtrl, DIALOG_PAD_PROPERTIES_BASE::m_PadType, OnDrillShapeSelected(), and setPadLayersList().

699 {
700  unsigned ii = m_PadType->GetSelection();
701 
702  if( ii >= DIM( code_type ) ) // catches < 0 also
703  ii = 0;
704 
705  LSET layer_mask = std_pad_layers[ii];
706  setPadLayersList( layer_mask );
707 
708  // Enable/disable drill dialog items:
709  event.SetId( m_DrillShapeCtrl->GetSelection() );
710  OnDrillShapeSelected( event );
711 
712  if( ii == 0 || ii == DIM( code_type )-1 )
713  m_DrillShapeCtrl->Enable( true );
714  else
715  m_DrillShapeCtrl->Enable( false );
716 
717  // Enable/disable Pad name,and pad length die
718  // (disable for NPTH pads (mechanical pads)
719  bool enable = ii != 3;
720  m_PadNumCtrl->Enable( enable );
721  m_PadNetNameCtrl->Enable( m_canEditNetName && enable && m_currentPad != NULL );
722  m_LengthPadToDieCtrl->Enable( enable );
723 }
#define DIM(x)
of elements in an array
Definition: macros.h:98
void setPadLayersList(LSET layer_mask)
Function setPadLayersList updates the CheckBox states in pad layers list,.
static PAD_ATTR_T code_type[]
Class LSET is a set of PCB_LAYER_IDs.
void OnDrillShapeSelected(wxCommandEvent &event) override
static const LSET std_pad_layers[]
bool DIALOG_PAD_PROPERTIES::padValuesOK ( )
private

test if all values are acceptable for the pad

Definition at line 767 of file dialog_pad_properties.cpp.

References abs, B_Cu, B_Paste, F_Cu, F_Paste, D_PAD::GetAttribute(), D_PAD::GetDrillSize(), D_PAD::GetLayerSet(), D_PAD::GetOffset(), D_PAD::GetShape(), D_PAD::GetSize(), LSET::InternalCuMask(), HTML_MESSAGE_BOX::ListSet(), m_dummyPad, DIALOG_PAD_PROPERTIES_BASE::m_tcCornerSizeRatio, PAD_ATTRIB_CONN, PAD_ATTRIB_HOLE_NOT_PLATED, PAD_ATTRIB_SMD, PAD_ATTRIB_STANDARD, PAD_SHAPE_CIRCLE, PAD_SHAPE_ROUNDRECT, transferDataToPad(), wxPoint::x, and wxPoint::y.

Referenced by TransferDataFromWindow().

768 {
769  bool error = transferDataToPad( m_dummyPad );
770  bool skip_tstoffset = false; // the offset prm is not always tested
771 
772  wxArrayString error_msgs;
773  wxString msg;
774 
775  // Test for incorrect values
776  if( (m_dummyPad->GetSize().x <= 0) ||
777  ((m_dummyPad->GetSize().y <= 0) && (m_dummyPad->GetShape() != PAD_SHAPE_CIRCLE)) )
778  {
779  error_msgs.Add( _( "Pad size must be greater than zero" ) );
780  }
781 
782  if( (m_dummyPad->GetSize().x < m_dummyPad->GetDrillSize().x) ||
783  (m_dummyPad->GetSize().y < m_dummyPad->GetDrillSize().y) )
784  {
785  error_msgs.Add( _( "Incorrect value for pad drill: pad drill bigger than pad size" ) );
786  skip_tstoffset = true; // offset prm will be not tested because if the drill value
787  // is incorrect the offset prm is always seen as incorrect, even if it is 0
788  }
789 
790  LSET padlayers_mask = m_dummyPad->GetLayerSet();
791 
792  if( padlayers_mask == 0 )
793  error_msgs.Add( _( "Error: pad has no layer" ) );
794 
795  if( !padlayers_mask[F_Cu] && !padlayers_mask[B_Cu] )
796  {
798  {
799  // Note: he message is shown in an HTML window
800  msg = _( "Error: the pad is not on a copper layer and has a hole" );
801 
803  {
804  msg += wxT( "<br><br><i>" );
805  msg += _( "For NPTH pad, set pad size value to pad drill value,"
806  " if you do not want this pad plotted in gerber files"
807  );
808  }
809 
810  error_msgs.Add( msg );
811  }
812  }
813 
814  if( !skip_tstoffset )
815  {
816  wxPoint max_size;
817  max_size.x = std::abs( m_dummyPad->GetOffset().x );
818  max_size.y = std::abs( m_dummyPad->GetOffset().y );
819  max_size.x += m_dummyPad->GetDrillSize().x / 2;
820  max_size.y += m_dummyPad->GetDrillSize().y / 2;
821 
822  if( ( m_dummyPad->GetSize().x / 2 < max_size.x ) ||
823  ( m_dummyPad->GetSize().y / 2 < max_size.y ) )
824  {
825  error_msgs.Add( _( "Incorrect value for pad offset" ) );
826  }
827  }
828 
829  if( error )
830  {
831  error_msgs.Add( _( "Too large value for pad delta size" ) );
832  }
833 
834  switch( m_dummyPad->GetAttribute() )
835  {
836  case PAD_ATTRIB_HOLE_NOT_PLATED: // Not plated, but through hole, a hole is expected
837  case PAD_ATTRIB_STANDARD : // Pad through hole, a hole is also expected
838  if( m_dummyPad->GetDrillSize().x <= 0 )
839  error_msgs.Add( _( "Error: Through hole pad: drill diameter set to 0" ) );
840  break;
841 
842  case PAD_ATTRIB_CONN: // Connector pads are smd pads, just they do not have solder paste.
843  if( padlayers_mask[B_Paste] || padlayers_mask[F_Paste] )
844  error_msgs.Add( _( "Error: Connector pads are not on the solder paste layer\n"
845  "Use SMD pads instead" ) );
846  // Fall trough
847  case PAD_ATTRIB_SMD: // SMD and Connector pads (One external copper layer only)
848  {
849  LSET innerlayers_mask = padlayers_mask & LSET::InternalCuMask();
850 
851  if( ( padlayers_mask[F_Cu] && padlayers_mask[B_Cu] ) ||
852  innerlayers_mask.count() != 0 )
853  error_msgs.Add( _( "Error: only one external copper layer allowed for SMD or Connector pads" ) );
854  }
855  break;
856  }
857 
858 
860  {
861  wxString value = m_tcCornerSizeRatio->GetValue();
862  double rrRadiusRatioPercent;
863 
864  if( !value.ToDouble( &rrRadiusRatioPercent ) )
865  error_msgs.Add( _( "Incorrect corner size value" ) );
866  else
867  {
868  if( rrRadiusRatioPercent < 0.0 )
869  error_msgs.Add( _( "Incorrect (negative) corner size value" ) );
870  else if( rrRadiusRatioPercent > 50.0 )
871  error_msgs.Add( _( "Corner size value must be smaller than 50%" ) );
872  }
873  }
874 
875  if( error_msgs.GetCount() )
876  {
877  HTML_MESSAGE_BOX dlg( this, _("Pad setup errors list" ) );
878  dlg.ListSet( error_msgs );
879  dlg.ShowModal();
880  }
881 
882  return error_msgs.GetCount() == 0;
883 }
PAD_ATTR_T GetAttribute() const
Definition: class_pad.h:238
like PAD_STANDARD, but not plated mechanical use only, no connection allowed
Definition: pad_shapes.h:63
bool transferDataToPad(D_PAD *aPad)
Copy values from dialog field to aPad's members.
Smd pad, appears on the solder paste layer (default)
Definition: pad_shapes.h:59
const wxSize & GetDrillSize() const
Definition: class_pad.h:188
PAD_SHAPE_T GetShape() const
Function GetShape.
Definition: class_pad.h:166
#define abs(a)
Definition: auxiliary.h:84
Class LSET is a set of PCB_LAYER_IDs.
LSET GetLayerSet() const override
Function GetLayerSet returns a "layer mask", which is a bitmap of all layers on which the TRACK segme...
Definition: class_pad.h:235
static LSET InternalCuMask()
Function InternalCuMask() returns a complete set of internal copper layers, which is all Cu layers ex...
Definition: lset.cpp:599
const wxSize & GetSize() const
Definition: class_pad.h:182
Class HTML_MESSAGE_BOX.
Like smd, does not appear on the solder paste layer (default) note also has a special attribute in Ge...
Definition: pad_shapes.h:60
Usual pad.
Definition: pad_shapes.h:58
const wxPoint & GetOffset() const
Definition: class_pad.h:191
PROJECT & KIWAY_HOLDER::Prj ( ) const
inherited

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

Definition at line 34 of file kiway_holder.cpp.

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

Referenced by SCH_EDIT_FRAME::AnnotateComponents(), SCH_EDIT_FRAME::AppendOneEEProject(), PCB_EDIT_FRAME::ArchiveModulesOnBoard(), SCH_EDIT_FRAME::backAnnotateFootprints(), LIB_VIEW_FRAME::BestZoom(), DIALOG_MODULE_MODULE_EDITOR::BrowseAndAdd3DShapeFile(), DIALOG_MODULE_BOARD_EDITOR::BrowseAndAdd3DShapeFile(), DIALOG_EDIT_COMPONENT_IN_LIBRARY::BrowseAndSelectDocFile(), DIALOG_EXCHANGE_MODULE::BrowseAndSelectFootprint(), CVPCB_MAINFRAME::BuildLIBRARY_LISTBOX(), DIALOG_MODULE_MODULE_EDITOR::Cfg3DPath(), DIALOG_MODULE_BOARD_EDITOR::Cfg3DPath(), SCH_EDIT_FRAME::CheckAnnotate(), SCH_SCREEN::CheckComponentsToPartsLinks(), SCH_EDIT_FRAME::ConvertPart(), DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::copyPanelToOptions(), SCH_EDIT_FRAME::CreateArchiveLibrary(), PCB_BASE_EDIT_FRAME::CreateNewLibrary(), DIALOG_PLOT_SCHEMATIC::createPlotFileName(), DIALOG_SYMBOL_REMAP::createProjectSymbolLibTable(), FOOTPRINT_EDIT_FRAME::DeleteModuleFromCurrentLibrary(), LIB_EDIT_FRAME::DeleteOnePart(), DIALOG_CONFIG_EQUFILES::DIALOG_CONFIG_EQUFILES(), DIALOG_EESCHEMA_CONFIG::DIALOG_EESCHEMA_CONFIG(), DIALOG_FP_LIB_TABLE::DIALOG_FP_LIB_TABLE(), DIALOG_MODULE_BOARD_EDITOR::DIALOG_MODULE_BOARD_EDITOR(), DIALOG_MODULE_MODULE_EDITOR::DIALOG_MODULE_MODULE_EDITOR(), DIALOG_PAGES_SETTINGS::DIALOG_PAGES_SETTINGS(), DIALOG_SCH_EDIT_ONE_FIELD::DIALOG_SCH_EDIT_ONE_FIELD(), DIALOG_SYMBOL_LIB_TABLE::DIALOG_SYMBOL_LIB_TABLE(), LIB_VIEW_FRAME::DisplayLibInfos(), SCH_BASE_FRAME::DisplayListComponentsInLib(), PCB_EDIT_FRAME::doAutoSave(), DIALOG_MODULE_MODULE_EDITOR::Edit3DShapeFileName(), DIALOG_MODULE_BOARD_EDITOR::Edit3DShapeFileName(), SCH_EDIT_FRAME::EditComponentFieldText(), SCH_EDIT_FRAME::EditSheet(), PCB_EDIT_FRAME::Export_IDF3(), PCB_EDIT_FRAME::ExportToGenCAD(), PCB_EDIT_FRAME::ExportVRML_File(), PCB_EDIT_FRAME::Files_io_from_id(), PCB_EDIT_FRAME::GenD356File(), NETLIST_DIALOG::GenNetlist(), DISPLAY_FOOTPRINTS_FRAME::Get_Module(), FOOTPRINT_VIEWER_FRAME::getCurFootprintName(), LIB_EDIT_FRAME::GetCurLib(), FOOTPRINT_VIEWER_FRAME::getCurNickname(), LIB_EDIT_FRAME::GetCurPart(), FOOTPRINT_EDIT_FRAME::GetCurrentLib(), FOOTPRINT_EDIT_FRAME::getLibPath(), DIALOG_SYMBOL_REMAP::getLibsNotInGlobalSymbolLibTable(), DIALOG_BOM::getPluginFileName(), LIB_VIEW_FRAME::getSelectedAlias(), FP_THREAD_IFACE::GetTable(), DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::InitBuffers(), DIALOG_MODULE_MODULE_EDITOR::initModeditProperties(), DIALOG_MODULE_BOARD_EDITOR::InitModeditProperties(), LIB_EDIT_FRAME::InstallConfigFrame(), SCH_EDIT_FRAME::InstallConfigFrame(), PCB_EDIT_FRAME::InstallNetlistFrame(), SCH_EDIT_FRAME::IsSearchCacheObsolete(), SCH_EDIT_FRAME::Load_Component(), SCH_EDIT_FRAME::LoadCmpToFootprintLinkFile(), DIALOG_BOM_EDITOR::LoadComponents(), CVPCB_MAINFRAME::LoadFootprintFiles(), SCH_EDIT_FRAME::LoadOneEEFile(), LIB_EDIT_FRAME::LoadOneLibraryPart(), LIB_EDIT_FRAME::LoadOneSymbol(), CVPCB_MAINFRAME::LoadProjectFile(), SCH_EDIT_FRAME::LoadProjectFile(), PCB_EDIT_FRAME::LoadProjectSettings(), DIALOG_DRC_CONTROL::makeValidFileNameReport(), FOOTPRINT_VIEWER_FRAME::OnActivate(), DIALOG_EESCHEMA_CONFIG::OnAddOrInsertLibClick(), DIALOG_EESCHEMA_CONFIG::OnAddOrInsertPath(), DIALOG_DRC_CONTROL::OnButtonBrowseRptFileClick(), LIB_EDIT_FRAME::OnCloseWindow(), CVPCB_MAINFRAME::OnEditFootprintLibraryTable(), SCH_BASE_FRAME::OnEditSymbolLibTable(), DIALOG_GENDRILL::OnGenReportFile(), DIALOG_CHOOSE_COMPONENT::OnInitDialog(), PCB_EDIT_FRAME::OnLeftClick(), DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnOKButtonClick(), DIALOG_NETLIST::OnOpenNetlistClick(), DIALOG_PLOT::OnOutputDirectoryBrowseClicked(), DIALOG_SVG_PRINT::OnOutputDirectoryBrowseClicked(), DIALOG_GENDRILL::OnOutputDirectoryBrowseClicked(), DIALOG_PLOT_SCHEMATIC::OnOutputDirectoryBrowseClicked(), DIALOG_GEN_MODULE_POSITION::OnOutputDirectoryBrowseClicked(), LIB_EDIT_FRAME::OnPlotCurrentComponent(), DIALOG_SYMBOL_REMAP::OnRemapSymbols(), SCH_EDIT_FRAME::OnRightClick(), DIALOG_BOM::OnRunPlugin(), DIALOG_NETLIST::OnSaveMessagesToFile(), SCH_EDIT_FRAME::OnSaveProject(), DIALOG_SPICE_MODEL::onSelectIcLib(), LIB_VIEW_FRAME::OnSelectSymbol(), SCH_EDIT_FRAME::OnSelectUnit(), DIALOG_SPICE_MODEL::onSemiSelectLib(), DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnTestChipName(), FOOTPRINT_EDIT_FRAME::OnUpdateSelectCurrentLib(), LIB_EDIT_FRAME::OnViewEntryDoc(), LIB_VIEW_FRAME::onViewSymbolDocument(), SCH_EDIT_FRAME::OpenProjectFiles(), PCB_EDIT_FRAME::OpenProjectFiles(), SCH_EDIT_FRAME::PasteListOfItems(), PCB_EDITOR_CONTROL::PlaceModule(), SCH_EDIT_FRAME::prepareForNetlist(), SCH_EDIT_FRAME::Process_Config(), PCB_EDIT_FRAME::Process_Config(), SCH_EDIT_FRAME::Process_Special_Functions(), SCH_EDIT_FRAME::ProcessCmpToFootprintLinkFile(), FOOTPRINT_EDIT_FRAME::ProcessPreferences(), CVPCB_MAINFRAME::ReadNetListAndFpFiles(), PCB_EDIT_FRAME::RecreateCmpFileFromBoard(), FOOTPRINT_VIEWER_FRAME::ReCreateFootprintList(), LIB_VIEW_FRAME::ReCreateHToolbar(), FOOTPRINT_VIEWER_FRAME::ReCreateLibraryList(), LIB_VIEW_FRAME::ReCreateListCmp(), LIB_VIEW_FRAME::ReCreateListLib(), LIB_VIEW_FRAME::RedrawActiveWindow(), EDA_3D_VIEWER::ReloadRequest(), DIALOG_SYMBOL_REMAP::remapSymbolToLibTable(), SCH_EDIT_FRAME::RescueProject(), FOOTPRINT_EDIT_FRAME::restoreLastFootprint(), FOOTPRINT_EDIT_FRAME::retainLastFootprint(), SCH_SCREEN::Save(), LIB_EDIT_FRAME::SaveActiveLibrary(), SCH_EDIT_FRAME::SaveEEFile(), FOOTPRINT_EDIT_FRAME::SaveFootprintInLibrary(), LIB_EDIT_FRAME::SaveOneSymbol(), CVPCB_MAINFRAME::SaveProjectFile(), SCH_EDIT_FRAME::SaveProjectSettings(), PCB_EDIT_FRAME::SaveProjectSettings(), FOOTPRINT_VIEWER_FRAME::SelectAndViewFootprint(), SCH_BASE_FRAME::SelectComponentFromLibrary(), FOOTPRINT_VIEWER_FRAME::SelectCurrentFootprint(), PCB_BASE_FRAME::SelectLibrary(), SCH_BASE_FRAME::SelectLibraryFromList(), SCH_EDIT_FRAME::sendNetlist(), FOOTPRINT_VIEWER_FRAME::setCurFootprintName(), LIB_EDIT_FRAME::SetCurLib(), FOOTPRINT_VIEWER_FRAME::setCurNickname(), LIB_EDIT_FRAME::SetCurPart(), DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::SetInitCmp(), SIM_PLOT_FRAME::SIM_PLOT_FRAME(), EDA_3D_VIEWER::takeScreenshot(), DIALOG_ERC::TestErc(), DIALOG_SPICE_MODEL::updateFromFile(), SIM_PLOT_FRAME::updateNetlistExporter(), FOOTPRINT_VIEWER_FRAME::UpdateTitle(), CVPCB_MAINFRAME::UpdateTitle(), FOOTPRINT_EDIT_FRAME::updateTitle(), SCH_EDIT_FRAME::WriteNetListFile(), DIALOG_MODULE_BOARD_EDITOR::~DIALOG_MODULE_BOARD_EDITOR(), and DIALOG_MODULE_MODULE_EDITOR::~DIALOG_MODULE_MODULE_EDITOR().

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

Definition at line 886 of file dialog_pad_properties.cpp.

References EDA_DRAW_FRAME::GetGalCanvas(), BOX2< Vec >::GetOrigin(), D_PAD::GetPosition(), KIGFX::VIEW::GetScale(), BOX2< Vec >::GetSize(), EDA_DRAW_PANEL_GAL::GetView(), BOX2< Vec >::Inflate(), EDA_DRAW_FRAME::IsGalCanvasActive(), m_dummyPad, DIALOG_PAD_PROPERTIES_BASE::m_panelShowPad, DIALOG_PAD_PROPERTIES_BASE::m_panelShowPadGal, m_parent, BOX2< Vec >::Move(), EDA_DRAW_PANEL_GAL::Refresh(), KIGFX::VIEW::SetBoundary(), KIGFX::VIEW::SetScale(), KIGFX::VIEW::SetViewport(), KIGFX::VIEW::Update(), D_PAD::ViewBBox(), VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by onCornerSizePercentChange(), OnDrillShapeSelected(), OnPadShapeSelection(), OnResize(), OnSetLayers(), OnValuesChanged(), and PadOrientEvent().

887 {
888  if( m_parent->IsGalCanvasActive() )
889  {
891 
892  BOX2I bbox = m_dummyPad->ViewBBox();
893 
894  if( bbox.GetSize().x > 0 && bbox.GetSize().y > 0 )
895  {
896  // gives a size to the full drawable area
897  BOX2I drawbox;
898  drawbox.Move( m_dummyPad->GetPosition() );
899  drawbox.Inflate( bbox.GetSize().x*2, bbox.GetSize().y*2 );
900  m_panelShowPadGal->GetView()->SetBoundary( drawbox );
901 
902  // Autozoom
903  m_panelShowPadGal->GetView()->SetViewport( BOX2D( bbox.GetOrigin(), bbox.GetSize() ) );
904 
905  // Add a margin
907 
909  }
910  }
911  else
912  {
913  m_panelShowPad->Refresh();
914  }
915 }
const Vec & GetOrigin() const
Definition: box2.h:181
void Move(const Vec &aMoveVector)
Function Move moves the rectangle by the aMoveVector.
Definition: box2.h:108
void SetViewport(const BOX2D &aViewport)
Function SetViewport() Sets the visible area of the VIEW.
Definition: view.cpp:513
BOX2< VECTOR2D > BOX2D
Definition: box2.h:469
KIGFX::VIEW * GetView() const
Function GetView() Returns a pointer to the VIEW instance used in the panel.
const Vec & GetSize() const
Definition: box2.h:177
void SetScale(double aScale)
Function SetScale() Sets the scaling factor.
Definition: view.h:247
void SetBoundary(const BOX2I &aBoundary)
Function SetBoundary() Sets limits for view area.
Definition: view.h:275
virtual const BOX2I ViewBBox() const override
Function ViewBBox() returns the bounding box of the item covering all its layers. ...
Definition: class_pad.cpp:1231
const wxPoint & GetPosition() const override
Definition: class_pad.h:170
bool IsGalCanvasActive() const
Function IsGalCanvasActive is used to check which canvas (GAL-based or standard) is currently in use...
Definition: draw_frame.h:809
void Update(VIEW_ITEM *aItem, int aUpdateFlags)
For dynamic VIEWs, informs the associated VIEW that the graphical representation of this item has cha...
Definition: view.cpp:1389
void Refresh(bool aEraseBackground=true, const wxRect *aRect=NULL) override
BOX2< Vec > & Inflate(coord_type dx, coord_type dy)
Function Inflate inflates the rectangle horizontally by dx and vertically by dy.
Definition: box2.h:266
double GetScale() const
Function GetScale()
Definition: view.h:265
EDA_DRAW_PANEL_GAL * GetGalCanvas() const
Function GetGalCanvas returns a pointer to GAL-based canvas of given EDA draw frame.
Definition: draw_frame.h:817
void KIWAY_HOLDER::SetKiway ( wxWindow *  aDest,
KIWAY aKiway 
)
inherited

Function SetKiway.

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

Definition at line 41 of file kiway_holder.cpp.

References KIWAY_HOLDER::m_kiway, and name.

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

42 {
43 #if defined(DEBUG)
44  // offer a trap point for debugging most any window
45  wxASSERT( aDest );
46  if( !strcmp( typeid(aDest).name(), "DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB" ) )
47  {
48  int breakhere=1;
49  (void) breakhere;
50  }
51 #endif
52 
53  (void) aDest;
54 
55  m_kiway = aKiway;
56 }
KIWAY * m_kiway
Definition: kiway_player.h:85
const char * name
void DIALOG_PAD_PROPERTIES::setPadLayersList ( LSET  layer_mask)
private

Function setPadLayersList updates the CheckBox states in pad layers list,.

Parameters
layer_mask= pad layer mask (ORed layers bit mask)

Definition at line 726 of file dialog_pad_properties.cpp.

References LSET::AllCuMask(), B_Adhes, B_Cu, B_Mask, B_Paste, B_SilkS, Dwgs_User, Eco1_User, Eco2_User, F_Adhes, F_Cu, F_Mask, F_Paste, F_SilkS, DIALOG_PAD_PROPERTIES_BASE::m_PadLayerAdhCmp, DIALOG_PAD_PROPERTIES_BASE::m_PadLayerAdhCu, DIALOG_PAD_PROPERTIES_BASE::m_PadLayerDraft, DIALOG_PAD_PROPERTIES_BASE::m_PadLayerECO1, DIALOG_PAD_PROPERTIES_BASE::m_PadLayerECO2, DIALOG_PAD_PROPERTIES_BASE::m_PadLayerMaskCmp, DIALOG_PAD_PROPERTIES_BASE::m_PadLayerMaskCu, DIALOG_PAD_PROPERTIES_BASE::m_PadLayerPateCmp, DIALOG_PAD_PROPERTIES_BASE::m_PadLayerPateCu, DIALOG_PAD_PROPERTIES_BASE::m_PadLayerSilkCmp, DIALOG_PAD_PROPERTIES_BASE::m_PadLayerSilkCu, and DIALOG_PAD_PROPERTIES_BASE::m_rbCopperLayersSel.

Referenced by initValues(), and PadTypeSelected().

727 {
728  LSET cu_set = layer_mask & LSET::AllCuMask();
729 
730  if( cu_set == LSET( F_Cu ) )
731  m_rbCopperLayersSel->SetSelection( 0 );
732  else if( cu_set == LSET( B_Cu ) )
733  m_rbCopperLayersSel->SetSelection( 1 );
734  else if( cu_set.any() )
735  m_rbCopperLayersSel->SetSelection( 2 );
736  else
737  m_rbCopperLayersSel->SetSelection( 3 );
738 
739  m_PadLayerAdhCmp->SetValue( layer_mask[F_Adhes] );
740  m_PadLayerAdhCu->SetValue( layer_mask[B_Adhes] );
741 
742  m_PadLayerPateCmp->SetValue( layer_mask[F_Paste] );
743  m_PadLayerPateCu->SetValue( layer_mask[B_Paste] );
744 
745  m_PadLayerSilkCmp->SetValue( layer_mask[F_SilkS] );
746  m_PadLayerSilkCu->SetValue( layer_mask[B_SilkS] );
747 
748  m_PadLayerMaskCmp->SetValue( layer_mask[F_Mask] );
749  m_PadLayerMaskCu->SetValue( layer_mask[B_Mask] );
750 
751  m_PadLayerECO1->SetValue( layer_mask[Eco1_User] );
752  m_PadLayerECO2->SetValue( layer_mask[Eco2_User] );
753 
754  m_PadLayerDraft->SetValue( layer_mask[Dwgs_User] );
755 }
static LSET AllCuMask(int aCuLayerCount=MAX_CU_LAYERS)
Function AllCuMask returns a mask holding the requested number of Cu PCB_LAYER_IDs.
Definition: lset.cpp:639
Class LSET is a set of PCB_LAYER_IDs.
bool DIALOG_SHIM::Show ( bool  show)
overrideinherited

Definition at line 139 of file dialog_shim.cpp.

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

Referenced by DisplayHotkeyList(), DIALOG_SHIM::EndQuasiModal(), InvokeDialogERC(), DIALOG_ANNOTATE::OnApplyClick(), DIALOG_SCH_FIND::OnCancel(), DIALOG_ANNOTATE::OnCancelClick(), DIALOG_DRC_CONTROL::OnLeftDClickClearance(), DIALOG_DRC_CONTROL::OnLeftDClickUnconnected(), DIALOG_DRC_CONTROL::OnPopupMenu(), DIALOG_EXCHANGE_MODULE::OnQuit(), POSITION_RELATIVE_TOOL::PositionRelative(), CVPCB_MAINFRAME::ReadNetListAndFpFiles(), DRC::ShowDRCDialog(), and DIALOG_SHIM::ShowQuasiModal().

140 {
141  bool ret;
142  const char* hash_key;
143 
144  if( m_hash_key.size() )
145  {
146  // a special case like EDA_LIST_DIALOG, which has multiple uses.
147  hash_key = m_hash_key.c_str();
148  }
149  else
150  {
151  hash_key = typeid(*this).name();
152  }
153 
154  // Show or hide the window. If hiding, save current position and size.
155  // If showing, use previous position and size.
156  if( show )
157  {
158  wxDialog::Raise(); // Needed on OS X and some other window managers (i.e. Unity)
159  ret = wxDialog::Show( show );
160 
161  // classname is key, returns a zeroed out default EDA_RECT if none existed before.
162  EDA_RECT r = class_map[ hash_key ];
163 
164  if( r.GetSize().x != 0 && r.GetSize().y != 0 )
165  SetSize( r.GetPosition().x, r.GetPosition().y, r.GetSize().x, r.GetSize().y, 0 );
166  }
167  else
168  {
169  // Save the dialog's position & size before hiding, using classname as key
170  EDA_RECT r( wxDialog::GetPosition(), wxDialog::GetSize() );
171  class_map[ hash_key ] = r;
172 
173  ret = wxDialog::Show( show );
174  }
175 
177 
178  return ret;
179 }
std::string m_hash_key
Definition: dialog_shim.h:128
void FixOSXCancelButtonIssue()
A ugly hack to fix an issue on OSX: when typing ctrl+c in a wxTextCtrl inside a dialog, it is closed instead of copying a text if a button with wxID_CANCEL is used in a wxStdDialogButtonSizer, when the dlg is created by wxFormBuilder: the label is &Cancel, and this accelerator key has priority to copy text standard accelerator, and the dlg is closed when trying to copy text this function do nothing on other platforms.
static RECT_MAP class_map
const wxPoint & GetPosition() const
Class EDA_RECT handles the component boundary box.
const wxSize & GetSize() const
int DIALOG_SHIM::ShowQuasiModal ( )
inherited

Definition at line 495 of file dialog_shim.cpp.

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

Referenced by LIB_EDIT_FRAME::DeleteOnePart(), SCH_EDIT_FRAME::EditComponent(), SCH_EDIT_FRAME::EditComponentFieldText(), LIB_EDIT_FRAME::EditField(), EDIT_TOOL::ExchangeFootprints(), PCB_EDIT_FRAME::InstallExchangeModuleFrame(), LIB_EDIT_FRAME::InstallFieldsEditorDialog(), InvokeDialogCreateBOMEditor(), LIB_VIEW_FRAME::OnSelectSymbol(), and SCH_BASE_FRAME::SelectComponentFromLibrary().

496 {
497  // This is an exception safe way to zero a pointer before returning.
498  // Yes, even though DismissModal() clears this first normally, this is
499  // here in case there's an exception before the dialog is dismissed.
500  struct NULLER
501  {
502  void*& m_what;
503  NULLER( void*& aPtr ) : m_what( aPtr ) {}
504  ~NULLER() { m_what = 0; } // indeed, set it to NULL on destruction
505  } clear_this( (void*&) m_qmodal_loop );
506 
507  // release the mouse if it's currently captured as the window having it
508  // will be disabled when this dialog is shown -- but will still keep the
509  // capture making it impossible to do anything in the modal dialog itself
510  wxWindow* win = wxWindow::GetCapture();
511  if( win )
512  win->ReleaseMouse();
513 
514  // Get the optimal parent
515  wxWindow* parent = GetParentForModalDialog( GetParent(), GetWindowStyle() );
516 
517  // Show the optimal parent
518  DBG( if( parent ) printf( "%s: optimal parent: %s\n", __func__, typeid(*parent).name() );)
519 
520  wxASSERT_MSG( !m_qmodal_parent_disabler,
521  wxT( "Caller using ShowQuasiModal() twice on same window?" ) );
522 
523  // quasi-modal: disable only my "optimal" parent
525 
526  Show( true );
527 
528  m_qmodal_showing = true;
529 
530  EVENT_LOOP event_loop;
531 
532  m_qmodal_loop = &event_loop;
533 
534  event_loop.Run();
535 
536  return GetReturnCode();
537 }
bool m_qmodal_showing
Definition: dialog_shim.h:132
EVENT_LOOP * m_qmodal_loop
Definition: dialog_shim.h:131
bool Show(bool show) override
WDO_ENABLE_DISABLE * m_qmodal_parent_disabler
Definition: dialog_shim.h:133
Toggle a window's "enable" status to disabled, then enabled on destruction.
Definition: dialog_shim.cpp:33
#define DBG(x)
Definition: fctsys.h:33
bool DIALOG_PAD_PROPERTIES::TransferDataFromWindow ( )
overrideprivate

Updates the different parameters for the component being edited.

Automatically fired from the OK button click.

Definition at line 933 of file dialog_pad_properties.cpp.

References MODULE::CalculateBoundingBox(), EDA_ITEM::ClearFlags(), DisplayError(), DO_NOT_DRAW, BOARD::FindNet(), FlipLayerMask(), D_PAD::GetAttribute(), D_PAD::GetBoundingBox(), EDA_DRAW_FRAME::GetCanvas(), D_PAD::GetDelta(), D_PAD::GetDrillShape(), D_PAD::GetDrillSize(), D_PAD::GetLayerSet(), D_PAD::GetLocalClearance(), D_PAD::GetLocalSolderMaskMargin(), D_PAD::GetLocalSolderPasteMargin(), D_PAD::GetLocalSolderPasteMarginRatio(), NETINFO_ITEM::GetNet(), BOARD_CONNECTED_ITEM::GetNetname(), D_PAD::GetOffset(), MODULE::GetOrientation(), D_PAD::GetOrientation(), D_PAD::GetPadName(), D_PAD::GetPadToDieLength(), D_PAD::GetParent(), MODULE::GetPosition(), D_PAD::GetPosition(), D_PAD::GetRoundRectRadiusRatio(), D_PAD::GetShape(), D_PAD::GetSize(), D_PAD::GetThermalGap(), D_PAD::GetThermalWidth(), D_PAD::GetZoneConnection(), m_board, m_currentPad, m_isFlipped, DIALOG_PAD_PROPERTIES_BASE::m_localSettingsPanel, m_padMaster, DIALOG_PAD_PROPERTIES_BASE::m_PadNetNameCtrl, DIALOG_PAD_PROPERTIES_BASE::m_panelGeneral, m_parent, BOARD::m_Status_Pcb, COMMIT::Modify(), PAD_ATTRIB_HOLE_NOT_PLATED, PAD_SHAPE_RECT, PAD_SHAPE_ROUNDRECT, padValuesOK(), BOARD_COMMIT::Push(), EDA_DRAW_PANEL::RefreshDrawingRect(), RotatePoint(), D_PAD::SetAttribute(), D_PAD::SetDelta(), D_PAD::SetDrillShape(), D_PAD::SetDrillSize(), EDA_ITEM::SetFlags(), MODULE::SetLastEditTime(), D_PAD::SetLayerSet(), D_PAD::SetLocalClearance(), D_PAD::SetLocalSolderMaskMargin(), D_PAD::SetLocalSolderPasteMargin(), D_PAD::SetLocalSolderPasteMarginRatio(), EDA_DRAW_FRAME::SetMsgPanel(), BOARD_CONNECTED_ITEM::SetNetCode(), D_PAD::SetOffset(), D_PAD::SetOrientation(), D_PAD::SetPadName(), D_PAD::SetPadToDieLength(), D_PAD::SetPos0(), D_PAD::SetPosition(), D_PAD::SetRoundRectRadiusRatio(), D_PAD::SetShape(), D_PAD::SetSize(), D_PAD::SetThermalGap(), D_PAD::SetThermalWidth(), D_PAD::SetZoneConnection(), transferDataToPad(), NETINFO_LIST::UNCONNECTED, and wxPoint::y.

934 {
935  BOARD_COMMIT commit( m_parent );
936 
937  if( !wxDialog::TransferDataFromWindow() )
938  return false;
939 
940  if( !m_panelGeneral->TransferDataFromWindow() )
941  return false;
942 
943  if( !m_localSettingsPanel->TransferDataFromWindow() )
944  return false;
945 
946  if( !padValuesOK() )
947  return false;
948 
949  bool rastnestIsChanged = false;
950  int isign = m_isFlipped ? -1 : 1;
951 
953  // m_padMaster is a pattern: ensure there is no net for this pad:
955 
956  if( !m_currentPad ) // Set current Pad parameters
957  return true;
958 
959  commit.Modify( m_currentPad );
960 
961  // redraw the area where the pad was, without pad (delete pad on screen)
965 
966  // Update values
969 
971  {
973  rastnestIsChanged = true;
974  }
975 
976  wxSize size;
977  MODULE* footprint = m_currentPad->GetParent();
978 
979  if( footprint )
980  {
981  footprint->SetLastEditTime();
982 
983  // compute the pos 0 value, i.e. pad position for footprint with orientation = 0
984  // i.e. relative to footprint origin (footprint position)
985  wxPoint pt = m_currentPad->GetPosition() - footprint->GetPosition();
986  RotatePoint( &pt, -footprint->GetOrientation() );
987  m_currentPad->SetPos0( pt );
989  + footprint->GetOrientation() );
990  }
991 
993 
994  size = m_padMaster->GetDelta();
995  size.y *= isign;
996  m_currentPad->SetDelta( size );
997 
1000 
1001  wxPoint offset = m_padMaster->GetOffset();
1002  offset.y *= isign;
1003  m_currentPad->SetOffset( offset );
1004 
1006 
1008  {
1009  rastnestIsChanged = true;
1011  }
1012 
1013  if( m_isFlipped )
1014  {
1016  }
1017 
1019 
1020  wxString padNetname;
1021 
1022  // For PAD_ATTRIB_HOLE_NOT_PLATED, ensure there is no net name selected
1024  padNetname = m_PadNetNameCtrl->GetValue();
1025 
1026  if( m_currentPad->GetNetname() != padNetname )
1027  {
1028  const NETINFO_ITEM* netinfo = m_board->FindNet( padNetname );
1029 
1030  if( !padNetname.IsEmpty() && netinfo == NULL )
1031  {
1032  DisplayError( NULL, _( "Unknown netname, netname not changed" ) );
1033  }
1034  else if( netinfo )
1035  {
1036  rastnestIsChanged = true;
1037  m_currentPad->SetNetCode( netinfo->GetNet() );
1038  }
1039  }
1040 
1049 
1050  // rounded rect pads with radius ratio = 0 are in fact rect pads.
1051  // So set the right shape (and perhaps issues with a radius = 0)
1054  {
1056  }
1057 
1058  if( footprint )
1059  footprint->CalculateBoundingBox();
1060 
1062 
1063  // redraw the area where the pad was
1065 
1066  commit.Push( _( "Modify pad" ) );
1067 
1068  if( rastnestIsChanged ) // The net ratsnest must be recalculated
1069  m_board->m_Status_Pcb = 0;
1070 
1071  return true;
1072 }
LSET FlipLayerMask(LSET aMask, int aCopperLayersCount)
Calculate the mask layer when flipping a footprint BACK and FRONT copper layers, mask, paste, solder layers are swapped internal layers are flipped only if the copper layers count is known.
Definition: lset.cpp:491
PAD_ATTR_T GetAttribute() const
Definition: class_pad.h:238
like PAD_STANDARD, but not plated mechanical use only, no connection allowed
Definition: pad_shapes.h:63
EDA_DRAW_PANEL * GetCanvas()
Definition: draw_frame.h:299
void CalculateBoundingBox()
Function CalculateBoundingBox calculates the bounding box in board coordinates.
int GetPadToDieLength() const
Definition: class_pad.h:241
bool transferDataToPad(D_PAD *aPad)
Copy values from dialog field to aPad's members.
const wxPoint & GetPosition() const override
Definition: class_module.h:155
int GetLocalSolderMaskMargin() const
Definition: class_pad.h:243
MODULE * GetParent() const
Definition: class_pad.h:108
void SetPosition(const wxPoint &aPos) override
Definition: class_pad.h:169
void RefreshDrawingRect(const EDA_RECT &aRect, bool aEraseBackground=true)
Function RefreshDrawingRect redraws the contents of aRect in drawing units.
Definition: draw_panel.cpp:306
PAD_DRILL_SHAPE_T GetDrillShape() const
Definition: class_pad.h:221
void SetDrillSize(const wxSize &aSize)
Definition: class_pad.h:187
void RotatePoint(int *pX, int *pY, double angle)
Definition: trigo.cpp:317
const wxSize & GetDrillSize() const
Definition: class_pad.h:188
void SetRoundRectRadiusRatio(double aRadiusScale)
has meaning only for rounded rect pads Set the scaling factor between the smaller Y or Y size and the...
Definition: class_pad.h:462
void SetLastEditTime(time_t aTime)
Definition: class_module.h:282
PAD_SHAPE_T GetShape() const
Function GetShape.
Definition: class_pad.h:166
void SetFlags(STATUS_FLAGS aMask)
Definition: base_struct.h:253
void SetZoneConnection(ZoneConnection aType)
Definition: class_pad.h:309
void SetMsgPanel(const std::vector< MSG_PANEL_ITEM > &aList)
Function SetMsgPanel clears the message panel and populates it with the contents of aList...
Definition: draw_frame.cpp:773
double GetOrientation() const
Definition: class_module.h:160
void SetPos0(const wxPoint &aPos)
Definition: class_pad.h:175
const wxPoint & GetPosition() const override
Definition: class_pad.h:170
ZoneConnection GetZoneConnection() const
Definition: class_pad.cpp:610
LSET GetLayerSet() const override
Function GetLayerSet returns a "layer mask", which is a bitmap of all layers on which the TRACK segme...
Definition: class_pad.h:235
int GetThermalWidth() const
Definition: class_pad.cpp:621
int GetThermalGap() const
Definition: class_pad.cpp:632
void SetThermalWidth(int aWidth)
Definition: class_pad.h:312
const wxSize & GetSize() const
Definition: class_pad.h:182
void SetSize(const wxSize &aSize)
Definition: class_pad.h:181
bool SetNetCode(int aNetCode, bool aNoAssert=false)
Function SetNetCode sets net using a net code.
int GetLocalSolderPasteMargin() const
Definition: class_pad.h:249
void SetPadToDieLength(int aLength)
Definition: class_pad.h:240
int GetNet() const
Function GetNet.
void SetAttribute(PAD_ATTR_T aAttribute)
Definition: class_pad.cpp:348
int GetLocalClearance() const
Definition: class_pad.h:246
void SetLocalClearance(int aClearance)
Definition: class_pad.h:247
double GetLocalSolderPasteMarginRatio() const
Definition: class_pad.h:252
void SetLocalSolderPasteMarginRatio(double aRatio)
Definition: class_pad.h:253
void SetLayerSet(LSET aLayerMask)
Definition: class_pad.h:234
Class NETINFO_ITEM handles the data for a net.
Definition: class_netinfo.h:69
const wxString & GetNetname() const
Function GetNetname.
double GetRoundRectRadiusRatio() const
has meaning only for rounded rect pads
Definition: class_pad.h:450
void SetDrillShape(PAD_DRILL_SHAPE_T aDrillShape)
Definition: class_pad.h:218
void SetLocalSolderMaskMargin(int aMargin)
Definition: class_pad.h:244
double GetOrientation() const
Function GetOrientation returns the rotation angle of the pad in tenths of degrees, but soon degrees.
Definition: class_pad.h:214
const wxSize & GetDelta() const
Definition: class_pad.h:185
NETINFO_ITEM * FindNet(int aNetcode) const
Function FindNet searches for a net with the given netcode.
void SetShape(PAD_SHAPE_T aShape)
Definition: class_pad.h:167
void SetPadName(const wxString &name)
Set the pad name (sometimes called pad number, although it can be an array ref like AA12 the pad name...
Definition: class_pad.cpp:455
void SetOrientation(double aAngle)
Function SetOrientation sets the rotation angle of the pad.
Definition: class_pad.cpp:357
void ClearFlags(STATUS_FLAGS aMask=EDA_ITEM_ALL_FLAGS)
Definition: base_struct.h:254
bool padValuesOK()
test if all values are acceptable for the pad
void SetLocalSolderPasteMargin(int aMargin)
Definition: class_pad.h:250
wxString GetPadName() const
Definition: class_pad.cpp:433
void SetOffset(const wxPoint &aOffset)
Definition: class_pad.h:190
void DisplayError(wxWindow *parent, const wxString &text, int displaytime)
Function DisplayError displays an error or warning message box with aMessage.
Definition: confirm.cpp:71
void SetThermalGap(int aGap)
Definition: class_pad.h:315
static const int UNCONNECTED
Constant that holds the "unconnected net" number (typically 0) all items "connected" to this net are ...
const EDA_RECT GetBoundingBox() const override
Function GetBoundingBox returns the orthogonal, bounding box of this object for display purposes...
Definition: class_pad.cpp:181
const wxPoint & GetOffset() const
Definition: class_pad.h:191
#define DO_NOT_DRAW
Used to disable draw function.
Definition: base_struct.h:125
void SetDelta(const wxSize &aSize)
Definition: class_pad.h:184
int m_Status_Pcb
Flags used in ratsnest calculation and update.
Definition: class_board.h:237
bool DIALOG_PAD_PROPERTIES::transferDataToPad ( D_PAD aPad)
private

Copy values from dialog field to aPad's members.

Definition at line 1075 of file dialog_pad_properties.cpp.

References LSET::AllCuMask(), B_Adhes, B_Cu, B_Mask, B_Paste, B_SilkS, code_shape, code_type, delta, DisplayError(), Dwgs_User, Eco1_User, Eco2_User, F_Adhes, F_Cu, F_Mask, F_Paste, F_SilkS, BOARD::FindNet(), D_PAD::GetAttribute(), NETINFO_ITEM::GetNet(), D_PAD::GetShape(), D_PAD::GetSize(), m_board, DIALOG_PAD_PROPERTIES_BASE::m_DrillShapeCtrl, DIALOG_PAD_PROPERTIES_BASE::m_LengthPadToDieCtrl, DIALOG_PAD_PROPERTIES_BASE::m_localSettingsPanel, DIALOG_PAD_PROPERTIES_BASE::m_NetClearanceValueCtrl, m_OrientValidator, m_OrientValue, DIALOG_PAD_PROPERTIES_BASE::m_PadDrill_X_Ctrl, DIALOG_PAD_PROPERTIES_BASE::m_PadDrill_Y_Ctrl, DIALOG_PAD_PROPERTIES_BASE::m_PadLayerAdhCmp, DIALOG_PAD_PROPERTIES_BASE::m_PadLayerAdhCu, DIALOG_PAD_PROPERTIES_BASE::m_PadLayerDraft, DIALOG_PAD_PROPERTIES_BASE::m_PadLayerECO1, DIALOG_PAD_PROPERTIES_BASE::m_PadLayerECO2, DIALOG_PAD_PROPERTIES_BASE::m_PadLayerMaskCmp, DIALOG_PAD_PROPERTIES_BASE::m_PadLayerMaskCu, DIALOG_PAD_PROPERTIES_BASE::m_PadLayerPateCmp, DIALOG_PAD_PROPERTIES_BASE::m_PadLayerPateCu, DIALOG_PAD_PROPERTIES_BASE::m_PadLayerSilkCmp, DIALOG_PAD_PROPERTIES_BASE::m_PadLayerSilkCu, DIALOG_PAD_PROPERTIES_BASE::m_PadNetNameCtrl, DIALOG_PAD_PROPERTIES_BASE::m_PadNumCtrl, DIALOG_PAD_PROPERTIES_BASE::m_PadPosition_X_Ctrl, DIALOG_PAD_PROPERTIES_BASE::m_PadPosition_Y_Ctrl, DIALOG_PAD_PROPERTIES_BASE::m_PadShape, DIALOG_PAD_PROPERTIES_BASE::m_PadType, DIALOG_PAD_PROPERTIES_BASE::m_panelGeneral, DIALOG_PAD_PROPERTIES_BASE::m_rbCopperLayersSel, DIALOG_PAD_PROPERTIES_BASE::m_ShapeDelta_Ctrl, DIALOG_PAD_PROPERTIES_BASE::m_ShapeOffset_X_Ctrl, DIALOG_PAD_PROPERTIES_BASE::m_ShapeOffset_Y_Ctrl, DIALOG_PAD_PROPERTIES_BASE::m_ShapeSize_X_Ctrl, DIALOG_PAD_PROPERTIES_BASE::m_ShapeSize_Y_Ctrl, DIALOG_PAD_PROPERTIES_BASE::m_SolderMaskMarginCtrl, DIALOG_PAD_PROPERTIES_BASE::m_SolderPasteMarginCtrl, DIALOG_PAD_PROPERTIES_BASE::m_SolderPasteMarginRatioCtrl, DIALOG_PAD_PROPERTIES_BASE::m_tcCornerSizeRatio, DIALOG_PAD_PROPERTIES_BASE::m_ThermalGapCtrl, DIALOG_PAD_PROPERTIES_BASE::m_ThermalWidthCtrl, DIALOG_PAD_PROPERTIES_BASE::m_trapDeltaDirChoice, DIALOG_PAD_PROPERTIES_BASE::m_ZoneConnectionChoice, PAD_ATTRIB_CONN, PAD_ATTRIB_HOLE_NOT_PLATED, PAD_ATTRIB_SMD, PAD_ATTRIB_STANDARD, PAD_DRILL_SHAPE_CIRCLE, PAD_DRILL_SHAPE_OBLONG, PAD_SHAPE_CIRCLE, PAD_SHAPE_OVAL, PAD_SHAPE_RECT, PAD_SHAPE_ROUNDRECT, PAD_SHAPE_TRAPEZOID, PAD_ZONE_CONN_FULL, PAD_ZONE_CONN_INHERITED, PAD_ZONE_CONN_NONE, PAD_ZONE_CONN_THERMAL, D_PAD::SetAttribute(), D_PAD::SetDelta(), D_PAD::SetDrillShape(), D_PAD::SetDrillSize(), D_PAD::SetLayerSet(), D_PAD::SetLocalClearance(), D_PAD::SetLocalSolderMaskMargin(), D_PAD::SetLocalSolderPasteMargin(), D_PAD::SetLocalSolderPasteMarginRatio(), BOARD_CONNECTED_ITEM::SetNetCode(), D_PAD::SetOffset(), D_PAD::SetOrientation(), D_PAD::SetPadName(), D_PAD::SetPadToDieLength(), D_PAD::SetPos0(), D_PAD::SetPosition(), D_PAD::SetRoundRectRadiusRatio(), D_PAD::SetShape(), D_PAD::SetSize(), D_PAD::SetThermalGap(), D_PAD::SetThermalWidth(), D_PAD::SetZoneConnection(), NETINFO_LIST::UNCONNECTED, and ValueFromTextCtrl().

Referenced by onCornerSizePercentChange(), OnDrillShapeSelected(), OnPadShapeSelection(), OnSetLayers(), OnValuesChanged(), PadOrientEvent(), padValuesOK(), and TransferDataFromWindow().

1076 {
1077  wxString msg;
1078  int x, y;
1079 
1080  if( !Validate() )
1081  return true;
1082  if( !m_panelGeneral->Validate() )
1083  return true;
1084  if( !m_localSettingsPanel->Validate() )
1085  return true;
1086 
1087  m_OrientValidator.TransferFromWindow();
1088 
1089  aPad->SetAttribute( code_type[m_PadType->GetSelection()] );
1090  aPad->SetShape( code_shape[m_PadShape->GetSelection()] );
1091 
1092 
1093  // Read pad clearances values:
1099  double dtmp = 0.0;
1100  msg = m_SolderPasteMarginRatioCtrl->GetValue();
1101  msg.ToDouble( &dtmp );
1102 
1103  // A -50% margin ratio means no paste on a pad, the ratio must be >= -50%
1104  if( dtmp < -50.0 )
1105  dtmp = -50.0;
1106  // A margin ratio is always <= 0
1107  // 0 means use full pad copper area
1108  if( dtmp > 0.0 )
1109  dtmp = 0.0;
1110 
1111  aPad->SetLocalSolderPasteMarginRatio( dtmp / 100 );
1112 
1113  switch( m_ZoneConnectionChoice->GetSelection() )
1114  {
1115  default:
1116  case 0:
1118  break;
1119 
1120  case 1:
1122  break;
1123 
1124  case 2:
1126  break;
1127 
1128  case 3:
1130  break;
1131  }
1132 
1133  // Read pad position:
1136 
1137  aPad->SetPosition( wxPoint( x, y ) );
1138  aPad->SetPos0( wxPoint( x, y ) );
1139 
1140  // Read pad drill:
1143 
1144  if( m_DrillShapeCtrl->GetSelection() == 0 )
1145  {
1147  y = x;
1148  }
1149  else
1151 
1152  aPad->SetDrillSize( wxSize( x, y ) );
1153 
1154  // Read pad shape size:
1157 
1158  if( aPad->GetShape() == PAD_SHAPE_CIRCLE )
1159  y = x;
1160 
1161  aPad->SetSize( wxSize( x, y ) );
1162 
1163  // Read pad length die
1165 
1166  // For a trapezoid, test delta value (be sure delta is not too large for pad size)
1167  // remember DeltaSize.x is the Y size variation
1168  bool error = false;
1169 
1170  if( aPad->GetShape() == PAD_SHAPE_TRAPEZOID )
1171  {
1172  wxSize delta;
1173 
1174  // For a trapezoid, only one of delta.x or delta.y is not 0, depending on
1175  // the direction.
1176  if( m_trapDeltaDirChoice->GetSelection() == 0 )
1177  delta.x = ValueFromTextCtrl( *m_ShapeDelta_Ctrl );
1178  else
1179  delta.y = ValueFromTextCtrl( *m_ShapeDelta_Ctrl );
1180 
1181  if( delta.x < 0 && delta.x <= -aPad->GetSize().y )
1182  {
1183  delta.x = -aPad->GetSize().y + 2;
1184  error = true;
1185  }
1186 
1187  if( delta.x > 0 && delta.x >= aPad->GetSize().y )
1188  {
1189  delta.x = aPad->GetSize().y - 2;
1190  error = true;
1191  }
1192 
1193  if( delta.y < 0 && delta.y <= -aPad->GetSize().x )
1194  {
1195  delta.y = -aPad->GetSize().x + 2;
1196  error = true;
1197  }
1198 
1199  if( delta.y > 0 && delta.y >= aPad->GetSize().x )
1200  {
1201  delta.y = aPad->GetSize().x - 2;
1202  error = true;
1203  }
1204 
1205  aPad->SetDelta( delta );
1206  }
1207 
1208  // Read pad shape offset:
1211  aPad->SetOffset( wxPoint( x, y ) );
1212 
1213  aPad->SetOrientation( m_OrientValue * 10.0 );
1214 
1215  msg = m_PadNumCtrl->GetValue().Left( 4 );
1216  aPad->SetPadName( msg );
1217 
1218  // Check if user has set an existing net name
1219  const NETINFO_ITEM* netinfo = m_board->FindNet( m_PadNetNameCtrl->GetValue() );
1220 
1221  if( netinfo != NULL )
1222  aPad->SetNetCode( netinfo->GetNet() );
1223  else
1225 
1226  // Clear some values, according to the pad type and shape
1227  switch( aPad->GetShape() )
1228  {
1229  case PAD_SHAPE_CIRCLE:
1230  aPad->SetOffset( wxPoint( 0, 0 ) );
1231  aPad->SetDelta( wxSize( 0, 0 ) );
1232  x = aPad->GetSize().x;
1233  aPad->SetSize( wxSize( x, x ) );
1234  break;
1235 
1236  case PAD_SHAPE_RECT:
1237  aPad->SetDelta( wxSize( 0, 0 ) );
1238  break;
1239 
1240  case PAD_SHAPE_OVAL:
1241  aPad->SetDelta( wxSize( 0, 0 ) );
1242  break;
1243 
1244  case PAD_SHAPE_TRAPEZOID:
1245  break;
1246 
1247  case PAD_SHAPE_ROUNDRECT:
1248  aPad->SetDelta( wxSize( 0, 0 ) );
1249  break;
1250 
1251  default:
1252  ;
1253  }
1254 
1255  switch( aPad->GetAttribute() )
1256  {
1257  case PAD_ATTRIB_STANDARD:
1258  break;
1259 
1260  case PAD_ATTRIB_CONN:
1261  case PAD_ATTRIB_SMD:
1262  // SMD and PAD_ATTRIB_CONN has no hole.
1263  // basically, SMD and PAD_ATTRIB_CONN are same type of pads
1264  // PAD_ATTRIB_CONN has just a default non technical layers that differs from SMD
1265  // and are intended to be used in virtual edge board connectors
1266  // However we can accept a non null offset,
1267  // mainly to allow complex pads build from a set of basic pad shapes
1268  aPad->SetDrillSize( wxSize( 0, 0 ) );
1269  break;
1270 
1272  // Mechanical purpose only:
1273  // no offset, no net name, no pad name allowed
1274  aPad->SetOffset( wxPoint( 0, 0 ) );
1275  aPad->SetPadName( wxEmptyString );
1277  break;
1278 
1279  default:
1280  DisplayError( NULL, wxT( "Error: unknown pad type" ) );
1281  break;
1282  }
1283 
1284  if( aPad->GetShape() == PAD_SHAPE_ROUNDRECT )
1285  {
1286  wxString value = m_tcCornerSizeRatio->GetValue();
1287  double rrRadiusRatioPercent;
1288 
1289  if( value.ToDouble( &rrRadiusRatioPercent ) )
1290  aPad->SetRoundRectRadiusRatio( rrRadiusRatioPercent / 100.0 );
1291  }
1292 
1293  LSET padLayerMask;
1294 
1295  switch( m_rbCopperLayersSel->GetSelection() )
1296  {
1297  case 0:
1298  padLayerMask.set( F_Cu );
1299  break;
1300 
1301  case 1:
1302  padLayerMask.set( B_Cu );
1303  break;
1304 
1305  case 2:
1306  padLayerMask |= LSET::AllCuMask();
1307  break;
1308 
1309  case 3: // No copper layers
1310  break;
1311  }
1312 
1313  if( m_PadLayerAdhCmp->GetValue() )
1314  padLayerMask.set( F_Adhes );
1315 
1316  if( m_PadLayerAdhCu->GetValue() )
1317  padLayerMask.set( B_Adhes );
1318 
1319  if( m_PadLayerPateCmp->GetValue() )
1320  padLayerMask.set( F_Paste );
1321 
1322  if( m_PadLayerPateCu->GetValue() )
1323  padLayerMask.set( B_Paste );
1324 
1325  if( m_PadLayerSilkCmp->GetValue() )
1326  padLayerMask.set( F_SilkS );
1327 
1328  if( m_PadLayerSilkCu->GetValue() )
1329  padLayerMask.set( B_SilkS );
1330 
1331  if( m_PadLayerMaskCmp->GetValue() )
1332  padLayerMask.set( F_Mask );
1333 
1334  if( m_PadLayerMaskCu->GetValue() )
1335  padLayerMask.set( B_Mask );
1336 
1337  if( m_PadLayerECO1->GetValue() )
1338  padLayerMask.set( Eco1_User );
1339 
1340  if( m_PadLayerECO2->GetValue() )
1341  padLayerMask.set( Eco2_User );
1342 
1343  if( m_PadLayerDraft->GetValue() )
1344  padLayerMask.set( Dwgs_User );
1345 
1346  aPad->SetLayerSet( padLayerMask );
1347 
1348  return error;
1349 }
static LSET AllCuMask(int aCuLayerCount=MAX_CU_LAYERS)
Function AllCuMask returns a mask holding the requested number of Cu PCB_LAYER_IDs.
Definition: lset.cpp:639
PAD_ATTR_T GetAttribute() const
Definition: class_pad.h:238
like PAD_STANDARD, but not plated mechanical use only, no connection allowed
Definition: pad_shapes.h:63
Smd pad, appears on the solder paste layer (default)
Definition: pad_shapes.h:59
wxFloatingPointValidator< double > m_OrientValidator
void SetPosition(const wxPoint &aPos) override
Definition: class_pad.h:169
void SetDrillSize(const wxSize &aSize)
Definition: class_pad.h:187
void SetRoundRectRadiusRatio(double aRadiusScale)
has meaning only for rounded rect pads Set the scaling factor between the smaller Y or Y size and the...
Definition: class_pad.h:462
PAD_SHAPE_T GetShape() const
Function GetShape.
Definition: class_pad.h:166
static const int delta[8][2]
Definition: solve.cpp:112
static PAD_SHAPE_T code_shape[]
Pads are not covered.
Definition: zones.h:57
static PAD_ATTR_T code_type[]
Class LSET is a set of PCB_LAYER_IDs.
void SetZoneConnection(ZoneConnection aType)
Definition: class_pad.h:309
void SetPos0(const wxPoint &aPos)
Definition: class_pad.h:175
void SetThermalWidth(int aWidth)
Definition: class_pad.h:312
const wxSize & GetSize() const
Definition: class_pad.h:182
void SetSize(const wxSize &aSize)
Definition: class_pad.h:181
bool SetNetCode(int aNetCode, bool aNoAssert=false)
Function SetNetCode sets net using a net code.
void SetPadToDieLength(int aLength)
Definition: class_pad.h:240
int GetNet() const
Function GetNet.
int ValueFromTextCtrl(const wxTextCtrl &aTextCtr)
Convert the number Value in a string according to the internal units and the selected unit (g_UserUni...
Definition: base_units.cpp:384
Like smd, does not appear on the solder paste layer (default) note also has a special attribute in Ge...
Definition: pad_shapes.h:60
void SetAttribute(PAD_ATTR_T aAttribute)
Definition: class_pad.cpp:348
void SetLocalClearance(int aClearance)
Definition: class_pad.h:247
void SetLocalSolderPasteMarginRatio(double aRatio)
Definition: class_pad.h:253
void SetLayerSet(LSET aLayerMask)
Definition: class_pad.h:234
Class NETINFO_ITEM handles the data for a net.
Definition: class_netinfo.h:69
void SetDrillShape(PAD_DRILL_SHAPE_T aDrillShape)
Definition: class_pad.h:218
void SetLocalSolderMaskMargin(int aMargin)
Definition: class_pad.h:244
Usual pad.
Definition: pad_shapes.h:58
NETINFO_ITEM * FindNet(int aNetcode) const
Function FindNet searches for a net with the given netcode.
void SetShape(PAD_SHAPE_T aShape)
Definition: class_pad.h:167
void SetPadName(const wxString &name)
Set the pad name (sometimes called pad number, although it can be an array ref like AA12 the pad name...
Definition: class_pad.cpp:455
void SetOrientation(double aAngle)
Function SetOrientation sets the rotation angle of the pad.
Definition: class_pad.cpp:357
void SetLocalSolderPasteMargin(int aMargin)
Definition: class_pad.h:250
void SetOffset(const wxPoint &aOffset)
Definition: class_pad.h:190
void DisplayError(wxWindow *parent, const wxString &text, int displaytime)
Function DisplayError displays an error or warning message box with aMessage.
Definition: confirm.cpp:71
void SetThermalGap(int aGap)
Definition: class_pad.h:315
static const int UNCONNECTED
Constant that holds the "unconnected net" number (typically 0) all items "connected" to this net are ...
Use thermal relief for pads.
Definition: zones.h:58
void SetDelta(const wxSize &aSize)
Definition: class_pad.h:184
pads are covered by copper
Definition: zones.h:59
bool DIALOG_PAD_PROPERTIES::TransferDataToWindow ( )
overrideprivate

Definition at line 918 of file dialog_pad_properties.cpp.

References DIALOG_PAD_PROPERTIES_BASE::m_localSettingsPanel, and DIALOG_PAD_PROPERTIES_BASE::m_panelGeneral.

Referenced by DIALOG_PAD_PROPERTIES().

919 {
920  if( !wxDialog::TransferDataToWindow() )
921  return false;
922 
923  if( !m_panelGeneral->TransferDataToWindow() )
924  return false;
925 
926  if( !m_localSettingsPanel->TransferDataToWindow() )
927  return false;
928 
929  return true;
930 }
void DIALOG_PAD_PROPERTIES::updateRoundRectCornerValues ( )
private

Definition at line 264 of file dialog_pad_properties.cpp.

References Format(), g_UserUnit, D_PAD::GetRoundRectCornerRadius(), D_PAD::GetRoundRectRadiusRatio(), D_PAD::GetShape(), m_dummyPad, DIALOG_PAD_PROPERTIES_BASE::m_staticTextCornerRadiusValue, DIALOG_PAD_PROPERTIES_BASE::m_tcCornerSizeRatio, PAD_SHAPE_RECT, PAD_SHAPE_ROUNDRECT, and StringFromValue().

Referenced by initValues(), OnPadShapeSelection(), and OnValuesChanged().

265 {
266  // Note:
267  // To avoid generating a wxEVT_TEXT event from m_tcCornerSizeRatio
268  // we use ChangeValue instead of SetValue, to set the displayed string
270  {
271  m_tcCornerSizeRatio->ChangeValue( wxString::Format( "%.1f",
275  }
276  else if( m_dummyPad->GetShape() == PAD_SHAPE_RECT )
277  {
278  m_tcCornerSizeRatio->ChangeValue( "0" );
279  m_staticTextCornerRadiusValue->SetLabel( "0" );
280  }
281  else
282  {
283  m_tcCornerSizeRatio->ChangeValue( wxEmptyString );
284  m_staticTextCornerRadiusValue->SetLabel( wxEmptyString );
285  }
286 }
wxString StringFromValue(EDA_UNITS_T aUnit, int aValue, bool aAddUnitSymbol)
Function StringFromValue returns the string from aValue according to units (inch, mm ...
Definition: base_units.cpp:203
int GetRoundRectCornerRadius() const
Function GetRoundRectCornerRadius Has meaning only for rounded rect pads.
Definition: class_pad.h:351
PAD_SHAPE_T GetShape() const
Function GetShape.
Definition: class_pad.h:166
EDA_UNITS_T g_UserUnit
Global variables definitions.
Definition: common.cpp:56
double GetRoundRectRadiusRatio() const
has meaning only for rounded rect pads
Definition: class_pad.h:450
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, CPTREE &aTree)
Function Format outputs a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
Definition: ptree.cpp:205

Member Data Documentation

KIGFX::ORIGIN_VIEWITEM* DIALOG_PAD_PROPERTIES::m_axisOrigin
private

Definition at line 68 of file dialog_pad_properties.h.

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

BOARD* DIALOG_PAD_PROPERTIES::m_board
private
bool DIALOG_PAD_PROPERTIES::m_canEditNetName
private

Definition at line 81 of file dialog_pad_properties.h.

Referenced by initValues(), and PadTypeSelected().

bool DIALOG_PAD_PROPERTIES::m_canUpdate
private

Definition at line 80 of file dialog_pad_properties.h.

Referenced by DIALOG_PAD_PROPERTIES(), and OnValuesChanged().

D_PAD* DIALOG_PAD_PROPERTIES::m_currentPad
private
wxStaticText* DIALOG_PAD_PROPERTIES_BASE::m_customOrientUnits
protectedinherited
KIGFX::GAL_DISPLAY_OPTIONS DIALOG_PAD_PROPERTIES_BASE::m_galOptions
protectedinherited
std::string DIALOG_SHIM::m_hash_key
protectedinherited
bool DIALOG_PAD_PROPERTIES::m_isFlipped
private

Definition at line 78 of file dialog_pad_properties.h.

Referenced by initValues(), and TransferDataFromWindow().

wxTextCtrl* DIALOG_PAD_PROPERTIES_BASE::m_LengthPadToDieCtrl
protectedinherited
wxPanel* DIALOG_PAD_PROPERTIES_BASE::m_localSettingsPanel
protectedinherited
wxStaticText* DIALOG_PAD_PROPERTIES_BASE::m_MaskClearanceTitle
protectedinherited
wxStaticText* DIALOG_PAD_PROPERTIES_BASE::m_NetClearanceUnits
protectedinherited
wxTextCtrl* DIALOG_PAD_PROPERTIES_BASE::m_NetClearanceValueCtrl
protectedinherited
wxNotebook* DIALOG_PAD_PROPERTIES_BASE::m_notebook
protectedinherited
wxFloatingPointValidator<double> DIALOG_PAD_PROPERTIES::m_OrientValidator
private
double DIALOG_PAD_PROPERTIES::m_OrientValue
private

Definition at line 84 of file dialog_pad_properties.h.

Referenced by initValues(), PadOrientEvent(), and transferDataToPad().

wxTextCtrl* DIALOG_PAD_PROPERTIES_BASE::m_PadDrill_X_Ctrl
protectedinherited
wxStaticText* DIALOG_PAD_PROPERTIES_BASE::m_PadDrill_X_Unit
protectedinherited
wxTextCtrl* DIALOG_PAD_PROPERTIES_BASE::m_PadDrill_Y_Ctrl
protectedinherited
wxStaticText* DIALOG_PAD_PROPERTIES_BASE::m_PadDrill_Y_Unit
protectedinherited
wxCheckBox* DIALOG_PAD_PROPERTIES_BASE::m_PadLayerAdhCmp
protectedinherited
wxCheckBox* DIALOG_PAD_PROPERTIES_BASE::m_PadLayerAdhCu
protectedinherited
wxCheckBox* DIALOG_PAD_PROPERTIES_BASE::m_PadLayerDraft
protectedinherited
wxCheckBox* DIALOG_PAD_PROPERTIES_BASE::m_PadLayerECO1
protectedinherited
wxCheckBox* DIALOG_PAD_PROPERTIES_BASE::m_PadLayerECO2
protectedinherited
wxCheckBox* DIALOG_PAD_PROPERTIES_BASE::m_PadLayerMaskCmp
protectedinherited
wxCheckBox* DIALOG_PAD_PROPERTIES_BASE::m_PadLayerMaskCu
protectedinherited
wxCheckBox* DIALOG_PAD_PROPERTIES_BASE::m_PadLayerPateCmp
protectedinherited
wxCheckBox* DIALOG_PAD_PROPERTIES_BASE::m_PadLayerPateCu
protectedinherited
wxCheckBox* DIALOG_PAD_PROPERTIES_BASE::m_PadLayerSilkCmp
protectedinherited
wxCheckBox* DIALOG_PAD_PROPERTIES_BASE::m_PadLayerSilkCu
protectedinherited
wxStaticText* DIALOG_PAD_PROPERTIES_BASE::m_PadLengthDie_Unit
protectedinherited
D_PAD* DIALOG_PAD_PROPERTIES::m_padMaster
private

Definition at line 71 of file dialog_pad_properties.h.

Referenced by DIALOG_PAD_PROPERTIES(), and TransferDataFromWindow().

wxStaticText* DIALOG_PAD_PROPERTIES_BASE::m_PadNameText
protectedinherited
wxStaticText* DIALOG_PAD_PROPERTIES_BASE::m_PadNumText
protectedinherited
wxChoice* DIALOG_PAD_PROPERTIES_BASE::m_PadOrient
protectedinherited
wxTextCtrl* DIALOG_PAD_PROPERTIES_BASE::m_PadOrientCtrl
protectedinherited
wxStaticText* DIALOG_PAD_PROPERTIES_BASE::m_PadOrientText
protectedinherited
wxTextCtrl* DIALOG_PAD_PROPERTIES_BASE::m_PadPosition_X_Ctrl
protectedinherited
wxTextCtrl* DIALOG_PAD_PROPERTIES_BASE::m_PadPosition_Y_Ctrl
protectedinherited
wxStaticText* DIALOG_PAD_PROPERTIES_BASE::m_PadPosX_Unit
protectedinherited
wxStaticText* DIALOG_PAD_PROPERTIES_BASE::m_PadPosY_Unit
protectedinherited
wxStaticText* DIALOG_PAD_PROPERTIES_BASE::m_PadShapeDelta_Unit
protectedinherited
wxStaticText* DIALOG_PAD_PROPERTIES_BASE::m_PadShapeOffsetX_Unit
protectedinherited
wxStaticText* DIALOG_PAD_PROPERTIES_BASE::m_PadShapeOffsetY_Unit
protectedinherited
wxStaticText* DIALOG_PAD_PROPERTIES_BASE::m_PadShapeSizeX_Unit
protectedinherited
wxStaticText* DIALOG_PAD_PROPERTIES_BASE::m_PadShapeSizeY_Unit
protectedinherited
wxPanel* DIALOG_PAD_PROPERTIES_BASE::m_panelGeneral
protectedinherited
wxPanel* DIALOG_PAD_PROPERTIES_BASE::m_panelShowPad
protectedinherited
PCB_DRAW_PANEL_GAL* DIALOG_PAD_PROPERTIES_BASE::m_panelShowPadGal
protectedinherited
PCB_BASE_FRAME* DIALOG_PAD_PROPERTIES::m_parent
private
EVENT_LOOP* DIALOG_SHIM::m_qmodal_loop
protectedinherited

Definition at line 131 of file dialog_shim.h.

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

WDO_ENABLE_DISABLE* DIALOG_SHIM::m_qmodal_parent_disabler
protectedinherited
bool DIALOG_SHIM::m_qmodal_showing
protectedinherited
wxChoice* DIALOG_PAD_PROPERTIES_BASE::m_rbCopperLayersSel
protectedinherited
wxStdDialogButtonSizer* DIALOG_PAD_PROPERTIES_BASE::m_sdbSizer
protectedinherited
wxButton* DIALOG_PAD_PROPERTIES_BASE::m_sdbSizerCancel
protectedinherited
wxButton* DIALOG_PAD_PROPERTIES_BASE::m_sdbSizerOK
protectedinherited
wxTextCtrl* DIALOG_PAD_PROPERTIES_BASE::m_ShapeDelta_Ctrl
protectedinherited
wxTextCtrl* DIALOG_PAD_PROPERTIES_BASE::m_ShapeOffset_X_Ctrl
protectedinherited
wxTextCtrl* DIALOG_PAD_PROPERTIES_BASE::m_ShapeOffset_Y_Ctrl
protectedinherited
wxTextCtrl* DIALOG_PAD_PROPERTIES_BASE::m_ShapeSize_X_Ctrl
protectedinherited
wxTextCtrl* DIALOG_PAD_PROPERTIES_BASE::m_ShapeSize_Y_Ctrl
protectedinherited
wxTextCtrl* DIALOG_PAD_PROPERTIES_BASE::m_SolderMaskMarginCtrl
protectedinherited
wxStaticText* DIALOG_PAD_PROPERTIES_BASE::m_SolderMaskMarginUnits
protectedinherited
wxTextCtrl* DIALOG_PAD_PROPERTIES_BASE::m_SolderPasteMarginCtrl
protectedinherited
wxTextCtrl* DIALOG_PAD_PROPERTIES_BASE::m_SolderPasteMarginRatioCtrl
protectedinherited
wxStaticText* DIALOG_PAD_PROPERTIES_BASE::m_SolderPasteMarginUnits
protectedinherited
wxStaticText* DIALOG_PAD_PROPERTIES_BASE::m_SolderPasteRatioMarginUnits
protectedinherited
wxStaticLine* DIALOG_PAD_PROPERTIES_BASE::m_staticline4
protectedinherited
wxStaticLine* DIALOG_PAD_PROPERTIES_BASE::m_staticline5
protectedinherited
wxStaticLine* DIALOG_PAD_PROPERTIES_BASE::m_staticline6
protectedinherited
wxStaticLine* DIALOG_PAD_PROPERTIES_BASE::m_staticline7
protectedinherited
wxStaticLine* DIALOG_PAD_PROPERTIES_BASE::m_staticline8
protectedinherited
wxStaticLine* DIALOG_PAD_PROPERTIES_BASE::m_staticline9
protectedinherited
wxStaticText* DIALOG_PAD_PROPERTIES_BASE::m_staticModuleRotValue
protectedinherited
wxStaticText* DIALOG_PAD_PROPERTIES_BASE::m_staticModuleSideValue
protectedinherited
wxStaticText* DIALOG_PAD_PROPERTIES_BASE::m_staticText12
protectedinherited
wxStaticText* DIALOG_PAD_PROPERTIES_BASE::m_staticText15
protectedinherited
wxStaticText* DIALOG_PAD_PROPERTIES_BASE::m_staticText17
protectedinherited
wxStaticText* DIALOG_PAD_PROPERTIES_BASE::m_staticText19
protectedinherited
wxStaticText* DIALOG_PAD_PROPERTIES_BASE::m_staticText21
protectedinherited
wxStaticText* DIALOG_PAD_PROPERTIES_BASE::m_staticText23
protectedinherited
wxStaticText* DIALOG_PAD_PROPERTIES_BASE::m_staticText38
protectedinherited
wxStaticText* DIALOG_PAD_PROPERTIES_BASE::m_staticText4
protectedinherited
wxStaticText* DIALOG_PAD_PROPERTIES_BASE::m_staticText40
protectedinherited
wxStaticText* DIALOG_PAD_PROPERTIES_BASE::m_staticText41
protectedinherited
wxStaticText* DIALOG_PAD_PROPERTIES_BASE::m_staticText44
protectedinherited
wxStaticText* DIALOG_PAD_PROPERTIES_BASE::m_staticText45
protectedinherited
wxStaticText* DIALOG_PAD_PROPERTIES_BASE::m_staticText47
protectedinherited
wxStaticText* DIALOG_PAD_PROPERTIES_BASE::m_staticText49
protectedinherited
wxStaticText* DIALOG_PAD_PROPERTIES_BASE::m_staticText491
protectedinherited
wxStaticText* DIALOG_PAD_PROPERTIES_BASE::m_staticText51
protectedinherited
wxStaticText* DIALOG_PAD_PROPERTIES_BASE::m_staticText511
protectedinherited
wxStaticText* DIALOG_PAD_PROPERTIES_BASE::m_staticText52
protectedinherited
wxStaticText* DIALOG_PAD_PROPERTIES_BASE::m_staticText53
protectedinherited
wxStaticText* DIALOG_PAD_PROPERTIES_BASE::m_staticTextCornerRadius
protectedinherited
wxStaticText* DIALOG_PAD_PROPERTIES_BASE::m_staticTextCornerRadiusValue
protectedinherited
wxStaticText* DIALOG_PAD_PROPERTIES_BASE::m_staticTextCornerSizeRatio
protectedinherited
wxStaticText* DIALOG_PAD_PROPERTIES_BASE::m_staticTextCornerSizeRatioUnit
protectedinherited
wxStaticText* DIALOG_PAD_PROPERTIES_BASE::m_staticTextCornerSizeUnit
protectedinherited
wxStaticText* DIALOG_PAD_PROPERTIES_BASE::m_staticTextNetClearance
protectedinherited
wxStaticText* DIALOG_PAD_PROPERTIES_BASE::m_staticTextRatio
protectedinherited
wxStaticText* DIALOG_PAD_PROPERTIES_BASE::m_staticTextSolderPaste
protectedinherited
wxStaticText* DIALOG_PAD_PROPERTIES_BASE::m_staticTextWarning
protectedinherited
wxStaticText* DIALOG_PAD_PROPERTIES_BASE::m_staticTextWarningPadFlipped
protectedinherited
wxStaticText* DIALOG_PAD_PROPERTIES_BASE::m_staticTitleModuleRot
protectedinherited
wxStaticText* DIALOG_PAD_PROPERTIES_BASE::m_staticTitleModuleSide
protectedinherited
wxStaticText* DIALOG_PAD_PROPERTIES_BASE::m_textPadDrillX
protectedinherited
wxStaticText* DIALOG_PAD_PROPERTIES_BASE::m_textPadDrillY
protectedinherited
wxTextCtrl* DIALOG_PAD_PROPERTIES_BASE::m_ThermalGapCtrl
protectedinherited
wxStaticText* DIALOG_PAD_PROPERTIES_BASE::m_ThermalGapUnits
protectedinherited
wxTextCtrl* DIALOG_PAD_PROPERTIES_BASE::m_ThermalWidthCtrl
protectedinherited
wxStaticText* DIALOG_PAD_PROPERTIES_BASE::m_ThermalWidthUnits
protectedinherited
wxChoice* DIALOG_PAD_PROPERTIES_BASE::m_trapDeltaDirChoice
protectedinherited
wxChoice* DIALOG_PAD_PROPERTIES_BASE::m_ZoneConnectionChoice
protectedinherited

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