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.

167 lines
4.3 KiB

  1. /*
  2. * This program source code file is part of KiCad, a free EDA CAD application.
  3. *
  4. * Copyright (C) 2018 Wayne Stambaugh <stambaughw@gmail.com>
  5. * Copyright (C) 2018 KiCad Developers, see change_log.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 trace_helpers.h
  26. * @brief wxLogTrace helper definitions.
  27. */
  28. #ifndef _TRACE_HELPERS_H_
  29. #define _TRACE_HELPERS_H_
  30. #include <wx/arrstr.h>
  31. #include <wx/event.h>
  32. #include <wx/string.h>
  33. /**
  34. * @defgroup trace_env_vars Trace Environment Variables
  35. *
  36. * wxWidgets provides trace control of debug messages using the WXTRACE environment variable.
  37. * This section defines the strings passed to WXTRACE to for debug output control of various
  38. * sections of the KiCad code. See the wxWidgets <a href="http://docs.wxwidgets.org/3.0/
  39. * group__group__funcmacro__log.html#ga947e317db477914c12b13c4534867ec9"> wxLogTrace </a>
  40. * documentation for more information.
  41. */
  42. ///@{
  43. /// \ingroup trace_env_vars
  44. /**
  45. * Flag to enable find debug tracing.
  46. *
  47. * Use "KICAD_FIND_ITEM" to enable.
  48. */
  49. extern const wxChar* const traceFindItem;
  50. /**
  51. * Flag to enable find and replace debug tracing.
  52. *
  53. * Use "KICAD_FIND_REPLACE" to enable.
  54. */
  55. extern const wxChar* const traceFindReplace;
  56. /**
  57. * Flag to enable draw panel coordinate debug tracing.
  58. *
  59. * Use "KICAD_COORDS" to enable.
  60. */
  61. extern const wxChar* const kicadTraceCoords;
  62. /**
  63. * Flag to enable wxKeyEvent debug tracing.
  64. *
  65. * Use "KICAD_KEY_EVENTS" to enable.
  66. */
  67. extern const wxChar* const kicadTraceKeyEvent;
  68. /**
  69. * Flag to enable auto save feature debug tracing.
  70. *
  71. * Use "KICAD_AUTOSAVE" to enable.
  72. */
  73. extern const wxChar* const traceAutoSave;
  74. /**
  75. * Flag to enable schematic library memory deletion debug output.
  76. *
  77. * Use "KICAD_SCH_LIB_MEM" to enable.
  78. */
  79. extern const wxChar* const traceSchLibMem;
  80. /**
  81. * Flag to enable legacy schematic plugin debug output.
  82. *
  83. * Use "KICAD_SCH_LEGACY_PLUGIN" to enable.
  84. */
  85. extern const wxChar* const traceSchLegacyPlugin;
  86. /**
  87. * Flag to enable GEDA PCB plugin debug output.
  88. *
  89. * Use "KICAD_PCB_PLUGIN" to enable.
  90. */
  91. extern const wxChar* const traceKicadPcbPlugin;
  92. /**
  93. * Flag to enable GEDA PCB plugin debug output.
  94. *
  95. * Use "KICAD_GEDA_PLUGIN" to enable.
  96. */
  97. extern const wxChar* const traceGedaPcbPlugin;
  98. /**
  99. * Flag to enable print controller debug output.
  100. *
  101. * Use "KICAD_PRINT" to enable.
  102. */
  103. extern const wxChar* const tracePrinting;
  104. /**
  105. * Flag to enable path and file name debug output.
  106. *
  107. * Use "KICAD_PATHS_AND_FILES" to enable.
  108. */
  109. extern const wxChar* const tracePathsAndFiles;
  110. /**
  111. * Flag to enable locale debug output.
  112. *
  113. * Use "KICAD_LOCALE" to enable.
  114. */
  115. extern const wxChar* const traceLocale;
  116. /**
  117. * Flag to enable debug output of #BASE_SCREEN and it's derivatives.
  118. *
  119. * Use "KICAD_SCREEN" to enable.
  120. */
  121. extern const wxChar* const traceScreen;
  122. /**
  123. * Flag to enable debug output of zoom-scrolling calculations in
  124. * #KIGFX::ZOOM_CONTROLLER and derivatives.
  125. *
  126. * Use "KICAD_ZOOM_SCROLL" to enable.
  127. */
  128. extern const wxChar* const traceZoomScroll;
  129. ///@}
  130. /**
  131. * Debug helper for printing wxKeyEvent information.
  132. *
  133. * @param aEvent is the wxKeyEvent to generate the print string from.
  134. * @return the wxKeyEvent information.
  135. */
  136. extern wxString dump( const wxKeyEvent& aEvent );
  137. /**
  138. * Debug helper for printing wxArrayString contents.
  139. *
  140. * @param aArray is the string array to output.
  141. * @return the wxArrayString contents in a formatted string for debugging output.
  142. */
  143. extern wxString dump( const wxArrayString& aArray );
  144. #endif // _TRACE_HELPERS_H_