KiCad PCB EDA Suite
DIALOG_EDIT_COMPONENT_IN_SCHEMATIC Class Reference

Dialog used to edit SCH_COMPONENT objects in a schematic. More...

Inheritance diagram for DIALOG_EDIT_COMPONENT_IN_SCHEMATIC:
DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP DIALOG_SHIM KIWAY_HOLDER

Public Member Functions

 DIALOG_EDIT_COMPONENT_IN_SCHEMATIC (wxWindow *aParent)
 
void InitBuffers (SCH_COMPONENT *aComponent)
 Initialize controls with aComponent. More...
 
SCH_EDIT_FRAMEGetParent ()
 
int ShowQuasiModal ()
 
void EndQuasiModal (int retCode)
 
bool IsQuasiModal ()
 
bool Show (bool show) override
 
bool Enable (bool enable) override
 
KIWAYKiway () const
 Function Kiway returns a reference to the KIWAY that this object has an opportunity to participate in. More...
 
PROJECTPrj () const
 Function Prj returns a reference to the PROJECT "associated with" this KIWAY. More...
 
void SetKiway (wxWindow *aDest, KIWAY *aKiway)
 Function SetKiway. More...
 

Protected Member Functions

void FinishDialogSettings ()
 In all dialogs, we must call the same functions to fix minimal dlg size, the default position and perhaps some others to fix a few issues depending on Windows Managers this helper function does these calls. More...
 
void FixOSXCancelButtonIssue ()
 A ugly hack to fix an issue on OSX: when typing ctrl+c in a wxTextCtrl inside a dialog, it is closed instead of copying a text if a button with wxID_CANCEL is used in a wxStdDialogButtonSizer, when the dlg is created by wxFormBuilder: the label is &Cancel, and this accelerator key has priority to copy text standard accelerator, and the dlg is closed when trying to copy text this function do nothing on other platforms. More...
 

Protected Attributes

wxStaticText * m_staticTextUnit
 
wxChoice * unitChoice
 
wxStaticText * unitsInterchageableText
 
wxStaticText * unitsInterchageableLabel
 
wxRadioBox * orientationRadioBox
 
wxRadioBox * mirrorRadioBox
 
wxCheckBox * convertCheckBox
 
wxTextCtrl * chipnameTextCtrl
 
wxButton * m_buttonTestChipName
 
wxButton * m_buttonSelectChipName
 
wxStaticText * m_staticTextTimeStamp
 
wxTextCtrl * m_textCtrlTimeStamp
 
wxStaticLine * m_staticline1
 
wxButton * spiceFieldsButton
 
wxButton * resetFieldsStyleButton
 
wxButton * updateFieldValues
 
wxListCtrl * fieldListCtrl
 
wxBitmapButton * moveUpButton
 
wxBitmapButton * moveDownButton
 
wxBitmapButton * deleteFieldButton
 
wxBitmapButton * addFieldButton
 
wxRadioBox * m_FieldHJustifyCtrl
 
wxRadioBox * m_FieldVJustifyCtrl
 
wxCheckBox * showCheckBox
 
wxCheckBox * rotateCheckBox
 
wxRadioBox * m_StyleRadioBox
 
wxStaticText * fieldNameLabel
 
wxTextCtrl * fieldNameTextCtrl
 
wxStaticText * fieldValueLabel
 
wxTextCtrl * fieldValueTextCtrl
 
wxButton * m_show_datasheet_button
 
wxStaticText * textSizeLabel
 
wxTextCtrl * textSizeTextCtrl
 
wxStaticText * m_staticTextUnitSize
 
wxStaticText * posXLabel
 
wxTextCtrl * posXTextCtrl
 
wxStaticText * m_staticTextUnitPosX
 
wxStaticText * posYLabel
 
wxTextCtrl * posYTextCtrl
 
wxStaticText * m_staticTextUnitPosY
 
wxStdDialogButtonSizer * stdDialogButtonSizer
 
wxButton * stdDialogButtonSizerOK
 
wxButton * stdDialogButtonSizerCancel
 
std::string m_hash_key
 
EVENT_LOOPm_qmodal_loop
 
bool m_qmodal_showing
 
WDO_ENABLE_DISABLEm_qmodal_parent_disabler
 

Private Member Functions

void setSelectedFieldNdx (int aFieldNdx)
 
int getSelectedFieldNdx ()
 
void copySelectedFieldToPanel ()
 Sets the values displayed on the panel according to the currently selected field row. More...
 
bool copyPanelToSelectedField ()
 Copy the values displayed on the panel fields to the currently selected field. More...
 
void copyOptionsToPanel ()
 
void copyPanelToOptions ()
 
void setRowItem (int aFieldNdx, const wxString &aName, const wxString &aValue)
 
void setRowItem (int aFieldNdx, const SCH_FIELD &aField)
 
void OnCloseDialog (wxCloseEvent &event) override
 
void OnListItemDeselected (wxListEvent &event) override
 
void OnListItemSelected (wxListEvent &event) override
 
void OnCancelButtonClick (wxCommandEvent &event) override
 
void OnOKButtonClick (wxCommandEvent &event) override
 
void SetInitCmp (wxCommandEvent &event) override
 
void UpdateFields (wxCommandEvent &event) override
 
void addFieldButtonHandler (wxCommandEvent &event) override
 
void deleteFieldButtonHandler (wxCommandEvent &event) override
 
void moveUpButtonHandler (wxCommandEvent &event) override
 
void moveDownButtonHandler (wxCommandEvent &event) override
 
void showButtonHandler (wxCommandEvent &event) override
 
void OnTestChipName (wxCommandEvent &event) override
 
void OnSelectChipName (wxCommandEvent &event) override
 
void OnInitDlg (wxInitDialogEvent &event) override
 
void EditSpiceModel (wxCommandEvent &event) override
 
SCH_FIELDfindField (const wxString &aFieldName)
 
void updateDisplay ()
 Update the listbox showing fields according to the field's text. More...
 

Private Attributes

SCH_COMPONENTm_cmp
 
LIB_PARTm_part
 
bool m_skipCopyFromPanel
 
SCH_FIELDS m_FieldsBuf
 a copy of the edited symbol's SCH_FIELDs More...
 

Static Private Attributes

static int s_SelectedRow
 

Friends

class SCH_EDIT_FRAME
 

Detailed Description

Dialog used to edit SCH_COMPONENT objects in a schematic.

This is derived from DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP which is maintained by wxFormBuilder. Do not auto-generate this class or file, it is hand coded.

Definition at line 69 of file dialog_edit_component_in_schematic.cpp.

Constructor & Destructor Documentation

DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC ( wxWindow *  aParent)

Definition at line 201 of file dialog_edit_component_in_schematic.cpp.

References DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::addFieldButton, DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::deleteFieldButton, DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::fieldListCtrl, g_UserUnit, GetAbbreviatedUnitsLabel(), KiBitmap(), m_cmp, m_part, m_skipCopyFromPanel, DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::m_staticTextUnitPosX, DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::m_staticTextUnitPosY, DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::m_staticTextUnitSize, DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::moveDownButton, DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::moveUpButton, DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::spiceFieldsButton, and DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::stdDialogButtonSizerOK.

201  :
203 {
204  wxASSERT( dynamic_cast< SCH_EDIT_FRAME* >( aParent ) );
205 
206 #ifndef KICAD_SPICE
207  spiceFieldsButton->Hide();
208 #endif /* not KICAD_SPICE */
209 
210  m_cmp = NULL;
211  m_part = NULL;
212  m_skipCopyFromPanel = false;
213 
214  wxListItem columnLabel;
215 
216  columnLabel.SetImage( -1 );
217 
218  columnLabel.SetText( _( "Name" ) );
219  fieldListCtrl->InsertColumn( 0, columnLabel );
220 
221  columnLabel.SetText( _( "Value" ) );
222  fieldListCtrl->InsertColumn( 1, columnLabel );
223 
227 
228  wxToolTip::Enable( true );
229  stdDialogButtonSizerOK->SetDefault();
230 
231  // Configure button logos
232  addFieldButton->SetBitmap( KiBitmap( plus_xpm ) );
233  deleteFieldButton->SetBitmap( KiBitmap( minus_xpm ) );
234  moveUpButton->SetBitmap( KiBitmap( go_up_xpm ) );
235  moveDownButton->SetBitmap( KiBitmap( go_down_xpm ) );
236 
237  Fit();
238 }
DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Component Properties"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(928, 794), long style=wxCAPTION|wxCLOSE_BOX|wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU)
wxBitmap KiBitmap(BITMAP_DEF aBitmap)
Function KiBitmap constructs a wxBitmap from a memory record, held in a BITMAP_DEF.
Definition: bitmap.cpp:36
wxString GetAbbreviatedUnitsLabel(EDA_UNITS_T aUnit)
Definition: base_units.cpp:484
EDA_UNITS_T g_UserUnit
Global variables definitions.
Definition: common.cpp:56

Member Function Documentation

void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::addFieldButtonHandler ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP.

Definition at line 521 of file dialog_edit_component_in_schematic.cpp.

References copyPanelToSelectedField(), TEMPLATE_FIELDNAME::GetDefaultFieldName(), m_cmp, m_FieldsBuf, m_skipCopyFromPanel, REFERENCE, setRowItem(), setSelectedFieldNdx(), and EDA_TEXT::SetTextAngle().

522 {
523  // in case m_FieldsBuf[REFERENCE].m_Orient has changed on screen only, grab
524  // screen contents.
525  if( !copyPanelToSelectedField() )
526  return;
527 
528  unsigned fieldNdx = m_FieldsBuf.size();
529 
530  SCH_FIELD blank( wxPoint(), fieldNdx, m_cmp );
531 
532  blank.SetTextAngle( m_FieldsBuf[REFERENCE].GetTextAngle() );
533 
534  m_FieldsBuf.push_back( blank );
535  m_FieldsBuf[fieldNdx].SetName( TEMPLATE_FIELDNAME::GetDefaultFieldName( fieldNdx ) );
536 
537  m_skipCopyFromPanel = true;
538  setRowItem( fieldNdx, m_FieldsBuf[fieldNdx] );
539 
540  setSelectedFieldNdx( fieldNdx );
541  m_skipCopyFromPanel = false;
542 }
Class SCH_FIELD instances are attached to a component and provide a place for the component's value...
Definition: sch_field.h:56
bool copyPanelToSelectedField()
Copy the values displayed on the panel fields to the currently selected field.
SCH_FIELDS m_FieldsBuf
a copy of the edited symbol's SCH_FIELDs
static const wxString GetDefaultFieldName(int aFieldNdx)
Function GetDefaultFieldName returns a default symbol field name for field aFieldNdx for all componen...
Field Reference of part, i.e. "IC21".
void setRowItem(int aFieldNdx, const wxString &aName, const wxString &aValue)
void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::copyOptionsToPanel ( )
private

Definition at line 1078 of file dialog_edit_component_in_schematic.cpp.

References DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::chipnameTextCtrl, CMP_MIRROR_X, CMP_MIRROR_Y, CMP_ORIENT_180, CMP_ORIENT_270, CMP_ORIENT_90, DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::convertCheckBox, DBG, LIB_ID::Format(), Format(), SCH_COMPONENT::GetConvert(), SCH_COMPONENT::GetLibId(), SCH_COMPONENT::GetOrientation(), EDA_ITEM::GetTimeStamp(), SCH_COMPONENT::GetUnit(), SCH_COMPONENT::GetUnitCount(), LIB_PART::GetUnitCount(), LIB_PART::HasConversion(), m_cmp, m_part, DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::m_textCtrlTimeStamp, DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::mirrorRadioBox, DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::orientationRadioBox, LIB_PART::SubReference(), DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::unitChoice, DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::unitsInterchageableLabel, DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::unitsInterchageableText, and LIB_PART::UnitsLocked().

Referenced by InitBuffers().

1079 {
1080  // Remove non existing choices (choiceCount must be <= number for parts)
1081  int unitcount = m_part ? m_part->GetUnitCount() : 1;
1082 
1083  if( unitcount < 1 )
1084  unitcount = 1;
1085 
1086  unitChoice->Clear();
1087 
1088  for( int ii = 1; ii <= unitcount; ii++ )
1089  {
1090  unitChoice->Append( LIB_PART::SubReference( ii, false ) );
1091  }
1092 
1093  // For symbols with multiple parts per package, set the unit selection
1094  if( m_cmp->GetUnit() <= (int)unitChoice->GetCount() )
1095  unitChoice->SetSelection( m_cmp->GetUnit() - 1 );
1096 
1097  // Disable unit selection if only one unit exists:
1098  if( m_cmp->GetUnitCount() <= 1 )
1099  {
1100  unitChoice->Enable( false );
1101  unitsInterchageableLabel->Show( false );
1102  unitsInterchageableText->Show( false );
1103  }
1104  else
1105  {
1106  // Show the "Units are not interchangeable" message option?
1107  if( !m_part || !m_part->UnitsLocked() )
1108  unitsInterchageableLabel->SetLabel( _( "Yes" ) );
1109  else
1110  unitsInterchageableLabel->SetLabel( _( "No" ) );
1111  }
1112 
1113  int orientation = m_cmp->GetOrientation() & ~( CMP_MIRROR_X | CMP_MIRROR_Y );
1114 
1115  if( orientation == CMP_ORIENT_90 )
1116  orientationRadioBox->SetSelection( 1 );
1117  else if( orientation == CMP_ORIENT_180 )
1118  orientationRadioBox->SetSelection( 2 );
1119  else if( orientation == CMP_ORIENT_270 )
1120  orientationRadioBox->SetSelection( 3 );
1121  else
1122  orientationRadioBox->SetSelection( 0 );
1123 
1124  int mirror = m_cmp->GetOrientation() & ( CMP_MIRROR_X | CMP_MIRROR_Y );
1125 
1126  if( mirror == CMP_MIRROR_X )
1127  {
1128  mirrorRadioBox->SetSelection( 1 );
1129  DBG( printf( "mirror=X,1\n" ); )
1130  }
1131  else if( mirror == CMP_MIRROR_Y )
1132  {
1133  mirrorRadioBox->SetSelection( 2 );
1134  DBG( printf( "mirror=Y,2\n" ); )
1135  }
1136  else
1137  mirrorRadioBox->SetSelection( 0 );
1138 
1139  // Activate/Desactivate the normal/convert option ? (activated only if
1140  // the component has more than one shape)
1141  if( m_cmp->GetConvert() > 1 )
1142  convertCheckBox->SetValue( true );
1143 
1144  if( m_part == NULL || !m_part->HasConversion() )
1145  convertCheckBox->Enable( false );
1146 
1147  // Set the component's library name.
1148  chipnameTextCtrl->SetValue( m_cmp->GetLibId().Format() );
1149 
1150  // Set the component's unique ID time stamp.
1151  m_textCtrlTimeStamp->SetValue( wxString::Format( wxT( "%8.8lX" ),
1152  (unsigned long) m_cmp->GetTimeStamp() ) );
1153 }
bool UnitsLocked() const
bool HasConversion() const
Test if part has more than one body conversion type (DeMorgan).
int GetOrientation()
Get the display symbol orientation.
int GetUnitCount() const
Return the number of units per package of the symbol.
int GetConvert() const
int GetUnit() const
int GetUnitCount() const
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 wxString SubReference(int aUnit, bool aAddSeparator=true)
const LIB_ID & GetLibId() const
UTF8 Format() const
Definition: lib_id.cpp:263
#define DBG(x)
Definition: fctsys.h:33
timestamp_t GetTimeStamp() const
Definition: base_struct.h:231
void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::copyPanelToOptions ( )
private

Definition at line 340 of file dialog_edit_component_in_schematic.cpp.

References DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::chipnameTextCtrl, EDA_ITEM::ClearFlags(), CMP_MIRROR_X, CMP_MIRROR_Y, CMP_ORIENT_0, CMP_ORIENT_180, CMP_ORIENT_270, CMP_ORIENT_90, DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::convertCheckBox, DisplayError(), SCH_EDIT_FRAME::GetCurrentSheet(), EDA_ITEM::GetFlags(), SCH_COMPONENT::GetLibId(), GetParent(), SCH_COMPONENT::GetUnit(), m_cmp, DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::mirrorRadioBox, DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::orientationRadioBox, KIWAY_HOLDER::Prj(), SCH_COMPONENT::SetConvert(), EDA_ITEM::SetFlags(), SCH_COMPONENT::SetLibId(), SCH_COMPONENT::SetOrientation(), SCH_COMPONENT::SetUnit(), SCH_COMPONENT::SetUnitSelection(), and DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::unitChoice.

Referenced by OnOKButtonClick().

341 {
342  LIB_ID id;
343  wxString msg;
344  wxString tmp = chipnameTextCtrl->GetValue();
345 
346  tmp.Replace( wxT( " " ), wxT( "_" ) );
347 
348  id.Parse( tmp );
349 
350  // Save current flags which could be modified by next change settings
351  STATUS_FLAGS flags = m_cmp->GetFlags();
352 
353  if( !id.IsValid() )
354  {
355  msg.Printf( _( "Symbol library identifier '%s' is not valid!" ), tmp );
356  DisplayError( this, msg );
357  }
358  else if( id != m_cmp->GetLibId() )
359  {
360  LIB_ALIAS* alias = NULL;
361 
362  try
363  {
364  alias = Prj().SchSymbolLibTable()->LoadSymbol( id );
365  }
366  catch( ... )
367  {
368  }
369 
370  if( !alias )
371  {
372  msg.Printf( _( "Symbol '%s' not found in library '%s'!" ),
373  id.GetLibItemName().wx_str(), id.GetLibNickname().wx_str() );
374  DisplayError( this, msg );
375  }
376  else // Change symbol from lib!
377  {
378  m_cmp->SetLibId( id, Prj().SchSymbolLibTable(), Prj().SchLibs()->GetCacheLibrary() );
379  }
380  }
381 
382  // For symbols with multiple shapes (De Morgan representation) Set the selected shape:
383  if( convertCheckBox->IsEnabled() )
384  {
385  m_cmp->SetConvert( convertCheckBox->GetValue() ? 2 : 1 );
386  }
387 
388  //Set the part selection in multiple part per package
389  if( m_cmp->GetUnit() )
390  {
391  int unit_selection = unitChoice->GetCurrentSelection() + 1;
392 
393  m_cmp->SetUnitSelection( &GetParent()->GetCurrentSheet(), unit_selection );
394  m_cmp->SetUnit( unit_selection );
395  }
396 
397  switch( orientationRadioBox->GetSelection() )
398  {
399  case 0:
401  break;
402 
403  case 1:
405  break;
406 
407  case 2:
409  break;
410 
411  case 3:
413  break;
414  }
415 
416  int mirror = mirrorRadioBox->GetSelection();
417 
418  switch( mirror )
419  {
420  case 0:
421  break;
422 
423  case 1:
425  break;
426 
427  case 2:
429  break;
430  }
431 
432  // Restore m_Flag modified by SetUnit() and other change settings
433  m_cmp->ClearFlags();
434  m_cmp->SetFlags( flags );
435 }
STATUS_FLAGS GetFlags() const
Definition: base_struct.h:282
Part library alias object definition.
void SetUnitSelection(SCH_SHEET_PATH *aSheet, int aUnitSelection)
A logical library item identifier and consists of various portions much like a URI.
Definition: lib_id.h:51
void SetConvert(int aConvert)
PROJECT & Prj() const
Function Prj returns a reference to the PROJECT "associated with" this KIWAY.
void SetLibId(const LIB_ID &aName, PART_LIBS *aLibs=NULL)
void SetFlags(STATUS_FLAGS aMask)
Definition: base_struct.h:280
unsigned STATUS_FLAGS
Definition: base_struct.h:158
void SetUnit(int aUnit)
Change the unit number to aUnit.
int GetUnit() const
const LIB_ID & GetLibId() const
void ClearFlags(STATUS_FLAGS aMask=EDA_ITEM_ALL_FLAGS)
Definition: base_struct.h:281
void DisplayError(wxWindow *parent, const wxString &text, int displaytime)
Function DisplayError displays an error or warning message box with aMessage.
Definition: confirm.cpp:73
void SetOrientation(int aOrientation)
Compute the new transform matrix based on aOrientation for the symbol which is applied to the current...
bool DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::copyPanelToSelectedField ( )
private

Copy the values displayed on the panel fields to the currently selected field.

Returns
bool - true if all fields are OK, else false if the user has put bad data into a field, and this value can be used to deny a row change.

Definition at line 1011 of file dialog_edit_component_in_schematic.cpp.

References DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::fieldNameTextCtrl, DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::fieldValueTextCtrl, g_UserUnit, getSelectedFieldNdx(), EDA_TEXT::GetTextAngle(), GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_HJUSTIFY_RIGHT, GR_TEXT_VJUSTIFY_BOTTOM, GR_TEXT_VJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_TOP, DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::m_FieldHJustifyCtrl, m_FieldsBuf, DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::m_FieldVJustifyCtrl, DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::m_StyleRadioBox, EDA_GRAPHIC_TEXT_CTRL::ParseSize(), DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::posXTextCtrl, DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::posYTextCtrl, DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::rotateCheckBox, EDA_TEXT::SetBold(), EDA_TEXT::SetHorizJustify(), EDA_TEXT::SetItalic(), SCH_FIELD::SetName(), setRowItem(), EDA_TEXT::SetText(), EDA_TEXT::SetTextAngle(), EDA_TEXT::SetTextPos(), EDA_TEXT::SetTextSize(), EDA_TEXT::SetVertJustify(), EDA_TEXT::SetVisible(), DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::showCheckBox, TEXT_ANGLE_HORIZ, TEXT_ANGLE_VERT, DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::textSizeTextCtrl, VALUE, ValueFromString(), wxPoint::x, and wxPoint::y.

Referenced by addFieldButtonHandler(), moveDownButtonHandler(), moveUpButtonHandler(), OnListItemDeselected(), and OnOKButtonClick().

1012 {
1013  unsigned fieldNdx = getSelectedFieldNdx();
1014 
1015  if( fieldNdx >= m_FieldsBuf.size() ) // traps the -1 case too
1016  return true;
1017 
1018  // Check for illegal field text.
1019  if( fieldValueTextCtrl->GetValidator()
1020  && !fieldValueTextCtrl->GetValidator()->Validate( this ) )
1021  return false;
1022 
1023  SCH_FIELD& field = m_FieldsBuf[fieldNdx];
1024 
1025  field.SetVisible( showCheckBox->GetValue() );
1026 
1027  if( rotateCheckBox->GetValue() )
1028  field.SetTextAngle( TEXT_ANGLE_VERT );
1029  else
1030  field.SetTextAngle( TEXT_ANGLE_HORIZ );
1031 
1032  rotateCheckBox->SetValue( field.GetTextAngle() == TEXT_ANGLE_VERT );
1033 
1034  // Copy the text justification
1035  static const EDA_TEXT_HJUSTIFY_T hjustify[] = {
1039  };
1040 
1041  static const EDA_TEXT_VJUSTIFY_T vjustify[] = {
1045  };
1046 
1047  field.SetHorizJustify( hjustify[m_FieldHJustifyCtrl->GetSelection()] );
1048  field.SetVertJustify( vjustify[m_FieldVJustifyCtrl->GetSelection()] );
1049 
1050  field.SetName( fieldNameTextCtrl->GetValue() );
1051 
1052  /* Void fields texts for REFERENCE and VALUE (value is the name of the
1053  * component in lib ! ) are not allowed
1054  * change them only for a new non void value
1055  * When void, usually netlists are broken
1056  */
1057  if( !fieldValueTextCtrl->GetValue().IsEmpty() || fieldNdx > VALUE )
1058  field.SetText( fieldValueTextCtrl->GetValue() );
1059 
1060  setRowItem( fieldNdx, field ); // update fieldListCtrl
1061 
1063  field.SetTextSize( wxSize( tmp, tmp ) );
1064  int style = m_StyleRadioBox->GetSelection();
1065 
1066  field.SetItalic( (style & 1 ) != 0 );
1067  field.SetBold( (style & 2 ) != 0 );
1068 
1069  wxPoint pos;
1070  pos.x = ValueFromString( g_UserUnit, posXTextCtrl->GetValue() );
1071  pos.y = ValueFromString( g_UserUnit, posYTextCtrl->GetValue() );
1072  field.SetTextPos( pos );
1073 
1074  return true;
1075 }
void SetTextAngle(double aAngle)
Definition: eda_text.h:156
#define TEXT_ANGLE_HORIZ
Frequent text rotations, used with {Set,Get}TextAngle(), in 0.1 degrees for now, hoping to migrate to...
Definition: common.h:91
Class SCH_FIELD instances are attached to a component and provide a place for the component's value...
Definition: sch_field.h:56
EDA_TEXT_HJUSTIFY_T
Definition: eda_text.h:47
SCH_FIELDS m_FieldsBuf
a copy of the edited symbol's SCH_FIELDs
void SetItalic(bool isItalic)
Definition: eda_text.h:169
void SetTextPos(const wxPoint &aPoint)
Definition: eda_text.h:223
void SetVisible(bool aVisible)
Definition: eda_text.h:175
static int ParseSize(const wxString &sizeText, EDA_UNITS_T user_unit)
Definition: wxwineda.cpp:123
void SetTextSize(const wxSize &aNewSize)
Definition: eda_text.h:214
#define TEXT_ANGLE_VERT
Definition: common.h:92
double GetTextAngle() const
Definition: eda_text.h:164
void setRowItem(int aFieldNdx, const wxString &aName, const wxString &aValue)
void SetVertJustify(EDA_TEXT_VJUSTIFY_T aType)
Definition: eda_text.h:194
int ValueFromString(EDA_UNITS_T aUnits, const wxString &aTextValue)
Function ValueFromString converts aTextValue in aUnits to internal units used by the application...
Definition: base_units.cpp:369
EDA_TEXT_VJUSTIFY_T
Definition: eda_text.h:54
EDA_UNITS_T g_UserUnit
Global variables definitions.
Definition: common.cpp:56
void SetHorizJustify(EDA_TEXT_HJUSTIFY_T aType)
Definition: eda_text.h:193
void SetName(const wxString &aName)
Definition: sch_field.h:85
#define VALUE
void SetBold(bool aBold)
Definition: eda_text.h:172
virtual void SetText(const wxString &aText)
Definition: eda_text.h:141
void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::copySelectedFieldToPanel ( )
private

Sets the values displayed on the panel according to the currently selected field row.

Definition at line 893 of file dialog_edit_component_in_schematic.cpp.

References DATASHEET, DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::deleteFieldButton, DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::fieldNameTextCtrl, DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::fieldValueTextCtrl, FOOTPRINT, EDA_GRAPHIC_TEXT_CTRL::FormatSize(), g_UserUnit, EDA_TEXT::GetHorizJustify(), SCH_FIELD::GetId(), SCH_FIELD::GetName(), getSelectedFieldNdx(), EDA_TEXT::GetText(), EDA_TEXT::GetTextAngle(), EDA_TEXT::GetTextPos(), EDA_TEXT::GetTextWidth(), EDA_TEXT::GetVertJustify(), GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_HJUSTIFY_RIGHT, GR_TEXT_VJUSTIFY_BOTTOM, GR_TEXT_VJUSTIFY_TOP, EDA_TEXT::IsBold(), EDA_TEXT::IsItalic(), LIB_PART::IsPower(), EDA_TEXT::IsVisible(), m_cmp, DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::m_FieldHJustifyCtrl, m_FieldsBuf, DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::m_FieldVJustifyCtrl, m_part, SCH_COMPONENT::m_Pos, DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::m_show_datasheet_button, DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::m_StyleRadioBox, MANDATORY_FIELDS, DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::moveUpButton, DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::posXTextCtrl, DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::posYTextCtrl, REFERENCE, DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::rotateCheckBox, DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::showCheckBox, StringFromValue(), TEXT_ANGLE_VERT, DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::textSizeTextCtrl, VALUE, wxPoint::x, and wxPoint::y.

Referenced by InitBuffers(), OnListItemSelected(), and UpdateFields().

894 {
895  wxCHECK_RET( m_cmp != NULL, wxT( "Component pointer not initialized." ) );
896 
897  unsigned fieldNdx = getSelectedFieldNdx();
898 
899  if( fieldNdx >= m_FieldsBuf.size() ) // traps the -1 case too
900  return;
901 
902  SCH_FIELD& field = m_FieldsBuf[fieldNdx];
903 
904  showCheckBox->SetValue( field.IsVisible() );
905 
906  rotateCheckBox->SetValue( field.GetTextAngle() == TEXT_ANGLE_VERT );
907 
908  int style = 0;
909 
910  if( field.IsItalic() )
911  style = 1;
912 
913  if( field.IsBold() )
914  style |= 2;
915 
916  m_StyleRadioBox->SetSelection( style );
917 
918  // Select the right text justification
919  if( field.GetHorizJustify() == GR_TEXT_HJUSTIFY_LEFT )
920  m_FieldHJustifyCtrl->SetSelection( 0 );
921  else if( field.GetHorizJustify() == GR_TEXT_HJUSTIFY_RIGHT )
922  m_FieldHJustifyCtrl->SetSelection( 2 );
923  else
924  m_FieldHJustifyCtrl->SetSelection( 1 );
925 
926  if( field.GetVertJustify() == GR_TEXT_VJUSTIFY_TOP )
927  m_FieldVJustifyCtrl->SetSelection( 0 );
928  else if( field.GetVertJustify() == GR_TEXT_VJUSTIFY_BOTTOM )
929  m_FieldVJustifyCtrl->SetSelection( 2 );
930  else
931  m_FieldVJustifyCtrl->SetSelection( 1 );
932 
933 
934  fieldNameTextCtrl->SetValue( field.GetName( false ) );
935 
936  // the names of the fixed fields are not editable, others are.
937  fieldNameTextCtrl->Enable( fieldNdx >= MANDATORY_FIELDS );
938  fieldNameTextCtrl->SetEditable( fieldNdx >= MANDATORY_FIELDS );
939 
940  // only user defined fields may be moved, and not the top most user defined
941  // field since it would be moving up into the fixed fields, > not >=
942  moveUpButton->Enable( fieldNdx > MANDATORY_FIELDS );
943 
944  // may only delete user defined fields
945  deleteFieldButton->Enable( fieldNdx >= MANDATORY_FIELDS );
946 
947  fieldValueTextCtrl->SetValidator( SCH_FIELD_VALIDATOR( false, field.GetId() ) );
948  fieldValueTextCtrl->SetValue( field.GetText() );
949 
950  m_show_datasheet_button->Enable( fieldNdx == DATASHEET || fieldNdx == FOOTPRINT );
951 
952  if( fieldNdx == DATASHEET )
953  {
954  m_show_datasheet_button->SetLabel( _( "Show Datasheet" ) );
955  m_show_datasheet_button->SetToolTip(
956  _("If your datasheet is given as an http:// link,"
957  " then pressing this button should bring it up in your webbrowser.") );
958  }
959  else if( fieldNdx == FOOTPRINT )
960  {
961  m_show_datasheet_button->SetLabel( _( "Browse Footprints" ) );
962  m_show_datasheet_button->SetToolTip(
963  _("Open the footprint browser to choose a footprint and assign it.") );
964  }
965  else
966  {
967  m_show_datasheet_button->SetLabel( wxEmptyString );
968  m_show_datasheet_button->SetToolTip(
969  _("Used only for fields Footprint and Datasheet.") );
970  }
971 
972  // For power symbols, the value is NOR editable, because value and pin
973  // name must be same and can be edited only in library editor
974  if( fieldNdx == VALUE && m_part && m_part->IsPower() )
975  fieldValueTextCtrl->Enable( false );
976  else
977  fieldValueTextCtrl->Enable( true );
978 
980 
981  wxPoint coord = field.GetTextPos();
982  wxPoint zero = -m_cmp->m_Pos; // relative zero
983 
984  // If the field value is empty and the position is at relative zero, we
985  // set the initial position as a small offset from the ref field, and
986  // orient it the same as the ref field. That is likely to put it at least
987  // close to the desired position.
988  if( coord == zero && field.GetText().IsEmpty() )
989  {
990  rotateCheckBox->SetValue( m_FieldsBuf[REFERENCE].GetTextAngle() == TEXT_ANGLE_VERT );
991 
992  coord.x = m_FieldsBuf[REFERENCE].GetTextPos().x
993  + ( fieldNdx - MANDATORY_FIELDS + 1 ) * 100;
994 
995  coord.y = m_FieldsBuf[REFERENCE].GetTextPos().y
996  + ( fieldNdx - MANDATORY_FIELDS + 1 ) * 100;
997 
998  // coord can compute negative if field is < MANDATORY_FIELDS, e.g. FOOTPRINT.
999  // That is ok, we basically don't want all the new empty fields on
1000  // top of each other.
1001  }
1002 
1003  wxString coordText = StringFromValue( g_UserUnit, coord.x );
1004  posXTextCtrl->SetValue( coordText );
1005 
1006  coordText = StringFromValue( g_UserUnit, coord.y );
1007  posYTextCtrl->SetValue( coordText );
1008 }
Class SCH_FIELD instances are attached to a component and provide a place for the component's value...
Definition: sch_field.h:56
wxString GetName(bool aUseDefaultName=true) const
Function GetName returns the field name.
Definition: sch_field.cpp:425
name of datasheet
const wxPoint & GetTextPos() const
Definition: eda_text.h:224
SCH_FIELDS m_FieldsBuf
a copy of the edited symbol's SCH_FIELDs
bool IsItalic() const
Definition: eda_text.h:170
bool IsPower() const
int GetId() const
Definition: sch_field.h:87
wxString StringFromValue(EDA_UNITS_T aUnit, int aValue, bool aAddUnitSymbol)
Function StringFromValue returns the string from aValue according to units (inch, mm ...
Definition: base_units.cpp:204
wxPoint m_Pos
Name and library where symbol was loaded from, i.e. "74xx:74LS00".
Definition: sch_component.h:77
The first 4 are mandatory, and must be instantiated in SCH_COMPONENT and LIB_PART constructors...
int GetTextWidth() const
Definition: eda_text.h:218
EDA_TEXT_HJUSTIFY_T GetHorizJustify() const
Definition: eda_text.h:190
#define TEXT_ANGLE_VERT
Definition: common.h:92
Field Name Module PCB, i.e. "16DIP300".
Field Reference of part, i.e. "IC21".
bool IsBold() const
Definition: eda_text.h:173
double GetTextAngle() const
Definition: eda_text.h:164
const wxString & GetText() const
Function GetText returns the string associated with the text object.
Definition: eda_text.h:130
EDA_UNITS_T g_UserUnit
Global variables definitions.
Definition: common.cpp:56
EDA_TEXT_VJUSTIFY_T GetVertJustify() const
Definition: eda_text.h:191
bool IsVisible() const
Definition: eda_text.h:176
class SCH_FILED_VALIDATOR
#define VALUE
static wxString FormatSize(EDA_UNITS_T user_unit, int textSize)
Function FormatSize formats a string containing the size in the desired units.
Definition: wxwineda.cpp:84
void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::deleteFieldButtonHandler ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP.

Definition at line 545 of file dialog_edit_component_in_schematic.cpp.

References DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::fieldListCtrl, getSelectedFieldNdx(), m_FieldsBuf, m_skipCopyFromPanel, MANDATORY_FIELDS, setSelectedFieldNdx(), and updateDisplay().

546 {
547  unsigned fieldNdx = getSelectedFieldNdx();
548 
549  if( fieldNdx >= m_FieldsBuf.size() ) // traps the -1 case too
550  return;
551 
552  if( fieldNdx < MANDATORY_FIELDS )
553  {
554  wxBell();
555  return;
556  }
557 
558  m_skipCopyFromPanel = true;
559  m_FieldsBuf.erase( m_FieldsBuf.begin() + fieldNdx );
560  fieldListCtrl->DeleteItem( fieldNdx );
561 
562  if( fieldNdx >= m_FieldsBuf.size() )
563  --fieldNdx;
564 
565  updateDisplay();
566 
567  setSelectedFieldNdx( fieldNdx );
568  m_skipCopyFromPanel = false;
569 }
SCH_FIELDS m_FieldsBuf
a copy of the edited symbol's SCH_FIELDs
The first 4 are mandatory, and must be instantiated in SCH_COMPONENT and LIB_PART constructors...
void updateDisplay()
Update the listbox showing fields according to the field's text.
void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::EditSpiceModel ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP.

Definition at line 301 of file dialog_edit_component_in_schematic.cpp.

References m_cmp, m_FieldsBuf, setSelectedFieldNdx(), and updateDisplay().

302 {
303 #ifdef KICAD_SPICE
304  setSelectedFieldNdx( 0 );
305  DIALOG_SPICE_MODEL dialog( this, *m_cmp, m_FieldsBuf );
306 
307  if( dialog.ShowModal() == wxID_OK )
308  updateDisplay();
309 #endif /* KICAD_SPICE */
310 }
SCH_FIELDS m_FieldsBuf
a copy of the edited symbol's SCH_FIELDs
void updateDisplay()
Update the listbox showing fields according to the field's text.
bool DIALOG_SHIM::Enable ( bool  enable)
overrideinherited

Definition at line 184 of file dialog_shim.cpp.

Referenced by DIALOG_PRINT_USING_PRINTER::InitValues().

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

Definition at line 542 of file dialog_shim.cpp.

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

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

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

Definition at line 716 of file dialog_edit_component_in_schematic.cpp.

References m_FieldsBuf.

Referenced by InitBuffers().

717 {
718  for( unsigned i=0; i<m_FieldsBuf.size(); ++i )
719  {
720  if( aFieldName == m_FieldsBuf[i].GetName( false ) )
721  return &m_FieldsBuf[i];
722  }
723 
724  return NULL;
725 }
SCH_FIELDS m_FieldsBuf
a copy of the edited symbol's SCH_FIELDs
void DIALOG_SHIM::FinishDialogSettings ( )
protectedinherited

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

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

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

Definition at line 104 of file dialog_shim.cpp.

References PCAD2KICAD::Center.

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

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

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

Definition at line 117 of file dialog_shim.cpp.

Referenced by DIALOG_SHIM::Show().

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

Definition at line 81 of file dialog_edit_component_in_schematic.cpp.

Referenced by copyPanelToOptions(), InitBuffers(), OnOKButtonClick(), OnSelectChipName(), SetInitCmp(), showButtonHandler(), and UpdateFields().

81 { return dynamic_cast< SCH_EDIT_FRAME* >( wxDialog::GetParent() ); }
Schematic editor (Eeschema) main window.
Definition: schframe.h:118
int DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::getSelectedFieldNdx ( )
private
void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::InitBuffers ( SCH_COMPONENT aComponent)

Initialize controls with aComponent.

Parameters
aComponentThe component to edit.

Definition at line 728 of file dialog_edit_component_in_schematic.cpp.

References DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::chipnameTextCtrl, copyOptionsToPanel(), copySelectedFieldToPanel(), DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::fieldListCtrl, findField(), SCH_COMPONENT::FindField(), SCH_EDIT_FRAME::GetCurrentSheet(), SCH_COMPONENT::GetFieldCount(), SCH_COMPONENT::GetLibId(), SCH_BASE_FRAME::GetLibPart(), SCH_FIELD::GetName(), GetParent(), SCH_COMPONENT::GetRef(), SCH_EDIT_FRAME::GetTemplateFieldNames(), EDA_ITEM::IsDragging(), m_cmp, SCH_COMPONENT::m_Fields, m_FieldsBuf, m_part, SCH_COMPONENT::m_Pos, MANDATORY_FIELDS, DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::mirrorRadioBox, EDA_TEXT::Offset(), DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::orientationRadioBox, REFERENCE, s_SelectedRow, setRowItem(), setSelectedFieldNdx(), EDA_TEXT::SetText(), EDA_TEXT::SetVisible(), and TO_UTF8.

Referenced by SCH_EDIT_FRAME::EditComponent().

729 {
730  m_cmp = aComponent;
731 
732  /* We have 3 component related field lists to be aware of: 1) UI
733  presentation, 2) fields in component ram copy, and 3) fields recorded
734  with component on disk. m_FieldsBuf is the list of UI fields, and this
735  list is not the same as the list which is in the component, which is
736  also not the same as the list on disk. All 3 lists are potentially
737  different. In the UI we choose to preserve the order of the first
738  MANDATORY_FIELDS which are sometimes called fixed fields. Then we append
739  the template fieldnames in the exact same order as the template
740  fieldname editor shows them. Then we append any user defined fieldnames
741  which came from the component.
742  */
743 
744  m_part = GetParent()->GetLibPart( m_cmp->GetLibId(), true );
745 
746 #if 0 && defined(DEBUG)
747  for( int i = 0; i<aComponent->GetFieldCount(); ++i )
748  {
749  printf( "Orig[%d] (x=%d, y=%d)\n", i,
750  aComponent->m_Fields[i].GetTextPos().x,
751  aComponent->m_Fields[i].GetTextPos().y );
752  }
753 
754 #endif
755 
756  // When this code was written, all field constructors ensure that the fixed fields
757  // are all present within a component. So we can knowingly copy them over
758  // in the normal order. Copy only the fixed fields at first.
759  // Please do not break the field constructors.
760 
761  m_FieldsBuf.clear();
762 
763  for( int i=0; i<MANDATORY_FIELDS; ++i )
764  {
765  m_FieldsBuf.push_back( aComponent->m_Fields[i] );
766 
767  // make the editable field position relative to the component
768  m_FieldsBuf[i].Offset( -m_cmp->m_Pos );
769  }
770 
771  // Add template fieldnames:
772  // Now copy in the template fields, in the order that they are present in the
773  // template field editor UI.
775 
776  for( TEMPLATE_FIELDNAMES::const_iterator it = tfnames.begin(); it!=tfnames.end(); ++it )
777  {
778  // add a new field unconditionally to the UI only
779  SCH_FIELD fld( wxPoint(0,0), -1 /* id is a relic */, m_cmp, it->m_Name );
780 
781  // See if field by same name already exists in component.
782  SCH_FIELD* schField = aComponent->FindField( it->m_Name );
783 
784  // If the field does not already exist in the component, then we
785  // use defaults from the template fieldname, otherwise the original
786  // values from the component will be set.
787  if( !schField )
788  {
789  if( !it->m_Visible )
790  fld.SetVisible( false );
791  else
792  fld.SetVisible( true );
793 
794  fld.SetText( it->m_Value ); // empty? ok too.
795  }
796  else
797  {
798  fld = *schField;
799 
800  // make the editable field position relative to the component
801  fld.Offset( -m_cmp->m_Pos );
802  }
803 
804  m_FieldsBuf.push_back( fld );
805  }
806 
807  // Lastly, append any original fields from the component which were not added
808  // from the set of fixed fields nor from the set of template fields.
809  for( unsigned i=MANDATORY_FIELDS; i<aComponent->m_Fields.size(); ++i )
810  {
811  SCH_FIELD* cmp = &aComponent->m_Fields[i];
812  SCH_FIELD* buf = findField( cmp->GetName( false ) );
813 
814  if( !buf )
815  {
816  int newNdx = m_FieldsBuf.size();
817  m_FieldsBuf.push_back( *cmp );
818 
819  // make the editable field position relative to the component
820  m_FieldsBuf[newNdx].Offset( -m_cmp->m_Pos );
821  }
822  }
823 
824 
825 #if 0 && defined(DEBUG)
826  for( unsigned i = 0; i<m_FieldsBuf.size(); ++i )
827  {
828  printf( "m_FieldsBuf[%d] (x=%-3d, y=%-3d) name:%s\n", i, m_FieldsBuf[i].m_Pos.x,
829  m_FieldsBuf[i].m_Pos.y, TO_UTF8(m_FieldsBuf[i].GetName( false ) ) );
830  }
831 #endif
832 
833  m_FieldsBuf[REFERENCE].SetText( m_cmp->GetRef( &GetParent()->GetCurrentSheet() ) );
834 
835  for( unsigned i = 0; i<m_FieldsBuf.size(); ++i )
836  {
837  setRowItem( i, m_FieldsBuf[i] );
838  }
839 
840 #if 0 && defined(DEBUG)
841  for( unsigned i = 0; i<m_FieldsBuf.size(); ++i )
842  {
843  printf( "after[%d] (x=%d, y=%d)\n", i, m_FieldsBuf[i].m_Pos.x,
844  m_FieldsBuf[i].m_Pos.y );
845  }
846 
847 #endif
848 
850 
851  // disable some options inside the edit dialog
852  // which can cause problems while dragging
853  if( m_cmp->IsDragging() )
854  {
855  orientationRadioBox->Disable();
856  mirrorRadioBox->Disable();
857  chipnameTextCtrl->Disable();
858  }
859 
860  // put focus on the list ctrl
861  fieldListCtrl->SetFocus();
862 
863  // resume editing at the last row edited, last time dialog was up.
865 
867 }
Class SCH_FIELD instances are attached to a component and provide a place for the component's value...
Definition: sch_field.h:56
void Offset(const wxPoint &aOffset)
Definition: eda_text.h:229
SCH_FIELD * FindField(const wxString &aFieldName, bool aIncludeDefaultFields=true)
Search for a SCH_FIELD with aFieldName.
wxString GetName(bool aUseDefaultName=true) const
Function GetName returns the field name.
Definition: sch_field.cpp:425
SCH_FIELDS m_FieldsBuf
a copy of the edited symbol's SCH_FIELDs
SCH_FIELD * findField(const wxString &aFieldName)
SCH_FIELDS m_Fields
Variable length list of fields.
Definition: sch_component.h:91
wxPoint m_Pos
Name and library where symbol was loaded from, i.e. "74xx:74LS00".
Definition: sch_component.h:77
The first 4 are mandatory, and must be instantiated in SCH_COMPONENT and LIB_PART constructors...
void SetVisible(bool aVisible)
Definition: eda_text.h:175
LIB_PART * GetLibPart(const LIB_ID &aLibId, bool aUseCacheLib=false, bool aShowErrorMsg=false)
Field Reference of part, i.e. "IC21".
#define TO_UTF8(wxstring)
Macro TO_UTF8 converts a wxString to a UTF8 encoded C string for all wxWidgets build modes...
Definition: macros.h:47
void setRowItem(int aFieldNdx, const wxString &aName, const wxString &aValue)
std::vector< TEMPLATE_FIELDNAME > TEMPLATE_FIELDNAMES
const wxString GetRef(const SCH_SHEET_PATH *aSheet)
Return the reference for the given sheet path.
const TEMPLATE_FIELDNAMES & GetTemplateFieldNames()
Return a template field names list for read only access.
Definition: schframe.h:314
int GetFieldCount() const
Return the number of fields in this symbol.
const LIB_ID & GetLibId() const
void copySelectedFieldToPanel()
Sets the values displayed on the panel according to the currently selected field row.
bool IsDragging() const
Definition: base_struct.h:246
KIWAY& KIWAY_HOLDER::Kiway ( ) const
inlineinherited

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

A KIWAY_HOLDER is not necessarily a KIWAY_PLAYER.

Definition at line 60 of file kiway_player.h.

References KIWAY_HOLDER::m_kiway.

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

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

Reimplemented from DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP.

Definition at line 651 of file dialog_edit_component_in_schematic.cpp.

References copyPanelToSelectedField(), getSelectedFieldNdx(), m_FieldsBuf, m_skipCopyFromPanel, MANDATORY_FIELDS, setRowItem(), setSelectedFieldNdx(), and updateDisplay().

652 {
653  unsigned fieldNdx = getSelectedFieldNdx();
654 
655  // Ensure there is at least one field after this one
656  if( fieldNdx >= ( m_FieldsBuf.size() - 1 ) )
657  {
658  return;
659  }
660 
661  // The first field which can be moved up is the second user field
662  // so any field which id < MANDATORY_FIELDS cannot be moved down
663  if( fieldNdx < MANDATORY_FIELDS )
664  return;
665 
666  if( !copyPanelToSelectedField() )
667  return;
668 
669  // swap the fieldNdx field with the one before it, in both the vector
670  // and in the fieldListCtrl
671  SCH_FIELD tmp = m_FieldsBuf[fieldNdx + 1];
672 
673  m_FieldsBuf[fieldNdx + 1] = m_FieldsBuf[fieldNdx];
674  setRowItem( fieldNdx + 1, m_FieldsBuf[fieldNdx] );
675  m_FieldsBuf[fieldNdx + 1].SetId( fieldNdx + 1 );
676 
677  m_FieldsBuf[fieldNdx] = tmp;
678  setRowItem( fieldNdx, tmp );
679  m_FieldsBuf[fieldNdx].SetId( fieldNdx );
680 
681  updateDisplay( );
682 
683  m_skipCopyFromPanel = true;
684  setSelectedFieldNdx( fieldNdx + 1 );
685  m_skipCopyFromPanel = false;
686 }
Class SCH_FIELD instances are attached to a component and provide a place for the component's value...
Definition: sch_field.h:56
bool copyPanelToSelectedField()
Copy the values displayed on the panel fields to the currently selected field.
SCH_FIELDS m_FieldsBuf
a copy of the edited symbol's SCH_FIELDs
The first 4 are mandatory, and must be instantiated in SCH_COMPONENT and LIB_PART constructors...
void setRowItem(int aFieldNdx, const wxString &aName, const wxString &aValue)
void updateDisplay()
Update the listbox showing fields according to the field's text.
void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::moveUpButtonHandler ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP.

Definition at line 614 of file dialog_edit_component_in_schematic.cpp.

References copyPanelToSelectedField(), DBG, SCH_FIELD::GetName(), getSelectedFieldNdx(), EDA_TEXT::GetText(), m_FieldsBuf, m_skipCopyFromPanel, MANDATORY_FIELDS, setRowItem(), setSelectedFieldNdx(), TO_UTF8, and updateDisplay().

615 {
616  unsigned fieldNdx = getSelectedFieldNdx();
617 
618  if( fieldNdx >= m_FieldsBuf.size() ) // traps the -1 case too
619  return;
620 
621  if( fieldNdx <= MANDATORY_FIELDS )
622  {
623  wxBell();
624  return;
625  }
626 
627  if( !copyPanelToSelectedField() )
628  return;
629 
630  // swap the fieldNdx field with the one before it, in both the vector
631  // and in the fieldListCtrl
632  SCH_FIELD tmp = m_FieldsBuf[fieldNdx - 1];
633 
634  DBG( printf( "tmp.m_Text=\"%s\" tmp.m_Name=\"%s\"\n",
635  TO_UTF8( tmp.GetText() ), TO_UTF8( tmp.GetName( false ) ) ); )
636 
637  m_FieldsBuf[fieldNdx - 1] = m_FieldsBuf[fieldNdx];
638  setRowItem( fieldNdx - 1, m_FieldsBuf[fieldNdx] );
639 
640  m_FieldsBuf[fieldNdx] = tmp;
641  setRowItem( fieldNdx, tmp );
642 
643  updateDisplay();
644 
645  m_skipCopyFromPanel = true;
646  setSelectedFieldNdx( fieldNdx - 1 );
647  m_skipCopyFromPanel = false;
648 }
Class SCH_FIELD instances are attached to a component and provide a place for the component's value...
Definition: sch_field.h:56
bool copyPanelToSelectedField()
Copy the values displayed on the panel fields to the currently selected field.
wxString GetName(bool aUseDefaultName=true) const
Function GetName returns the field name.
Definition: sch_field.cpp:425
SCH_FIELDS m_FieldsBuf
a copy of the edited symbol's SCH_FIELDs
The first 4 are mandatory, and must be instantiated in SCH_COMPONENT and LIB_PART constructors...
#define TO_UTF8(wxstring)
Macro TO_UTF8 converts a wxString to a UTF8 encoded C string for all wxWidgets build modes...
Definition: macros.h:47
void setRowItem(int aFieldNdx, const wxString &aName, const wxString &aValue)
const wxString & GetText() const
Function GetText returns the string associated with the text object.
Definition: eda_text.h:130
void updateDisplay()
Update the listbox showing fields according to the field's text.
#define DBG(x)
Definition: fctsys.h:33
void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnCancelButtonClick ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP.

Definition at line 334 of file dialog_edit_component_in_schematic.cpp.

References DIALOG_SHIM::EndQuasiModal().

335 {
336  EndQuasiModal( wxID_CANCEL );
337 }
void EndQuasiModal(int retCode)
void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnCloseDialog ( wxCloseEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP.

Definition at line 322 of file dialog_edit_component_in_schematic.cpp.

References DIALOG_SHIM::EndQuasiModal().

323 {
324  // On wxWidgets 2.8, and on Linux, calling EndQuasiModal here is mandatory
325  // Otherwise, the main event loop is never restored, and Eeschema does not
326  // respond to any event, because the DIALOG_SHIM destructor is never called.
327  // On wxWidgets 3.0, or on Windows, the DIALOG_SHIM destructor is called,
328  // and calls EndQuasiModal.
329  // therefore calling EndQuasiModal here is not always mandatory but it creates no issues
330  EndQuasiModal( wxID_CANCEL );
331 }
void EndQuasiModal(int retCode)
void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnInitDlg ( wxInitDialogEvent &  event)
inlineoverrideprivatevirtual

Reimplemented from DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP.

Definition at line 139 of file dialog_edit_component_in_schematic.cpp.

References DIALOG_SHIM::FinishDialogSettings().

140  {
141  TransferDataToWindow();
142 
143  // Now all widgets have the size fixed, call FinishDialogSettings
145  }
void FinishDialogSettings()
In all dialogs, we must call the same functions to fix minimal dlg size, the default position and per...
void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnListItemDeselected ( wxListEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP.

Definition at line 241 of file dialog_edit_component_in_schematic.cpp.

References copyPanelToSelectedField(), and m_skipCopyFromPanel.

242 {
243  if( !m_skipCopyFromPanel )
244  {
245  if( !copyPanelToSelectedField() )
246  event.Skip(); // do not go to the next row
247  }
248 }
bool copyPanelToSelectedField()
Copy the values displayed on the panel fields to the currently selected field.
void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnListItemSelected ( wxListEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP.

Definition at line 313 of file dialog_edit_component_in_schematic.cpp.

References copySelectedFieldToPanel(), and s_SelectedRow.

314 {
315  // remember the selected row, statically
316  s_SelectedRow = event.GetIndex();
317 
319 }
void copySelectedFieldToPanel()
Sets the values displayed on the panel according to the currently selected field row.
void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnOKButtonClick ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP.

Definition at line 438 of file dialog_edit_component_in_schematic.cpp.

References copyPanelToOptions(), copyPanelToSelectedField(), DisplayError(), DIALOG_SHIM::EndQuasiModal(), Format(), GetChars(), SCH_EDIT_FRAME::GetCurrentSheet(), EDA_ITEM::GetFlags(), SCH_COMPONENT::GetLibId(), LIB_ID::GetLibItemName(), SCH_BASE_FRAME::GetLibPart(), GetParent(), SCH_EDIT_FRAME::GetScreen(), BLOCK_SELECTOR::GetState(), SCH_EDIT_FRAME::GetTemplates(), GetText(), TEMPLATES::HasFieldName(), LIB_PART::IsPower(), SCH_COMPONENT::IsReferenceStringValid(), BASE_SCREEN::m_BlockLocate, m_cmp, m_FieldsBuf, SCH_COMPONENT::m_Pos, MANDATORY_FIELDS, SCH_EDIT_FRAME::OnModify(), REFERENCE, SCH_EDIT_FRAME::SaveCopyInUndoList(), SCH_COMPONENT::SetFields(), SCH_COMPONENT::SetRef(), STATE_NO_BLOCK, SCH_SCREEN::TestDanglingEnds(), UR_CHANGED, and VALUE.

439 {
440  bool removeRemainingFields = false;
441 
442  if( !copyPanelToSelectedField() )
443  return;
444 
446  {
447  DisplayError( NULL, _( "Illegal reference. A reference must start with a letter" ) );
448  return;
449  }
450 
451  // save old cmp in undo list if not already in edit, or moving ...
452  // or the component to be edited is part of a block
453  if( m_cmp->GetFlags() == 0
456 
458 
459  // Delete any fields with no name before we copy all of m_FieldsBuf back into the component.
460  for( unsigned i = MANDATORY_FIELDS; i<m_FieldsBuf.size(); )
461  {
462  if( m_FieldsBuf[i].GetName( false ).IsEmpty() || m_FieldsBuf[i].GetText().IsEmpty() )
463  {
464  // If a field has no value and is not it the field template list, warn the user
465  // that it will be remove from the component. This gives the user a chance to
466  // correct the problem before removing the undefined fields. It should also
467  // resolve most of the bug reports and questions regarding missing fields.
468  if( !m_FieldsBuf[i].GetName( false ).IsEmpty() && m_FieldsBuf[i].GetText().IsEmpty()
469  && !GetParent()->GetTemplates().HasFieldName( m_FieldsBuf[i].GetName( false ) )
470  && !removeRemainingFields )
471  {
472  wxString msg = wxString::Format(
473  _( "The field name <%s> does not have a value and is not defined in "
474  "the field template list. Empty field values are invalid an will "
475  "be removed from the component. Do you wish to remove this and "
476  "all remaining undefined fields?" ),
477  GetChars( m_FieldsBuf[i].GetName( false ) )
478  );
479 
480  wxMessageDialog dlg( this, msg, _( "Remove Fields" ), wxYES_NO | wxNO_DEFAULT );
481 
482  if( dlg.ShowModal() == wxID_NO )
483  return;
484 
485  removeRemainingFields = true;
486  }
487 
488  m_FieldsBuf.erase( m_FieldsBuf.begin() + i );
489  continue;
490  }
491 
492  ++i;
493  }
494 
495  // change all field positions from relative to absolute
496  for( unsigned i = 0; i<m_FieldsBuf.size(); ++i )
497  {
498  m_FieldsBuf[i].Offset( m_cmp->m_Pos );
499  }
500 
501  LIB_PART* entry = GetParent()->GetLibPart( m_cmp->GetLibId() );
502 
503  if( entry && entry->IsPower() )
504  m_FieldsBuf[VALUE].SetText( m_cmp->GetLibId().GetLibItemName() );
505 
506  // copy all the fields back, and change the length of m_Fields.
508 
509  // Reference has a specific initialization, depending on the current active sheet
510  // because for a given component, in a complex hierarchy, there are more than one
511  // reference.
512  m_cmp->SetRef( &GetParent()->GetCurrentSheet(), m_FieldsBuf[REFERENCE].GetText() );
513 
514  GetParent()->OnModify();
516 
517  EndQuasiModal( wxID_OK );
518 }
STATUS_FLAGS GetFlags() const
Definition: base_struct.h:282
bool copyPanelToSelectedField()
Copy the values displayed on the panel fields to the currently selected field.
const TEMPLATES & GetTemplates()
Return the field names template for read only access.
Definition: schframe.h:323
BLOCK_SELECTOR m_BlockLocate
Block description for block commands.
SCH_FIELDS m_FieldsBuf
a copy of the edited symbol's SCH_FIELDs
bool IsPower() const
void OnModify()
Must be called after a schematic change in order to set the "modify" flag of the current screen* and ...
Definition: schframe.cpp:773
wxPoint m_Pos
Name and library where symbol was loaded from, i.e. "74xx:74LS00".
Definition: sch_component.h:77
The first 4 are mandatory, and must be instantiated in SCH_COMPONENT and LIB_PART constructors...
LIB_PART * GetLibPart(const LIB_ID &aLibId, bool aUseCacheLib=false, bool aShowErrorMsg=false)
Field Reference of part, i.e. "IC21".
SCH_SCREEN * GetScreen() const override
Function GetScreen returns a pointer to a BASE_SCREEN or one of its derivatives.
Definition: schframe.cpp:532
void SetFields(const SCH_FIELDS &aFields)
Set multiple schematic fields.
const UTF8 & GetLibItemName() const
Definition: lib_id.h:115
void SaveCopyInUndoList(SCH_ITEM *aItemToCopy, UNDO_REDO_T aTypeCommand, bool aAppend=false, const wxPoint &aTransformPoint=wxPoint(0, 0))
Create a copy of the current schematic item, and put it in the undo list.
Define a library symbol object.
wxString GetText(GRAPHIC_PINSHAPE shape)
Definition: pin_shape.cpp:33
void SetRef(const SCH_SHEET_PATH *aSheet, const wxString &aReference)
Set the reference for the given sheet path for this symbol.
void EndQuasiModal(int retCode)
bool HasFieldName(const wxString &aName) const
Function HasFieldName checks for aName in the the template field name list.
static const wxChar * GetChars(const wxString &s)
Function GetChars returns a wxChar* to the actual wxChar* data within a wxString, and is helpful for ...
Definition: macros.h:92
void 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
BLOCK_STATE_T GetState() const
bool TestDanglingEnds()
Test all of the connectable objects in the schematic for unused connection points.
Definition: sch_screen.cpp:877
const LIB_ID & GetLibId() const
static bool IsReferenceStringValid(const wxString &aReferenceString)
Tests for an acceptable reference string.
#define VALUE
void DisplayError(wxWindow *parent, const wxString &text, int displaytime)
Function DisplayError displays an error or warning message box with aMessage.
Definition: confirm.cpp:73
void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnSelectChipName ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP.

Definition at line 288 of file dialog_edit_component_in_schematic.cpp.

References DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::chipnameTextCtrl, dummy(), GetParent(), and SCH_BASE_FRAME::SelectComponentFromLibrary().

289 {
291 
292  auto sel = GetParent()->SelectComponentFromLibrary( NULL, dummy, true, 0, 0 );
293 
294  if( !sel.LibId.IsValid() )
295  return;
296 
297  chipnameTextCtrl->SetValue( sel.LibId.Format() );
298 }
std::vector< COMPONENT_SELECTION > HISTORY_LIST
static LIB_PART * dummy()
Used when a LIB_PART is not found in library to draw a dummy shape This component is a 400 mils squar...
COMPONENT_SELECTION SelectComponentFromLibrary(const SCHLIB_FILTER *aFilter, std::vector< COMPONENT_SELECTION > &aHistoryList, bool aUseLibBrowser, int aUnit, int aConvert, const LIB_ID *aHighlight=nullptr, bool aAllowFields=true)
Function SelectComponentFromLib Calls the library viewer to select component to import into schematic...
Definition: getpart.cpp:102
void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnTestChipName ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP.

Definition at line 250 of file dialog_edit_component_in_schematic.cpp.

References DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::chipnameTextCtrl, DisplayError(), DisplayInfoMessage(), numEval::Parse(), and KIWAY_HOLDER::Prj().

251 {
252  LIB_ID id;
253  wxString msg;
254  wxString partname = chipnameTextCtrl->GetValue();
255 
256  if( id.Parse( partname ) != -1 || !id.IsValid() )
257  {
258  msg.Printf( _( "'%s' is not a valid library symbol indentifier." ), partname );
259  DisplayError( this, msg );
260  return;
261  }
262 
263  LIB_ALIAS* alias = NULL;
264 
265  try
266  {
267  alias = Prj().SchSymbolLibTable()->LoadSymbol( id );
268  }
269  catch( ... )
270  {
271  }
272 
273  if( !alias )
274  {
275  msg.Printf( _( "Symbol '%s' not found in library '%s'" ),
276  id.GetLibItemName().wx_str(), id.GetLibNickname().wx_str() );
277  DisplayError( this, msg );
278  return;
279  }
280 
281  msg.Printf( _( "Symbol '%s' found in library '%s'" ),
282  id.GetLibItemName().wx_str(), id.GetLibNickname().wx_str() );
283 
284  DisplayInfoMessage( this, msg );
285 }
Part library alias object definition.
void Parse(void *yyp, int yymajor, ParseTOKENTYPE yyminorParseARG_PDECL)
A logical library item identifier and consists of various portions much like a URI.
Definition: lib_id.h:51
PROJECT & Prj() const
Function Prj returns a reference to the PROJECT "associated with" this KIWAY.
void DisplayInfoMessage(wxWindow *aParent, const wxString &aMessage, const wxString aExtraInfo)
Function DisplayInfoMessage displays an informational message box with aMessage.
Definition: confirm.cpp:104
void DisplayError(wxWindow *parent, const wxString &text, int displaytime)
Function DisplayError displays an error or warning message box with aMessage.
Definition: confirm.cpp:73
PROJECT & KIWAY_HOLDER::Prj ( ) const
inherited

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

Definition at line 34 of file kiway_holder.cpp.

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

Referenced by DIALOG_EDIT_COMPONENT_IN_LIBRARY::AddAliasOfPart(), SCH_EDIT_FRAME::AppendSchematic(), PCB_EDIT_FRAME::ArchiveModulesOnBoard(), DIALOG_SYMBOL_REMAP::backupProject(), LIB_VIEW_FRAME::BestZoom(), DIALOG_MODULE_MODULE_EDITOR::BrowseAndAdd3DShapeFile(), DIALOG_MODULE_BOARD_EDITOR::BrowseAndAdd3DShapeFile(), DIALOG_EDIT_COMPONENT_IN_LIBRARY::BrowseAndSelectDocFile(), DIALOG_EXCHANGE_MODULE::BrowseAndSelectFootprint(), DIALOG_SYMBOL_LIB_TABLE::browseLibrariesHandler(), CVPCB_MAINFRAME::BuildLIBRARY_LISTBOX(), DIALOG_MODULE_MODULE_EDITOR::Cfg3DPath(), DIALOG_MODULE_BOARD_EDITOR::Cfg3DPath(), copyPanelToOptions(), PCB_BASE_EDIT_FRAME::CreateNewLibrary(), DIALOG_PLOT_SCHEMATIC::createPlotFileName(), DIALOG_SYMBOL_REMAP::createProjectSymbolLibTable(), FOOTPRINT_EDIT_FRAME::DeleteModuleFromCurrentLibrary(), DIALOG_CHOOSE_COMPONENT::DIALOG_CHOOSE_COMPONENT(), DIALOG_CONFIG_EQUFILES::DIALOG_CONFIG_EQUFILES(), DIALOG_FP_LIB_TABLE::DIALOG_FP_LIB_TABLE(), DIALOG_MODULE_BOARD_EDITOR::DIALOG_MODULE_BOARD_EDITOR(), DIALOG_MODULE_MODULE_EDITOR::DIALOG_MODULE_MODULE_EDITOR(), DIALOG_PAGES_SETTINGS::DIALOG_PAGES_SETTINGS(), DIALOG_SYMBOL_LIB_TABLE::DIALOG_SYMBOL_LIB_TABLE(), LIB_VIEW_FRAME::DisplayLibInfos(), LIB_EDIT_FRAME::DisplayLibInfos(), SCH_BASE_FRAME::DisplayListComponentsInLib(), PCB_EDIT_FRAME::doAutoSave(), DIALOG_MODULE_MODULE_EDITOR::Edit3DShapeFileName(), DIALOG_MODULE_BOARD_EDITOR::Edit3DShapeFileName(), SCH_EDIT_FRAME::EditSheet(), PCB_EDIT_FRAME::Export_IDF3(), PCB_EDIT_FRAME::ExportVRML_File(), PCB_EDIT_FRAME::Files_io_from_id(), PCB_EDIT_FRAME::GenD356File(), NETLIST_DIALOG::GenNetlist(), DISPLAY_FOOTPRINTS_FRAME::Get_Module(), FOOTPRINT_VIEWER_FRAME::getCurFootprintName(), LIB_EDIT_FRAME::GetCurLib(), FOOTPRINT_VIEWER_FRAME::getCurNickname(), FOOTPRINT_EDIT_FRAME::GetCurrentLib(), SCH_BASE_FRAME::GetLibAlias(), SCH_BASE_FRAME::GetLibPart(), FOOTPRINT_EDIT_FRAME::getLibPath(), LIB_EDIT_FRAME::getLibraryFileName(), DIALOG_SYMBOL_REMAP::getLibsNotInGlobalSymbolLibTable(), DIALOG_BOM::getPluginFileName(), LIB_VIEW_FRAME::getSelectedAlias(), FP_THREAD_IFACE::GetTable(), SCH_EDIT_FRAME::ImportFile(), PCB_EDIT_FRAME::ImportFile(), DIALOG_MODULE_MODULE_EDITOR::initModeditProperties(), DIALOG_MODULE_BOARD_EDITOR::InitModeditProperties(), PCB_EDIT_FRAME::InstallNetlistFrame(), SCH_EDIT_FRAME::IsSearchCacheObsolete(), SCH_EDIT_FRAME::Load_Component(), SCH_EDIT_FRAME::LoadCmpToFootprintLinkFile(), LIB_EDIT_FRAME::LoadComponentFromCurrentLib(), CVPCB_MAINFRAME::LoadFootprintFiles(), DIALOG_SPICE_MODEL::loadLibrary(), LIB_EDIT_FRAME::LoadOneSymbol(), CVPCB_MAINFRAME::LoadProjectFile(), SCH_EDIT_FRAME::LoadProjectFile(), PCB_EDIT_FRAME::LoadProjectSettings(), DIALOG_DRC_CONTROL::makeValidFileNameReport(), FOOTPRINT_VIEWER_FRAME::OnActivate(), DIALOG_GENCAD_EXPORT_OPTIONS::onBrowse(), DIALOG_DRC_CONTROL::OnButtonBrowseRptFileClick(), DIALOG_EDIT_COMPONENTS_LIBID::onClickOrphansButton(), CVPCB_MAINFRAME::OnEditFootprintLibraryTable(), SCH_BASE_FRAME::OnEditSymbolLibTable(), DIALOG_GENDRILL::OnGenReportFile(), SCH_EDIT_FRAME::OnImportProject(), DIALOG_CHOOSE_COMPONENT::OnInitDialog(), PCB_EDIT_FRAME::OnLeftClick(), DIALOG_NETLIST::OnOpenNetlistClick(), DIALOG_PLOT::OnOutputDirectoryBrowseClicked(), DIALOG_SVG_PRINT::OnOutputDirectoryBrowseClicked(), DIALOG_GENDRILL::OnOutputDirectoryBrowseClicked(), DIALOG_PLOT_SCHEMATIC::OnOutputDirectoryBrowseClicked(), DIALOG_GEN_MODULE_POSITION::OnOutputDirectoryBrowseClicked(), LIB_EDIT_FRAME::OnPlotCurrentComponent(), DIALOG_SYMBOL_REMAP::OnRemapSymbols(), SCH_EDIT_FRAME::OnRightClick(), DIALOG_BOM::OnRunPlugin(), DIALOG_NETLIST::OnSaveMessagesToFile(), SCH_EDIT_FRAME::OnSaveProject(), DIALOG_CHOOSE_COMPONENT::OnSchViewPaint(), DIALOG_SPICE_MODEL::onSelectLibrary(), LIB_VIEW_FRAME::OnSelectSymbol(), OnTestChipName(), FOOTPRINT_EDIT_FRAME::OnUpdateSelectCurrentLib(), LIB_EDIT_FRAME::OnViewEntryDoc(), LIB_VIEW_FRAME::onViewSymbolDocument(), SCH_EDIT_FRAME::OpenProjectFiles(), PCB_EDIT_FRAME::OpenProjectFiles(), SCH_EDIT_FRAME::PasteListOfItems(), PCB_EDITOR_CONTROL::PlaceModule(), DIALOG_CHOOSE_COMPONENT::PopulateFootprintSelector(), SCH_EDIT_FRAME::Process_Config(), PCB_EDIT_FRAME::Process_Config(), FOOTPRINT_EDIT_FRAME::ProcessPreferences(), CVPCB_MAINFRAME::ReadNetListAndFpFiles(), PCB_EDIT_FRAME::RecreateCmpFileFromBoard(), FOOTPRINT_VIEWER_FRAME::ReCreateFootprintList(), LIB_VIEW_FRAME::ReCreateHToolbar(), FOOTPRINT_VIEWER_FRAME::ReCreateLibraryList(), LIB_VIEW_FRAME::ReCreateListCmp(), LIB_VIEW_FRAME::ReCreateListLib(), LIB_VIEW_FRAME::RedrawActiveWindow(), EDA_3D_VIEWER::ReloadRequest(), DIALOG_SYMBOL_REMAP::remapSymbolToLibTable(), SCH_EDIT_FRAME::RescueLegacyProject(), SCH_EDIT_FRAME::RescueSymbolLibTableProject(), FOOTPRINT_EDIT_FRAME::restoreLastFootprint(), FOOTPRINT_EDIT_FRAME::retainLastFootprint(), SCH_EDIT_FRAME::SaveEEFile(), FOOTPRINT_EDIT_FRAME::SaveFootprintInLibrary(), LIB_EDIT_FRAME::saveLibrary(), LIB_EDIT_FRAME::SaveOneSymbol(), CVPCB_MAINFRAME::SaveProjectFile(), SCH_EDIT_FRAME::SaveProjectSettings(), PCB_EDIT_FRAME::SaveProjectSettings(), SCH_BASE_FRAME::saveSymbolLibTables(), FOOTPRINT_VIEWER_FRAME::SelectAndViewFootprint(), SCH_BASE_FRAME::SelectComponentFromLibrary(), FOOTPRINT_VIEWER_FRAME::SelectCurrentFootprint(), PCB_BASE_FRAME::SelectLibrary(), SCH_BASE_FRAME::SelectLibraryFromList(), LIB_EDIT_FRAME::selectSymLibTable(), SCH_EDIT_FRAME::sendNetlist(), FOOTPRINT_VIEWER_FRAME::setCurFootprintName(), LIB_EDIT_FRAME::SetCurLib(), FOOTPRINT_VIEWER_FRAME::setCurNickname(), LIB_EDIT_FRAME::SetCurPart(), DIALOG_CHOOSE_COMPONENT::ShowFootprintFor(), SIM_PLOT_FRAME::SIM_PLOT_FRAME(), EDA_3D_VIEWER::takeScreenshot(), SIM_PLOT_FRAME::updateNetlistExporter(), SCH_SCREEN::UpdateSymbolLinks(), FOOTPRINT_VIEWER_FRAME::UpdateTitle(), CVPCB_MAINFRAME::UpdateTitle(), FOOTPRINT_EDIT_FRAME::updateTitle(), SCH_EDIT_FRAME::WriteNetListFile(), DIALOG_MODULE_BOARD_EDITOR::~DIALOG_MODULE_BOARD_EDITOR(), and DIALOG_MODULE_MODULE_EDITOR::~DIALOG_MODULE_MODULE_EDITOR().

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

Reimplemented from DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP.

Definition at line 1156 of file dialog_edit_component_in_schematic.cpp.

References CMP_NORMAL, DATASHEET, SCH_COMPONENT::Draw(), DIALOG_SHIM::EndQuasiModal(), FOOTPRINT, g_XorMode, EDA_DRAW_FRAME::GetCanvas(), SCH_COMPONENT::GetField(), EDA_ITEM::GetFlags(), SCH_COMPONENT::GetLibId(), SCH_BASE_FRAME::GetLibPart(), GetParent(), EDA_TEXT::GetTextPos(), GR_DEFAULT_DRAWMODE, SCH_FIELD::ImportValues(), INSTALL_UNBUFFERED_DC, m_cmp, SCH_COMPONENT::m_Pos, SCH_EDIT_FRAME::OnModify(), REFERENCE, SCH_EDIT_FRAME::SaveCopyInUndoList(), SCH_COMPONENT::SetOrientation(), EDA_TEXT::SetTextPos(), UR_CHANGED, and VALUE.

1157 {
1158  if( !m_cmp )
1159  return;
1160 
1161  if( LIB_PART* part = GetParent()->GetLibPart( m_cmp->GetLibId() ) )
1162  {
1163  // save old cmp in undo list if not already in edit, or moving ...
1164  if( m_cmp->GetFlags() == 0 )
1166 
1167  INSTALL_UNBUFFERED_DC( dc, GetParent()->GetCanvas() );
1168  m_cmp->Draw( GetParent()->GetCanvas(), &dc, wxPoint( 0, 0 ), g_XorMode );
1169 
1170  // Initialize fixed field values to default values found in library
1171  // Note: the field texts are not modified because they are set in schematic,
1172  // the text from libraries is most of time a dummy text
1173  // Only VALUE, REFERENCE , FOOTPRINT and DATASHEET are re-initialized
1174  LIB_FIELD& refField = part->GetReferenceField();
1175 
1176  m_cmp->GetField( REFERENCE )->ImportValues( refField );
1177  m_cmp->GetField( REFERENCE )->SetTextPos( refField.GetTextPos() + m_cmp->m_Pos );
1178 
1179  LIB_FIELD& valField = part->GetValueField();
1180 
1181  m_cmp->GetField( VALUE )->ImportValues( valField );
1182  m_cmp->GetField( VALUE )->SetTextPos( valField.GetTextPos() + m_cmp->m_Pos );
1183 
1184  LIB_FIELD* field = part->GetField(FOOTPRINT);
1185 
1186  if( field && m_cmp->GetField( FOOTPRINT ) )
1187  {
1188  m_cmp->GetField( FOOTPRINT )->ImportValues( *field );
1189  m_cmp->GetField( FOOTPRINT )->SetTextPos( field->GetTextPos() + m_cmp->m_Pos );
1190  }
1191 
1192  field = part->GetField(DATASHEET);
1193 
1194  if( field && m_cmp->GetField( DATASHEET ) )
1195  {
1196  m_cmp->GetField( DATASHEET )->ImportValues( *field );
1197  m_cmp->GetField( DATASHEET )->SetTextPos( field->GetTextPos() + m_cmp->m_Pos );
1198  }
1199 
1201 
1202  GetParent()->OnModify();
1203 
1204  m_cmp->Draw( GetParent()->GetCanvas(), &dc, wxPoint( 0, 0 ), GR_DEFAULT_DRAWMODE );
1205 
1206  EndQuasiModal( wxID_OK );
1207  }
1208 }
GR_DRAWMODE g_XorMode
Definition: gr_basic.cpp:51
STATUS_FLAGS GetFlags() const
Definition: base_struct.h:282
name of datasheet
const wxPoint & GetTextPos() const
Definition: eda_text.h:224
void OnModify()
Must be called after a schematic change in order to set the "modify" flag of the current screen* and ...
Definition: schframe.cpp:773
void ImportValues(const LIB_FIELD &aSource)
Function ImportValues copy parameters from a LIB_FIELD source.
Definition: sch_field.cpp:221
wxPoint m_Pos
Name and library where symbol was loaded from, i.e. "74xx:74LS00".
Definition: sch_component.h:77
Field object used in symbol libraries.
Definition: lib_field.h:59
void SetTextPos(const wxPoint &aPoint)
Definition: eda_text.h:223
Field Name Module PCB, i.e. "16DIP300".
Field Reference of part, i.e. "IC21".
SCH_FIELD * GetField(int aFieldNdx) const
Returns a field in this symbol.
void SaveCopyInUndoList(SCH_ITEM *aItemToCopy, UNDO_REDO_T aTypeCommand, bool aAppend=false, const wxPoint &aTransformPoint=wxPoint(0, 0))
Create a copy of the current schematic item, and put it in the undo list.
Define a library symbol object.
void EndQuasiModal(int retCode)
#define GR_DEFAULT_DRAWMODE
Definition: general.h:70
#define INSTALL_UNBUFFERED_DC(name, parent)
void Draw(EDA_DRAW_PANEL *aPanel, wxDC *aDC, const wxPoint &aOffset, GR_DRAWMODE aDrawMode, COLOR4D aColor=COLOR4D::UNSPECIFIED) override
Function Draw Draw a schematic item.
const LIB_ID & GetLibId() const
#define VALUE
void SetOrientation(int aOrientation)
Compute the new transform matrix based on aOrientation for the symbol which is applied to the current...
void KIWAY_HOLDER::SetKiway ( wxWindow *  aDest,
KIWAY aKiway 
)
inherited

Function SetKiway.

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

Definition at line 41 of file kiway_holder.cpp.

References KIWAY_HOLDER::m_kiway, and name.

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

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

Definition at line 870 of file dialog_edit_component_in_schematic.cpp.

References DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::fieldListCtrl.

Referenced by addFieldButtonHandler(), copyPanelToSelectedField(), InitBuffers(), moveDownButtonHandler(), moveUpButtonHandler(), setRowItem(), showButtonHandler(), and updateDisplay().

871 {
872  wxASSERT( aFieldNdx >= 0 );
873 
874  // insert blanks if aFieldNdx is referencing a "yet to be defined" row
875  while( aFieldNdx >= fieldListCtrl->GetItemCount() )
876  {
877  long ndx = fieldListCtrl->InsertItem( fieldListCtrl->GetItemCount(), wxEmptyString );
878 
879  wxASSERT( ndx >= 0 );
880 
881  fieldListCtrl->SetItem( ndx, 1, wxEmptyString );
882  }
883 
884  fieldListCtrl->SetItem( aFieldNdx, 0, aName );
885  fieldListCtrl->SetItem( aFieldNdx, 1, aValue );
886 
887  // recompute the column widths here, after setting texts
888  fieldListCtrl->SetColumnWidth( 0, wxLIST_AUTOSIZE );
889  fieldListCtrl->SetColumnWidth( 1, wxLIST_AUTOSIZE );
890 }
void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::setRowItem ( int  aFieldNdx,
const SCH_FIELD aField 
)
inlineprivate

Definition at line 119 of file dialog_edit_component_in_schematic.cpp.

References SCH_FIELD::GetName(), EDA_TEXT::GetText(), and setRowItem().

120  {
121  setRowItem( aFieldNdx, aField.GetName( false ), aField.GetText() );
122  }
wxString GetName(bool aUseDefaultName=true) const
Function GetName returns the field name.
Definition: sch_field.cpp:425
void setRowItem(int aFieldNdx, const wxString &aName, const wxString &aValue)
const wxString & GetText() const
Function GetText returns the string associated with the text object.
Definition: eda_text.h:130
void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::setSelectedFieldNdx ( int  aFieldNdx)
private

Definition at line 689 of file dialog_edit_component_in_schematic.cpp.

References DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::fieldListCtrl, m_FieldsBuf, and s_SelectedRow.

Referenced by addFieldButtonHandler(), deleteFieldButtonHandler(), EditSpiceModel(), InitBuffers(), moveDownButtonHandler(), and moveUpButtonHandler().

690 {
691  /* deselect old selection, but I think this is done by single selection
692  * flag within fieldListCtrl.
693  * fieldListCtrl->SetItemState( s_SelectedRow, 0,
694  * wxLIST_STATE_SELECTED|wxLIST_STATE_FOCUSED);
695  */
696 
697  if( aFieldNdx >= (int) m_FieldsBuf.size() )
698  aFieldNdx = m_FieldsBuf.size() - 1;
699 
700  if( aFieldNdx < 0 )
701  aFieldNdx = 0;
702 
703  fieldListCtrl->SetItemState( aFieldNdx, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED );
704  fieldListCtrl->EnsureVisible( aFieldNdx );
705 
706  s_SelectedRow = aFieldNdx;
707 }
SCH_FIELDS m_FieldsBuf
a copy of the edited symbol's SCH_FIELDs
bool DIALOG_SHIM::Show ( bool  show)
overrideinherited

Definition at line 139 of file dialog_shim.cpp.

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

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

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

Reimplemented from DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP.

Definition at line 584 of file dialog_edit_component_in_schematic.cpp.

References DATASHEET, KIWAY_PLAYER::Destroy(), DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::fieldValueTextCtrl, FOOTPRINT, FRAME_PCB_MODULE_VIEWER_MODAL, GetAssociatedDocument(), GetParent(), getSelectedFieldNdx(), KIWAY_HOLDER::Kiway(), m_FieldsBuf, KIWAY::Player(), resolveUriByEnvVars(), setRowItem(), and KIWAY_PLAYER::ShowModal().

585 {
586  unsigned fieldNdx = getSelectedFieldNdx();
587 
588  if( fieldNdx == DATASHEET )
589  {
590  wxString datasheet_uri = fieldValueTextCtrl->GetValue();
591  datasheet_uri = resolveUriByEnvVars( datasheet_uri );
592  GetAssociatedDocument( this, datasheet_uri );
593  }
594  else if( fieldNdx == FOOTPRINT )
595  {
596  // pick a footprint using the footprint picker.
597  wxString fpid;
598 
600 
601  if( frame->ShowModal( &fpid, this ) )
602  {
603  // DBG( printf( "%s: %s\n", __func__, TO_UTF8( fpid ) ); )
604  fieldValueTextCtrl->SetValue( fpid );
605 
606  setRowItem( fieldNdx, m_FieldsBuf[fieldNdx].GetName( false ), fpid );
607  }
608 
609  frame->Destroy();
610  }
611 }
Class KIWAY_PLAYER is a wxFrame capable of the OpenProjectFiles function, meaning it can load a porti...
Definition: kiway_player.h:111
KIWAY & Kiway() const
Function Kiway returns a reference to the KIWAY that this object has an opportunity to participate in...
Definition: kiway_player.h:60
name of datasheet
SCH_FIELDS m_FieldsBuf
a copy of the edited symbol's SCH_FIELDs
bool GetAssociatedDocument(wxWindow *aParent, const wxString &aDocName, const wxPathList *aPaths)
Function GetAssociatedDocument open a document (file) with the suitable browser.
Definition: eda_doc.cpp:86
Field Name Module PCB, i.e. "16DIP300".
void setRowItem(int aFieldNdx, const wxString &aName, const wxString &aValue)
VTBL_ENTRY KIWAY_PLAYER * Player(FRAME_T aFrameType, bool doCreate=true, KIWAY_PLAYER *aParent=NULL)
Function Player returns the KIWAY_PLAYER* given a FRAME_T.
Definition: kiway.cpp:302
static wxString resolveUriByEnvVars(const wxString &aUri)
bool Destroy() override
Our version of Destroy() which is virtual from wxWidgets.
VTBL_ENTRY bool ShowModal(wxString *aResult=NULL, wxWindow *aResultantFocusWindow=NULL)
Function ShowModal puts up this wxFrame as if it were a modal dialog, with all other instantiated wxF...
int DIALOG_SHIM::ShowQuasiModal ( )
inherited

Definition at line 497 of file dialog_shim.cpp.

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

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

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

Update the listbox showing fields according to the field's text.

This must be called after a text change in fields if this change is not an edition.

Definition at line 156 of file dialog_edit_component_in_schematic.cpp.

References DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::fieldListCtrl, and setRowItem().

Referenced by deleteFieldButtonHandler(), EditSpiceModel(), moveDownButtonHandler(), moveUpButtonHandler(), and UpdateFields().

157  {
158  fieldListCtrl->DeleteAllItems();
159 
160  for( unsigned ii = 0; ii < m_FieldsBuf.size(); ii++ )
161  setRowItem( ii, m_FieldsBuf[ii] );
162  }
SCH_FIELDS m_FieldsBuf
a copy of the edited symbol's SCH_FIELDs
void setRowItem(int aFieldNdx, const wxString &aName, const wxString &aValue)
void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::UpdateFields ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP.

Definition at line 1211 of file dialog_edit_component_in_schematic.cpp.

References copySelectedFieldToPanel(), SCH_COMPONENT::GetFieldCount(), GetParent(), InvokeDialogUpdateFields(), m_cmp, SCH_COMPONENT::m_Fields, m_FieldsBuf, SCH_COMPONENT::m_Pos, and updateDisplay().

1212 {
1213  SCH_COMPONENT copy( *m_cmp );
1214  std::list<SCH_COMPONENT*> components;
1215  components.push_back( &copy );
1216  InvokeDialogUpdateFields( GetParent(), components, false );
1217 
1218  // Copy fields from the modified component copy to the dialog buffer
1219  m_FieldsBuf.clear();
1220 
1221  for( int i = 0; i < copy.GetFieldCount(); ++i )
1222  {
1223  copy.m_Fields[i].SetParent( m_cmp );
1224  m_FieldsBuf.push_back( copy.m_Fields[i] );
1225  m_FieldsBuf[i].Offset( -m_cmp->m_Pos );
1226  }
1227 
1228  // Update the selected field as well
1230  updateDisplay();
1231 }
SCH_FIELDS m_FieldsBuf
a copy of the edited symbol's SCH_FIELDs
wxPoint m_Pos
Name and library where symbol was loaded from, i.e. "74xx:74LS00".
Definition: sch_component.h:77
int InvokeDialogUpdateFields(SCH_EDIT_FRAME *aCaller, const list< SCH_COMPONENT * > aComponents, bool aCreateUndoEntry)
void updateDisplay()
Update the listbox showing fields according to the field's text.
Class SCH_COMPONENT describes a real schematic component.
Definition: sch_component.h:69
void copySelectedFieldToPanel()
Sets the values displayed on the panel according to the currently selected field row.

Friends And Related Function Documentation

friend class SCH_EDIT_FRAME
friend

Definition at line 85 of file dialog_edit_component_in_schematic.cpp.

Member Data Documentation

wxCheckBox* DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::convertCheckBox
protectedinherited
wxStaticText* DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::fieldNameLabel
protectedinherited
wxTextCtrl* DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::fieldNameTextCtrl
protectedinherited
wxStaticText* DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::fieldValueLabel
protectedinherited
wxTextCtrl* DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::fieldValueTextCtrl
protectedinherited
wxButton* DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::m_buttonSelectChipName
protectedinherited
wxButton* DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::m_buttonTestChipName
protectedinherited
wxRadioBox* DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::m_FieldHJustifyCtrl
protectedinherited
wxRadioBox* DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::m_FieldVJustifyCtrl
protectedinherited
std::string DIALOG_SHIM::m_hash_key
protectedinherited
LIB_PART* DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::m_part
private
EVENT_LOOP* DIALOG_SHIM::m_qmodal_loop
protectedinherited

Definition at line 131 of file dialog_shim.h.

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

WDO_ENABLE_DISABLE* DIALOG_SHIM::m_qmodal_parent_disabler
protectedinherited
bool DIALOG_SHIM::m_qmodal_showing
protectedinherited
bool DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::m_skipCopyFromPanel
private
wxStaticLine* DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::m_staticline1
protectedinherited
wxStaticText* DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::m_staticTextTimeStamp
protectedinherited
wxStaticText* DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::m_staticTextUnit
protectedinherited
wxStaticText* DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::m_staticTextUnitPosX
protectedinherited
wxStaticText* DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::m_staticTextUnitPosY
protectedinherited
wxStaticText* DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::m_staticTextUnitSize
protectedinherited
wxRadioBox* DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::m_StyleRadioBox
protectedinherited
wxTextCtrl* DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::m_textCtrlTimeStamp
protectedinherited
wxRadioBox* DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::mirrorRadioBox
protectedinherited
wxRadioBox* DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::orientationRadioBox
protectedinherited
wxStaticText* DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::posXLabel
protectedinherited
wxTextCtrl* DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::posXTextCtrl
protectedinherited
wxStaticText* DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::posYLabel
protectedinherited
wxTextCtrl* DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::posYTextCtrl
protectedinherited
wxButton* DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::resetFieldsStyleButton
protectedinherited
wxCheckBox* DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::rotateCheckBox
protectedinherited
int DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::s_SelectedRow
staticprivate
wxCheckBox* DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::showCheckBox
protectedinherited
wxStdDialogButtonSizer* DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::stdDialogButtonSizer
protectedinherited
wxButton* DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::stdDialogButtonSizerCancel
protectedinherited
wxStaticText* DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::textSizeLabel
protectedinherited
wxTextCtrl* DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::textSizeTextCtrl
protectedinherited
wxChoice* DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::unitChoice
protectedinherited
wxStaticText* DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::unitsInterchageableLabel
protectedinherited
wxStaticText* DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::unitsInterchageableText
protectedinherited
wxButton* DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::updateFieldValues
protectedinherited

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