KiCad PCB EDA Suite
Loading...
Searching...
No Matches
pin_type.h
Go to the documentation of this file.
1/*
2 * This program source code file is part of KiCad, a free EDA CAD application.
3 *
4 * Copyright (C) 2004-2021 KiCad Developers, see change_log.txt for contributors.
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, you may find one here:
18 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
19 * or you may search the http://www.gnu.org website for the version 2 license,
20 * or you may write to the Free Software Foundation, Inc.,
21 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
22 */
23
24#ifndef PIN_TYPE_H_
25#define PIN_TYPE_H_
26
27#include <wx/arrstr.h>
28#include <vector>
29
30enum class BITMAPS : unsigned int;
31
36{
37 PT_INPUT,
38 PT_OUTPUT,
39 PT_BIDI,
42 PT_NIC,
48 PT_NC,
49
52};
53
54#define ELECTRICAL_PINTYPES_TOTAL ( static_cast<int>( ELECTRICAL_PINTYPE::PT_LAST_OPTION ) + 1 )
55
57{
58 LINE,
60 CLOCK,
67
70};
71
72#define GRAPHIC_PINSHAPES_TOTAL ( static_cast<int>( GRAPHIC_PINSHAPE::LAST_OPTION ) + 1 )
73
78{
98 PIN_UP,
105 PIN_DOWN,
106 INHERIT
107};
108
109
110// UI
111
112wxString PinShapeGetText( GRAPHIC_PINSHAPE shape );
114
117
118wxString PinOrientationName( PIN_ORIENTATION aOrientation );
120PIN_ORIENTATION PinOrientationCode( size_t index );
122
123const wxArrayString& PinTypeNames();
124const std::vector<BITMAPS>& PinTypeIcons();
125
126const wxArrayString& PinShapeNames();
127const std::vector<BITMAPS>& PinShapeIcons();
128
129const wxArrayString& PinOrientationNames();
130const std::vector<BITMAPS>& PinOrientationIcons();
131
132#endif
BITMAPS
A list of all bitmap identifiers.
Definition: bitmaps_list.h:33
const std::vector< BITMAPS > & PinTypeIcons()
Definition: pin_type.cpp:162
wxString PinShapeGetText(GRAPHIC_PINSHAPE shape)
Definition: pin_type.cpp:233
ELECTRICAL_PINTYPE
The symbol library pin object electrical types used in ERC tests.
Definition: pin_type.h:36
@ PT_INPUT
usual pin input: must be connected
@ PT_NC
not connected (must be left open)
@ PT_LAST_OPTION
sentinel value, set to last usable enum option
@ 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
const wxArrayString & PinTypeNames()
Definition: pin_type.cpp:153
BITMAPS ElectricalPinTypeGetBitmap(ELECTRICAL_PINTYPE)
Definition: pin_type.cpp:220
int PinOrientationIndex(PIN_ORIENTATION code)
Definition: pin_type.cpp:70
BITMAPS PinShapeGetBitmap(GRAPHIC_PINSHAPE shape)
Definition: pin_type.cpp:246
wxString ElectricalPinTypeGetText(ELECTRICAL_PINTYPE)
Definition: pin_type.cpp:207
const wxArrayString & PinShapeNames()
Definition: pin_type.cpp:171
const std::vector< BITMAPS > & PinShapeIcons()
Definition: pin_type.cpp:180
const wxArrayString & PinOrientationNames()
Definition: pin_type.cpp:189
wxString PinOrientationName(PIN_ORIENTATION aOrientation)
Definition: pin_type.cpp:259
BITMAPS PinOrientationGetBitmap(PIN_ORIENTATION aOrientation)
Definition: pin_type.cpp:272
PIN_ORIENTATION
The symbol library pin object orientations.
Definition: pin_type.h:78
@ 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.
PIN_ORIENTATION PinOrientationCode(size_t index)
Definition: pin_type.cpp:63
const std::vector< BITMAPS > & PinOrientationIcons()
Definition: pin_type.cpp:198
GRAPHIC_PINSHAPE
Definition: pin_type.h:57
@ LAST_OPTION
this is the sentinel value, must be set to last enum value