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.

101 lines
3.7 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 KiCad Developers, see change_log.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 wxTopLevelWindow;
  40. class wxPoint;
  41. class wxSize;
  42. //class wxRealPoint;
  43. class wxString;
  44. // Often this is not used in the prototypes, since wxFrame is good enough and would
  45. // represent maximum information hiding.
  46. class PCB_EDIT_FRAME;
  47. class FP_LIB_TABLE;
  48. class BOARD;
  49. class PCB_PLOT_PARAMS;
  50. /**
  51. * Function InvokePcbLibTableEditor
  52. * shows the modal DIALOG_FP_LIB_TABLE for purposes of editing two lib tables.
  53. *
  54. * @return int - bits 0 and 1 tell whether a change was made to the @a aGlobal
  55. * and/or the @a aProject table, respectively. If set, table was modified.
  56. */
  57. int InvokePcbLibTableEditor( wxTopLevelWindow* aCaller, FP_LIB_TABLE* aGlobal, FP_LIB_TABLE* aProject );
  58. /**
  59. * Function InvokePluginOptionsEditor
  60. * calls DIALOG_FP_PLUGIN_OPTIONS dialog so that plugin options set can be edited.
  61. *
  62. * @param aCaller is the wxTopLevelWindow which is invoking the dialog.
  63. * @param aNickname is the footprint library whose options are being edited.
  64. * @param aPluginType is something that will pass through IO_MGR::EnumFromStr().
  65. * @param aOptionsIn is the options string on calling into this function.
  66. * @param aResult is where to put the result of the editing.
  67. */
  68. void InvokePluginOptionsEditor( wxTopLevelWindow* aCaller, const wxString& aNickname,
  69. const wxString& aPluginType, const wxString& aOptions, wxString* aResult );
  70. /**
  71. * Function InvokePcbLibTableEditor
  72. * shows the modal DIALOG_FP_LIB_TABLE for purposes of editing two lib tables.
  73. *
  74. * @param aCaller is the wxTopLevelWindow which is invoking the dialog.
  75. * @return true if the ilport was made.
  76. */
  77. bool InvokeDXFDialogImport( PCB_EDIT_FRAME* aCaller );
  78. /**
  79. * Function InvokeLayerSetup
  80. * shows the layer setup dialog
  81. * @return bool - true if user pressed OK (did not abort), else false.
  82. */
  83. bool InvokeLayerSetup( wxTopLevelWindow* aCaller, BOARD* aBoard );
  84. bool InvokeSVGPrint( wxTopLevelWindow* aCaller, BOARD* aBoard, PCB_PLOT_PARAMS* aSettings );
  85. #endif // INVOKE_A_DIALOG_H_