42#include <wx/filename.h>
48class wxSingleInstanceChecker;
111 void BuildArgvUtf8();
131 return *m_background_jobs_monitor;
136 return *m_notifications_manager;
145 virtual void SetTextEditor(
const wxString& aFileName );
156 virtual const wxString& GetTextEditor(
bool aCanShowFileChooser =
true );
165 virtual const wxString AskUserForPreferredEditor(
166 const wxString& aDefaultEditor = wxEmptyString );
172 virtual const wxString& GetExecutablePath()
const;
187 return m_use_system_pdf_browser || m_pdf_browser.IsEmpty();
205 virtual bool SetLanguage( wxString& aErrMsg,
bool first_time =
false );
215 bool SetDefaultLanguage( wxString& aErrMsg );
224 virtual void SetLanguageIdentifier(
int menu_id );
234 virtual wxString GetLanguageTag();
236 virtual void SetLanguagePath();
241 virtual void ReadPdfBrowserInfos();
246 virtual void WritePdfBrowserInfos();
260 virtual bool SetLocalEnvVariable(
const wxString& aName,
const wxString& aValue );
268 virtual void SetLocalEnvVariables();
277 virtual wxApp& App();
279 static const wxChar workingDirKey[];
296 bool InitPgm(
bool aHeadless =
false,
bool aSkipPyInit =
false,
bool aIsUnitTest =
false );
306 void SaveCommonSettings();
308#ifdef KICAD_USE_SENTRY
312 bool IsSentryOptedIn();
320 void SetSentryOptIn(
bool aOptIn );
325 void ResetSentryId();
330 const wxString& GetSentryId();
340 void HandleException( std::exception_ptr aPtr );
353 void HandleAssert(
const wxString& aFile,
int aLine,
const wxString& aFunc,
354 const wxString& aCond,
const wxString& aMsg );
372 return m_pgm_checker;
388 void loadCommonSettings();
393#ifdef KICAD_USE_SENTRY
396 wxString sentryCreateUid();
410 std::unique_ptr<API_PLUGIN_MANAGER> m_plugin_manager;
411 std::unique_ptr<KICAD_API_SERVER> m_api_server;
426#ifdef KICAD_USE_SENTRY
427 wxFileName m_sentry_optin_fn;
428 wxFileName m_sentry_uid_fn;
429 wxString m_sentryUid;
Responsible for loading plugin definitions for API-based plugins (ones that do not run inside KiCad i...
Container for data for KiCad programs.
std::unique_ptr< NOTIFICATIONS_MANAGER > m_notifications_manager
bool m_Printing
wxWidgets on MSW tends to crash if you spool up more than one print job at a time.
void setLanguageId(int aId)
Trap all changes in here, simplifies debugging.
virtual void MacOpenFile(const wxString &aFileName)=0
Specific to MacOSX (not used under Linux or Windows).
std::unique_ptr< SETTINGS_MANAGER > m_settings_manager
virtual void SetPdfBrowserName(const wxString &aFileName)
wxSplashScreen * m_splash
std::unique_ptr< wxSingleInstanceChecker > & SingleInstance()
Allow access to the wxSingleInstanceChecker to test for other running KiCads.
virtual BACKGROUND_JOBS_MONITOR & GetBackgroundJobMonitor() const
virtual const wxString & GetKicadEnvVariable() const
char ** m_argvUtf8
argv parameters converted to utf8 form because wxWidgets has opinions.
virtual bool UseSystemPdfBrowser() const
bool m_use_system_pdf_browser
virtual NOTIFICATIONS_MANAGER & GetNotificationsManager() const
virtual const wxString & GetPdfBrowserName() const
std::unique_ptr< wxSingleInstanceChecker > m_pgm_checker
Check if there is another copy of Kicad running at the same time.
virtual int GetSelectedLanguageIdentifier() const
wxString m_pdf_browser
Filename of the app selected for browsing PDFs.
std::vector< void * > m_ModalDialogs
wxString m_kicad_env
The KICAD system environment variable.
virtual void ForceSystemPdfBrowser(bool aFlg)
Force the use of system PDF browser, even if a preferred PDF browser is set.
BS::thread_pool & GetThreadPool()
GL_CONTEXT_MANAGER * GetGLContextManager()
std::unique_ptr< SCRIPTING > m_python_scripting
std::unique_ptr< BACKGROUND_JOBS_MONITOR > m_background_jobs_monitor
virtual wxLocale * GetLocale()
virtual SETTINGS_MANAGER & GetSettingsManager() const
virtual bool IsKicadEnvVariableDefined() const
bool m_PropertyGridInitialized
KICAD_SINGLETON m_singleton
std::map< wxString, ENV_VAR_ITEM > ENV_VAR_MAP
KICOMMON_API PGM_BASE * PgmOrNull()
Return a reference that can be nullptr when running a shared lib from a script, not from a kicad app.
KICOMMON_API void SetPgm(PGM_BASE *pgm)
KICOMMON_API LANGUAGE_DESCR LanguagesList[]
An array containing all the languages that KiCad supports.
KICOMMON_API PGM_BASE & Pgm()
The global program "get" accessor.
A small class to handle the list of existing translations.
int m_KI_Lang_Identifier
KiCad identifier used in menu selection (See id.h)
bool m_DoNotTranslate
Set to true if the m_Lang_Label must not be translated.
wxString m_Lang_Label
Labels used in menus.
int m_WX_Lang_Identifier
wxWidgets locale identifier (See wxWidgets doc)