You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

167 lines
7.9 KiB

  1. /*
  2. * This program source code file is part of KiCad, a free EDA CAD application.
  3. *
  4. * Copyright (C) 2020 KiCad Developers, see AUTHORS.txt for contributors.
  5. *
  6. * This program is free software: you can redistribute it and/or modify it
  7. * under the terms of the GNU General Public License as published by the
  8. * Free Software Foundation, either version 3 of the License, or (at your
  9. * option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful, but
  12. * WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. * General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License along
  17. * with this program. If not, see <http://www.gnu.org/licenses/>.
  18. */
  19. #include <layers_id_colors_and_visibility.h>
  20. #include <wx/wx.h>
  21. wxString LayerName( int aLayer )
  22. {
  23. switch( aLayer )
  24. {
  25. // PCB_LAYER_ID
  26. case F_Cu: return _( "F.Cu" );
  27. case In1_Cu: return _( "In1.Cu" );
  28. case In2_Cu: return _( "In2.Cu" );
  29. case In3_Cu: return _( "In3.Cu" );
  30. case In4_Cu: return _( "In4.Cu" );
  31. case In5_Cu: return _( "In5.Cu" );
  32. case In6_Cu: return _( "In6.Cu" );
  33. case In7_Cu: return _( "In7.Cu" );
  34. case In8_Cu: return _( "In8.Cu" );
  35. case In9_Cu: return _( "In9.Cu" );
  36. case In10_Cu: return _( "In10.Cu" );
  37. case In11_Cu: return _( "In11.Cu" );
  38. case In12_Cu: return _( "In12.Cu" );
  39. case In13_Cu: return _( "In13.Cu" );
  40. case In14_Cu: return _( "In14.Cu" );
  41. case In15_Cu: return _( "In15.Cu" );
  42. case In16_Cu: return _( "In16.Cu" );
  43. case In17_Cu: return _( "In17.Cu" );
  44. case In18_Cu: return _( "In18.Cu" );
  45. case In19_Cu: return _( "In19.Cu" );
  46. case In20_Cu: return _( "In20.Cu" );
  47. case In21_Cu: return _( "In21.Cu" );
  48. case In22_Cu: return _( "In22.Cu" );
  49. case In23_Cu: return _( "In23.Cu" );
  50. case In24_Cu: return _( "In24.Cu" );
  51. case In25_Cu: return _( "In25.Cu" );
  52. case In26_Cu: return _( "In26.Cu" );
  53. case In27_Cu: return _( "In27.Cu" );
  54. case In28_Cu: return _( "In28.Cu" );
  55. case In29_Cu: return _( "In29.Cu" );
  56. case In30_Cu: return _( "In30.Cu" );
  57. case B_Cu: return _( "B.Cu" );
  58. // Technicals
  59. case B_Adhes: return _( "B.Adhes" );
  60. case F_Adhes: return _( "F.Adhes" );
  61. case B_Paste: return _( "B.Paste" );
  62. case F_Paste: return _( "F.Paste" );
  63. case B_SilkS: return _( "B.SilkS" );
  64. case F_SilkS: return _( "F.SilkS" );
  65. case B_Mask: return _( "B.Mask" );
  66. case F_Mask: return _( "F.Mask" );
  67. // Users
  68. case Dwgs_User: return _( "Dwgs.User" );
  69. case Cmts_User: return _( "Cmts.User" );
  70. case Eco1_User: return _( "Eco1.User" );
  71. case Eco2_User: return _( "Eco2.User" );
  72. case Edge_Cuts: return _( "Edge.Cuts" );
  73. case Margin: return _( "Margin" );
  74. // Footprint
  75. case F_CrtYd: return _( "F.CrtYd" );
  76. case B_CrtYd: return _( "B.CrtYd" );
  77. case F_Fab: return _( "F.Fab" );
  78. case B_Fab: return _( "B.Fab" );
  79. // Rescue
  80. case Rescue: return _( "Rescue" );
  81. // SCH_LAYER_ID
  82. case LAYER_WIRE: return _( "Wire" );
  83. case LAYER_BUS: return _( "Bus" );
  84. case LAYER_BUS_JUNCTION: return _( "Bus Junction" );
  85. case LAYER_JUNCTION: return _( "Junction" );
  86. case LAYER_LOCLABEL: return _( "Label" );
  87. case LAYER_GLOBLABEL: return _( "Global label" );
  88. case LAYER_HIERLABEL: return _( "Hierarchical label" );
  89. case LAYER_PINNUM: return _( "Pin number" );
  90. case LAYER_PINNAM: return _( "Pin name" );
  91. case LAYER_REFERENCEPART: return _( "Symbol reference" );
  92. case LAYER_VALUEPART: return _( "Symbol value" );
  93. case LAYER_FIELDS: return _( "Symbol fields" );
  94. case LAYER_DEVICE: return _( "Symbol body outline" );
  95. case LAYER_DEVICE_BACKGROUND: return _( "Symbol body fill" );
  96. case LAYER_NOTES: return _( "Notes" );
  97. case LAYER_NETNAM: return _( "Net name" );
  98. case LAYER_PIN: return _( "Pin" );
  99. case LAYER_SHEET: return _( "Sheet border" );
  100. case LAYER_SHEET_BACKGROUND: return _( "Sheet background" );
  101. case LAYER_SHEETNAME: return _( "Sheet name" );
  102. case LAYER_SHEETFIELDS: return _( "Sheet fields" );
  103. case LAYER_SHEETFILENAME: return _( "Sheet file name" );
  104. case LAYER_SHEETLABEL: return _( "Sheet label" );
  105. case LAYER_NOCONNECT: return _( "No connect symbol" );
  106. case LAYER_ERC_WARN: return _( "ERC warning" );
  107. case LAYER_ERC_ERR: return _( "ERC error" );
  108. case LAYER_SCHEMATIC_AUX_ITEMS: return _( "Helper items" );
  109. case LAYER_SCHEMATIC_GRID: return _( "Grid" );
  110. case LAYER_SCHEMATIC_GRID_AXES: return _( "Axes" );
  111. case LAYER_SCHEMATIC_BACKGROUND: return _( "Background" );
  112. case LAYER_SCHEMATIC_CURSOR: return _( "Cursor" );
  113. case LAYER_BRIGHTENED: return _( "Highlighted items" );
  114. case LAYER_HIDDEN: return _( "Hidden item" );
  115. case LAYER_SELECTION_SHADOWS: return _( "Selection highlight" );
  116. case LAYER_SCHEMATIC_WORKSHEET: return _( "Worksheet" );
  117. // GAL_LAYER_ID
  118. case LAYER_MOD_FR: return _( "Footprints Front" );
  119. case LAYER_MOD_BK: return _( "Footprints Back" );
  120. case LAYER_MOD_VALUES: return _( "Values" );
  121. case LAYER_MOD_REFERENCES: return _( "Reference Designators" );
  122. case LAYER_MOD_TEXT_FR: return _( "Footprint Text Front" );
  123. case LAYER_MOD_TEXT_BK: return _( "Footprint Text Back" );
  124. case LAYER_MOD_TEXT_INVISIBLE: return _( "Hidden Text" );
  125. case LAYER_PAD_FR: return _( "Pads Front" );
  126. case LAYER_PAD_BK: return _( "Pads Back" );
  127. case LAYER_PADS_TH: return _( "Through Hole Pads" );
  128. case LAYER_TRACKS: return _( "Tracks" );
  129. case LAYER_VIA_THROUGH: return _( "Through Via" );
  130. case LAYER_VIA_BBLIND: return _( "Bl/Buried Via" );
  131. case LAYER_VIA_MICROVIA: return _( "Micro Via" );
  132. case LAYER_NON_PLATEDHOLES: return _( "Non Plated Holes" );
  133. case LAYER_RATSNEST: return _( "Ratsnest" );
  134. case LAYER_NO_CONNECTS: return _( "No-Connects" );
  135. case LAYER_DRC_WARNING: return _( "DRC Warnings" );
  136. case LAYER_DRC_ERROR: return _( "DRC Errors" );
  137. case LAYER_DRC_EXCLUSION: return _( "DRC Exclusions" );
  138. case LAYER_ANCHOR: return _( "Anchors" );
  139. case LAYER_WORKSHEET: return _( "Worksheet" );
  140. case LAYER_CURSOR: return _( "Cursor" );
  141. case LAYER_AUX_ITEMS: return _( "Helper items" );
  142. case LAYER_GRID: return _( "Grid" );
  143. case LAYER_GRID_AXES: return _( "Grid Axes" );
  144. case LAYER_PCB_BACKGROUND: return _( "Background" );
  145. case LAYER_SELECT_OVERLAY: return _( "Selection highlight" );
  146. default:
  147. #if DEBUG
  148. wxString str;
  149. str.Printf( "Unknown: ID %d", aLayer );
  150. return str;
  151. #else
  152. return wxEmptyString;
  153. #endif
  154. }
  155. }