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.

111 lines
3.8 KiB

  1. /*
  2. * This program source code file is part of KiCad, a free EDA CAD application.
  3. *
  4. * Copyright (C) 2007 Jean-Pierre Charras, jp.charras at wanadoo.fr
  5. * Copyright (C) 2016 KiCad Developers, see CHANGELOG.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 general.h
  26. */
  27. #ifndef _GENERAL_H_
  28. #define _GENERAL_H_
  29. #include <gal/color4d.h>
  30. #include <layers_id_colors_and_visibility.h>
  31. using KIGFX::COLOR4D;
  32. class TRANSFORM;
  33. class SCH_SHEET;
  34. #define EESCHEMA_VERSION 4
  35. #define SCHEMATIC_HEAD_STRING "Schematic File Version"
  36. #define DANGLING_SYMBOL_SIZE 12
  37. #define DEFAULT_REPEAT_OFFSET_X 0 ///< the default X value (overwritten by the eeschema config)
  38. #define DEFAULT_REPEAT_OFFSET_Y 100 ///< the default Y value (overwritten by the eeschema config)
  39. #define REPEAT_OFFSET_MAX 1000 ///< the max value of repeat offset value
  40. #define DEFAULT_REPEAT_LABEL_INC 1 ///< the default value (overwritten by the eeschema config)
  41. #define DEFAULT_REPEAT_OFFSET_PIN 100 ///< the default value (overwritten by the eeschema config)
  42. ///< when repeating a pin
  43. ///< The thickness to draw busses that do not have a specific width
  44. ///< (can be changed in preference menu)
  45. #define DEFAULTBUSTHICKNESS 12
  46. ///< The thickness to draw lines that thickness is set to 0 (default thickness)
  47. ///< (can be changed in preference menu)
  48. #define DEFAULTDRAWLINETHICKNESS 6
  49. ///< The default pin len value when creating pins(can be changed in preference menu)
  50. #define DEFAULTPINLENGTH 100
  51. ///< The default pin number size when creating pins(can be changed in preference menu)
  52. #define DEFAULTPINNUMSIZE 50
  53. ///< The default pin name size when creating pins(can be changed in preference menu)
  54. #define DEFAULTPINNAMESIZE 50
  55. #define GR_DEFAULT_DRAWMODE GR_COPY
  56. /* Rotation, mirror of graphic items in components bodies are handled by a
  57. * transform matrix. The default matrix is useful to draw lib entries with
  58. * using this default matrix ( no rotation, no mirror but Y axis is bottom to top, and
  59. * Y draw axis is to to bottom so we must have a default matrix that reverses
  60. * the Y coordinate and keeps the X coordiate
  61. */
  62. extern TRANSFORM DefaultTransform;
  63. /* First and main (root) screen */
  64. extern SCH_SHEET* g_RootSheet;
  65. /**
  66. * Default line thickness used to draw/plot items having a
  67. * default thickness line value (i.e. = 0 ).
  68. */
  69. int GetDefaultLineThickness();
  70. void SetDefaultLineThickness( int aThickness );
  71. /**
  72. * Default size for text in general
  73. */
  74. int GetDefaultTextSize();
  75. void SetDefaultTextSize( int aSize );
  76. /**
  77. * Default line thickness used to draw/plot busses.
  78. */
  79. int GetDefaultBusThickness();
  80. void SetDefaultBusThickness( int aThickness );
  81. COLOR4D GetLayerColor( SCH_LAYER_ID aLayer );
  82. void SetLayerColor( COLOR4D aColor, SCH_LAYER_ID aLayer );
  83. // Color to draw selected items
  84. COLOR4D GetItemSelectedColor();
  85. // Color to draw items flagged invisible, in libedit (they are invisible in Eeschema
  86. COLOR4D GetInvisibleItemColor();
  87. #endif // _GENERAL_H_