KiCad PCB EDA Suite
Loading...
Searching...
No Matches
kicad.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 (C) 2004-2015 Jean-Pierre Charras, jp.charras at wanadoo.fr
5 * Copyright The 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
29
30
31#include <wx/filename.h>
32#include <wx/log.h>
33#include <wx/app.h>
34#include <wx/stdpaths.h>
35#include <wx/msgdlg.h>
36#include <wx/cmdline.h>
37
38#include <env_vars.h>
39#include <file_history.h>
40#include <hotkeys_basic.h>
41#include <kiway.h>
42#include <macros.h>
43#include <paths.h>
44#include <richio.h>
47#include <systemdirsappend.h>
48#include <trace_helpers.h>
50#include <confirm.h>
51
52#include <git/git_backend.h>
53#include <git/libgit_backend.h>
54#include <stdexcept>
55
56#include "pgm_kicad.h"
57#include "kicad_manager_frame.h"
58
59#include <kiplatform/app.h>
61
62#ifdef KICAD_IPC_API
63#include <api/api_server.h>
64#endif
65
66// a dummy to quiet linking with EDA_BASE_FRAME::config();
67#include <kiface_base.h>
69{
70 // This function should never be called. It is only referenced from
71 // EDA_BASE_FRAME::config() and this is only provided to satisfy the linker,
72 // not to be actually called.
73 wxLogFatalError( wxT( "Unexpected call to Kiface() in kicad/kicad.cpp" ) );
74
75 throw std::logic_error( "Unexpected call to Kiface() in kicad/kicad.cpp" );
76}
77
78
80
82{
83 return program;
84}
85
86
88{
89 App().SetAppDisplayName( wxT( "KiCad" ) );
90
91#if defined(DEBUG)
92 wxString absoluteArgv0 = wxStandardPaths::Get().GetExecutablePath();
93
94 if( !wxIsAbsolutePath( absoluteArgv0 ) )
95 {
96 wxLogError( wxT( "No meaningful argv[0]" ) );
97 return false;
98 }
99#endif
100
101 // Initialize the git backend before trying to initialize individual programs
103 GetGitBackend()->Init();
104
105 static const wxCmdLineEntryDesc desc[] = {
106 { wxCMD_LINE_OPTION, "f", "frame", "Frame to load", wxCMD_LINE_VAL_STRING, 0 },
107 { wxCMD_LINE_SWITCH, "n", "new", "New instance of KiCad, does not attempt to load previously open files",
108 wxCMD_LINE_VAL_NONE, 0 },
109#ifndef __WXOSX__
110 { wxCMD_LINE_SWITCH, nullptr, "software-rendering", "Use software rendering instead of OpenGL",
111 wxCMD_LINE_VAL_NONE, 0 },
112#endif
113 { wxCMD_LINE_PARAM, nullptr, nullptr, "File to load", wxCMD_LINE_VAL_STRING,
114 wxCMD_LINE_PARAM_MULTIPLE | wxCMD_LINE_PARAM_OPTIONAL },
115 { wxCMD_LINE_NONE, nullptr, nullptr, nullptr, wxCMD_LINE_VAL_NONE, 0 }
116 };
117
118 wxCmdLineParser parser( App().argc, App().argv );
119 parser.SetDesc( desc );
120 parser.Parse( false );
121
122 FRAME_T appType = KICAD_MAIN_FRAME_T;
123
124 const struct
125 {
126 wxString name;
127 FRAME_T type;
128 } frameTypes[] = { { wxT( "pcb" ), FRAME_PCB_EDITOR },
129 { wxT( "fpedit" ), FRAME_FOOTPRINT_EDITOR },
130 { wxT( "sch" ), FRAME_SCH },
131 { wxT( "calc" ), FRAME_CALC },
132 { wxT( "bm2cmp" ), FRAME_BM2CMP },
133 { wxT( "ds" ), FRAME_PL_EDITOR },
134 { wxT( "gerb" ), FRAME_GERBER },
135 { wxT( "" ), FRAME_T_COUNT } };
136
137 wxString frameName;
138
139 if( parser.Found( "frame", &frameName ) )
140 {
141 appType = FRAME_T_COUNT;
142
143 for( const auto& it : frameTypes )
144 {
145 if( it.name == frameName )
146 appType = it.type;
147 }
148
149 if( appType == FRAME_T_COUNT )
150 {
151 wxLogError( wxT( "Unknown frame: %s" ), frameName );
152 // Clean up
153 OnPgmExit();
154 return false;
155 }
156 }
157
158 if( appType == KICAD_MAIN_FRAME_T )
159 {
160 Kiway.SetCtlBits( KFCTL_CPP_PROJECT_SUITE );
161 }
162 else
163 {
164 Kiway.SetCtlBits( KFCTL_STANDALONE );
165 }
166
167#ifndef __WXMAC__
168 if( parser.Found( "software-rendering" ) )
169 {
170 wxSetEnv( "KICAD_SOFTWARE_RENDERING", "1" );
171 }
172#endif
173
174 bool skipPythonInit = false;
175
176 if( appType == FRAME_BM2CMP || appType == FRAME_PL_EDITOR || appType == FRAME_GERBER
177 || appType == FRAME_CALC )
178 skipPythonInit = true;
179
180 if( !InitPgm( false, skipPythonInit ) )
181 return false;
182
183 m_bm.InitSettings( new KICAD_SETTINGS );
186 m_bm.Init();
187
188 // Add search paths to feed the PGM_KICAD::SysSearch() function,
189 // currently limited in support to only look for project templates
190 {
191 SEARCH_STACK bases;
192
193 SystemDirsAppend( &bases );
194
195 for( unsigned i = 0; i < bases.GetCount(); ++i )
196 {
197 wxFileName fn( bases[i], wxEmptyString );
198
199 // Add KiCad template file path to search path list.
200 fn.AppendDir( wxT( "template" ) );
201
202 // Only add path if exists and can be read by the user.
203 if( fn.DirExists() && fn.IsDirReadable() )
204 m_bm.m_search.AddPaths( fn.GetPath() );
205 }
206
207 // The versioned TEMPLATE_DIR takes precedence over the search stack template path.
208 if( std::optional<wxString> v = ENV_VAR::GetVersionedEnvVarValue( GetLocalEnvVariables(),
209 wxT( "TEMPLATE_DIR" ) ) )
210 {
211 if( !v->IsEmpty() )
212 m_bm.m_search.Insert( *v, 0 );
213 }
214
215 // We've been adding system (installed default) search paths so far, now for user paths
216 // The default user search path is inside KIPLATFORM::ENV::GetDocumentsPath()
217 m_bm.m_search.Insert( PATHS::GetUserTemplatesPath(), 0 );
218
219 // ...but the user can override that default with the KICAD_USER_TEMPLATE_DIR env var
220 ENV_VAR_MAP_CITER it = GetLocalEnvVariables().find( "KICAD_USER_TEMPLATE_DIR" );
221
222 if( it != GetLocalEnvVariables().end() && it->second.GetValue() != wxEmptyString )
223 m_bm.m_search.Insert( it->second.GetValue(), 0 );
224 }
225
226 wxFrame* frame = nullptr;
227 KIWAY_PLAYER* playerFrame = nullptr;
228 KICAD_MANAGER_FRAME* managerFrame = nullptr;
229
230 if( appType == KICAD_MAIN_FRAME_T )
231 {
232 managerFrame = new KICAD_MANAGER_FRAME( nullptr, wxT( "KiCad" ), wxDefaultPosition,
233 wxWindow::FromDIP( wxSize( 775, -1 ), NULL ) );
234 frame = managerFrame;
235 }
236 else
237 {
238 // Use KIWAY to create a top window, which registers its existence also.
239 // "TOP_FRAME" is a macro that is passed on compiler command line from CMake,
240 // and is one of the types in FRAME_T.
241 playerFrame = Kiway.Player( appType, true );
242 frame = playerFrame;
243
244 if( frame == nullptr )
245 {
246 return false;
247 }
248 }
249
250 App().SetTopWindow( frame );
251
252 if( playerFrame )
253 App().SetAppDisplayName( playerFrame->GetAboutTitle() );
254
255 Kiway.SetTop( frame );
256
257 KIPLATFORM::ENV::SetAppDetailsForWindow( frame, '"' + wxStandardPaths::Get().GetExecutablePath() + '"' + " -n",
258 frame->GetTitle() );
259
260 KICAD_SETTINGS* settings = static_cast<KICAD_SETTINGS*>( PgmSettings() );
261
262#ifdef KICAD_IPC_API
263 m_api_server = std::make_unique<KICAD_API_SERVER>();
264 m_api_common_handler = std::make_unique<API_HANDLER_COMMON>();
265 m_api_server->RegisterHandler( m_api_common_handler.get() );
266#endif
267
268 wxString projToLoad;
269
270 HideSplash();
271
272 if( playerFrame && parser.GetParamCount() )
273 {
274 // Now after the frame processing, the rest of the positional args are files
275 std::vector<wxString> fileArgs;
276 /*
277 gerbview handles multiple project data files, i.e. gerber files on
278 cmd line. Others currently do not, they handle only one. For common
279 code simplicity we simply pass all the arguments in however, each
280 program module can do with them what they want, ignore, complain
281 whatever. We don't establish policy here, as this is a multi-purpose
282 launcher.
283 */
284
285 for( size_t i = 0; i < parser.GetParamCount(); i++ )
286 fileArgs.push_back( parser.GetParam( i ) );
287
288 // special attention to a single argument: argv[1] (==argSet[0])
289 if( fileArgs.size() == 1 )
290 {
291 wxFileName argv1( fileArgs[0] );
292
293#if defined( PGM_DATA_FILE_EXT )
294 // PGM_DATA_FILE_EXT, if present, may be different for each compile,
295 // it may come from CMake on the compiler command line, but often does not.
296 // This facility is mostly useful for those program footprints
297 // supporting a single argv[1].
298 if( !argv1.GetExt() )
299 argv1.SetExt( wxT( PGM_DATA_FILE_EXT ) );
300#endif
301 argv1.MakeAbsolute();
302
303 fileArgs[0] = argv1.GetFullPath();
304 }
305
306 // Use the KIWAY_PLAYER::OpenProjectFiles() API function:
307 if( !playerFrame->OpenProjectFiles( fileArgs ) )
308 {
309 // OpenProjectFiles() API asks that it report failure to the UI.
310 // Nothing further to say here.
311
312 // We've already initialized things at this point, but wx won't call OnExit if
313 // we fail out. Call our own cleanup routine here to ensure the relevant resources
314 // are freed at the right time (if they aren't, segfaults will occur).
315 OnPgmExit();
316
317 // Fail the process startup if the file could not be opened,
318 // although this is an optional choice, one that can be reversed
319 // also in the KIFACE specific OpenProjectFiles() return value.
320 return false;
321 }
322 }
323 else if( managerFrame )
324 {
325 if( parser.GetParamCount() > 0 )
326 {
327 wxFileName tmp = parser.GetParam( 0 );
328
329 if( tmp.GetExt() != FILEEXT::ProjectFileExtension && tmp.GetExt() != FILEEXT::LegacyProjectFileExtension )
330 {
331 DisplayErrorMessage( nullptr, wxString::Format( _( "File '%s'\n"
332 "does not appear to be a KiCad project file." ),
333 tmp.GetFullPath() ) );
334 }
335 else
336 {
337 projToLoad = tmp.GetFullPath();
338 }
339 }
340
341 // If no file was given as an argument, check that there was a file open.
342 if( projToLoad.IsEmpty() && settings->m_OpenProjects.size() && !parser.FoundSwitch( "new" ) )
343 {
344 wxString last_pro = settings->m_OpenProjects.front();
345 settings->m_OpenProjects.erase( settings->m_OpenProjects.begin() );
346
347 if( wxFileExists( last_pro ) )
348 {
349 // Try to open the last opened project,
350 // if a project name is not given when starting Kicad
351 projToLoad = last_pro;
352 }
353 }
354
355 // Do not attempt to load a non-existent project file.
356 if( !projToLoad.empty() )
357 {
358 wxFileName fn( projToLoad );
359
360 if( fn.Exists() && ( fn.GetExt() == FILEEXT::ProjectFileExtension
361 || fn.GetExt() == FILEEXT::LegacyProjectFileExtension ) )
362 {
363 fn.MakeAbsolute();
364
365 if( appType == KICAD_MAIN_FRAME_T )
366 managerFrame->LoadProject( fn );
367 }
368 }
369 }
370
371 frame->Show( true );
372 frame->Raise();
373
374#ifdef KICAD_IPC_API
375 m_api_server->SetReadyToReply();
376#endif
377
378 return true;
379}
380
381
383{
384 return 0;
385}
386
387
389{
390 Kiway.OnKiwayEnd();
391
392#ifdef KICAD_IPC_API
393 m_api_server.reset();
394#endif
395
397 {
399 m_settings_manager->Save();
400 }
401
402 // Destroy everything in PGM_KICAD,
403 // especially wxSingleInstanceCheckerImpl earlier than wxApp and earlier
404 // than static destruction would.
405 Destroy();
407 delete GetGitBackend();
408 SetGitBackend( nullptr );
409}
410
411
412void PGM_KICAD::MacOpenFile( const wxString& aFileName )
413{
414#if defined(__WXMAC__)
415
416 KICAD_MANAGER_FRAME* frame = (KICAD_MANAGER_FRAME*) App().GetTopWindow();
417
418 if( !aFileName.empty() && wxFileExists( aFileName ) )
419 frame->LoadProject( wxFileName( aFileName ) );
420
421#endif
422}
423
424
426{
427 // unlike a normal destructor, this is designed to be called more
428 // than once safely:
429
430 m_bm.End();
431
433}
434
435
437
438#ifdef NDEBUG
439// Define a custom assertion handler
440void CustomAssertHandler(const wxString& file,
441 int line,
442 const wxString& func,
443 const wxString& cond,
444 const wxString& msg)
445{
446 Pgm().HandleAssert( file, line, func, cond, msg );
447}
448#endif
449
453struct APP_KICAD : public wxApp
454{
455 APP_KICAD() : wxApp()
456 {
457 SetPgm( &program );
458
459 // Init the environment each platform wants
461 }
462
463
464 bool OnInit() override
465 {
466#ifdef NDEBUG
467 // These checks generate extra assert noise
468 wxSizerFlags::DisableConsistencyChecks();
469 wxDISABLE_DEBUG_SUPPORT();
470 wxSetAssertHandler( CustomAssertHandler );
471#endif
472
473 // Perform platform-specific init tasks
474 if( !KIPLATFORM::APP::Init() )
475 return false;
476
477#ifndef DEBUG
478 // Enable logging traces to the console in release build.
479 // This is usually disabled, but it can be useful for users to run to help
480 // debug issues and other problems.
481 if( wxGetEnv( wxS( "KICAD_ENABLE_WXTRACE" ), nullptr ) )
482 {
483 wxLog::EnableLogging( true );
484 wxLog::SetLogLevel( wxLOG_Trace );
485 }
486#endif
487
488 if( !program.OnPgmInit() )
489 {
490 program.OnPgmExit();
491 return false;
492 }
493
494 return true;
495 }
496
497 int OnExit() override
498 {
499 program.OnPgmExit();
500
501 // Avoid wxLog crashing when used in destructors.
502 wxLog::EnableLogging( false );
503
504 return wxApp::OnExit();
505 }
506
507 int OnRun() override
508 {
509 try
510 {
511 return wxApp::OnRun();
512 }
513 catch(...)
514 {
515 Pgm().HandleException( std::current_exception() );
516 }
517
518 return -1;
519 }
520
521 int FilterEvent( wxEvent& aEvent ) override
522 {
523 if( aEvent.GetEventType() == wxEVT_SHOW )
524 {
525 wxShowEvent& event = static_cast<wxShowEvent&>( aEvent );
526 wxDialog* dialog = dynamic_cast<wxDialog*>( event.GetEventObject() );
527
528 std::vector<void*>& dlgs = Pgm().m_ModalDialogs;
529
530 if( dialog )
531 {
532 if( event.IsShown() && dialog->IsModal() )
533 {
534 dlgs.push_back( dialog );
535 }
536 // Under GTK, sometimes the modal flag is cleared before hiding
537 else if( !event.IsShown() && !dlgs.empty() )
538 {
539 // If we close the expected dialog, remove it from our stack
540 if( dlgs.back() == dialog )
541 dlgs.pop_back();
542 // If an out-of-order, remove all dialogs added after the closed one
543 else if( auto it = std::find( dlgs.begin(), dlgs.end(), dialog ) ; it != dlgs.end() )
544 dlgs.erase( it, dlgs.end() );
545 }
546 }
547 }
548
549 return Event_Skip;
550 }
551
552#if defined( DEBUG )
556 bool ProcessEvent( wxEvent& aEvent ) override
557 {
558 if( aEvent.GetEventType() == wxEVT_CHAR || aEvent.GetEventType() == wxEVT_CHAR_HOOK )
559 {
560 wxKeyEvent* keyEvent = static_cast<wxKeyEvent*>( &aEvent );
561
562 if( keyEvent )
563 {
564 wxLogTrace( kicadTraceKeyEvent, "APP_KICAD::ProcessEvent %s", dump( *keyEvent ) );
565 }
566 }
567
568 aEvent.Skip();
569 return false;
570 }
571
579 bool OnExceptionInMainLoop() override
580 {
581 try
582 {
583 throw;
584 }
585 catch(...)
586 {
587 Pgm().HandleException( std::current_exception() );
588 }
589
590 return false; // continue on. Return false to abort program
591 }
592#endif
593
599#if defined( __WXMAC__ )
600 void MacOpenFile( const wxString& aFileName ) override
601 {
602 Pgm().MacOpenFile( aFileName );
603 }
604#endif
605};
606
607IMPLEMENT_APP( APP_KICAD )
608
609
610// The C++ project manager supports one open PROJECT, so Prj() calls within
611// this link image need this function.
613{
614 return Kiway.Prj();
615}
616
const char * name
const wxString & GetAboutTitle() const
virtual void Shutdown()=0
virtual void Init()=0
The main KiCad project manager frame.
void LoadProject(const wxFileName &aProjectFileName)
std::vector< wxString > m_OpenProjects
A KIFACE implementation.
Definition kiface_base.h:39
A wxFrame capable of the OpenProjectFiles function, meaning it can load a portion of a KiCad project.
virtual bool OpenProjectFiles(const std::vector< wxString > &aFileList, int aCtl=0)
Open a project or set of files given by aFileList.
A minimalistic software bus for communications between various DLLs/DSOs (DSOs) within the same KiCad...
Definition kiway.h:286
static wxString GetUserTemplatesPath()
Gets the user path for custom templates.
Definition paths.cpp:70
virtual wxApp & App()
Return a bare naked wxApp which may come from wxPython, SINGLE_TOP, or kicad.exe.
Definition pgm_base.cpp:190
virtual ENV_VAR_MAP & GetLocalEnvVariables() const
Definition pgm_base.cpp:822
virtual void MacOpenFile(const wxString &aFileName)=0
Specific to MacOSX (not used under Linux or Windows).
std::unique_ptr< SETTINGS_MANAGER > m_settings_manager
Definition pgm_base.h:375
void Destroy()
Definition pgm_base.cpp:176
bool InitPgm(bool aHeadless=false, bool aSkipPyInit=false, bool aIsUnitTest=false)
Initialize this program.
Definition pgm_base.cpp:344
std::vector< void * > m_ModalDialogs
Definition pgm_base.h:355
void HandleException(std::exception_ptr aPtr)
A exception handler to be used at the top level if exceptions bubble up that for.
Definition pgm_base.cpp:837
void HandleAssert(const wxString &aFile, int aLine, const wxString &aFunc, const wxString &aCond, const wxString &aMsg)
A common assert handler to be used between single_top and kicad.
Definition pgm_base.cpp:862
virtual const wxString & GetExecutablePath() const
Definition pgm_base.cpp:890
virtual SETTINGS_MANAGER & GetSettingsManager() const
Definition pgm_base.h:125
void HideSplash()
Definition pgm_base.cpp:333
void SaveCommonSettings()
Save the program (process) settings subset which are stored .kicad_common.
Definition pgm_base.cpp:567
PGM_KICAD extends PGM_BASE to bring in FileHistory() and PdfBrowser() which were moved from EDA_APP i...
Definition pgm_kicad.h:42
bool OnPgmInit()
Definition kicad.cpp:87
void Destroy()
Definition kicad.cpp:425
void MacOpenFile(const wxString &aFileName) override
Specific to MacOSX (not used under Linux or Windows).
Definition kicad.cpp:412
void OnPgmExit()
Definition kicad.cpp:388
APP_SETTINGS_BASE * PgmSettings()
Definition pgm_kicad.h:59
int OnPgmRun()
Definition kicad.cpp:382
BIN_MOD m_bm
Definition pgm_kicad.h:72
Container for project specific data.
Definition project.h:65
Look for files in a number of paths.
T * RegisterSettings(T *aSettings, bool aLoadNow=true)
Take ownership of the pointer passed in.
void SetKiway(KIWAY *aKiway)
Associate this setting manager with the given Kiway.
void DisplayErrorMessage(wxWindow *aParent, const wxString &aText, const wxString &aExtraInfo)
Display an error message with aMessage.
Definition confirm.cpp:194
This file is part of the common library.
#define _(s)
Functions related to environment variables, including help functions.
FRAME_T
The set of EDA_BASE_FRAME derivatives, typically stored in EDA_BASE_FRAME::m_Ident.
Definition frame_type.h:33
@ FRAME_PCB_EDITOR
Definition frame_type.h:42
@ FRAME_CALC
Definition frame_type.h:63
@ FRAME_BM2CMP
Definition frame_type.h:61
@ FRAME_SCH
Definition frame_type.h:34
@ FRAME_T_COUNT
Definition frame_type.h:70
@ FRAME_PL_EDITOR
Definition frame_type.h:59
@ FRAME_FOOTPRINT_EDITOR
Definition frame_type.h:43
@ FRAME_GERBER
Definition frame_type.h:57
@ KICAD_MAIN_FRAME_T
Definition frame_type.h:68
void SetGitBackend(GIT_BACKEND *aBackend)
GIT_BACKEND * GetGitBackend()
static const std::string ProjectFileExtension
static const std::string LegacyProjectFileExtension
const wxChar *const kicadTraceKeyEvent
Flag to enable wxKeyEvent debug tracing.
std::map< wxString, ENV_VAR_ITEM >::const_iterator ENV_VAR_MAP_CITER
PGM_KICAD & PgmTop()
Definition kicad.cpp:81
PROJECT & Prj()
Definition kicad.cpp:612
static PGM_KICAD program
Definition kicad.cpp:79
KIFACE_BASE & Kiface()
Global KIFACE_BASE "get" accessor.
Definition kicad.cpp:68
KIWAY Kiway(KFCTL_CPP_PROJECT_SUITE)
#define KFCTL_CPP_PROJECT_SUITE
Running under C++ project mgr, possibly with others.
Definition kiway.h:161
#define KFCTL_STANDALONE
Running as a standalone Top.
Definition kiway.h:160
This file contains miscellaneous commonly used macros and functions.
KICOMMON_API std::optional< wxString > GetVersionedEnvVarValue(const std::map< wxString, ENV_VAR_ITEM > &aMap, const wxString &aBaseName)
Attempt to retrieve the value of a versioned environment variable, such as KICAD8_TEMPLATE_DIR.
Definition env_vars.cpp:86
bool Init()
Perform application-specific initialization tasks.
Definition unix/app.cpp:40
void Init()
Perform environment initialization tasks.
void SetAppDetailsForWindow(wxWindow *aWindow, const wxString &aRelaunchCommand, const wxString &aRelaunchDisplayName)
Sets the relaunch command for taskbar pins, this is intended for Windows.
void SetPgm(PGM_BASE *pgm)
Definition pgm_base.cpp:927
PGM_BASE & Pgm()
The global program "get" accessor.
Definition pgm_base.cpp:913
PGM_SINGLE_TOP program
KIWAY Kiway(KFCTL_STANDALONE)
Not publicly visible because most of the action is in PGM_KICAD these days.
Definition kicad.cpp:454
int OnRun() override
Definition kicad.cpp:507
APP_KICAD()
Definition kicad.cpp:455
bool OnInit() override
Definition kicad.cpp:464
int OnExit() override
Definition kicad.cpp:497
int FilterEvent(wxEvent &aEvent) override
Definition kicad.cpp:521
void SystemDirsAppend(SEARCH_STACK *aSearchStack)
Append system places to aSearchStack in a platform specific way and pertinent to KiCad programs.
System directories search utilities.
VECTOR2I end
wxString dump(const wxArrayString &aArray)
Debug helper for printing wxArrayString contents.
wxLogTrace helper definitions.
Definition of file extensions used in Kicad.