42#include <wx/filename.h>
48class wxSingleInstanceChecker;
142 KICAD_API_SERVER& GetApiServer() {
return *m_api_server; }
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;
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();
296 bool InitPgm(
bool aHeadless =
false,
bool aSkipPyInit =
false,
bool aIsUnitTest =
false );
328 void HandleAssert(
const wxString& aFile,
int aLine,
const wxString& aFunc,
329 const wxString& aCond,
const wxString& aMsg );
368#ifdef KICAD_USE_SENTRY
371 wxString sentryCreateUid();
385 std::unique_ptr<API_PLUGIN_MANAGER> m_plugin_manager;
386 std::unique_ptr<KICAD_API_SERVER> m_api_server;
401#ifdef KICAD_USE_SENTRY
402 wxFileName m_sentry_optin_fn;
403 wxFileName m_sentry_uid_fn;
404 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
void loadCommonSettings()
Load internal settings from COMMON_SETTINGS.
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
bool InitPgm(bool aHeadless=false, bool aSkipPyInit=false, bool aIsUnitTest=false)
Initialize this program.
virtual const wxString & GetKicadEnvVariable() const
char ** m_argvUtf8
argv parameters converted to utf8 form because wxWidgets has opinions.
virtual bool UseSystemPdfBrowser() const
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
BS::thread_pool< 0 > & GetThreadPool()
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.
GL_CONTEXT_MANAGER * GetGLContextManager()
std::unique_ptr< SCRIPTING > m_python_scripting
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 wxLocale * GetLocale()
virtual SETTINGS_MANAGER & GetSettingsManager() const
virtual bool IsKicadEnvVariableDefined() const
void SaveCommonSettings()
Save the program (process) settings subset which are stored .kicad_common.
bool m_PropertyGridInitialized
static const wxChar workingDirKey[]
KICAD_SINGLETON m_singleton
std::map< wxString, ENV_VAR_ITEM > ENV_VAR_MAP
LANGUAGE_DESCR LanguagesList[]
An array containing all the languages that KiCad supports.
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 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)