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.

Enumerations

enum  GRAPHIC_PINSHAPE {
  PINSHAPE_LINE, PINSHAPE_INVERTED, PINSHAPE_CLOCK, PINSHAPE_INVERTED_CLOCK,
  PINSHAPE_INPUT_LOW, PINSHAPE_CLOCK_LOW, PINSHAPE_OUTPUT_LOW, PINSHAPE_FALLING_EDGE_CLOCK,
  PINSHAPE_NONLOGIC
}
 
enum  { PINSHAPE_COUNT = PINSHAPE_NONLOGIC + 1 }
 

Functions

wxString GetText (GRAPHIC_PINSHAPE shape)
 
BITMAP_DEF GetBitmap (GRAPHIC_PINSHAPE shape)
 

Detailed Description

Pin shape handling.

Definition in file pin_shape.h.

Enumeration Type Documentation

anonymous enum
Enumerator
PINSHAPE_COUNT 

Definition at line 48 of file pin_shape.h.

Enumerator
PINSHAPE_LINE 
PINSHAPE_INVERTED 
PINSHAPE_CLOCK 
PINSHAPE_INVERTED_CLOCK 
PINSHAPE_INPUT_LOW 
PINSHAPE_CLOCK_LOW 
PINSHAPE_OUTPUT_LOW 
PINSHAPE_FALLING_EDGE_CLOCK 
PINSHAPE_NONLOGIC 

Definition at line 35 of file pin_shape.h.

Function Documentation

BITMAP_DEF GetBitmap ( GRAPHIC_PINSHAPE  shape)

Definition at line 70 of file pin_shape.cpp.

References PINSHAPE_CLOCK, PINSHAPE_CLOCK_LOW, PINSHAPE_FALLING_EDGE_CLOCK, PINSHAPE_INPUT_LOW, PINSHAPE_INVERTED, PINSHAPE_INVERTED_CLOCK, PINSHAPE_LINE, PINSHAPE_NONLOGIC, and PINSHAPE_OUTPUT_LOW.

Referenced by COMPONENT_TREE::COMPONENT_TREE(), LIB_PIN::GetMenuImage(), DIALOG_LIB_EDIT_PIN_TABLE::DataViewModel::Pin::GetValue(), PinShapeComboBox::PinShapeComboBox(), PinTypeComboBox::PinTypeComboBox(), WIZARD_3DSHAPE_LIBS_DOWNLOADER_BASE::WIZARD_3DSHAPE_LIBS_DOWNLOADER_BASE(), and WIZARD_FPLIB_TABLE_BASE::WIZARD_FPLIB_TABLE_BASE().

71 {
72  switch( shape )
73  {
74  case PINSHAPE_LINE:
75  return pinshape_normal_xpm;
76 
77  case PINSHAPE_INVERTED:
78  return pinshape_invert_xpm;
79 
80  case PINSHAPE_CLOCK:
81  return pinshape_clock_normal_xpm;
82 
84  return pinshape_clock_invert_xpm;
85 
86  case PINSHAPE_INPUT_LOW:
87  return pinshape_active_low_input_xpm;
88 
89  case PINSHAPE_CLOCK_LOW:
90  return pinshape_clock_active_low_xpm;
91 
93  return pinshape_active_low_output_xpm;
94 
96  return pinshape_clock_fall_xpm;
97 
98  case PINSHAPE_NONLOGIC:
99  return pinshape_nonlogic_xpm;
100  }
101 
102  assert( !"Invalid pin shape" );
103  return 0;
104 };
wxString GetText ( GRAPHIC_PINSHAPE  shape)

Definition at line 33 of file pin_shape.cpp.

References PINSHAPE_CLOCK, PINSHAPE_CLOCK_LOW, PINSHAPE_FALLING_EDGE_CLOCK, PINSHAPE_INPUT_LOW, PINSHAPE_INVERTED, PINSHAPE_INVERTED_CLOCK, PINSHAPE_LINE, PINSHAPE_NONLOGIC, and PINSHAPE_OUTPUT_LOW.

Referenced by DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::deleteFieldButtonHandler(), Diagnose(), DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::EditSpiceModel(), LIB_PIN::GetElectricalTypeName(), LIB_PIN::getMsgPanelInfoBase(), SCH_SHEET::GetNetListItem(), SCH_COMPONENT::GetRef(), LIB_PIN::GetSelectMenuText(), SCH_COMPONENT::Load(), NETLIST_EXPORTER_GENERIC::makeLibParts(), DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::OnOKButtonClick(), DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnOKButtonClick(), PinShapeComboBox::PinShapeComboBox(), PinTypeComboBox::PinTypeComboBox(), SCH_COMPONENT::Save(), LIB_PART::Save(), and NETLIST_EXPORTER_PSPICE::UpdateDirectives().

34 {
35  switch( shape )
36  {
37  case PINSHAPE_LINE:
38  return _( "Line" );
39 
40  case PINSHAPE_INVERTED:
41  return _( "Inverted" );
42 
43  case PINSHAPE_CLOCK:
44  return _( "Clock" );
45 
47  return _( "Inverted clock" );
48 
49  case PINSHAPE_INPUT_LOW:
50  return _( "Input low" );
51 
52  case PINSHAPE_CLOCK_LOW:
53  return _( "Clock low" );
54 
56  return _( "Output low" );
57 
59  return _( "Falling edge clock" );
60 
61  case PINSHAPE_NONLOGIC:
62  return _( "NonLogic" );
63  }
64 
65  assert( !"Invalid pin shape" );
66  return wxT( "?" );
67 }