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
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 <git2.h>
53#include <stdexcept>
54
55#include "pgm_kicad.h"
56#include "kicad_manager_frame.h"
57
58#include <kiplatform/app.h>
60
61#ifdef KICAD_IPC_API
62#include <api/api_server.h>
63#endif
64
65// a dummy to quiet linking with EDA_BASE_FRAME::config();
66#include <kiface_base.h>
68{
69 // This function should never be called. It is only referenced from
70 // EDA_BASE_FRAME::config() and this is only provided to satisfy the linker,
71 // not to be actually called.
72 wxLogFatalError( wxT( "Unexpected call to Kiface() in kicad/kicad.cpp" ) );
73
74 throw std::logic_error( "Unexpected call to Kiface() in kicad/kicad.cpp" );
75}
76
77
79
81{
82 return program;
83}
84
85
87{
88 App().SetAppDisplayName( wxT( "KiCad" ) );
89
90#if defined(DEBUG)
91 wxString absoluteArgv0 = wxStandardPaths::Get().GetExecutablePath();
92
93 if( !wxIsAbsolutePath( absoluteArgv0 ) )
94 {
95 wxLogError( wxT( "No meaningful argv[0]" ) );
96 return false;
97 }
98#endif
99
100 // Initialize the git library before trying to initialize individual programs
101 git_libgit2_init();
102
103 static const wxCmdLineEntryDesc desc[] = {
104 { wxCMD_LINE_OPTION, "f", "frame", "Frame to load", wxCMD_LINE_VAL_STRING, 0 },
105 { wxCMD_LINE_SWITCH, "n", "new", "New instance of KiCad, does not attempt to load previously open files",
106 wxCMD_LINE_VAL_NONE, 0 },
107 { wxCMD_LINE_PARAM, nullptr, nullptr, "File to load", wxCMD_LINE_VAL_STRING,
108 wxCMD_LINE_PARAM_MULTIPLE | wxCMD_LINE_PARAM_OPTIONAL },
109 { wxCMD_LINE_NONE, nullptr, nullptr, nullptr, wxCMD_LINE_VAL_NONE, 0 }
110 };
111
112 wxCmdLineParser parser( App().argc, App().argv );
113 parser.SetDesc( desc );
114 parser.Parse( false );
115
116 FRAME_T appType = KICAD_MAIN_FRAME_T;
117
118 const struct
119 {
120 wxString name;
121 FRAME_T type;
122 } frameTypes[] = { { wxT( "pcb" ), FRAME_PCB_EDITOR },
123 { wxT( "fpedit" ), FRAME_FOOTPRINT_EDITOR },
124 { wxT( "sch" ), FRAME_SCH },
125 { wxT( "calc" ), FRAME_CALC },
126 { wxT( "bm2cmp" ), FRAME_BM2CMP },
127 { wxT( "ds" ), FRAME_PL_EDITOR },
128 { wxT( "gerb" ), FRAME_GERBER },
129 { wxT( "" ), FRAME_T_COUNT } };
130
131 wxString frameName;
132
133 if( parser.Found( "frame", &frameName ) )
134 {
135 appType = FRAME_T_COUNT;
136
137 for( const auto& it : frameTypes )
138 {
139 if( it.name == frameName )
140 appType = it.type;
141 }
142
143 if( appType == FRAME_T_COUNT )
144 {
145 wxLogError( wxT( "Unknown frame: %s" ), frameName );
146 // Clean up
147 OnPgmExit();
148 return false;
149 }
150 }
151
152 if( appType == KICAD_MAIN_FRAME_T )
153 {
155 }
156 else
157 {
159 }
160
161 bool skipPythonInit = false;
162
163 if( appType == FRAME_BM2CMP || appType == FRAME_PL_EDITOR || appType == FRAME_GERBER
164 || appType == FRAME_CALC )
165 skipPythonInit = true;
166
167 if( !InitPgm( false, skipPythonInit ) )
168 return false;
169
173 m_bm.Init();
174
175 // Add search paths to feed the PGM_KICAD::SysSearch() function,
176 // currently limited in support to only look for project templates
177 {
178 SEARCH_STACK bases;
179
180 SystemDirsAppend( &bases );
181
182 for( unsigned i = 0; i < bases.GetCount(); ++i )
183 {
184 wxFileName fn( bases[i], wxEmptyString );
185
186 // Add KiCad template file path to search path list.
187 fn.AppendDir( wxT( "template" ) );
188
189 // Only add path if exists and can be read by the user.
190 if( fn.DirExists() && fn.IsDirReadable() )
191 m_bm.m_search.AddPaths( fn.GetPath() );
192 }
193
194 // The versioned TEMPLATE_DIR takes precedence over the search stack template path.
195 if( std::optional<wxString> v = ENV_VAR::GetVersionedEnvVarValue( GetLocalEnvVariables(),
196 wxT( "TEMPLATE_DIR" ) ) )
197 {
198 if( !v->IsEmpty() )
199 m_bm.m_search.Insert( *v, 0 );
200 }
201
202 // We've been adding system (installed default) search paths so far, now for user paths
203 // The default user search path is inside KIPLATFORM::ENV::GetDocumentsPath()
205
206 // ...but the user can override that default with the KICAD_USER_TEMPLATE_DIR env var
207 ENV_VAR_MAP_CITER it = GetLocalEnvVariables().find( "KICAD_USER_TEMPLATE_DIR" );
208
209 if( it != GetLocalEnvVariables().end() && it->second.GetValue() != wxEmptyString )
210 m_bm.m_search.Insert( it->second.GetValue(), 0 );
211 }
212
213 wxFrame* frame = nullptr;
214 KIWAY_PLAYER* playerFrame = nullptr;
215 KICAD_MANAGER_FRAME* managerFrame = nullptr;
216
217 if( appType == KICAD_MAIN_FRAME_T )
218 {
219 managerFrame = new KICAD_MANAGER_FRAME( nullptr, wxT( "KiCad" ), wxDefaultPosition,
220 wxWindow::FromDIP( wxSize( 775, -1 ), NULL ) );
221 frame = managerFrame;
222 }
223 else
224 {
225 // Use KIWAY to create a top window, which registers its existence also.
226 // "TOP_FRAME" is a macro that is passed on compiler command line from CMake,
227 // and is one of the types in FRAME_T.
228 playerFrame = Kiway.Player( appType, true );
229 frame = playerFrame;
230
231 if( frame == nullptr )
232 {
233 return false;
234 }
235 }
236
237 App().SetTopWindow( frame );
238
239 if( playerFrame )
240 App().SetAppDisplayName( playerFrame->GetAboutTitle() );
241
242 Kiway.SetTop( frame );
243
244 KIPLATFORM::ENV::SetAppDetailsForWindow( frame, '"' + wxStandardPaths::Get().GetExecutablePath() + '"' + " -n",
245 frame->GetTitle() );
246
247 KICAD_SETTINGS* settings = static_cast<KICAD_SETTINGS*>( PgmSettings() );
248
249#ifdef KICAD_IPC_API
250 m_api_server = std::make_unique<KICAD_API_SERVER>();
251 m_api_common_handler = std::make_unique<API_HANDLER_COMMON>();
252 m_api_server->RegisterHandler( m_api_common_handler.get() );
253#endif
254
255 wxString projToLoad;
256
257 HideSplash();
258
259 if( playerFrame && parser.GetParamCount() )
260 {
261 // Now after the frame processing, the rest of the positional args are files
262 std::vector<wxString> fileArgs;
263 /*
264 gerbview handles multiple project data files, i.e. gerber files on
265 cmd line. Others currently do not, they handle only one. For common
266 code simplicity we simply pass all the arguments in however, each
267 program module can do with them what they want, ignore, complain
268 whatever. We don't establish policy here, as this is a multi-purpose
269 launcher.
270 */
271
272 for( size_t i = 0; i < parser.GetParamCount(); i++ )
273 fileArgs.push_back( parser.GetParam( i ) );
274
275 // special attention to a single argument: argv[1] (==argSet[0])
276 if( fileArgs.size() == 1 )
277 {
278 wxFileName argv1( fileArgs[0] );
279
280#if defined( PGM_DATA_FILE_EXT )
281 // PGM_DATA_FILE_EXT, if present, may be different for each compile,
282 // it may come from CMake on the compiler command line, but often does not.
283 // This facility is mostly useful for those program footprints
284 // supporting a single argv[1].
285 if( !argv1.GetExt() )
286 argv1.SetExt( wxT( PGM_DATA_FILE_EXT ) );
287#endif
288 argv1.MakeAbsolute();
289
290 fileArgs[0] = argv1.GetFullPath();
291 }
292
293 // Use the KIWAY_PLAYER::OpenProjectFiles() API function:
294 if( !playerFrame->OpenProjectFiles( fileArgs ) )
295 {
296 // OpenProjectFiles() API asks that it report failure to the UI.
297 // Nothing further to say here.
298
299 // We've already initialized things at this point, but wx won't call OnExit if
300 // we fail out. Call our own cleanup routine here to ensure the relevant resources
301 // are freed at the right time (if they aren't, segfaults will occur).
302 OnPgmExit();
303
304 // Fail the process startup if the file could not be opened,
305 // although this is an optional choice, one that can be reversed
306 // also in the KIFACE specific OpenProjectFiles() return value.
307 return false;
308 }
309 }
310 else if( managerFrame )
311 {
312 if( parser.GetParamCount() > 0 )
313 {
314 wxFileName tmp = parser.GetParam( 0 );
315
316 if( tmp.GetExt() != FILEEXT::ProjectFileExtension
317 && tmp.GetExt() != FILEEXT::LegacyProjectFileExtension )
318 {
319 wxString msg;
320
321 msg.Printf( _( "File '%s'\ndoes not appear to be a valid KiCad project file." ),
322 tmp.GetFullPath() );
323 wxMessageDialog dlg( nullptr, msg, _( "Error" ), wxOK | wxICON_EXCLAMATION );
324 dlg.ShowModal();
325 }
326 else
327 {
328 projToLoad = tmp.GetFullPath();
329 }
330 }
331
332 // If no file was given as an argument, check that there was a file open.
333 if( projToLoad.IsEmpty() && settings->m_OpenProjects.size() && !parser.FoundSwitch( "new" ) )
334 {
335 wxString last_pro = settings->m_OpenProjects.front();
336 settings->m_OpenProjects.erase( settings->m_OpenProjects.begin() );
337
338 if( wxFileExists( last_pro ) )
339 {
340 // Try to open the last opened project,
341 // if a project name is not given when starting Kicad
342 projToLoad = last_pro;
343 }
344 }
345
346 // Do not attempt to load a non-existent project file.
347 if( !projToLoad.empty() )
348 {
349 wxFileName fn( projToLoad );
350
351 if( fn.Exists() && ( fn.GetExt() == FILEEXT::ProjectFileExtension
352 || fn.GetExt() == FILEEXT::LegacyProjectFileExtension ) )
353 {
354 fn.MakeAbsolute();
355
356 if( appType == KICAD_MAIN_FRAME_T )
357 managerFrame->LoadProject( fn );
358 }
359 }
360 }
361
362 frame->Show( true );
363 frame->Raise();
364
365#ifdef KICAD_IPC_API
366 m_api_server->SetReadyToReply();
367#endif
368
369 return true;
370}
371
372
374{
375 return 0;
376}
377
378
380{
382
383#ifdef KICAD_IPC_API
384 m_api_server.reset();
385#endif
386
388 {
390 m_settings_manager->Save();
391 }
392
393 // Destroy everything in PGM_KICAD,
394 // especially wxSingleInstanceCheckerImpl earlier than wxApp and earlier
395 // than static destruction would.
396 Destroy();
397 git_libgit2_shutdown();
398}
399
400
401void PGM_KICAD::MacOpenFile( const wxString& aFileName )
402{
403#if defined(__WXMAC__)
404
405 KICAD_MANAGER_FRAME* frame = (KICAD_MANAGER_FRAME*) App().GetTopWindow();
406
407 if( !aFileName.empty() && wxFileExists( aFileName ) )
408 frame->LoadProject( wxFileName( aFileName ) );
409
410#endif
411}
412
413
415{
416 // unlike a normal destructor, this is designed to be called more
417 // than once safely:
418
419 m_bm.End();
420
422}
423
424
426
427#ifdef NDEBUG
428// Define a custom assertion handler
429void CustomAssertHandler(const wxString& file,
430 int line,
431 const wxString& func,
432 const wxString& cond,
433 const wxString& msg)
434{
435 Pgm().HandleAssert( file, line, func, cond, msg );
436}
437#endif
438
442struct APP_KICAD : public wxApp
443{
444 APP_KICAD() : wxApp()
445 {
446 SetPgm( &program );
447
448 // Init the environment each platform wants
450 }
451
452
453 bool OnInit() override
454 {
455#ifdef NDEBUG
456 // These checks generate extra assert noise
457 wxSizerFlags::DisableConsistencyChecks();
458 wxDISABLE_DEBUG_SUPPORT();
459 wxSetAssertHandler( CustomAssertHandler );
460#endif
461
462 // Perform platform-specific init tasks
463 if( !KIPLATFORM::APP::Init() )
464 return false;
465
466#ifndef DEBUG
467 // Enable logging traces to the console in release build.
468 // This is usually disabled, but it can be useful for users to run to help
469 // debug issues and other problems.
470 if( wxGetEnv( wxS( "KICAD_ENABLE_WXTRACE" ), nullptr ) )
471 {
472 wxLog::EnableLogging( true );
473 wxLog::SetLogLevel( wxLOG_Trace );
474 }
475#endif
476
477 if( !program.OnPgmInit() )
478 {
480 return false;
481 }
482
483 return true;
484 }
485
486 int OnExit() override
487 {
489
490 // Avoid wxLog crashing when used in destructors.
491 wxLog::EnableLogging( false );
492
493 return wxApp::OnExit();
494 }
495
496 int OnRun() override
497 {
498 try
499 {
500 return wxApp::OnRun();
501 }
502 catch(...)
503 {
504 Pgm().HandleException( std::current_exception() );
505 }
506
507 return -1;
508 }
509
510 int FilterEvent( wxEvent& aEvent ) override
511 {
512 if( aEvent.GetEventType() == wxEVT_SHOW )
513 {
514 wxShowEvent& event = static_cast<wxShowEvent&>( aEvent );
515 wxDialog* dialog = dynamic_cast<wxDialog*>( event.GetEventObject() );
516
517 std::vector<void*>& dlgs = Pgm().m_ModalDialogs;
518
519 if( dialog )
520 {
521 if( event.IsShown() && dialog->IsModal() )
522 {
523 dlgs.push_back( dialog );
524 }
525 // Under GTK, sometimes the modal flag is cleared before hiding
526 else if( !event.IsShown() && !dlgs.empty() )
527 {
528 // If we close the expected dialog, remove it from our stack
529 if( dlgs.back() == dialog )
530 dlgs.pop_back();
531 // If an out-of-order, remove all dialogs added after the closed one
532 else if( auto it = std::find( dlgs.begin(), dlgs.end(), dialog ) ; it != dlgs.end() )
533 dlgs.erase( it, dlgs.end() );
534 }
535 }
536 }
537
538 return Event_Skip;
539 }
540
541#if defined( DEBUG )
545 bool ProcessEvent( wxEvent& aEvent ) override
546 {
547 if( aEvent.GetEventType() == wxEVT_CHAR || aEvent.GetEventType() == wxEVT_CHAR_HOOK )
548 {
549 wxKeyEvent* keyEvent = static_cast<wxKeyEvent*>( &aEvent );
550
551 if( keyEvent )
552 {
553 wxLogTrace( kicadTraceKeyEvent, "APP_KICAD::ProcessEvent %s", dump( *keyEvent ) );
554 }
555 }
556
557 aEvent.Skip();
558 return false;
559 }
560
568 bool OnExceptionInMainLoop() override
569 {
570 try
571 {
572 throw;
573 }
574 catch(...)
575 {
576 Pgm().HandleException( std::current_exception() );
577 }
578
579 return false; // continue on. Return false to abort program
580 }
581#endif
582
588#if defined( __WXMAC__ )
589 void MacOpenFile( const wxString& aFileName ) override
590 {
591 Pgm().MacOpenFile( aFileName );
592 }
593#endif
594};
595
596IMPLEMENT_APP( APP_KICAD )
597
598
599// The C++ project manager supports one open PROJECT, so Prj() calls within
600// this link image need this function.
602{
603 return Kiway.Prj();
604}
605
const char * name
Definition: DXF_plotter.cpp:62
const wxString & GetAboutTitle() const
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.
Definition: kiway_player.h:65
virtual bool OpenProjectFiles(const std::vector< wxString > &aFileList, int aCtl=0)
Open a project or set of files given by aFileList.
Definition: kiway_player.h:113
A minimalistic software bus for communications between various DLLs/DSOs (DSOs) within the same KiCad...
Definition: kiway.h:286
virtual KIWAY_PLAYER * Player(FRAME_T aFrameType, bool doCreate=true, wxTopLevelWindow *aParent=nullptr)
Return the KIWAY_PLAYER* given a FRAME_T.
Definition: kiway.cpp:395
void SetCtlBits(int aCtlBits)
Overwrites previously set ctl bits, only for use in kicad.cpp to flip between standalone and manager ...
Definition: kiway.h:419
void OnKiwayEnd()
Definition: kiway.cpp:709
void SetTop(wxFrame *aTop)
Tell this KIWAY about the top most frame in the program and optionally allows it to play the role of ...
Definition: kiway.cpp:85
virtual PROJECT & Prj() const
Return the PROJECT associated with this KIWAY.
Definition: kiway.cpp:192
static wxString GetUserTemplatesPath()
Gets the user path for custom templates.
Definition: paths.cpp:77
virtual wxApp & App()
Return a bare naked wxApp which may come from wxPython, SINGLE_TOP, or kicad.exe.
Definition: pgm_base.cpp:183
virtual ENV_VAR_MAP & GetLocalEnvVariables() const
Definition: pgm_base.cpp:811
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:173
bool InitPgm(bool aHeadless=false, bool aSkipPyInit=false, bool aIsUnitTest=false)
Initialize this program.
Definition: pgm_base.cpp:337
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:826
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:851
virtual const wxString & GetExecutablePath() const
Definition: pgm_base.cpp:879
virtual SETTINGS_MANAGER & GetSettingsManager() const
Definition: pgm_base.h:125
void HideSplash()
Definition: pgm_base.cpp:326
void SaveCommonSettings()
Save the program (process) settings subset which are stored .kicad_common.
Definition: pgm_base.cpp:556
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:86
void Destroy()
Definition: kicad.cpp:414
void MacOpenFile(const wxString &aFileName) override
Specific to MacOSX (not used under Linux or Windows).
Definition: kicad.cpp:401
void OnPgmExit()
Definition: kicad.cpp:379
APP_SETTINGS_BASE * PgmSettings()
Definition: pgm_kicad.h:59
int OnPgmRun()
Definition: kicad.cpp:373
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.
Definition: search_stack.h:43
void AddPaths(const wxString &aPaths, int aIndex=-1)
Insert or append path(s).
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.
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
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:80
PROJECT & Prj()
Definition: kicad.cpp:601
static PGM_KICAD program
Definition: kicad.cpp:78
KIFACE_BASE & Kiface()
Global KIFACE_BASE "get" accessor.
Definition: kicad.cpp:67
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:92
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:916
PGM_BASE & Pgm()
The global program "get" accessor.
Definition: pgm_base.cpp:902
KIWAY Kiway(KFCTL_STANDALONE)
Not publicly visible because most of the action is in PGM_KICAD these days.
Definition: kicad.cpp:443
int OnRun() override
Definition: kicad.cpp:496
APP_KICAD()
Definition: kicad.cpp:444
bool OnInit() override
Definition: kicad.cpp:453
int OnExit() override
Definition: kicad.cpp:486
int FilterEvent(wxEvent &aEvent) override
Definition: kicad.cpp:510
void End()
Definition: bin_mod.cpp:50
void Init()
Definition: bin_mod.cpp:38
SEARCH_STACK m_search
Definition: bin_mod.h:60
void InitSettings(APP_SETTINGS_BASE *aPtr)
Takes ownership of a new application settings object.
Definition: bin_mod.h:53
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.