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.

69 lines
2.0 KiB

5 years ago
  1. /*
  2. * Copyright (C) 2018 CERN
  3. * Copyright (C) 2020 KiCad Developers, see AUTHORS.txt for contributors.
  4. * Author: Maciej Suminski <maciej.suminski@cern.ch>
  5. *
  6. * This program is free software: you can redistribute it and/or modify it
  7. * under the terms of the GNU General Public License as published by the
  8. * Free Software Foundation, either version 3 of the License, or (at your
  9. * option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful, but
  12. * WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. * General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License along
  17. * with this program. If not, see <http://www.gnu.org/licenses/>.
  18. */
  19. #ifndef PRINTOUT_H
  20. #define PRINTOUT_H
  21. #include <page_info.h>
  22. class APP_SETTINGS_BASE;
  23. class COLOR_SETTINGS;
  24. /**
  25. * Handle the parameters used to print a board drawing.
  26. */
  27. struct PRINTOUT_SETTINGS
  28. {
  29. PRINTOUT_SETTINGS( const PAGE_INFO& aPageInfo )
  30. : m_pageInfo( aPageInfo )
  31. {
  32. m_scale = 1.0;
  33. m_titleBlock = false;
  34. m_blackWhite = true;
  35. m_pageCount = 0;
  36. m_background = false;
  37. m_colorSettings = nullptr;
  38. }
  39. virtual ~PRINTOUT_SETTINGS()
  40. {
  41. }
  42. virtual void Save( APP_SETTINGS_BASE* aConfig );
  43. virtual void Load( APP_SETTINGS_BASE* aConfig );
  44. /**
  45. * Returns true if the drawing border and title block should be printed.
  46. */
  47. bool PrintBorderAndTitleBlock() const { return m_titleBlock; }
  48. double m_scale; ///< Printing scale
  49. bool m_titleBlock; ///< Print frame and title block
  50. bool m_blackWhite; ///< Print in B&W or Color
  51. int m_pageCount; ///< Number of pages to print
  52. bool m_background; ///< Print background color
  53. const PAGE_INFO& m_pageInfo;
  54. /// The color settings to be used for printing
  55. COLOR_SETTINGS* m_colorSettings;
  56. };
  57. #endif /* PRINTOUT_H */