KiCad PCB EDA Suite
Loading...
Searching...
No Matches
pin_type.cpp File Reference
#include <bitmaps.h>
#include <cstddef>
#include <core/arraydim.h>
#include <lib_pin.h>
#include "pgm_base.h"

Go to the source code of this file.

Classes

struct  pinTypeStruct
 
struct  pinShapeStruct
 

Macros

#define PIN_ORIENTATION_CNT   arrayDim( pin_orientation_codes )
 

Functions

wxString PinOrientationName (unsigned aPinOrientationCode)
 
int PinOrientationCode (int index)
 
int PinOrientationIndex (int code)
 
void InitTables ()
 
const wxArrayString & PinTypeNames ()
 
const std::vector< BITMAPS > & PinTypeIcons ()
 
const wxArrayString & PinShapeNames ()
 
const std::vector< BITMAPS > & PinShapeIcons ()
 
const wxArrayString & PinOrientationNames ()
 
const std::vector< BITMAPS > & PinOrientationIcons ()
 
wxString ElectricalPinTypeGetText (ELECTRICAL_PINTYPE aType)
 
BITMAPS ElectricalPinTypeGetBitmap (ELECTRICAL_PINTYPE aType)
 
wxString PinShapeGetText (GRAPHIC_PINSHAPE aShape)
 
BITMAPS PinShapeGetBitmap (GRAPHIC_PINSHAPE aShape)
 

Variables

static std::vector< BITMAPSg_typeIcons
 
static wxArrayString g_typeNames
 
static std::vector< BITMAPSg_shapeIcons
 
static wxArrayString g_shapeNames
 
static std::vector< BITMAPSg_orientationIcons
 
static wxArrayString g_orientationNames
 
std::map< ELECTRICAL_PINTYPE, struct pinTypeStructg_pinTypes
 
int g_pinTypesLanguage = wxLANGUAGE_UNKNOWN
 
const std::map< GRAPHIC_PINSHAPE, struct pinShapeStructpinShapes
 
static const int pin_orientation_codes []
 
static const BITMAPS iconsPinsOrientations []
 

Macro Definition Documentation

◆ PIN_ORIENTATION_CNT

#define PIN_ORIENTATION_CNT   arrayDim( pin_orientation_codes )

Definition at line 111 of file pin_type.cpp.

Function Documentation

◆ ElectricalPinTypeGetBitmap()

BITMAPS ElectricalPinTypeGetBitmap ( ELECTRICAL_PINTYPE  aType)

Definition at line 267 of file pin_type.cpp.

References g_pinTypes, and INVALID_BITMAP.

Referenced by LIB_PIN::GetMenuImage(), InitTables(), and PinTypeComboBox::PinTypeComboBox().

◆ ElectricalPinTypeGetText()

◆ InitTables()

◆ PinOrientationCode()

◆ PinOrientationIcons()

const std::vector< BITMAPS > & PinOrientationIcons ( )

◆ PinOrientationIndex()

◆ PinOrientationName()

wxString PinOrientationName ( unsigned  aPinOrientationCode)

◆ PinOrientationNames()

◆ PinShapeGetBitmap()

◆ PinShapeGetText()

◆ PinShapeIcons()

◆ PinShapeNames()

◆ PinTypeIcons()

◆ PinTypeNames()

Variable Documentation

◆ g_orientationIcons

std::vector<BITMAPS> g_orientationIcons
static

Definition at line 39 of file pin_type.cpp.

Referenced by InitTables(), and PinOrientationIcons().

◆ g_orientationNames

wxArrayString g_orientationNames
static

Definition at line 40 of file pin_type.cpp.

Referenced by InitTables(), and PinOrientationNames().

◆ g_pinTypes

std::map<ELECTRICAL_PINTYPE, struct pinTypeStruct> g_pinTypes
Initial value:
= {
{ ELECTRICAL_PINTYPE::PT_BIDI, { _( "Bidirectional" ), BITMAPS::pintype_bidi } },
}
@ pintype_notspecif
@ pintype_bidi
@ pintype_passive
@ pintype_output
@ pintype_opencoll
@ pintype_powerinput
@ pintype_noconnect
@ pintype_poweroutput
@ pintype_input
@ pintype_3states
@ pintype_openemit
#define _(s)
@ PT_INPUT
usual pin input: must be connected
@ PT_NC
not connected (must be left open)
@ PT_OUTPUT
usual output
@ 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

Definition at line 50 of file pin_type.cpp.

Referenced by ElectricalPinTypeGetBitmap(), and ElectricalPinTypeGetText().

◆ g_pinTypesLanguage

int g_pinTypesLanguage = wxLANGUAGE_UNKNOWN

Definition at line 66 of file pin_type.cpp.

Referenced by ElectricalPinTypeGetText().

◆ g_shapeIcons

std::vector<BITMAPS> g_shapeIcons
static

Definition at line 36 of file pin_type.cpp.

Referenced by InitTables(), and PinShapeIcons().

◆ g_shapeNames

wxArrayString g_shapeNames
static

Definition at line 37 of file pin_type.cpp.

Referenced by InitTables(), and PinShapeNames().

◆ g_typeIcons

std::vector<BITMAPS> g_typeIcons
static

Definition at line 33 of file pin_type.cpp.

Referenced by InitTables(), and PinTypeIcons().

◆ g_typeNames

wxArrayString g_typeNames
static

Definition at line 34 of file pin_type.cpp.

Referenced by InitTables(), and PinTypeNames().

◆ iconsPinsOrientations

const BITMAPS iconsPinsOrientations[]
static
Initial value:

Definition at line 102 of file pin_type.cpp.

Referenced by InitTables().

◆ pin_orientation_codes

const int pin_orientation_codes[]
static
Initial value:
=
{
}
@ PIN_LEFT
Definition: lib_pin.h:46
@ PIN_RIGHT
Definition: lib_pin.h:45
@ PIN_UP
Definition: lib_pin.h:47
@ PIN_DOWN
Definition: lib_pin.h:48

Definition at line 91 of file pin_type.cpp.

Referenced by PinOrientationCode(), and PinOrientationIndex().

◆ pinShapes

const std::map<GRAPHIC_PINSHAPE, struct pinShapeStruct> pinShapes
Initial value:
= {
}
@ pinshape_invert
@ pinshape_clock_active_low
@ pinshape_clock_normal
@ pinshape_nonlogic
@ pinshape_clock_invert
@ pinshape_active_low_input
@ pinshape_normal
@ pinshape_active_low_output
@ pinshape_clock_fall

Definition at line 77 of file pin_type.cpp.

Referenced by PinShapeGetBitmap(), and PinShapeGetText().