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.

278 lines
8.0 KiB

9 years ago
9 years ago
  1. /*
  2. * This program source code file is part of KiCad, a free EDA CAD application.
  3. *
  4. * Copyright (C) 2008 Wayne Stambaugh <stambaughw@verizon.net>
  5. * Copyright (C) 2008-2017 KiCad Developers, see change_log.txt for contributors.
  6. *
  7. * This program is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU General Public License
  9. * as published by the Free Software Foundation; either version 2
  10. * of the License, or (at your option) any later version.
  11. *
  12. * This program is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program; if not, you may find one here:
  19. * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
  20. * or you may search the http://www.gnu.org website for the version 2 license,
  21. * or you may write to the Free Software Foundation, Inc.,
  22. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
  23. */
  24. /**
  25. * @file eeschema_id.h
  26. */
  27. #ifndef __EESCHEMA_ID_H__
  28. #define __EESCHEMA_ID_H__
  29. #include <id.h>
  30. /**
  31. * The maximum number of items in the clarify selection context menu. It is
  32. * highly unlikely that there would ever be more than 10 items at the current
  33. * cursor. Increase this number if that ever becomes a problem.
  34. */
  35. #define MAX_SELECT_ITEM_IDS 10
  36. /**
  37. * The maximum number of units per package.
  38. * Increase this number if that ever becomes a problem, but remember
  39. * the popup menu to select a given unit could be not easy to use.
  40. */
  41. #define MAX_UNIT_COUNT_PER_PACKAGE 64
  42. /**
  43. * Command IDs for the schematic editor.
  44. *
  45. * Please add IDs that are unique to the schematic editor (Eeschema) here and
  46. * not in the global id.h file. This will prevent the entire project from
  47. * being rebuilt when adding new command to Eeschema.
  48. */
  49. enum id_eeschema_frm
  50. {
  51. ID_UPDATE_ONE_SHEET = ID_END_LIST,
  52. ID_SAVE_ONE_SHEET_UNDER_NEW_NAME,
  53. ID_IMPORT_NON_KICAD_SCH,
  54. /* Schematic editor main menubar IDs. */
  55. ID_RESCUE_CACHED,
  56. ID_EDIT_SYM_LIB_TABLE,
  57. /* Schematic editor horizontal toolbar IDs */
  58. ID_HIERARCHY,
  59. ID_TO_LIBVIEW,
  60. ID_GET_ANNOTATE,
  61. ID_GET_ERC,
  62. ID_BACKANNO_ITEMS,
  63. ID_UPDATE_FIELDS,
  64. ID_GEN_PLOT_SCHEMATIC,
  65. /* Schematic editor veritcal toolbar IDs */
  66. ID_SCHEMATIC_VERTICAL_TOOLBAR_START,
  67. ID_HIGHLIGHT,
  68. ID_SCH_PLACE_COMPONENT,
  69. ID_PLACE_POWER_BUTT,
  70. ID_BUS_BUTT,
  71. ID_WIRE_BUTT,
  72. ID_BUSTOBUS_ENTRY_BUTT,
  73. ID_WIRETOBUS_ENTRY_BUTT,
  74. ID_LABEL_BUTT,
  75. ID_GLABEL_BUTT,
  76. ID_HIERLABEL_BUTT,
  77. ID_IMPORT_HLABEL_BUTT,
  78. ID_SHEET_PIN_BUTT,
  79. ID_NOCONN_BUTT,
  80. ID_JUNCTION_BUTT,
  81. ID_SHEET_SYMBOL_BUTT,
  82. ID_TEXT_COMMENT_BUTT,
  83. ID_LINE_COMMENT_BUTT,
  84. ID_ADD_IMAGE_BUTT,
  85. ID_SCHEMATIC_DELETE_ITEM_BUTT,
  86. ID_SCHEMATIC_VERTICAL_TOOLBAR_END,
  87. // Toolbar options id:
  88. ID_TB_OPTIONS_HIDDEN_PINS,
  89. ID_TB_OPTIONS_BUS_WIRES_ORIENT,
  90. /* Schematic editor context menu IDs. */
  91. ID_POPUP_SCH_DUPLICATE_ITEM,
  92. ID_POPUP_START_RANGE,
  93. ID_POPUP_SCH_DELETE,
  94. ID_POPUP_SCH_BREAK_WIRE,
  95. ID_POPUP_SCH_BEGIN_WIRE,
  96. ID_POPUP_SCH_BEGIN_BUS,
  97. ID_POPUP_END_LINE,
  98. ID_POPUP_SCH_DELETE_CONNECTION,
  99. ID_POPUP_SCH_DELETE_NODE,
  100. ID_POPUP_SCH_DELETE_CMP,
  101. ID_POPUP_SCH_ENTRY_SELECT_SLASH,
  102. ID_POPUP_SCH_ENTRY_SELECT_ANTISLASH,
  103. ID_POPUP_SCH_INIT_CMP,
  104. ID_POPUP_SCH_SET_SHAPE_TEXT,
  105. ID_POPUP_SCH_END_SHEET,
  106. ID_POPUP_SCH_RESIZE_SHEET,
  107. ID_POPUP_SCH_CLEANUP_SHEET,
  108. ID_POPUP_IMPORT_HLABEL_TO_SHEETPIN,
  109. ID_POPUP_SCH_GENERIC_ORIENT_CMP,
  110. ID_POPUP_SCH_GENERIC_EDIT_CMP,
  111. ID_POPUP_SCH_EDIT_CONVERT_CMP,
  112. ID_POPUP_SCH_EDIT_FIELD,
  113. ID_POPUP_SCH_DISPLAYDOC_CMP,
  114. ID_POPUP_SCH_ENTER_SHEET,
  115. ID_POPUP_SCH_LEAVE_SHEET,
  116. ID_POPUP_SCH_SELECT_ON_PCB,
  117. ID_POPUP_SCH_ADD_JUNCTION,
  118. ID_POPUP_SCH_ADD_LABEL,
  119. ID_POPUP_SCH_ADD_GLABEL,
  120. ID_POPUP_SCH_GETINFO_MARKER,
  121. ID_POPUP_END_RANGE,
  122. ID_POPUP_SCH_CALL_LIBEDIT_AND_LOAD_CMP,
  123. // Unit select context menus command IDs.
  124. ID_POPUP_SCH_SELECT_UNIT_CMP,
  125. ID_POPUP_SCH_SELECT_UNIT1,
  126. // ... leave room for MAX_UNIT_COUNT_PER_PACKAGE IDs ,
  127. // to select one unit among MAX_UNIT_COUNT_PER_PACKAGE in popup menu
  128. ID_POPUP_SCH_SELECT_UNIT_CMP_MAX = ID_POPUP_SCH_SELECT_UNIT1
  129. + MAX_UNIT_COUNT_PER_PACKAGE,
  130. // Change text type context menu command IDs.
  131. ID_POPUP_SCH_CHANGE_TYPE_TEXT,
  132. ID_POPUP_SCH_CHANGE_TYPE_TEXT_TO_LABEL,
  133. ID_POPUP_SCH_CHANGE_TYPE_TEXT_TO_GLABEL,
  134. ID_POPUP_SCH_CHANGE_TYPE_TEXT_TO_HLABEL,
  135. ID_POPUP_SCH_CHANGE_TYPE_TEXT_TO_COMMENT,
  136. ID_SELECT_ITEM_START,
  137. ID_SELECT_ITEM_END = ID_SELECT_ITEM_START + MAX_SELECT_ITEM_IDS,
  138. // Change orientation command IDs.
  139. ID_SCH_MIRROR_X,
  140. ID_SCH_MIRROR_Y,
  141. ID_SCH_ORIENT_NORMAL,
  142. ID_SCH_ROTATE_CLOCKWISE,
  143. ID_SCH_ROTATE_COUNTERCLOCKWISE,
  144. ID_SCH_EDIT_ITEM,
  145. ID_SCH_EDIT_COMPONENT_VALUE,
  146. ID_SCH_EDIT_COMPONENT_REFERENCE,
  147. ID_SCH_EDIT_COMPONENT_FOOTPRINT,
  148. ID_SCH_MOVE_ITEM,
  149. ID_SCH_DRAG_ITEM,
  150. ID_AUTOPLACE_FIELDS,
  151. // Schematic editor commmands. These are command IDs that are generated by multiple
  152. // events (menus, toolbar, context menu, etc.) that result in the same event handler.
  153. ID_CANCEL_CURRENT_COMMAND,
  154. ID_HOTKEY_HIGHLIGHT,
  155. /* Library editor main menubar IDs. */
  156. ID_LIBEDIT_DIMENSIONS,
  157. /* Library editor horizontal toolbar IDs. */
  158. ID_LIBEDIT_SAVE_CURRENT_PART,
  159. ID_LIBEDIT_SELECT_PART,
  160. ID_LIBEDIT_SELECT_CURRENT_LIB,
  161. ID_LIBEDIT_SAVE_CURRENT_LIB,
  162. ID_LIBEDIT_NEW_PART,
  163. ID_LIBEDIT_NEW_PART_FROM_EXISTING,
  164. ID_LIBEDIT_GET_FRAME_EDIT_PART,
  165. ID_LIBEDIT_GET_FRAME_EDIT_FIELDS,
  166. ID_LIBEDIT_DELETE_PART,
  167. ID_DE_MORGAN_NORMAL_BUTT,
  168. ID_DE_MORGAN_CONVERT_BUTT,
  169. ID_LIBEDIT_EDIT_PIN_BY_PIN,
  170. ID_LIBEDIT_EDIT_PIN_BY_TABLE,
  171. ID_LIBEDIT_VIEW_DOC,
  172. ID_LIBEDIT_CHECK_PART,
  173. ID_LIBEDIT_SELECT_PART_NUMBER,
  174. ID_LIBEDIT_SELECT_ALIAS,
  175. /* Library editor vertical toolbar IDs. */
  176. ID_LIBEDIT_PIN_BUTT,
  177. ID_LIBEDIT_BODY_LINE_BUTT,
  178. ID_LIBEDIT_BODY_ARC_BUTT,
  179. ID_LIBEDIT_BODY_CIRCLE_BUTT,
  180. ID_LIBEDIT_BODY_RECT_BUTT,
  181. ID_LIBEDIT_BODY_TEXT_BUTT,
  182. ID_LIBEDIT_ANCHOR_ITEM_BUTT,
  183. ID_LIBEDIT_IMPORT_BODY_BUTT,
  184. ID_LIBEDIT_EXPORT_BODY_BUTT,
  185. ID_LIBEDIT_DELETE_ITEM_BUTT,
  186. /* Change orientation command ID */
  187. ID_LIBEDIT_ROTATE_ITEM,
  188. ID_LIBEDIT_MIRROR_X,
  189. ID_LIBEDIT_MIRROR_Y,
  190. ID_LIBEDIT_ORIENT_NORMAL,
  191. /* Library editor context menu IDs */
  192. ID_LIBEDIT_EDIT_PIN,
  193. ID_POPUP_LIBEDIT_PIN_GLOBAL_CHANGE_ITEM,
  194. ID_POPUP_LIBEDIT_PIN_GLOBAL_CHANGE_PINSIZE_ITEM,
  195. ID_POPUP_LIBEDIT_PIN_GLOBAL_CHANGE_PINNAMESIZE_ITEM,
  196. ID_POPUP_LIBEDIT_PIN_GLOBAL_CHANGE_PINNUMSIZE_ITEM,
  197. ID_POPUP_LIBEDIT_BODY_EDIT_ITEM,
  198. ID_POPUP_LIBEDIT_DELETE_ITEM,
  199. ID_POPUP_LIBEDIT_MODIFY_ITEM,
  200. ID_POPUP_LIBEDIT_END_CREATE_ITEM,
  201. ID_POPUP_LIBEDIT_CANCEL_EDITING,
  202. ID_POPUP_LIBEDIT_MOVE_ITEM_REQUEST,
  203. ID_POPUP_LIBEDIT_FIELD_EDIT_ITEM,
  204. ID_POPUP_LIBEDIT_DELETE_CURRENT_POLY_SEGMENT,
  205. /* Library editor toolbar options IDs */
  206. ID_LIBEDIT_SHOW_ELECTRICAL_TYPE,
  207. /* Library editor menubar IDs */
  208. ID_LIBEDIT_SAVE_CURRENT_LIB_AS,
  209. ID_LIBEDIT_GEN_PNG_FILE,
  210. ID_LIBEDIT_GEN_SVG_FILE,
  211. /* Library viewer horizontal toolbar IDs */
  212. ID_LIBVIEW_SELECT_PART,
  213. ID_LIBVIEW_NEXT,
  214. ID_LIBVIEW_PREVIOUS,
  215. ID_LIBVIEW_VIEWDOC,
  216. ID_LIBVIEW_DE_MORGAN_NORMAL_BUTT,
  217. ID_LIBVIEW_DE_MORGAN_CONVERT_BUTT,
  218. ID_LIBVIEW_SELECT_PART_NUMBER,
  219. ID_LIBVIEW_LIB_LIST,
  220. ID_LIBVIEW_CMP_LIST,
  221. ID_LIBVIEW_LIBWINDOW,
  222. ID_LIBVIEW_CMPWINDOW,
  223. ID_LIBVIEW_CMP_EXPORT_TO_SCHEMATIC,
  224. ID_SET_RELATIVE_OFFSET,
  225. ID_LIBVIEW_SHOW_ELECTRICAL_TYPE,
  226. ID_UPDATE_PCB_FROM_SCH,
  227. ID_UPDATE_SCH_FROM_PCB,
  228. ID_SIM_RUN,
  229. ID_SIM_TUNE,
  230. ID_SIM_PROBE,
  231. ID_SIM_SETTINGS,
  232. ID_SIM_ADD_SIGNALS,
  233. ID_SIM_SHOW,
  234. ID_END_EESCHEMA_ID_LIST
  235. };
  236. #endif /* __EESCHEMA_ID_H__ */