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.

79 lines
2.2 KiB

  1. /*
  2. * This program source code file is part of KiCad, a free EDA CAD application.
  3. *
  4. * Copyright (C) 2018 Andrew Lutsenko, anlutsenko at gmail dot com
  5. * Copyright (C) 1992-2021 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 "panel_pcbnew_action_plugins_base.h"
  21. class PANEL_PCBNEW_ACTION_PLUGINS : public PANEL_PCBNEW_ACTION_PLUGINS_BASE
  22. {
  23. public:
  24. PANEL_PCBNEW_ACTION_PLUGINS ( wxWindow* aParent );
  25. bool TransferDataFromWindow() override;
  26. bool TransferDataToWindow() override;
  27. ~PANEL_PCBNEW_ACTION_PLUGINS() override;
  28. /**
  29. * Selects a whole row
  30. */
  31. void OnGridCellClick( wxGridEvent& event ) override;
  32. /**
  33. * Moves plugin up in the grid
  34. */
  35. void OnMoveUpButtonClick( wxCommandEvent& event ) override;
  36. /**
  37. * Moves plugin down in the grid
  38. */
  39. void OnMoveDownButtonClick( wxCommandEvent& event ) override;
  40. /**
  41. * Opens user's action plugin directory
  42. */
  43. void OnOpenDirectoryButtonClick( wxCommandEvent& event ) override;
  44. /**
  45. * Reloads plugins and updates grid
  46. */
  47. void OnReloadButtonClick( wxCommandEvent& event ) override;
  48. /**
  49. * Shows plugin import errors
  50. */
  51. void OnShowErrorsButtonClick( wxCommandEvent& event ) override;
  52. private:
  53. enum GRID_COLUMNS
  54. {
  55. COLUMN_ICON,
  56. COLUMN_VISIBLE,
  57. COLUMN_NAME,
  58. COLUMN_CATEGORY,
  59. COLUMN_DESCRIPTION,
  60. COLUMN_PATH
  61. };
  62. wxBitmap m_genericIcon;
  63. void SwapRows( int aRowA, int aRowB );
  64. void SelectRow( int aRow );
  65. };