26#include <magic_enum.hpp>
56static std::map<GRAPHIC_PINSHAPE, struct pinShapeStruct>
g_pinShapes;
65 wxASSERT( index < magic_enum::enum_count<PIN_ORIENTATION>() );
66 return magic_enum::enum_value<PIN_ORIENTATION>( index );
72 auto index = magic_enum::enum_index<PIN_ORIENTATION>( code );
74 if( index.has_value() )
142 for(
PIN_ORIENTATION orientation : magic_enum::enum_values<PIN_ORIENTATION>() )
216 return it->second.name;
229 return it->second.bitmap;
240 wxCHECK_MSG( it !=
g_pinShapes.end(), wxT(
"?" ), wxT(
"Pin type not found!" ) );
242 return it->second.name;
255 return it->second.bitmap;
266 wxCHECK_MSG( it !=
g_pinOrientations.end(), wxT(
"?" ), wxT(
"Pin orientation not found!" ) );
268 return it->second.name;
281 return it->second.bitmap;
BITMAPS
A list of all bitmap identifiers.
@ pinshape_clock_active_low
@ pinshape_active_low_input
@ pinshape_active_low_output
virtual int GetSelectedLanguageIdentifier() const
PGM_BASE & Pgm()
The global Program "get" accessor.
const std::vector< BITMAPS > & PinTypeIcons()
static std::map< PIN_ORIENTATION, struct pinShapeStruct > g_pinOrientations
BITMAPS PinShapeGetBitmap(GRAPHIC_PINSHAPE aShape)
static std::map< GRAPHIC_PINSHAPE, struct pinShapeStruct > g_pinShapes
const wxArrayString & PinTypeNames()
static std::vector< BITMAPS > g_orientationIcons
static std::vector< BITMAPS > g_typeIcons
int PinOrientationIndex(PIN_ORIENTATION code)
wxString ElectricalPinTypeGetText(ELECTRICAL_PINTYPE aType)
const wxArrayString & PinShapeNames()
const std::vector< BITMAPS > & PinShapeIcons()
static wxArrayString g_shapeNames
static wxArrayString g_typeNames
BITMAPS ElectricalPinTypeGetBitmap(ELECTRICAL_PINTYPE aType)
wxString PinShapeGetText(GRAPHIC_PINSHAPE aShape)
const wxArrayString & PinOrientationNames()
wxString PinOrientationName(PIN_ORIENTATION aOrientation)
static std::vector< BITMAPS > g_shapeIcons
static wxArrayString g_orientationNames
BITMAPS PinOrientationGetBitmap(PIN_ORIENTATION aOrientation)
static std::map< ELECTRICAL_PINTYPE, struct pinTypeStruct > g_pinElectricalTypes
PIN_ORIENTATION PinOrientationCode(size_t index)
const std::vector< BITMAPS > & PinOrientationIcons()
ELECTRICAL_PINTYPE
The symbol library pin object electrical types used in ERC tests.
@ PT_INPUT
usual pin input: must be connected
@ PT_NC
not connected (must be left open)
@ PT_TRISTATE
tris state bus pin
@ PT_NIC
not internally connected (may be connected to anything)
@ PT_BIDI
input or output (like port for a microprocessor)
@ PT_OPENEMITTER
pin type open emitter
@ PT_POWER_OUT
output of a regulator: intended to be connected to power input pins
@ PT_OPENCOLLECTOR
pin type open collector
@ PT_POWER_IN
power input (GND, VCC for ICs). Must be connected to a power output.
@ PT_UNSPECIFIED
unknown electrical properties: creates always a warning when connected
@ PT_PASSIVE
pin for passive symbols: must be connected, and can be connected to any pin
#define ELECTRICAL_PINTYPES_TOTAL
#define GRAPHIC_PINSHAPES_TOTAL
PIN_ORIENTATION
The symbol library pin object orientations.
@ PIN_UP
The pin extends upwards from the connection point: Probably on the bottom side of the symbol.
@ PIN_RIGHT
The pin extends rightwards from the connection point.
@ PIN_LEFT
The pin extends leftwards from the connection point: Probably on the right side of the symbol.
@ PIN_DOWN
The pin extends downwards from the connection: Probably on the top side of the symbol.