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.

126 lines
5.4 KiB

  1. /*
  2. * This program source code file is part of KiCad, a free EDA CAD application.
  3. *
  4. * Copyright (C) 2007-2014 Jean-Pierre Charras, jp.charras at wanadoo.fr
  5. * Copyright (C) 1992-2020 KiCad Developers, see AUTHORS.txt for contributors.
  6. *
  7. * This program is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU General Public License
  9. * as published by the Free Software Foundation; either version 2
  10. * of the License, or (at your option) any later version.
  11. *
  12. * This program is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program; if not, you may find one here:
  19. * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
  20. * or you may search the http://www.gnu.org website for the version 2 license,
  21. * or you may write to the Free Software Foundation, Inc.,
  22. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
  23. */
  24. /**
  25. * @file pcb_display_options.h
  26. * @brief Definition of PCB_DISPLAY_OPTIONS class
  27. */
  28. #ifndef PCB_DISPLAY_OPTIONS_H_
  29. #define PCB_DISPLAY_OPTIONS_H_
  30. #include <project/board_project_settings.h>
  31. /**
  32. * Container for display options like enable/disable some optional drawings.
  33. */
  34. class PCB_DISPLAY_OPTIONS
  35. {
  36. public:
  37. PCB_DISPLAY_OPTIONS();
  38. /**
  39. * The set of values for DISPLAY_OPTIONS.ShowTrackClearanceMode parameter option.
  40. *
  41. * This parameter controls how to show tracks and vias clearance area.
  42. */
  43. enum TRACE_CLEARANCE_DISPLAY_MODE_T {
  44. DO_NOT_SHOW_CLEARANCE = 0, // Do not show clearance areas
  45. SHOW_CLEARANCE_NEW_TRACKS, /* Show clearance areas only for new track
  46. * during track creation. */
  47. SHOW_CLEARANCE_NEW_TRACKS_AND_VIA_AREAS, /* Show clearance areas only for new track
  48. * during track creation, and shows a via
  49. * clearance area at end of current new
  50. * segment (guide to place a new via
  51. */
  52. SHOW_CLEARANCE_NEW_AND_EDITED_TRACKS_AND_VIA_AREAS,
  53. /* Show clearance for new, moving and
  54. * dragging tracks and vias
  55. */
  56. SHOW_CLEARANCE_ALWAYS /* Show Always clearance areas
  57. * for track and vias
  58. */
  59. };
  60. bool m_DisplayPadFill;
  61. bool m_DisplayViaFill;
  62. bool m_DisplayPadNum; // show pads numbers
  63. bool m_DisplayPadIsol;
  64. bool m_DisplayGraphicsFill; // How to display fp drawings ( sketch/ filled )
  65. bool m_DisplayTextFill; // How to display fp texts ( sketch/ filled )
  66. bool m_DisplayPcbTrackFill; // false : tracks are show in sketch mode, true = filled.
  67. /// How trace clearances are displayed. @see TRACE_CLEARANCE_DISPLAY_MODE_T.
  68. TRACE_CLEARANCE_DISPLAY_MODE_T m_ShowTrackClearanceMode;
  69. /// @see ZONE_DISPLAY_MODE - stored in the project
  70. ZONE_DISPLAY_MODE m_ZoneDisplayMode;
  71. int m_DisplayNetNamesMode; /* 0 do not show netnames,
  72. * 1 show netnames on pads
  73. * 2 show netnames on tracks
  74. * 3 show netnames on tracks and pads
  75. */
  76. /// How inactive layers are displayed. @see HIGH_CONTRAST_MODE - stored in the project
  77. HIGH_CONTRAST_MODE m_ContrastModeDisplay;
  78. /// How to use color overrides on specific nets and netclasses
  79. NET_COLOR_MODE m_NetColorMode;
  80. /// Ratsnest draw mode (all layers vs only visible layers)
  81. RATSNEST_MODE m_RatsnestMode;
  82. int m_MaxLinksShowed; // in track creation: number of airwires shown
  83. bool m_ShowModuleRatsnest; // When moving a footprint: allows displaying a ratsnest
  84. bool m_ShowGlobalRatsnest; // If true, show all
  85. bool m_DisplayRatsnestLinesCurved; // Airwires can be drawn as straight lines (false)
  86. // or curved lines (true)
  87. // These opacity overrides multiply with any opacity in the base layer color
  88. double m_TrackOpacity; ///< Opacity override for all tracks
  89. double m_ViaOpacity; ///< Opacity override for all types of via
  90. double m_PadOpacity; ///< Opacity override for SMD pads and PTHs
  91. double m_ZoneOpacity; ///< Opacity override for filled zone areas
  92. /**
  93. * The set of values for DISPLAY_OPTIONS.DisplayOrigin parameter option.
  94. *
  95. * This parameter controls what is used as the origin point for location values
  96. */
  97. enum PCB_DISPLAY_ORIGIN_OPTIONS_T {
  98. PCB_ORIGIN_PAGE = 0,
  99. PCB_ORIGIN_AUX,
  100. PCB_ORIGIN_GRID,
  101. };
  102. /// Which origin is used for display transforms
  103. PCB_DISPLAY_ORIGIN_OPTIONS_T m_DisplayOrigin;
  104. bool m_DisplayInvertXAxis; //< true: Invert the X axis for display
  105. bool m_DisplayInvertYAxis; //< true: Invert the Y axis for display
  106. };
  107. #endif // PCBSTRUCT_H_