41#include <wx/filename.h>
47class wxSingleInstanceChecker;
124 virtual bool OnPgmInit() = 0;
126 virtual void OnPgmExit() = 0;
132 void BuildArgvUtf8();
156 virtual void SetTextEditor(
const wxString& aFileName );
167 virtual const wxString& GetTextEditor(
bool aCanShowFileChooser =
true );
176 virtual const wxString AskUserForPreferredEditor(
177 const wxString& aDefaultEditor = wxEmptyString );
183 virtual const wxString& GetExecutablePath()
const;
198 return m_use_system_pdf_browser || m_pdf_browser.IsEmpty();
216 virtual bool SetLanguage( wxString& aErrMsg,
bool first_time =
false );
224 bool SetDefaultLanguage( wxString& aErrMsg );
233 virtual void SetLanguageIdentifier(
int menu_id );
243 virtual wxString GetLanguageTag();
245 virtual void SetLanguagePath();
250 virtual void ReadPdfBrowserInfos();
255 virtual void WritePdfBrowserInfos();
269 virtual bool SetLocalEnvVariable(
const wxString& aName,
const wxString& aValue );
276 virtual void SetLocalEnvVariables();
285 virtual wxApp& App();
287 static const wxChar workingDirKey[];
304 bool InitPgm(
bool aHeadless =
false,
bool aSkipPyInit =
false,
bool aIsUnitTest =
false );
314 void SaveCommonSettings();
316#ifdef KICAD_USE_SENTRY
320 bool IsSentryOptedIn();
328 void SetSentryOptIn(
bool aOptIn );
333 void ResetSentryId();
338 const wxString& GetSentryId();
348 void HandleException( std::exception_ptr aPtr );
361 void HandleAssert(
const wxString& aFile,
int aLine,
const wxString& aFunc,
362 const wxString& aCond,
const wxString& aMsg );
380 return m_pgm_checker;
396 void loadCommonSettings();
401#ifdef KICAD_USE_SENTRY
404 wxString sentryCreateUid();
418 std::unique_ptr<API_PLUGIN_MANAGER> m_plugin_manager;
419 std::unique_ptr<KICAD_API_SERVER> m_api_server;
432#ifdef KICAD_USE_SENTRY
433 wxFileName m_sentry_optin_fn;
434 wxFileName m_sentry_uid_fn;
435 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
int m_argcUtf8
argv parameters converted to utf8 form, because wxwidgets has opinions and will return argv as either...
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)
wxLocale * m_locale
The KICAD system environment variable.
wxSplashScreen * m_splash
std::unique_ptr< wxSingleInstanceChecker > & SingleInstance()
Allows access to the wxSingleInstanceChecker to test for other running KiCads.
virtual BACKGROUND_JOBS_MONITOR & GetBackgroundJobMonitor() const
virtual const wxString & GetKicadEnvVariable() const
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
Checks if there is another copy of Kicad running at the same time.
virtual int GetSelectedLanguageIdentifier() const
std::vector< void * > m_ModalDialogs
virtual void ForceSystemPdfBrowser(bool aFlg)
Force the use of system PDF browser, even if a preferred PDF browser is set.
wxString m_text_editor
Filename of the app selected for browsing PDFs.
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
std::map< wxString, ENV_VAR_ITEM > ENV_VAR_MAP
KICOMMON_API PGM_BASE * PgmOrNull()
similar to PGM_BASE& Pgm(), but return a reference that can be nullptr when running a shared lib from...
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)