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.

102 lines
3.4 KiB

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@gmail.com>
  5. * Copyright (C) 2008-2021 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. #ifndef __EESCHEMA_ID_H__
  25. #define __EESCHEMA_ID_H__
  26. #include <id.h>
  27. /**
  28. * The maximum number of items in the clarify selection context menu. While in
  29. * most cases it is highly unlikely that there would ever be more than 10 items
  30. * at the current cursor, there are some exceptions (a bunch of pins created at
  31. * once, for instance). The current setting of 200 is arbitrary.
  32. */
  33. #define MAX_SELECT_ITEM_IDS 200
  34. /**
  35. * The maximum number of units per package.
  36. * While counts approaching 100 start to make the unit-selection popup menu
  37. * difficult to use, the limit is currently 'ZZ' (26 * 26).
  38. */
  39. #define MAX_UNIT_COUNT_PER_PACKAGE 676
  40. /**
  41. * While it would seem that an unfold-from-bus menu with over 100 items would be
  42. * hard to deal with, we've already had one user who wants 256.
  43. */
  44. #define MAX_BUS_UNFOLD_MENU_ITEMS 1024
  45. /**
  46. * Command IDs for the schematic editor.
  47. *
  48. * Please add IDs that are unique to the schematic editor (Eeschema) here and
  49. * not in the global id.h file. This will prevent the entire project from
  50. * being rebuilt when adding new command to Eeschema.
  51. */
  52. enum id_eeschema_frm
  53. {
  54. ID_IMPORT_NON_KICAD_SCH = ID_END_LIST,
  55. /* Library editor horizontal toolbar IDs. */
  56. ID_LIBEDIT_SELECT_UNIT_NUMBER,
  57. /* Library viewer horizontal toolbar IDs */
  58. ID_LIBVIEW_SELECT_PART,
  59. ID_LIBVIEW_NEXT,
  60. ID_LIBVIEW_PREVIOUS,
  61. ID_LIBVIEW_SELECT_UNIT_NUMBER,
  62. ID_LIBVIEW_LIB_FILTER,
  63. ID_LIBVIEW_LIB_LIST,
  64. ID_LIBVIEW_SYM_FILTER,
  65. ID_LIBVIEW_SYM_LIST,
  66. ID_SIM_RUN,
  67. ID_SIM_TUNE,
  68. ID_SIM_PROBE,
  69. ID_SIM_ADD_SIGNALS,
  70. ID_END_EESCHEMA_ID_LIST, // End of IDs specific to Eeschema
  71. // These ID are used in context menus,
  72. // and must not clash with any other menu ID inside Kicad
  73. // So used ID inside the reserved popup ID
  74. //
  75. // Dynamically bound in AddMenusForBus():
  76. ID_POPUP_SCH_UNFOLD_BUS = ID_POPUP_MENU_START,
  77. ID_POPUP_SCH_UNFOLD_BUS_END = ID_POPUP_SCH_UNFOLD_BUS + MAX_BUS_UNFOLD_MENU_ITEMS,
  78. // Unit select context menus command IDs.
  79. ID_POPUP_SCH_SELECT_UNIT_CMP,
  80. ID_POPUP_SCH_SELECT_UNIT1,
  81. // ... leave room for MAX_UNIT_COUNT_PER_PACKAGE IDs ,
  82. // to select one unit among MAX_UNIT_COUNT_PER_PACKAGE in popup menu
  83. ID_POPUP_SCH_SELECT_UNIT_SYM_MAX = ID_POPUP_SCH_SELECT_UNIT1 + MAX_UNIT_COUNT_PER_PACKAGE
  84. };
  85. #endif /* __EESCHEMA_ID_H__ */