41#include <wx/filename.h>
42#include <wx/snglinst.h>
119 virtual bool OnPgmInit() = 0;
121 virtual void OnPgmExit() = 0;
127 void BuildArgvUtf8();
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 );
213 bool SetDefaultLanguage( wxString& aErrMsg );
222 virtual void SetLanguageIdentifier(
int menu_id );
232 virtual wxString GetLanguageTag();
234 virtual void SetLanguagePath();
239 virtual void ReadPdfBrowserInfos();
244 virtual void WritePdfBrowserInfos();
258 virtual bool SetLocalEnvVariable(
const wxString& aName,
const wxString& aValue );
265 virtual void SetLocalEnvVariables();
274 virtual wxApp& App();
276 static const wxChar workingDirKey[];
293 bool InitPgm(
bool aHeadless =
false,
bool aSkipPyInit =
false,
bool aIsUnitTest =
false );
303 void SaveCommonSettings();
305#ifdef KICAD_USE_SENTRY
309 bool IsSentryOptedIn();
317 void SetSentryOptIn(
bool aOptIn );
322 void ResetSentryId();
327 const wxString& GetSentryId();
337 void HandleException( std::exception_ptr aPtr );
350 void HandleAssert(
const wxString& aFile,
int aLine,
const wxString& aFunc,
351 const wxString& aCond,
const wxString& aMsg );
369 return m_pgm_checker;
385 void loadCommonSettings();
390#ifdef KICAD_USE_SENTRY
393 wxString sentryCreateUid();
417#ifdef KICAD_USE_SENTRY
418 wxFileName m_sentry_optin_fn;
419 wxFileName m_sentry_uid_fn;
420 wxString m_sentryUid;
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)