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.

88 lines
3.8 KiB

  1. /**
  2. * @file dialog_plot.h
  3. */
  4. /*
  5. * This program source code file is part of KiCad, a free EDA CAD application.
  6. *
  7. * Copyright (C) 1992-2021 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. #include <board.h>
  27. #include <dialog_plot_base.h>
  28. #include <pcb_plot_params.h>
  29. #include <widgets/unit_binder.h>
  30. // the plot dialog window name, used by wxWidgets
  31. #define DLG_WINDOW_NAME "plot_dialog-window"
  32. /**
  33. * A dialog to set the plot options and create plot files in various formats.
  34. */
  35. class DIALOG_PLOT : public DIALOG_PLOT_BASE
  36. {
  37. public:
  38. DIALOG_PLOT( PCB_EDIT_FRAME* parent );
  39. private:
  40. // Event called functions
  41. void Plot( wxCommandEvent& event ) override;
  42. void OnOutputDirectoryBrowseClicked( wxCommandEvent& event ) override;
  43. void OnRightClick( wxMouseEvent& event ) override;
  44. void OnPopUpLayers( wxCommandEvent& event ) override;
  45. void SetPlotFormat( wxCommandEvent& event ) override;
  46. void OnChangeDXFPlotMode( wxCommandEvent& event ) override;
  47. void OnSetScaleOpt( wxCommandEvent& event ) override;
  48. void CreateDrillFile( wxCommandEvent& event ) override;
  49. void OnGerberX2Checked( wxCommandEvent& event ) override;
  50. void onRunDRC( wxCommandEvent& event ) override;
  51. void onBoardSetup( wxHyperlinkEvent& aEvent ) override;
  52. // other functions
  53. void init_Dialog(); // main initialization
  54. void reInitDialog(); // initialization after calling drill dialog
  55. void applyPlotSettings();
  56. PLOT_FORMAT getPlotFormat();
  57. void setPlotModeChoiceSelection( OUTLINE_MODE aPlotMode )
  58. {
  59. m_plotModeOpt->SetSelection( aPlotMode == SKETCH ? 1 : 0 );
  60. }
  61. PCB_EDIT_FRAME* m_parent;
  62. LSEQ m_layerList; // List to hold CheckListBox layer numbers
  63. double m_XScaleAdjust; // X scale factor adjust to compensate
  64. // plotter X scaling error
  65. double m_YScaleAdjust; // X scale factor adjust to compensate
  66. // plotter Y scaling error
  67. int m_PSWidthAdjust; // Global width correction for exact line width
  68. // in postscript output.
  69. // this is a correction factor for tracks width
  70. // when plotted
  71. int m_widthAdjustMinValue; // Global track width limits
  72. int m_widthAdjustMaxValue; // tracks width will be "clipped" whenever the
  73. // m_PSWidthAdjust to these limits.
  74. UNIT_BINDER m_defaultPenSize;
  75. UNIT_BINDER m_trackWidthCorrection;
  76. wxString m_DRCWarningTemplate;
  77. PCB_PLOT_PARAMS m_plotOpts;
  78. };