27#include <magic_enum.hpp>
51std::map<ELECTRICAL_PINTYPE, struct pinTypeStruct>
g_pinTypes = {
78const std::map<GRAPHIC_PINSHAPE, struct pinShapeStruct>
pinShapes = {
115 wxASSERT( index < magic_enum::enum_count<PIN_ORIENTATION>() );
116 return magic_enum::enum_value<PIN_ORIENTATION>( index );
122 auto index = magic_enum::enum_index<PIN_ORIENTATION>( code );
124 if( index.has_value() )
125 return index.value();
145 for(
PIN_ORIENTATION orientation : magic_enum::enum_values<PIN_ORIENTATION>() )
229 wxCHECK_MSG( findIt !=
g_pinTypes.end(), wxT(
"???" ), wxT(
"Pin type not found!" ) );
231 return findIt->second.name;
241 return findIt->second.bitmap;
249 wxCHECK_MSG( findIt !=
pinShapes.end(), wxT(
"?" ), wxT(
"Pin type not found!" ) );
251 return findIt->second.name;
261 return findIt->second.bitmap;
269 wxCHECK_MSG( findIt !=
pinOrientations.end(), wxT(
"?" ), wxT(
"Pin orientation not found!" ) );
271 return findIt->second.name;
280 wxT(
"Pin orientation not found!" ) );
282 return findIt->second.bitmap;
BITMAPS
A list of all bitmap identifiers.
@ pinshape_clock_active_low
@ pinshape_active_low_input
@ pinshape_active_low_output
const std::vector< BITMAPS > & PinTypeIcons()
std::map< PIN_ORIENTATION, struct pinShapeStruct > pinOrientations
BITMAPS PinShapeGetBitmap(GRAPHIC_PINSHAPE aShape)
static const BITMAPS iconsPinsOrientations[]
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()
std::map< ELECTRICAL_PINTYPE, struct pinTypeStruct > g_pinTypes
static wxArrayString g_shapeNames
static wxArrayString g_typeNames
BITMAPS ElectricalPinTypeGetBitmap(ELECTRICAL_PINTYPE aType)
wxString PinShapeGetText(GRAPHIC_PINSHAPE aShape)
const wxArrayString & PinOrientationNames()
const std::map< GRAPHIC_PINSHAPE, struct pinShapeStruct > pinShapes
wxString PinOrientationName(PIN_ORIENTATION aOrientation)
static std::vector< BITMAPS > g_shapeIcons
static wxArrayString g_orientationNames
BITMAPS PinOrientationGetBitmap(PIN_ORIENTATION aOrientation)
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.
KIWAY Kiway & Pgm(), KFCTL_STANDALONE
The global Program "get" accessor.