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.

83 lines
3.7 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-2017 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 <class_board.h>
  27. #include <dialog_plot_base.h>
  28. #include <pcb_plot_params.h>
  29. /**
  30. * Class DIALOG_PLOT is the dialog to set the plot options, and create plot files
  31. * in various formats.
  32. */
  33. class DIALOG_PLOT : public DIALOG_PLOT_BASE
  34. {
  35. public:
  36. DIALOG_PLOT( PCB_EDIT_FRAME* parent );
  37. private:
  38. PCB_EDIT_FRAME* m_parent;
  39. wxConfigBase* m_config;
  40. LSEQ m_layerList; // List to hold CheckListBox layer numbers
  41. double m_XScaleAdjust; // X scale factor adjust to compensate
  42. // plotter X scaling error
  43. double m_YScaleAdjust; // X scale factor adjust to compensate
  44. // plotter Y scaling error
  45. int m_PSWidthAdjust; // Global width correction for exact line width
  46. // in postscript output.
  47. // this is a correction factor for tracks width
  48. // when plotted
  49. int m_widthAdjustMinValue; // Global track width limits
  50. int m_widthAdjustMaxValue; // tracks width will be "clipped" whenever the
  51. // m_PSWidthAdjust to these limits.
  52. PCB_PLOT_PARAMS m_plotOpts;
  53. // Event called functions
  54. void Plot( wxCommandEvent& event ) override;
  55. void OnQuit( wxCommandEvent& event ) override;
  56. void OnClose( wxCloseEvent& event ) override;
  57. void OnOutputDirectoryBrowseClicked( wxCommandEvent& event ) override;
  58. void OnRightClick( wxMouseEvent& event ) override;
  59. void OnPopUpLayers( wxCommandEvent& event ) override;
  60. void SetPlotFormat( wxCommandEvent& event ) override;
  61. void OnChangeDXFPlotMode( wxCommandEvent& event ) override;
  62. void OnSetScaleOpt( wxCommandEvent& event ) override;
  63. void CreateDrillFile( wxCommandEvent& event ) override;
  64. void OnGerberX2Checked( wxCommandEvent& event ) override;
  65. void onRunDRC( wxCommandEvent& event ) override;
  66. // other functions
  67. void init_Dialog(); // main initialization
  68. void reInitDialog(); // initialization after calling drill dialog
  69. void applyPlotSettings();
  70. PlotFormat getPlotFormat();
  71. void setPlotModeChoiceSelection( EDA_DRAW_MODE_T aPlotMode )
  72. {
  73. m_plotModeOpt->SetSelection( aPlotMode == SKETCH ? 1 : 0 );
  74. }
  75. };