KiCad PCB EDA Suite
dialog_layers_select_to_pcb.cpp File Reference
#include <X2_gerber_attributes.h>
#include <gerber_file_image.h>
#include <gerber_file_image_list.h>
#include <gerbview.h>
#include <gerbview_frame.h>
#include <gerbview_id.h>
#include <gerbview_settings.h>
#include <kiface_i.h>
#include <layers_id_colors_and_visibility.h>
#include <dialogs/dialog_layers_select_to_pcb.h>
#include <wx/msgdlg.h>

Go to the source code of this file.

Enumerations

enum  swap_layer_id { ID_LAYERS_MAP_DIALOG = ID_GERBER_END_LIST, ID_BUTTON_0, ID_TEXT_0 = ID_BUTTON_0 + GERBER_DRAWLAYERS_COUNT }
 

Functions

const wxString GetPCBDefaultLayerName (LAYER_NUM aLayerNumber)
 
 EVT_COMMAND_RANGE (ID_BUTTON_0, ID_BUTTON_0+GERBER_DRAWLAYERS_COUNT-1, wxEVT_COMMAND_BUTTON_CLICKED, LAYERS_MAP_DIALOG::OnSelectLayer) LAYERS_MAP_DIALOG
 

Enumeration Type Documentation

◆ swap_layer_id

Function Documentation

◆ EVT_COMMAND_RANGE()

EVT_COMMAND_RANGE ( ID_BUTTON_0  ,
ID_BUTTON_0+GERBER_DRAWLAYERS_COUNT 1,
wxEVT_COMMAND_BUTTON_CLICKED  ,
LAYERS_MAP_DIALOG::OnSelectLayer   
)

Definition at line 63 of file dialog_layers_select_to_pcb.cpp.

69  :
70  LAYERS_MAP_DIALOG_BASE( parent )
71 {
72  m_Parent = parent;
73  initDialog();
74 
75  // Resize the dialog
76  Layout();
77  GetSizer()->SetSizeHints( this );
78  Centre();
79 }
Class LAYERS_MAP_DIALOG_BASE.

◆ GetPCBDefaultLayerName()

const wxString GetPCBDefaultLayerName ( LAYER_NUM  aLayerNumber)

Definition at line 219 of file dialog_select_one_pcb_layer.cpp.

220 {
221  const wxChar* txt;
222 
223  // using a switch to explicitly show the mapping more clearly
224  switch( aLayerId )
225  {
226  case F_Cu: txt = wxT( "F.Cu" ); break;
227  case In1_Cu: txt = wxT( "In1.Cu" ); break;
228  case In2_Cu: txt = wxT( "In2.Cu" ); break;
229  case In3_Cu: txt = wxT( "In3.Cu" ); break;
230  case In4_Cu: txt = wxT( "In4.Cu" ); break;
231  case In5_Cu: txt = wxT( "In5.Cu" ); break;
232  case In6_Cu: txt = wxT( "In6.Cu" ); break;
233  case In7_Cu: txt = wxT( "In7.Cu" ); break;
234  case In8_Cu: txt = wxT( "In8.Cu" ); break;
235  case In9_Cu: txt = wxT( "In9.Cu" ); break;
236  case In10_Cu: txt = wxT( "In10.Cu" ); break;
237  case In11_Cu: txt = wxT( "In11.Cu" ); break;
238  case In12_Cu: txt = wxT( "In12.Cu" ); break;
239  case In13_Cu: txt = wxT( "In13.Cu" ); break;
240  case In14_Cu: txt = wxT( "In14.Cu" ); break;
241  case In15_Cu: txt = wxT( "In15.Cu" ); break;
242  case In16_Cu: txt = wxT( "In16.Cu" ); break;
243  case In17_Cu: txt = wxT( "In17.Cu" ); break;
244  case In18_Cu: txt = wxT( "In18.Cu" ); break;
245  case In19_Cu: txt = wxT( "In19.Cu" ); break;
246  case In20_Cu: txt = wxT( "In20.Cu" ); break;
247  case In21_Cu: txt = wxT( "In21.Cu" ); break;
248  case In22_Cu: txt = wxT( "In22.Cu" ); break;
249  case In23_Cu: txt = wxT( "In23.Cu" ); break;
250  case In24_Cu: txt = wxT( "In24.Cu" ); break;
251  case In25_Cu: txt = wxT( "In25.Cu" ); break;
252  case In26_Cu: txt = wxT( "In26.Cu" ); break;
253  case In27_Cu: txt = wxT( "In27.Cu" ); break;
254  case In28_Cu: txt = wxT( "In28.Cu" ); break;
255  case In29_Cu: txt = wxT( "In29.Cu" ); break;
256  case In30_Cu: txt = wxT( "In30.Cu" ); break;
257  case B_Cu: txt = wxT( "B.Cu" ); break;
258 
259  // Technicals
260  case B_Adhes: txt = wxT( "B.Adhes" ); break;
261  case F_Adhes: txt = wxT( "F.Adhes" ); break;
262  case B_Paste: txt = wxT( "B.Paste" ); break;
263  case F_Paste: txt = wxT( "F.Paste" ); break;
264  case B_SilkS: txt = wxT( "B.SilkS" ); break;
265  case F_SilkS: txt = wxT( "F.SilkS" ); break;
266  case B_Mask: txt = wxT( "B.Mask" ); break;
267  case F_Mask: txt = wxT( "F.Mask" ); break;
268 
269  // Users
270  case Dwgs_User: txt = wxT( "Dwgs.User" ); break;
271  case Cmts_User: txt = wxT( "Cmts.User" ); break;
272  case Eco1_User: txt = wxT( "Eco1.User" ); break;
273  case Eco2_User: txt = wxT( "Eco2.User" ); break;
274  case Edge_Cuts: txt = wxT( "Edge.Cuts" ); break;
275 
276  // Pcbnew knows some other layers, but any other layer is not suitable for export.
277 
278  default: // Sentinel
279  txt = wxT( "" ); break;
280  }
281 
282  return wxString( txt );
283 }

Referenced by LAYERS_MAP_DIALOG::initDialog(), LAYERS_MAP_DIALOG::OnGetSetup(), and LAYERS_MAP_DIALOG::OnSelectLayer().