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.

154 lines
5.6 KiB

6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
  1. /*
  2. * This program source code file is part of KiCad, a free EDA CAD application.
  3. *
  4. * Copyright (C) 2017 Jon Evans <jon@craftyjon.com>
  5. * Copyright (C) 2017-2019 KiCad Developers, see AUTHORS.txt for contributors.
  6. *
  7. * This program is free software: you can redistribute it and/or modify it
  8. * under the terms of the GNU General Public License as published by the
  9. * Free Software Foundation, either version 3 of the License, or (at your
  10. * option) any later version.
  11. *
  12. * This program is distributed in the hope that it will be useful, but
  13. * WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15. * General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License along
  18. * with this program. If not, see <http://www.gnu.org/licenses/>.
  19. */
  20. #include <bitmaps.h>
  21. #include <cvpcb_mainframe.h>
  22. #include <listboxes.h>
  23. #include <tools/cvpcb_actions.h>
  24. // Actions, being statically-defined, require specialized I18N handling. We continue to
  25. // use the _() macro so that string harvesting by the I18N framework doesn't have to be
  26. // specialized, but we don't translate on initialization and instead do it in the getters.
  27. #undef _
  28. #define _(s) s
  29. // Selection tool action for the footprint viewer window
  30. TOOL_ACTION CVPCB_ACTIONS::selectionActivate( "cvpcb.FootprintViewerInteractiveSelection",
  31. AS_GLOBAL, 0, "",
  32. "",
  33. "",
  34. NULL, AF_ACTIVATE ); // No description, it is not supposed to be shown anywhere
  35. TOOL_ACTION CVPCB_ACTIONS::controlActivate( "cvpcb.Control",
  36. AS_GLOBAL, 0, "",
  37. "",
  38. "",
  39. NULL, AF_ACTIVATE ); // No description, it is not supposed to be shown anywhere
  40. // Action to show the footprint viewer window
  41. TOOL_ACTION CVPCB_ACTIONS::showFootprintViewer( "cvpcb.Control.ShowFootprintViewer",
  42. AS_GLOBAL, 0, "",
  43. _( "View selected footprint" ),
  44. _( "View the selected footprint in the footprint viewer" ),
  45. show_footprint_xpm );
  46. // Actions to handle management tasks
  47. TOOL_ACTION CVPCB_ACTIONS::showEquFileTable( "cvpcb.Control.ShowEquFileTable",
  48. AS_GLOBAL, 0, "",
  49. _( "Manage Footprint Association Files" ),
  50. _( "Configure footprint association file (.equ) list. These files are "
  51. "used to automatically assign footprint names from symbol values." ),
  52. library_table_xpm );
  53. TOOL_ACTION CVPCB_ACTIONS::saveAssociations( "cvpcb.Control.SaveAssocations",
  54. AS_GLOBAL,
  55. MD_CTRL + 'S', LEGACY_HK_NAME( "Save" ),
  56. _( "Save to Schematic" ),
  57. _( "Save footprint associations in schematic symbol footprint fields" ),
  58. save_xpm );
  59. // Actions to navigate the display
  60. TOOL_ACTION CVPCB_ACTIONS::changeFocusRight( "cvpcb.Control.changeFocusRight",
  61. AS_GLOBAL,
  62. WXK_TAB, "",
  63. "",
  64. "",
  65. nullptr, AF_NONE,
  66. (void*) CVPCB_MAINFRAME::CHANGE_FOCUS_RIGHT );
  67. TOOL_ACTION CVPCB_ACTIONS::changeFocusLeft( "cvpcb.Control.changeFocusLeft",
  68. AS_GLOBAL,
  69. MD_SHIFT + WXK_TAB, "",
  70. "",
  71. "",
  72. nullptr, AF_NONE,
  73. (void*) CVPCB_MAINFRAME::CHANGE_FOCUS_LEFT );
  74. // Actions to navigate the component list
  75. TOOL_ACTION CVPCB_ACTIONS::gotoNextNA( "cvpcb.Control.GotoNextNA",
  76. AS_GLOBAL, 0, "",
  77. _( "Select next unassociated symbol" ),
  78. _( "Select next unassociated symbol" ),
  79. right_xpm, AF_NONE,
  80. (void*) CVPCB_MAINFRAME::ITEM_NEXT );
  81. TOOL_ACTION CVPCB_ACTIONS::gotoPreviousNA( "cvpcb.Control.GotoPreviousNA",
  82. AS_GLOBAL, 0, "",
  83. _( "Select previous unassociated symbol" ),
  84. _( "Select previous unassociated symbol" ),
  85. left_xpm, AF_NONE,
  86. (void*) CVPCB_MAINFRAME::ITEM_PREV );
  87. // Actions to modify component associations
  88. TOOL_ACTION CVPCB_ACTIONS::associate( "cvpcb.Association.Associate",
  89. AS_GLOBAL,
  90. WXK_RETURN, "",
  91. _( "Associate footprint" ),
  92. _( "Associate selected footprint with selected components" ),
  93. auto_associe_xpm );
  94. TOOL_ACTION CVPCB_ACTIONS::autoAssociate( "cvpcb.Association.AutoAssociate",
  95. AS_GLOBAL, 0, "",
  96. _( "Automatically associate footprints" ),
  97. _( "Perform automatic footprint association" ),
  98. auto_associe_xpm );
  99. TOOL_ACTION CVPCB_ACTIONS::deleteAssoc( "cvpcb.Association.Delete",
  100. AS_GLOBAL,
  101. WXK_DELETE, "",
  102. _( "Delete association" ),
  103. _( "Delete selected footprint associations" ),
  104. delete_association_xpm );
  105. TOOL_ACTION CVPCB_ACTIONS::deleteAll( "cvpcb.Association.DeleteAll",
  106. AS_GLOBAL, 0, "",
  107. _( "Delete all footprint associations" ),
  108. _( "Delete all footprint associations" ),
  109. delete_association_xpm );
  110. // Actions to filter the footprint list
  111. TOOL_ACTION CVPCB_ACTIONS::FilterFPbyFPFilters( "cvpcb.Control.FilterFPbyFPFilters",
  112. AS_GLOBAL, 0, "",
  113. _( "Use symbol footprint filters" ),
  114. _( "Filter footprint list by footprint filters defined in the symbol" ),
  115. module_filtered_list_xpm, AF_NONE,
  116. (void*) FOOTPRINTS_LISTBOX::FILTERING_BY_COMPONENT_FP_FILTERS );
  117. TOOL_ACTION CVPCB_ACTIONS::filterFPbyPin( "cvpcb.Control.FilterFPByPin",
  118. AS_GLOBAL, 0, "",
  119. _( "Filter by pin count" ),
  120. _( "Filter footprint list by pin count" ),
  121. module_pin_filtered_list_xpm, AF_NONE,
  122. (void*) FOOTPRINTS_LISTBOX::FILTERING_BY_PIN_COUNT );
  123. TOOL_ACTION CVPCB_ACTIONS::FilterFPbyLibrary( "cvpcb.Control.FilterFPbyLibrary",
  124. AS_GLOBAL, 0, "",
  125. _( "Filter by library" ),
  126. _( "Filter footprint list by library" ),
  127. module_library_list_xpm, AF_NONE,
  128. (void*) FOOTPRINTS_LISTBOX::FILTERING_BY_LIBRARY );