KiCad PCB EDA Suite
stackup_predefined_prms.cpp File Reference

Go to the source code of this file.

Functions

wxArrayString GetCopperFinishStandardList (bool aTranslate)
 
const FAB_LAYER_COLORGetColorStandardList ()
 
int GetColorStandardListCount ()
 
int GetColorUserDefinedListIdx ()
 

Variables

static wxString CopperFinishType []
 
static FAB_LAYER_COLOR solderMaskColors []
 

Function Documentation

◆ GetColorStandardList()

◆ GetColorStandardListCount()

int GetColorStandardListCount ( )
Returns
the count of colors in ColorStandardList

Definition at line 97 of file stackup_predefined_prms.cpp.

98 {
99  return arrayDim( solderMaskColors );
100 }
constexpr std::size_t arrayDim(T const (&)[N]) noexcept
Definition: macros.h:160
static FAB_LAYER_COLOR solderMaskColors[]

References arrayDim(), and solderMaskColors.

Referenced by PANEL_SETUP_BOARD_STACKUP::createBmComboBox(), PANEL_SETUP_BOARD_STACKUP::createRowData(), GetColorUserDefinedListIdx(), PANEL_SETUP_BOARD_STACKUP::onColorSelected(), EDA_3D_VIEWER::SynchroniseColoursWithBoard(), and PANEL_SETUP_BOARD_STACKUP::synchronizeWithBoard().

◆ GetColorUserDefinedListIdx()

int GetColorUserDefinedListIdx ( )
Returns
the index of the user defined color in ColorStandardList

Definition at line 103 of file stackup_predefined_prms.cpp.

104 {
105  // this is the last item in list
106  return GetColorStandardListCount() - 1;
107 }
int GetColorStandardListCount()

References GetColorStandardListCount().

Referenced by PANEL_SETUP_BOARD_STACKUP::createRowData(), PANEL_SETUP_BOARD_STACKUP::GetSelectedColor(), PANEL_SETUP_BOARD_STACKUP::onColorSelected(), PANEL_SETUP_BOARD_STACKUP::synchronizeWithBoard(), and PANEL_SETUP_BOARD_STACKUP::transferDataFromUIToStackup().

◆ GetCopperFinishStandardList()

wxArrayString GetCopperFinishStandardList ( bool  aTranslate)
Returns
a wxArray of standard copper finish names.
Parameters
aTranslate= false for the initial names, true for translated names

Definition at line 80 of file stackup_predefined_prms.cpp.

81 {
82  wxArrayString list;
83 
84  for( unsigned ii = 0; ii < arrayDim( CopperFinishType ); ii++ )
85  list.Add( aTranslate ? wxGetTranslation( CopperFinishType[ii] ) : CopperFinishType[ii] );
86 
87  return list;
88 }
constexpr std::size_t arrayDim(T const (&)[N]) noexcept
Definition: macros.h:160
static wxString CopperFinishType[]

References arrayDim(), and CopperFinishType.

Referenced by PANEL_SETUP_BOARD_STACKUP::buildLayerStackPanel(), PANEL_SETUP_BOARD_STACKUP::synchronizeWithBoard(), and PANEL_SETUP_BOARD_STACKUP::transferDataFromUIToStackup().

Variable Documentation

◆ CopperFinishType

wxString CopperFinishType[]
static
Initial value:
=
{
_HKI("ENIG"),
_HKI("ENEPIG"),
_HKI("HAL SnPb"),
_HKI("HAL lead-free"),
_HKI("Hard gold"),
_HKI("Immersion tin"),
_HKI("Immersion nickel"),
_HKI("Immersion silver"),
_HKI("Immersion gold"),
_HKI("HT_OSP"),
_HKI("OSP"),
_HKI("None"),
_HKI("User defined")
}
wxString NotSpecifiedPrm()
#define _HKI(x)

Definition at line 42 of file stackup_predefined_prms.cpp.

Referenced by GetCopperFinishStandardList().

◆ solderMaskColors

FAB_LAYER_COLOR solderMaskColors[]
static
Initial value:
=
{
{ NotSpecifiedPrm(), wxColor( 80, 80, 80 ) },
{ _HKI( "Green" ), wxColor( 60, 150, 80 ) },
{ _HKI( "Red" ), wxColor( 128, 0, 0 ) },
{ _HKI( "Blue" ), wxColor( 0, 0, 128 ) },
{ _HKI( "Black" ), wxColor( 20, 20, 20 ) },
{ _HKI( "White" ), wxColor( 200, 200, 200 ) },
{ _HKI( "Yellow" ), wxColor( 128, 128, 0 ) },
{ _HKI( "User defined" ), wxColor( 128, 128, 128 ) }
}
wxString NotSpecifiedPrm()
#define _HKI(x)

Definition at line 67 of file stackup_predefined_prms.cpp.

Referenced by GetColorStandardList(), and GetColorStandardListCount().