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.4 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_OPTIONS
  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() { return m_colorsSettings; }
  42. static bool g_Use45DegreeGraphicSegments; // True to constraint graphic lines to horizontal,
  43. // vertical and 45º
  44. static bool g_EditHotkeyChangesTrackWidth;
  45. static bool g_DragSelects; // True: Drag gesture always draws a selection box,
  46. // False: Drag will select an item and move it
  47. static MAGNETIC_OPTIONS g_MagneticPads;
  48. static MAGNETIC_OPTIONS g_MagneticTracks;
  49. static bool g_MagneticGraphics;
  50. #if defined(KICAD_SCRIPTING) && defined(KICAD_SCRIPTING_ACTION_MENU)
  51. std::vector< std::pair<wxString, wxString> > m_pluginSettings; // Settings for action plugins
  52. #endif
  53. protected:
  54. const FRAME_T m_frameType;
  55. COLORS_DESIGN_SETTINGS m_colorsSettings;
  56. };
  57. #endif // PCBNEW_GENERAL_SETTINGS_H