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.

98 lines
3.5 KiB

  1. /**
  2. * @file invoke_pcb_dialog.h
  3. */
  4. /* This program source code file is part of KiCad, a free EDA CAD application.
  5. *
  6. * Copyright (C) 2013 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
  7. * Copyright (C) 2013-2018 KiCad Developers, see AUTHORS.txt for contributors.
  8. *
  9. * This program is free software; you can redistribute it and/or
  10. * modify it under the terms of the GNU General Public License
  11. * as published by the Free Software Foundation; either version 2
  12. * of the License, or (at your option) any later version.
  13. *
  14. * This program is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. * GNU General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU General Public License
  20. * along with this program; if not, you may find one here:
  21. * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
  22. * or you may search the http://www.gnu.org website for the version 2 license,
  23. * or you may write to the Free Software Foundation, Inc.,
  24. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
  25. */
  26. // This header is an insolation layer between top most frames and any number of
  27. // DIALOG classes which can be called from a frame window.
  28. // It is a place to put invocation functions for [modal] dialogs, with benefits:
  29. //
  30. // 1) The information about each dialog class is not exposed to the frame.
  31. // So therefore the DIALOG class can often be kept out of a header file entirely.
  32. //
  33. // 2) The information about the calling frame is not necessarily exposed to
  34. // to the called dialog class, at least not in here.
  35. // The actual InvokeDialog<class>() function is usually coded at the bottom of the
  36. // DIALOG_<class>.cpp file.
  37. #ifndef INVOKE_A_DIALOG_H_
  38. #define INVOKE_A_DIALOG_H_
  39. class wxWindow;
  40. class wxPoint;
  41. class wxSize;
  42. class wxString;
  43. class BOARD;
  44. class FOOTPRINT;
  45. // Often this is not used in the prototypes, since wxFrame is good enough and would
  46. // represent maximum information hiding.
  47. class PCB_BASE_FRAME;
  48. class PCB_EDIT_FRAME;
  49. class FOOTPRINT_EDIT_FRAME;
  50. class FP_LIB_TABLE;
  51. class BOARD;
  52. class PCB_PLOT_PARAMS;
  53. class KIWAY;
  54. /**
  55. * Function InvokePcbLibTableEditor
  56. * shows the modal DIALOG_FP_LIB_TABLE for purposes of editing the global and project
  57. * library tables.
  58. *
  59. * @param aCaller is the wxWindow which is invoking the dialog.
  60. * @return true if either table changed.
  61. */
  62. void InvokePcbLibTableEditor( KIWAY* aKiway, wxWindow* aCaller );
  63. /**
  64. * Function InvokePluginOptionsEditor
  65. * calls DIALOG_FP_PLUGIN_OPTIONS dialog so that plugin options set can be edited.
  66. *
  67. * @param aCaller is the wxTopLevelWindow which is invoking the dialog.
  68. * @param aNickname is the footprint library whose options are being edited.
  69. * @param aPluginType is something that will pass through IO_MGR::EnumFromStr().
  70. * @param aOptions is the options string on calling into this function.
  71. * @param aResult is where to put the result of the editing.
  72. */
  73. void InvokePluginOptionsEditor( wxWindow* aCaller, const wxString& aNickname,
  74. const wxString& aPluginType, const wxString& aOptions, wxString* aResult );
  75. /**
  76. * Function InvokeExportSVG
  77. * shows the Export SVG dialog
  78. * @param aCaller is the PCB_EDIT_FRAME which is invoking the dialog.
  79. * @param aBoard is the currently edited board.
  80. * @return bool - true if user pressed OK (did not abort), else false.
  81. */
  82. bool InvokeExportSVG( PCB_EDIT_FRAME* aCaller, BOARD* aBoard );
  83. #endif // INVOKE_A_DIALOG_H_