KiCad PCB EDA Suite
panel_setup_layers.cpp File Reference
#include <fctsys.h>
#include <macros.h>
#include <confirm.h>
#include <pcbnew.h>
#include <pcb_edit_frame.h>
#include <class_board.h>
#include <collectors.h>
#include <panel_setup_layers.h>

Go to the source code of this file.

Macros

#define HIDE_INACTIVE_LAYERS
 
#define RETURN_COPPER(x)   return PANEL_SETUP_LAYERS_CTLs( x##Name, x##CheckBox, x##Choice )
 
#define RETURN_AUX(x)   return PANEL_SETUP_LAYERS_CTLs( x##Name, x##CheckBox, x##StaticText )
 

Functions

static LSEQ dlg_layers ()
 
static bool hasOneOf (const wxString &str, const wxString &chars)
 

Variables

static const LSET presets []
 

Macro Definition Documentation

◆ HIDE_INACTIVE_LAYERS

#define HIDE_INACTIVE_LAYERS

Definition at line 41 of file panel_setup_layers.cpp.

◆ RETURN_AUX

#define RETURN_AUX (   x)    return PANEL_SETUP_LAYERS_CTLs( x##Name, x##CheckBox, x##StaticText )

◆ RETURN_COPPER

#define RETURN_COPPER (   x)    return PANEL_SETUP_LAYERS_CTLs( x##Name, x##CheckBox, x##Choice )

Function Documentation

◆ dlg_layers()

static LSEQ dlg_layers ( )
static

Definition at line 44 of file panel_setup_layers.cpp.

45 {
46  // layers that are put out into the dialog UI, coordinate with wxformbuilder and
47  // getCTLs( LAYER_NUM aLayerNumber )
48  static const PCB_LAYER_ID layers[] = {
49  F_CrtYd,
50  F_Fab,
51  F_Adhes,
52  F_Paste,
53  F_SilkS,
54  F_Mask,
55  F_Cu,
56 
57  In1_Cu,
58  In2_Cu,
59  In3_Cu,
60  In4_Cu,
61  In5_Cu,
62  In6_Cu,
63  In7_Cu,
64  In8_Cu,
65  In9_Cu,
66  In10_Cu,
67  In11_Cu,
68  In12_Cu,
69  In13_Cu,
70  In14_Cu,
71  In15_Cu,
72 
73  In16_Cu,
74  In17_Cu,
75  In18_Cu,
76  In19_Cu,
77  In20_Cu,
78  In21_Cu,
79  In22_Cu,
80  In23_Cu,
81  In24_Cu,
82  In25_Cu,
83  In26_Cu,
84  In27_Cu,
85  In28_Cu,
86  In29_Cu,
87  In30_Cu,
88 
89  B_Cu,
90  B_Mask,
91  B_SilkS,
92  B_Paste,
93  B_Adhes,
94  B_Fab,
95  B_CrtYd,
96 
97  Edge_Cuts,
98  Margin,
99  Eco2_User,
100  Eco1_User,
101  Cmts_User,
102  Dwgs_User,
103  };
104 
105  return LSEQ( layers, layers + arrayDim( layers ) );
106 }
PCB_LAYER_ID
A quick note on layer IDs:
LSEQ is a sequence (and therefore also a set) of PCB_LAYER_IDs.
constexpr std::size_t arrayDim(T const (&)[N]) noexcept
Definition: macros.h:108

References arrayDim(), B_Adhes, B_CrtYd, B_Cu, B_Fab, B_Mask, B_Paste, B_SilkS, Cmts_User, Dwgs_User, Eco1_User, Eco2_User, Edge_Cuts, F_Adhes, F_CrtYd, F_Cu, F_Fab, F_Mask, F_Paste, F_SilkS, In10_Cu, In11_Cu, In12_Cu, In13_Cu, In14_Cu, In15_Cu, In16_Cu, In17_Cu, In18_Cu, In19_Cu, In1_Cu, In20_Cu, In21_Cu, In22_Cu, In23_Cu, In24_Cu, In25_Cu, In26_Cu, In27_Cu, In28_Cu, In29_Cu, In2_Cu, In30_Cu, In3_Cu, In4_Cu, In5_Cu, In6_Cu, In7_Cu, In8_Cu, In9_Cu, and Margin.

Referenced by PANEL_SETUP_LAYERS::GetUILayerMask(), PANEL_SETUP_LAYERS::showBoardLayerNames(), and PANEL_SETUP_LAYERS::showSelectedLayerCheckBoxes().

◆ hasOneOf()

static bool hasOneOf ( const wxString &  str,
const wxString &  chars 
)
static

Definition at line 597 of file panel_setup_layers.cpp.

598 {
599  for( unsigned i=0; i<chars.Len(); ++i )
600  {
601  if( str.Find( chars[i] ) != wxNOT_FOUND )
602  return true;
603  }
604 
605  return false;
606 }

Referenced by PANEL_SETUP_LAYERS::testLayerNames().

Variable Documentation

◆ presets

const LSET presets[]
static
Initial value:
=
{
LSET(),
LSET().set(),
}
static LSET BackTechMask()
Function BackTechMask returns a mask holding all technical layers (no CU layer) on back side.
Definition: lset.cpp:730
static LSET FrontTechMask()
Function FrontTechMask returns a mask holding all technical layers (no CU layer) on front side.
Definition: lset.cpp:742
LSET is a set of PCB_LAYER_IDs.
static LSET UserMask()
Definition: lset.cpp:770

Definition at line 110 of file panel_setup_layers.cpp.

Referenced by PANEL_SETUP_LAYERS::OnPresetsChoice(), and PANEL_SETUP_LAYERS::showPresets().