KiCad PCB EDA Suite
DIALOG_FOOTPRINT_BOARD_EDITOR Class Reference

#include <dialog_edit_footprint_for_BoardEditor.h>

Inheritance diagram for DIALOG_FOOTPRINT_BOARD_EDITOR:
DIALOG_FOOTPRINT_BOARD_EDITOR_BASE DIALOG_SHIM KIWAY_HOLDER

Public Types

enum  FP_PRM_EDITOR_RETVALUE {
  PRM_EDITOR_WANT_UPDATE_FP, PRM_EDITOR_WANT_EXCHANGE_FP, PRM_EDITOR_EDIT_OK, PRM_EDITOR_EDIT_BOARD_FOOTPRINT,
  PRM_EDITOR_EDIT_LIBRARY_FOOTPRINT
}
 
enum  HOLDER_TYPE { DIALOG, FRAME, PANEL }
 

Public Member Functions

 DIALOG_FOOTPRINT_BOARD_EDITOR (PCB_EDIT_FRAME *aParent, MODULE *aModule)
 
 ~DIALOG_FOOTPRINT_BOARD_EDITOR () override
 
bool Validate () override
 
bool TransferDataToWindow () override
 
bool TransferDataFromWindow () override
 
void SetInitialFocus (wxWindow *aWindow)
 Sets the window (usually a wxTextCtrl) that should be focused when the dialog is shown. More...
 
int ShowQuasiModal ()
 
void EndQuasiModal (int retCode)
 
bool IsQuasiModal ()
 
bool Show (bool show) override
 
bool Enable (bool enable) override
 
void OnPaint (wxPaintEvent &event)
 
EDA_UNITS GetUserUnits () const
 
HOLDER_TYPE GetType ()
 
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...
 

Static Public Member Functions

static bool IsCtrl (int aChar, const wxKeyEvent &e)
 
static bool IsShiftCtrl (int aChar, const wxKeyEvent &e)
 
static void FixOSXCancelButtonIssue (wxWindow *aWindow)
 

Protected Member Functions

virtual void OnInitDlg (wxInitDialogEvent &event)
 
void FinishDialogSettings ()
 In all dialogs, we must call the same functions to fix minimal dlg size, the default position and perhaps some others to fix a few issues depending on Windows Managers this helper function does these calls. More...
 
void SetSizeInDU (int x, int y)
 Set the dialog to the given dimensions in "dialog units". More...
 
int HorizPixelsFromDU (int x)
 Convert an integer number of dialog units to pixels, horizontally. More...
 
int VertPixelsFromDU (int y)
 Convert an integer number of dialog units to pixels, vertically. More...
 
void ResetSize ()
 Clear the existing dialog size and position. More...
 

Protected Attributes

wxNotebook * m_NoteBook
 
wxPanel * m_PanelGeneral
 
WX_GRIDm_itemsGrid
 
wxBitmapButton * m_bpAdd
 
wxBitmapButton * m_bpDelete
 
wxStaticText * m_XPosLabel
 
wxTextCtrl * m_ModPositionX
 
wxStaticText * m_XPosUnit
 
wxStaticText * m_YPosLabel
 
wxTextCtrl * m_ModPositionY
 
wxStaticText * m_YPosUnit
 
wxStaticText * m_BoardSideLabel
 
wxChoice * m_BoardSideCtrl
 
wxRadioButton * m_Orient0
 
wxRadioButton * m_Orient90
 
wxRadioButton * m_Orient270
 
wxRadioButton * m_Orient180
 
wxRadioButton * m_OrientOther
 
wxTextCtrl * m_OrientValueCtrl
 
wxRadioBox * m_AutoPlaceCtrl
 
wxStaticBoxSizer * m_sizerAP
 
wxBoxSizer * m_sizerAllow90
 
wxStaticText * m_allow90Label
 
wxSlider * m_CostRot90Ctrl
 
wxBoxSizer * m_sizerAllow180
 
wxStaticText * m_allow180Label
 
wxSlider * m_CostRot180Ctrl
 
wxButton * m_buttonUpdate
 
wxButton * m_buttonExchange
 
wxButton * m_buttonModuleEditor
 
wxButton * m_button5
 
wxRadioBox * m_AttributsCtrl
 
wxPanel * m_PanelClearances
 
wxStaticText * m_staticTextInfo
 
wxStaticText * m_staticTextInfoValPos
 
wxStaticText * m_staticTextInfoValNeg
 
wxStaticText * m_NetClearanceLabel
 
wxTextCtrl * m_NetClearanceCtrl
 
wxStaticText * m_NetClearanceUnits
 
wxStaticText * m_SolderMaskMarginLabel
 
wxTextCtrl * m_SolderMaskMarginCtrl
 
wxStaticText * m_SolderMaskMarginUnits
 
wxStaticText * m_SolderPasteMarginLabel
 
wxTextCtrl * m_SolderPasteMarginCtrl
 
wxStaticText * m_SolderPasteMarginUnits
 
wxStaticText * m_staticTextRatio
 
TEXT_CTRL_EVALm_SolderPasteMarginRatioCtrl
 
wxStaticText * m_SolderPasteRatioMarginUnits
 
wxStaticText * m_staticTextInfoCopper
 
wxStaticText * m_staticTextInfoPaste
 
wxStaticText * m_staticText16
 
wxChoice * m_ZoneConnectionChoice
 
wxPanel * m_Panel3D
 
wxBoxSizer * bSizerMain3D
 
WX_GRIDm_modelsGrid
 
wxBitmapButton * m_buttonAdd
 
wxBitmapButton * m_buttonBrowse
 
wxBitmapButton * m_buttonRemove
 
wxButton * m_buttonCfgPath
 
wxBoxSizer * bLowerSizer3D
 
wxStaticText * m_libraryIDLabel
 
wxTextCtrl * m_tcLibraryID
 
wxStaticText * m_stFullUuid
 
wxTextCtrl * m_tcFullUuid
 
wxStdDialogButtonSizer * m_sdbSizerStdButtons
 
wxButton * m_sdbSizerStdButtonsOK
 
wxButton * m_sdbSizerStdButtonsCancel
 
EDA_UNITS m_units
 
std::string m_hash_key
 
bool m_firstPaintEvent
 
wxWindow * m_initialFocusTarget
 
WX_EVENT_LOOPm_qmodal_loop
 
bool m_qmodal_showing
 
WDO_ENABLE_DISABLEm_qmodal_parent_disabler
 
EDA_BASE_FRAMEm_parentFrame
 
std::vector< wxWindow * > m_tabOrder
 

Private Member Functions

void On3DModelSelected (wxGridEvent &) override
 
void On3DModelCellChanged (wxGridEvent &aEvent) override
 
void OnRemove3DModel (wxCommandEvent &) override
 
void OnAdd3DModel (wxCommandEvent &) override
 
void OnAdd3DRow (wxCommandEvent &) override
 
void EditFootprint (wxCommandEvent &) override
 
void EditLibraryFootprint (wxCommandEvent &) override
 
void UpdateModule (wxCommandEvent &) override
 
void ExchangeModule (wxCommandEvent &) override
 
void ModuleOrientEvent (wxCommandEvent &) override
 
void OnOtherOrientation (wxCommandEvent &aEvent) override
 
void Cfg3DPath (wxCommandEvent &) override
 
void OnGridSize (wxSizeEvent &aEvent) override
 
void OnAddField (wxCommandEvent &) override
 
void OnDeleteField (wxCommandEvent &) override
 
void OnUpdateUI (wxUpdateUIEvent &) override
 
void OnPageChange (wxNotebookEvent &event) override
 
void select3DModel (int aModelIdx)
 
void adjustGridColumns (int aWidth)
 
void updateOrientationControl ()
 Update the orientation validated control, without triggering a change event on the control (which would update the radio buttons) More...
 

Private Attributes

PCB_EDIT_FRAMEm_frame
 
MODULEm_footprint
 
TEXT_MOD_GRID_TABLEm_texts
 
UNIT_BINDER m_posX
 
UNIT_BINDER m_posY
 
wxFloatingPointValidator< double > m_OrientValidator
 
double m_OrientValue
 
UNIT_BINDER m_netClearance
 
UNIT_BINDER m_solderMask
 
UNIT_BINDER m_solderPaste
 
std::vector< MODULE_3D_SETTINGSm_shapes3D_list
 
PANEL_PREV_3Dm_PreviewPane
 
wxString m_delayedErrorMessage
 
wxGrid * m_delayedFocusGrid
 
int m_delayedFocusRow
 
int m_delayedFocusColumn
 
bool m_initialFocus
 
bool m_inSelect
 
std::vector< bool > m_macHack
 

Static Private Attributes

static int m_page = 0
 

Detailed Description

Definition at line 41 of file dialog_edit_footprint_for_BoardEditor.h.

Member Enumeration Documentation

◆ FP_PRM_EDITOR_RETVALUE

◆ HOLDER_TYPE

enum KIWAY_HOLDER::HOLDER_TYPE
inherited
Enumerator
DIALOG 
FRAME 
PANEL 

Definition at line 42 of file kiway_holder.h.

Constructor & Destructor Documentation

◆ DIALOG_FOOTPRINT_BOARD_EDITOR()

DIALOG_FOOTPRINT_BOARD_EDITOR::DIALOG_FOOTPRINT_BOARD_EDITOR ( PCB_EDIT_FRAME aParent,
MODULE aModule 
)

Definition at line 56 of file dialog_edit_footprint_for_BoardEditor.cpp.

57  :
65  m_initialFocus( true ),
66  m_inSelect( false )
67 {
68  m_frame = aParent;
69  m_footprint = aModule;
70 
71  for( size_t i = 0; i < m_NoteBook->GetPageCount(); ++i )
72  m_macHack.push_back( true );
73 
75 
76  m_delayedErrorMessage = wxEmptyString;
77  m_delayedFocusGrid = nullptr;
78  m_delayedFocusRow = -1;
80 
81  // Give an icon
82  wxIcon icon;
83  icon.CopyFromBitmap( KiBitmap( icon_modedit_xpm ) );
84  SetIcon( icon );
85 
86  // Give a bit more room for combobox editors
87  m_itemsGrid->SetDefaultRowSize( m_itemsGrid->GetDefaultRowSize() + 4 );
88  m_modelsGrid->SetDefaultRowSize( m_modelsGrid->GetDefaultRowSize() + 4 );
89 
91  m_itemsGrid->PushEventHandler( new GRID_TRICKS( m_itemsGrid ) );
92  m_modelsGrid->PushEventHandler( new GRID_TRICKS( m_modelsGrid ) );
93 
94  // Show/hide text item columns according to the user's preference
96 
97  // Set up the 3D models grid
98  wxGridCellAttr* attr = new wxGridCellAttr;
99  attr->SetRenderer( new wxGridCellBoolRenderer() );
100  attr->SetReadOnly(); // not really; we delegate interactivity to GRID_TRICKS
101  attr->SetAlignment( wxALIGN_CENTER, wxALIGN_BOTTOM );
102  m_modelsGrid->SetColAttr( 1, attr );
103  m_modelsGrid->SetWindowStyleFlag( m_modelsGrid->GetWindowStyle() & ~wxHSCROLL );
104  m_modelsGrid->SetSelectionMode( wxGrid::wxGridSelectRows );
105 
106  m_OrientValidator.SetRange( -360.0, 360.0 );
107  m_OrientValueCtrl->SetValidator( m_OrientValidator );
109 
110  aParent->Prj().Get3DCacheManager()->GetResolver()->SetProgramBase( &Pgm() );
111 
113 
114  bLowerSizer3D->Add( m_PreviewPane, 1, wxEXPAND, 5 );
115 
116  // Set font size for items showing long strings:
117  wxFont infoFont = wxSystemSettings::GetFont( wxSYS_DEFAULT_GUI_FONT );
118  infoFont.SetSymbolicSize( wxFONTSIZE_SMALL );
119  m_staticTextInfoCopper->SetFont( infoFont );
120  m_staticTextInfoPaste->SetFont( infoFont );
121 
122  m_tcLibraryID->SetFont( infoFont );
123  m_tcFullUuid->SetFont( infoFont );
124 
125  infoFont.SetStyle( wxFONTSTYLE_ITALIC );
126  m_staticTextInfoValNeg->SetFont( infoFont );
127  m_staticTextInfoValPos->SetFont( infoFont );
128 
129  m_NoteBook->SetSelection( m_page );
130 
131  if( m_page == 0 )
132  {
134  m_delayedFocusRow = 0;
136  }
137  else if ( m_page == 1 )
139  else
140  {
142  m_delayedFocusRow = 0;
144  }
145 
146  m_sdbSizerStdButtonsOK->SetDefault();
147 
148  m_OrientValue = 0;
149 
150  // Configure button logos
151  m_bpAdd->SetBitmap( KiBitmap( small_plus_xpm ) );
152  m_bpDelete->SetBitmap( KiBitmap( trash_xpm ) );
153  m_buttonAdd->SetBitmap( KiBitmap( small_plus_xpm ) );
154  m_buttonBrowse->SetBitmap( KiBitmap( folder_xpm ) );
155  m_buttonRemove->SetBitmap( KiBitmap( trash_xpm ) );
156 
158 }
const BITMAP_OPAQUE trash_xpm[1]
Definition: trash.cpp:46
const BITMAP_OPAQUE folder_xpm[1]
Definition: folder.cpp:20
KIWAY Kiway & Pgm(), KFCTL_STANDALONE
The global Program "get" accessor.
Definition: single_top.cpp:104
void ShowHideColumns(const wxString &shownColumns)
Show/hide the grid columns based on a tokenized string of shown column indexes.
Definition: wx_grid.cpp:121
void FinishDialogSettings()
In all dialogs, we must call the same functions to fix minimal dlg size, the default position and per...
GRID_TRICKS is used to add mouse and command handling (such as cut, copy, and paste) to a WX_GRID ins...
Definition: grid_tricks.h:51
void SetTable(wxGridTableBase *table, bool aTakeOwnership=false)
Hide wxGrid's SetTable() method with one which doesn't mess up the grid column widths when setting th...
Definition: wx_grid.cpp:59
PCBNEW_SETTINGS * GetPcbNewSettings()
wxString m_FootprintTextShownColumns
void SetInitialFocus(wxWindow *aWindow)
Sets the window (usually a wxTextCtrl) that should be focused when the dialog is shown.
Definition: dialog_shim.h:114
wxBitmap KiBitmap(BITMAP_DEF aBitmap)
Construct a wxBitmap from a memory record, held in a BITMAP_DEF.
Definition: bitmap.cpp:80
PROJECT & Prj() const
Function Prj returns a reference to the PROJECT "associated with" this KIWAY.
wxFloatingPointValidator< double > m_OrientValidator
const BITMAP_OPAQUE icon_modedit_xpm[1]
EDA_UNITS m_units
Definition: dialog_shim.h:197
DIALOG_FOOTPRINT_BOARD_EDITOR_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Footprint Properties"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
const BITMAP_OPAQUE small_plus_xpm[1]
Definition: small_plus.cpp:20
std::vector< MODULE_3D_SETTINGS > m_shapes3D_list

References DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::bLowerSizer3D, DIALOG_SHIM::FinishDialogSettings(), folder_xpm, PCB_BASE_FRAME::GetPcbNewSettings(), icon_modedit_xpm, KiBitmap(), DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_bpAdd, DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_bpDelete, DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_buttonAdd, DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_buttonBrowse, DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_buttonRemove, m_delayedErrorMessage, m_delayedFocusColumn, m_delayedFocusGrid, m_delayedFocusRow, m_footprint, PCBNEW_SETTINGS::m_FootprintTextShownColumns, m_frame, DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_itemsGrid, m_macHack, DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_modelsGrid, DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_NetClearanceCtrl, DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_NoteBook, m_OrientValidator, m_OrientValue, DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_OrientValueCtrl, m_page, DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_Panel3D, m_PreviewPane, DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_sdbSizerStdButtonsOK, m_shapes3D_list, DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_staticTextInfoCopper, DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_staticTextInfoPaste, DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_staticTextInfoValNeg, DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_staticTextInfoValPos, DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_tcFullUuid, DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_tcLibraryID, m_texts, DIALOG_SHIM::m_units, Pgm(), KIWAY_HOLDER::Prj(), DIALOG_SHIM::SetInitialFocus(), WX_GRID::SetTable(), WX_GRID::ShowHideColumns(), small_plus_xpm, and trash_xpm.

◆ ~DIALOG_FOOTPRINT_BOARD_EDITOR()

DIALOG_FOOTPRINT_BOARD_EDITOR::~DIALOG_FOOTPRINT_BOARD_EDITOR ( )
override

Definition at line 161 of file dialog_edit_footprint_for_BoardEditor.cpp.

162 {
164  m_itemsGrid->GetShownColumns().ToStdString();
165 
166  // Prevents crash bug in wxGrid's d'tor
168 
169  // Delete the GRID_TRICKS.
170  m_itemsGrid->PopEventHandler( true );
171  m_modelsGrid->PopEventHandler( true );
172 
173  // free the memory used by all models, otherwise models which were
174  // browsed but not used would consume memory
175  Prj().Get3DCacheManager()->FlushCache( false );
176 
177  // the GL canvas has to be visible before it is destroyed
178  m_page = m_NoteBook->GetSelection();
179  m_NoteBook->SetSelection( 1 );
180 
181  delete m_PreviewPane;
182 }
PCBNEW_SETTINGS * GetPcbNewSettings()
wxString m_FootprintTextShownColumns
void DestroyTable(wxGridTableBase *aTable)
Work-around for a bug in wxGrid which crashes when deleting the table if the cell edit control was no...
Definition: wx_grid.cpp:90
PROJECT & Prj() const
Function Prj returns a reference to the PROJECT "associated with" this KIWAY.
wxString GetShownColumns()
Get a tokenized string containing the shown column indexes.
Definition: wx_grid.cpp:103

References WX_GRID::DestroyTable(), PCB_BASE_FRAME::GetPcbNewSettings(), WX_GRID::GetShownColumns(), PCBNEW_SETTINGS::m_FootprintTextShownColumns, m_frame, DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_itemsGrid, DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_modelsGrid, DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_NoteBook, m_page, m_PreviewPane, m_texts, and KIWAY_HOLDER::Prj().

Member Function Documentation

◆ adjustGridColumns()

void DIALOG_FOOTPRINT_BOARD_EDITOR::adjustGridColumns ( int  aWidth)
private

Definition at line 833 of file dialog_edit_footprint_for_BoardEditor.cpp.

834 {
835  // Account for scroll bars
836  int itemsWidth = aWidth - ( m_itemsGrid->GetSize().x - m_itemsGrid->GetClientSize().x );
837  int modelsWidth = aWidth - ( m_modelsGrid->GetSize().x - m_modelsGrid->GetClientSize().x );
838 
839  itemsWidth -= m_itemsGrid->GetRowLabelSize();
840 
841  for( int i = 1; i < m_itemsGrid->GetNumberCols(); i++ )
842  itemsWidth -= m_itemsGrid->GetColSize( i );
843 
844  if( itemsWidth > 0 )
845  {
846  m_itemsGrid->SetColSize( 0, std::max( itemsWidth,
847  m_itemsGrid->GetVisibleWidth( 0, true, false, false ) ) );
848  }
849 
850  m_modelsGrid->SetColSize( 0, modelsWidth - m_modelsGrid->GetColSize( 1 ) - 6 );
851 }
int GetVisibleWidth(int aCol, bool aHeader=true, bool aContents=false, bool aKeep=true)
Calculates the specified column based on the actual size of the text on screen.
Definition: wx_grid.cpp:230

References WX_GRID::GetVisibleWidth(), DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_itemsGrid, and DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_modelsGrid.

Referenced by OnGridSize(), OnUpdateUI(), and TransferDataToWindow().

◆ Cfg3DPath()

void DIALOG_FOOTPRINT_BOARD_EDITOR::Cfg3DPath ( wxCommandEvent &  )
overrideprivatevirtual

Reimplemented from DIALOG_FOOTPRINT_BOARD_EDITOR_BASE.

Definition at line 826 of file dialog_edit_footprint_for_BoardEditor.cpp.

827 {
828  if( S3D::Configure3DPaths( this, Prj().Get3DCacheManager()->GetResolver() ) )
830 }
void UpdateDummyModule(bool aRelaodRequired=true)
UpdateModelInfoList - copy shapes from the current shape list which are flagged for preview to the co...
PROJECT & Prj() const
Function Prj returns a reference to the PROJECT "associated with" this KIWAY.
bool Configure3DPaths(wxWindow *aParent, FILENAME_RESOLVER *aResolver)

References S3D::Configure3DPaths(), m_PreviewPane, KIWAY_HOLDER::Prj(), and PANEL_PREV_3D::UpdateDummyModule().

◆ EditFootprint()

void DIALOG_FOOTPRINT_BOARD_EDITOR::EditFootprint ( wxCommandEvent &  )
overrideprivatevirtual

◆ EditLibraryFootprint()

void DIALOG_FOOTPRINT_BOARD_EDITOR::EditLibraryFootprint ( wxCommandEvent &  )
overrideprivatevirtual

◆ Enable()

bool DIALOG_SHIM::Enable ( bool  enable)
overrideinherited

Definition at line 269 of file dialog_shim.cpp.

270 {
271  // so we can do logging of this state change:
272 
273 #if 0 && defined(DEBUG)
274  const char* type_id = typeid( *this ).name();
275  printf( "DIALOG_SHIM %s: %s\n", type_id, enable ? "enabled" : "disabled" );
276  fflush(0); //Needed on msys2 to immediately print the message
277 #endif
278 
279  return wxDialog::Enable( enable );
280 }

◆ EndQuasiModal()

void DIALOG_SHIM::EndQuasiModal ( int  retCode)
inherited

Definition at line 399 of file dialog_shim.cpp.

400 {
401  // Hook up validator and transfer data from controls handling so quasi-modal dialogs
402  // handle validation in the same way as other dialogs.
403  if( ( retCode == wxID_OK ) && ( !Validate() || !TransferDataFromWindow() ) )
404  return;
405 
406  SetReturnCode( retCode );
407 
408  if( !IsQuasiModal() )
409  {
410  wxFAIL_MSG( "either DIALOG_SHIM::EndQuasiModal called twice or ShowQuasiModal"
411  "wasn't called" );
412  return;
413  }
414 
415  if( m_qmodal_loop )
416  {
417  if( m_qmodal_loop->IsRunning() )
418  m_qmodal_loop->Exit( 0 );
419  else
420  m_qmodal_loop->ScheduleExit( 0 );
421 
423  }
424 
427 
428  Show( false );
429 }
WX_EVENT_LOOP * m_qmodal_loop
Definition: dialog_shim.h:206
#define NULL
bool IsQuasiModal()
Definition: dialog_shim.h:123
bool Show(bool show) override
WDO_ENABLE_DISABLE * m_qmodal_parent_disabler
Definition: dialog_shim.h:209

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

Referenced by HK_PROMPT_DIALOG::EndFlexible(), DIALOG_SHIM::OnButton(), DIALOG_EDIT_COMPONENTS_LIBID::onCancel(), DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnCancelButtonClick(), DIALOG_EDIT_COMPONENT_IN_LIBRARY::OnCancelButtonClick(), DIALOG_LIB_EDIT_PIN_TABLE::OnClose(), DIALOG_PRINT_GENERIC::onCloseButton(), DIALOG_CHOOSE_FOOTPRINT::OnCloseTimer(), DIALOG_CHOOSE_COMPONENT::OnCloseTimer(), DIALOG_SHIM::OnCloseWindow(), HTML_MESSAGE_BOX::OnOKButtonClick(), DIALOG_CHOOSE_FOOTPRINT::OnUseBrowser(), DIALOG_CHOOSE_COMPONENT::OnUseBrowser(), and DIALOG_SHIM::~DIALOG_SHIM().

◆ ExchangeModule()

void DIALOG_FOOTPRINT_BOARD_EDITOR::ExchangeModule ( wxCommandEvent &  )
overrideprivatevirtual

◆ FinishDialogSettings()

void DIALOG_SHIM::FinishDialogSettings ( )
protectedinherited

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

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

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

Definition at line 144 of file dialog_shim.cpp.

145 {
146  // must be called from the constructor of derived classes,
147  // when all widgets are initialized, and therefore their size fixed
148 
149  // SetSizeHints fixes the minimal size of sizers in the dialog
150  // (SetSizeHints calls Fit(), so no need to call it)
151  GetSizer()->SetSizeHints( this );
152 
153  // the default position, when calling the first time the dlg
154  Center();
155 }

References PCAD2KICAD::Center.

Referenced by DIALOG_3D_VIEW_OPTIONS::DIALOG_3D_VIEW_OPTIONS(), DIALOG_ANNOTATE::DIALOG_ANNOTATE(), DIALOG_BOARD_SETUP::DIALOG_BOARD_SETUP(), DIALOG_BOM::DIALOG_BOM(), DIALOG_COPPER_ZONE::DIALOG_COPPER_ZONE(), DIALOG_DRC::DIALOG_DRC(), DIALOG_EDIT_COMPONENT_IN_LIBRARY::DIALOG_EDIT_COMPONENT_IN_LIBRARY(), DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC(), DIALOG_EDIT_COMPONENTS_LIBID::DIALOG_EDIT_COMPONENTS_LIBID(), DIALOG_EDIT_LINE_STYLE::DIALOG_EDIT_LINE_STYLE(), DIALOG_EDIT_SHEET_PIN::DIALOG_EDIT_SHEET_PIN(), DIALOG_EDITOR_DATA::DIALOG_EDITOR_DATA(), DIALOG_ENUM_PADS::DIALOG_ENUM_PADS(), DIALOG_ERC::DIALOG_ERC(), DIALOG_EXCHANGE_FOOTPRINTS::DIALOG_EXCHANGE_FOOTPRINTS(), DIALOG_EXPORT_3DFILE::DIALOG_EXPORT_3DFILE(), DIALOG_EXPORT_IDF3::DIALOG_EXPORT_IDF3(), DIALOG_EXPORT_STEP::DIALOG_EXPORT_STEP(), DIALOG_EXPORT_SVG::DIALOG_EXPORT_SVG(), DIALOG_FIELDS_EDITOR_GLOBAL::DIALOG_FIELDS_EDITOR_GLOBAL(), DIALOG_FOOTPRINT_BOARD_EDITOR(), DIALOG_FOOTPRINT_FP_EDITOR::DIALOG_FOOTPRINT_FP_EDITOR(), DIALOG_FOOTPRINT_WIZARD_LIST::DIALOG_FOOTPRINT_WIZARD_LIST(), DIALOG_GENCAD_EXPORT_OPTIONS::DIALOG_GENCAD_EXPORT_OPTIONS(), DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS(), DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS(), DIALOG_GLOBAL_LIB_TABLE_CONFIG::DIALOG_GLOBAL_LIB_TABLE_CONFIG(), DIALOG_GRID_SETTINGS::DIALOG_GRID_SETTINGS(), DIALOG_IMAGE_EDITOR::DIALOG_IMAGE_EDITOR(), DIALOG_INSPECTOR::DIALOG_INSPECTOR(), DIALOG_JUNCTION_PROPS::DIALOG_JUNCTION_PROPS(), DIALOG_KEEPOUT_AREA_PROPERTIES::DIALOG_KEEPOUT_AREA_PROPERTIES(), DIALOG_LABEL_EDITOR::DIALOG_LABEL_EDITOR(), DIALOG_LIB_EDIT_DRAW_ITEM::DIALOG_LIB_EDIT_DRAW_ITEM(), DIALOG_LIB_EDIT_PIN::DIALOG_LIB_EDIT_PIN(), DIALOG_LIB_EDIT_TEXT::DIALOG_LIB_EDIT_TEXT(), DIALOG_LIB_NEW_COMPONENT::DIALOG_LIB_NEW_COMPONENT(), DIALOG_LIST_HOTKEYS::DIALOG_LIST_HOTKEYS(), DIALOG_MOVE_EXACT::DIALOG_MOVE_EXACT(), DIALOG_NETLIST::DIALOG_NETLIST(), DIALOG_NON_COPPER_ZONES_EDITOR::DIALOG_NON_COPPER_ZONES_EDITOR(), DIALOG_PAD_PRIMITIVE_POLY_PROPS::DIALOG_PAD_PRIMITIVE_POLY_PROPS(), DIALOG_PAD_PRIMITIVES_PROPERTIES::DIALOG_PAD_PRIMITIVES_PROPERTIES(), DIALOG_PAD_PROPERTIES::DIALOG_PAD_PROPERTIES(), DIALOG_PASTE_SPECIAL::DIALOG_PASTE_SPECIAL(), DIALOG_PLOT_SCHEMATIC::DIALOG_PLOT_SCHEMATIC(), DIALOG_POSITION_RELATIVE::DIALOG_POSITION_RELATIVE(), DIALOG_PRINT_GENERIC::DIALOG_PRINT_GENERIC(), DIALOG_PRINT_USING_PRINTER::DIALOG_PRINT_USING_PRINTER(), DIALOG_PUSH_PAD_PROPERTIES::DIALOG_PUSH_PAD_PROPERTIES(), DIALOG_SCH_SHEET_PROPS::DIALOG_SCH_SHEET_PROPS(), DIALOG_SCHEMATIC_SETUP::DIALOG_SCHEMATIC_SETUP(), DIALOG_SELECT_NET_FROM_LIST::DIALOG_SELECT_NET_FROM_LIST(), DIALOG_SWAP_LAYERS::DIALOG_SWAP_LAYERS(), DIALOG_TARGET_PROPERTIES::DIALOG_TARGET_PROPERTIES(), DIALOG_TEXT_PROPERTIES::DIALOG_TEXT_PROPERTIES(), DIALOG_TRACK_VIA_PROPERTIES::DIALOG_TRACK_VIA_PROPERTIES(), DIALOG_TRACK_VIA_SIZE::DIALOG_TRACK_VIA_SIZE(), DIALOG_UPDATE_FROM_PCB::DIALOG_UPDATE_FROM_PCB(), DIALOG_UPDATE_PCB::DIALOG_UPDATE_PCB(), DLG_SELECT_3DMODEL::DLG_SELECT_3DMODEL(), PAGED_DIALOG::finishInitialization(), DIALOG_EDIT_ONE_FIELD::init(), DIALOG_EDIT_LIBRARY_TABLES::InstallPanel(), NETLIST_DIALOG::NETLIST_DIALOG(), DIALOG_GRAPHIC_ITEM_PROPERTIES::OnInitDlg(), DIALOG_SCH_SHEET_PROPS::OnInitDlg(), DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnInitDlg(), DIALOG_SIM_SETTINGS::onInitDlg(), DIALOG_SPICE_MODEL::onInitDlg(), DIALOG_SIGNAL_LIST::TransferDataToWindow(), DIALOG_UPDATE_FIELDS::TransferDataToWindow(), DIALOG_COLOR_PICKER::TransferDataToWindow(), and DIALOG_BOARD_STATISTICS::TransferDataToWindow().

◆ FixOSXCancelButtonIssue()

static void DIALOG_SHIM::FixOSXCancelButtonIssue ( wxWindow *  aWindow)
staticinherited

◆ GetType()

HOLDER_TYPE KIWAY_HOLDER::GetType ( )
inlineinherited

Definition at line 49 of file kiway_holder.h.

49 { return m_type; }
HOLDER_TYPE m_type
Definition: kiway_holder.h:82

References KIWAY_HOLDER::m_type.

Referenced by DIALOG_SHIM::DIALOG_SHIM().

◆ GetUserUnits()

◆ HorizPixelsFromDU()

int DIALOG_SHIM::HorizPixelsFromDU ( int  x)
protectedinherited

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

See SetSizeInDU or wxDialog documentation for more information.

Definition at line 165 of file dialog_shim.cpp.

166 {
167  wxSize sz( x, 0 );
168  return ConvertDialogToPixels( sz ).x;
169 }

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

◆ IsCtrl()

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

Definition at line 136 of file dialog_shim.h.

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

Referenced by DIALOG_TEXT_PROPERTIES::OnCharHook().

◆ IsQuasiModal()

◆ IsShiftCtrl()

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

Definition at line 142 of file dialog_shim.h.

143  {
144  return e.GetKeyCode() == aChar && e.ControlDown() && !e.AltDown() &&
145  e.ShiftDown() && !e.MetaDown();
146  }

Referenced by DIALOG_TEXT_PROPERTIES::OnCharHook().

◆ Kiway()

KIWAY& KIWAY_HOLDER::Kiway ( ) const
inlineinherited

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

A KIWAY_HOLDER is not necessarily a KIWAY_PLAYER.

Definition at line 56 of file kiway_holder.h.

57  {
58  wxASSERT( m_kiway ); // smoke out bugs in Debug build, then Release runs fine.
59  return *m_kiway;
60  }
KIWAY * m_kiway
Definition: kiway_holder.h:81

References KIWAY_HOLDER::m_kiway.

Referenced by TREEPROJECT_ITEM::Activate(), FOOTPRINT_VIEWER_FRAME::AddFootprintToPCB(), PCB_BASE_EDIT_FRAME::AddLibrary(), LIB_CONTROL::AddSymbolToSchematic(), CVPCB_MAINFRAME::BuildLIBRARY_LISTBOX(), COMMON_CONTROL::ConfigurePaths(), DIALOG_CHOOSE_FOOTPRINT::ConstructRightPanel(), DIALOG_CHOOSE_COMPONENT::ConstructRightPanel(), PCB_BASE_FRAME::CreateAndShow3D_Frame(), CVPCB_MAINFRAME::CVPCB_MAINFRAME(), DIALOG_RESCUE_EACH::DIALOG_RESCUE_EACH(), DIALOG_SHIM::DIALOG_SHIM(), CVPCB_MAINFRAME::DisplayStatus(), FIELDS_GRID_TRICKS::doPopupSelection(), FIELDS_EDITOR_GRID_TRICKS::doPopupSelection(), PCB_EDITOR_CONTROL::EditFpInFpEditor(), SCH_EDITOR_CONTROL::EditWithLibEdit(), BACK_ANNOTATE::FetchNetlistFromPCB(), DISPLAY_FOOTPRINTS_FRAME::GetModule(), PCB_EDIT_FRAME::importFile(), KICAD_MANAGER_FRAME::language_change(), KIWAY_PLAYER::language_change(), LIB_TREE_MODEL_ADAPTER::LIB_TREE_MODEL_ADAPTER(), CVPCB_MAINFRAME::LoadFootprintFiles(), KICAD_MANAGER_FRAME::LoadProject(), TEXT_BUTTON_SYMBOL_CHOOSER::OnButtonClick(), TEXT_BUTTON_FP_CHOOSER::OnButtonClick(), KICAD_MANAGER_FRAME::OnCloseWindow(), SCH_EDIT_FRAME::OnCloseWindow(), PL_EDITOR_FRAME::OnExit(), SCH_EDIT_FRAME::OnExit(), FOOTPRINT_EDIT_FRAME::OnExitKiCad(), FOOTPRINT_VIEWER_FRAME::OnExitKiCad(), LIB_EDIT_FRAME::OnExitKiCad(), SAVE_AS_TRAVERSER::OnFile(), KICAD_MANAGER_FRAME::OnImportEagleFiles(), DIALOG_CHOOSE_COMPONENT::OnInitDialog(), SCH_EDIT_FRAME::OnOpenCvpcb(), SCH_EDIT_FRAME::OnOpenPcbnew(), EDA_BASE_FRAME::OnPreferences(), DIALOG_SYMBOL_REMAP::OnRemapSymbols(), DIALOG_EDIT_ONE_FIELD::OnTextValueSelectButtonClick(), KICAD_MANAGER_FRAME::OnUnarchiveFiles(), FOOTPRINT_EDIT_FRAME::OnUpdateInsertModuleInBoard(), FOOTPRINT_EDIT_FRAME::OnUpdateLoadModuleFromBoard(), SCH_EDIT_FRAME::OnUpdatePCB(), KIWAY_HOLDER::Prj(), CVPCB_MAINFRAME::ReadNetListAndFpFiles(), FOOTPRINT_VIEWER_FRAME::ReCreateFootprintList(), LIB_EDIT_FRAME::refreshSchematic(), SCH_EDITOR_CONTROL::rescueProject(), EE_INSPECTION_TOOL::RunSimulation(), CVPCB_MAINFRAME::SaveFootprintAssociation(), FOOTPRINT_EDIT_FRAME::SaveFootprintToBoard(), LIB_TREE_MODEL_ADAPTER::SavePinnedItems(), SCH_BASE_FRAME::SelectComponentFromLibBrowser(), SCH_EDIT_FRAME::SendCrossProbeClearHighlight(), SCH_EDIT_FRAME::SendCrossProbeNetName(), PCB_EDIT_FRAME::SendCrossProbeNetName(), CVPCB_MAINFRAME::SendMessageToEESCHEMA(), PCB_EDIT_FRAME::SendMessageToEESCHEMA(), SCH_EDIT_FRAME::SendMessageToPCBNEW(), SCH_EDIT_FRAME::sendNetlistToCvpcb(), SCH_EDIT_FRAME::SetCrossProbeConnection(), CVPCB_CONTROL::ShowFootprintViewer(), COMMON_CONTROL::ShowLibraryTable(), COMMON_CONTROL::ShowPlayer(), KICAD_MANAGER_CONTROL::ShowPlayer(), SIM_PLOT_FRAME::SIM_PLOT_FRAME(), PCB_EDITOR_CONTROL::UpdateSchematicFromPCB(), and DIALOG_EXCHANGE_FOOTPRINTS::ViewAndSelectFootprint().

◆ ModuleOrientEvent()

void DIALOG_FOOTPRINT_BOARD_EDITOR::ModuleOrientEvent ( wxCommandEvent &  )
overrideprivatevirtual

Reimplemented from DIALOG_FOOTPRINT_BOARD_EDITOR_BASE.

Definition at line 209 of file dialog_edit_footprint_for_BoardEditor.cpp.

210 {
211  if( m_Orient0->GetValue() )
212  m_OrientValue = 0.0;
213  else if( m_Orient90->GetValue() )
214  m_OrientValue = 90.0;
215  else if( m_Orient270->GetValue() )
216  m_OrientValue = 270.0;
217  else if( m_Orient180->GetValue() )
218  m_OrientValue = 180.0;
219 
221 }
void updateOrientationControl()
Update the orientation validated control, without triggering a change event on the control (which wou...

References DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_Orient0, DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_Orient180, DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_Orient270, DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_Orient90, m_OrientValue, and updateOrientationControl().

◆ On3DModelCellChanged()

void DIALOG_FOOTPRINT_BOARD_EDITOR::On3DModelCellChanged ( wxGridEvent &  aEvent)
overrideprivatevirtual

Reimplemented from DIALOG_FOOTPRINT_BOARD_EDITOR_BASE.

Definition at line 440 of file dialog_edit_footprint_for_BoardEditor.cpp.

441 {
442  if( aEvent.GetCol() == 0 )
443  {
444  bool hasAlias = false;
445  FILENAME_RESOLVER* res = Prj().Get3DCacheManager()->GetResolver();
446  wxString filename = m_modelsGrid->GetCellValue( aEvent.GetRow(), 0 );
447 
448  filename.Replace( "\n", "" );
449  filename.Replace( "\r", "" );
450  filename.Replace( "\t", "" );
451 
452  if( filename.empty() || !res->ValidateFileName( filename, hasAlias ) )
453  {
454  m_delayedErrorMessage = wxString::Format( _( "Invalid filename: %s" ), filename );
456  m_delayedFocusRow = aEvent.GetRow();
457  m_delayedFocusColumn = aEvent.GetCol();
458  aEvent.Veto();
459  }
460 
461  // if the user has specified an alias in the name then prepend ':'
462  if( hasAlias )
463  filename.insert( 0, wxT( ":" ) );
464 
465 #ifdef __WINDOWS__
466  // In Kicad files, filenames and paths are stored using Unix notation
467  filename.Replace( wxT( "\\" ), wxT( "/" ) );
468 #endif
469 
470  m_shapes3D_list[ aEvent.GetRow() ].m_Filename = filename;
471  m_modelsGrid->SetCellValue( aEvent.GetRow(), 0, filename );
472  }
473  else if( aEvent.GetCol() == 1 )
474  {
475  wxString showValue = m_modelsGrid->GetCellValue( aEvent.GetRow(), 1 );
476 
477  m_shapes3D_list[ aEvent.GetRow() ].m_Show = ( showValue == wxT( "1" ) );
478  }
479 
481 }
void UpdateDummyModule(bool aRelaodRequired=true)
UpdateModelInfoList - copy shapes from the current shape list which are flagged for preview to the co...
PROJECT & Prj() const
Function Prj returns a reference to the PROJECT "associated with" this KIWAY.
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
#define _(s)
Definition: 3d_actions.cpp:33
bool ValidateFileName(const wxString &aFileName, bool &hasAlias)
Function ValidateName returns true if the given path is a valid aliased relative path.
std::vector< MODULE_3D_SETTINGS > m_shapes3D_list

References _, Format(), m_delayedErrorMessage, m_delayedFocusColumn, m_delayedFocusGrid, m_delayedFocusRow, DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_modelsGrid, m_PreviewPane, m_shapes3D_list, KIWAY_HOLDER::Prj(), PANEL_PREV_3D::UpdateDummyModule(), and FILENAME_RESOLVER::ValidateFileName().

◆ On3DModelSelected()

void DIALOG_FOOTPRINT_BOARD_EDITOR::On3DModelSelected ( wxGridEvent &  aEvent)
overrideprivatevirtual

Reimplemented from DIALOG_FOOTPRINT_BOARD_EDITOR_BASE.

Definition at line 433 of file dialog_edit_footprint_for_BoardEditor.cpp.

References m_inSelect, and select3DModel().

◆ OnAdd3DModel()

void DIALOG_FOOTPRINT_BOARD_EDITOR::OnAdd3DModel ( wxCommandEvent &  )
overrideprivatevirtual

Reimplemented from DIALOG_FOOTPRINT_BOARD_EDITOR_BASE.

Definition at line 501 of file dialog_edit_footprint_for_BoardEditor.cpp.

502 {
504  return;
505 
506  int selected = m_modelsGrid->GetGridCursorRow();
507 
508  PROJECT& prj = Prj();
509  MODULE_3D_SETTINGS model;
510 
511  wxString initialpath = prj.GetRString( PROJECT::VIEWER_3D_PATH );
512  wxString sidx = prj.GetRString( PROJECT::VIEWER_3D_FILTER_INDEX );
513  int filter = 0;
514 
515  // If the PROJECT::VIEWER_3D_PATH hasn't been set yet, use the KISYS3DMOD environment
516  // variable and fall back to the project path if necessary.
517  if( initialpath.IsEmpty() )
518  {
519  if( !wxGetEnv( "KISYS3DMOD", &initialpath ) || initialpath.IsEmpty() )
520  initialpath = prj.GetProjectPath();
521  }
522 
523  if( !sidx.empty() )
524  {
525  long tmp;
526  sidx.ToLong( &tmp );
527 
528  if( tmp > 0 && tmp <= INT_MAX )
529  filter = (int) tmp;
530  }
531 
532  if( !S3D::Select3DModel( this, Prj().Get3DCacheManager(), initialpath, filter, &model )
533  || model.m_Filename.empty() )
534  {
535  select3DModel( selected );
536  return;
537  }
538 
539  prj.SetRString( PROJECT::VIEWER_3D_PATH, initialpath );
540  sidx = wxString::Format( wxT( "%i" ), filter );
542  FILENAME_RESOLVER* res = Prj().Get3DCacheManager()->GetResolver();
543  wxString alias;
544  wxString shortPath;
545  wxString filename = model.m_Filename;
546 
547  if( res && res->SplitAlias( filename, alias, shortPath ) )
548  filename = alias + wxT( ":" ) + shortPath;
549 
550 #ifdef __WINDOWS__
551  // In KiCad files, filenames and paths are stored using Unix notation
552  model.m_Filename.Replace( "\\", "/" );
553 #endif
554 
555  model.m_Show = true;
556  m_shapes3D_list.push_back( model );
557 
558  int idx = m_modelsGrid->GetNumberRows();
559  m_modelsGrid->AppendRows( 1 );
560  m_modelsGrid->SetCellValue( idx, 0, filename );
561  m_modelsGrid->SetCellValue( idx, 1, wxT( "1" ) );
562 
563  select3DModel( idx );
565 }
PROJECT holds project specific data.
Definition: project.h:61
bool m_Show
Include module in rendering.
Definition: class_module.h:97
void UpdateDummyModule(bool aRelaodRequired=true)
UpdateModelInfoList - copy shapes from the current shape list which are flagged for preview to the co...
VTBL_ENTRY const wxString GetProjectPath() const
Function GetProjectPath returns the full path of the project.
Definition: project.cpp:122
bool SplitAlias(const wxString &aFileName, wxString &anAlias, wxString &aRelPath)
Function SplitAlias returns true if the given name contains an alias and populates the string anAlias...
PROJECT & Prj() const
Function Prj returns a reference to the PROJECT "associated with" this KIWAY.
bool CommitPendingChanges(bool aQuietMode=false)
Close any open cell edit controls.
Definition: wx_grid.cpp:174
wxString m_Filename
The 3D shape filename in 3D library.
Definition: class_module.h:96
VTBL_ENTRY void SetRString(RSTRING_T aStringId, const wxString &aString)
Function SetRString stores a "retained string", which is any session and project specific string iden...
Definition: project.cpp:206
VTBL_ENTRY const wxString & GetRString(RSTRING_T aStringId)
Function GetRString returns a "retained string", which is any session and project specific string ide...
Definition: project.cpp:221
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
bool Select3DModel(wxWindow *aParent, S3D_CACHE *aCache, wxString &prevModelSelectDir, int &prevModelWildcard, MODULE_3D_SETTINGS *aModel)
std::vector< MODULE_3D_SETTINGS > m_shapes3D_list

References WX_GRID::CommitPendingChanges(), Format(), PROJECT::GetProjectPath(), PROJECT::GetRString(), MODULE_3D_SETTINGS::m_Filename, DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_modelsGrid, m_PreviewPane, m_shapes3D_list, MODULE_3D_SETTINGS::m_Show, KIWAY_HOLDER::Prj(), S3D::Select3DModel(), select3DModel(), PROJECT::SetRString(), FILENAME_RESOLVER::SplitAlias(), PANEL_PREV_3D::UpdateDummyModule(), PROJECT::VIEWER_3D_FILTER_INDEX, and PROJECT::VIEWER_3D_PATH.

◆ OnAdd3DRow()

void DIALOG_FOOTPRINT_BOARD_EDITOR::OnAdd3DRow ( wxCommandEvent &  )
overrideprivatevirtual

Reimplemented from DIALOG_FOOTPRINT_BOARD_EDITOR_BASE.

Definition at line 568 of file dialog_edit_footprint_for_BoardEditor.cpp.

569 {
571  return;
572 
573  MODULE_3D_SETTINGS model;
574 
575  model.m_Show = true;
576  m_shapes3D_list.push_back( model );
577 
578  int row = m_modelsGrid->GetNumberRows();
579  m_modelsGrid->AppendRows( 1 );
580  m_modelsGrid->SetCellValue( row, 1, wxT( "1" ) );
581 
582  select3DModel( row );
583 
584  m_modelsGrid->SetFocus();
585  m_modelsGrid->MakeCellVisible( row, 0 );
586  m_modelsGrid->SetGridCursor( row, 0 );
587 
588  m_modelsGrid->EnableCellEditControl( true );
589  m_modelsGrid->ShowCellEditControl();
590 }
bool m_Show
Include module in rendering.
Definition: class_module.h:97
bool CommitPendingChanges(bool aQuietMode=false)
Close any open cell edit controls.
Definition: wx_grid.cpp:174
std::vector< MODULE_3D_SETTINGS > m_shapes3D_list

References WX_GRID::CommitPendingChanges(), DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_modelsGrid, m_shapes3D_list, MODULE_3D_SETTINGS::m_Show, and select3DModel().

◆ OnAddField()

void DIALOG_FOOTPRINT_BOARD_EDITOR::OnAddField ( wxCommandEvent &  )
overrideprivatevirtual

Reimplemented from DIALOG_FOOTPRINT_BOARD_EDITOR_BASE.

Definition at line 763 of file dialog_edit_footprint_for_BoardEditor.cpp.

764 {
766  return;
767 
768  const BOARD_DESIGN_SETTINGS& dsnSettings = m_frame->GetDesignSettings();
769  TEXTE_MODULE textMod( m_footprint );
770 
771  // Set active layer if legal; otherwise copy layer from previous text item
773  textMod.SetLayer( m_frame->GetActiveLayer() );
774  else
775  textMod.SetLayer( m_texts->at( m_texts->size() - 1 ).GetLayer() );
776 
777  textMod.SetTextSize( dsnSettings.GetTextSize( textMod.GetLayer() ) );
778  textMod.SetTextThickness( dsnSettings.GetTextThickness( textMod.GetLayer() ) );
779  textMod.SetItalic( dsnSettings.GetTextItalic( textMod.GetLayer() ) );
780  textMod.SetKeepUpright( dsnSettings.GetTextUpright( textMod.GetLayer() ) );
781  textMod.SetMirrored( IsBackLayer( textMod.GetLayer() ) );
782 
783  m_texts->push_back( textMod );
784 
785  // notify the grid
786  wxGridTableMessage msg( m_texts, wxGRIDTABLE_NOTIFY_ROWS_APPENDED, 1 );
787  m_itemsGrid->ProcessTableMessage( msg );
788 
789  m_itemsGrid->SetFocus();
790  m_itemsGrid->MakeCellVisible( m_texts->size() - 1, 0 );
791  m_itemsGrid->SetGridCursor( m_texts->size() - 1, 0 );
792 
793  m_itemsGrid->EnableCellEditControl( true );
794  m_itemsGrid->ShowCellEditControl();
795 }
virtual BOARD_DESIGN_SETTINGS & GetDesignSettings() const
Returns the BOARD_DESIGN_SETTINGS for the open project Overloaded in FOOTPRINT_EDIT_FRAME.
bool IsBackLayer(PCB_LAYER_ID aLayerId)
Layer classification: check if it's a back layer.
int GetTextThickness(PCB_LAYER_ID aLayer) const
Function GetTextThickness Returns the default text thickness from the layer class for the given layer...
static LSET AllTechMask()
Function AllTechMask returns a mask holding all technical layers (no CU layer) on both side.
Definition: lset.cpp:782
bool GetTextUpright(PCB_LAYER_ID aLayer) const
bool GetTextItalic(PCB_LAYER_ID aLayer) const
virtual PCB_LAYER_ID GetActiveLayer() const
bool CommitPendingChanges(bool aQuietMode=false)
Close any open cell edit controls.
Definition: wx_grid.cpp:174
static bool GetLayer(MODEL_VRML &aModel, LAYER_NUM layer, VRML_LAYER **vlayer)
wxSize GetTextSize(PCB_LAYER_ID aLayer) const
Function GetTextSize Returns the default text size from the layer class for the given layer.
BOARD_DESIGN_SETTINGS contains design settings for a BOARD object.

References LSET::AllTechMask(), WX_GRID::CommitPendingChanges(), PCB_BASE_FRAME::GetActiveLayer(), PCB_BASE_FRAME::GetDesignSettings(), BOARD_ITEM::GetLayer(), GetLayer(), BOARD_DESIGN_SETTINGS::GetTextItalic(), BOARD_DESIGN_SETTINGS::GetTextSize(), BOARD_DESIGN_SETTINGS::GetTextThickness(), BOARD_DESIGN_SETTINGS::GetTextUpright(), IsBackLayer(), m_footprint, m_frame, DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_itemsGrid, m_texts, EDA_TEXT::SetItalic(), TEXTE_MODULE::SetKeepUpright(), BOARD_ITEM::SetLayer(), EDA_TEXT::SetMirrored(), EDA_TEXT::SetTextSize(), and EDA_TEXT::SetTextThickness().

◆ OnDeleteField()

void DIALOG_FOOTPRINT_BOARD_EDITOR::OnDeleteField ( wxCommandEvent &  )
overrideprivatevirtual

Reimplemented from DIALOG_FOOTPRINT_BOARD_EDITOR_BASE.

Definition at line 798 of file dialog_edit_footprint_for_BoardEditor.cpp.

799 {
800  m_itemsGrid->CommitPendingChanges( true /* quiet mode */ );
801 
802  int curRow = m_itemsGrid->GetGridCursorRow();
803 
804  if( curRow < 0 )
805  return;
806  else if( curRow < 2 )
807  {
808  DisplayError( nullptr, _( "Reference and value are mandatory." ) );
809  return;
810  }
811 
812  m_texts->erase( m_texts->begin() + curRow );
813 
814  // notify the grid
815  wxGridTableMessage msg( m_texts, wxGRIDTABLE_NOTIFY_ROWS_DELETED, curRow, 1 );
816  m_itemsGrid->ProcessTableMessage( msg );
817 
818  if( m_itemsGrid->GetNumberRows() > 0 )
819  {
820  m_itemsGrid->MakeCellVisible( std::max( 0, curRow-1 ), m_itemsGrid->GetGridCursorCol() );
821  m_itemsGrid->SetGridCursor( std::max( 0, curRow-1 ), m_itemsGrid->GetGridCursorCol() );
822  }
823 }
void DisplayError(wxWindow *aParent, const wxString &aText, int aDisplayTime)
Display an error or warning message box with aMessage.
Definition: confirm.cpp:239
bool CommitPendingChanges(bool aQuietMode=false)
Close any open cell edit controls.
Definition: wx_grid.cpp:174
#define _(s)
Definition: 3d_actions.cpp:33

References _, WX_GRID::CommitPendingChanges(), DisplayError(), DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_itemsGrid, and m_texts.

◆ OnGridSize()

void DIALOG_FOOTPRINT_BOARD_EDITOR::OnGridSize ( wxSizeEvent &  aEvent)
overrideprivatevirtual

Reimplemented from DIALOG_FOOTPRINT_BOARD_EDITOR_BASE.

Definition at line 911 of file dialog_edit_footprint_for_BoardEditor.cpp.

912 {
913  adjustGridColumns( aEvent.GetSize().GetX());
914 
915  aEvent.Skip();
916 }

References adjustGridColumns().

◆ OnInitDlg()

virtual void DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::OnInitDlg ( wxInitDialogEvent &  event)
inlineprotectedvirtualinherited

◆ OnOtherOrientation()

void DIALOG_FOOTPRINT_BOARD_EDITOR::OnOtherOrientation ( wxCommandEvent &  aEvent)
overrideprivatevirtual

Reimplemented from DIALOG_FOOTPRINT_BOARD_EDITOR_BASE.

Definition at line 224 of file dialog_edit_footprint_for_BoardEditor.cpp.

225 {
226  m_OrientOther->SetValue( true );
227 
228  aEvent.Skip();
229 }

References DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_OrientOther.

◆ OnPageChange()

void DIALOG_FOOTPRINT_BOARD_EDITOR::OnPageChange ( wxNotebookEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_FOOTPRINT_BOARD_EDITOR_BASE.

Definition at line 919 of file dialog_edit_footprint_for_BoardEditor.cpp.

920 {
921  int page = aEvent.GetSelection();
922 
923  // Shouldn't be necessary, but is on at least OSX
924  if( page >= 0 )
925  m_NoteBook->ChangeSelection( (unsigned) page );
926 
927 #ifdef __WXMAC__
928  // Work around an OSX bug where the wxGrid children don't get placed correctly until
929  // the first resize event
930  if( m_macHack[ page ] )
931  {
932  wxSize pageSize = m_NoteBook->GetPage( page )->GetSize();
933  pageSize.x -= 1;
934 
935  m_NoteBook->GetPage( page )->SetSize( pageSize );
936  m_macHack[ page ] = false;
937  }
938 #endif
939 }

References m_macHack, and DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_NoteBook.

◆ OnPaint()

void DIALOG_SHIM::OnPaint ( wxPaintEvent &  event)
inherited

Definition at line 302 of file dialog_shim.cpp.

303 {
304  if( m_firstPaintEvent )
305  {
307 
308  selectAllInTextCtrls( GetChildren() );
309 
311  m_initialFocusTarget->SetFocus();
312  else
313  SetFocus(); // Focus the dialog itself
314 
315  m_firstPaintEvent = false;
316  }
317 
318  event.Skip();
319 }
wxWindow * m_initialFocusTarget
Definition: dialog_shim.h:204
bool m_firstPaintEvent
Definition: dialog_shim.h:203
void FixupCancelButtonCmdKeyCollision(wxWindow *aWindow)
Definition: gtk/ui.cpp:38
static void selectAllInTextCtrls(wxWindowList &children)

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

Referenced by DIALOG_SHIM::DIALOG_SHIM().

◆ OnRemove3DModel()

void DIALOG_FOOTPRINT_BOARD_EDITOR::OnRemove3DModel ( wxCommandEvent &  )
overrideprivatevirtual

Reimplemented from DIALOG_FOOTPRINT_BOARD_EDITOR_BASE.

Definition at line 484 of file dialog_edit_footprint_for_BoardEditor.cpp.

485 {
486  m_modelsGrid->CommitPendingChanges( true /* quiet mode */ );
487 
488  int idx = m_modelsGrid->GetGridCursorRow();
489 
490  if( idx >= 0 && m_modelsGrid->GetNumberRows() && !m_shapes3D_list.empty() )
491  {
492  m_shapes3D_list.erase( m_shapes3D_list.begin() + idx );
493  m_modelsGrid->DeleteRows( idx, 1 );
494 
495  select3DModel( idx ); // will clamp idx within bounds
497  }
498 }
void UpdateDummyModule(bool aRelaodRequired=true)
UpdateModelInfoList - copy shapes from the current shape list which are flagged for preview to the co...
bool CommitPendingChanges(bool aQuietMode=false)
Close any open cell edit controls.
Definition: wx_grid.cpp:174
std::vector< MODULE_3D_SETTINGS > m_shapes3D_list

References WX_GRID::CommitPendingChanges(), DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_modelsGrid, m_PreviewPane, m_shapes3D_list, select3DModel(), and PANEL_PREV_3D::UpdateDummyModule().

◆ OnUpdateUI()

void DIALOG_FOOTPRINT_BOARD_EDITOR::OnUpdateUI ( wxUpdateUIEvent &  )
overrideprivatevirtual

Reimplemented from DIALOG_FOOTPRINT_BOARD_EDITOR_BASE.

Definition at line 854 of file dialog_edit_footprint_for_BoardEditor.cpp.

855 {
856  if( !m_itemsGrid->IsCellEditControlShown() && !m_modelsGrid->IsCellEditControlShown() )
857  adjustGridColumns( m_itemsGrid->GetRect().GetWidth());
858 
859  // Handle a grid error. This is delayed to OnUpdateUI so that we can change focus
860  // even when the original validation was triggered from a killFocus event, and so
861  // that the corresponding notebook page can be shown in the background when triggered
862  // from an OK.
863  if( m_delayedFocusRow >= 0 )
864  {
865  // We will re-enter this routine if an error dialog is displayed, so make sure we
866  // zero out our member variables first.
867  wxGrid* grid = m_delayedFocusGrid;
868  int row = m_delayedFocusRow;
869  int col = m_delayedFocusColumn;
870  wxString msg = m_delayedErrorMessage;
871 
872  m_delayedFocusGrid = nullptr;
873  m_delayedFocusRow = -1;
875  m_delayedErrorMessage = wxEmptyString;
876 
877  if( !msg.IsEmpty() )
878  {
879  // Do not use DisplayErrorMessage(); it screws up window order on Mac
880  DisplayError( nullptr, msg );
881  }
882 
883  grid->SetFocus();
884  grid->MakeCellVisible( row, col );
885 
886  // Selecting the first grid item only makes sense for the
887  // items grid
888  if( !m_initialFocus || grid == m_itemsGrid )
889  {
890  grid->SetGridCursor( row, col );
891  grid->EnableCellEditControl( true );
892  grid->ShowCellEditControl();
893 
894  if( grid == m_itemsGrid && row == 0 && col == 0 )
895  {
896  auto referenceEditor = grid->GetCellEditor( 0, 0 );
897 
898  if( auto textEntry = dynamic_cast<wxTextEntry*>( referenceEditor->GetControl() ) )
899  SelectReferenceNumber( textEntry );
900 
901  referenceEditor->DecRef();
902  }
903  }
904  m_initialFocus = false;
905  }
906 
907  m_buttonRemove->Enable( m_modelsGrid->GetNumberRows() > 0 );
908 }
void DisplayError(wxWindow *aParent, const wxString &aText, int aDisplayTime)
Display an error or warning message box with aMessage.
Definition: confirm.cpp:239
void SelectReferenceNumber(wxTextEntry *aTextEntry)
Select the number (or "?") in a reference for ease of editing.
Definition: common.cpp:312

References adjustGridColumns(), DisplayError(), DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_buttonRemove, m_delayedErrorMessage, m_delayedFocusColumn, m_delayedFocusGrid, m_delayedFocusRow, m_initialFocus, DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_itemsGrid, DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_modelsGrid, and SelectReferenceNumber().

◆ Prj()

PROJECT & KIWAY_HOLDER::Prj ( ) const
inherited

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

Definition at line 35 of file kiway_holder.cpp.

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

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

Referenced by PCB_BASE_EDIT_FRAME::AddLibrary(), LIB_MANAGER::addLibrary(), SCH_EDIT_FRAME::AppendSchematic(), PCB_EDIT_FRAME::ArchiveModulesOnBoard(), DIALOG_SYMBOL_REMAP::backupProject(), CVPCB_MAINFRAME::buildEquivalenceList(), CVPCB_MAINFRAME::BuildLIBRARY_LISTBOX(), DIALOG_FOOTPRINT_FP_EDITOR::Cfg3DPath(), Cfg3DPath(), DIALOG_GEN_FOOTPRINT_POSITION::CreateGerberFiles(), PCB_BASE_EDIT_FRAME::CreateNewLibrary(), DIALOG_PLOT_SCHEMATIC::createPlotFileName(), DIALOG_SYMBOL_REMAP::createProjectSymbolLibTable(), SCH_EDIT_FRAME::CreateScreens(), FOOTPRINT_EDIT_FRAME::DeleteModuleFromLibrary(), DIALOG_BOARD_SETUP::DIALOG_BOARD_SETUP(), DIALOG_BOARD_STATISTICS::DIALOG_BOARD_STATISTICS(), DIALOG_CHOOSE_COMPONENT::DIALOG_CHOOSE_COMPONENT(), DIALOG_CHOOSE_FOOTPRINT::DIALOG_CHOOSE_FOOTPRINT(), DIALOG_CONFIG_EQUFILES::DIALOG_CONFIG_EQUFILES(), DIALOG_FOOTPRINT_BOARD_EDITOR(), DIALOG_FOOTPRINT_FP_EDITOR::DIALOG_FOOTPRINT_FP_EDITOR(), DIALOG_PAGES_SETTINGS::DIALOG_PAGES_SETTINGS(), DIALOG_SCHEMATIC_SETUP::DIALOG_SCHEMATIC_SETUP(), DIALOG_SYMBOL_REMAP::DIALOG_SYMBOL_REMAP(), LIB_VIEW_FRAME::DisplayLibInfos(), CVPCB_MAINFRAME::DisplayStatus(), PL_DRAW_PANEL_GAL::DisplayWorksheet(), PCB_EDIT_FRAME::doAutoSave(), FIELDS_GRID_TRICKS::doPopupSelection(), FIELDS_EDITOR_GRID_TRICKS::doPopupSelection(), KICAD_MANAGER_CONTROL::Execute(), PCB_EDIT_FRAME::Export_IDF3(), DIALOG_EXPORT_SVG::ExportSVGFile(), LIB_CONTROL::ExportSymbolAsSVG(), LIB_CONTROL::ExportView(), PCB_EDIT_FRAME::ExportVRML_File(), BACK_ANNOTATE::FetchNetlistFromPCB(), PCB_EDIT_FRAME::Files_io_from_id(), PCB_EDIT_FRAME::GenD356File(), DIALOG_GENDRILL::GenDrillAndMapFiles(), FOOTPRINT_VIEWER_FRAME::getCurFootprintName(), LIB_EDIT_FRAME::GetCurLib(), FOOTPRINT_VIEWER_FRAME::getCurNickname(), SCH_BASE_FRAME::GetLibPart(), DIALOG_SYMBOL_REMAP::getLibsNotInGlobalSymbolLibTable(), DISPLAY_FOOTPRINTS_FRAME::GetModule(), KICAD_MANAGER_FRAME::GetProjectFileName(), LIB_VIEW_FRAME::GetSelectedSymbol(), FP_THREAD_IFACE::GetTable(), PCB_EDIT_FRAME::importFile(), SCH_EDIT_FRAME::importFile(), SCH_EDITOR_CONTROL::ImportFPAssignments(), DIALOG_CONFIG_EQUFILES::Init(), FOOTPRINT_EDIT_FRAME::initLibraryTree(), SCH_EDIT_FRAME::KiwayMailIn(), LIB_EDIT_FRAME::KiwayMailIn(), EDA_DRAW_FRAME::LibraryFileBrowser(), LIB_EDIT_FRAME::LoadComponentFromCurrentLib(), CVPCB_MAINFRAME::LoadFootprintFiles(), DIALOG_SPICE_MODEL::loadLibrary(), LIB_EDIT_FRAME::LoadOneSymbol(), KICAD_MANAGER_FRAME::LoadProject(), SCH_EDIT_FRAME::LoadProject(), SCH_EDIT_FRAME::LoadProjectSettings(), PCB_EDIT_FRAME::LoadProjectSettings(), DRC::LoadRules(), SCH_EDIT_FRAME::LoadSheetFromFile(), DIALOG_FOOTPRINT_FP_EDITOR::On3DModelCellChanged(), On3DModelCellChanged(), FOOTPRINT_VIEWER_FRAME::OnActivate(), DIALOG_FOOTPRINT_FP_EDITOR::OnAdd3DModel(), OnAdd3DModel(), KICAD_MANAGER_FRAME::OnBrowseInFileExplorer(), TEXT_BUTTON_URL::OnButtonClick(), TEXT_BUTTON_FILE_BROWSER::OnButtonClick(), DIALOG_EDIT_COMPONENTS_LIBID::onClickOrphansButton(), SCH_EDIT_FRAME::OnCloseWindow(), DIALOG_GENDRILL::OnGenReportFile(), SCH_EDIT_FRAME::OnImportProject(), DIALOG_CHOOSE_COMPONENT::OnInitDialog(), DIALOG_CONFIG_EQUFILES::OnOkClick(), SCH_EDIT_FRAME::OnOpenCvpcb(), KICAD_MANAGER_FRAME::OnOpenFileInTextEditor(), DIALOG_NETLIST::OnOpenNetlistClick(), SCH_EDIT_FRAME::OnOpenPcbnew(), DIALOG_EXPORT_SVG::OnOutputDirectoryBrowseClicked(), DIALOG_PLOT::OnOutputDirectoryBrowseClicked(), DIALOG_PLOT_SCHEMATIC::OnOutputDirectoryBrowseClicked(), DIALOG_GEN_FOOTPRINT_POSITION::OnOutputDirectoryBrowseClicked(), DIALOG_GENDRILL::OnOutputDirectoryBrowseClicked(), DIALOG_SYMBOL_REMAP::OnRemapSymbols(), DIALOG_BOM::OnRunGenerator(), FOOTPRINT_EDIT_FRAME::OnSaveFootprintAsPng(), DIALOG_ERC::OnSaveReport(), DIALOG_DRC::OnSaveReport(), PROPERTIES_FRAME::onScintillaCharAdded(), DIALOG_LABEL_EDITOR::onScintillaCharAdded(), DIALOG_SCH_EDIT_ONE_FIELD::onScintillaCharAdded(), DIALOG_SPICE_MODEL::onSelectLibrary(), LIB_VIEW_FRAME::OnSelectSymbol(), KICAD_MANAGER_FRAME::OnUnarchiveFiles(), SCH_EDIT_FRAME::OnUpdatePCB(), SCH_EDIT_FRAME::OpenProjectFiles(), PCB_EDIT_FRAME::OpenProjectFiles(), PANEL_PREV_3D::PANEL_PREV_3D(), SCH_EDITOR_CONTROL::Paste(), FOOTPRINT_EDITOR_TOOLS::PasteFootprint(), PCB_BASE_EDIT_FRAME::PCB_BASE_EDIT_FRAME(), DIALOG_PLOT::Plot(), DIALOG_PLOT_SCHEMATIC::Plot_1_Page_HPGL(), DIALOG_PLOT_SCHEMATIC::PlotOneSheetDXF(), DIALOG_CHOOSE_COMPONENT::PopulateFootprintSelector(), SCH_EDITOR_CONTROL::Print(), SCH_EDIT_FRAME::PrintPage(), EDA_DRAW_FRAME::PrintWorkSheet(), CVPCB_MAINFRAME::ReadNetListAndFpFiles(), PCB_EDIT_FRAME::RecreateCmpFileFromBoard(), FOOTPRINT_VIEWER_FRAME::ReCreateFootprintList(), FOOTPRINT_VIEWER_FRAME::ReCreateLibraryList(), LIB_VIEW_FRAME::ReCreateListCmp(), LIB_VIEW_FRAME::ReCreateListLib(), SCH_EDIT_TOOL::RefreshSymbolFromLibrary(), EDA_3D_VIEWER::ReloadRequest(), DIALOG_SYMBOL_REMAP::remapSymbolToLibTable(), SCH_EDITOR_CONTROL::RescueLegacyProject(), SCH_EDITOR_CONTROL::RescueSymbolLibTableProject(), FOOTPRINT_EDIT_FRAME::restoreLastFootprint(), FOOTPRINT_EDIT_FRAME::retainLastFootprint(), DIALOG_EDIT_COMPONENTS_LIBID::revertChanges(), SCH_EDIT_FRAME::SaveEEFile(), FOOTPRINT_EDIT_FRAME::SaveFootprint(), FOOTPRINT_EDIT_FRAME::SaveFootprintAs(), FOOTPRINT_EDIT_FRAME::SaveFootprintInLibrary(), LIB_EDIT_FRAME::saveLibrary(), LIB_EDIT_FRAME::SaveOneSymbol(), LIB_EDIT_FRAME::savePartAs(), PCB_EDIT_FRAME::SavePcbFile(), SCH_EDIT_FRAME::SaveProject(), PCB_EDIT_FRAME::SaveProjectSettings(), DIALOG_BOARD_STATISTICS::saveReportClicked(), SCH_BASE_FRAME::saveSymbolLibTables(), FOOTPRINT_VIEWER_FRAME::SelectAndViewFootprint(), SCH_BASE_FRAME::SelectCompFromLibTree(), PCB_BASE_FRAME::SelectLibrary(), LIB_EDIT_FRAME::SelectLibraryFromList(), LIB_EDIT_FRAME::selectSymLibTable(), FOOTPRINT_VIEWER_FRAME::setCurFootprintName(), LIB_EDIT_FRAME::SetCurLib(), FOOTPRINT_VIEWER_FRAME::setCurNickname(), LIB_EDIT_FRAME::SetCurPart(), GERBVIEW_FRAME::SetPageSettings(), EE_INSPECTION_TOOL::ShowDatasheet(), DIALOG_CHOOSE_COMPONENT::ShowFootprintFor(), COMMON_CONTROL::ShowHelp(), LIB_VIEW_FRAME::ShowModal(), FOOTPRINT_VIEWER_FRAME::ShowModal(), SCH_EDIT_FRAME::ShowSchematicSetupDialog(), SIM_PLOT_FRAME::SIM_PLOT_FRAME(), LIB_MANAGER::symTable(), SYMBOL_TREE_SYNCHRONIZING_ADAPTER::Sync(), FOOTPRINT_EDIT_FRAME::SyncLibraryTree(), EDA_3D_VIEWER::takeScreenshot(), PANEL_SETUP_RULES::TransferDataFromWindow(), DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::TransferDataFromWindow(), NETLIST_DIALOG::TransferDataFromWindow(), DIALOG_EDIT_COMPONENTS_LIBID::TransferDataFromWindow(), PANEL_SETUP_RULES::TransferDataToWindow(), DIALOG_FOOTPRINT_FP_EDITOR::TransferDataToWindow(), TransferDataToWindow(), DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::UpdateFieldsFromLibrary(), DIALOG_PAGES_SETTINGS::UpdatePageLayoutExample(), FOOTPRINT_VIEWER_FRAME::UpdateTitle(), FOOTPRINT_EDIT_FRAME::updateTitle(), SCH_EDIT_FRAME::UpdateTitle(), DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::Validate(), SCH_EDIT_FRAME::WriteNetListFile(), ~DIALOG_FOOTPRINT_BOARD_EDITOR(), DIALOG_FOOTPRINT_FP_EDITOR::~DIALOG_FOOTPRINT_FP_EDITOR(), and PCB_BASE_EDIT_FRAME::~PCB_BASE_EDIT_FRAME().

◆ ResetSize()

void DIALOG_SHIM::ResetSize ( )
protectedinherited

Clear the existing dialog size and position.

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

Definition at line 244 of file dialog_shim.cpp.

245 {
246  const char* hash_key;
247 
248  if( m_hash_key.size() )
249  {
250  // a special case like EDA_LIST_DIALOG, which has multiple uses.
251  hash_key = m_hash_key.c_str();
252  }
253  else
254  {
255  hash_key = typeid(*this).name();
256  }
257 
258  RECT_MAP::iterator it = class_map.find( hash_key );
259 
260  if( it == class_map.end() )
261  return;
262 
263  EDA_RECT rect = it->second;
264  rect.SetSize( 0, 0 );
265  class_map[ hash_key ] = rect;
266 }
std::string m_hash_key
Definition: dialog_shim.h:198
static RECT_MAP class_map
void SetSize(const wxSize &size)
Definition: eda_rect.h:144
EDA_RECT handles the component boundary box.
Definition: eda_rect.h:44

References class_map, DIALOG_SHIM::m_hash_key, and EDA_RECT::SetSize().

Referenced by DIALOG_EDIT_COMPONENT_IN_LIBRARY::DIALOG_EDIT_COMPONENT_IN_LIBRARY().

◆ select3DModel()

void DIALOG_FOOTPRINT_BOARD_EDITOR::select3DModel ( int  aModelIdx)
private

Definition at line 414 of file dialog_edit_footprint_for_BoardEditor.cpp.

415 {
416  m_inSelect = true;
417 
418  aModelIdx = std::max( 0, aModelIdx );
419  aModelIdx = std::min( aModelIdx, m_modelsGrid->GetNumberRows() - 1 );
420 
421  if( m_modelsGrid->GetNumberRows() )
422  {
423  m_modelsGrid->SelectRow( aModelIdx );
424  m_modelsGrid->SetGridCursor( aModelIdx, 0 );
425  }
426 
427  m_PreviewPane->SetSelectedModel( aModelIdx );
428 
429  m_inSelect = false;
430 }
void SetSelectedModel(int idx)
SetModelDataIdx - Sets the currently selected index in the model list so that the scale/rotation/offs...

References m_inSelect, DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_modelsGrid, m_PreviewPane, and PANEL_PREV_3D::SetSelectedModel().

Referenced by On3DModelSelected(), OnAdd3DModel(), OnAdd3DRow(), OnRemove3DModel(), and TransferDataToWindow().

◆ SetInitialFocus()

void DIALOG_SHIM::SetInitialFocus ( wxWindow *  aWindow)
inlineinherited

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

Definition at line 114 of file dialog_shim.h.

115  {
116  m_initialFocusTarget = aWindow;
117  }
wxWindow * m_initialFocusTarget
Definition: dialog_shim.h:204

References DIALOG_SHIM::m_initialFocusTarget.

Referenced by DIALOG_BOM::DIALOG_BOM(), DIALOG_CHOOSE_COMPONENT::DIALOG_CHOOSE_COMPONENT(), DIALOG_CHOOSE_FOOTPRINT::DIALOG_CHOOSE_FOOTPRINT(), DIALOG_CONFIGURE_PATHS::DIALOG_CONFIGURE_PATHS(), DIALOG_EDIT_LINE_STYLE::DIALOG_EDIT_LINE_STYLE(), DIALOG_EDIT_SHEET_PIN::DIALOG_EDIT_SHEET_PIN(), DIALOG_FIELDS_EDITOR_GLOBAL::DIALOG_FIELDS_EDITOR_GLOBAL(), DIALOG_FIND::DIALOG_FIND(), DIALOG_FOOTPRINT_BOARD_EDITOR(), DIALOG_FOOTPRINT_FP_EDITOR::DIALOG_FOOTPRINT_FP_EDITOR(), DIALOG_FP_PLUGIN_OPTIONS::DIALOG_FP_PLUGIN_OPTIONS(), DIALOG_GRAPHIC_ITEM_PROPERTIES::DIALOG_GRAPHIC_ITEM_PROPERTIES(), DIALOG_GRID_SETTINGS::DIALOG_GRID_SETTINGS(), DIALOG_IMPORT_GFX::DIALOG_IMPORT_GFX(), DIALOG_JUNCTION_PROPS::DIALOG_JUNCTION_PROPS(), DIALOG_LABEL_EDITOR::DIALOG_LABEL_EDITOR(), DIALOG_LIB_EDIT_DRAW_ITEM::DIALOG_LIB_EDIT_DRAW_ITEM(), DIALOG_LIB_EDIT_PIN::DIALOG_LIB_EDIT_PIN(), DIALOG_LIB_EDIT_TEXT::DIALOG_LIB_EDIT_TEXT(), DIALOG_PAD_PRIMITIVES_PROPERTIES::DIALOG_PAD_PRIMITIVES_PROPERTIES(), DIALOG_PAD_PROPERTIES::DIALOG_PAD_PROPERTIES(), DIALOG_POSITION_RELATIVE::DIALOG_POSITION_RELATIVE(), DIALOG_SCH_FIND::DIALOG_SCH_FIND(), DIALOG_TARGET_PROPERTIES::DIALOG_TARGET_PROPERTIES(), DIALOG_TEXT_PROPERTIES::DIALOG_TEXT_PROPERTIES(), DIALOG_TRACK_VIA_PROPERTIES::DIALOG_TRACK_VIA_PROPERTIES(), DIALOG_EDIT_ONE_FIELD::init(), DIALOG_EXCHANGE_FOOTPRINTS::OnMatchAllClicked(), DIALOG_EXCHANGE_FOOTPRINTS::OnMatchIDClicked(), DIALOG_EXCHANGE_FOOTPRINTS::OnMatchRefClicked(), DIALOG_EXCHANGE_FOOTPRINTS::OnMatchSelectedClicked(), DIALOG_EXCHANGE_FOOTPRINTS::OnMatchValueClicked(), PANEL_FP_LIB_TABLE::PANEL_FP_LIB_TABLE(), PANEL_SYM_LIB_TABLE::PANEL_SYM_LIB_TABLE(), FOOTPRINT_EDIT_FRAME::SaveFootprintAs(), LIB_EDIT_FRAME::savePartAs(), DIALOG_KEEPOUT_AREA_PROPERTIES::TransferDataToWindow(), DIALOG_NON_COPPER_ZONES_EDITOR::TransferDataToWindow(), and DIALOG_COPPER_ZONE::TransferDataToWindow().

◆ SetKiway()

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

Function SetKiway.

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

Definition at line 42 of file kiway_holder.cpp.

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

References KIWAY_HOLDER::m_kiway, and name.

Referenced by BM2CMP_FRAME::BM2CMP_FRAME(), PCB::IFACE::CreateWindow(), InvokePcbLibTableEditor(), PCB_CALCULATOR_FRAME::PCB_CALCULATOR_FRAME(), and SIM_PLOT_FRAME::SIM_PLOT_FRAME().

◆ SetSizeInDU()

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

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

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

Definition at line 158 of file dialog_shim.cpp.

159 {
160  wxSize sz( x, y );
161  SetSize( ConvertDialogToPixels( sz ) );
162 }

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

◆ Show()

bool DIALOG_SHIM::Show ( bool  show)
overrideinherited

Definition at line 185 of file dialog_shim.cpp.

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

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

Referenced by DIALOG_SHIM::EndQuasiModal(), InvokeDialogERC(), SCH_EDIT_FRAME::OnAnnotate(), DIALOG_DRC::OnDRCItemDClick(), DIALOG_ERC::OnERCItemDClick(), DIALOG_CLEANUP_TRACKS_AND_VIAS::OnLeftDClickItem(), DIALOG_CLEANUP_GRAPHICS::OnLeftDClickItem(), POSITION_RELATIVE_TOOL::PositionRelative(), CVPCB_MAINFRAME::ReadNetListAndFpFiles(), DRC::ShowDRCDialog(), SCH_EDIT_FRAME::ShowFindReplaceDialog(), DIALOG_SHIM::ShowQuasiModal(), DIALOG_POSITION_RELATIVE::UpdateAnchor(), and SCH_EDIT_FRAME::UpdateHierarchyNavigator().

◆ ShowQuasiModal()

int DIALOG_SHIM::ShowQuasiModal ( )
inherited

Definition at line 345 of file dialog_shim.cpp.

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

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

Referenced by LIB_EDIT_TOOL::editFieldProperties(), SCH_EDITOR_CONTROL::EditSymbolFields(), LIB_EDIT_TOOL::editSymbolProperties(), GLOBAL_EDIT_TOOL::EditTracksAndVias(), GLOBAL_EDIT_TOOL::ExchangeFootprints(), PCB_EDIT_FRAME::InstallExchangeModuleFrame(), PCB_BASE_FRAME::InstallPadOptionsFrame(), InvokeDialogEditComponentsLibId(), InvokeDialogRescueEach(), InvokeDialogUpdateFields(), LIB_VIEW_FRAME::OnSelectSymbol(), SCH_EDIT_FRAME::OpenProjectFiles(), SCH_EDIT_TOOL::Properties(), EDIT_TOOL::Properties(), SCH_EDITOR_CONTROL::RemapSymbols(), SCH_BASE_FRAME::SelectCompFromLibTree(), PCB_BASE_FRAME::SelectFootprintFromLibTree(), PCB_EDIT_FRAME::ShowBoardSetupDialog(), and SCH_EDIT_FRAME::ShowSchematicSetupDialog().

◆ TransferDataFromWindow()

bool DIALOG_FOOTPRINT_BOARD_EDITOR::TransferDataFromWindow ( )
override

Definition at line 627 of file dialog_edit_footprint_for_BoardEditor.cpp.

628 {
629  if( !Validate() )
630  return false;
631 
632  if( !DIALOG_SHIM::TransferDataFromWindow() )
633  return false;
634 
635  if( !m_PanelGeneral->TransferDataFromWindow() )
636  return false;
637 
638  if( !m_Panel3D->TransferDataFromWindow() )
639  return false;
640 
641  auto view = m_frame->GetCanvas()->GetView();
642  BOARD_COMMIT commit( m_frame );
643  commit.Modify( m_footprint );
644 
645  // copy reference and value
646  m_footprint->Reference() = m_texts->at( 0 );
647  m_footprint->Value() = m_texts->at( 1 );
648 
649  size_t i = 2;
650 
651  for( auto item : m_footprint->GraphicalItems() )
652  {
653  TEXTE_MODULE* textModule = dyn_cast<TEXTE_MODULE*>( item );
654 
655  if( textModule )
656  {
657  // copy grid table entries till we run out, then delete any remaining texts
658  if( i < m_texts->size() )
659  *textModule = m_texts->at( i++ );
660  else
661  textModule->DeleteStructure();
662  }
663  }
664 
665  // if there are still grid table entries, create new texts for them
666  while( i < m_texts->size() )
667  {
668  auto newText = new TEXTE_MODULE( m_texts->at( i++ ) );
669  m_footprint->Add( newText, ADD_MODE::APPEND );
670  view->Add( newText );
671  }
672 
673  // Initialize masks clearances
677 
678  double dtmp = 0.0;
679  wxString msg = m_SolderPasteMarginRatioCtrl->GetValue();
680  msg.ToDouble( &dtmp );
681 
682  // A -50% margin ratio means no paste on a pad, the ratio must be >= -50%
683  if( dtmp < -50.0 )
684  dtmp = -50.0;
685  // A margin ratio is always <= 0
686  // 0 means use full pad copper area
687  if( dtmp > 0.0 )
688  dtmp = 0.0;
689 
691 
692  switch( m_ZoneConnectionChoice->GetSelection() )
693  {
694  default:
695  case 0:
697  break;
698  case 1:
700  break;
701  case 2:
703  break;
704  case 3:
706  break;
707  }
708 
709  // Set Module Position
710  wxPoint modpos( m_posX.GetValue(), m_posY.GetValue() );
711  m_footprint->SetPosition( modpos );
712  m_footprint->SetLocked( m_AutoPlaceCtrl->GetSelection() == 2 );
713  m_footprint->SetPadsLocked( m_AutoPlaceCtrl->GetSelection() == 1 );
714 
715  switch( m_AttributsCtrl->GetSelection() )
716  {
717  case 0: m_footprint->SetAttributes( 0 ); break;
718  case 1: m_footprint->SetAttributes( MOD_CMS ); break;
719  case 2: m_footprint->SetAttributes( MOD_VIRTUAL ); break;
720  default: wxFAIL;
721  }
722 
725 
726  // Now, set orientation. Must be done after other changes because rotation changes field
727  // positions on board (so that relative positions are held constant)
728  m_OrientValidator.TransferFromWindow();
729 
730  int orient = KiROUND( m_OrientValue * 10.0 );
731 
732  if( m_footprint->GetOrientation() != orient )
734 
735  // Set component side, that also have effect on the fields positions on board
736  bool change_layer = false;
737  if( m_BoardSideCtrl->GetSelection() == 0 ) // layer req = COMPONENT
738  {
739  if( m_footprint->GetLayer() == B_Cu )
740  change_layer = true;
741  }
742  else if( m_footprint->GetLayer() == F_Cu )
743  change_layer = true;
744 
745  if( change_layer )
747 
748  std::list<MODULE_3D_SETTINGS>* draw3D = &m_footprint->Models();
749  draw3D->clear();
750  draw3D->insert( draw3D->end(), m_shapes3D_list.begin(), m_shapes3D_list.end() );
751 
753 
754  // This is a simple edit, we must create an undo entry
755  if( m_footprint->GetEditFlags() == 0 ) // i.e. not edited, or moved
756  commit.Push( _( "Modify module properties" ) );
757 
758  SetReturnCode( PRM_EDITOR_EDIT_OK );
759  return true;
760 }
void SetPlacementCost90(int aCost)
Definition: class_module.h:553
double GetOrientation() const
Definition: class_module.h:211
TEXTE_MODULE & Reference()
Definition: class_module.h:474
void Rotate(const wxPoint &aRotCentre, double aAngle) override
Function Rotate Rotate this object.
void SetLocalClearance(int aClearance)
Definition: class_module.h:238
void SetPlacementCost180(int aCost)
Definition: class_module.h:550
void CalculateBoundingBox()
Function CalculateBoundingBox calculates the bounding box in board coordinates.
PCB_DRAW_PANEL_GAL * GetCanvas() const override
Return a pointer to GAL-based canvas of given EDA draw frame.
Set for modules listed in the automatic insertion list (usually SMD footprints)
Definition: class_module.h:68
void DeleteStructure()
Function DeleteStructure deletes this object after removing from its parent if it has one.
DRAWINGS & GraphicalItems()
Definition: class_module.h:179
void SetLocalSolderPasteMarginRatio(double aRatio)
Definition: class_module.h:244
pads are covered by copper
STATUS_FLAGS GetEditFlags() const
Definition: base_struct.h:237
TEXTE_MODULE & Value()
read/write accessors:
Definition: class_module.h:473
void Flip(const wxPoint &aCentre, bool aFlipLeftRight) override
Function Flip Flip this object, i.e.
wxFloatingPointValidator< double > m_OrientValidator
void SetPadsLocked(bool aPadsLocked)
Definition: class_module.h:335
void SetPosition(const wxPoint &aPos) override
virtual KIGFX::PCB_VIEW * GetView() const override
Function GetView() Returns a pointer to the VIEW instance used in the panel.
void SetLocalSolderMaskMargin(int aMargin)
Definition: class_module.h:228
void Add(BOARD_ITEM *aItem, ADD_MODE aMode=ADD_MODE::INSERT) override
Use thermal relief for pads.
void SetLocalSolderPasteMargin(int aMargin)
Definition: class_module.h:241
std::list< MODULE_3D_SETTINGS > & Models()
Definition: class_module.h:201
void SetLocked(bool isLocked) override
Function SetLocked sets the MODULE_is_LOCKED bit in the m_ModuleStatus.
Definition: class_module.h:307
#define _(s)
Definition: 3d_actions.cpp:33
Virtual component: when created by copper shapes on board (Like edge card connectors,...
Definition: class_module.h:70
void SetZoneConnection(ZONE_CONNECTION aType)
Definition: class_module.h:246
PCBNEW_SETTINGS & Settings()
constexpr ret_type KiROUND(fp_type v)
Round a floating point number to an integer using "round halfway cases away from zero".
Definition: util.h:68
Pads are not covered.
virtual long long int GetValue()
Function GetValue Returns the current value in Internal Units.
wxPoint GetPosition() const override
Definition: class_module.h:206
virtual PCB_LAYER_ID GetLayer() const
Function GetLayer returns the primary layer this item is on.
void SetAttributes(int aAttributes)
Definition: class_module.h:256
std::vector< MODULE_3D_SETTINGS > m_shapes3D_list

References _, MODULE::Add(), APPEND, B_Cu, MODULE::CalculateBoundingBox(), BOARD_ITEM::DeleteStructure(), F_Cu, MODULE::Flip(), FULL, PCB_BASE_FRAME::GetCanvas(), EDA_ITEM::GetEditFlags(), BOARD_ITEM::GetLayer(), MODULE::GetOrientation(), MODULE::GetPosition(), UNIT_BINDER::GetValue(), PCB_DRAW_PANEL_GAL::GetView(), MODULE::GraphicalItems(), INHERITED, KiROUND(), DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_AttributsCtrl, DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_AutoPlaceCtrl, DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_BoardSideCtrl, DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_CostRot180Ctrl, DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_CostRot90Ctrl, PCBNEW_SETTINGS::m_FlipLeftRight, m_footprint, m_frame, m_netClearance, m_OrientValidator, m_OrientValue, DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_Panel3D, DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_PanelGeneral, m_posX, m_posY, m_shapes3D_list, m_solderMask, m_solderPaste, DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_SolderPasteMarginRatioCtrl, m_texts, DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_ZoneConnectionChoice, MOD_CMS, MOD_VIRTUAL, MODULE::Models(), COMMIT::Modify(), NONE, PRM_EDITOR_EDIT_OK, BOARD_COMMIT::Push(), MODULE::Reference(), MODULE::Rotate(), MODULE::SetAttributes(), MODULE::SetLocalClearance(), MODULE::SetLocalSolderMaskMargin(), MODULE::SetLocalSolderPasteMargin(), MODULE::SetLocalSolderPasteMarginRatio(), MODULE::SetLocked(), MODULE::SetPadsLocked(), MODULE::SetPlacementCost180(), MODULE::SetPlacementCost90(), MODULE::SetPosition(), PCB_BASE_FRAME::Settings(), MODULE::SetZoneConnection(), THERMAL, Validate(), and MODULE::Value().

◆ TransferDataToWindow()

bool DIALOG_FOOTPRINT_BOARD_EDITOR::TransferDataToWindow ( )
override

Definition at line 232 of file dialog_edit_footprint_for_BoardEditor.cpp.

233 {
234  if( !wxDialog::TransferDataToWindow() )
235  return false;
236 
237  if( !m_PanelGeneral->TransferDataToWindow() )
238  return false;
239 
240  if( !m_Panel3D->TransferDataToWindow() )
241  return false;
242 
243  // Module Texts
244 
245  m_texts->push_back( m_footprint->Reference() );
246  m_texts->push_back( m_footprint->Value() );
247 
248  for( auto item : m_footprint->GraphicalItems() )
249  {
250  auto textModule = dyn_cast<TEXTE_MODULE*>( item );
251 
252  if( textModule )
253  m_texts->push_back( *textModule );
254  }
255 
256  // notify the grid
257  wxGridTableMessage tmsg( m_texts, wxGRIDTABLE_NOTIFY_ROWS_APPENDED, m_texts->GetNumberRows() );
258  m_itemsGrid->ProcessTableMessage( tmsg );
259 
260  // Module Properties
261 
264 
265  m_BoardSideCtrl->SetSelection( (m_footprint->GetLayer() == B_Cu) ? 1 : 0 );
266 
268 
269  if( m_OrientValue == 0.0 )
270  m_Orient0->SetValue( true );
271  else if( m_OrientValue == 90.0 || m_OrientValue == -270.0 )
272  m_Orient90->SetValue( true );
273  else if( m_OrientValue == 270.0 || m_OrientValue == -90.0 )
274  m_Orient270->SetValue( true );
275  else if( m_OrientValue == 180.0 || m_OrientValue == -180.0 )
276  m_Orient180->SetValue( true );
277  else
278  m_OrientOther->SetValue( true );
279 
281 
282  if( m_footprint->IsLocked() )
283  m_AutoPlaceCtrl->SetSelection( 2 );
284  else if( m_footprint->PadsLocked() )
285  m_AutoPlaceCtrl->SetSelection( 1 );
286  else
287  m_AutoPlaceCtrl->SetSelection( 0 );
288 
289  m_AutoPlaceCtrl->SetItemToolTip( 0, _( "Component can be freely moved and auto placed. User "
290  "can arbitrarily select and edit component's pads." ) );
291  m_AutoPlaceCtrl->SetItemToolTip( 1, _( "Component can be freely moved and auto placed, but "
292  "its pads cannot be selected or edited." ) );
293  m_AutoPlaceCtrl->SetItemToolTip( 2, _( "Component is locked: it cannot be freely moved or "
294  "auto placed." ) );
295 
298 
299  m_AttributsCtrl->SetItemToolTip( 0, _( "Use this attribute for most non SMD footprints\n"
300  "Footprints with this option are not put in the footprint position list file" ) );
301  m_AttributsCtrl->SetItemToolTip( 1, _( "Use this attribute for SMD footprints.\n"
302  "Only footprints with this option are put in the footprint position list file" ) );
303  m_AttributsCtrl->SetItemToolTip( 2, _( "Use this attribute for \"virtual\" footprints drawn "
304  "on board\nsuch as an edge connector (old ISA PC bus for instance)" ) );
305 
306  switch( m_footprint->GetAttributes() & 255 )
307  {
308  case MOD_CMS: m_AttributsCtrl->SetSelection( 1 ); break;
309  case MOD_VIRTUAL: m_AttributsCtrl->SetSelection( 2 ); break;
310  case 0:
311  default: m_AttributsCtrl->SetSelection( 0 ); break;
312  }
313 
314  // Local Clearances
315 
319 
320  // Prefer "-0" to "0" for normally negative values
322  m_SolderPasteMarginCtrl->SetValue( wxT( "-" ) + m_SolderPasteMarginCtrl->GetValue() );
323 
324  // Add solder paste margin ratio in percent
325  // for the usual default value 0.0, display -0.0 (or -0,0 in some countries)
326  wxString msg;
327  msg.Printf( wxT( "%f" ), m_footprint->GetLocalSolderPasteMarginRatio() * 100.0 );
328 
330  msg[0] == '0') // Sometimes Printf adds a sign if the value is very small (0.0)
331  m_SolderPasteMarginRatioCtrl->SetValue( wxT("-") + msg );
332  else
334 
335  switch( m_footprint->GetZoneConnection() )
336  {
337  default:
339  m_ZoneConnectionChoice->SetSelection( 0 );
340  break;
342  m_ZoneConnectionChoice->SetSelection( 1 );
343  break;
345  m_ZoneConnectionChoice->SetSelection( 2 );
346  break;
348  m_ZoneConnectionChoice->SetSelection( 3 );
349  break;
350  }
351 
352  // 3D Settings
353 
354  wxString default_path;
355  wxGetEnv( KISYS3DMOD, &default_path );
356 #ifdef __WINDOWS__
357  default_path.Replace( wxT( "/" ), wxT( "\\" ) );
358 #endif
359 
360  m_shapes3D_list.clear();
361  m_modelsGrid->DeleteRows( 0, m_modelsGrid->GetNumberRows() );
362 
363  wxString origPath, alias, shortPath;
364  FILENAME_RESOLVER* res = Prj().Get3DCacheManager()->GetResolver();
365 
366  for( const MODULE_3D_SETTINGS& model : m_footprint->Models() )
367  {
368  m_shapes3D_list.push_back( model );
369  origPath = model.m_Filename;
370 
371  if( res && res->SplitAlias( origPath, alias, shortPath ) )
372  origPath = alias + wxT( ":" ) + shortPath;
373 
374  m_modelsGrid->AppendRows( 1 );
375  int row = m_modelsGrid->GetNumberRows() - 1;
376  m_modelsGrid->SetCellValue( row, 0, origPath );
377  m_modelsGrid->SetCellValue( row, 1, model.m_Show ? wxT( "1" ) : wxT( "0" ) );
378  }
379 
380  select3DModel( 0 ); // will clamp idx within bounds
382 
383  // Show the footprint's FPID.
384  m_tcLibraryID->SetValue( m_footprint->GetFPID().Format() );
385 
386  // Show the footprint's full unique Kicad ID.
387  m_tcFullUuid->SetValue( m_footprint->GetPath().AsString() );
388 
389  for( int col = 0; col < m_itemsGrid->GetNumberCols(); col++ )
390  {
391  m_itemsGrid->SetColMinimalWidth( col, m_itemsGrid->GetVisibleWidth( col, true, false,
392  false ) );
393  // Adjust the column size. The column 6 has a small bitmap, so its width must be
394  // taken in account
395  int col_size = m_itemsGrid->GetVisibleWidth( col, true, true, false );
396 
397  if( col == 6 )
398  col_size += 20;
399 
400  if( m_itemsGrid->IsColShown( col ) )
401  m_itemsGrid->SetColSize( col, col_size );
402  }
403 
404  m_itemsGrid->SetRowLabelSize( m_itemsGrid->GetVisibleWidth( -1, false, true, true ) );
405  m_modelsGrid->SetColSize( 1, m_modelsGrid->GetVisibleWidth( 1, true, false, false ) );
406 
407  Layout();
408  adjustGridColumns( m_itemsGrid->GetRect().GetWidth());
409 
410  return true;
411 }
int GetAttributes() const
Definition: class_module.h:255
double GetOrientation() const
Definition: class_module.h:211
int GetPlacementCost90() const
Definition: class_module.h:552
TEXTE_MODULE & Reference()
Definition: class_module.h:474
ZONE_CONNECTION GetZoneConnection() const
Definition: class_module.h:247
int GetLocalClearance(wxString *aSource=nullptr) const
Definition: class_module.h:230
Set for modules listed in the automatic insertion list (usually SMD footprints)
Definition: class_module.h:68
void UpdateDummyModule(bool aRelaodRequired=true)
UpdateModelInfoList - copy shapes from the current shape list which are flagged for preview to the co...
const LIB_ID & GetFPID() const
Definition: class_module.h:215
#define KISYS3DMOD
A variable name whose value holds the path of 3D shape files.
Definition: eda_3d_viewer.h:45
const KIID_PATH & GetPath() const
Definition: class_module.h:224
DRAWINGS & GraphicalItems()
Definition: class_module.h:179
int GetLocalSolderMaskMargin() const
Definition: class_module.h:227
void SetValue(const wxString &aValue) override
Set a new value in evaluator buffer, and display it in the wxTextCtrl.
int GetVisibleWidth(int aCol, bool aHeader=true, bool aContents=false, bool aKeep=true)
Calculates the specified column based on the actual size of the text on screen.
Definition: wx_grid.cpp:230
bool SplitAlias(const wxString &aFileName, wxString &anAlias, wxString &aRelPath)
Function SplitAlias returns true if the given name contains an alias and populates the string anAlias...
pads are covered by copper
TEXTE_MODULE & Value()
read/write accessors:
Definition: class_module.h:473
PROJECT & Prj() const
Function Prj returns a reference to the PROJECT "associated with" this KIWAY.
bool IsLocked() const override
Function IsLocked.
Definition: class_module.h:297
UTF8 Format() const
Definition: lib_id.cpp:237
int GetLocalSolderPasteMargin() const
Definition: class_module.h:240
int GetPlacementCost180() const
Definition: class_module.h:549
Use thermal relief for pads.
double GetLocalSolderPasteMarginRatio() const
Definition: class_module.h:243
std::list< MODULE_3D_SETTINGS > & Models()
Definition: class_module.h:201
#define _(s)
Definition: 3d_actions.cpp:33
Virtual component: when created by copper shapes on board (Like edge card connectors,...
Definition: class_module.h:70
virtual void SetValue(int aValue)
Function SetValue Sets new value (in Internal Units) for the text field, taking care of units convers...
wxString AsString() const
Definition: common.h:137
Pads are not covered.
bool PadsLocked() const
Definition: class_module.h:333
wxPoint GetPosition() const override
Definition: class_module.h:206
virtual PCB_LAYER_ID GetLayer() const
Function GetLayer returns the primary layer this item is on.
void updateOrientationControl()
Update the orientation validated control, without triggering a change event on the control (which wou...
int GetNumberRows() override
std::vector< MODULE_3D_SETTINGS > m_shapes3D_list

References _, adjustGridColumns(), KIID_PATH::AsString(), B_Cu, LIB_ID::Format(), FULL, MODULE::GetAttributes(), MODULE::GetFPID(), BOARD_ITEM::GetLayer(), MODULE::GetLocalClearance(), MODULE::GetLocalSolderMaskMargin(), MODULE::GetLocalSolderPasteMargin(), MODULE::GetLocalSolderPasteMarginRatio(), TEXT_MOD_GRID_TABLE::GetNumberRows(), MODULE::GetOrientation(), MODULE::GetPath(), MODULE::GetPlacementCost180(), MODULE::GetPlacementCost90(), MODULE::GetPosition(), WX_GRID::GetVisibleWidth(), MODULE::GetZoneConnection(), MODULE::GraphicalItems(), INHERITED, MODULE::IsLocked(), KISYS3DMOD, DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_AttributsCtrl, DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_AutoPlaceCtrl, DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_BoardSideCtrl, DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_CostRot180Ctrl, DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_CostRot90Ctrl, m_footprint, DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_itemsGrid, DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_modelsGrid, m_netClearance, DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_Orient0, DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_Orient180, DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_Orient270, DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_Orient90, DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_OrientOther, m_OrientValue, DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_Panel3D, DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_PanelGeneral, m_posX, m_posY, m_PreviewPane, m_shapes3D_list, m_solderMask, m_solderPaste, DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_SolderPasteMarginCtrl, DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_SolderPasteMarginRatioCtrl, DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_tcFullUuid, DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_tcLibraryID, m_texts, DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_ZoneConnectionChoice, MOD_CMS, MOD_VIRTUAL, MODULE::Models(), NONE, MODULE::PadsLocked(), KIWAY_HOLDER::Prj(), MODULE::Reference(), select3DModel(), TEXT_CTRL_EVAL::SetValue(), UNIT_BINDER::SetValue(), FILENAME_RESOLVER::SplitAlias(), THERMAL, PANEL_PREV_3D::UpdateDummyModule(), updateOrientationControl(), MODULE::Value(), wxPoint::x, and wxPoint::y.

◆ UpdateModule()

void DIALOG_FOOTPRINT_BOARD_EDITOR::UpdateModule ( wxCommandEvent &  )
overrideprivatevirtual

◆ updateOrientationControl()

void DIALOG_FOOTPRINT_BOARD_EDITOR::updateOrientationControl ( )
private

Update the orientation validated control, without triggering a change event on the control (which would update the radio buttons)

Definition at line 942 of file dialog_edit_footprint_for_BoardEditor.cpp.

943 {
945 }
void ValidatorTransferToWindowWithoutEvents(wxValidator &aValidator)
Call a text validator's TransferDataToWindow method without firing a text change event.
Definition: validators.cpp:376
wxFloatingPointValidator< double > m_OrientValidator

References m_OrientValidator, and KIUI::ValidatorTransferToWindowWithoutEvents().

Referenced by ModuleOrientEvent(), and TransferDataToWindow().

◆ Validate()

bool DIALOG_FOOTPRINT_BOARD_EDITOR::Validate ( )
override

Definition at line 593 of file dialog_edit_footprint_for_BoardEditor.cpp.

594 {
596  return false;
597 
598  if( !DIALOG_SHIM::Validate() )
599  return false;
600 
601  // Check for empty texts.
602  for( size_t i = 2; i < m_texts->size(); ++i )
603  {
604  TEXTE_MODULE& text = m_texts->at( i );
605 
606  if( text.GetText().IsEmpty() )
607  {
608  if( m_NoteBook->GetSelection() != 0 )
609  m_NoteBook->SetSelection( 0 );
610 
612  m_delayedErrorMessage = _( "Text items must have some content." );
614  m_delayedFocusRow = i;
615 
616  return false;
617  }
618  }
619 
620  if( !m_netClearance.Validate( 0, INT_MAX ) )
621  return false;
622 
623  return true;
624 }
bool CommitPendingChanges(bool aQuietMode=false)
Close any open cell edit controls.
Definition: wx_grid.cpp:174
virtual bool Validate(double aMin, double aMax, EDA_UNITS aUnits=EDA_UNITS::UNSCALED, bool aUseMils=false)
Function Validate Validates the control against the given range, informing the user of any errors fou...
#define _(s)
Definition: 3d_actions.cpp:33
virtual const wxString & GetText() const
Return the string associated with the text object.
Definition: eda_text.h:126

References _, WX_GRID::CommitPendingChanges(), EDA_TEXT::GetText(), m_delayedErrorMessage, m_delayedFocusColumn, m_delayedFocusGrid, m_delayedFocusRow, DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_itemsGrid, m_netClearance, DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_NoteBook, m_texts, TMC_TEXT, and UNIT_BINDER::Validate().

Referenced by TransferDataFromWindow().

◆ VertPixelsFromDU()

int DIALOG_SHIM::VertPixelsFromDU ( int  y)
protectedinherited

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

See SetSizeInDU or wxDialog documentation for more information.

Definition at line 172 of file dialog_shim.cpp.

173 {
174  wxSize sz( 0, y );
175  return ConvertDialogToPixels( sz ).y;
176 }

Referenced by DIALOG_CHOOSE_COMPONENT::DIALOG_CHOOSE_COMPONENT().

Member Data Documentation

◆ bLowerSizer3D

wxBoxSizer* DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::bLowerSizer3D
protectedinherited

◆ bSizerMain3D

wxBoxSizer* DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::bSizerMain3D
protectedinherited

◆ m_allow180Label

wxStaticText* DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_allow180Label
protectedinherited

◆ m_allow90Label

wxStaticText* DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_allow90Label
protectedinherited

◆ m_AttributsCtrl

wxRadioBox* DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_AttributsCtrl
protectedinherited

◆ m_AutoPlaceCtrl

wxRadioBox* DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_AutoPlaceCtrl
protectedinherited

◆ m_BoardSideCtrl

wxChoice* DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_BoardSideCtrl
protectedinherited

◆ m_BoardSideLabel

wxStaticText* DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_BoardSideLabel
protectedinherited

◆ m_bpAdd

◆ m_bpDelete

◆ m_button5

wxButton* DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_button5
protectedinherited

◆ m_buttonAdd

◆ m_buttonBrowse

◆ m_buttonCfgPath

wxButton* DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_buttonCfgPath
protectedinherited

◆ m_buttonExchange

wxButton* DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_buttonExchange
protectedinherited

◆ m_buttonModuleEditor

wxButton* DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_buttonModuleEditor
protectedinherited

◆ m_buttonRemove

◆ m_buttonUpdate

wxButton* DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_buttonUpdate
protectedinherited

◆ m_CostRot180Ctrl

wxSlider* DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_CostRot180Ctrl
protectedinherited

◆ m_CostRot90Ctrl

wxSlider* DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_CostRot90Ctrl
protectedinherited

◆ m_delayedErrorMessage

wxString DIALOG_FOOTPRINT_BOARD_EDITOR::m_delayedErrorMessage
private

◆ m_delayedFocusColumn

int DIALOG_FOOTPRINT_BOARD_EDITOR::m_delayedFocusColumn
private

◆ m_delayedFocusGrid

wxGrid* DIALOG_FOOTPRINT_BOARD_EDITOR::m_delayedFocusGrid
private

◆ m_delayedFocusRow

int DIALOG_FOOTPRINT_BOARD_EDITOR::m_delayedFocusRow
private

◆ m_firstPaintEvent

bool DIALOG_SHIM::m_firstPaintEvent
protectedinherited

Definition at line 203 of file dialog_shim.h.

Referenced by DIALOG_SHIM::OnPaint().

◆ m_footprint

MODULE* DIALOG_FOOTPRINT_BOARD_EDITOR::m_footprint
private

◆ m_frame

PCB_EDIT_FRAME* DIALOG_FOOTPRINT_BOARD_EDITOR::m_frame
private

◆ m_hash_key

◆ m_initialFocus

bool DIALOG_FOOTPRINT_BOARD_EDITOR::m_initialFocus
private

Definition at line 66 of file dialog_edit_footprint_for_BoardEditor.h.

Referenced by OnUpdateUI().

◆ m_initialFocusTarget

wxWindow* DIALOG_SHIM::m_initialFocusTarget
protectedinherited

Definition at line 204 of file dialog_shim.h.

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

◆ m_inSelect

bool DIALOG_FOOTPRINT_BOARD_EDITOR::m_inSelect
private

Definition at line 68 of file dialog_edit_footprint_for_BoardEditor.h.

Referenced by On3DModelSelected(), and select3DModel().

◆ m_itemsGrid

◆ m_libraryIDLabel

wxStaticText* DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_libraryIDLabel
protectedinherited

◆ m_macHack

std::vector<bool> DIALOG_FOOTPRINT_BOARD_EDITOR::m_macHack
private

◆ m_modelsGrid

◆ m_ModPositionX

wxTextCtrl* DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_ModPositionX
protectedinherited

◆ m_ModPositionY

wxTextCtrl* DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_ModPositionY
protectedinherited

◆ m_netClearance

UNIT_BINDER DIALOG_FOOTPRINT_BOARD_EDITOR::m_netClearance
private

◆ m_NetClearanceCtrl

wxTextCtrl* DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_NetClearanceCtrl
protectedinherited

◆ m_NetClearanceLabel

wxStaticText* DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_NetClearanceLabel
protectedinherited

◆ m_NetClearanceUnits

wxStaticText* DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_NetClearanceUnits
protectedinherited

◆ m_NoteBook

◆ m_Orient0

◆ m_Orient180

◆ m_Orient270

◆ m_Orient90

◆ m_OrientOther

◆ m_OrientValidator

wxFloatingPointValidator<double> DIALOG_FOOTPRINT_BOARD_EDITOR::m_OrientValidator
private

◆ m_OrientValue

double DIALOG_FOOTPRINT_BOARD_EDITOR::m_OrientValue
private

◆ m_OrientValueCtrl

◆ m_page

int DIALOG_FOOTPRINT_BOARD_EDITOR::m_page = 0
staticprivate

◆ m_Panel3D

wxPanel* DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_Panel3D
protectedinherited

◆ m_PanelClearances

wxPanel* DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_PanelClearances
protectedinherited

◆ m_PanelGeneral

wxPanel* DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_PanelGeneral
protectedinherited

◆ m_parentFrame

EDA_BASE_FRAME* DIALOG_SHIM::m_parentFrame
protectedinherited

Definition at line 211 of file dialog_shim.h.

Referenced by DIALOG_SHIM::OnCharHook(), and DIALOG_DRC::OnDRCItemRClick().

◆ m_posX

UNIT_BINDER DIALOG_FOOTPRINT_BOARD_EDITOR::m_posX
private

◆ m_posY

UNIT_BINDER DIALOG_FOOTPRINT_BOARD_EDITOR::m_posY
private

◆ m_PreviewPane

◆ m_qmodal_loop

WX_EVENT_LOOP* DIALOG_SHIM::m_qmodal_loop
protectedinherited

Definition at line 206 of file dialog_shim.h.

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

◆ m_qmodal_parent_disabler

WDO_ENABLE_DISABLE* DIALOG_SHIM::m_qmodal_parent_disabler
protectedinherited

◆ m_qmodal_showing

bool DIALOG_SHIM::m_qmodal_showing
protectedinherited

Definition at line 208 of file dialog_shim.h.

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

◆ m_sdbSizerStdButtons

wxStdDialogButtonSizer* DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_sdbSizerStdButtons
protectedinherited

◆ m_sdbSizerStdButtonsCancel

wxButton* DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_sdbSizerStdButtonsCancel
protectedinherited

◆ m_sdbSizerStdButtonsOK

wxButton* DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_sdbSizerStdButtonsOK
protectedinherited

◆ m_shapes3D_list

◆ m_sizerAllow180

wxBoxSizer* DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_sizerAllow180
protectedinherited

◆ m_sizerAllow90

wxBoxSizer* DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_sizerAllow90
protectedinherited

◆ m_sizerAP

wxStaticBoxSizer* DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_sizerAP
protectedinherited

◆ m_solderMask

UNIT_BINDER DIALOG_FOOTPRINT_BOARD_EDITOR::m_solderMask
private

◆ m_SolderMaskMarginCtrl

wxTextCtrl* DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_SolderMaskMarginCtrl
protectedinherited

◆ m_SolderMaskMarginLabel

wxStaticText* DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_SolderMaskMarginLabel
protectedinherited

◆ m_SolderMaskMarginUnits

wxStaticText* DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_SolderMaskMarginUnits
protectedinherited

◆ m_solderPaste

UNIT_BINDER DIALOG_FOOTPRINT_BOARD_EDITOR::m_solderPaste
private

◆ m_SolderPasteMarginCtrl

wxTextCtrl* DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_SolderPasteMarginCtrl
protectedinherited

◆ m_SolderPasteMarginLabel

wxStaticText* DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_SolderPasteMarginLabel
protectedinherited

◆ m_SolderPasteMarginRatioCtrl

TEXT_CTRL_EVAL* DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_SolderPasteMarginRatioCtrl
protectedinherited

◆ m_SolderPasteMarginUnits

wxStaticText* DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_SolderPasteMarginUnits
protectedinherited

◆ m_SolderPasteRatioMarginUnits

wxStaticText* DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_SolderPasteRatioMarginUnits
protectedinherited

◆ m_staticText16

wxStaticText* DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_staticText16
protectedinherited

◆ m_staticTextInfo

wxStaticText* DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_staticTextInfo
protectedinherited

◆ m_staticTextInfoCopper

wxStaticText* DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_staticTextInfoCopper
protectedinherited

◆ m_staticTextInfoPaste

wxStaticText* DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_staticTextInfoPaste
protectedinherited

◆ m_staticTextInfoValNeg

wxStaticText* DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_staticTextInfoValNeg
protectedinherited

◆ m_staticTextInfoValPos

wxStaticText* DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_staticTextInfoValPos
protectedinherited

◆ m_staticTextRatio

wxStaticText* DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_staticTextRatio
protectedinherited

◆ m_stFullUuid

wxStaticText* DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_stFullUuid
protectedinherited

◆ m_tabOrder

◆ m_tcFullUuid

wxTextCtrl* DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_tcFullUuid
protectedinherited

◆ m_tcLibraryID

wxTextCtrl* DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_tcLibraryID
protectedinherited

◆ m_texts

◆ m_units

◆ m_XPosLabel

wxStaticText* DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_XPosLabel
protectedinherited

◆ m_XPosUnit

wxStaticText* DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_XPosUnit
protectedinherited

◆ m_YPosLabel

wxStaticText* DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_YPosLabel
protectedinherited

◆ m_YPosUnit

wxStaticText* DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_YPosUnit
protectedinherited

◆ m_ZoneConnectionChoice

wxChoice* DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::m_ZoneConnectionChoice
protectedinherited

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