KiCad PCB EDA Suite
layer_id.cpp File Reference
#include <layers_id_colors_and_visibility.h>
#include <wx/wx.h>

Go to the source code of this file.

Functions

wxString LayerName (int aLayer)
 Returns the string equivalent of a given layer. More...
 

Function Documentation

◆ LayerName()

wxString LayerName ( int  aLayer)

Returns the string equivalent of a given layer.

Parameters
aLayeris a valid layer ID

Definition at line 24 of file layer_id.cpp.

25 {
26  switch( aLayer )
27  {
28  // SCH_LAYER_ID
29 
30  case LAYER_WIRE:
31  return _( "Wire" );
32 
33  case LAYER_BUS:
34  return _( "Bus" );
35 
36  case LAYER_BUS_JUNCTION:
37  return _( "Bus Junction" );
38 
39  case LAYER_JUNCTION:
40  return _( "Junction" );
41 
42  case LAYER_LOCLABEL:
43  return _( "Label" );
44 
45  case LAYER_GLOBLABEL:
46  return _( "Global label" );
47 
48  case LAYER_HIERLABEL:
49  return _( "Hierarchical label" );
50 
51  case LAYER_PINNUM:
52  return _( "Pin number" );
53 
54  case LAYER_PINNAM:
55  return _( "Pin name" );
56 
58  return _( "Symbol reference" );
59 
60  case LAYER_VALUEPART:
61  return _( "Symbol value" );
62 
63  case LAYER_FIELDS:
64  return _( "Symbol fields" );
65 
66  case LAYER_DEVICE:
67  return _( "Symbol body outline" );
68 
70  return _( "Symbol body fill" );
71 
72  case LAYER_NOTES:
73  return _( "Notes" );
74 
75  case LAYER_NETNAM:
76  return _( "Net name" );
77 
78  case LAYER_PIN:
79  return _( "Pin" );
80 
81  case LAYER_SHEET:
82  return _( "Sheet border" );
83 
85  return _( "Sheet background" );
86 
87  case LAYER_SHEETNAME:
88  return _( "Sheet name" );
89 
90  case LAYER_SHEETFIELDS:
91  return _( "Sheet fields" );
92 
94  return _( "Sheet file name" );
95 
96  case LAYER_SHEETLABEL:
97  return _( "Sheet label" );
98 
99  case LAYER_NOCONNECT:
100  return _( "No connect symbol" );
101 
102  case LAYER_ERC_WARN:
103  return _( "ERC warning" );
104 
105  case LAYER_ERC_ERR:
106  return _( "ERC error" );
107 
109  return _( "Grid" );
110 
112  return _( "Axes" );
113 
115  return _( "Background" );
116 
118  return _( "Cursor" );
119 
120  case LAYER_BRIGHTENED:
121  return _( "Highlighted items" );
122 
123  case LAYER_HIDDEN:
124  return _( "Hidden item" );
125 
127  return _( "Selection highlight" );
128 
130  return _( "Worksheet" );
131 
132  // GAL_LAYER_ID
133 
134  case LAYER_MOD_FR:
135  return _( "Footprints Front" );
136 
137  case LAYER_MOD_BK:
138  return _( "Footprints Back" );
139 
140  case LAYER_MOD_VALUES:
141  return _( "Values" );
142 
144  return _( "Reference Designators" );
145 
146  case LAYER_MOD_TEXT_FR:
147  return _( "Footprint Text Front" );
148 
149  case LAYER_MOD_TEXT_BK:
150  return _( "Footprint Text Back" );
151 
153  return _( "Hidden Text" );
154 
155  case LAYER_PAD_FR:
156  return _( "Pads Front" );
157 
158  case LAYER_PAD_BK:
159  return _( "Pads Back" );
160 
161  case LAYER_PADS_TH:
162  return _( "Through Hole Pads" );
163 
164  case LAYER_TRACKS:
165  return _( "Tracks" );
166 
167  case LAYER_VIA_THROUGH:
168  return _( "Through Via" );
169 
170  case LAYER_VIA_BBLIND:
171  return _( "Bl/Buried Via" );
172 
173  case LAYER_VIA_MICROVIA:
174  return _( "Micro Via" );
175 
177  return _( "Non Plated Holes" );
178 
179  case LAYER_RATSNEST:
180  return _( "Ratsnest" );
181 
182  case LAYER_NO_CONNECTS:
183  return _( "No-Connects" );
184 
185  case LAYER_DRC_WARNING:
186  return _( "DRC Warnings" );
187 
188  case LAYER_DRC_ERROR:
189  return _( "DRC Errors" );
190 
191  case LAYER_DRC_EXCLUSION:
192  return _( "DRC Exclusions" );
193 
194  case LAYER_ANCHOR:
195  return _( "Anchors" );
196 
197  case LAYER_WORKSHEET:
198  return _( "Worksheet" );
199 
200  case LAYER_CURSOR:
201  return _( "Cursor" );
202 
203  case LAYER_AUX_ITEMS:
204  return _( "Helper items" );
205 
206  case LAYER_GRID:
207  return _( "Grid" );
208 
210  return _( "Background" );
211 
213  return _( "Selection highlight" );
214 
215  default:
216 #if DEBUG
217  wxString str;
218  str.Printf( "Unknown: ID %d", aLayer );
219  return str;
220 #else
221  return wxEmptyString;
222 #endif
223  }
224 }
to draw blind/buried vias
show a marker on pads with no nets
multilayer pads, usually with holes
handle color for not plated holes (holes, not pads)
anchor of items having an anchor point (texts, footprints)
show modules values (when texts are visibles)
show modules on front
Auxiliary items (guides, rule, etc)
to draw usual through hole vias
layer for drc markers which have been individually excluded
layer for drc markers with SEVERITY_WARNING
smd pads, front layer
#define _(s)
Definition: 3d_actions.cpp:33
currently selected items overlay
show modules references (when texts are visibles)
layer for drc markers with SEVERITY_ERROR

References _, LAYER_ANCHOR, LAYER_AUX_ITEMS, LAYER_BRIGHTENED, LAYER_BUS, LAYER_BUS_JUNCTION, LAYER_CURSOR, LAYER_DEVICE, LAYER_DEVICE_BACKGROUND, LAYER_DRC_ERROR, LAYER_DRC_EXCLUSION, LAYER_DRC_WARNING, LAYER_ERC_ERR, LAYER_ERC_WARN, LAYER_FIELDS, LAYER_GLOBLABEL, LAYER_GRID, LAYER_HIDDEN, LAYER_HIERLABEL, LAYER_JUNCTION, LAYER_LOCLABEL, LAYER_MOD_BK, LAYER_MOD_FR, LAYER_MOD_REFERENCES, LAYER_MOD_TEXT_BK, LAYER_MOD_TEXT_FR, LAYER_MOD_TEXT_INVISIBLE, LAYER_MOD_VALUES, LAYER_NETNAM, LAYER_NO_CONNECTS, LAYER_NOCONNECT, LAYER_NON_PLATEDHOLES, LAYER_NOTES, LAYER_PAD_BK, LAYER_PAD_FR, LAYER_PADS_TH, LAYER_PCB_BACKGROUND, LAYER_PIN, LAYER_PINNAM, LAYER_PINNUM, LAYER_RATSNEST, LAYER_REFERENCEPART, LAYER_SCHEMATIC_BACKGROUND, LAYER_SCHEMATIC_CURSOR, LAYER_SCHEMATIC_GRID, LAYER_SCHEMATIC_GRID_AXES, LAYER_SCHEMATIC_WORKSHEET, LAYER_SELECT_OVERLAY, LAYER_SELECTION_SHADOWS, LAYER_SHEET, LAYER_SHEET_BACKGROUND, LAYER_SHEETFIELDS, LAYER_SHEETFILENAME, LAYER_SHEETLABEL, LAYER_SHEETNAME, LAYER_TRACKS, LAYER_VALUEPART, LAYER_VIA_BBLIND, LAYER_VIA_MICROVIA, LAYER_VIA_THROUGH, LAYER_WIRE, and LAYER_WORKSHEET.

Referenced by PANEL_MODEDIT_COLOR_SETTINGS::createSwatches(), PANEL_PCBNEW_COLOR_SETTINGS::createSwatches(), and PANEL_EESCHEMA_COLOR_SETTINGS::createSwatches().