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>
#include <wx/treebook.h>
#include <eda_list_dialog.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 )
 
#define RETURN_MANDATORY(x)   return PANEL_SETUP_LAYERS_CTLs( x##Name, nullptr, 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 46 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 )

◆ RETURN_MANDATORY

#define RETURN_MANDATORY (   x)    return PANEL_SETUP_LAYERS_CTLs( x##Name, nullptr, x##StaticText )

Function Documentation

◆ dlg_layers()

static LSEQ dlg_layers ( )
static

Definition at line 49 of file panel_setup_layers.cpp.

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

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

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

Referenced by PANEL_SETUP_LAYERS::testLayerNames().