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 /** 26 * @file pcb_display_options.h 27 * @brief Definition of PCB_DISPLAY_OPTIONS class 28 */ 29 30 #ifndef PCB_DISPLAY_OPTIONS_H_ 31 #define PCB_DISPLAY_OPTIONS_H_ 32 33 #include <project/board_project_settings.h> 34 35 /** 36 * Container for display options like enable/disable some optional drawings. 37 */ 38 class PCB_DISPLAY_OPTIONS 39 { 40 public: 41 PCB_DISPLAY_OPTIONS(); 42 43 /** 44 * The set of values for DISPLAY_OPTIONS.ShowTrackClearanceMode parameter option. 45 * 46 * This parameter controls how to show tracks and vias clearance area. 47 */ 48 enum TRACE_CLEARANCE_DISPLAY_MODE_T { 49 DO_NOT_SHOW_CLEARANCE = 0, 50 SHOW_TRACK_CLEARANCE_WHILE_ROUTING, 51 SHOW_TRACK_CLEARANCE_WITH_VIA_WHILE_ROUTING, 52 SHOW_WHILE_ROUTING_OR_DRAGGING, 53 SHOW_TRACK_CLEARANCE_WITH_VIA_ALWAYS 54 }; 55 56 bool m_DisplayPadFill; 57 bool m_DisplayViaFill; 58 bool m_DisplayPadNum; // show pads numbers 59 bool m_DisplayPadClearance; 60 bool m_DisplayPadNoConnects; 61 bool m_DisplayGraphicsFill; // How to display fp drawings ( sketch/ filled ) 62 bool m_DisplayTextFill; // How to display fp texts ( sketch/ filled ) 63 bool m_DisplayPcbTrackFill; // false : tracks are show in sketch mode, true = filled. 64 65 /// How trace clearances are displayed. @see TRACE_CLEARANCE_DISPLAY_MODE_T. 66 TRACE_CLEARANCE_DISPLAY_MODE_T m_ShowTrackClearanceMode; 67 68 /// @see ZONE_DISPLAY_MODE - stored in the project 69 ZONE_DISPLAY_MODE m_ZoneDisplayMode; 70 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 77 /// How inactive layers are displayed. @see HIGH_CONTRAST_MODE - stored in the project 78 HIGH_CONTRAST_MODE m_ContrastModeDisplay; 79 80 /// How to use color overrides on specific nets and netclasses 81 NET_COLOR_MODE m_NetColorMode; 82 83 /// Ratsnest draw mode (all layers vs only visible layers) 84 RATSNEST_MODE m_RatsnestMode; 85 86 int m_MaxLinksShowed; // in track creation: number of airwires shown 87 bool m_ShowModuleRatsnest; // When moving a footprint: allows displaying a ratsnest 88 bool m_ShowGlobalRatsnest; // If true, show all 89 bool m_DisplayRatsnestLinesCurved; // Airwires can be drawn as straight lines (false) 90 // or curved lines (true) 91 92 // These opacity overrides multiply with any opacity in the base layer color 93 94 double m_TrackOpacity; ///< Opacity override for all tracks 95 double m_ViaOpacity; ///< Opacity override for all types of via 96 double m_PadOpacity; ///< Opacity override for SMD pads and PTHs 97 double m_ZoneOpacity; ///< Opacity override for filled zone areas 98 99 /** 100 * The set of values for DISPLAY_OPTIONS.DisplayOrigin parameter option. 101 * 102 * This parameter controls what is used as the origin point for location values 103 */ 104 enum PCB_DISPLAY_ORIGIN_OPTIONS_T { 105 PCB_ORIGIN_PAGE = 0, 106 PCB_ORIGIN_AUX, 107 PCB_ORIGIN_GRID, 108 }; 109 110 /// Which origin is used for display transforms 111 PCB_DISPLAY_ORIGIN_OPTIONS_T m_DisplayOrigin; 112 bool m_DisplayInvertXAxis; //< true: Invert the X axis for display 113 bool m_DisplayInvertYAxis; //< true: Invert the Y axis for display 114 115 bool m_Live3DRefresh; ///< If true, 3D viewer will redraw on every modification operation 116 }; 117 118 #endif // PCBSTRUCT_H_ 119