40#include <wx/filename.h>
41#include <wx/snglinst.h>
118 virtual bool OnPgmInit() = 0;
120 virtual void OnPgmExit() = 0;
155 virtual const wxString&
GetTextEditor(
bool aCanShowFileChooser =
true );
165 const wxString& aDefaultEditor = wxEmptyString );
204 virtual bool SetLanguage( wxString& aErrMsg,
bool first_time =
false );
273 virtual wxApp&
App();
292 bool InitPgm(
bool aHeadless =
false,
bool aSkipPyInit =
false,
bool aIsUnitTest =
false );
304#ifdef KICAD_USE_SENTRY
308 bool IsSentryOptedIn();
316 void SetSentryOptIn(
bool aOptIn );
321 void ResetSentryId();
326 const wxString& GetSentryId();
349 void HandleAssert(
const wxString& aFile,
int aLine,
const wxString& aFunc,
350 const wxString& aCond,
const wxString& aMsg );
389#ifdef KICAD_USE_SENTRY
392 wxString sentryCreateUid();
416#ifdef KICAD_USE_SENTRY
417 wxFileName m_sentry_optin_fn;
418 wxFileName m_sentry_uid_fn;
419 wxString m_sentryUid;
Container for data for KiCad programs.
virtual COMMON_SETTINGS * GetCommonSettings() const
virtual wxApp & App()
Returns a bare naked wxApp which may come from wxPython, SINGLE_TOP, or kicad.exe.
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...
virtual ENV_VAR_MAP & GetLocalEnvVariables() const
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
void loadCommonSettings()
Loads internal settings from COMMON_SETTINGS.
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
bool InitPgm(bool aHeadless=false, bool aSkipPyInit=false, bool aIsUnitTest=false)
Initialize this program.
virtual const wxString & GetKicadEnvVariable() const
virtual bool UseSystemPdfBrowser() const
virtual void ReadPdfBrowserInfos()
Read the PDF browser choice from the common configuration.
bool IsGUI()
Determine if the application is running with a GUI.
bool m_use_system_pdf_browser
virtual NOTIFICATIONS_MANAGER & GetNotificationsManager() const
void BuildArgvUtf8()
Builds the UTF8 based argv variable.
virtual const wxString & GetPdfBrowserName() const
virtual void SetTextEditor(const wxString &aFileName)
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 bool SetLocalEnvVariable(const wxString &aName, const wxString &aValue)
Sets the environment variable aName to aValue.
virtual void ForceSystemPdfBrowser(bool aFlg)
Force the use of system PDF browser, even if a preferred PDF browser is set.
virtual void SetLocalEnvVariables()
Updates the local environment with the contents of the current ENV_VAR_MAP stored in the COMMON_SETTI...
virtual void SetLanguagePath()
bool SetDefaultLanguage(wxString &aErrMsg)
Set the default language without reference to any preferences.
wxString m_text_editor
Filename of the app selected for browsing PDFs.
std::unique_ptr< SCRIPTING > m_python_scripting
virtual void SetLanguageIdentifier(int menu_id)
Set in .m_language_id member the wxWidgets language identifier ID from the KiCad menu id (internal me...
std::unique_ptr< BACKGROUND_JOBS_MONITOR > m_background_jobs_monitor
void HandleException(std::exception_ptr aPtr)
A exception handler to be used at the top level if exceptions bubble up that for.
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.
virtual wxString GetLanguageTag()
virtual const wxString & GetTextEditor(bool aCanShowFileChooser=true)
Return the path to the preferred text editor application.
virtual wxLocale * GetLocale()
virtual const wxString & GetExecutablePath() const
virtual SETTINGS_MANAGER & GetSettingsManager() const
virtual bool IsKicadEnvVariableDefined() const
virtual void WritePdfBrowserInfos()
Save the PDF browser choice to the common configuration.
void SaveCommonSettings()
Save the program (process) settings subset which are stored .kicad_common.
bool m_PropertyGridInitialized
static const wxChar workingDirKey[]
virtual const wxString AskUserForPreferredEditor(const wxString &aDefaultEditor=wxEmptyString)
Shows a dialog that instructs the user to select a new preferred editor.
virtual bool SetLanguage(wxString &aErrMsg, bool first_time=false)
Set the dictionary file name for internationalization.
std::map< wxString, ENV_VAR_ITEM > ENV_VAR_MAP
PGM_BASE & Pgm()
The global Program "get" accessor.
PGM_BASE * PgmOrNull()
similar to PGM_BASE& Pgm(), but return a reference that can be nullptr when running a shared lib from...
LANGUAGE_DESCR LanguagesList[]
An array containing all the languages that KiCad supports.
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)