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.

79 lines
2.9 KiB

8 years ago
8 years ago
8 years ago
  1. /*
  2. * This program source code file is part of KICAD, a free EDA CAD application.
  3. *
  4. * Copyright (C) 2012-2019 Kicad Developers, see AUTHORS.txt for contributors.
  5. *
  6. * This program is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU General Public License
  8. * as published by the Free Software Foundation; either version 2
  9. * of the License, or (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program; if not, you may find one here:
  18. * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
  19. * or you may search the http://www.gnu.org website for the version 2 license,
  20. * or you may write to the Free Software Foundation, Inc.,
  21. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
  22. */
  23. #ifndef __PCBNEW_GENERAL_SETTINGS_H
  24. #define __PCBNEW_GENERAL_SETTINGS_H
  25. #include <colors_design_settings.h>
  26. #include <vector>
  27. class wxConfigBase;
  28. class wxString;
  29. enum MAGNETIC_PAD_OPTION_VALUES
  30. {
  31. NO_EFFECT,
  32. CAPTURE_CURSOR_IN_TRACK_TOOL,
  33. CAPTURE_ALWAYS
  34. };
  35. class PCB_GENERAL_SETTINGS : public SETTINGS
  36. {
  37. public:
  38. PCB_GENERAL_SETTINGS( FRAME_T aFrameType );
  39. void Load( wxConfigBase* aCfg ) override;
  40. void Save( wxConfigBase* aCfg ) override;
  41. COLORS_DESIGN_SETTINGS& Colors()
  42. {
  43. return m_colorsSettings;
  44. }
  45. bool m_legacyDrcOn = true; // Not stored, always true when starting pcbnew,
  46. // false only on request during routing, and
  47. // always for temporary use
  48. bool m_legacyAutoDeleteOldTrack = true;
  49. bool m_legacyUse45DegreeTracks = true; // True to allow horiz, vert. and 45deg only tracks
  50. static bool m_use45DegreeGraphicSegments; // True to allow horizontal, vertical and
  51. // 45deg only graphic segments
  52. bool m_legacyUseTwoSegmentTracks = true;
  53. bool m_editActionChangesTrackWidth = false;
  54. static bool m_dragSelects; // True: Drag gesture always draws a selection box,
  55. // False: Drag will preselect an item and move it
  56. MAGNETIC_PAD_OPTION_VALUES m_magneticPads = CAPTURE_CURSOR_IN_TRACK_TOOL;
  57. MAGNETIC_PAD_OPTION_VALUES m_magneticTracks = CAPTURE_CURSOR_IN_TRACK_TOOL;
  58. bool m_magneticGraphics = true;
  59. #if defined(KICAD_SCRIPTING) && defined(KICAD_SCRIPTING_ACTION_MENU)
  60. std::vector< std::pair<wxString, wxString> > m_pluginSettings; // Settings for action plugins
  61. #endif
  62. protected:
  63. const FRAME_T m_frameType;
  64. COLORS_DESIGN_SETTINGS m_colorsSettings;
  65. };
  66. #endif