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.

89 lines
2.8 KiB

  1. /*
  2. * This program source code file is part of KiCad, a free EDA CAD application.
  3. *
  4. * Copyright (C) 2019 Jean-Pierre Charras, jp.charras at wanadoo.fr
  5. * Copyright (C) 2009-2019 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 stackup_predefined_prms.h
  26. */
  27. #ifndef STACKUP_PREDEFINED_PRMS_H
  28. #define STACKUP_PREDEFINED_PRMS_H
  29. #include <wx/string.h>
  30. #include <layers_id_colors_and_visibility.h>
  31. // Keyword used in file to identify the dielectric layer type
  32. #define KEY_CORE "core"
  33. #define KEY_PREPREG "prepreg"
  34. #define KEY_COPPER "copper"
  35. // key string used for not specified parameters
  36. #define NOT_SPECIFIED "Undefined"
  37. // String in wxChoice to use user defined material or solder mask color
  38. #define USER_DEFINED "user defined"
  39. // A reasonable Epsilon R value for solder mask dielectric
  40. #define DEFAULT_EPSILON_R_SOLDERMASK 3.3
  41. // A default Epsilon R value for silkscreen dielectric
  42. #define DEFAULT_EPSILON_R_SILKSCREEN 1.0
  43. // A minor struct to handle color in gerber job file and dialog
  44. struct FAB_LAYER_COLOR
  45. {
  46. wxString m_ColorName; // the name (in job file) of the color
  47. // User values are the HTML coding #rrggbb hexa value.
  48. wxColor m_Color; // the color in r,g,b values (0..255)
  49. FAB_LAYER_COLOR() {}
  50. FAB_LAYER_COLOR( const wxString& aColorName, const wxColor& aColor )
  51. : m_ColorName( aColorName ), m_Color( aColor )
  52. {}
  53. };
  54. /**
  55. * @return a wxArray of standard copper finish names.
  56. * @param aTranslate = false for the initial names, true for translated names
  57. */
  58. wxArrayString GetCopperFinishStandardList( bool aTranslate );
  59. /**
  60. * @return a list of standard FAB_LAYER_COLOR items for silkscreen and solder mask.
  61. */
  62. const FAB_LAYER_COLOR* GetColorStandardList();
  63. /**
  64. * @return the count of colors in ColorStandardList
  65. */
  66. int GetColorStandardListCount();
  67. /**
  68. * @return the index of the user defined color in ColorStandardList
  69. */
  70. int GetColorUserDefinedListIdx();
  71. #endif // #ifndef STACKUP_PREDEFINED_PRMS_H