KiCad PCB EDA Suite
pin_shape.h File Reference

Pin shape handling. More...

#include <wx/string.h>
#include <bitmaps.h>

Go to the source code of this file.

Macros

#define GRAPHIC_PINSHAPES_TOTAL   ( static_cast<int>( GRAPHIC_PINSHAPE::LAST_OPTION ) + 1 )
 

Enumerations

enum  GRAPHIC_PINSHAPE {
  GRAPHIC_PINSHAPE::LINE, GRAPHIC_PINSHAPE::INVERTED, GRAPHIC_PINSHAPE::CLOCK, GRAPHIC_PINSHAPE::INVERTED_CLOCK,
  GRAPHIC_PINSHAPE::INPUT_LOW, GRAPHIC_PINSHAPE::CLOCK_LOW, GRAPHIC_PINSHAPE::OUTPUT_LOW, GRAPHIC_PINSHAPE::FALLING_EDGE_CLOCK,
  GRAPHIC_PINSHAPE::NONLOGIC, GRAPHIC_PINSHAPE::LAST_OPTION = NONLOGIC
}
 

Functions

wxString PinShapeGetText (GRAPHIC_PINSHAPE shape)
 
BITMAP_DEF PinShapeGetBitmap (GRAPHIC_PINSHAPE shape)
 

Detailed Description

Pin shape handling.

Definition in file pin_shape.h.

Macro Definition Documentation

◆ GRAPHIC_PINSHAPES_TOTAL

#define GRAPHIC_PINSHAPES_TOTAL   ( static_cast<int>( GRAPHIC_PINSHAPE::LAST_OPTION ) + 1 )

Definition at line 50 of file pin_shape.h.

Enumeration Type Documentation

◆ GRAPHIC_PINSHAPE

enum GRAPHIC_PINSHAPE
strong
Enumerator
LINE 
INVERTED 
CLOCK 
INVERTED_CLOCK 
INPUT_LOW 
CLOCK_LOW 
OUTPUT_LOW 
FALLING_EDGE_CLOCK 
NONLOGIC 
LAST_OPTION 

this is the sentinel value, must be set to last enum value

Definition at line 35 of file pin_shape.h.

Function Documentation

◆ PinShapeGetBitmap()

BITMAP_DEF PinShapeGetBitmap ( GRAPHIC_PINSHAPE  shape)

Definition at line 68 of file pin_shape.cpp.

69 {
70  auto findIt = pinShapes.find( aShape );
71 
72  wxCHECK_MSG( findIt != pinShapes.end(), nullptr, "Could not find pinshape in lookup map" );
73 
74  return findIt->second.bitmap;
75 }
const std::map< GRAPHIC_PINSHAPE, struct pinShapeStruct > pinShapes
Definition: pin_shape.cpp:44

References pinShapes.

Referenced by DIALOG_LIB_EDIT_PIN_TABLE::DIALOG_LIB_EDIT_PIN_TABLE(), and PinShapeComboBox::PinShapeComboBox().

◆ PinShapeGetText()

wxString PinShapeGetText ( GRAPHIC_PINSHAPE  shape)

Definition at line 58 of file pin_shape.cpp.

59 {
60  auto findIt = pinShapes.find( aShape );
61 
62  wxCHECK_MSG( findIt != pinShapes.end(), wxT( "?" ), "Could not find pinshape in lookup map" );
63 
64  return findIt->second.name;
65 }
const std::map< GRAPHIC_PINSHAPE, struct pinShapeStruct > pinShapes
Definition: pin_shape.cpp:44

References pinShapes.

Referenced by DIALOG_LIB_EDIT_PIN_TABLE::DIALOG_LIB_EDIT_PIN_TABLE(), LIB_PIN::getMsgPanelInfoBase(), LIB_PIN::GetSelectMenuText(), and PinShapeComboBox::PinShapeComboBox().