KiCad PCB EDA Suite
dialog_select_one_pcb_layer.cpp File Reference

Set up a dialog to choose a PCB Layer. More...

#include <gerbview_frame.h>
#include <dialogs/dialog_layers_select_to_pcb.h>
#include <wx/radiobox.h>

Go to the source code of this file.

Classes

class  SELECT_LAYER_DIALOG
 

Macros

#define NB_PCB_LAYERS   PCB_LAYER_ID_COUNT
 
#define FIRST_COPPER_LAYER   0
 
#define LAST_COPPER_LAYER   31
 

Enumerations

enum  layer_sel_id { ID_LAYER_SELECT_TOP = 1800 , ID_LAYER_SELECT_BOTTOM , ID_LAYER_SELECT }
 

Functions

const wxString GetPCBDefaultLayerName (int aLayerId)
 

Detailed Description

Set up a dialog to choose a PCB Layer.

Definition in file dialog_select_one_pcb_layer.cpp.

Macro Definition Documentation

◆ FIRST_COPPER_LAYER

#define FIRST_COPPER_LAYER   0

Definition at line 36 of file dialog_select_one_pcb_layer.cpp.

◆ LAST_COPPER_LAYER

#define LAST_COPPER_LAYER   31

Definition at line 37 of file dialog_select_one_pcb_layer.cpp.

◆ NB_PCB_LAYERS

#define NB_PCB_LAYERS   PCB_LAYER_ID_COUNT

Definition at line 35 of file dialog_select_one_pcb_layer.cpp.

Enumeration Type Documentation

◆ layer_sel_id

Enumerator
ID_LAYER_SELECT_TOP 
ID_LAYER_SELECT_BOTTOM 
ID_LAYER_SELECT 

Definition at line 43 of file dialog_select_one_pcb_layer.cpp.

Function Documentation

◆ GetPCBDefaultLayerName()

const wxString GetPCBDefaultLayerName ( int  aLayerId)

Definition at line 202 of file dialog_select_one_pcb_layer.cpp.

203{
204 const wxChar* txt;
205
206 // using a switch to explicitly show the mapping more clearly
207 switch( aLayerId )
208 {
209 case F_Cu: txt = wxT( "F.Cu" ); break;
210 case In1_Cu: txt = wxT( "In1.Cu" ); break;
211 case In2_Cu: txt = wxT( "In2.Cu" ); break;
212 case In3_Cu: txt = wxT( "In3.Cu" ); break;
213 case In4_Cu: txt = wxT( "In4.Cu" ); break;
214 case In5_Cu: txt = wxT( "In5.Cu" ); break;
215 case In6_Cu: txt = wxT( "In6.Cu" ); break;
216 case In7_Cu: txt = wxT( "In7.Cu" ); break;
217 case In8_Cu: txt = wxT( "In8.Cu" ); break;
218 case In9_Cu: txt = wxT( "In9.Cu" ); break;
219 case In10_Cu: txt = wxT( "In10.Cu" ); break;
220 case In11_Cu: txt = wxT( "In11.Cu" ); break;
221 case In12_Cu: txt = wxT( "In12.Cu" ); break;
222 case In13_Cu: txt = wxT( "In13.Cu" ); break;
223 case In14_Cu: txt = wxT( "In14.Cu" ); break;
224 case In15_Cu: txt = wxT( "In15.Cu" ); break;
225 case In16_Cu: txt = wxT( "In16.Cu" ); break;
226 case In17_Cu: txt = wxT( "In17.Cu" ); break;
227 case In18_Cu: txt = wxT( "In18.Cu" ); break;
228 case In19_Cu: txt = wxT( "In19.Cu" ); break;
229 case In20_Cu: txt = wxT( "In20.Cu" ); break;
230 case In21_Cu: txt = wxT( "In21.Cu" ); break;
231 case In22_Cu: txt = wxT( "In22.Cu" ); break;
232 case In23_Cu: txt = wxT( "In23.Cu" ); break;
233 case In24_Cu: txt = wxT( "In24.Cu" ); break;
234 case In25_Cu: txt = wxT( "In25.Cu" ); break;
235 case In26_Cu: txt = wxT( "In26.Cu" ); break;
236 case In27_Cu: txt = wxT( "In27.Cu" ); break;
237 case In28_Cu: txt = wxT( "In28.Cu" ); break;
238 case In29_Cu: txt = wxT( "In29.Cu" ); break;
239 case In30_Cu: txt = wxT( "In30.Cu" ); break;
240 case B_Cu: txt = wxT( "B.Cu" ); break;
241
242 // Technicals
243 case B_Adhes: txt = wxT( "B.Adhes" ); break;
244 case F_Adhes: txt = wxT( "F.Adhes" ); break;
245 case B_Paste: txt = wxT( "B.Paste" ); break;
246 case F_Paste: txt = wxT( "F.Paste" ); break;
247 case B_SilkS: txt = wxT( "B.SilkS" ); break;
248 case F_SilkS: txt = wxT( "F.SilkS" ); break;
249 case B_Mask: txt = wxT( "B.Mask" ); break;
250 case F_Mask: txt = wxT( "F.Mask" ); break;
251
252 // Users
253 case Dwgs_User: txt = wxT( "Dwgs.User" ); break;
254 case Cmts_User: txt = wxT( "Cmts.User" ); break;
255 case Eco1_User: txt = wxT( "Eco1.User" ); break;
256 case Eco2_User: txt = wxT( "Eco2.User" ); break;
257 case Edge_Cuts: txt = wxT( "Edge.Cuts" ); break;
258
259 // Pcbnew knows some other layers, but any other layer is not suitable for export.
260
261 default: // Sentinel
262 txt = wxT( "" ); break;
263 }
264
265 return wxString( txt );
266}
@ In22_Cu
Definition: layer_ids.h:86
@ In11_Cu
Definition: layer_ids.h:75
@ In29_Cu
Definition: layer_ids.h:93
@ In30_Cu
Definition: layer_ids.h:94
@ In17_Cu
Definition: layer_ids.h:81
@ B_Adhes
Definition: layer_ids.h:97
@ Edge_Cuts
Definition: layer_ids.h:113
@ Dwgs_User
Definition: layer_ids.h:109
@ F_Paste
Definition: layer_ids.h:101
@ In9_Cu
Definition: layer_ids.h:73
@ Cmts_User
Definition: layer_ids.h:110
@ In19_Cu
Definition: layer_ids.h:83
@ In7_Cu
Definition: layer_ids.h:71
@ In28_Cu
Definition: layer_ids.h:92
@ In26_Cu
Definition: layer_ids.h:90
@ F_Adhes
Definition: layer_ids.h:98
@ B_Mask
Definition: layer_ids.h:106
@ B_Cu
Definition: layer_ids.h:95
@ Eco1_User
Definition: layer_ids.h:111
@ F_Mask
Definition: layer_ids.h:107
@ In21_Cu
Definition: layer_ids.h:85
@ In23_Cu
Definition: layer_ids.h:87
@ B_Paste
Definition: layer_ids.h:100
@ In15_Cu
Definition: layer_ids.h:79
@ In2_Cu
Definition: layer_ids.h:66
@ In10_Cu
Definition: layer_ids.h:74
@ F_SilkS
Definition: layer_ids.h:104
@ In4_Cu
Definition: layer_ids.h:68
@ Eco2_User
Definition: layer_ids.h:112
@ In16_Cu
Definition: layer_ids.h:80
@ In24_Cu
Definition: layer_ids.h:88
@ In1_Cu
Definition: layer_ids.h:65
@ B_SilkS
Definition: layer_ids.h:103
@ In13_Cu
Definition: layer_ids.h:77
@ In8_Cu
Definition: layer_ids.h:72
@ In14_Cu
Definition: layer_ids.h:78
@ In12_Cu
Definition: layer_ids.h:76
@ In27_Cu
Definition: layer_ids.h:91
@ In6_Cu
Definition: layer_ids.h:70
@ In5_Cu
Definition: layer_ids.h:69
@ In3_Cu
Definition: layer_ids.h:67
@ In20_Cu
Definition: layer_ids.h:84
@ F_Cu
Definition: layer_ids.h:64
@ In18_Cu
Definition: layer_ids.h:82
@ In25_Cu
Definition: layer_ids.h:89

References B_Adhes, B_Cu, B_Mask, B_Paste, B_SilkS, Cmts_User, Dwgs_User, Eco1_User, Eco2_User, Edge_Cuts, F_Adhes, F_Cu, 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, and In9_Cu.

Referenced by GBR_TO_PCB_EXPORTER::export_non_copper_item(), GBR_TO_PCB_EXPORTER::export_via(), LAYERS_MAP_DIALOG::initDialog(), LAYERS_MAP_DIALOG::OnGetSetup(), LAYERS_MAP_DIALOG::OnSelectLayer(), SELECT_LAYER_DIALOG::SELECT_LAYER_DIALOG(), GBR_TO_PCB_EXPORTER::writeCopperLineItem(), GBR_TO_PCB_EXPORTER::writePcbFilledCircle(), GBR_TO_PCB_EXPORTER::writePcbHeader(), GBR_TO_PCB_EXPORTER::writePcbPolygon(), and GBR_TO_PCB_EXPORTER::writePcbZoneItem().