26#include <wx/filedlg.h>
27#include <wx/wfstream.h>
29#include <wx/tokenzr.h>
56#define BOOL_TRUE _HKI( "True" )
57#define BOOL_FALSE _HKI( "False" )
59#define UNITS_ALL _HKI( "ALL" )
60#define DEMORGAN_ALL _HKI( "ALL" )
61#define DEMORGAN_STD _HKI( "Standard" )
62#define DEMORGAN_ALT _HKI( "Alternate" )
88 default: wxFAIL;
return wxEmptyString;
95 return wxGetTranslation( aNativeLabel ).IsSameAs( aStr, aCaseSensitive )
96 || aStr.IsSameAs( aNativeLabel, aCaseSensitive );
105 const wxString translatedLabel = wxGetTranslation( nativeLabel );
147 val << PinTypeNames()[static_cast<int>( aPin.
GetType() )];
150 val << PinShapeNames()[static_cast<int>( aPin.
GetShape() )];
186 case BODY_STYLE::BASE:
189 case BODY_STYLE::DEMORGAN:
198 wxFAIL_MSG( wxString::Format(
"Invalid field id %d", aFieldId ) );
223 if(
PinTypeNames().Index( aValue,
false ) != wxNOT_FOUND )
291 wxFAIL_MSG( wxString::Format(
"Invalid field id %d", aFieldId ) );
306 wxCHECK_MSG(
false, wxEmptyString,
"Invalid BOOL_FORMAT" );
311 if( aValue == wxS(
"1" ) )
315 else if( aValue == wxS(
"0" ) )
328 aReporter.
Report( wxString::Format(
_(
"The value '%s' can't be converted to boolean correctly, "
329 "it has been interpreted as 'False'" ),
344 wxGridCellCoordsArray topLeft = aGrid->GetSelectionBlockTopLeft();
345 wxGridCellCoordsArray botRight = aGrid->GetSelectionBlockBottomRight();
347 wxArrayInt cols = aGrid->GetSelectedCols();
348 wxArrayInt rows = aGrid->GetSelectedRows();
350 if( topLeft.Count() && botRight.Count() )
352 *aRowStart = topLeft[0].GetRow();
353 *aRowCount = botRight[0].GetRow() - *aRowStart + 1;
355 else if( cols.Count() )
358 *aRowCount = aGrid->GetNumberRows();
360 else if( rows.Count() )
362 *aRowStart = rows[0];
363 *aRowCount = rows.Count();
367 *aRowStart = aGrid->GetGridCursorRow();
368 *aRowCount = *aRowStart >= 0 ? 1 : 0;
379 const std::vector<SCH_PIN*>& aOrigSelectedPins ) :
402 GetView()->ForceRefresh();
426 wxGrid*
grid = GetView();
428 if(
grid->GetGridCursorRow() == aRow &&
grid->GetGridCursorCol() == aCol
429 &&
grid->IsCellEditControlShown() )
440 static wxString
GetValue(
const std::vector<SCH_PIN*>& pins,
int aCol,
466 if( fieldValue.length() )
467 fieldValue += wxT(
", " );
473 if( !fieldValue.Length() )
475 else if( val != fieldValue )
483 void SetValue(
int aRow,
int aCol,
const wxString &aValue )
override
488 wxString value = aValue;
499 if(
m_eval->Process( value ) )
511 std::vector<SCH_PIN*> pins =
m_rows[ aRow ];
517 wxStringTokenizer tokenizer( value,
"," );
520 while( tokenizer.HasMoreTokens() )
522 wxString pinName = tokenizer.GetNextToken();
525 pinName.Trim(
true ).Trim(
false );
527 if( i < pins.size() )
530 pins.at( i )->SetNumber( pinName );
562 pins.push_back( newPin );
569 while( pins.size() > i )
592 static int findRow(
const std::vector<std::vector<SCH_PIN*>>& aRowSet,
const wxString& aName )
594 for(
size_t i = 0; i < aRowSet.size(); ++i )
596 if( aRowSet[ i ][ 0 ] && aRowSet[ i ][ 0 ]->GetName() == aName )
603 static bool compare(
const std::vector<SCH_PIN*>& lhs,
const std::vector<SCH_PIN*>& rhs,
606 wxString lhStr =
GetValue( lhs, sortCol, parentFrame );
607 wxString rhStr =
GetValue( rhs, sortCol, parentFrame );
613 lhStr =
GetValue( lhs, sortCol, parentFrame );
614 rhStr =
GetValue( rhs, sortCol, parentFrame );
621 auto cmp = [ ascending ](
const auto a,
const auto b )
656 void RebuildRows(
const std::vector<SCH_PIN*>& aPins,
bool groupByName,
bool groupBySelection )
659 std::vector<SCH_PIN*> clear_flags;
661 clear_flags.reserve( aPins.size() );
665 if( groupBySelection )
668 pin->ClearTempFlags();
670 int firstSelectedRow;
671 int selectedRowCount;
675 for(
int ii = 0; ii < selectedRowCount; ++ii )
680 clear_flags.push_back(
pin );
687 grid->CommitPendingChanges(
true );
689 wxGridTableMessage msg(
this, wxGRIDTABLE_NOTIFY_ROWS_DELETED, 0,
m_rows.size() );
690 GetView()->ProcessTableMessage( msg );
695 if( groupBySelection )
696 m_rows.emplace_back( std::vector<SCH_PIN*>() );
698 std::set<wxString> selectedNumbers;
701 selectedNumbers.insert(
pin->GetNumber() );
704 const auto pinIsInEditorSelection = [&](
SCH_PIN*
pin )
708 if( selectedNumbers.count(
pin->GetNumber() ) == 0 )
718 if( selectedPin->GetNumber() ==
pin->GetNumber()
719 && selectedPin->GetName() ==
pin->GetName()
720 && selectedPin->GetUnit() ==
pin->GetUnit()
721 && selectedPin->GetBodyStyle() ==
pin->GetBodyStyle()
734 const bool includedByUnit =
736 const bool includedByBodyStyle =
740 if( includedByUnit && includedByBodyStyle && includedBySelection )
746 else if( groupBySelection && (
pin->GetFlags() &
CANDIDATE ) )
751 m_rows.emplace_back( std::vector<SCH_PIN*>() );
752 rowIndex =
m_rows.size() - 1;
760 bool ascending =
true;
762 if( GetView() && GetView()->GetSortingColumn() != wxNOT_FOUND )
764 sortCol = GetView()->GetSortingColumn();
765 ascending = GetView()->IsSortOrderAscending();
768 for( std::vector<SCH_PIN*>& row :
m_rows )
771 if( !groupBySelection )
776 wxGridTableMessage msg(
this, wxGRIDTABLE_NOTIFY_ROWS_APPENDED, (
int)
m_rows.size() );
777 GetView()->ProcessTableMessage( msg );
779 if( groupBySelection )
780 GetView()->SelectRow( 0 );
790 [ aSortCol, ascending,
this ](
const std::vector<SCH_PIN*>& lhs,
791 const std::vector<SCH_PIN*>& rhs ) ->
bool
793 return compare( lhs, rhs, aSortCol, ascending, m_frame );
799 std::sort( aRow.begin(), aRow.end(),
802 return PIN_NUMBERS::Compare( lhs->GetNumber(), rhs->GetNumber() ) < 0;
808 std::vector<SCH_PIN*> row;
809 row.push_back( aPin );
814 wxGridTableMessage msg(
this, wxGRIDTABLE_NOTIFY_ROWS_APPENDED, 1 );
815 GetView()->ProcessTableMessage( msg );
821 std::vector<SCH_PIN*> removedRow =
m_rows[ aRow ];
827 wxGridTableMessage msg(
this, wxGRIDTABLE_NOTIFY_ROWS_DELETED, aRow, 1 );
828 GetView()->ProcessTableMessage( msg );
850 std::vector<std::vector<SCH_PIN*>>
m_rows;
863 std::unique_ptr<NUMERIC_EVALUATOR>
m_eval;
876 void ExportData( std::vector<SCH_PIN*>& aPins,
const wxString& aToFile )
const
878 std::vector<int> exportCols {
894 std::vector<std::vector<wxString>> exportTable;
895 exportTable.reserve( aPins.size() + 1 );
897 std::vector<wxString> headers;
898 for(
int col : exportCols )
902 exportTable.emplace_back( std::move( headers ) );
909 std::vector<wxString>& cols = exportTable.emplace_back( 0 );
910 cols.reserve( exportCols.size() );
911 for(
int col : exportCols )
913 cols.emplace_back( formatter.
Format( *
pin, col ) );
917 if( !aToFile.IsEmpty() )
919 wxFileOutputStream os( aToFile );
954 std::vector<std::vector<wxString>> csvData;
957 if( !
path.IsEmpty() )
968 std::vector<std::unique_ptr<SCH_PIN>> pins;
978 for(
size_t i = 1; i < csvData.size(); ++i )
980 std::vector<wxString>& cols = csvData[i];
982 auto pin = std::make_unique<SCH_PIN>( &aSym );
985 size_t maxCol = std::min( headerCols.size(), cols.size() );
987 for(
size_t j = 0; j < maxCol; ++j )
993 formatter.
UpdatePin( *
pin, cols[j], headerCols[j], aSym );
996 pins.emplace_back( std::move(
pin ) );
1006 wxFD_OPEN | wxFD_FILE_MUST_EXIST );
1008 if( dlg.ShowModal() == wxID_CANCEL )
1009 return wxEmptyString;
1011 return dlg.GetPath();
1016 std::vector<COL_ORDER> colOrder;
1017 wxArrayString unknownHeaders;
1019 for(
size_t i = 0; i < aHeaderRow.size(); ++i )
1024 unknownHeaders.push_back( aHeaderRow[i] );
1026 colOrder.push_back( col );
1029 if( unknownHeaders.size() )
1031 wxString msg = wxString::Format(
_(
"Unknown columns in data: %s. These columns will be ignored." ),
1046 const std::vector<SCH_PIN*>& aSelectedPins ) :
1048 m_editFrame( parent ),
1071 wxGridCellAttr* attr;
1073 attr =
new wxGridCellAttr;
1074 attr->SetReadOnly(
true );
1077 attr =
new wxGridCellAttr;
1084 attr =
new wxGridCellAttr;
1091 attr =
new wxGridCellAttr;
1095 orientationNames ) );
1099 attr =
new wxGridCellAttr;
1100 wxArrayString unitNames;
1101 unitNames.push_back( wxGetTranslation(
UNITS_ALL ) );
1109 attr =
new wxGridCellAttr;
1110 wxArrayString demorganNames;
1111 demorganNames.push_back( wxGetTranslation(
DEMORGAN_ALL ) );
1112 demorganNames.push_back( wxGetTranslation(
DEMORGAN_STD ) );
1113 demorganNames.push_back( wxGetTranslation(
DEMORGAN_ALT ) );
1117 attr =
new wxGridCellAttr;
1118 attr->SetRenderer(
new wxGridCellBoolRenderer() );
1119 attr->SetEditor(
new wxGridCellBoolEditor() );
1120 attr->SetAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
1141 GetSizer()->SetSizeHints(
this);
1186 m_grid->Connect( wxEVT_GRID_COL_SORT,
1197 m_grid->Disconnect( wxEVT_GRID_COL_SORT,
1204 m_grid->PopEventHandler(
true );
1267 int sortCol = aEvent.GetCol();
1272 if(
m_grid->IsSortingBy( sortCol ) )
1274 ascending = !
m_grid->IsSortOrderAscending();
1317 m_pins.push_back( newPin );
1321 m_grid->MakeCellVisible(
m_grid->GetNumberRows() - 1, 1 );
1322 m_grid->SetGridCursor(
m_grid->GetNumberRows() - 1, 1 );
1324 m_grid->EnableCellEditControl(
true );
1325 m_grid->ShowCellEditControl();
1347 int curRow =
m_grid->GetGridCursorRow();
1354 int nextSelRow = std::max( curRow-1, 0 );
1355 m_grid->GoToCell( nextSelRow,
m_grid->GetGridCursorCol() );
1356 m_grid->SetGridCursor( nextSelRow,
m_grid->GetGridCursorCol() );
1357 m_grid->SelectRow( nextSelRow );
1393 if( candidate->GetNumber() == pins.at( 0 )->GetNumber() )
1422 m_grid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
1438 m_grid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
1449 if( event.IsChecked() )
1466 if( event.IsChecked() )
1515 std::vector<std::unique_ptr<SCH_PIN>> newPins = importer.
ImportData( fromFile, *
m_symbol );
1519 int ret = wxMessageBox( reporter.
GetMessages(),
_(
"Errors" ), wxOK | wxCANCEL | wxICON_ERROR,
this );
1522 if( ret == wxCANCEL )
1526 if( !newPins.size() )
1539 for(
auto& newPin : newPins )
1541 m_pins.push_back( newPin.release() );
1556 wxString filePath = wxEmptyString;
1563 wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
1565 if( dlg.ShowModal() == wxID_CANCEL )
1568 filePath = dlg.GetPath();
1571 std::vector<SCH_PIN*> pinsToExport;
1579 pinsToExport.push_back(
pin );
1590 exporter.
ExportData( pinsToExport, filePath );
1599 wxGridUpdateLocker deferRepaintsTillLeavingScope;
1616 width -=
m_grid->GetColSize( i );
1628 wxSize new_size =
event.GetSize();
1650 if( !
m_grid->IsCellEditControlShown() )
1654 int firstSelectedRow;
1655 int selectedRowCount;
1675 int retval = wxID_CANCEL;
1694 EndDialog( retval );
1709 EndDialog( retval );
1721 if(
pin->GetNumber().Length() )
1726 m_pin_count->SetLabel( wxString::Format( wxT(
"%u" ), (
unsigned)
m_pins.size() ) );
constexpr EDA_IU_SCALE schIUScale
wxBitmapBundle KiBitmapBundle(BITMAPS aBitmap, int aMinHeight)
void WriteLines(const std::vector< std::vector< wxString > > &aRows)
Write a vector of rows to the stream.
Class DIALOG_LIB_EDIT_PIN_TABLE_BASE.
wxRadioButton * m_rbExportOnlyShownPins
STD_BITMAP_BUTTON * m_refreshButton
wxStaticText * m_pin_numbers_summary
BITMAP_BUTTON * m_divider1
wxButton * m_ButtonsCancel
STD_BITMAP_BUTTON * m_addButton
wxStaticText * m_pin_count
wxRadioButton * m_rbReplaceAll
wxStaticText * m_duplicate_pins
wxCheckBox * m_cbFilterSelected
wxChoice * m_bodyStyleFilter
wxCheckBox * m_cbFilterByBodyStyle
wxCheckBox * m_cbFilterByUnit
wxButton * m_btnExportToFile
STD_BITMAP_BUTTON * m_deleteButton
wxButton * m_groupSelected
wxButton * m_btnImportFromFile
bool m_modified
true when there are unsaved changes
void OnExportButtonClick(wxCommandEvent &event) override
void OnRebuildRows(wxCommandEvent &event) override
int m_originalColWidths[COL_COUNT]
void OnCancel(wxCommandEvent &event) override
void OnUpdateUI(wxUpdateUIEvent &event) override
void RemovePin(SCH_PIN *pin)
void OnColSort(wxGridEvent &aEvent)
void OnImportButtonClick(wxCommandEvent &event) override
void OnGroupSelected(wxCommandEvent &event) override
void OnClose(wxCloseEvent &event) override
void OnSize(wxSizeEvent &event) override
PIN_TABLE_DATA_MODEL * m_dataModel
DIALOG_LIB_EDIT_PIN_TABLE(SYMBOL_EDIT_FRAME *parent, LIB_SYMBOL *aSymbol, const std::vector< SCH_PIN * > &aSelectedPins)
~DIALOG_LIB_EDIT_PIN_TABLE() override
void AddPin(SCH_PIN *pin)
void OnCellSelected(wxGridEvent &event) override
bool TransferDataToWindow() override
void OnAddRow(wxCommandEvent &event) override
void OnDeleteRow(wxCommandEvent &event) override
SYMBOL_EDIT_FRAME * m_editFrame
std::bitset< 64 > m_columnsShown
void OnCellEdited(wxGridEvent &event) override
std::vector< SCH_PIN * > m_pins
bool TransferDataFromWindow() override
void OnFilterCheckBox(wxCommandEvent &event) override
void OnFilterChoice(wxCommandEvent &event) override
void SetupStandardButtons(std::map< int, wxString > aLabels={})
bool IsQuasiModal() const
void EndQuasiModal(int retCode)
The base frame for deriving all KiCad main window classes.
The base class for create windows for drawing purpose.
virtual void ClearFocus()
virtual void Refresh(bool aEraseBackground=true, const wxRect *aRect=nullptr) override
Add mouse and command handling (such as cut, copy, and paste) to a WX_GRID instance.
Define a library symbol object.
bool IsMulti() const override
std::vector< SCH_PIN * > GetPins(int aUnit, int aBodyStyle) const
Return a list of pin object pointers from the draw item list.
static wxString LetterSubReference(int aUnit, int aFirstId)
bool HasAlternateBodyStyle() const override
Test if symbol has more than one body conversion type (DeMorgan).
wxString GetName() const override
void RemoveDrawItem(SCH_ITEM *aItem)
Remove draw aItem from list.
wxString GetUnitReference(int aUnit) override
Return an identifier for aUnit for symbols with units.
int GetUnitCount() const override
void AddDrawItem(SCH_ITEM *aItem, bool aSort=true)
Add a new draw aItem to the draw object list and sort according to aSort.
A singleton reporter that reports to nowhere.
wxString GetDuplicates() const
Gets a formatted string of all the pins that have duplicate numbers.
static int Compare(const wxString &lhs, const wxString &rhs)
void insert(value_type const &v)
wxString GetSummary() const
static bool compare(const std::vector< SCH_PIN * > &lhs, const std::vector< SCH_PIN * > &rhs, int sortCol, bool ascending, EDA_DRAW_FRAME *parentFrame)
void RebuildRows(const std::vector< SCH_PIN * > &aPins, bool groupByName, bool groupBySelection)
void SetUnitFilter(int aFilter)
static int findRow(const std::vector< std::vector< SCH_PIN * > > &aRowSet, const wxString &aName)
std::map< std::pair< std::vector< SCH_PIN * >, int >, wxString > m_evalOriginal
std::vector< std::vector< SCH_PIN * > > m_rows
int GetNumberCols() override
const std::vector< SCH_PIN * > & m_origSelectedPins
The pins in the symbol that are selected at dialog start.
bool IsEmptyCell(int row, int col) override
DIALOG_LIB_EDIT_PIN_TABLE * m_pinTable
std::vector< SCH_PIN * > GetRowPins(int aRow)
static wxString GetValue(const std::vector< SCH_PIN * > &pins, int aCol, EDA_DRAW_FRAME *aParentFrame)
PIN_TABLE_DATA_MODEL(SYMBOL_EDIT_FRAME *aFrame, DIALOG_LIB_EDIT_PIN_TABLE *aPinTable, LIB_SYMBOL *aSymbol, const std::vector< SCH_PIN * > &aOrigSelectedPins)
void AppendRow(SCH_PIN *aPin)
std::unique_ptr< NUMERIC_EVALUATOR > m_eval
void SetValue(int aRow, int aCol, const wxString &aValue) override
wxString GetValue(int aRow, int aCol) override
void SetFilterBySelection(bool aFilter)
void SortRows(int aSortCol, bool ascending)
SYMBOL_EDIT_FRAME * m_frame
int GetNumberRows() override
void onUnitsChanged(wxCommandEvent &aEvent)
void SetBodyStyleFilter(int aFilter)
wxString GetColLabelValue(int aCol) override
std::vector< SCH_PIN * > RemoveRow(int aRow)
void SortPins(std::vector< SCH_PIN * > &aRow)
void ExportData(std::vector< SCH_PIN * > &aPins, const wxString &aToFile) const
UNITS_PROVIDER & m_unitsProvider
PIN_TABLE_EXPORT(UNITS_PROVIDER &aUnitsProvider)
wxString promptForFile() const
std::vector< std::unique_ptr< SCH_PIN > > ImportData(bool aFromFile, LIB_SYMBOL &aSym) const
std::vector< COL_ORDER > getColOrderFromCSV(const std::vector< wxString > &aHeaderRow) const
PIN_TABLE_IMPORT(EDA_BASE_FRAME &aFrame, REPORTER &aReporter)
A pure virtual class used to derive REPORTER objects from.
virtual REPORTER & Report(const wxString &aText, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED)
Report a string with a given severity.
SCH_DRAW_PANEL * GetCanvas() const override
Return a pointer to GAL-based canvas of given EDA draw frame.
virtual void SetBodyStyle(int aBodyStyle)
virtual void SetUnit(int aUnit)
int GetNumberTextSize() const
void SetNumber(const wxString &aNumber)
void SetVisible(bool aVisible)
void ChangeLength(int aLength)
Change the length of a pin and adjust its position based on orientation.
void SetOrientation(PIN_ORIENTATION aOrientation)
void SetName(const wxString &aName)
void SetPosition(const VECTOR2I &aPos) override
const wxString & GetName() const
PIN_ORIENTATION GetOrientation() const
void SetNumberTextSize(int aSize)
void SetShape(GRAPHIC_PINSHAPE aShape)
VECTOR2I GetPosition() const override
int GetNameTextSize() const
void SetType(ELECTRICAL_PINTYPE aType)
const wxString & GetNumber() const
GRAPHIC_PINSHAPE GetShape() const
ELECTRICAL_PINTYPE GetType() const
void SetNameTextSize(int aSize)
The symbol library editor main window.
bool IsSymbolAlias() const
Return true if aLibId is an alias for the editor screen symbol.
bool GetShowDeMorgan() const
SYMBOL_EDITOR_SETTINGS * GetSettings() const
bool IsSymbolEditable() const
Test if a symbol is loaded and can be edited.
LIB_SYMBOL * GetCurSymbol() const
Return the current symbol being edited or NULL if none selected.
void FocusOnItem(EDA_ITEM *aItem) override
Focus on a particular canvas item.
EDA_UNITS GetUserUnits() const
wxString StringFromValue(double aValue, bool aAddUnitLabel=false, EDA_DATA_TYPE aType=EDA_DATA_TYPE::DISTANCE) const
Converts aValue in internal units into a united string.
int ValueFromString(const wxString &aTextValue, EDA_DATA_TYPE aType=EDA_DATA_TYPE::DISTANCE) const
Converts aTextValue in aUnits to internal units used by the frame.
void ShowHideColumns(const wxString &shownColumns)
Show/hide the grid columns based on a tokenized string of shown column indexes.
void SetTable(wxGridTableBase *table, bool aTakeOwnership=false)
Hide wxGrid's SetTable() method with one which doesn't mess up the grid column widths when setting th...
void DestroyTable(wxGridTableBase *aTable)
Work-around for a bug in wxGrid which crashes when deleting the table if the cell edit control was no...
wxString GetShownColumnsAsString()
Get a tokenized string containing the shown column indexes.
std::bitset< 64 > GetShownColumns()
bool CommitPendingChanges(bool aQuietMode=false)
Close any open cell edit controls.
A wrapper for reporting to a wxString object.
bool HasMessage() const override
Returns true if the reporter client is non-empty.
const wxString & GetMessages() const
bool SaveTabularDataToClipboard(const std::vector< std::vector< wxString > > &aData)
Store tabular data to the system clipboard.
bool GetTabularDataFromClipboard(std::vector< std::vector< wxString > > &aData)
Attempt to get tabular data from the clipboard.
bool HandleUnsavedChanges(wxWindow *aParent, const wxString &aMessage, const std::function< bool()> &aSaveFunction)
Display a dialog with Save, Cancel and Discard Changes buttons.
This file is part of the common library.
bool AutoDecodeCSV(const wxString &aInput, std::vector< std::vector< wxString > > &aData)
Try to guess the format of a T/CSV file and decode it into aData.
static wxString GetPinTableColLabel(int aCol)
Get the label for a given column in the pin table.
static bool MatchTranslationOrNative(const wxString &aStr, const wxString &aNativeLabel, bool aCaseSensitive)
void getSelectedArea(WX_GRID *aGrid, int *aRowStart, int *aRowCount)
static COL_ORDER GetColTypeForString(const wxString &aStr)
#define CANDIDATE
flag indicating that the structure is connected
static std::map< int, wxString > shapeNames
static const std::string CsvFileExtension
static wxString CsvTsvFileWildcard()
static wxString CsvFileWildcard()
const std::vector< BITMAPS > & PinTypeIcons()
const wxArrayString & PinTypeNames()
int PinOrientationIndex(PIN_ORIENTATION code)
const wxArrayString & PinShapeNames()
const std::vector< BITMAPS > & PinShapeIcons()
const wxArrayString & PinOrientationNames()
const std::vector< BITMAPS > & PinOrientationIcons()
ELECTRICAL_PINTYPE
The symbol library pin object electrical types used in ERC tests.
PIN_ORIENTATION
The symbol library pin object orientations.
wxString SafeReadFile(const wxString &aFilePath, const wxString &aReadType)
Nominally opens a file and reads it into a string.
int StrNumCmp(const wxString &aString1, const wxString &aString2, bool aIgnoreCase)
Compare two strings with alphanumerical content.
void AccumulateDescriptions(wxString &aDesc, const T &aItemCollection)
Build a comma-separated list from a collection of wxStrings.
constexpr int MilsToIU(int mils) const
#define INDETERMINATE_STATE
Used for holding indeterminate values, such as with multiple selections holding different values or c...
VECTOR2< int32_t > VECTOR2I
Definition of file extensions used in Kicad.