KiCad PCB EDA Suite
class_pcb_layer_box_selector.cpp File Reference

a derived class of LAYER_BOX_SELECTOR to handle the layer box selector in Pcbnew More...

#include <common.h>
#include <pcbnew.h>
#include <wxPcbStruct.h>
#include <class_board_design_settings.h>
#include <layers_id_colors_and_visibility.h>
#include <class_board.h>
#include <hotkeys.h>
#include <class_pcb_layer_box_selector.h>

Go to the source code of this file.

Functions

static int layer2hotkey_id (PCB_LAYER_ID aLayer)
 

Detailed Description

a derived class of LAYER_BOX_SELECTOR to handle the layer box selector in Pcbnew

Definition in file class_pcb_layer_box_selector.cpp.

Function Documentation

static int layer2hotkey_id ( PCB_LAYER_ID  aLayer)
static

Definition at line 43 of file class_pcb_layer_box_selector.cpp.

References B_Cu, F_Cu, HK_SWITCH_LAYER_TO_COMPONENT, HK_SWITCH_LAYER_TO_COPPER, HK_SWITCH_LAYER_TO_INNER1, HK_SWITCH_LAYER_TO_INNER10, HK_SWITCH_LAYER_TO_INNER11, HK_SWITCH_LAYER_TO_INNER12, HK_SWITCH_LAYER_TO_INNER13, HK_SWITCH_LAYER_TO_INNER14, HK_SWITCH_LAYER_TO_INNER2, HK_SWITCH_LAYER_TO_INNER3, HK_SWITCH_LAYER_TO_INNER4, HK_SWITCH_LAYER_TO_INNER5, HK_SWITCH_LAYER_TO_INNER6, HK_SWITCH_LAYER_TO_INNER7, HK_SWITCH_LAYER_TO_INNER8, HK_SWITCH_LAYER_TO_INNER9, In10_Cu, In11_Cu, In12_Cu, In13_Cu, In14_Cu, In1_Cu, In2_Cu, In3_Cu, In4_Cu, In5_Cu, In6_Cu, In7_Cu, In8_Cu, and In9_Cu.

Referenced by PCB_LAYER_BOX_SELECTOR::Resync().

44 {
45  switch( aLayer )
46  {
48 
49  case B_Cu: return HK_SWITCH_LAYER_TO_COPPER;
50 
51  case In1_Cu: return HK_SWITCH_LAYER_TO_INNER1;
52  case In2_Cu: return HK_SWITCH_LAYER_TO_INNER2;
53  case In3_Cu: return HK_SWITCH_LAYER_TO_INNER3;
54  case In4_Cu: return HK_SWITCH_LAYER_TO_INNER4;
55  case In5_Cu: return HK_SWITCH_LAYER_TO_INNER5;
56  case In6_Cu: return HK_SWITCH_LAYER_TO_INNER6;
57  case In7_Cu: return HK_SWITCH_LAYER_TO_INNER7;
58  case In8_Cu: return HK_SWITCH_LAYER_TO_INNER8;
59  case In9_Cu: return HK_SWITCH_LAYER_TO_INNER9;
65 
66  default:
67  return -1;
68  }
69 }