KiCad PCB EDA Suite
Loading...
Searching...
No Matches
advanced_config.cpp
Go to the documentation of this file.
1/*
2 * This program source code file is part of KiCad, a free EDA CAD application.
3 *
4 * Copyright The 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, see <https://www.gnu.org/licenses/>.
18 */
19
20#include <advanced_config.h>
21#include <trace_helpers.h>
22#include <config_params.h>
23#include <paths.h>
24
25#include <wx/app.h>
26#include <wx/config.h>
27#include <wx/filename.h>
28#include <wx/log.h>
29#include <wx/tokenzr.h>
30
38static const wxChar AdvancedConfigMask[] = wxT( "KICAD_ADVANCED_CONFIG" );
39
45namespace AC_STACK
46{
47static constexpr int min_stack = 32 * 4096;
48static constexpr int default_stack = 256 * 4096;
49static constexpr int max_stack = 4096 * 4096;
50} // namespace AC_STACK
51
57namespace AC_KEYS
58{
59
60static const wxChar ConnectivityEngine[] = wxT( "ConnectivityEngine" );
61static const wxChar IncrementalConnectivity[] = wxT( "IncrementalConnectivity" );
62static const wxChar Use3DConnexionDriver[] = wxT( "3DConnexionDriver" );
63static const wxChar ExtraFillMargin[] = wxT( "ExtraFillMargin" );
64static const wxChar EnableCreepageSlot[] = wxT( "EnableCreepageSlot" );
65static const wxChar RealtimeCreepage[] = wxT( "RealtimeCreepage" );
66static const wxChar DRCEpsilon[] = wxT( "DRCEpsilon" );
67static const wxChar DRCSliverWidthTolerance[] = wxT( "DRCSliverWidthTolerance" );
68static const wxChar DRCSliverMinimumLength[] = wxT( "DRCSliverMinimumLength" );
69static const wxChar DRCSliverAngleTolerance[] = wxT( "DRCSliverAngleTolerance" );
70static const wxChar HoleWallThickness[] = wxT( "HoleWallPlatingThickness" );
71static const wxChar CoroutineStackSize[] = wxT( "CoroutineStackSize" );
72static const wxChar ShowRouterDebugGraphics[] = wxT( "ShowRouterDebugGraphics" );
73static const wxChar EnableRouterDump[] = wxT( "EnableRouterDump" );
74static const wxChar HyperZoom[] = wxT( "HyperZoom" );
75static const wxChar CompactFileSave[] = wxT( "CompactSave" );
76static const wxChar DrawArcAccuracy[] = wxT( "DrawArcAccuracy" );
77static const wxChar DrawArcCenterStartEndMaxAngle[] = wxT( "DrawArcCenterStartEndMaxAngle" );
78static const wxChar MaxTangentTrackAngleDeviation[] = wxT( "MaxTangentTrackAngleDeviation" );
79static const wxChar MaxTrackLengthToKeep[] = wxT( "MaxTrackLengthToKeep" );
80static const wxChar StrokeTriangulation[] = wxT( "StrokeTriangulation" );
81static const wxChar ExtraZoneDisplayModes[] = wxT( "ExtraZoneDisplayModes" );
82static const wxChar MinPlotPenWidth[] = wxT( "MinPlotPenWidth" );
83static const wxChar DebugZoneFiller[] = wxT( "DebugZoneFiller" );
84static const wxChar DebugPDFWriter[] = wxT( "DebugPDFWriter" );
85static const wxChar PDFStrokeFontWidthFactor[] = wxT( "PDFStrokeFontWidthFactor" );
86static const wxChar PDFStrokeFontXOffset[] = wxT( "PDFStrokeFontXOffset" );
87static const wxChar PDFStrokeFontYOffset[] = wxT( "PDFStrokeFontYOffset" );
88static const wxChar PDFStrokeFontBoldMultiplier[] = wxT( "PDFStrokeFontBoldMultiplier" );
89static const wxChar PDFStrokeFontKerningFactor[] = wxT( "PDFStrokeFontKerningFactor" );
90static const wxChar UsePdfPrint[] = wxT( "UsePdfPrint" );
91static const wxChar SmallDrillMarkSize[] = wxT( "SmallDrillMarkSize" );
92static const wxChar HotkeysDumper[] = wxT( "HotkeysDumper" );
93static const wxChar DrawBoundingBoxes[] = wxT( "DrawBoundingBoxes" );
94static const wxChar ShowPcbnewExportNetlist[] = wxT( "ShowPcbnewExportNetlist" );
95static const wxChar Skip3DModelFileCache[] = wxT( "Skip3DModelFileCache" );
96static const wxChar Skip3DModelMemoryCache[] = wxT( "Skip3DModelMemoryCache" );
97static const wxChar HideVersionFromTitle[] = wxT( "HideVersionFromTitle" );
98static const wxChar TraceMasks[] = wxT( "TraceMasks" );
99static const wxChar RouterTestCaseDirectory[] = wxT( "RouterTestCaseDirectory" );
100static const wxChar ShowEventCounters[] = wxT( "ShowEventCounters" );
101static const wxChar AllowManualCanvasScale[] = wxT( "AllowManualCanvasScale" );
102static const wxChar UpdateUIEventInterval[] = wxT( "UpdateUIEventInterval" );
103static const wxChar V3DRT_BevelHeight_um[] = wxT( "V3DRT_BevelHeight_um" );
104static const wxChar V3DRT_BevelExtentFactor[] = wxT( "V3DRT_BevelExtentFactor" );
105static const wxChar EnablePcbDesignBlocks[] = wxT( "EnablePcbDesignBlocks" );
106static const wxChar EnableGenerators[] = wxT( "EnableGenerators" );
107static const wxChar EnableLibWithText[] = wxT( "EnableLibWithText" );
108static const wxChar EnableLibDir[] = wxT( "EnableLibDir" );
109static const wxChar DisambiguationTime[] = wxT( "DisambiguationTime" );
110static const wxChar PcbSelectionVisibilityRatio[] = wxT( "PcbSelectionVisibilityRatio" );
111static const wxChar FontErrorSize[] = wxT( "FontErrorSize" );
112static const wxChar OcePluginLinearDeflection[] = wxT( "OcePluginLinearDeflection" );
113static const wxChar OcePluginAngularDeflection[] = wxT( "OcePluginAngularDeflection" );
114static const wxChar TriangulateSimplificationLevel[] = wxT( "TriangulateSimplificationLevel" );
115static const wxChar TriangulateMinimumArea[] = wxT( "TriangulateMinimumArea" );
116static const wxChar EnableCacheFriendlyFracture[] = wxT( "EnableCacheFriendlyFracture" );
117static const wxChar EnableFractureEdgeIndex[] = wxT( "EnableFractureEdgeIndex" );
118static const wxChar TriangulateDelaunayRefine[] = wxT( "TriangulateDelaunayRefine" );
119static const wxChar EnableAPILogging[] = wxT( "EnableAPILogging" );
120static const wxChar MaxFileSystemWatchers[] = wxT( "MaxFileSystemWatchers" );
121static const wxChar MinorSchematicGraphSize[] = wxT( "MinorSchematicGraphSize" );
122static const wxChar ResolveTextRecursionDepth[] = wxT( "ResolveTextRecursionDepth" );
123static const wxChar EnableExtensionSnaps[] = wxT( "EnableExtensionSnaps" );
124static const wxChar ExtensionSnapTimeoutMs[] = wxT( "ExtensionSnapTimeoutMs" );
125static const wxChar ExtensionSnapActivateOnHover[] = wxT( "ExtensionSnapActivateOnHover" );
126static const wxChar EnableSnapAnchorsDebug[] = wxT( "EnableSnapAnchorsDebug" );
127static const wxChar SnapHysteresis[] = wxT( "SnapHysteresis" );
128static const wxChar SnapToAnchorMargin[] = wxT( "SnapToAnchorMargin" );
129static const wxChar MinParallelAngle[] = wxT( "MinParallelAngle" );
130static const wxChar HoleWallPaintingMultiplier[] = wxT( "HoleWallPaintingMultiplier" );
131static const wxChar MsgPanelShowUuids[] = wxT( "MsgPanelShowUuids" );
132static const wxChar MaximumThreads[] = wxT( "MaximumThreads" );
134 wxT( "NetInspectorBulkUpdateOptimisationThreshold" );
135static const wxChar ExcludeFromSimulationLineWidth[] = wxT( "ExcludeFromSimulationLineWidth" );
136static const wxChar SimulatorMultiRunCombinationLimit[] = wxT( "SimulatorMultiRunCombinationLimit" );
137static const wxChar GitIconRefreshInterval[] = wxT( "GitIconRefreshInterval" );
138static const wxChar MaxPastedTextLength[] = wxT( "MaxPastedTextLength" );
139static const wxChar PNSProcessClusterTimeout[] = wxT( "PNSProcessClusterTimeout" );
140static const wxChar FollowBranchTimeout[] = wxT( "FollowBranchTimeoutMs" );
141static const wxChar ImportSkipComponentBodies[] = wxT( "ImportSkipComponentBodies" );
142static const wxChar ImportSkipLayerMapping[] = wxT( "ImportSkipLayerMapping" );
143static const wxChar ScreenDPI[] = wxT( "ScreenDPI" );
144static const wxChar EnableUseAuiPerspective[] = wxT( "EnableUseAuiPerspective" );
145static const wxChar HistoryLockStaleTimeout[] = wxT( "HistoryLockStaleTimeout" );
146static const wxChar ZoneFillIterativeRefill[] = wxT( "ZoneFillIterativeRefill" );
147static const wxChar PadsPcbTextHeightScale[] = wxT( "PadsPcbTextHeightScale" );
148static const wxChar PadsPcbTextWidthScale[] = wxT( "PadsPcbTextWidthScale" );
149static const wxChar PadsSchTextHeightScale[] = wxT( "PadsSchTextHeightScale" );
150static const wxChar PadsSchTextWidthScale[] = wxT( "PadsSchTextWidthScale" );
151static const wxChar PadsTextAnchorOffsetNm[] = wxT( "PadsTextAnchorOffsetNm" );
152static const wxChar PcbImportMinObjectSizeNm[] = wxT( "PcbImportMinObjectSizeNm" );
153static const wxChar DiffSkewOverlayTrackInflation[] = wxT( "DiffSkewOverlayTrackInflation" );
154static const wxChar DiffSkewTrackGapInflation[] = wxT( "DiffSkewTrackGapInflation" );
155static const wxChar DiffSkewCosThetaParallelTestValue[] = wxT( "DiffSkewCosThetaParallelTestValue" );
156static const wxChar DiffSkewColourInterpolationLogStrength[] = wxT( "DiffSkewColourInterpolationLogStrength" );
157static const wxChar DiffSkewTargetDiffSegmentSize[] = wxT( "DiffSkewTargetDiffSegmentSize" );
158static const wxChar EagleImportFieldsCanAutoplace[] = wxT( "EagleImportFieldsCanAutoplace" );
159static const wxChar EnableGLResetRecovery[] = wxT( "EnableGLResetRecovery" );
160
161
162} // namespace AC_KEYS
163
164
169namespace AC_GROUPS
170{
171static const wxChar V3D_RayTracing[] = wxT( "G_3DV_RayTracing" );
172}
173
174/*
175 * Get a simple string for common parameters.
176 *
177 * This isn't exhaustive, but it covers most common types that might be
178 * used in the advance config
179 */
180wxString dumpParamCfg( const PARAM_CFG& aParam )
181{
182 wxString s = aParam.m_Ident + wxS( ": " );
183
184 /*
185 * This implementation is rather simplistic, but it is
186 * effective enough for simple uses. A better implementation would be
187 * some kind of visitor, but that's somewhat more work.
188 */
189 switch( aParam.m_Type )
190 {
192 case paramcfg_id::PARAM_INT_WITH_SCALE: s << *static_cast<const PARAM_CFG_INT&>( aParam ).m_Pt_param; break;
193 case paramcfg_id::PARAM_DOUBLE: s << *static_cast<const PARAM_CFG_DOUBLE&>( aParam ).m_Pt_param; break;
194 case paramcfg_id::PARAM_WXSTRING: s << *static_cast<const PARAM_CFG_WXSTRING&>( aParam ).m_Pt_param; break;
195 case paramcfg_id::PARAM_FILENAME: s << *static_cast<const PARAM_CFG_FILENAME&>( aParam ).m_Pt_param; break;
197 s << ( *static_cast<const PARAM_CFG_BOOL&>( aParam ).m_Pt_param ? wxS( "true" ) : wxS( "false" ) );
198 break;
199 default: s << wxS( "Unsupported PARAM_CFG variant: " ) << aParam.m_Type;
200 }
201
202 return s;
203}
204
205
209static void dumpCfg( const std::vector<std::unique_ptr<PARAM_CFG>>& aArray )
210{
211 // only dump if we need to
212 if( !wxLog::IsAllowedTraceMask( AdvancedConfigMask ) )
213 return;
214
215 for( const auto& param : aArray )
216 {
217 wxLogTrace( AdvancedConfigMask, dumpParamCfg( *param ) );
218 }
219}
220
221
227static wxFileName getAdvancedCfgFilename()
228{
229 const static wxString cfg_filename{ wxS( "kicad_advanced" ) };
230 return wxFileName( PATHS::GetUserSettingsPath(), cfg_filename );
231}
232
233
235{
236 wxLogTrace( AdvancedConfigMask, wxS( "Init advanced config" ) );
237
238 // Init defaults - this is done in case the config doesn't exist,
239 // then the values will remain as set here.
242 m_EnableRouterDump = false;
243 m_HyperZoom = false;
244 m_DrawArcAccuracy = 10.0;
247 m_MaxTrackLengthToKeep = 0.0005;
250
251 m_ExtraClearance = 0.0005;
252 m_EnableCreepageSlot = false;
253 m_RealtimeCreepage = false;
254 m_DRCEpsilon = 0.0005; // 0.5um is small enough not to materially violate
255 // any constraints.
257 m_SliverMinimumLength = 0.0008;
259
260 m_HoleWallThickness = 0.020; // IPC-6012 says 15-18um; Cadence says at least
261 // 0.020 for a Class 2 board and at least 0.025
262 // for Class 3.
263
264 m_MinPlotPenWidth = 0.0212; // 1 pixel at 1200dpi.
265
266 m_DebugZoneFiller = false;
267 m_DebugPDFWriter = false;
268 m_PDFStrokeFontWidthFactor = .12; // default 12% of EM
273 m_UsePdfPrint = false;
275 m_HotkeysDumper = false;
276 m_DrawBoundingBoxes = false;
282 m_ShowEventCounters = false;
284 m_CompactSave = false;
287 m_EnableGenerators = false;
288 m_EnableLibWithText = false;
289 m_EnableLibDir = false;
290
292 m_3DRT_BevelExtentFactor = 1.0 / 16.0;
293
294 m_EnableAPILogging = false;
295
297
300
302
304
305 m_FontErrorSize = 2;
306
309
312
316
318
320
322
324
331
332 m_MinParallelAngle = 0.001;
334
336
338
341
343
345
346 m_PNSProcessClusterTimeout = 100; // Default: 100 ms
347 m_FollowBranchTimeout = 500; // Default: 500 ms
348
351
352 m_ScreenDPI = 91;
353
355 m_HistoryLockStaleTimeout = 300; // 5 minutes default
357
364
370
372
374}
375
376
378{
379 static ADVANCED_CFG instance;
380 return instance;
381}
382
383
388
389
391{
392 wxFileName k_advanced = getAdvancedCfgFilename();
393 wxFileConfig file_cfg( wxS( "" ), wxS( "" ), k_advanced.GetFullPath() );
394
395 wxConfigSaveSetups( &file_cfg, m_entries );
396}
397
398
400{
401 const wxFileName k_advanced = getAdvancedCfgFilename();
402
403 // If we are running headless, use the class defaults because we cannot instantiate wxConfig
404 if( !wxTheApp )
405 return;
406
407 if( !k_advanced.FileExists() )
408 {
409 wxLogTrace( AdvancedConfigMask, wxS( "File does not exist %s" ), k_advanced.GetFullPath() );
410
411 // load the defaults
412 wxConfig emptyConfig;
413 loadSettings( emptyConfig );
414
415 return;
416 }
417
418 wxLogTrace( AdvancedConfigMask, wxS( "Loading advanced config from: %s" ), k_advanced.GetFullPath() );
419
420 wxFileConfig file_cfg( wxS( "" ), wxS( "" ), k_advanced.GetFullPath() );
421 loadSettings( file_cfg );
422}
423
424
425void ADVANCED_CFG::loadSettings( wxConfigBase& aCfg )
426{
427 m_entries.clear();
428
429 m_entries.push_back( std::make_unique<PARAM_CFG_DOUBLE>( true, AC_KEYS::ExtraFillMargin,
430 &m_ExtraClearance, m_ExtraClearance, 0.0, 1.0 ) );
431
432 m_entries.push_back( std::make_unique<PARAM_CFG_BOOL>( true, AC_KEYS::EnableCreepageSlot,
434
435 m_entries.push_back( std::make_unique<PARAM_CFG_BOOL>( true, AC_KEYS::RealtimeCreepage,
437
438 m_entries.push_back( std::make_unique<PARAM_CFG_DOUBLE>( true, AC_KEYS::DRCEpsilon,
439 &m_DRCEpsilon, m_DRCEpsilon, 1e-6, 1e-2 ) );
440
441 m_entries.push_back( std::make_unique<PARAM_CFG_DOUBLE>( true, AC_KEYS::DRCSliverWidthTolerance,
443
444 m_entries.push_back( std::make_unique<PARAM_CFG_DOUBLE>( true, AC_KEYS::DRCSliverMinimumLength,
446
447 m_entries.push_back( std::make_unique<PARAM_CFG_DOUBLE>( true, AC_KEYS::DRCSliverAngleTolerance,
449
450 m_entries.push_back( std::make_unique<PARAM_CFG_DOUBLE>( true, AC_KEYS::HoleWallThickness,
452
453 m_entries.push_back( std::make_unique<PARAM_CFG_INT>( true, AC_KEYS::CoroutineStackSize,
455
456 m_entries.push_back( std::make_unique<PARAM_CFG_INT>( true, AC_KEYS::UpdateUIEventInterval,
458
459 m_entries.push_back( std::make_unique<PARAM_CFG_BOOL>( true, AC_KEYS::ShowRouterDebugGraphics,
461
462 m_entries.push_back( std::make_unique<PARAM_CFG_BOOL>( true, AC_KEYS::EnableRouterDump,
464
465 m_entries.push_back( std::make_unique<PARAM_CFG_BOOL>( true, AC_KEYS::HyperZoom,
467
468 m_entries.push_back( std::make_unique<PARAM_CFG_BOOL>( true, AC_KEYS::CompactFileSave,
470
471 m_entries.push_back( std::make_unique<PARAM_CFG_DOUBLE>( true, AC_KEYS::DrawArcAccuracy,
472 &m_DrawArcAccuracy, m_DrawArcAccuracy, 0.0, 100000.0 ) );
473
474 m_entries.push_back( std::make_unique<PARAM_CFG_DOUBLE>( true, AC_KEYS::DrawArcCenterStartEndMaxAngle,
476
477 m_entries.push_back( std::make_unique<PARAM_CFG_DOUBLE>( true, AC_KEYS::MaxTangentTrackAngleDeviation,
479
480 m_entries.push_back( std::make_unique<PARAM_CFG_DOUBLE>( true, AC_KEYS::MaxTrackLengthToKeep,
482
483 m_entries.push_back( std::make_unique<PARAM_CFG_BOOL>( true, AC_KEYS::ExtraZoneDisplayModes,
485
486 m_entries.push_back( std::make_unique<PARAM_CFG_BOOL>( true, AC_KEYS::StrokeTriangulation,
488
489 m_entries.push_back( std::make_unique<PARAM_CFG_DOUBLE>( true, AC_KEYS::MinPlotPenWidth,
490 &m_MinPlotPenWidth, m_MinPlotPenWidth, 0.0, 1.0 ) );
491
492 m_entries.push_back( std::make_unique<PARAM_CFG_BOOL>( true, AC_KEYS::DebugZoneFiller,
494
495 m_entries.push_back( std::make_unique<PARAM_CFG_BOOL>( true, AC_KEYS::DebugPDFWriter,
497
498 m_entries.push_back( std::make_unique<PARAM_CFG_DOUBLE>( true, AC_KEYS::PDFStrokeFontWidthFactor,
500
501 m_entries.push_back( std::make_unique<PARAM_CFG_DOUBLE>( true, AC_KEYS::PDFStrokeFontXOffset,
503
504 m_entries.push_back( std::make_unique<PARAM_CFG_DOUBLE>( true, AC_KEYS::PDFStrokeFontYOffset,
506
507 m_entries.push_back( std::make_unique<PARAM_CFG_DOUBLE>( true, AC_KEYS::PDFStrokeFontBoldMultiplier,
509
510 m_entries.push_back( std::make_unique<PARAM_CFG_DOUBLE>( true, AC_KEYS::PDFStrokeFontKerningFactor,
512
513 m_entries.push_back( std::make_unique<PARAM_CFG_BOOL>( true, AC_KEYS::UsePdfPrint,
515
516 m_entries.push_back( std::make_unique<PARAM_CFG_DOUBLE>( true, AC_KEYS::SmallDrillMarkSize,
518
519 m_entries.push_back( std::make_unique<PARAM_CFG_BOOL>( true, AC_KEYS::HotkeysDumper,
521
522 m_entries.push_back( std::make_unique<PARAM_CFG_BOOL>( true, AC_KEYS::DrawBoundingBoxes,
524
525 m_entries.push_back( std::make_unique<PARAM_CFG_BOOL>( true, AC_KEYS::ShowPcbnewExportNetlist,
527
528 m_entries.push_back( std::make_unique<PARAM_CFG_BOOL>( true, AC_KEYS::Skip3DModelFileCache,
530
531 m_entries.push_back( std::make_unique<PARAM_CFG_BOOL>( true, AC_KEYS::Skip3DModelMemoryCache,
533
534 m_entries.push_back( std::make_unique<PARAM_CFG_BOOL>( true, AC_KEYS::HideVersionFromTitle,
536
537 m_entries.push_back( std::make_unique<PARAM_CFG_BOOL>( true, AC_KEYS::ShowEventCounters,
539
540 m_entries.push_back( std::make_unique<PARAM_CFG_BOOL>( true, AC_KEYS::AllowManualCanvasScale,
542
543 m_entries.push_back( std::make_unique<PARAM_CFG_INT>( true, AC_KEYS::V3DRT_BevelHeight_um,
544 &m_3DRT_BevelHeight_um, m_3DRT_BevelHeight_um, 0, std::numeric_limits<int>::max(),
546
547 m_entries.push_back( std::make_unique<PARAM_CFG_DOUBLE>( true, AC_KEYS::V3DRT_BevelExtentFactor,
549
550 m_entries.push_back( std::make_unique<PARAM_CFG_BOOL>( true, AC_KEYS::Use3DConnexionDriver,
552
553 m_entries.push_back( std::make_unique<PARAM_CFG_BOOL>( true, AC_KEYS::ConnectivityEngine,
555
556 m_entries.push_back( std::make_unique<PARAM_CFG_BOOL>( true, AC_KEYS::IncrementalConnectivity,
558
559 m_entries.push_back( std::make_unique<PARAM_CFG_INT>( true, AC_KEYS::DisambiguationTime,
561
562 m_entries.push_back( std::make_unique<PARAM_CFG_BOOL>( true, AC_KEYS::EnablePcbDesignBlocks,
564
565 m_entries.push_back( std::make_unique<PARAM_CFG_BOOL>( true, AC_KEYS::EnableGenerators,
567
568 m_entries.push_back( std::make_unique<PARAM_CFG_BOOL>( true, AC_KEYS::EnableAPILogging,
570
571 m_entries.push_back( std::make_unique<PARAM_CFG_BOOL>( true, AC_KEYS::EnableLibWithText,
573
574 m_entries.push_back( std::make_unique<PARAM_CFG_BOOL>( true, AC_KEYS::EnableLibDir,
576
577 m_entries.push_back( std::make_unique<PARAM_CFG_DOUBLE>( true, AC_KEYS::PcbSelectionVisibilityRatio,
579
580 m_entries.push_back( std::make_unique<PARAM_CFG_DOUBLE>( true, AC_KEYS::FontErrorSize,
581 &m_FontErrorSize, m_FontErrorSize, 0.01, 100 ) );
582
583 m_entries.push_back( std::make_unique<PARAM_CFG_DOUBLE>( true, AC_KEYS::OcePluginLinearDeflection,
585
586 m_entries.push_back( std::make_unique<PARAM_CFG_DOUBLE>( true, AC_KEYS::OcePluginAngularDeflection,
588
589 m_entries.push_back( std::make_unique<PARAM_CFG_INT>( true, AC_KEYS::TriangulateSimplificationLevel,
591
592 m_entries.push_back( std::make_unique<PARAM_CFG_INT>( true, AC_KEYS::TriangulateMinimumArea,
594
595 m_entries.push_back( std::make_unique<PARAM_CFG_BOOL>( true, AC_KEYS::EnableCacheFriendlyFracture,
597
598 m_entries.push_back( std::make_unique<PARAM_CFG_BOOL>( true, AC_KEYS::EnableFractureEdgeIndex,
600
601 m_entries.push_back( std::make_unique<PARAM_CFG_BOOL>( true, AC_KEYS::TriangulateDelaunayRefine,
603
604 m_entries.push_back( std::make_unique<PARAM_CFG_BOOL>( true, AC_KEYS::EnableGLResetRecovery,
606
607 m_entries.push_back( std::make_unique<PARAM_CFG_INT>( true, AC_KEYS::MaxFileSystemWatchers,
609
610 m_entries.push_back( std::make_unique<PARAM_CFG_INT>( true, AC_KEYS::MinorSchematicGraphSize,
612
613 m_entries.push_back( std::make_unique<PARAM_CFG_INT>( true, AC_KEYS::ResolveTextRecursionDepth,
615
616 m_entries.push_back( std::make_unique<PARAM_CFG_BOOL>( true, AC_KEYS::EnableExtensionSnaps,
618
619 m_entries.push_back( std::make_unique<PARAM_CFG_INT>( true, AC_KEYS::ExtensionSnapTimeoutMs,
621
622 m_entries.push_back( std::make_unique<PARAM_CFG_BOOL>( true, AC_KEYS::ExtensionSnapActivateOnHover,
624
625 m_entries.push_back( std::make_unique<PARAM_CFG_BOOL>( true, AC_KEYS::EnableSnapAnchorsDebug,
627
628 m_entries.push_back( std::make_unique<PARAM_CFG_INT>( true, AC_KEYS::SnapHysteresis,
630
631 m_entries.push_back( std::make_unique<PARAM_CFG_DOUBLE>( true, AC_KEYS::SnapToAnchorMargin,
633
634 m_entries.push_back( std::make_unique<PARAM_CFG_DOUBLE>( true, AC_KEYS::MinParallelAngle,
635 &m_MinParallelAngle, m_MinParallelAngle, 0.0, 45.0 ) );
636
637 m_entries.push_back( std::make_unique<PARAM_CFG_DOUBLE>( true, AC_KEYS::HoleWallPaintingMultiplier,
639
640 m_entries.push_back( std::make_unique<PARAM_CFG_INT>( true, AC_KEYS::MsgPanelShowUuids,
642
643 m_entries.push_back( std::make_unique<PARAM_CFG_INT>( true, AC_KEYS::MaximumThreads,
645
646 m_entries.push_back( std::make_unique<PARAM_CFG_INT>( true, AC_KEYS::NetInspectorBulkUpdateOptimisationThreshold,
648 0, 1000 ) );
649
650 m_entries.push_back( std::make_unique<PARAM_CFG_INT>( true, AC_KEYS::ExcludeFromSimulationLineWidth,
652
653 m_entries.push_back( std::make_unique<PARAM_CFG_INT>( true, AC_KEYS::SimulatorMultiRunCombinationLimit,
655
656 m_entries.push_back( std::make_unique<PARAM_CFG_INT>( true, AC_KEYS::GitIconRefreshInterval,
658
659 m_entries.push_back( std::make_unique<PARAM_CFG_INT>( true, AC_KEYS::MaxPastedTextLength,
661
662 m_entries.push_back( std::make_unique<PARAM_CFG_INT>( true, AC_KEYS::PNSProcessClusterTimeout,
663 &m_PNSProcessClusterTimeout, 100, 10, 10000 ) );
664
665 m_entries.push_back( std::make_unique<PARAM_CFG_INT>( true, AC_KEYS::FollowBranchTimeout,
666 &m_FollowBranchTimeout, 500, 50, 5000 ) );
667
668 m_entries.push_back( std::make_unique<PARAM_CFG_BOOL>( true, AC_KEYS::ImportSkipComponentBodies,
670
671 m_entries.push_back( std::make_unique<PARAM_CFG_BOOL>( true, AC_KEYS::ImportSkipLayerMapping,
673
674 m_entries.push_back( std::make_unique<PARAM_CFG_INT>( true, AC_KEYS::ScreenDPI,
675 &m_ScreenDPI, m_ScreenDPI, 50, 500 ) );
676
677 m_entries.push_back( std::make_unique<PARAM_CFG_BOOL>( true, AC_KEYS::EnableUseAuiPerspective,
679
680 m_entries.push_back( std::make_unique<PARAM_CFG_INT>( true, AC_KEYS::HistoryLockStaleTimeout,
681 &m_HistoryLockStaleTimeout, m_HistoryLockStaleTimeout, 10, 86400 ) ); // 10 seconds to 24 hours
682
683 m_entries.push_back( std::make_unique<PARAM_CFG_BOOL>( true, AC_KEYS::ZoneFillIterativeRefill,
685
686 m_entries.push_back( std::make_unique<PARAM_CFG_DOUBLE>( true, AC_KEYS::PadsPcbTextHeightScale,
688
689 m_entries.push_back( std::make_unique<PARAM_CFG_DOUBLE>( true, AC_KEYS::PadsPcbTextWidthScale,
691
692 m_entries.push_back( std::make_unique<PARAM_CFG_DOUBLE>( true, AC_KEYS::PadsSchTextHeightScale,
694
695 m_entries.push_back( std::make_unique<PARAM_CFG_DOUBLE>( true, AC_KEYS::PadsSchTextWidthScale,
697
698 m_entries.push_back( std::make_unique<PARAM_CFG_INT>( true, AC_KEYS::PadsTextAnchorOffsetNm,
700
701 m_entries.push_back( std::make_unique<PARAM_CFG_INT>( true, AC_KEYS::PcbImportMinObjectSizeNm,
703
704 m_entries.push_back( std::make_unique<PARAM_CFG_WXSTRING>( true, AC_KEYS::RouterTestCaseDirectory,
705 &m_RouterTestCaseDirectory, wxS( "" ) ) );
706
707 m_entries.push_back( std::make_unique<PARAM_CFG_DOUBLE>( true, AC_KEYS::DiffSkewOverlayTrackInflation,
709
710 m_entries.push_back( std::make_unique<PARAM_CFG_DOUBLE>( true, AC_KEYS::DiffSkewTrackGapInflation,
712
713 m_entries.push_back( std::make_unique<PARAM_CFG_DOUBLE>( true, AC_KEYS::DiffSkewCosThetaParallelTestValue,
715
716 m_entries.push_back( std::make_unique<PARAM_CFG_DOUBLE>( true, AC_KEYS::DiffSkewColourInterpolationLogStrength,
718
719 m_entries.push_back( std::make_unique<PARAM_CFG_DOUBLE>( true, AC_KEYS::DiffSkewTargetDiffSegmentSize,
721
722 m_entries.push_back( std::make_unique<PARAM_CFG_BOOL>( true, AC_KEYS::EagleImportFieldsCanAutoplace,
724
725
726 // Special case for trace mask setting...we just grab them and set them immediately
727 // Because we even use wxLogTrace inside of advanced config
728 m_entries.push_back( std::make_unique<PARAM_CFG_WXSTRING>( true, AC_KEYS::TraceMasks, &m_traceMasks, wxS( "" ) ) );
729
730
731 // Load the config from file
733
734 // Now actually set the trace masks
735 wxStringTokenizer traceMaskTokenizer( m_traceMasks, ", ", wxTOKEN_STRTOK );
736
737 while( traceMaskTokenizer.HasMoreTokens() )
738 {
739 wxString mask = traceMaskTokenizer.GetNextToken();
740 wxLog::AddTraceMask( mask );
741 }
742
744
745 wxLogTrace( kicadTraceCoroutineStack, wxT( "Using coroutine stack size %d" ), m_CoroutineStackSize );
746}
wxString dumpParamCfg(const PARAM_CFG &aParam)
static void dumpCfg(const std::vector< std::unique_ptr< PARAM_CFG > > &aArray)
Dump the configs in the given array to trace.
static wxFileName getAdvancedCfgFilename()
Get the filename for the advanced config file.
void loadFromConfigFile()
Load the config from the normal configuration file.
void Save()
Save the configuration to the configuration file.
std::vector< std::unique_ptr< PARAM_CFG > > m_entries
void Reload()
Reload the configuration from the configuration file.
void loadSettings(wxConfigBase &aCfg)
Load config from the given configuration base.
static const ADVANCED_CFG & GetCfg()
Get the singleton instance's config, which is shared by all consumers.
A base class which establishes the interface functions ReadParam and SaveParam, which are implemented...
paramcfg_id m_Type
Type of parameter.
wxString m_Ident
Keyword in config data.
static wxString GetUserSettingsPath()
Return the user configuration path used to store KiCad's configuration files.
Definition paths.cpp:624
void wxConfigLoadSetups(wxConfigBase *aCfg, const std::vector< std::unique_ptr< PARAM_CFG > > &aList)
Use aList of PARAM_CFG object to load configuration values from aCfg.
void wxConfigSaveSetups(wxConfigBase *aCfg, const std::vector< std::unique_ptr< PARAM_CFG > > &aList)
Writes aList of PARAM_CFG objects to aCfg.
@ PARAM_WXSTRING
@ PARAM_INT_WITH_SCALE
@ PARAM_INT
@ PARAM_FILENAME
@ PARAM_DOUBLE
@ PARAM_BOOL
double m_DiffSkewColourInterpolationLogStrength
The logarithmic weighting factor to apply to colour interpolation in the diff phase overlay tool.
bool m_Skip3DModelFileCache
Skip reading/writing 3D model file caches.
bool m_EnableUseAuiPerspective
Enable use Aui Perspective to store/load geometry of main editor frames.
double m_DiffSkewTrackGapInflation
The multiplier of constraint diff pair gap to allow identification of coupled track segments in the d...
double m_DrawArcCenterMaxAngle
When drawing an arc, the angle ( center - start ) - ( start - end ) can be limited to avoid extremely...
int m_DisambiguationMenuDelay
The number of milliseconds to wait in a click before showing a disambiguation menu.
int m_ScreenDPI
Screen DPI setting for display calculations.
bool m_EnableLibDir
Enable option to open lib file directory.
double m_MaxTangentAngleDeviation
Maximum angle between the tangent line of an arc track and a connected straight track in order to com...
bool m_EnableFractureEdgeIndex
Index fracture edges by y stripe instead of rescanning every earlier edge for each hole.
bool m_Use3DConnexionDriver
Use the 3DConnexion Driver.
int m_TriangulateSimplificationLevel
The number of internal units that will be allowed to deflect from the base segment when creating a ne...
bool m_RealtimeCreepage
Use the realtime (V2) creepage engine.
bool m_EnableCacheFriendlyFracture
Enable the use of a cache-friendlier and therefore faster version of the polygon fracture algorithm.
double m_PadsSchTextWidthScale
PADS text width scale factor for schematic imports.
bool m_ShowRouterDebugGraphics
Show PNS router debug graphics while routing.
bool m_Skip3DModelMemoryCache
Skip reading/writing 3D model memory caches.
double m_HoleWallPaintingMultiplier
What factor to use when painting via and PTH pad hole walls, so that the painted hole wall can be ove...
bool m_EnableLibWithText
Enable option to load lib files with text editor.
double m_PDFStrokeFontKerningFactor
Kerning (spacing) factor applied to glyph advance (width).
int m_MaximumThreads
Default value for the maximum number of threads to use for parallel processing.
double m_HoleWallThickness
Dimension used to calculate the actual hole size from the finish hole size.
double m_PDFStrokeFontXOffset
Horizontal offset factor applied to stroke font glyph coordinates (in EM units) after to compensate m...
int m_CoroutineStackSize
Configure the coroutine stack size in bytes.
double m_PDFStrokeFontYOffset
Vertical offset factor applied to stroke font glyph coordinates (in EM units) after Y inversion to co...
double m_SmallDrillMarkSize
The diameter of the drill marks on print and plot outputs (in mm) when the "Drill marks" option is se...
wxString m_traceMasks
Trace masks for wxLogTrace, loaded from the config file.
double m_PadsPcbTextWidthScale
PADS text width scale factor for PCB imports.
bool m_EnableGenerators
Enable support for generators.
double m_PadsPcbTextHeightScale
PADS text height scale factor for PCB imports.
bool m_IncrementalConnectivity
Use the new incremental netlister for realtime jobs.
double m_ExtraClearance
When filling zones, we add an extra amount of clearance to each zone to ensure that rounding errors d...
bool m_TriangulateDelaunayRefine
Refine each triangulation toward the constrained Delaunay triangulation with a boundary-preserving ed...
int m_TriangulateMinimumArea
The minimum area of a polygon that can be left over after triangulation and still consider the triang...
bool m_DrawBoundingBoxes
Draw GAL bounding boxes in painters.
bool m_EnableRouterDump
Enable PNS router to dump state information for debug purpose (press 0 while routing)
double m_PDFStrokeFontBoldMultiplier
Multiplier applied to stroke width factor when rendering bold stroke font subsets.
double m_DRCEpsilon
Epsilon for DRC tests.
double m_PDFStrokeFontWidthFactor
Stroke font line width factor relative to EM size for PDF stroke fonts.
int m_PcbImportMinObjectSizeNm
Minimum object size in nanometers for PCB imports.
int m_GitIconRefreshInterval
The interval in milliseconds to refresh the git icons in the project tree.
double m_DiffSkewTargetDiffSegmentSize
The target size (in PCB IU) of diff phase skew gradient overlay segments.
double m_SliverAngleTolerance
Sliver angle to tolerance for DRC.
bool m_AllowManualCanvasScale
Allow manual scaling of canvas.
double m_SliverWidthTolerance
Sliver width tolerance for DRC.
bool m_ImportSkipLayerMapping
Skip the layer mapping step when importing.
double m_OcePluginLinearDeflection
OCE (STEP/IGES) 3D Plugin Tesselation Linear Deflection.
bool m_EnablePcbDesignBlocks
Enable the new PCB Design Blocks feature.
double m_MinParallelAngle
Minimum overlapping angle for which an arc is considered to be parallel to its paired arc.
int m_ExcludeFromSimulationLineWidth
The line width in mils for the exclude from simulation outline.
wxString m_RouterTestCaseDirectory
Router test case directory.
int m_MinorSchematicGraphSize
Set the number of items in a schematic graph for it to be considered "minor".
int m_NetInspectorBulkUpdateOptimisationThreshold
When updating the net inspector, it either recalculates all nets or iterates through items one-by-one...
bool m_ExtraZoneDisplayModes
When true, adds zone-display-modes for stroking the zone fracture boundaries and the zone triangulati...
double m_MinPlotPenWidth
Absolute minimum pen width for plotting.
double m_SliverMinimumLength
Sliver length tolerance for DRC.
double m_MaxTrackLengthToKeep
Maximum track length to keep after doing an arc track resizing operation.
double m_DrawArcAccuracy
Distance from an arc end point and the estimated end point, when rotating from the start point to the...
bool m_HotkeysDumper
Enable the hotkeys dumper feature for generating documentation.
double m_FontErrorSize
Deviation between font's bezier curve ideal and the poligonized curve.
int m_UpdateUIEventInterval
The update interval the wxWidgets sends wxUpdateUIEvents to windows.
int m_PadsTextAnchorOffsetNm
PADS text anchor offset in nanometers for PCB imports.
double m_3DRT_BevelExtentFactor
3D-Viewer raytracing factor applied to Extent.z of the item layer.
double m_OcePluginAngularDeflection
OCE (STEP/IGES) 3D Plugin Tesselation Angular Deflection.
bool m_EnableSnapAnchorsDebug
Enable snap anchors debug visualization.
bool m_ShowPcbnewExportNetlist
Enable exporting board editor netlist to a file for troubleshooting purposes.
double m_DiffSkewCosThetaParallelTestValue
The value of cos(theta) between two tracks used to test for parallelism in the diff phase skew overla...
bool m_ConnectivityEngine
Use the schematic connectivity engine instead of CONNECTION_GRAPH.
int m_ResolveTextRecursionDepth
The number of recursions to resolve text variables.
bool m_ZoneFillIterativeRefill
Enable iterative zone filling to handle isolated islands in higher priority zones.
int m_MaxFilesystemWatchers
Maximum number of filesystem watchers to use.
int m_SnapHysteresis
Hysteresis in pixels used for snap activation and deactivation.
bool m_DebugPDFWriter
A mode that writes PDFs without compression.
int m_SimulatorMultiRunCombinationLimit
Maximum number of tuner combinations simulated when using multi-run mode.
int m_MsgPanelShowUuids
Show UUIDs of items in the message panel.
double m_DiffSkewOverlayTrackInflation
The multiplier of underlying track size applied to the diff phase skew overlay.
int m_PNSProcessClusterTimeout
Timeout for the PNS router's processCluster wallclock timeout, in milliseconds.
int m_FollowBranchTimeout
Timeout for the PNS router's followBranch path search, in milliseconds.
bool m_EnableCreepageSlot
Enable the minimum slot width check for creepage.
bool m_EnableAPILogging
Log IPC API requests and responses.
bool m_ShowEventCounters
Shows debugging event counters in various places.
int m_HistoryLockStaleTimeout
Stale lock timeout for local history repository locks, in seconds.
int m_MaxPastedTextLength
Set the maximum number of characters that can be pasted without warning.
bool m_HyperZoom
Slide the zoom steps over for debugging things "up close".
double m_SnapToAnchorMargin
Margin multiplier for preferring anchors over construction line snaps.
double m_PadsSchTextHeightScale
PADS text height scale factor for schematic imports.
bool m_DrawTriangulationOutlines
Enable drawing the triangulation outlines with a visible color.
bool m_ExtensionSnapActivateOnHover
If extension snaps are enabled, 'activate' items on hover, even if not near a snap point.
bool m_EnableGLResetRecovery
Create OpenGL contexts that report GPU resets so the canvases can rebuild themselves instead of freez...
double m_PcbSelectionVisibilityRatio
Board object selection visibility limit.
int m_3DRT_BevelHeight_um
Set the bevel height of layer items in 3D viewer when ray tracing.
bool m_EnableExtensionSnaps
Enable snap anchors based on item line extensions.
bool m_UsePdfPrint
Use legacy wxWidgets-based printing.
bool m_CompactSave
Save files in compact display mode.
bool m_ImportSkipComponentBodies
Skip importing component bodies when importing some format files, such as Altium.
bool m_EagleImportFieldsCanAutoplace
Default CanAutoplace value for fields imported from EAGLE files.
bool m_HideVersionFromTitle
Hide the build version from the KiCad manager frame title.
int m_ExtensionSnapTimeoutMs
If extension snaps are enabled, this is the timeout in milliseconds before a hovered item gets extens...
bool m_DebugZoneFiller
A mode that dumps the various stages of a F_Cu fill into In1_Cu through In9_Cu.
const wxChar *const kicadTraceCoroutineStack
Flag to enable tracing of the coroutine call stack.
static const wxChar AdvancedConfigMask[]
Flag to enable advanced config debugging.
List of known groups for advanced configuration options.
static const wxChar V3D_RayTracing[]
List of known keys for advanced configuration options.
static const wxChar DebugPDFWriter[]
static const wxChar SimulatorMultiRunCombinationLimit[]
static const wxChar HotkeysDumper[]
static const wxChar EnableAPILogging[]
static const wxChar ExtensionSnapActivateOnHover[]
static const wxChar HideVersionFromTitle[]
static const wxChar PNSProcessClusterTimeout[]
static const wxChar DiffSkewTargetDiffSegmentSize[]
static const wxChar AllowManualCanvasScale[]
static const wxChar SnapHysteresis[]
static const wxChar NetInspectorBulkUpdateOptimisationThreshold[]
static const wxChar EnableFractureEdgeIndex[]
static const wxChar PadsSchTextWidthScale[]
static const wxChar PadsPcbTextWidthScale[]
static const wxChar MaxTangentTrackAngleDeviation[]
static const wxChar MaxTrackLengthToKeep[]
static const wxChar EnableLibDir[]
static const wxChar ShowPcbnewExportNetlist[]
static const wxChar PcbImportMinObjectSizeNm[]
static const wxChar PDFStrokeFontWidthFactor[]
static const wxChar PadsSchTextHeightScale[]
static const wxChar EnablePcbDesignBlocks[]
static const wxChar RouterTestCaseDirectory[]
static const wxChar EnableLibWithText[]
static const wxChar EnableGLResetRecovery[]
static const wxChar DrawBoundingBoxes[]
static const wxChar MaxPastedTextLength[]
static const wxChar EnableGenerators[]
static const wxChar MinPlotPenWidth[]
static const wxChar CoroutineStackSize[]
static const wxChar SnapToAnchorMargin[]
static const wxChar HoleWallThickness[]
static const wxChar DRCSliverWidthTolerance[]
static const wxChar DisambiguationTime[]
static const wxChar HyperZoom[]
static const wxChar DiffSkewCosThetaParallelTestValue[]
static const wxChar IncrementalConnectivity[]
static const wxChar MinParallelAngle[]
static const wxChar DebugZoneFiller[]
static const wxChar OcePluginLinearDeflection[]
static const wxChar StrokeTriangulation[]
static const wxChar CompactFileSave[]
static const wxChar ImportSkipLayerMapping[]
static const wxChar EnableExtensionSnaps[]
static const wxChar DRCSliverAngleTolerance[]
static const wxChar UpdateUIEventInterval[]
static const wxChar V3DRT_BevelHeight_um[]
static const wxChar MinorSchematicGraphSize[]
static const wxChar ShowRouterDebugGraphics[]
static const wxChar PadsTextAnchorOffsetNm[]
static const wxChar FontErrorSize[]
static const wxChar DRCEpsilon[]
static const wxChar HistoryLockStaleTimeout[]
static const wxChar EnableSnapAnchorsDebug[]
static const wxChar ConnectivityEngine[]
static const wxChar V3DRT_BevelExtentFactor[]
static const wxChar EnableRouterDump[]
static const wxChar EagleImportFieldsCanAutoplace[]
static const wxChar DrawArcAccuracy[]
static const wxChar Skip3DModelMemoryCache[]
static const wxChar TriangulateSimplificationLevel[]
static const wxChar ExtraZoneDisplayModes[]
static const wxChar MaxFileSystemWatchers[]
static const wxChar ExcludeFromSimulationLineWidth[]
static const wxChar Skip3DModelFileCache[]
static const wxChar ImportSkipComponentBodies[]
static const wxChar EnableCacheFriendlyFracture[]
static const wxChar HoleWallPaintingMultiplier[]
static const wxChar ZoneFillIterativeRefill[]
static const wxChar ResolveTextRecursionDepth[]
static const wxChar SmallDrillMarkSize[]
static const wxChar EnableCreepageSlot[]
static const wxChar EnableUseAuiPerspective[]
static const wxChar PDFStrokeFontYOffset[]
static const wxChar DiffSkewTrackGapInflation[]
static const wxChar DiffSkewColourInterpolationLogStrength[]
static const wxChar DrawArcCenterStartEndMaxAngle[]
static const wxChar ExtraFillMargin[]
static const wxChar PcbSelectionVisibilityRatio[]
static const wxChar TriangulateMinimumArea[]
static const wxChar PDFStrokeFontKerningFactor[]
static const wxChar OcePluginAngularDeflection[]
static const wxChar ExtensionSnapTimeoutMs[]
static const wxChar PadsPcbTextHeightScale[]
static const wxChar DRCSliverMinimumLength[]
static const wxChar ShowEventCounters[]
static const wxChar RealtimeCreepage[]
static const wxChar UsePdfPrint[]
static const wxChar ScreenDPI[]
static const wxChar PDFStrokeFontXOffset[]
static const wxChar TriangulateDelaunayRefine[]
static const wxChar PDFStrokeFontBoldMultiplier[]
static const wxChar MaximumThreads[]
static const wxChar FollowBranchTimeout[]
static const wxChar GitIconRefreshInterval[]
static const wxChar TraceMasks[]
static const wxChar Use3DConnexionDriver[]
static const wxChar MsgPanelShowUuids[]
static const wxChar DiffSkewOverlayTrackInflation[]
Limits and default settings for the coroutine stack size allowed.
static constexpr int min_stack
static constexpr int max_stack
static constexpr int default_stack
wxLogTrace helper definitions.