KiCad PCB EDA Suite
panel_setup_layers.cpp File Reference
#include <confirm.h>
#include <core/arraydim.h>
#include <core/kicad_algo.h>
#include <pcbnew.h>
#include <pcb_edit_frame.h>
#include <board.h>
#include <collectors.h>
#include <panel_setup_layers.h>
#include <board_stackup_manager/panel_board_stackup.h>
#include <wx/choicdlg.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)
 

Macro Definition Documentation

◆ HIDE_INACTIVE_LAYERS

#define HIDE_INACTIVE_LAYERS

Definition at line 44 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 47 of file panel_setup_layers.cpp.

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

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, Margin, User_1, User_2, User_3, User_4, User_5, User_6, User_7, User_8, and User_9.

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 608 of file panel_setup_layers.cpp.

609 {
610  for( unsigned i=0; i<chars.Len(); ++i )
611  {
612  if( str.Find( chars[i] ) != wxNOT_FOUND )
613  return true;
614  }
615 
616  return false;
617 }

Referenced by PANEL_SETUP_LAYERS::testLayerNames().