2018-04-17 16:25:19 +00:00
|
|
|
/*
|
|
|
|
* This program source code file is part of KiCad, a free EDA CAD application.
|
|
|
|
*
|
|
|
|
* Copyright (C) 2018 Wayne Stambaugh <stambaughw@gmail.com>
|
2020-04-26 20:53:29 +00:00
|
|
|
* Copyright (C) 2018-2020 KiCad Developers, see change_log.txt for contributors.
|
2018-04-17 16:25:19 +00:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, you may find one here:
|
|
|
|
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
|
|
|
* or you may search the http://www.gnu.org website for the version 2 license,
|
|
|
|
* or you may write to the Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @file trace_helpers.h
|
|
|
|
* @brief wxLogTrace helper definitions.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _TRACE_HELPERS_H_
|
|
|
|
#define _TRACE_HELPERS_H_
|
|
|
|
|
2018-11-22 16:24:17 +00:00
|
|
|
#include <wx/arrstr.h>
|
|
|
|
#include <wx/event.h>
|
|
|
|
#include <wx/string.h>
|
|
|
|
|
2018-04-17 16:25:19 +00:00
|
|
|
/**
|
|
|
|
* @defgroup trace_env_vars Trace Environment Variables
|
|
|
|
*
|
|
|
|
* wxWidgets provides trace control of debug messages using the WXTRACE environment variable.
|
|
|
|
* This section defines the strings passed to WXTRACE to for debug output control of various
|
|
|
|
* sections of the KiCad code. See the wxWidgets <a href="http://docs.wxwidgets.org/3.0/
|
|
|
|
* group__group__funcmacro__log.html#ga947e317db477914c12b13c4534867ec9"> wxLogTrace </a>
|
|
|
|
* documentation for more information.
|
|
|
|
*/
|
|
|
|
|
|
|
|
///@{
|
|
|
|
/// \ingroup trace_env_vars
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Flag to enable find debug tracing.
|
2018-11-26 16:25:12 +00:00
|
|
|
*
|
|
|
|
* Use "KICAD_FIND_ITEM" to enable.
|
2018-04-17 16:25:19 +00:00
|
|
|
*/
|
|
|
|
extern const wxChar* const traceFindItem;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Flag to enable find and replace debug tracing.
|
2018-11-26 16:25:12 +00:00
|
|
|
*
|
|
|
|
* Use "KICAD_FIND_REPLACE" to enable.
|
2018-04-17 16:25:19 +00:00
|
|
|
*/
|
|
|
|
extern const wxChar* const traceFindReplace;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Flag to enable draw panel coordinate debug tracing.
|
2018-11-26 16:25:12 +00:00
|
|
|
*
|
|
|
|
* Use "KICAD_COORDS" to enable.
|
2018-04-17 16:25:19 +00:00
|
|
|
*/
|
|
|
|
extern const wxChar* const kicadTraceCoords;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Flag to enable wxKeyEvent debug tracing.
|
2018-11-26 16:25:12 +00:00
|
|
|
*
|
|
|
|
* Use "KICAD_KEY_EVENTS" to enable.
|
2018-04-17 16:25:19 +00:00
|
|
|
*/
|
|
|
|
extern const wxChar* const kicadTraceKeyEvent;
|
|
|
|
|
2019-07-27 14:11:41 +00:00
|
|
|
/**
|
|
|
|
* Flag to enable tracing of the tool handling stack.
|
|
|
|
*
|
|
|
|
* Use "KICAD_TOOL_STACK" to enable.
|
|
|
|
*/
|
|
|
|
extern const wxChar* const kicadTraceToolStack;
|
|
|
|
|
2018-04-17 16:25:19 +00:00
|
|
|
/**
|
|
|
|
* Flag to enable auto save feature debug tracing.
|
2018-11-26 16:25:12 +00:00
|
|
|
*
|
|
|
|
* Use "KICAD_AUTOSAVE" to enable.
|
2018-04-17 16:25:19 +00:00
|
|
|
*/
|
|
|
|
extern const wxChar* const traceAutoSave;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Flag to enable schematic library memory deletion debug output.
|
2018-11-26 16:25:12 +00:00
|
|
|
*
|
|
|
|
* Use "KICAD_SCH_LIB_MEM" to enable.
|
2018-04-17 16:25:19 +00:00
|
|
|
*/
|
|
|
|
extern const wxChar* const traceSchLibMem;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Flag to enable legacy schematic plugin debug output.
|
2018-11-26 16:25:12 +00:00
|
|
|
*
|
|
|
|
* Use "KICAD_SCH_LEGACY_PLUGIN" to enable.
|
2018-04-17 16:25:19 +00:00
|
|
|
*/
|
|
|
|
extern const wxChar* const traceSchLegacyPlugin;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Flag to enable GEDA PCB plugin debug output.
|
2018-11-26 16:25:12 +00:00
|
|
|
*
|
|
|
|
* Use "KICAD_PCB_PLUGIN" to enable.
|
2018-04-17 16:25:19 +00:00
|
|
|
*/
|
|
|
|
extern const wxChar* const traceKicadPcbPlugin;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Flag to enable GEDA PCB plugin debug output.
|
2018-11-26 16:25:12 +00:00
|
|
|
*
|
|
|
|
* Use "KICAD_GEDA_PLUGIN" to enable.
|
2018-04-17 16:25:19 +00:00
|
|
|
*/
|
|
|
|
extern const wxChar* const traceGedaPcbPlugin;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Flag to enable print controller debug output.
|
2018-11-26 16:25:12 +00:00
|
|
|
*
|
|
|
|
* Use "KICAD_PRINT" to enable.
|
2018-04-17 16:25:19 +00:00
|
|
|
*/
|
|
|
|
extern const wxChar* const tracePrinting;
|
|
|
|
|
2018-04-30 19:17:34 +00:00
|
|
|
/**
|
|
|
|
* Flag to enable path and file name debug output.
|
2018-11-26 16:25:12 +00:00
|
|
|
*
|
|
|
|
* Use "KICAD_PATHS_AND_FILES" to enable.
|
2018-04-30 19:17:34 +00:00
|
|
|
*/
|
|
|
|
extern const wxChar* const tracePathsAndFiles;
|
|
|
|
|
2018-10-17 19:03:33 +00:00
|
|
|
/**
|
|
|
|
* Flag to enable locale debug output.
|
2018-11-26 16:25:12 +00:00
|
|
|
*
|
|
|
|
* Use "KICAD_LOCALE" to enable.
|
2018-10-17 19:03:33 +00:00
|
|
|
*/
|
|
|
|
extern const wxChar* const traceLocale;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Flag to enable debug output of #BASE_SCREEN and it's derivatives.
|
2018-11-26 16:25:12 +00:00
|
|
|
*
|
|
|
|
* Use "KICAD_SCREEN" to enable.
|
2018-10-17 19:03:33 +00:00
|
|
|
*/
|
|
|
|
extern const wxChar* const traceScreen;
|
|
|
|
|
2020-04-17 23:32:29 +00:00
|
|
|
/**
|
|
|
|
* Flag to enable debug output of display positioning logic.
|
|
|
|
*
|
|
|
|
* Use "KICAD_DISPLAY_LOCATION" to enable.
|
|
|
|
*/
|
|
|
|
extern const wxChar* const traceDisplayLocation;
|
|
|
|
|
2018-11-22 16:24:17 +00:00
|
|
|
/**
|
|
|
|
* Flag to enable debug output of zoom-scrolling calculations in
|
2018-11-26 16:25:12 +00:00
|
|
|
* #KIGFX::ZOOM_CONTROLLER and derivatives.
|
|
|
|
*
|
|
|
|
* Use "KICAD_ZOOM_SCROLL" to enable.
|
2018-11-22 16:24:17 +00:00
|
|
|
*/
|
|
|
|
extern const wxChar* const traceZoomScroll;
|
|
|
|
|
2019-04-30 17:03:19 +00:00
|
|
|
/**
|
|
|
|
* Flag to enable debug output of symbol library resolver results
|
|
|
|
*
|
|
|
|
* Use "KICAD_SYM_RESOLVE" to enable.
|
|
|
|
*/
|
|
|
|
extern const wxChar* const traceSymbolResolver;
|
|
|
|
|
2020-04-26 20:53:29 +00:00
|
|
|
/**
|
|
|
|
* Flag to enable debug output of schematic symbol sheet path manipulation code.
|
|
|
|
*
|
|
|
|
* Use "KICAD_SCH_SHEET_PATHS" to enable.
|
|
|
|
*/
|
|
|
|
extern const wxChar* const traceSchSheetPaths;
|
|
|
|
|
2018-04-17 16:25:19 +00:00
|
|
|
///@}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Debug helper for printing wxKeyEvent information.
|
|
|
|
*
|
|
|
|
* @param aEvent is the wxKeyEvent to generate the print string from.
|
|
|
|
* @return the wxKeyEvent information.
|
|
|
|
*/
|
|
|
|
extern wxString dump( const wxKeyEvent& aEvent );
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Debug helper for printing wxArrayString contents.
|
|
|
|
*
|
|
|
|
* @param aArray is the string array to output.
|
|
|
|
* @return the wxArrayString contents in a formatted string for debugging output.
|
|
|
|
*/
|
|
|
|
extern wxString dump( const wxArrayString& aArray );
|
|
|
|
|
|
|
|
#endif // _TRACE_HELPERS_H_
|