KiCad PCB EDA Suite
DIALOG_EDIT_COMPONENT_IN_LIBRARY Class Reference

#include <dialog_edit_component_in_lib.h>

Inheritance diagram for DIALOG_EDIT_COMPONENT_IN_LIBRARY:
DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE DIALOG_SHIM KIWAY_HOLDER

Public Types

enum  HOLDER_TYPE { DIALOG, FRAME, PANEL, SCREEN }
 

Public Member Functions

bool TransferDataToWindow () override
 
bool TransferDataFromWindow () override
 
bool Validate () override
 
 DIALOG_EDIT_COMPONENT_IN_LIBRARY (LIB_EDIT_FRAME *parent, LIB_PART *aLibEntry)
 Constructors. More...
 
 ~DIALOG_EDIT_COMPONENT_IN_LIBRARY ()
 
void SetInitialFocus (wxWindow *aWindow)
 Sets the window (usually a wxTextCtrl) that should be focused when the dialog is shown. More...
 
int ShowQuasiModal ()
 
void EndQuasiModal (int retCode)
 
bool IsQuasiModal ()
 
bool Show (bool show) override
 
bool Enable (bool enable) override
 
void OnPaint (wxPaintEvent &event)
 
EDA_UNITS_T GetUserUnits () const
 
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)
 

Public Attributes

wxConfigBase * m_config
 
LIB_EDIT_FRAMEm_Parent
 
LIB_PARTm_libEntry
 
FIELDS_GRID_TABLE< LIB_FIELD > * m_fields
 
int m_currentAlias
 
LIB_ALIASES m_aliasesBuffer
 
UNIT_BINDER m_pinNameOffset
 
wxControl * m_delayedFocusCtrl
 
WX_GRIDm_delayedFocusGrid
 
int m_delayedFocusRow
 
int m_delayedFocusColumn
 
int m_delayedFocusPage
 
wxString m_delayedErrorMessage
 
wxString m_shownColumns
 
int m_width
 

Protected Member Functions

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

Protected Attributes

wxNotebook * m_NoteBook
 
wxPanel * m_PanelBasic
 
WX_GRIDm_grid
 
wxBitmapButton * m_bpAdd
 
wxBitmapButton * m_bpMoveUp
 
wxBitmapButton * m_bpMoveDown
 
wxBitmapButton * m_bpDelete
 
wxTextCtrl * m_SymbolNameCtrl
 
wxTextCtrl * m_DescCtrl
 
wxStaticText * staticKeywordsLabel
 
wxTextCtrl * m_KeywordCtrl
 
wxCheckBox * m_AsConvertButt
 
wxCheckBox * m_OptionPower
 
wxStaticText * m_staticTextNbUnits
 
wxSpinCtrl * m_SelNumberOfUnits
 
wxCheckBox * m_OptionPartsLocked
 
wxCheckBox * m_ShowPinNumButt
 
wxCheckBox * m_ShowPinNameButt
 
wxCheckBox * m_PinsNameInsideButt
 
wxStaticText * m_nameOffsetLabel
 
wxTextCtrl * m_nameOffsetCtrl
 
wxStaticText * m_nameOffsetUnits
 
wxPanel * m_PanelAlias
 
wxListBox * m_aliasListBox
 
wxBitmapButton * m_addAliasButton
 
wxBitmapButton * m_deleteAliasButton
 
wxStaticText * m_staticText12
 
WX_GRIDm_aliasGrid
 
wxTextCtrl * m_AliasNameCtrl
 
wxTextCtrl * m_AliasDescCtrl
 
wxStaticText * staticAliasKeywordsLabel
 
wxTextCtrl * m_AliasKeywordsCtrl
 
wxPanel * m_PanelFootprintFilter
 
wxStaticText * m_staticTextFootprints
 
wxListBox * m_FootprintFilterListBox
 
wxBitmapButton * m_addFilterButton
 
wxBitmapButton * m_editFilterButton
 
wxBitmapButton * m_deleteFilterButton
 
wxButton * m_spiceFieldsButton
 
wxStdDialogButtonSizer * m_stdSizerButton
 
wxButton * m_stdSizerButtonOK
 
wxButton * m_stdSizerButtonCancel
 
EDA_UNITS_T m_units
 
std::string m_hash_key
 
bool m_firstPaintEvent
 
wxWindow * m_initialFocusTarget
 
WX_EVENT_LOOPm_qmodal_loop
 
bool m_qmodal_showing
 
WDO_ENABLE_DISABLEm_qmodal_parent_disabler
 
std::vector< wxWindow * > m_tabOrder
 

Private Member Functions

void transferAliasDataToBuffer ()
 
void OnAddField (wxCommandEvent &event) override
 
void OnDeleteField (wxCommandEvent &event) override
 
void OnMoveUp (wxCommandEvent &event) override
 
void OnMoveDown (wxCommandEvent &event) override
 
void OnSymbolNameKillFocus (wxFocusEvent &event) override
 
void OnSymbolNameText (wxCommandEvent &event) override
 
void OnSelectAlias (wxCommandEvent &event) override
 
void OnAddAlias (wxCommandEvent &event) override
 
void OnDeleteAlias (wxCommandEvent &event) override
 
void OnAddFootprintFilter (wxCommandEvent &event) override
 
void OnDeleteFootprintFilter (wxCommandEvent &event) override
 
void OnEditFootprintFilter (wxCommandEvent &event) override
 
void OnSizeGrid (wxSizeEvent &event) override
 
void OnSizeAliasGrid (wxSizeEvent &event) override
 
void OnGridCellChanging (wxGridEvent &event)
 
void OnAliasGridCellChanging (wxGridEvent &event)
 
void OnAliasNameKillFocus (wxFocusEvent &event) override
 
void OnAliasNameText (wxCommandEvent &event) override
 
void OnEditSpiceModel (wxCommandEvent &event) override
 
void OnUpdateUI (wxUpdateUIEvent &event) override
 
void OnFilterDClick (wxMouseEvent &event) override
 
void OnCancelButtonClick (wxCommandEvent &event) override
 
void updateAliasName (bool aFromGrid, const wxString &aName)
 
bool checkAliasName (const wxString &aName)
 
void adjustGridColumns (int aWidth)
 
void adjustAliasGridColumns (int aWidth)
 

Static Private Attributes

static int m_lastOpenedPage = 0
 

Detailed Description

Definition at line 39 of file dialog_edit_component_in_lib.h.

Member Enumeration Documentation

◆ HOLDER_TYPE

enum KIWAY_HOLDER::HOLDER_TYPE
inherited
Enumerator
DIALOG 
FRAME 
PANEL 
SCREEN 

Definition at line 42 of file kiway_holder.h.

Constructor & Destructor Documentation

◆ DIALOG_EDIT_COMPONENT_IN_LIBRARY()

DIALOG_EDIT_COMPONENT_IN_LIBRARY::DIALOG_EDIT_COMPONENT_IN_LIBRARY ( LIB_EDIT_FRAME parent,
LIB_PART aLibEntry 
)

Constructors.

Definition at line 56 of file dialog_edit_component_in_lib.cpp.

57  :
59  m_Parent( aParent ),
60  m_libEntry( aLibEntry ),
61  m_currentAlias( wxNOT_FOUND ),
63  m_delayedFocusCtrl( nullptr ),
64  m_delayedFocusGrid( nullptr ),
65  m_delayedFocusRow( -1 ),
67  m_delayedFocusPage( -1 ),
68  m_width( 0 )
69 {
71 
72  // Give a bit more room for combobox editors
73  m_grid->SetDefaultRowSize( m_grid->GetDefaultRowSize() + 4 );
74  m_aliasGrid->SetDefaultRowSize( m_aliasGrid->GetDefaultRowSize() + 4 );
75 
76  // Work around a bug in wxWidgets where it fails to recalculate the grid height
77  // after changing the default row size
78  m_aliasGrid->AppendRows( 1 );
79  m_aliasGrid->DeleteRows( m_grid->GetNumberRows() - 1, 1 );
80 
81  m_fields = new FIELDS_GRID_TABLE<LIB_FIELD>( this, aParent, m_libEntry );
83 
84  m_grid->PushEventHandler( new FIELDS_GRID_TRICKS( m_grid, this ) );
85  m_aliasGrid->PushEventHandler( new FIELDS_GRID_TRICKS( m_grid, this ) );
86 
87  // Show/hide columns according to the user's preference
88  m_config->Read( LibEditFieldsShownColumnsKey, &m_shownColumns, wxT( "0 1 2 3 4 5 6 7" ) );
90 
91  // Hide non-overridden rows in aliases grid
92  m_aliasGrid->HideRow( REFERENCE );
93  m_aliasGrid->HideRow( FOOTPRINT );
94 
95  wxGridCellAttr* attr = new wxGridCellAttr;
96  attr->SetReadOnly();
97  m_aliasGrid->SetColAttr( FDC_NAME, attr );
99  m_aliasGrid->SetCellValue( DATASHEET, FDC_NAME,
101 
102  attr = new wxGridCellAttr;
103  attr->SetEditor( new GRID_CELL_URL_EDITOR( this ) );
104  m_aliasGrid->SetAttr( DATASHEET, FDC_VALUE, attr );
105 
106  m_SymbolNameCtrl->SetValidator( SCH_FIELD_VALIDATOR( true, VALUE ) );
107 
108  // Configure button logos
109  m_bpAdd->SetBitmap( KiBitmap( small_plus_xpm ) );
110  m_bpDelete->SetBitmap( KiBitmap( trash_xpm ) );
111  m_bpMoveUp->SetBitmap( KiBitmap( small_up_xpm ) );
112  m_bpMoveDown->SetBitmap( KiBitmap( small_down_xpm ) );
113  m_addAliasButton->SetBitmap( KiBitmap( small_plus_xpm ) );
114  m_deleteAliasButton->SetBitmap( KiBitmap( trash_xpm ) );
115  m_addFilterButton->SetBitmap( KiBitmap( small_plus_xpm ) );
116  m_deleteFilterButton->SetBitmap( KiBitmap( trash_xpm ) );
117  m_editFilterButton->SetBitmap( KiBitmap( small_edit_xpm ) );
118 
119  m_stdSizerButtonOK->SetDefault();
120 
121 #ifndef KICAD_SPICE
122  m_spiceFieldsButton->Hide();
123 #endif
124 
125  // wxFormBuilder doesn't include this event...
126  m_grid->Connect( wxEVT_GRID_CELL_CHANGING,
128  NULL, this );
129  m_aliasGrid->Connect( wxEVT_GRID_CELL_CHANGING,
131  NULL, this );
132 
133  m_grid->GetParent()->Layout();
134  m_aliasGrid->GetParent()->Layout();
135  Layout();
136 
138 }
name of datasheet
void ShowHideColumns(const wxString &shownColumns)
Show/hide the grid columns based on a tokenized string of shown column indexes.
Definition: wx_grid.cpp:119
wxConfigBase * KifaceSettings() const
Definition: kiface_i.h:103
void FinishDialogSettings()
In all dialogs, we must call the same functions to fix minimal dlg size, the default position and per...
static const wxString GetDefaultFieldName(int aFieldNdx)
Function GetDefaultFieldName returns a default symbol field name for field aFieldNdx for all componen...
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:57
DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE(wxWindow *parent, wxWindowID id=ID_LIBEDIT_NOTEBOOK, const wxString &title=_("Library Symbol Properties"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(855, 579), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
Field Name Module PCB, i.e. "16DIP300".
Field Reference of part, i.e. "IC21".
KIFACE_I & Kiface()
Global KIFACE_I "get" accessor.
Definition: kicad.cpp:51
wxBitmap KiBitmap(BITMAP_DEF aBitmap)
Construct a wxBitmap from a memory record, held in a BITMAP_DEF.
Definition: bitmap.cpp:79
#define VALUE
#define LibEditFieldsShownColumnsKey
A text control validator used for validating the text allowed in library and schematic component fiel...
FIELDS_GRID_TABLE< LIB_FIELD > * m_fields

References DATASHEET, FDC_NAME, FDC_VALUE, DIALOG_SHIM::FinishDialogSettings(), FOOTPRINT, TEMPLATE_FIELDNAME::GetDefaultFieldName(), KiBitmap(), Kiface(), KIFACE_I::KifaceSettings(), LibEditFieldsShownColumnsKey, DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_addAliasButton, DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_addFilterButton, DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_aliasGrid, DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_bpAdd, DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_bpDelete, DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_bpMoveDown, DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_bpMoveUp, m_config, DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_deleteAliasButton, DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_deleteFilterButton, DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_editFilterButton, m_fields, DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_grid, m_libEntry, m_shownColumns, DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_spiceFieldsButton, DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_stdSizerButtonOK, DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_SymbolNameCtrl, OnAliasGridCellChanging(), OnGridCellChanging(), REFERENCE, WX_GRID::SetTable(), WX_GRID::ShowHideColumns(), and VALUE.

◆ ~DIALOG_EDIT_COMPONENT_IN_LIBRARY()

DIALOG_EDIT_COMPONENT_IN_LIBRARY::~DIALOG_EDIT_COMPONENT_IN_LIBRARY ( )

Definition at line 141 of file dialog_edit_component_in_lib.cpp.

142 {
143  m_lastOpenedPage = m_NoteBook->GetSelection( );
144 
146 
147  // Prevents crash bug in wxGrid's d'tor
149 
150  m_grid->Disconnect( wxEVT_GRID_CELL_CHANGING,
152  NULL, this );
153  m_aliasGrid->Disconnect( wxEVT_GRID_CELL_CHANGING,
155  NULL, this );
156 
157  // Delete the GRID_TRICKS.
158  m_grid->PopEventHandler( true );
159  m_aliasGrid->PopEventHandler( true );
160 
161  // An OK will have transferred these and cleared the buffer, but we have to delete them
162  // on a Cancel.
163  for( LIB_ALIAS* alias : m_aliasesBuffer )
164  delete alias;
165 }
Part library alias object definition.
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:88
#define LibEditFieldsShownColumnsKey
wxString GetShownColumns()
Get a tokenized string containing the shown column indexes.
Definition: wx_grid.cpp:101
FIELDS_GRID_TABLE< LIB_FIELD > * m_fields

References WX_GRID::DestroyTable(), WX_GRID::GetShownColumns(), LibEditFieldsShownColumnsKey, m_aliasesBuffer, DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_aliasGrid, m_config, m_fields, DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_grid, m_lastOpenedPage, DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_NoteBook, OnAliasGridCellChanging(), and OnGridCellChanging().

Member Function Documentation

◆ adjustAliasGridColumns()

void DIALOG_EDIT_COMPONENT_IN_LIBRARY::adjustAliasGridColumns ( int  aWidth)
private

◆ adjustGridColumns()

void DIALOG_EDIT_COMPONENT_IN_LIBRARY::adjustGridColumns ( int  aWidth)
private

Definition at line 838 of file dialog_edit_component_in_lib.cpp.

839 {
840  m_width = aWidth;
841 
842  // Account for scroll bars
843  aWidth -= ( m_grid->GetSize().x - m_grid->GetClientSize().x );
844 
845  m_grid->AutoSizeColumn( FDC_NAME );
846 
847  int fixedColsWidth = m_grid->GetColSize( FDC_NAME );
848 
849  for( int i = 2; i < m_grid->GetNumberCols(); i++ )
850  fixedColsWidth += m_grid->GetColSize( i );
851 
852  m_grid->SetColSize( FDC_VALUE, aWidth - fixedColsWidth );
853 }
size_t i
Definition: json11.cpp:597

References FDC_NAME, FDC_VALUE, i, DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_grid, and m_width.

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

◆ checkAliasName()

bool DIALOG_EDIT_COMPONENT_IN_LIBRARY::checkAliasName ( const wxString &  aName)
private

Definition at line 665 of file dialog_edit_component_in_lib.cpp.

666 {
667  if( aName.IsEmpty() )
668  return false;
669 
670  if( m_SymbolNameCtrl->GetValue().CmpNoCase( aName ) == 0 )
671  {
672  wxString msg;
673  msg.Printf( _( "Alias can not have same name as symbol." ) );
674  DisplayInfoMessage( this, msg );
675  return false;
676  }
677 
678  for( int i = 0; i < (int)m_aliasListBox->GetCount(); ++i )
679  {
680  if( i == m_aliasListBox->GetSelection() )
681  continue;
682 
683  if( m_aliasListBox->GetString( i ).CmpNoCase( aName ) == 0 )
684  {
685  wxString msg;
686  msg.Printf( _( "Alias \"%s\" already exists." ), aName );
687  DisplayInfoMessage( this, msg );
688  return false;
689  }
690  }
691 
692  wxString library = m_Parent->GetCurLib();
693 
694  if( !library.empty() )
695  {
696  LIB_ALIAS* existing = Prj().SchSymbolLibTable()->LoadSymbol( library, aName );
697 
698  if( existing && existing->GetPart()->GetName() != m_libEntry->GetName() )
699  {
700  wxString msg;
701  msg.Printf( _( "Symbol name \"%s\" already exists in library \"%s\"." ),
702  aName, library );
703  DisplayErrorMessage( this, msg );
704  return false;
705  }
706  }
707 
708  return true;
709 }
Part library alias object definition.
void DisplayErrorMessage(wxWindow *aParent, const wxString &aText, const wxString &aExtraInfo)
Display an error message with aMessage.
Definition: confirm.cpp:249
wxString GetCurLib() const
The nickname of the current library being edited and empty string if none.
PROJECT & Prj() const
Function Prj returns a reference to the PROJECT "associated with" this KIWAY.
LIB_PART * GetPart() const
Get the shared LIB_PART.
#define _(s)
const wxString & GetName() const
size_t i
Definition: json11.cpp:597
void DisplayInfoMessage(wxWindow *aParent, const wxString &aMessage, const wxString &aExtraInfo)
Display an informational message box with aMessage.
Definition: confirm.cpp:265

References _, DisplayErrorMessage(), DisplayInfoMessage(), LIB_EDIT_FRAME::GetCurLib(), LIB_PART::GetName(), LIB_ALIAS::GetPart(), i, DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_aliasListBox, m_libEntry, m_Parent, DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_SymbolNameCtrl, and KIWAY_HOLDER::Prj().

Referenced by OnAliasGridCellChanging(), and OnAliasNameKillFocus().

◆ Enable()

bool DIALOG_SHIM::Enable ( bool  enable)
overrideinherited

Definition at line 238 of file dialog_shim.cpp.

239 {
240  // so we can do logging of this state change:
241 
242 #if 0 && defined(DEBUG)
243  const char* type_id = typeid( *this ).name();
244  printf( "DIALOG_SHIM %s: %s\n", type_id, enable ? "enabled" : "disabled" );
245  fflush(0); //Needed on msys2 to immediately print the message
246 #endif
247 
248  return wxDialog::Enable( enable );
249 }

◆ EndQuasiModal()

void DIALOG_SHIM::EndQuasiModal ( int  retCode)
inherited

Definition at line 398 of file dialog_shim.cpp.

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

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

Referenced by HK_PROMPT_DIALOG::EndFlexible(), DIALOG_SHIM::OnButton(), DIALOG_EDIT_COMPONENTS_LIBID::onCancel(), DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnCancelButtonClick(), 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().

◆ 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 138 of file dialog_shim.cpp.

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

References PCAD2KICAD::Center.

Referenced by DIALOG_3D_VIEW_OPTIONS::DIALOG_3D_VIEW_OPTIONS(), DIALOG_ANNOTATE::DIALOG_ANNOTATE(), DIALOG_BOM::DIALOG_BOM(), DIALOG_COPPER_ZONE::DIALOG_COPPER_ZONE(), DIALOG_DRC_CONTROL::DIALOG_DRC_CONTROL(), DIALOG_EDIT_COMPONENT_IN_LIBRARY(), DIALOG_EDIT_COMPONENT_IN_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_ENUM_PADS::DIALOG_ENUM_PADS(), DIALOG_EXCHANGE_FOOTPRINTS::DIALOG_EXCHANGE_FOOTPRINTS(), DIALOG_EXPORT_3DFILE::DIALOG_EXPORT_3DFILE(), DIALOG_EXPORT_IDF3::DIALOG_EXPORT_IDF3(), DIALOG_EXPORT_STEP::DIALOG_EXPORT_STEP(), DIALOG_EXPORT_SVG::DIALOG_EXPORT_SVG(), DIALOG_FIELDS_EDITOR_GLOBAL::DIALOG_FIELDS_EDITOR_GLOBAL(), DIALOG_FOOTPRINT_BOARD_EDITOR::DIALOG_FOOTPRINT_BOARD_EDITOR(), DIALOG_FOOTPRINT_FP_EDITOR::DIALOG_FOOTPRINT_FP_EDITOR(), DIALOG_FOOTPRINT_WIZARD_LIST::DIALOG_FOOTPRINT_WIZARD_LIST(), DIALOG_FOOTPRINTS_DISPLAY_OPTIONS::DIALOG_FOOTPRINTS_DISPLAY_OPTIONS(), DIALOG_FP_BROWSER_DISPLAY_OPTIONS::DIALOG_FP_BROWSER_DISPLAY_OPTIONS(), DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS(), DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS(), DIALOG_GLOBAL_LIB_TABLE_CONFIG::DIALOG_GLOBAL_LIB_TABLE_CONFIG(), DIALOG_IMAGE_EDITOR::DIALOG_IMAGE_EDITOR(), DIALOG_INSPECTOR::DIALOG_INSPECTOR(), 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_SELECT_NET_FROM_LIST::DIALOG_SELECT_NET_FROM_LIST(), DIALOG_SET_GRID::DIALOG_SET_GRID(), DIALOG_SWAP_LAYERS::DIALOG_SWAP_LAYERS(), DIALOG_TARGET_PROPERTIES::DIALOG_TARGET_PROPERTIES(), DIALOG_TEXT_PROPERTIES::DIALOG_TEXT_PROPERTIES(), DIALOG_TRACK_VIA_PROPERTIES::DIALOG_TRACK_VIA_PROPERTIES(), DIALOG_TRACK_VIA_SIZE::DIALOG_TRACK_VIA_SIZE(), DIALOG_UPDATE_PCB::DIALOG_UPDATE_PCB(), PAGED_DIALOG::finishInitialization(), DIALOG_EDIT_ONE_FIELD::init(), DIALOG_EDIT_LIBRARY_TABLES::InstallPanel(), NETLIST_DIALOG::NETLIST_DIALOG(), DIALOG_GRAPHIC_ITEM_PROPERTIES::OnInitDlg(), DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnInitDlg(), DIALOG_SIM_SETTINGS::onInitDlg(), DIALOG_SPICE_MODEL::onInitDlg(), DIALOG_SIGNAL_LIST::TransferDataToWindow(), DIALOG_UPDATE_FIELDS::TransferDataToWindow(), DIALOG_BOARD_STATISTICS::TransferDataToWindow(), and DIALOG_COLOR_PICKER::TransferDataToWindow().

◆ 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(), PL_EDITOR_FRAME::SaveSettings(), and GERBVIEW_FRAME::SaveSettings().

◆ 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 159 of file dialog_shim.cpp.

160 {
161  wxSize sz( x, 0 );
162  return ConvertDialogToPixels( sz ).x;
163 }

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 137 of file dialog_shim.h.

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

Referenced by DIALOG_TEXT_PROPERTIES::OnCharHook(), and DIALOG_LABEL_EDITOR::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() && e.ShiftDown() && !e.MetaDown();
145  }

Referenced by DIALOG_TEXT_PROPERTIES::OnCharHook(), and DIALOG_LABEL_EDITOR::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(), SCH_EDIT_FRAME::CreateScreens(), 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(), EDIT_TOOL::EditFpInFpEditor(), SCH_EDIT_FRAME::EditSheet(), SCH_EDITOR_CONTROL::EditWithLibEdit(), DISPLAY_FOOTPRINTS_FRAME::Get_Module(), LIB_MANAGER::GetBufferedPart(), LIB_MANAGER::getLibraryBuffer(), FOOTPRINT_EDIT_FRAME::GetPlotSettings(), PCB_EDIT_FRAME::importFile(), SCH_EDIT_FRAME::importFile(), SCH_EDIT_FRAME::InitSheet(), KICAD_MANAGER_FRAME::language_change(), KIWAY_PLAYER::language_change(), CVPCB_MAINFRAME::LoadFootprintFiles(), KICAD_MANAGER_FRAME::LoadProject(), SCH_EDIT_FRAME::LoadSheetFromFile(), 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(), 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(), FOOTPRINT_EDIT_FRAME::OnUpdateInsertModuleInBoard(), FOOTPRINT_EDIT_FRAME::OnUpdateLoadModuleFromBoard(), SCH_EDIT_FRAME::OnUpdatePCB(), SCH_EDIT_FRAME::OpenProjectFiles(), KIWAY_HOLDER::Prj(), CVPCB_MAINFRAME::ReadNetListAndFpFiles(), FOOTPRINT_VIEWER_FRAME::ReCreateFootprintList(), LIB_EDIT_FRAME::refreshSchematic(), SCH_EDIT_FRAME::rescueProject(), EE_INSPECTION_TOOL::RunSimulation(), SCH_EDIT_FRAME::SaveEEFile(), CVPCB_MAINFRAME::SaveFootprintAssociation(), FOOTPRINT_EDIT_FRAME::SaveFootprintToBoard(), 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(), FOOTPRINT_EDIT_FRAME::SetPlotSettings(), CVPCB_CONTROL::ShowFootprintViewer(), COMMON_CONTROL::ShowLibraryTable(), COMMON_CONTROL::ShowPlayer(), KICAD_MANAGER_CONTROL::ShowPlayer(), SIM_PLOT_FRAME::SIM_PLOT_FRAME(), LIB_MANAGER::UpdatePart(), and DIALOG_EXCHANGE_FOOTPRINTS::ViewAndSelectFootprint().

◆ OnAddAlias()

void DIALOG_EDIT_COMPONENT_IN_LIBRARY::OnAddAlias ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE.

Definition at line 712 of file dialog_edit_component_in_lib.cpp.

713 {
715  return;
716 
717  wxCommandEvent dummy;
718  wxString aliasname = _( "untitled" );
719  int suffix = 1;
720 
721  while( m_aliasListBox->FindString( aliasname ) != wxNOT_FOUND )
722  aliasname = wxString::Format( _( "untitled%i" ), suffix++ );
723 
724  LIB_ALIAS* alias = new LIB_ALIAS( aliasname, m_libEntry );
725 
726  // Initialize with parent's data
727  alias->SetDescription( m_DescCtrl->GetValue() );
728  alias->SetKeyWords( m_KeywordCtrl->GetValue() );
729  alias->SetDocFileName( m_grid->GetCellValue( DATASHEET, FDC_VALUE ) );
730 
731  m_aliasesBuffer.push_back( alias ); // transfers ownership of alias to aliasesBuffer
732 
733  m_aliasListBox->Append( aliasname );
734  m_aliasListBox->SetSelection( m_aliasListBox->GetCount() - 1 );
735  OnSelectAlias( dummy );
736 }
Part library alias object definition.
name of datasheet
void SetDocFileName(const wxString &aDocFileName)
void OnSelectAlias(wxCommandEvent &event) override
bool CommitPendingChanges(bool aQuietMode=false)
Close any open cell edit controls.
Definition: wx_grid.cpp:172
#define _(s)
void SetDescription(const wxString &aDescription)
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
static LIB_PART * dummy()
Used to draw a dummy shape when a LIB_PART is not found in library.
void SetKeyWords(const wxString &aKeyWords)

References _, WX_GRID::CommitPendingChanges(), DATASHEET, dummy(), FDC_VALUE, Format(), m_aliasesBuffer, DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_aliasGrid, DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_aliasListBox, m_delayedFocusCtrl, DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_DescCtrl, DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_grid, DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_KeywordCtrl, m_libEntry, OnSelectAlias(), LIB_ALIAS::SetDescription(), LIB_ALIAS::SetDocFileName(), and LIB_ALIAS::SetKeyWords().

◆ OnAddField()

void DIALOG_EDIT_COMPONENT_IN_LIBRARY::OnAddField ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE.

Definition at line 421 of file dialog_edit_component_in_lib.cpp.

422 {
423  if( !m_grid->CommitPendingChanges() )
424  return;
425 
426  int fieldID = m_fields->size();
427  LIB_FIELD newField( m_libEntry, fieldID );
428 
429  m_fields->push_back( newField );
430 
431  // notify the grid
432  wxGridTableMessage msg( m_fields, wxGRIDTABLE_NOTIFY_ROWS_APPENDED, 1 );
433  m_grid->ProcessTableMessage( msg );
434 
435  m_grid->MakeCellVisible( m_fields->size() - 1, 0 );
436  m_grid->SetGridCursor( m_fields->size() - 1, 0 );
437 
438  m_grid->EnableCellEditControl();
439  m_grid->ShowCellEditControl();
440 }
Field object used in symbol libraries.
Definition: lib_field.h:59
bool CommitPendingChanges(bool aQuietMode=false)
Close any open cell edit controls.
Definition: wx_grid.cpp:172
FIELDS_GRID_TABLE< LIB_FIELD > * m_fields

References WX_GRID::CommitPendingChanges(), m_fields, DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_grid, and m_libEntry.

◆ OnAddFootprintFilter()

void DIALOG_EDIT_COMPONENT_IN_LIBRARY::OnAddFootprintFilter ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE.

Definition at line 783 of file dialog_edit_component_in_lib.cpp.

784 {
785  wxString filterLine;
786  LIB_PART* component = m_Parent->GetCurPart();
787 
788  if( component == NULL )
789  return;
790 
791  WX_TEXT_ENTRY_DIALOG dlg( this, _( "Filter:" ), _( "Add Footprint Filter" ), filterLine );
792 
793  if( dlg.ShowModal() == wxID_CANCEL || dlg.GetValue().IsEmpty() )
794  return;
795 
796  filterLine = dlg.GetValue();
797  filterLine.Replace( wxT( " " ), wxT( "_" ) );
798 
799  // duplicate filters do no harm, so don't be a nanny.
800 
801  m_FootprintFilterListBox->Append( filterLine );
802  m_FootprintFilterListBox->SetSelection( m_FootprintFilterListBox->GetCount() - 1 );
803 }
LIB_PART * GetCurPart() const
Return the current part being edited or NULL if none selected.
Define a library symbol object.
#define _(s)

References _, LIB_EDIT_FRAME::GetCurPart(), WX_TEXT_ENTRY_DIALOG::GetValue(), DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_FootprintFilterListBox, and m_Parent.

Referenced by OnFilterDClick().

◆ OnAliasGridCellChanging()

void DIALOG_EDIT_COMPONENT_IN_LIBRARY::OnAliasGridCellChanging ( wxGridEvent &  event)
private

Definition at line 533 of file dialog_edit_component_in_lib.cpp.

534 {
535  if( event.GetRow() == VALUE )
536  {
537  int idx = m_aliasListBox->GetSelection();
538  wxString newName = event.GetString();
539 
540  if( idx < 0 || !checkAliasName( newName ) )
541  {
542  event.Veto();
543 
545  m_delayedFocusRow = event.GetRow();
546  m_delayedFocusColumn = event.GetCol();
547  m_delayedFocusPage = 1;
548  }
549  else
550  updateAliasName( true, newName );
551  }
552 }
void updateAliasName(bool aFromGrid, const wxString &aName)
#define VALUE

References checkAliasName(), DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_aliasGrid, DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_aliasListBox, m_delayedFocusColumn, m_delayedFocusGrid, m_delayedFocusPage, m_delayedFocusRow, updateAliasName(), and VALUE.

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

◆ OnAliasNameKillFocus()

void DIALOG_EDIT_COMPONENT_IN_LIBRARY::OnAliasNameKillFocus ( wxFocusEvent &  event)
overrideprivatevirtual

◆ OnAliasNameText()

void DIALOG_EDIT_COMPONENT_IN_LIBRARY::OnAliasNameText ( wxCommandEvent &  event)
overrideprivatevirtual

◆ OnCancelButtonClick()

void DIALOG_EDIT_COMPONENT_IN_LIBRARY::OnCancelButtonClick ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE.

Definition at line 775 of file dialog_edit_component_in_lib.cpp.

776 {
777  // Running the Footprint Browser gums up the works and causes the automatic cancel
778  // stuff to no longer work. So we do it here ourselves.
779  EndQuasiModal( wxID_CANCEL );
780 }
void EndQuasiModal(int retCode)

References DIALOG_SHIM::EndQuasiModal().

◆ OnDeleteAlias()

void DIALOG_EDIT_COMPONENT_IN_LIBRARY::OnDeleteAlias ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE.

Definition at line 739 of file dialog_edit_component_in_lib.cpp.

740 {
742  return;
743 
744  int sel = m_aliasListBox->GetSelection();
745 
746  if( sel == wxNOT_FOUND )
747  return;
748 
749  m_aliasListBox->Delete( (unsigned) sel );
750  m_aliasesBuffer.erase( m_aliasesBuffer.begin() + sel );
751  m_currentAlias = wxNOT_FOUND;
752 
753  if( m_aliasListBox->GetCount() == 0 )
754  m_aliasListBox->SetSelection( wxNOT_FOUND );
755  else
756  m_aliasListBox->SetSelection( std::max( 0, sel - 1 ) );
757 
758  wxCommandEvent dummy;
759  OnSelectAlias( dummy );
760 }
void OnSelectAlias(wxCommandEvent &event) override
bool CommitPendingChanges(bool aQuietMode=false)
Close any open cell edit controls.
Definition: wx_grid.cpp:172
static LIB_PART * dummy()
Used to draw a dummy shape when a LIB_PART is not found in library.
#define max(a, b)
Definition: auxiliary.h:86

References WX_GRID::CommitPendingChanges(), dummy(), m_aliasesBuffer, DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_aliasGrid, DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_aliasListBox, m_currentAlias, m_delayedFocusCtrl, max, and OnSelectAlias().

◆ OnDeleteField()

void DIALOG_EDIT_COMPONENT_IN_LIBRARY::OnDeleteField ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE.

Definition at line 443 of file dialog_edit_component_in_lib.cpp.

444 {
445  int curRow = m_grid->GetGridCursorRow();
446 
447  if( curRow < 0 )
448  return;
449  else if( curRow < MANDATORY_FIELDS )
450  {
451  DisplayError( this, wxString::Format( _( "The first %d fields are mandatory." ),
452  MANDATORY_FIELDS ) );
453  return;
454  }
455 
456  m_grid->CommitPendingChanges( true /* quiet mode */ );
457 
458  m_fields->erase( m_fields->begin() + curRow );
459 
460  // notify the grid
461  wxGridTableMessage msg( m_fields, wxGRIDTABLE_NOTIFY_ROWS_DELETED, curRow, 1 );
462  m_grid->ProcessTableMessage( msg );
463 
464  if( m_grid->GetNumberRows() > 0 )
465  {
466  m_grid->MakeCellVisible( std::max( 0, curRow-1 ), m_grid->GetGridCursorCol() );
467  m_grid->SetGridCursor( std::max( 0, curRow-1 ), m_grid->GetGridCursorCol() );
468  }
469 }
void DisplayError(wxWindow *aParent, const wxString &aText, int aDisplayTime)
Display an error or warning message box with aMessage.
Definition: confirm.cpp:236
The first 4 are mandatory, and must be instantiated in SCH_COMPONENT and LIB_PART constructors.
bool CommitPendingChanges(bool aQuietMode=false)
Close any open cell edit controls.
Definition: wx_grid.cpp:172
#define _(s)
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 max(a, b)
Definition: auxiliary.h:86
FIELDS_GRID_TABLE< LIB_FIELD > * m_fields

References _, WX_GRID::CommitPendingChanges(), DisplayError(), Format(), m_fields, DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_grid, MANDATORY_FIELDS, and max.

◆ OnDeleteFootprintFilter()

void DIALOG_EDIT_COMPONENT_IN_LIBRARY::OnDeleteFootprintFilter ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE.

Definition at line 806 of file dialog_edit_component_in_lib.cpp.

807 {
808  int ii = m_FootprintFilterListBox->GetSelection();
809 
810  if( ii >= 0 )
811  {
812  m_FootprintFilterListBox->Delete( (unsigned) ii );
813 
814  if( m_FootprintFilterListBox->GetCount() == 0 )
815  m_FootprintFilterListBox->SetSelection( wxNOT_FOUND );
816  else
817  m_FootprintFilterListBox->SetSelection( std::max( 0, ii - 1 ) );
818  }
819 }
#define max(a, b)
Definition: auxiliary.h:86

References DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_FootprintFilterListBox, and max.

◆ OnEditFootprintFilter()

void DIALOG_EDIT_COMPONENT_IN_LIBRARY::OnEditFootprintFilter ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE.

Definition at line 822 of file dialog_edit_component_in_lib.cpp.

823 {
824  int idx = m_FootprintFilterListBox->GetSelection();
825 
826  if( idx >= 0 )
827  {
828  wxString filter = m_FootprintFilterListBox->GetStringSelection();
829 
830  WX_TEXT_ENTRY_DIALOG dlg( this, _( "Filter:" ), _( "Edit Footprint Filter" ), filter );
831 
832  if( dlg.ShowModal() == wxID_OK && !dlg.GetValue().IsEmpty() )
833  m_FootprintFilterListBox->SetString( (unsigned) idx, dlg.GetValue() );
834  }
835 }
#define _(s)

References _, WX_TEXT_ENTRY_DIALOG::GetValue(), and DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_FootprintFilterListBox.

Referenced by OnFilterDClick().

◆ OnEditSpiceModel()

void DIALOG_EDIT_COMPONENT_IN_LIBRARY::OnEditSpiceModel ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE.

Definition at line 587 of file dialog_edit_component_in_lib.cpp.

588 {
589 #ifdef KICAD_SPICE
590  int diff = m_fields->size();
591  auto cmp = SCH_COMPONENT( *m_libEntry, m_libEntry->GetLibId(), nullptr );
592 
593  DIALOG_SPICE_MODEL dialog( this, cmp, m_fields );
594 
595  if( dialog.ShowModal() != wxID_OK )
596  return;
597 
598  diff = m_fields->size() - diff;
599 
600  if( diff > 0 )
601  {
602  wxGridTableMessage msg( m_fields, wxGRIDTABLE_NOTIFY_ROWS_APPENDED, diff );
603  m_grid->ProcessTableMessage( msg );
604  }
605  else if( diff < 0 )
606  {
607  wxGridTableMessage msg( m_fields, wxGRIDTABLE_NOTIFY_ROWS_DELETED, 0, diff );
608  m_grid->ProcessTableMessage( msg );
609  }
610 
611  m_grid->ForceRefresh();
612 #endif /* KICAD_SPICE */
613 }
const LIB_ID & GetLibId() const
Class SCH_COMPONENT describes a real schematic component.
Definition: sch_component.h:73
FIELDS_GRID_TABLE< LIB_FIELD > * m_fields

References LIB_PART::GetLibId(), m_fields, DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_grid, and m_libEntry.

◆ OnFilterDClick()

void DIALOG_EDIT_COMPONENT_IN_LIBRARY::OnFilterDClick ( wxMouseEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE.

Definition at line 763 of file dialog_edit_component_in_lib.cpp.

764 {
765  int idx = m_FootprintFilterListBox->HitTest( event.GetPosition() );
766  wxCommandEvent dummy;
767 
768  if( idx >= 0 )
770  else
772 }
void OnAddFootprintFilter(wxCommandEvent &event) override
void OnEditFootprintFilter(wxCommandEvent &event) override
static LIB_PART * dummy()
Used to draw a dummy shape when a LIB_PART is not found in library.

References dummy(), DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_FootprintFilterListBox, OnAddFootprintFilter(), and OnEditFootprintFilter().

◆ OnGridCellChanging()

void DIALOG_EDIT_COMPONENT_IN_LIBRARY::OnGridCellChanging ( wxGridEvent &  event)
private

Definition at line 382 of file dialog_edit_component_in_lib.cpp.

383 {
384  wxGridCellEditor* editor = m_grid->GetCellEditor( event.GetRow(), event.GetCol() );
385  wxControl* control = editor->GetControl();
386 
387  if( control && control->GetValidator() && !control->GetValidator()->Validate( control ) )
388  {
389  event.Veto();
390 
392  m_delayedFocusRow = event.GetRow();
393  m_delayedFocusColumn = event.GetCol();
394  m_delayedFocusPage = 0;
395  }
396  else if( event.GetRow() == VALUE && event.GetCol() == FDC_VALUE )
397  m_SymbolNameCtrl->ChangeValue( event.GetString() );
398 
399  editor->DecRef();
400 }
#define VALUE

References FDC_VALUE, m_delayedFocusColumn, m_delayedFocusGrid, m_delayedFocusPage, m_delayedFocusRow, DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_grid, DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_SymbolNameCtrl, and VALUE.

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

◆ OnMoveDown()

void DIALOG_EDIT_COMPONENT_IN_LIBRARY::OnMoveDown ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE.

Definition at line 494 of file dialog_edit_component_in_lib.cpp.

495 {
496  if( !m_grid->CommitPendingChanges() )
497  return;
498 
499  int i = m_grid->GetGridCursorRow();
500 
501  if( i >= MANDATORY_FIELDS && i + 1 < m_fields->GetNumberRows() )
502  {
503  LIB_FIELD tmp = m_fields->at( (unsigned) i );
504  m_fields->erase( m_fields->begin() + i, m_fields->begin() + i + 1 );
505  m_fields->insert( m_fields->begin() + i + 1, tmp );
506  m_grid->ForceRefresh();
507 
508  m_grid->SetGridCursor( i + 1, m_grid->GetGridCursorCol() );
509  m_grid->MakeCellVisible( m_grid->GetGridCursorRow(), m_grid->GetGridCursorCol() );
510  }
511  else
512  wxBell();
513 }
int GetNumberRows() override
The first 4 are mandatory, and must be instantiated in SCH_COMPONENT and LIB_PART constructors.
Field object used in symbol libraries.
Definition: lib_field.h:59
bool CommitPendingChanges(bool aQuietMode=false)
Close any open cell edit controls.
Definition: wx_grid.cpp:172
size_t i
Definition: json11.cpp:597
FIELDS_GRID_TABLE< LIB_FIELD > * m_fields

References WX_GRID::CommitPendingChanges(), FIELDS_GRID_TABLE< T >::GetNumberRows(), i, m_fields, DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_grid, and MANDATORY_FIELDS.

◆ OnMoveUp()

void DIALOG_EDIT_COMPONENT_IN_LIBRARY::OnMoveUp ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE.

Definition at line 472 of file dialog_edit_component_in_lib.cpp.

473 {
474  if( !m_grid->CommitPendingChanges() )
475  return;
476 
477  int i = m_grid->GetGridCursorRow();
478 
479  if( i > MANDATORY_FIELDS )
480  {
481  LIB_FIELD tmp = m_fields->at( (unsigned) i );
482  m_fields->erase( m_fields->begin() + i, m_fields->begin() + i + 1 );
483  m_fields->insert( m_fields->begin() + i - 1, tmp );
484  m_grid->ForceRefresh();
485 
486  m_grid->SetGridCursor( i - 1, m_grid->GetGridCursorCol() );
487  m_grid->MakeCellVisible( m_grid->GetGridCursorRow(), m_grid->GetGridCursorCol() );
488  }
489  else
490  wxBell();
491 }
The first 4 are mandatory, and must be instantiated in SCH_COMPONENT and LIB_PART constructors.
Field object used in symbol libraries.
Definition: lib_field.h:59
bool CommitPendingChanges(bool aQuietMode=false)
Close any open cell edit controls.
Definition: wx_grid.cpp:172
size_t i
Definition: json11.cpp:597
FIELDS_GRID_TABLE< LIB_FIELD > * m_fields

References WX_GRID::CommitPendingChanges(), i, m_fields, DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_grid, and MANDATORY_FIELDS.

◆ OnPaint()

void DIALOG_SHIM::OnPaint ( wxPaintEvent &  event)
inherited

Definition at line 299 of file dialog_shim.cpp.

300 {
301  if( m_firstPaintEvent )
302  {
303 #ifdef __WXMAC__
304  fixOSXCancelButtonIssue( this );
305 #endif
306 
307  selectAllInTextCtrls( GetChildren() );
308 
310  m_initialFocusTarget->SetFocus();
311  else
312  SetFocus(); // Focus the dialog itself
313 
314  m_firstPaintEvent = false;
315  }
316 
317  event.Skip();
318 }
wxWindow * m_initialFocusTarget
Definition: dialog_shim.h:192
bool m_firstPaintEvent
Definition: dialog_shim.h:191
static void selectAllInTextCtrls(wxWindowList &children)

References DIALOG_SHIM::m_firstPaintEvent, DIALOG_SHIM::m_initialFocusTarget, and selectAllInTextCtrls().

Referenced by DIALOG_SHIM::DIALOG_SHIM().

◆ OnSelectAlias()

void DIALOG_EDIT_COMPONENT_IN_LIBRARY::OnSelectAlias ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE.

Definition at line 616 of file dialog_edit_component_in_lib.cpp.

617 {
619  {
620  m_aliasListBox->SetSelection( m_currentAlias ); // veto selection change
621  return;
622  }
623 
624  // Copy any pending changes back into the buffer
626 
627  LIB_ALIAS* alias = nullptr;
628  int newIdx = m_aliasListBox->GetSelection();
629 
630  if( newIdx >= 0 )
631  {
632  alias = m_aliasesBuffer[ newIdx ];
633 
634  m_aliasGrid->SetCellValue( VALUE, FDC_VALUE, alias->GetName() );
635  m_aliasGrid->SetCellValue( DATASHEET, FDC_VALUE, alias->GetDocFileName() );
636  m_aliasGrid->Enable( true );
637 
638  // Use ChangeValue() so we don't generate events
639  m_AliasNameCtrl->ChangeValue( alias->GetName() );
640  m_AliasNameCtrl->Enable( true );
641  m_AliasDescCtrl->ChangeValue( alias->GetDescription() );
642  m_AliasDescCtrl->Enable( true );
643  m_AliasKeywordsCtrl->ChangeValue( alias->GetKeyWords() );
644  m_AliasKeywordsCtrl->Enable( true );
645  }
646  else
647  {
648  m_aliasGrid->SetCellValue( VALUE, FDC_VALUE, wxEmptyString );
649  m_aliasGrid->SetCellValue( DATASHEET, FDC_VALUE, wxEmptyString );
650  m_aliasGrid->Enable( false );
651 
652  // Use ChangeValue() so we don't generate events
653  m_AliasNameCtrl->ChangeValue( wxEmptyString );
654  m_AliasNameCtrl->Enable( false );
655  m_AliasDescCtrl->ChangeValue( wxEmptyString );
656  m_AliasDescCtrl->Enable( false );
657  m_AliasKeywordsCtrl->ChangeValue( wxEmptyString );
658  m_AliasKeywordsCtrl->Enable( false );
659  }
660 
661  m_currentAlias = newIdx;
662 }
Part library alias object definition.
name of datasheet
const wxString & GetDocFileName() const
#define VALUE
const wxString & GetKeyWords() const
bool CommitPendingChanges(bool aQuietMode=false)
Close any open cell edit controls.
Definition: wx_grid.cpp:172
const wxString & GetDescription() override
const wxString & GetName() const override

References WX_GRID::CommitPendingChanges(), DATASHEET, FDC_VALUE, LIB_ALIAS::GetDescription(), LIB_ALIAS::GetDocFileName(), LIB_ALIAS::GetKeyWords(), LIB_ALIAS::GetName(), DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_AliasDescCtrl, m_aliasesBuffer, DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_aliasGrid, DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_AliasKeywordsCtrl, DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_aliasListBox, DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_AliasNameCtrl, m_currentAlias, m_delayedFocusCtrl, transferAliasDataToBuffer(), and VALUE.

Referenced by OnAddAlias(), OnDeleteAlias(), OnUpdateUI(), and TransferDataToWindow().

◆ OnSizeAliasGrid()

void DIALOG_EDIT_COMPONENT_IN_LIBRARY::OnSizeAliasGrid ( wxSizeEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE.

Definition at line 960 of file dialog_edit_component_in_lib.cpp.

961 {
962  adjustAliasGridColumns( event.GetSize().GetX() );
963 
964  event.Skip();
965 }

References adjustAliasGridColumns().

◆ OnSizeGrid()

void DIALOG_EDIT_COMPONENT_IN_LIBRARY::OnSizeGrid ( wxSizeEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE.

Definition at line 946 of file dialog_edit_component_in_lib.cpp.

947 {
948  auto new_size = event.GetSize().GetX();
949 
950  if( new_size != m_width )
951  {
952  adjustGridColumns( event.GetSize().GetX() );
953  }
954 
955  // Always propagate a wxSizeEvent:
956  event.Skip();
957 }

References adjustGridColumns(), and m_width.

◆ OnSymbolNameKillFocus()

void DIALOG_EDIT_COMPONENT_IN_LIBRARY::OnSymbolNameKillFocus ( wxFocusEvent &  event)
overrideprivatevirtual

◆ OnSymbolNameText()

void DIALOG_EDIT_COMPONENT_IN_LIBRARY::OnSymbolNameText ( wxCommandEvent &  event)
overrideprivatevirtual

◆ OnUpdateUI()

void DIALOG_EDIT_COMPONENT_IN_LIBRARY::OnUpdateUI ( wxUpdateUIEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE.

Definition at line 863 of file dialog_edit_component_in_lib.cpp.

864 {
865  m_OptionPartsLocked->Enable( m_SelNumberOfUnits->GetValue() > 1 );
867 
868  if( m_grid->IsCellEditControlShown() )
869  {
870  int row = m_grid->GetGridCursorRow();
871  int col = m_grid->GetGridCursorCol();
872 
873  if( row == VALUE && col == FDC_VALUE )
874  {
875  wxGridCellEditor* editor = m_grid->GetCellEditor( row, col );
876  m_SymbolNameCtrl->ChangeValue( editor->GetValue() );
877  editor->DecRef();
878  }
879  }
880 
881  // Synthesize a Select event when the selection is cleared
882  if( m_aliasListBox->GetSelection() == wxNOT_FOUND && m_currentAlias != wxNOT_FOUND )
883  {
884  wxCommandEvent dummy;
885  OnSelectAlias( dummy );
886  }
887 
888  // Handle shown columns changes
889  wxString shownColumns = m_grid->GetShownColumns();
890 
891  if( shownColumns != m_shownColumns )
892  {
893  m_shownColumns = shownColumns;
894 
895  if( !m_grid->IsCellEditControlShown() )
896  adjustGridColumns( m_grid->GetRect().GetWidth() );
897  }
898 
899  // Handle a delayed focus. The delay allows us to:
900  // a) change focus when the error was triggered from within a killFocus handler
901  // b) show the correct notebook page in the background before the error dialog comes up
902  // when triggered from an OK or a notebook page change
903 
904  if( m_delayedFocusPage >= 0 && m_NoteBook->GetSelection() != m_delayedFocusPage )
905  {
906  m_NoteBook->SetSelection( (unsigned) m_delayedFocusPage );
907  m_delayedFocusPage = -1;
908  }
909 
910  if( !m_delayedErrorMessage.IsEmpty() )
911  {
912  // We will re-enter this routine when the error dialog is displayed, so make
913  // sure we don't keep putting up more dialogs.
914  wxString msg = m_delayedErrorMessage;
915  m_delayedErrorMessage = wxEmptyString;
916 
917  // Do not use DisplayErrorMessage(); it screws up window order on Mac
918  DisplayError( nullptr, msg );
919  }
920 
921  if( m_delayedFocusCtrl )
922  {
923  m_delayedFocusCtrl->SetFocus();
924 
925  if( dynamic_cast<wxTextEntry*>( m_delayedFocusCtrl ) )
926  dynamic_cast<wxTextEntry*>( m_delayedFocusCtrl )->SelectAll();
927 
928  m_delayedFocusCtrl = nullptr;
929  }
930  else if( m_delayedFocusGrid )
931  {
932  m_delayedFocusGrid->SetFocus();
935 
936  m_delayedFocusGrid->EnableCellEditControl( true );
937  m_delayedFocusGrid->ShowCellEditControl();
938 
939  m_delayedFocusGrid = nullptr;
940  m_delayedFocusRow = -1;
942  }
943 }
void DisplayError(wxWindow *aParent, const wxString &aText, int aDisplayTime)
Display an error or warning message box with aMessage.
Definition: confirm.cpp:236
#define VALUE
void OnSelectAlias(wxCommandEvent &event) override
wxString GetShownColumns()
Get a tokenized string containing the shown column indexes.
Definition: wx_grid.cpp:101
static LIB_PART * dummy()
Used to draw a dummy shape when a LIB_PART is not found in library.
void Enable(bool aEnable)
Function Enable Enables/diasables the label, widget and units label.

References adjustGridColumns(), DisplayError(), dummy(), UNIT_BINDER::Enable(), FDC_VALUE, WX_GRID::GetShownColumns(), DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_aliasListBox, m_currentAlias, m_delayedErrorMessage, m_delayedFocusColumn, m_delayedFocusCtrl, m_delayedFocusGrid, m_delayedFocusPage, m_delayedFocusRow, DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_grid, DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_NoteBook, DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_OptionPartsLocked, m_pinNameOffset, DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_PinsNameInsideButt, DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_SelNumberOfUnits, m_shownColumns, DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_SymbolNameCtrl, OnSelectAlias(), and VALUE.

◆ Prj()

PROJECT & KIWAY_HOLDER::Prj ( ) const
inherited

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

Definition at line 34 of file kiway_holder.cpp.

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

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

Referenced by PCB_BASE_EDIT_FRAME::AddLibrary(), LIB_MANAGER::addLibrary(), LIB_CONTROL::AddSymbolToSchematic(), SCH_EDIT_FRAME::AppendSchematic(), PCB_EDIT_FRAME::ArchiveModulesOnBoard(), DIALOG_SYMBOL_REMAP::backupProject(), CVPCB_MAINFRAME::BuildLIBRARY_LISTBOX(), DIALOG_FOOTPRINT_FP_EDITOR::Cfg3DPath(), DIALOG_FOOTPRINT_BOARD_EDITOR::Cfg3DPath(), checkAliasName(), PCB_BASE_EDIT_FRAME::CreateNewLibrary(), KICAD_MANAGER_FRAME::CreateNewProject(), DIALOG_PLOT_SCHEMATIC::createPlotFileName(), DIALOG_SYMBOL_REMAP::createProjectSymbolLibTable(), FOOTPRINT_EDIT_FRAME::DeleteModuleFromLibrary(), 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_BOARD_EDITOR(), DIALOG_FOOTPRINT_FP_EDITOR::DIALOG_FOOTPRINT_FP_EDITOR(), DIALOG_PAGES_SETTINGS::DIALOG_PAGES_SETTINGS(), DIALOG_SYMBOL_REMAP::DIALOG_SYMBOL_REMAP(), LIB_VIEW_FRAME::DisplayLibInfos(), CVPCB_MAINFRAME::DisplayStatus(), PCB_EDIT_FRAME::doAutoSave(), KICAD_MANAGER_CONTROL::Execute(), PCB_EDIT_FRAME::Export_IDF3(), LIB_CONTROL::ExportSymbolAsSVG(), LIB_CONTROL::ExportView(), PCB_EDIT_FRAME::ExportVRML_File(), PCB_EDIT_FRAME::Files_io_from_id(), PCB_EDIT_FRAME::GenD356File(), DISPLAY_FOOTPRINTS_FRAME::Get_Module(), FOOTPRINT_VIEWER_FRAME::getCurFootprintName(), LIB_EDIT_FRAME::GetCurLib(), FOOTPRINT_VIEWER_FRAME::getCurNickname(), SCH_BASE_FRAME::GetLibAlias(), SCH_BASE_FRAME::GetLibPart(), DIALOG_SYMBOL_REMAP::getLibsNotInGlobalSymbolLibTable(), KICAD_MANAGER_FRAME::GetProjectFileName(), LIB_VIEW_FRAME::GetSelectedAlias(), FP_THREAD_IFACE::GetTable(), PCB_EDIT_FRAME::importFile(), SCH_EDIT_FRAME::importFile(), SCH_EDITOR_CONTROL::ImportFPAssignments(), FOOTPRINT_EDIT_FRAME::initLibraryTree(), 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::LoadProjectFile(), CVPCB_MAINFRAME::LoadProjectFile(), PCB_EDIT_FRAME::LoadProjectSettings(), SCH_EDIT_FRAME::LoadSheetFromFile(), DIALOG_DRC_CONTROL::makeValidFileNameReport(), DIALOG_FOOTPRINT_FP_EDITOR::On3DModelCellChanged(), DIALOG_FOOTPRINT_BOARD_EDITOR::On3DModelCellChanged(), FOOTPRINT_VIEWER_FRAME::OnActivate(), DIALOG_FOOTPRINT_FP_EDITOR::OnAdd3DModel(), DIALOG_FOOTPRINT_BOARD_EDITOR::OnAdd3DModel(), DIALOG_SCH_SHEET_PROPS::OnBrowseClicked(), KICAD_MANAGER_FRAME::OnBrowseInFileExplorer(), DIALOG_DRC_CONTROL::OnButtonBrowseRptFileClick(), DIALOG_EDIT_COMPONENTS_LIBID::onClickOrphansButton(), SCH_EDIT_FRAME::OnCloseWindow(), DIALOG_GENDRILL::OnGenReportFile(), SCH_EDIT_FRAME::OnImportProject(), DIALOG_CHOOSE_COMPONENT::OnInitDialog(), 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_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(), MODULE_EDITOR_TOOLS::PasteFootprint(), PCB_BASE_EDIT_FRAME::PCB_BASE_EDIT_FRAME(), SCH_DRAWING_TOOLS::PlaceComponent(), DIALOG_CHOOSE_COMPONENT::PopulateFootprintSelector(), SCH_EDIT_FRAME::Print(), SCH_EDIT_FRAME::PrintPage(), CVPCB_MAINFRAME::ReadNetListAndFpFiles(), PCB_EDIT_FRAME::RecreateCmpFileFromBoard(), FOOTPRINT_VIEWER_FRAME::ReCreateFootprintList(), FOOTPRINT_VIEWER_FRAME::ReCreateLibraryList(), LIB_VIEW_FRAME::ReCreateListCmp(), LIB_VIEW_FRAME::ReCreateListLib(), EDA_3D_VIEWER::ReloadRequest(), DIALOG_SYMBOL_REMAP::remapSymbolToLibTable(), SCH_EDIT_FRAME::RescueLegacyProject(), SCH_EDIT_FRAME::RescueSymbolLibTableProject(), FOOTPRINT_EDIT_FRAME::restoreLastFootprint(), FOOTPRINT_EDIT_FRAME::retainLastFootprint(), SCH_EDIT_FRAME::SaveEEFile(), FOOTPRINT_EDIT_FRAME::SaveFootprint(), FOOTPRINT_EDIT_FRAME::SaveFootprintAs(), FOOTPRINT_EDIT_FRAME::SaveFootprintInLibrary(), LIB_EDIT_FRAME::saveLibrary(), LIB_EDIT_FRAME::SaveOneSymbol(), LIB_EDIT_FRAME::savePartAs(), SCH_EDIT_FRAME::SaveProject(), CVPCB_MAINFRAME::SaveProjectFile(), SCH_EDIT_FRAME::SaveProjectSettings(), PCB_EDIT_FRAME::SaveProjectSettings(), 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(), KICAD_MANAGER_FRAME::SetProjectFileName(), EE_INSPECTION_TOOL::ShowDatasheet(), DIALOG_CHOOSE_COMPONENT::ShowFootprintFor(), LIB_VIEW_FRAME::ShowModal(), FOOTPRINT_VIEWER_FRAME::ShowModal(), SIM_PLOT_FRAME::SIM_PLOT_FRAME(), LIB_MANAGER::symTable(), SYMBOL_TREE_SYNCHRONIZING_ADAPTER::Sync(), FOOTPRINT_EDIT_FRAME::SyncLibraryTree(), EDA_3D_VIEWER::takeScreenshot(), DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::TransferDataFromWindow(), NETLIST_DIALOG::TransferDataFromWindow(), DIALOG_FOOTPRINT_FP_EDITOR::TransferDataToWindow(), DIALOG_FOOTPRINT_BOARD_EDITOR::TransferDataToWindow(), DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::UpdateFieldsFromLibrary(), SIM_PLOT_FRAME::updateNetlistExporter(), SCH_SCREEN::UpdateSymbolLinks(), FOOTPRINT_VIEWER_FRAME::UpdateTitle(), FOOTPRINT_EDIT_FRAME::updateTitle(), SCH_EDIT_FRAME::UpdateTitle(), DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::Validate(), SCH_EDIT_FRAME::WriteNetListFile(), DIALOG_FOOTPRINT_BOARD_EDITOR::~DIALOG_FOOTPRINT_BOARD_EDITOR(), DIALOG_FOOTPRINT_FP_EDITOR::~DIALOG_FOOTPRINT_FP_EDITOR(), and PCB_BASE_EDIT_FRAME::~PCB_BASE_EDIT_FRAME().

◆ 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 118 of file dialog_shim.h.

119  {
120  m_initialFocusTarget = aWindow;
121  }
wxWindow * m_initialFocusTarget
Definition: dialog_shim.h:192

References DIALOG_SHIM::m_initialFocusTarget.

Referenced by DIALOG_BOM::DIALOG_BOM(), DIALOG_CHOOSE_COMPONENT::DIALOG_CHOOSE_COMPONENT(), DIALOG_CHOOSE_FOOTPRINT::DIALOG_CHOOSE_FOOTPRINT(), DIALOG_CONFIGURE_PATHS::DIALOG_CONFIGURE_PATHS(), DIALOG_EDIT_LINE_STYLE::DIALOG_EDIT_LINE_STYLE(), DIALOG_FIELDS_EDITOR_GLOBAL::DIALOG_FIELDS_EDITOR_GLOBAL(), DIALOG_FIND::DIALOG_FIND(), DIALOG_FOOTPRINT_BOARD_EDITOR::DIALOG_FOOTPRINT_BOARD_EDITOR(), DIALOG_FOOTPRINT_FP_EDITOR::DIALOG_FOOTPRINT_FP_EDITOR(), DIALOG_FP_PLUGIN_OPTIONS::DIALOG_FP_PLUGIN_OPTIONS(), DIALOG_GRAPHIC_ITEM_PROPERTIES::DIALOG_GRAPHIC_ITEM_PROPERTIES(), DIALOG_IMPORT_GFX::DIALOG_IMPORT_GFX(), 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_SCH_SHEET_PROPS::DIALOG_SCH_SHEET_PROPS(), DIALOG_SET_GRID::DIALOG_SET_GRID(), DIALOG_TARGET_PROPERTIES::DIALOG_TARGET_PROPERTIES(), DIALOG_TEXT_PROPERTIES::DIALOG_TEXT_PROPERTIES(), DIALOG_TRACK_VIA_PROPERTIES::DIALOG_TRACK_VIA_PROPERTIES(), DIALOG_EDIT_ONE_FIELD::init(), DIALOG_EXCHANGE_FOOTPRINTS::OnMatchAllClicked(), DIALOG_EXCHANGE_FOOTPRINTS::OnMatchIDClicked(), DIALOG_EXCHANGE_FOOTPRINTS::OnMatchRefClicked(), DIALOG_EXCHANGE_FOOTPRINTS::OnMatchSelectedClicked(), DIALOG_EXCHANGE_FOOTPRINTS::OnMatchValueClicked(), PANEL_FP_LIB_TABLE::PANEL_FP_LIB_TABLE(), PANEL_SYM_LIB_TABLE::PANEL_SYM_LIB_TABLE(), FOOTPRINT_EDIT_FRAME::SaveFootprintAs(), LIB_EDIT_FRAME::savePartAs(), DIALOG_KEEPOUT_AREA_PROPERTIES::TransferDataToWindow(), DIALOG_NON_COPPER_ZONES_EDITOR::TransferDataToWindow(), and DIALOG_COPPER_ZONE::TransferDataToWindow().

◆ SetKiway()

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

Function SetKiway.

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

Definition at line 41 of file kiway_holder.cpp.

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

References KIWAY_HOLDER::m_kiway, and name.

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

◆ 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 152 of file dialog_shim.cpp.

153 {
154  wxSize sz( x, y );
155  SetSize( ConvertDialogToPixels( sz ) );
156 }

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 179 of file dialog_shim.cpp.

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

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

Referenced by DIALOG_SHIM::EndQuasiModal(), InvokeDialogERC(), SCH_EDIT_FRAME::OnAnnotate(), DIALOG_DRC_CONTROL::OnLeftDClickClearance(), DIALOG_DRC_CONTROL::OnLeftDClickFootprints(), DIALOG_CLEANUP_TRACKS_AND_VIAS::OnLeftDClickItem(), DIALOG_DRC_CONTROL::OnLeftDClickUnconnected(), POSITION_RELATIVE_TOOL::PositionRelative(), CVPCB_MAINFRAME::ReadNetListAndFpFiles(), DRC::ShowDRCDialog(), SCH_EDIT_FRAME::ShowFindReplaceDialog(), DIALOG_SHIM::ShowQuasiModal(), and DIALOG_POSITION_RELATIVE::UpdateAnchor().

◆ ShowQuasiModal()

int DIALOG_SHIM::ShowQuasiModal ( )
inherited

Definition at line 344 of file dialog_shim.cpp.

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

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

Referenced by 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(), SCH_EDITOR_CONTROL::NavigateHierarchy(), SCH_EDIT_FRAME::OnRemapSymbols(), LIB_VIEW_FRAME::OnSelectSymbol(), SCH_EDIT_FRAME::OpenProjectFiles(), SCH_EDIT_TOOL::Properties(), EDIT_TOOL::Properties(), SCH_BASE_FRAME::SelectCompFromLibTree(), and PCB_BASE_FRAME::SelectFootprintFromLibTree().

◆ transferAliasDataToBuffer()

void DIALOG_EDIT_COMPONENT_IN_LIBRARY::transferAliasDataToBuffer ( )
private

Definition at line 573 of file dialog_edit_component_in_lib.cpp.

574 {
575  if( m_currentAlias >= 0 )
576  {
578 
579  alias->SetName( m_aliasGrid->GetCellValue( VALUE, FDC_VALUE ) );
580  alias->SetDocFileName( m_aliasGrid->GetCellValue( DATASHEET, FDC_VALUE ) );
581  alias->SetDescription( m_AliasDescCtrl->GetValue() );
582  alias->SetKeyWords( m_AliasKeywordsCtrl->GetValue() );
583  }
584 }
Part library alias object definition.
name of datasheet
void SetDocFileName(const wxString &aDocFileName)
void SetName(const wxString &aName)
#define VALUE
void SetDescription(const wxString &aDescription)
void SetKeyWords(const wxString &aKeyWords)

References DATASHEET, FDC_VALUE, DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_AliasDescCtrl, m_aliasesBuffer, DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_aliasGrid, DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_AliasKeywordsCtrl, m_currentAlias, LIB_ALIAS::SetDescription(), LIB_ALIAS::SetDocFileName(), LIB_ALIAS::SetKeyWords(), LIB_ALIAS::SetName(), and VALUE.

Referenced by OnSelectAlias(), and TransferDataFromWindow().

◆ TransferDataFromWindow()

bool DIALOG_EDIT_COMPONENT_IN_LIBRARY::TransferDataFromWindow ( )
override

Definition at line 308 of file dialog_edit_component_in_lib.cpp.

309 {
310  if( !wxDialog::TransferDataFromWindow() )
311  return false;
312 
313  LIB_ALIAS* rootAlias = m_libEntry->GetAlias( m_libEntry->GetName() );
314  // We need to keep the name and the value the same at the moment!
315  wxString newName = m_fields->at( VALUE ).GetText();
316 
317  if( m_libEntry->GetName() != newName )
319  else
321 
322  // The Y axis for components in lib is from bottom to top while the screen axis is top
323  // to bottom: we must change the y coord sign when writing back to the library
324  for( size_t i = 0; i < m_fields->size(); ++i )
325  {
326  wxPoint pos = m_fields->at( i ).GetPosition();
327  pos.y = -pos.y;
328  m_fields->at( i ).SetPosition( pos );
329  }
330 
331  // Datasheet field is special; copy it to the root alias docfilename
332  rootAlias->SetDocFileName( m_fields->at( DATASHEET ).GetText() );
333 
335 
336  // We need to keep the name and the value the same at the moment!
337  m_libEntry->SetName( newName );
338 
339  rootAlias->SetDescription( m_DescCtrl->GetValue() );
340  rootAlias->SetKeyWords( m_KeywordCtrl->GetValue() );
341 
344 
345  m_libEntry->SetConversion( m_AsConvertButt->GetValue() );
346 
347  if( m_OptionPower->GetValue() )
348  m_libEntry->SetPower();
349  else
351 
354 
355  if( m_PinsNameInsideButt->GetValue() )
356  {
357  int offset = KiROUND( (double) m_pinNameOffset.GetValue() / IU_PER_MILS );
358 
359  // We interpret an offset of 0 as "outside", so make sure it's non-zero
360  m_libEntry->SetPinNameOffset( offset == 0 ? 20 : offset );
361  }
362  else
363  {
364  m_libEntry->SetPinNameOffset( 0 ); // pin text outside the body (name is on the pin)
365  }
366 
369 
370  for( LIB_ALIAS* alias : m_aliasesBuffer )
371  m_libEntry->AddAlias( alias ); // Transfers ownership; no need to delete
372 
373  m_aliasesBuffer.clear();
374 
375  m_libEntry->GetFootprints().Clear();
377 
378  return true;
379 }
int GetUnitCount() const
Part library alias object definition.
void SetConversion(bool aSetConvert)
Set or clear the alternate body style (DeMorgan) for the part.
void SetPower()
name of datasheet
LIB_ALIAS * GetAlias(size_t aIndex) const
void AddAlias(const wxString &aName)
Add an alias aName to the part.
void SetDocFileName(const wxString &aDocFileName)
#define VALUE
void SetUnitCount(int count)
Set the units per part count.
void SetDescription(const wxString &aDescription)
wxArrayString & GetFootprints()
void RemoveAllAliases()
void SetShowPinNumbers(bool aShow)
Set or clear the pin number visibility flag.
const wxString & GetName() const
void SetKeyWords(const wxString &aKeyWords)
size_t i
Definition: json11.cpp:597
#define IU_PER_MILS
Definition: plotter.cpp:135
virtual long long int GetValue()
Function GetValue Returns the current value in Internal Units.
virtual void SetName(const wxString &aName)
void SetShowPinNames(bool aShow)
Set or clear the pin name visibility flag.
void SetPinNameOffset(int aOffset)
Set the offset in mils of the pin name text from the pin symbol.
void SetFields(const std::vector< LIB_FIELD > &aFieldsList)
Overwrite all the existing fields in this symbol with fields supplied in aFieldsList.
FIELDS_GRID_TABLE< LIB_FIELD > * m_fields
void SaveCopyInUndoList(EDA_ITEM *ItemToCopy, UNDO_REDO_T undoType=UR_LIBEDIT, bool aAppend=false)
Create a copy of the current component, and save it in the undo list.
constexpr ret_type KiROUND(fp_type v)
Round a floating point number to an integer using "round halfway cases away from zero".
Definition: common.h:114
void LockUnits(bool aLockUnits)
Set interchangeable the property for part units.
void SetNormal()

References LIB_PART::AddAlias(), DATASHEET, LIB_PART::GetAlias(), LIB_PART::GetFootprints(), LIB_PART::GetName(), LIB_PART::GetUnitCount(), UNIT_BINDER::GetValue(), i, IU_PER_MILS, KiROUND(), LIB_PART::LockUnits(), m_aliasesBuffer, DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_AsConvertButt, DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_DescCtrl, m_fields, DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_FootprintFilterListBox, DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_KeywordCtrl, m_libEntry, DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_OptionPartsLocked, DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_OptionPower, m_Parent, m_pinNameOffset, DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_PinsNameInsideButt, DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_SelNumberOfUnits, DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_ShowPinNameButt, DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_ShowPinNumButt, LIB_PART::RemoveAllAliases(), LIB_EDIT_FRAME::SaveCopyInUndoList(), LIB_PART::SetConversion(), LIB_ALIAS::SetDescription(), LIB_ALIAS::SetDocFileName(), LIB_PART::SetFields(), LIB_ALIAS::SetKeyWords(), LIB_PART::SetName(), LIB_PART::SetNormal(), LIB_PART::SetPinNameOffset(), LIB_PART::SetPower(), LIB_PART::SetShowPinNames(), LIB_PART::SetShowPinNumbers(), LIB_PART::SetUnitCount(), transferAliasDataToBuffer(), UR_LIB_RENAME, and VALUE.

◆ TransferDataToWindow()

bool DIALOG_EDIT_COMPONENT_IN_LIBRARY::TransferDataToWindow ( )
override

Definition at line 168 of file dialog_edit_component_in_lib.cpp.

169 {
170  if( !wxDialog::TransferDataToWindow() )
171  return false;
172 
173  LIB_ALIAS* rootAlias = m_libEntry->GetAlias( m_libEntry->GetName() );
174 
175  // Push a copy of each field into m_fields
177 
178  // The datasheet field is special. Grab its value from the LIB_ALIAS document file
179  // member except for old libraries that saved the root alias document file in the
180  // datasheet field in the LIB_PART object.
181  if( rootAlias->GetDocFileName().IsEmpty() )
182  {
183  m_fields->at( DATASHEET ).SetText( m_libEntry->GetField( DATASHEET )->GetText() );
184  rootAlias->SetDocFileName( m_libEntry->GetField( DATASHEET )->GetText() );
185  }
186  else
187  {
188  m_fields->at( DATASHEET ).SetText( rootAlias->GetDocFileName() );
189  }
190 
191  // The Y axis for components in lib is from bottom to top while the screen axis is top
192  // to bottom: we must change the y coord sign for editing
193  for( size_t i = 0; i < m_fields->size(); ++i )
194  {
195  wxPoint pos = m_fields->at( i ).GetPosition();
196  pos.y = -pos.y;
197  m_fields->at( i ).SetPosition( pos );
198  }
199 
200  // notify the grid
201  wxGridTableMessage msg( m_fields, wxGRIDTABLE_NOTIFY_ROWS_APPENDED, m_fields->GetNumberRows() );
202  m_grid->ProcessTableMessage( msg );
203  adjustGridColumns( m_grid->GetRect().GetWidth());
204 
205  m_SymbolNameCtrl->SetValue( m_libEntry->GetName() );
206 
207  m_DescCtrl->SetValue( rootAlias->GetDescription() );
208  m_KeywordCtrl->SetValue( rootAlias->GetKeyWords() );
209 
212  m_AsConvertButt->SetValue( m_libEntry->HasConversion() );
213  m_OptionPower->SetValue( m_libEntry->IsPower() );
214 
216  m_ShowPinNameButt->SetValue( m_libEntry->ShowPinNames() );
217  m_PinsNameInsideButt->SetValue( m_libEntry->GetPinNameOffset() != 0 );
219 
220  const LIB_ALIASES aliases = m_libEntry->GetAliases();
221 
222  for( LIB_ALIAS* alias : aliases )
223  {
224  if( alias->IsRoot() )
225  continue;
226 
227  m_aliasesBuffer.push_back( new LIB_ALIAS( *alias, m_libEntry ) );
228  m_aliasListBox->Append( alias->GetName() );
229  }
230 
231  if( m_aliasListBox->GetCount() )
232  m_aliasListBox->SetSelection( 0 );
233 
234  wxCommandEvent dummy;
235  OnSelectAlias( dummy );
236 
237  adjustAliasGridColumns( m_aliasGrid->GetClientRect().GetWidth() - 4 );
238 
240 
241  m_NoteBook->SetSelection( (unsigned) m_lastOpenedPage );
242 
243  return true;
244 }
int GetUnitCount() const
LIB_FIELD * GetField(int aId)
Return pointer to the requested field.
Part library alias object definition.
name of datasheet
int GetPinNameOffset()
int GetNumberRows() override
bool HasConversion() const
Test if part has more than one body conversion type (DeMorgan).
LIB_ALIAS * GetAlias(size_t aIndex) const
std::vector< LIB_ALIAS * > LIB_ALIASES
void SetDocFileName(const wxString &aDocFileName)
const wxString & GetDocFileName() const
bool ShowPinNames()
bool ShowPinNumbers()
const wxString & GetKeyWords() const
void OnSelectAlias(wxCommandEvent &event) override
wxArrayString & GetFootprints()
const wxString & GetDescription() override
bool IsPower() const
static LIB_PART * dummy()
Used to draw a dummy shape when a LIB_PART is not found in library.
const wxString & GetName() const
virtual void SetValue(int aValue)
Function SetValue Sets new value (in Internal Units) for the text field, taking care of units convers...
size_t i
Definition: json11.cpp:597
FIELDS_GRID_TABLE< LIB_FIELD > * m_fields
virtual const wxString & GetText() const
Function GetText returns the string associated with the text object.
Definition: eda_text.h:124
bool UnitsLocked() const
Check whether part units are interchangeable.
void GetFields(LIB_FIELDS &aList)
Return a list of fields within this part.
LIB_ALIASES GetAliases() const

References adjustAliasGridColumns(), adjustGridColumns(), DATASHEET, dummy(), LIB_PART::GetAlias(), LIB_PART::GetAliases(), LIB_ALIAS::GetDescription(), LIB_ALIAS::GetDocFileName(), LIB_PART::GetField(), LIB_PART::GetFields(), LIB_PART::GetFootprints(), LIB_ALIAS::GetKeyWords(), LIB_PART::GetName(), FIELDS_GRID_TABLE< T >::GetNumberRows(), LIB_PART::GetPinNameOffset(), EDA_TEXT::GetText(), LIB_PART::GetUnitCount(), LIB_PART::HasConversion(), i, LIB_PART::IsPower(), m_aliasesBuffer, DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_aliasGrid, DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_aliasListBox, DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_AsConvertButt, DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_DescCtrl, m_fields, DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_FootprintFilterListBox, DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_grid, DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_KeywordCtrl, m_lastOpenedPage, m_libEntry, DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_NoteBook, DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_OptionPartsLocked, DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_OptionPower, m_pinNameOffset, DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_PinsNameInsideButt, DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_SelNumberOfUnits, DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_ShowPinNameButt, DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_ShowPinNumButt, DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_SymbolNameCtrl, OnSelectAlias(), LIB_ALIAS::SetDocFileName(), UNIT_BINDER::SetValue(), LIB_PART::ShowPinNames(), LIB_PART::ShowPinNumbers(), and LIB_PART::UnitsLocked().

◆ updateAliasName()

void DIALOG_EDIT_COMPONENT_IN_LIBRARY::updateAliasName ( bool  aFromGrid,
const wxString &  aName 
)
private

Definition at line 516 of file dialog_edit_component_in_lib.cpp.

517 {
518  int idx = m_aliasListBox->GetSelection();
519 
520  if( idx >= 0 )
521  {
522  m_aliasListBox->SetString( (unsigned) idx, aName );
523  m_aliasesBuffer[ idx ]->SetName( aName );
524 
525  if( aFromGrid )
526  m_AliasNameCtrl->ChangeValue( aName );
527  else
528  m_aliasGrid->SetCellValue( VALUE, FDC_VALUE, aName );
529  }
530 }
#define VALUE

References FDC_VALUE, m_aliasesBuffer, DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_aliasGrid, DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_aliasListBox, DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_AliasNameCtrl, and VALUE.

Referenced by OnAliasGridCellChanging(), and OnAliasNameText().

◆ Validate()

bool DIALOG_EDIT_COMPONENT_IN_LIBRARY::Validate ( )
override

Definition at line 247 of file dialog_edit_component_in_lib.cpp.

248 {
250  return false;
251 
252  if( !SCH_COMPONENT::IsReferenceStringValid( m_fields->at( REFERENCE ).GetText() ) )
253  {
254  if( m_NoteBook->GetSelection() != 0 )
255  m_NoteBook->SetSelection( 0 );
256 
257  m_delayedErrorMessage = _( "References must start with a letter." );
261  m_delayedFocusPage = 0;
262 
263  return false;
264  }
265 
266  // Check for missing field names.
267  for( size_t i = MANDATORY_FIELDS; i < m_fields->size(); ++i )
268  {
269  LIB_FIELD& field = m_fields->at( i );
270  wxString fieldName = field.GetName( false );
271 
272  if( fieldName.IsEmpty() )
273  {
274  if( m_NoteBook->GetSelection() != 0 )
275  m_NoteBook->SetSelection( 0 );
276 
277  m_delayedErrorMessage = _( "Fields must have a name." );
281  m_delayedFocusPage = 0;
282 
283  return false;
284  }
285  }
286 
287  if( m_SelNumberOfUnits->GetValue() < m_libEntry->GetUnitCount() )
288  {
289  if( !IsOK( this, _( "Delete extra units from symbol?" ) ) )
290  return false;
291  }
292 
293  if( m_AsConvertButt->GetValue() && !m_libEntry->HasConversion() )
294  {
295  if( !IsOK( this, _( "Add new pins for alternate body style (DeMorgan) to symbol?" ) ) )
296  return false;
297  }
298  else if( !m_AsConvertButt->GetValue() && m_libEntry->HasConversion() )
299  {
300  if( !IsOK( this, _( "Delete alternate body style (DeMorgan) draw items from symbol?" ) ) )
301  return false;
302  }
303 
304  return true;
305 }
wxString GetName(bool aTranslate=true) const
Returns the field name.
Definition: lib_field.cpp:366
int GetUnitCount() const
bool HasConversion() const
Test if part has more than one body conversion type (DeMorgan).
The first 4 are mandatory, and must be instantiated in SCH_COMPONENT and LIB_PART constructors.
Field object used in symbol libraries.
Definition: lib_field.h:59
Field Reference of part, i.e. "IC21".
bool CommitPendingChanges(bool aQuietMode=false)
Close any open cell edit controls.
Definition: wx_grid.cpp:172
#define _(s)
size_t i
Definition: json11.cpp:597
static bool IsReferenceStringValid(const wxString &aReferenceString)
Tests for an acceptable reference string.
FIELDS_GRID_TABLE< LIB_FIELD > * m_fields
bool IsOK(wxWindow *aParent, const wxString &aMessage)
Display a yes/no dialog with aMessage and returns the user response.
Definition: confirm.cpp:281

References _, WX_GRID::CommitPendingChanges(), FDC_NAME, FDC_VALUE, LIB_FIELD::GetName(), LIB_PART::GetUnitCount(), LIB_PART::HasConversion(), i, IsOK(), SCH_COMPONENT::IsReferenceStringValid(), DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_aliasGrid, DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_AsConvertButt, m_delayedErrorMessage, m_delayedFocusColumn, m_delayedFocusGrid, m_delayedFocusPage, m_delayedFocusRow, m_fields, DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_grid, m_libEntry, DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_NoteBook, DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_SelNumberOfUnits, MANDATORY_FIELDS, and REFERENCE.

◆ 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 166 of file dialog_shim.cpp.

167 {
168  wxSize sz( 0, y );
169  return ConvertDialogToPixels( sz ).y;
170 }

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

Member Data Documentation

◆ m_addAliasButton

◆ m_addFilterButton

◆ m_AliasDescCtrl

wxTextCtrl* DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_AliasDescCtrl
protectedinherited

◆ m_aliasesBuffer

◆ m_aliasGrid

◆ m_AliasKeywordsCtrl

wxTextCtrl* DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_AliasKeywordsCtrl
protectedinherited

◆ m_aliasListBox

◆ m_AliasNameCtrl

◆ m_AsConvertButt

wxCheckBox* DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_AsConvertButt
protectedinherited

◆ m_bpAdd

◆ m_bpDelete

◆ m_bpMoveDown

◆ m_bpMoveUp

◆ m_config

wxConfigBase* DIALOG_EDIT_COMPONENT_IN_LIBRARY::m_config

◆ m_currentAlias

int DIALOG_EDIT_COMPONENT_IN_LIBRARY::m_currentAlias

◆ m_delayedErrorMessage

wxString DIALOG_EDIT_COMPONENT_IN_LIBRARY::m_delayedErrorMessage

Definition at line 60 of file dialog_edit_component_in_lib.h.

Referenced by OnUpdateUI(), and Validate().

◆ m_delayedFocusColumn

int DIALOG_EDIT_COMPONENT_IN_LIBRARY::m_delayedFocusColumn

◆ m_delayedFocusCtrl

wxControl* DIALOG_EDIT_COMPONENT_IN_LIBRARY::m_delayedFocusCtrl

◆ m_delayedFocusGrid

WX_GRID* DIALOG_EDIT_COMPONENT_IN_LIBRARY::m_delayedFocusGrid

◆ m_delayedFocusPage

int DIALOG_EDIT_COMPONENT_IN_LIBRARY::m_delayedFocusPage

◆ m_delayedFocusRow

int DIALOG_EDIT_COMPONENT_IN_LIBRARY::m_delayedFocusRow

◆ m_deleteAliasButton

◆ m_deleteFilterButton

◆ m_DescCtrl

wxTextCtrl* DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_DescCtrl
protectedinherited

◆ m_editFilterButton

◆ m_fields

◆ m_firstPaintEvent

bool DIALOG_SHIM::m_firstPaintEvent
protectedinherited

Definition at line 191 of file dialog_shim.h.

Referenced by DIALOG_SHIM::OnPaint().

◆ m_FootprintFilterListBox

◆ m_grid

◆ m_hash_key

◆ m_initialFocusTarget

wxWindow* DIALOG_SHIM::m_initialFocusTarget
protectedinherited

Definition at line 192 of file dialog_shim.h.

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

◆ m_KeywordCtrl

wxTextCtrl* DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_KeywordCtrl
protectedinherited

◆ m_lastOpenedPage

int DIALOG_EDIT_COMPONENT_IN_LIBRARY::m_lastOpenedPage = 0
staticprivate

◆ m_libEntry

◆ m_nameOffsetCtrl

wxTextCtrl* DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_nameOffsetCtrl
protectedinherited

◆ m_nameOffsetLabel

wxStaticText* DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_nameOffsetLabel
protectedinherited

◆ m_nameOffsetUnits

wxStaticText* DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_nameOffsetUnits
protectedinherited

◆ m_NoteBook

wxNotebook* DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_NoteBook
protectedinherited

◆ m_OptionPartsLocked

wxCheckBox* DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_OptionPartsLocked
protectedinherited

◆ m_OptionPower

wxCheckBox* DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_OptionPower
protectedinherited

◆ m_PanelAlias

wxPanel* DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_PanelAlias
protectedinherited

◆ m_PanelBasic

wxPanel* DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_PanelBasic
protectedinherited

◆ m_PanelFootprintFilter

wxPanel* DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_PanelFootprintFilter
protectedinherited

◆ m_Parent

LIB_EDIT_FRAME* DIALOG_EDIT_COMPONENT_IN_LIBRARY::m_Parent

◆ m_pinNameOffset

UNIT_BINDER DIALOG_EDIT_COMPONENT_IN_LIBRARY::m_pinNameOffset

◆ m_PinsNameInsideButt

wxCheckBox* DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_PinsNameInsideButt
protectedinherited

◆ m_qmodal_loop

WX_EVENT_LOOP* DIALOG_SHIM::m_qmodal_loop
protectedinherited

Definition at line 194 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 196 of file dialog_shim.h.

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

◆ m_SelNumberOfUnits

wxSpinCtrl* DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_SelNumberOfUnits
protectedinherited

◆ m_shownColumns

wxString DIALOG_EDIT_COMPONENT_IN_LIBRARY::m_shownColumns

Definition at line 62 of file dialog_edit_component_in_lib.h.

Referenced by DIALOG_EDIT_COMPONENT_IN_LIBRARY(), and OnUpdateUI().

◆ m_ShowPinNameButt

wxCheckBox* DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_ShowPinNameButt
protectedinherited

◆ m_ShowPinNumButt

wxCheckBox* DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_ShowPinNumButt
protectedinherited

◆ m_spiceFieldsButton

◆ m_staticText12

wxStaticText* DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_staticText12
protectedinherited

◆ m_staticTextFootprints

wxStaticText* DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_staticTextFootprints
protectedinherited

◆ m_staticTextNbUnits

wxStaticText* DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_staticTextNbUnits
protectedinherited

◆ m_stdSizerButton

wxStdDialogButtonSizer* DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_stdSizerButton
protectedinherited

◆ m_stdSizerButtonCancel

wxButton* DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_stdSizerButtonCancel
protectedinherited

◆ m_stdSizerButtonOK

wxButton* DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::m_stdSizerButtonOK
protectedinherited

◆ m_SymbolNameCtrl

◆ m_tabOrder

◆ m_units

◆ m_width

int DIALOG_EDIT_COMPONENT_IN_LIBRARY::m_width

Definition at line 63 of file dialog_edit_component_in_lib.h.

Referenced by adjustGridColumns(), and OnSizeGrid().

◆ staticAliasKeywordsLabel

wxStaticText* DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::staticAliasKeywordsLabel
protectedinherited

◆ staticKeywordsLabel

wxStaticText* DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::staticKeywordsLabel
protectedinherited

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