KiCad PCB EDA Suite
Loading...
Searching...
No Matches
PGM_SINGLE_TOP Struct Reference

Implement PGM_BASE with its own OnPgmInit() and OnPgmExit(). More...

Inheritance diagram for PGM_SINGLE_TOP:
PGM_BASE

Public Member Functions

bool OnPgmInit ()
 
void OnPgmExit ()
 
void MacOpenFile (const wxString &aFileName) override
 Specific to MacOSX (not used under Linux or Windows).
 
void BuildArgvUtf8 ()
 Builds the UTF8 based argv variable.
 
BS::priority_thread_pool & GetThreadPool ()
 
GL_CONTEXT_MANAGER * GetGLContextManager ()
 
virtual SETTINGS_MANAGER & GetSettingsManager () const
 
virtual LIBRARY_MANAGER & GetLibraryManager () const
 
virtual COMMON_SETTINGS * GetCommonSettings () const
 
virtual BACKGROUND_JOBS_MONITOR & GetBackgroundJobMonitor () const
 
virtual NOTIFICATIONS_MANAGER & GetNotificationsManager () const
 
virtual API_PLUGIN_MANAGER & GetPluginManager () const
 
KICAD_API_SERVER & GetApiServer ()
 
KICAD_API_SERVER * ApiServerOrNull () const
 
virtual void SetTextEditor (const wxString &aFileName)
 
virtual const wxString & GetTextEditor (bool aCanShowFileChooser=true)
 Return the path to the preferred text editor application.
 
virtual const wxString AskUserForPreferredEditor (const wxString &aDefaultEditor=wxEmptyString)
 Show a dialog that instructs the user to select a new preferred editor.
 
virtual bool IsKicadEnvVariableDefined () const
 
virtual const wxString & GetKicadEnvVariable () const
 
virtual const wxString & GetExecutablePath () const
 
virtual wxLocale * GetLocale ()
 
virtual const wxString & GetPdfBrowserName () const
 
virtual void SetPdfBrowserName (const wxString &aFileName)
 
virtual bool UseSystemPdfBrowser () const
 
virtual void ForceSystemPdfBrowser (bool aFlg)
 Force the use of system PDF browser, even if a preferred PDF browser is set.
 
virtual bool SetLanguage (wxString &aErrMsg, bool first_time=false)
 Set the dictionary file name for internationalization.
 
bool SetDefaultLanguage (wxString &aErrMsg)
 Set the default language without reference to any preferences.
 
virtual void SetLanguageIdentifier (int menu_id)
 Set in .m_language_id member the wxWidgets language identifier ID from the KiCad menu id (internal menu identifier).
 
virtual int GetSelectedLanguageIdentifier () const
 
virtual wxString GetLanguageTag ()
 
virtual void SetLanguagePath ()
 
virtual void ReadPdfBrowserInfos ()
 Read the PDF browser choice from the common configuration.
 
virtual void WritePdfBrowserInfos ()
 Save the PDF browser choice to the common configuration.
 
virtual bool SetLocalEnvVariable (const wxString &aName, const wxString &aValue)
 Set the environment variable aName to aValue.
 
virtual void SetLocalEnvVariables ()
 Update the local environment with the contents of the current ENV_VAR_MAP stored in the COMMON_SETTINGS.
 
virtual ENV_VAR_MAP & GetLocalEnvVariables () const
 
virtual wxApp & App ()
 Return a bare naked wxApp which may come from wxPython, SINGLE_TOP, or kicad.exe.
 
bool InitPgm (bool aHeadless=false, bool aIsUnitTest=false)
 Initialize this program.
 
const wxString & GetDesktopAppId () const
 
void Destroy ()
 
void SetRunResult (int aResult)
 Records the code the application's run loop returned, which a fast exit still reports.
 
void ExitIfTeardownUnsafe ()
 Ends the process at once when a worker abandoned inside a native driver makes the rest of the teardown unsafe, and returns otherwise.
 
void SaveCommonSettings ()
 Save the program (process) settings subset which are stored .kicad_common.
 
void HandleException (std::exception_ptr aPtr, bool aUnhandled=false)
 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.
 
bool IsGUI ()
 Determine if the application is running with a GUI.
 
void ShowSplash ()
 
void HideSplash ()
 
void PreloadDesignBlockLibraries (KIWAY *aKiway)
 Starts a background job to preload the global and project design block libraries.
 
void CancelDesignBlockPreload ()
 Asks the design block preload to stop, without waiting for it.
 
void WaitForDesignBlockPreload ()
 Waits for the design block preload to end, so it no longer reaches the project, and clears the cancel.
 
void RegisterLibraryLoadStatusBar (KISTATUSBAR *aStatusBar)
 Register a status bar to receive library load warning messages.
 
void UnregisterLibraryLoadStatusBar (KISTATUSBAR *aStatusBar)
 Unregister a status bar from receiving library load warning messages.
 
void AddLibraryLoadMessages (const std::vector< KI_ERROR > &aMessages)
 Add library load messages to all registered status bars.
 
void ClearLibraryLoadMessages ()
 Clear library load messages from all registered status bars.
 
int FilterAppEvent (wxEvent &aEvent)
 Handle events that must be seen once per application, before any window processes them.
 
bool IsSessionEnding () const
 Return true while the operating system is closing the application because the user session is ending, so close handlers can tell it apart from a close the user asked for.
 

Static Public Member Functions

static wxString DesktopAppIdForProgram (const wxString &aPgmName)
 Map a program name (argv[0] basename, lowercased) to the freedesktop application id of its installed .desktop launcher, e.g.
 

Public Attributes

bool m_Printing
 wxWidgets on MSW tends to crash if you spool up more than one print job at a time.
 
std::vector< void * > m_ModalDialogs
 
bool m_Quitting
 
bool m_PropertyGridInitialized
 

Static Public Attributes

static const wxChar workingDirKey []
 

Protected Member Functions

void loadCommonSettings ()
 Load internal settings from COMMON_SETTINGS.
 
void setLanguageId (int aId)
 Trap all changes in here, simplifies debugging.
 

Protected Attributes

std::unique_ptr< SETTINGS_MANAGER > m_settings_manager
 
std::unique_ptr< LIBRARY_MANAGER > m_library_manager
 
std::unique_ptr< BACKGROUND_JOBS_MONITOR > m_background_jobs_monitor
 
std::unique_ptr< NOTIFICATIONS_MANAGER > m_notifications_manager
 
std::unique_ptr< API_PLUGIN_MANAGER > m_plugin_manager
 
std::unique_ptr< KICAD_API_SERVER > m_api_server
 
wxString m_kicad_env
 The KICAD system environment variable.
 
wxString m_desktopAppId
 freedesktop app id of this process, or empty.
 
wxLocale * m_locale
 
int m_language_id
 
bool m_use_system_pdf_browser
 
wxString m_pdf_browser
 Filename of the app selected for browsing PDFs.
 
wxString m_text_editor
 
bool m_sessionEnding
 Set while wx handles a session-end event.
 
KICAD_SINGLETON m_singleton
 
char ** m_argvUtf8
 argv parameters converted to utf8 form because wxWidgets has opinions.
 
int m_argcUtf8
 
wxSplashScreen * m_splash
 
int m_runResult = 0
 
std::shared_ptr< BACKGROUND_JOB > m_libraryPreloadBackgroundJob
 
std::future< void > m_libraryPreloadReturn
 
std::atomic_bool m_libraryPreloadInProgress
 
std::atomic_bool m_libraryPreloadAbort
 
std::vector< KISTATUSBAR * > m_libraryLoadStatusBars
 
std::mutex m_libraryLoadStatusBarsMutex
 

Detailed Description

Implement PGM_BASE with its own OnPgmInit() and OnPgmExit().

Definition at line 81 of file single_top.cpp.

Member Function Documentation

◆ AddLibraryLoadMessages()

void PGM_BASE::AddLibraryLoadMessages ( const std::vector< KI_ERROR > & aMessages)
inherited

Add library load messages to all registered status bars.

Thread-safe - can be called from background threads.

Definition at line 1042 of file pgm_base.cpp.

References m_libraryLoadStatusBars, m_libraryLoadStatusBarsMutex, and traceLibraries.

Referenced by PCB::IFACE::PreloadLibraries(), and SCH::IFACE::PreloadLibraries().

◆ ApiServerOrNull()

KICAD_API_SERVER * PGM_BASE::ApiServerOrNull ( ) const
inlineinherited

Definition at line 144 of file pgm_base.h.

References m_api_server.

◆ App()

wxApp & PGM_BASE::App ( )
virtualinherited

Return a bare naked wxApp which may come from wxPython, SINGLE_TOP, or kicad.exe.

This should return what wxGetApp() returns.

Definition at line 236 of file pgm_base.cpp.

Referenced by BuildArgvUtf8(), DIALOG_SHIM::DIALOG_SHIM(), drawShapes(), InitPgm(), PROJECT_SCH::LegacySchLibs(), PGM_KICAD::MacOpenFile(), PGM_SINGLE_TOP::MacOpenFile(), PGM_TEST_FRAME::MacOpenFile(), PGM_KICAD::OnPgmInit(), PGM_SINGLE_TOP::OnPgmInit(), playground_main_func(), SetTopFrame(), and DIALOG_DRC::updateUI().

◆ AskUserForPreferredEditor()

const wxString PGM_BASE::AskUserForPreferredEditor ( const wxString & aDefaultEditor = wxEmptyString)
virtualinherited

Show a dialog that instructs the user to select a new preferred editor.

Parameters
aDefaultEditorDefault full path for the default editor this dialog should show by default.
Returns
the full path of the editor, or an empty string if no editor was chosen.

Definition at line 286 of file pgm_base.cpp.

References _, name, and path.

Referenced by GetTextEditor(), and PANEL_COMMON_SETTINGS::OnTextEditorClick().

◆ BuildArgvUtf8()

void PGM_BASE::BuildArgvUtf8 ( )
inherited

Builds the UTF8 based argv variable.

Definition at line 307 of file pgm_base.cpp.

References App(), m_argcUtf8, and m_argvUtf8.

◆ CancelDesignBlockPreload()

void PGM_BASE::CancelDesignBlockPreload ( )
inherited

Asks the design block preload to stop, without waiting for it.

A transition calls this before it aborts the library loads, so a preload still queued behind those loads is not waited on while they run. WaitForDesignBlockPreload() must follow before the project goes away.

Definition at line 990 of file pgm_base.cpp.

References m_libraryPreloadAbort, and m_libraryPreloadReturn.

Referenced by SETTINGS_MANAGER::stopLibraryLoads().

◆ ClearLibraryLoadMessages()

void PGM_BASE::ClearLibraryLoadMessages ( )
inherited

Clear library load messages from all registered status bars.

Definition at line 1065 of file pgm_base.cpp.

References m_libraryLoadStatusBars, m_libraryLoadStatusBarsMutex, and traceLibraries.

Referenced by PCB::IFACE::PreloadLibraries(), and SCH::IFACE::PreloadLibraries().

◆ DesktopAppIdForProgram()

wxString PGM_BASE::DesktopAppIdForProgram ( const wxString & aPgmName)
staticinherited

Map a program name (argv[0] basename, lowercased) to the freedesktop application id of its installed .desktop launcher, e.g.

"eeschema" -> "org.kicad.eeschema".

Returns
the reverse-DNS application id, or an empty string for programs without a desktop launcher (pl_editor, kicad-cli) or on platforms that do not use desktop files.

Definition at line 352 of file pgm_base.cpp.

Referenced by BOOST_AUTO_TEST_CASE(), and InitPgm().

◆ Destroy()

◆ ExitIfTeardownUnsafe()

void PGM_BASE::ExitIfTeardownUnsafe ( )
inherited

Ends the process at once when a worker abandoned inside a native driver makes the rest of the teardown unsafe, and returns otherwise.

The application calls it last in OnExit(), after OnPgmExit().

Definition at line 230 of file pgm_base.cpp.

References ExitFastIfAccessWorkerAbandoned(), and m_runResult.

◆ FilterAppEvent()

int PGM_BASE::FilterAppEvent ( wxEvent & aEvent)
inherited

Handle events that must be seen once per application, before any window processes them.

Each application's wxApp::FilterEvent() forwards here.

Definition at line 1080 of file pgm_base.cpp.

References GetBitmapStore(), m_ModalDialogs, and BITMAP_STORE::ThemeChanged().

Referenced by APP_KICAD::FilterEvent(), and APP_SINGLE_TOP::FilterEvent().

◆ ForceSystemPdfBrowser()

virtual void PGM_BASE::ForceSystemPdfBrowser ( bool aFlg)
inlinevirtualinherited

Force the use of system PDF browser, even if a preferred PDF browser is set.

Definition at line 194 of file pgm_base.h.

References m_use_system_pdf_browser.

Referenced by PGM_BASE(), and PANEL_COMMON_SETTINGS::TransferDataFromWindow().

◆ GetApiServer()

◆ GetBackgroundJobMonitor()

◆ GetCommonSettings()

COMMON_SETTINGS * PGM_BASE::GetCommonSettings ( ) const
virtualinherited

Definition at line 600 of file pgm_base.cpp.

References m_settings_manager.

Referenced by ACTION_TOOLBAR::Add(), ACTION_TOOLBAR_PALETTE::AddAction(), EDA_DRAW_FRAME::AddApiPluginMenuItems(), EDA_DRAW_FRAME::AddApiPluginTools(), KIUI::AddBitmapToMenuItem(), ACTION_TOOLBAR::AddButton(), ACTION_TOOLBAR::AddGroup(), DESIGN_BLOCK_TREE_MODEL_ADAPTER::AddLibraries(), FP_TREE_MODEL_ADAPTER::AddLibraries(), SYMBOL_TREE_MODEL_ADAPTER::AddLibraries(), PANEL_GIT_HISTORY::appendHistoryRows(), STARTWIZARD_PROVIDER_PRIVACY::ApplyDefaults(), STARTWIZARD_PROVIDER_SETTINGS::ApplyDefaults(), BOM_GENERATOR_HANDLER::BOM_GENERATOR_HANDLER(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), DIALOG_MIGRATE_3D_MODELS::buildCatalog(), CVPCB_MAINFRAME::BuildLibrariesList(), PROJECT_PCB::Cleanup3DCache(), KICAD_MANAGER_FRAME::CloseProject(), EDA_BASE_FRAME::CommonSettingsChanged(), EDA_DRAW_FRAME::CommonSettingsChanged(), KICAD_MANAGER_FRAME::CommonSettingsChanged(), TOOLS_HOLDER::CommonSettingsChanged(), KIGFX::GAL::computeWorldScale(), FOOTPRINT_EDIT_FRAME::configureToolbars(), PCB_EDIT_FRAME::configureToolbars(), SCH_EDIT_FRAME::configureToolbars(), SYMBOL_EDIT_FRAME::configureToolbars(), DIALOG_EXPORT_STEP::DIALOG_EXPORT_STEP(), EDA_BASE_FRAME::doAutoSave(), KICAD_MANAGER_FRAME::doReCreateMenuBar(), PCB_EDIT_FRAME::doReCreateMenuBar(), SCH_EDIT_FRAME::doReCreateMenuBar(), ACTION_TOOLBAR::doSelectAction(), EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL(), PANEL_GIT_HISTORY::fillCommitDetail(), STARTWIZARD_PROVIDER_PRIVACY::Finish(), STARTWIZARD_PROVIDER_SETTINGS::Finish(), GERBVIEW_FRAME::GERBVIEW_FRAME(), EDA_BASE_FRAME::GetAutoSaveInterval(), PCB_BASE_FRAME::GetLibraryItemsForListDialog(), SCH_BASE_FRAME::GetLibraryItemsForListDialog(), GetLocalEnvVariables(), GIT_CONFIG_HANDLER::GetUserConfig(), EDA_DRAW_PANEL_GAL::GetVcSettings(), SCH_DRAWING_TOOLS::ImportSheet(), InitPgm(), KIGFX::PCB_RENDER_SETTINGS::LoadColors(), EDA_3D_VIEWER_FRAME::loadCommonSettings(), loadCommonSettings(), DIALOG_SHIM::LoadControlState(), EDA_BASE_FRAME::LoadSettings(), EDA_DRAW_FRAME::LoadSettings(), KIGFX::WX_VIEW_CONTROLS::LoadSettings(), PANEL_PREVIEW_3D_MODEL::loadSettings(), localHistoryEnabled(), APP_SETTINGS_BASE::MigrateFromLegacy(), EESCHEMA_SETTINGS::MigrateFromLegacy(), GERBVIEW_SETTINGS::MigrateFromLegacy(), STARTWIZARD_PROVIDER_PRIVACY::NeedsUserInput(), FOOTPRINT_PREVIEW_PANEL::New(), PROJECT_TREE_PANE::onGitSyncTimer(), DIALOG_CONFIGURE_PATHS::OnGridCellChanging(), SPNAV_2D_PLUGIN::OnPan(), PGM_KICAD::OnPgmInit(), PGM_SINGLE_TOP::OnPgmInit(), DIALOG_SHIM::OptOut(), PANEL_EESCHEMA_COLOR_SETTINGS::PANEL_EESCHEMA_COLOR_SETTINGS(), PANEL_SYMBOL_CHOOSER::PANEL_SYMBOL_CHOOSER(), PANEL_TEMPLATE_FIELDNAMES::PANEL_TEMPLATE_FIELDNAMES(), PCB_DESIGN_BLOCK_PREVIEW_WIDGET::PCB_DESIGN_BLOCK_PREVIEW_WIDGET(), PANEL_FP_PROPERTIES_3D_MODEL::pick3DModel(), PROJECT::PinLibrary(), BOARD_EDITOR_CONTROL::PlaceFootprint(), SCH_DRAWING_TOOLS::PlaceImage(), DRAWING_TOOL::PlaceReferenceImage(), SCH_DRAWING_TOOLS::PlaceSymbol(), DRAWING_TOOL::PlaceText(), PCB_EDIT_FRAME::PrepareLayerIndicator(), PCB_EDIT_FRAME::ProjectChanged(), ReadPdfBrowserInfos(), SYMBOL_VIEWER_FRAME::ReCreateLibList(), FOOTPRINT_VIEWER_FRAME::ReCreateLibraryList(), ACTION_TOOLBAR::RefreshBitmaps(), DIALOG_SHIM::ReloadSashPositions(), SaveCommonSettings(), DIALOG_SHIM::SaveControlState(), SCHEMATIC::SaveToHistory(), SCH_DESIGN_BLOCK_PREVIEW_WIDGET::SCH_DESIGN_BLOCK_PREVIEW_WIDGET(), SetLanguage(), SetLocalEnvVariables(), PANEL_PACKAGES_VIEW::SetSashOnIdle(), SetTextEditor(), PLUGIN_CONTENT_MANAGER::ShowApiEnablePromptIfNeeded(), PROJECT_TREE_PANE::showContextMenu(), SYMBOL_PREVIEW_WIDGET::SYMBOL_PREVIEW_WIDGET(), FP_TREE_SYNCHRONIZING_ADAPTER::Sync(), SYMBOL_TREE_SYNCHRONIZING_ADAPTER::Sync(), PANEL_COMMON_SETTINGS::TransferDataFromWindow(), PANEL_GIT_REPOS::TransferDataFromWindow(), PANEL_MAINTENANCE::TransferDataFromWindow(), PANEL_MOUSE_SETTINGS::TransferDataFromWindow(), PANEL_SPACEMOUSE::TransferDataFromWindow(), PANEL_COMMON_SETTINGS::TransferDataToWindow(), PANEL_GIT_REPOS::TransferDataToWindow(), PANEL_MAINTENANCE::TransferDataToWindow(), PANEL_MOUSE_SETTINGS::TransferDataToWindow(), PANEL_PCBNEW_ACTION_PLUGINS::TransferDataToWindow(), PANEL_SPACEMOUSE::TransferDataToWindow(), SCH_DRAWING_TOOLS::TwoClickPlace(), SYMBOL_EDITOR_DRAWING_TOOLS::TwoClickPlace(), PCB_CONTROL::unfilledZoneCheck(), PROJECT::UnpinLibrary(), WritePdfBrowserInfos(), PANEL_PACKAGES_VIEW::~PANEL_PACKAGES_VIEW(), and PANEL_SETUP_RULES::~PANEL_SETUP_RULES().

◆ GetDesktopAppId()

const wxString & PGM_BASE::GetDesktopAppId ( ) const
inlineinherited

Definition at line 308 of file pgm_base.h.

References m_desktopAppId.

◆ GetExecutablePath()

const wxString & PGM_BASE::GetExecutablePath ( ) const
virtualinherited

◆ GetGLContextManager()

◆ GetKicadEnvVariable()

virtual const wxString & PGM_BASE::GetKicadEnvVariable ( ) const
inlinevirtualinherited

Definition at line 171 of file pgm_base.h.

References m_kicad_env.

Referenced by FindKicadFile().

◆ GetLanguageTag()

wxString PGM_BASE::GetLanguageTag ( )
virtualinherited
Returns
the current selected language in rfc3066 format

Definition at line 764 of file pgm_base.cpp.

References m_language_id.

Referenced by UPDATE_MANAGER::CheckForUpdate().

◆ GetLibraryManager()

virtual LIBRARY_MANAGER & PGM_BASE::GetLibraryManager ( ) const
inlinevirtualinherited

Definition at line 126 of file pgm_base.h.

References m_library_manager.

Referenced by DESIGN_BLOCK_PANE::AddDesignBlockLibrary(), DESIGN_BLOCK_TREE_MODEL_ADAPTER::AddLibraries(), SYMBOL_TREE_MODEL_ADAPTER::AddLibraries(), PCB_BASE_EDIT_FRAME::AddLibrary(), SYMBOL_TREE_MODEL_ADAPTER::AddLibrary(), SYMBOL_LIBRARY_MANAGER::addLibrary(), SYMBOL_EDIT_FRAME::AddLibraryFile(), SYMBOL_EDIT_FRAME::addLibTableEntry(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), DIALOG_SYMBOL_REMAP::createProjectSymbolLibTable(), SYMBOL_EDIT_FRAME::DdAddLibrary(), FOOTPRINT_EDIT_FRAME::DeleteFootprintFromLibrary(), PROJECT::DesignBlockLibs(), FOOTPRINT_EDIT_FRAME::DuplicateFootprint(), EnsureRemoteLibraryEntry(), FOOTPRINT_EDITOR_CONTROL::ExportForOlderVersion(), SYMBOL_EDIT_FRAME::ExportSymbol(), PROJECT_PCB::FootprintLibAdapter(), SYMBOL_LIBRARY_MANAGER::GetLibraryHash(), SYMBOL_LIBRARY_MANAGER::GetLibraryNames(), DIALOG_SYMBOL_REMAP::getLibsNotInGlobalSymbolLibTable(), API_HANDLER_LIBRARIES::handleGetLibraryStatuses(), API_HANDLER_LIBRARIES::handleReloadLibrary(), REMOTE_SYMBOL_IMPORT_JOB::Import(), InvokeEditDesignBlockLibTable(), InvokePcbLibTableEditor(), InvokeSchEditSymbolLibTable(), loadEagleSchematic(), SETTINGS_MANAGER::LoadProject(), SYMBOL_EDIT_FRAME::LoadSymbol(), NETLIST_EXPORTER_XML::makeLibraries(), PGM_KICAD::OnPgmInit(), PGM_SINGLE_TOP::OnPgmInit(), PANEL_FP_LIB_TABLE::onReset(), PANEL_SYM_LIB_TABLE::onReset(), FOOTPRINT_EDITOR_CONTROL::OpenDirectory(), SYMBOL_EDITOR_CONTROL::OpenDirectory(), SYMBOL_LIB_TABLE_RESCUER::OpenRescueLibrary(), DESIGN_BLOCK_GRID_TRICKS::openTable(), FP_GRID_TRICKS::openTable(), SYMBOL_GRID_TRICKS::openTable(), FOOTPRINT_EDITOR_CONTROL::OpenWithTextEditor(), SYMBOL_EDITOR_CONTROL::OpenWithTextEditor(), PANEL_DESIGN_BLOCK_LIB_TABLE::PANEL_DESIGN_BLOCK_LIB_TABLE(), PANEL_FP_LIB_TABLE::PANEL_FP_LIB_TABLE(), PANEL_SYM_LIB_TABLE::PANEL_SYM_LIB_TABLE(), PANEL_REMOTE_SYMBOL::receiveFootprint(), RegisterLocalFootprintLibraries(), RegisterLocalSymbolLibraries(), SYMBOL_EDIT_FRAME::replaceLibTableEntry(), FOOTPRINT_EDITOR_CONTROL::SaveAs(), FOOTPRINT_EDIT_FRAME::SaveFootprint(), FOOTPRINT_EDIT_FRAME::SaveFootprintAs(), SYMBOL_LIBRARY_MANAGER::SaveLibrary(), LIB_TABLE_NOTEBOOK_PANEL::SaveOverrides(), SaveRemoteSymbolToLibrary(), SCH_BASE_FRAME::setSymWatcher(), SETTINGS_MANAGER::stopLibraryLoads(), PROJECT_SCH::SymbolLibAdapter(), LIB_TABLE_NOTEBOOK_PANEL::TableModified(), ERC_TESTER::TestLibSymbolIssues(), PANEL_DESIGN_BLOCK_LIB_TABLE::TransferDataFromWindow(), PANEL_FP_LIB_TABLE::TransferDataFromWindow(), PANEL_SYM_LIB_TABLE::TransferDataFromWindow(), DIALOG_CONFIGURE_PATHS::TransferDataToWindow(), SETTINGS_MANAGER::UnloadProject(), FOOTPRINT_VIEWER_FRAME::UpdateTitle(), and SYMBOL_LIB_TABLE_RESCUER::WriteRescueLibrary().

◆ GetLocale()

virtual wxLocale * PGM_BASE::GetLocale ( )
inlinevirtualinherited

Definition at line 175 of file pgm_base.h.

References m_locale.

Referenced by SearchHelpFileFullPath(), and COMMON_CONTROL::ShowHelp().

◆ GetLocalEnvVariables()

◆ GetNotificationsManager()

virtual NOTIFICATIONS_MANAGER & PGM_BASE::GetNotificationsManager ( ) const
inlinevirtualinherited

◆ GetPdfBrowserName()

virtual const wxString & PGM_BASE::GetPdfBrowserName ( ) const
inlinevirtualinherited

Definition at line 177 of file pgm_base.h.

References m_pdf_browser.

Referenced by PANEL_COMMON_SETTINGS::OnPDFViewerClick(), OpenPDF(), and WritePdfBrowserInfos().

◆ GetPluginManager()

◆ GetSelectedLanguageIdentifier()

virtual int PGM_BASE::GetSelectedLanguageIdentifier ( ) const
inlinevirtualinherited
Returns
the wxWidgets language identifier Id of the language currently selected.

Definition at line 230 of file pgm_base.h.

References m_language_id.

Referenced by STARTWIZARD::CheckAndRun(), InitTables(), and EDA_BASE_FRAME::setupUIConditions().

◆ GetSettingsManager()

virtual SETTINGS_MANAGER & PGM_BASE::GetSettingsManager ( ) const
inlinevirtualinherited

Definition at line 124 of file pgm_base.h.

References m_settings_manager.

Referenced by STARTWIZARD_PROVIDER_PRIVACY::ApplyDefaults(), STARTWIZARD_PROVIDER_SETTINGS::ApplyDefaults(), LIBRARY_MANAGER::ApplyLibOverrides(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), PCB_NET_INSPECTOR_PANEL::buildColumns(), PCB_NET_INSPECTOR_PANEL::buildNetsList(), LIBRARY_MANAGER::ClearLibOverride(), KICAD_MANAGER_FRAME::CloseProject(), EDA_BASE_FRAME::commonInit(), KIWAY::CommonSettingsChanged(), FOOTPRINT_EDIT_FRAME::config(), CVPCB_MAINFRAME::CVPCB_MAINFRAME(), DIALOG_TEMPLATE_SELECTOR::DIALOG_TEMPLATE_SELECTOR(), CLI::API_SERVER_COMMAND::doPerform(), CLI::IMPORT_COMMAND::doPerform(), CLI::JOBSET_RUN_COMMAND::doPerform(), BIN_MOD::End(), EVT_TOOL_RANGE(), findAutosaveFilePairs(), STARTWIZARD_PROVIDER_PRIVACY::Finish(), STARTWIZARD_PROVIDER_SETTINGS::Finish(), GIT_COMMIT_PANE::finishPullConflictPreparation(), footprintLibraryProject(), fuzz_init(), PCBNEW_JOBS_HANDLER::getBoard(), GetColorSettings(), PCB_BASE_FRAME::GetFootprintEditorSettings(), SCHEMATIC_SETTINGS::GetJunctionSize(), PCB_BASE_FRAME::GetPcbNewSettings(), KICAD_MANAGER_FRAME::GetProjectFileName(), EESCHEMA_JOBS_HANDLER::getSchematic(), PCB_BASE_FRAME::GetViewerSettingsBase(), gvconfig(), SCH::IFACE::HandleApiOpenDocument(), PCB::IFACE::handleCreatePcb(), SCH::IFACE::handleCreateSchematic(), API_HANDLER_COMMON::handleExpandTextVariables(), API_HANDLER_LIBRARIES::handleGetItemsFromLibrary(), API_HANDLER_LIBRARIES::handleGetLibraryItems(), API_HANDLER_COMMON::handleGetNetClassAssignments(), API_HANDLER_COMMON::handleGetNetClasses(), API_HANDLER_COMMON::handleGetTextVariables(), PCB::IFACE::handleOpenFootprint(), PCB::IFACE::handleOpenPcb(), SCH::IFACE::handleOpenSymbol(), API_HANDLER_COMMON::handleSetNetClassAssignments(), API_HANDLER_COMMON::handleSetNetClasses(), API_HANDLER_COMMON::handleSetTextVariables(), historyPath(), historyPath(), PCB::IFACE::IfaceOrAddress(), init_unit_test(), InitPgm(), PCBNEW_JOBS_HANDLER::JobDiff(), EESCHEMA_JOBS_HANDLER::JobDowngrade(), EESCHEMA_JOBS_HANDLER::JobImport(), PCBNEW_JOBS_HANDLER::JobImport(), EESCHEMA_JOBS_HANDLER::JobSchDiff(), LLVMFuzzerInitialize(), loadEagleSchematic(), LIBRARY_MANAGER::LoadGlobalTables(), loadKicadProject(), KICAD_MANAGER_FRAME::LoadProject(), EESCHEMA_HELPERS::LoadSchematic(), PCB_TEST_FRAME_BASE::LoadSettings(), main(), EESCHEMA_SETTINGS::MigrateFromLegacy(), FOOTPRINT_EDITOR_SETTINGS::MigrateFromLegacy(), GERBVIEW_SETTINGS::MigrateFromLegacy(), PCBNEW_SETTINGS::MigrateFromLegacy(), STARTWIZARD_PROVIDER_SETTINGS::NeedsUserInput(), PCB_NET_INSPECTOR_PANEL::netFilterMatches(), FOOTPRINT_PREVIEW_PANEL::New(), PCB_NET_INSPECTOR_PANEL::OnBoardChanged(), PANEL_MAINTENANCE::onClearFileHistory(), PCB_NET_INSPECTOR_PANEL::OnConfigButton(), LIB_TREE::onDetailsLink(), DIALOG_TEMPLATE_SELECTOR::OnFilterChanged(), CV::IFACE::OnKifaceStart(), GERBV::IFACE::OnKifaceStart(), PCB::IFACE::OnKifaceStart(), PCBCALC::IFACE::OnKifaceStart(), PGE::IFACE::OnKifaceStart(), SCH::IFACE::OnKifaceStart(), DIALOG_CONFIG_EQUFILES::OnOkClick(), PGM_KICAD::OnPgmInit(), PGM_SINGLE_TOP::OnPgmInit(), PANEL_MAINTENANCE::onResetAll(), PANEL_COLOR_SETTINGS::OnThemeChanged(), PCBNEW_JOBS_HANDLER::OpenDiffDialog(), PANEL_FP_EDITOR_COLOR_SETTINGS::PANEL_FP_EDITOR_COLOR_SETTINGS(), PROJECT::PinLibrary(), KIWAY::Prj(), LIBRARY_MANAGER::Project(), SCH::readSchematicFromFile(), ReloadOpenEditors(), PCBNEW_JOBS_HANDLER::runPcbMerge(), LOCAL_HISTORY::RunRegisteredSaversAsAutosaveFiles(), EESCHEMA_JOBS_HANDLER::runSchMerge(), HEADLESS_PCB_CONTEXT::SaveBoard(), HEADLESS_PCB_CONTEXT::SaveBoardAs(), PANEL_COLOR_SETTINGS::saveCurrentTheme(), HEADLESS_PCB_CONTEXT::SavePcbCopy(), SCH_API_SAVE::SaveSchematicAs(), GERBVIEW_FRAME::SaveSettings(), PCB_NET_INSPECTOR_PANEL::SaveSettings(), PCB_TEST_FRAME_BASE::SetBoard(), SetLanguage(), BOARD_ADAPTER::SetLayerColors(), LIBRARY_MANAGER::SetLibOverride(), KICAD_MANAGER_CONTROL::ShowPluginManager(), EDA_BASE_FRAME::ShowPreferences(), SCH_EDIT_FRAME::ShowSchematicSetupDialog(), MATCH_PROPERTIES_TOOL::showSettingsDialog(), SCH::symbolLibraryProject(), PANEL_COMMON_SETTINGS::TransferDataFromWindow(), PANEL_MAINTENANCE::TransferDataFromWindow(), PANEL_PLUGIN_SETTINGS::TransferDataFromWindow(), PANEL_PLUGIN_SETTINGS::TransferDataToWindow(), PANEL_STARTWIZARD_SETTINGS::TransferDataToWindow(), PROJECT::UnpinLibrary(), SCH_API_SAVE::UpdateProjectFile(), API_HANDLER_COMMON::validateProject(), KIGFX::PCB_PAINTER::viewer_settings(), and SYMBOL_EDIT_FRAME::~SYMBOL_EDIT_FRAME().

◆ GetTextEditor()

const wxString & PGM_BASE::GetTextEditor ( bool aCanShowFileChooser = true)
virtualinherited

Return the path to the preferred text editor application.

Parameters
aCanShowFileChooserIf no editor is currently set and this argument is 'true' then this method will show a file chooser dialog asking for the editor's executable.
Returns
Returns the full path of the editor, or an empty string if no editor has been set.

Definition at line 250 of file pgm_base.cpp.

References _, AskUserForPreferredEditor(), DisplayInfoMessage(), m_text_editor, and SetTextEditor().

Referenced by KICAD_MANAGER_CONTROL::Execute(), DIALOG_CONFIG_EQUFILES::OnEditEquFile(), DIALOG_BOM::OnEditGenerator(), PROJECT_TREE_PANE::openInTextEditor(), FOOTPRINT_EDITOR_CONTROL::OpenWithTextEditor(), SYMBOL_EDITOR_CONTROL::OpenWithTextEditor(), and GERBVIEW_INSPECTION_TOOL::ShowSource().

◆ GetThreadPool()

BS::priority_thread_pool & PGM_BASE::GetThreadPool ( )
inherited

Definition at line 150 of file pgm_base.cpp.

References m_singleton.

◆ HandleAssert()

void PGM_BASE::HandleAssert ( const wxString & aFile,
int aLine,
const wxString & aFunc,
const wxString & aCond,
const wxString & aMsg )
inherited

A common assert handler to be used between single_top and kicad.

This lets us have a common set of assert handling, including triggering sentry reports.

Parameters
aFilethe file path of the assert.
aLinethe line number of the assert.
aFuncthe function name the assert is within.
aCondthe condition of the assert.
aMsgthe attached assert message (can be empty).

Definition at line 898 of file pgm_base.cpp.

References APP_MONITOR::SENTRY::Instance(), and APP_MONITOR::SENTRY::LogAssert().

◆ HandleException()

void PGM_BASE::HandleException ( std::exception_ptr aPtr,
bool aUnhandled = false )
inherited

A exception handler to be used at the top level if exceptions bubble up that for.

The purpose is to have a central place to log a wxWidgets error message and/or sentry report.

Parameters
aPtrPass the std::current_exception() from within the catch block.
aUnhandled

Definition at line 861 of file pgm_base.cpp.

References From_UTF8(), APP_MONITOR::SENTRY::Instance(), APP_MONITOR::SENTRY::LogException(), name, and IO_ERROR::What().

Referenced by KIWAY::KiFACE(), APP_KICAD::OnInit(), APP_KICAD_CLI::OnInit(), APP_SINGLE_TOP::OnInit(), APP_KICAD::OnRun(), APP_KICAD_CLI::OnRun(), APP_SINGLE_TOP::OnRun(), APP_KICAD::OnUnhandledException(), APP_SINGLE_TOP::OnUnhandledException(), and KIWAY::Player().

◆ HideSplash()

void PGM_BASE::HideSplash ( )
inherited

◆ InitPgm()

bool PGM_BASE::InitPgm ( bool aHeadless = false,
bool aIsUnitTest = false )
inherited

Initialize this program.

Initialize the process in a KiCad standard way using some generalized techniques:

  • Default paths (help, libs, bin) and configuration file names
  • Language and locale
  • fonts
Note
Do not initialize anything relating to DSOs or projects.
Parameters
aHeadlessIf true, run in headless mode (e.g. for unit tests) Useful in application that do not use python, to disable python dependency at run time
aIsUnitTestindicates whether or not the running application is a unit test.
Returns
true if success, false if failure and program is to terminate.

Should never happen but boost unit_test isn't playing nicely in some cases

Definition at line 373 of file pgm_base.cpp.

References _, APP_MONITOR::SENTRY::AddTag(), App(), DesktopAppIdForProgram(), DisplayErrorMessage(), COMMON_SETTINGS::API::enable_server, PATHS::EnsureUserPathsExist(), PYTHON_MANAGER::FindPythonInterpreter(), ADVANCED_CFG::GetCfg(), GetCommonSettings(), GetNotificationsManager(), GetSettingsManager(), APP_MONITOR::SENTRY::Init(), KICAD_CURL::Init(), COMMON_SETTINGS::InitializeEnvironment(), APP_MONITOR::SENTRY::Instance(), NOTIFICATIONS_MANAGER::Load(), SETTINGS_MANAGER::Load(), loadCommonSettings(), SETTINGS_MANAGER::LoadProject(), COMMON_SETTINGS::m_Api, m_background_jobs_monitor, m_desktopAppId, m_kicad_env, m_library_manager, m_notifications_manager, m_plugin_manager, m_sessionEnding, m_settings_manager, m_singleton, COMMON_SETTINGS::API::python_interpreter, ReadPdfBrowserInfos(), SetDefaultLanguage(), SetLanguage(), SetLanguagePath(), ShowSplash(), UNIX_STRING_DIR_SEP, WarnUserIfOperatingSystemUnsupported(), WIN_STRING_DIR_SEP, and wxPGGlobalVars.

Referenced by fuzz_init(), init_unit_test(), main(), PGM_KICAD::OnPgmInit(), and PGM_SINGLE_TOP::OnPgmInit().

◆ IsGUI()

bool PGM_BASE::IsGUI ( )
inherited

Determine if the application is running with a GUI.

Returns
true if there is a GUI and false otherwise.

Definition at line 852 of file pgm_base.cpp.

Referenced by SaveCommonSettings().

◆ IsKicadEnvVariableDefined()

virtual bool PGM_BASE::IsKicadEnvVariableDefined ( ) const
inlinevirtualinherited

Definition at line 169 of file pgm_base.h.

References m_kicad_env.

◆ IsSessionEnding()

bool PGM_BASE::IsSessionEnding ( ) const
inlineinherited

Return true while the operating system is closing the application because the user session is ending, so close handlers can tell it apart from a close the user asked for.

Definition at line 416 of file pgm_base.h.

References m_sessionEnding.

Referenced by EDA_BASE_FRAME::isBlockableSessionEnd().

◆ loadCommonSettings()

void PGM_BASE::loadCommonSettings ( )
protectedinherited

◆ MacOpenFile()

void PGM_SINGLE_TOP::MacOpenFile ( const wxString & aFileName)
inlineoverridevirtual

Specific to MacOSX (not used under Linux or Windows).

MacOSX requires it for file association.

See also
http://wiki.wxwidgets.org/WxMac-specific_topics

Implements PGM_BASE.

Definition at line 114 of file single_top.cpp.

References PGM_BASE::App(), KIWAY::GetBlockingDialog(), KIWAY_HOLDER::Kiway(), and KIWAY_PLAYER::OpenProjectFiles().

◆ OnPgmExit()

◆ OnPgmInit()

◆ PreloadDesignBlockLibraries()

void PGM_BASE::PreloadDesignBlockLibraries ( KIWAY * aKiway)
inherited

◆ ReadPdfBrowserInfos()

void PGM_BASE::ReadPdfBrowserInfos ( )
virtualinherited

Read the PDF browser choice from the common configuration.

Definition at line 932 of file pgm_base.cpp.

References GetCommonSettings(), COMMON_SETTINGS::m_System, m_use_system_pdf_browser, SetPdfBrowserName(), and COMMON_SETTINGS::SYSTEM::use_system_pdf_viewer.

Referenced by InitPgm(), PANEL_COMMON_SETTINGS::OnPDFViewerClick(), and OpenPDF().

◆ RegisterLibraryLoadStatusBar()

void PGM_BASE::RegisterLibraryLoadStatusBar ( KISTATUSBAR * aStatusBar)
inherited

Register a status bar to receive library load warning messages.

Multiple status bars can be registered (one per open frame).

Definition at line 1007 of file pgm_base.cpp.

References m_libraryLoadStatusBars, m_libraryLoadStatusBarsMutex, and traceLibraries.

Referenced by EVT_MENU().

◆ SaveCommonSettings()

void PGM_BASE::SaveCommonSettings ( )
inherited

Save the program (process) settings subset which are stored .kicad_common.

Definition at line 591 of file pgm_base.cpp.

References GetCommonSettings(), IsGUI(), COMMON_SETTINGS::m_System, and COMMON_SETTINGS::SYSTEM::working_dir.

Referenced by STARTWIZARD_PROVIDER_PRIVACY::ApplyDefaults(), PGM_KICAD::OnPgmExit(), and PGM_SINGLE_TOP::OnPgmExit().

◆ SetDefaultLanguage()

bool PGM_BASE::SetDefaultLanguage ( wxString & aErrMsg)
inherited

Set the default language without reference to any preferences.

Can be used to set the language for dialogs that show before preferences are loaded.

Parameters
aErrMsgString to return the error message(s) in.
Returns
false if the language could not be set.

Definition at line 707 of file pgm_base.cpp.

References _, m_language_id, m_locale, setLanguageId(), and traceLocale.

Referenced by InitPgm().

◆ SetLanguage()

bool PGM_BASE::SetLanguage ( wxString & aErrMsg,
bool first_time = false )
virtualinherited

Set the dictionary file name for internationalization.

The files are in kicad/internat/xx or kicad/internat/xx_XX and are named kicad.mo

Parameters
aErrMsgis the string to return the error message it.
first_timemust be set to true the first time this function is called, false otherwise.
Returns
false if there was an error setting the language.

Definition at line 606 of file pgm_base.cpp.

References _, GetCommonSettings(), GetSettingsManager(), COMMON_SETTINGS::SYSTEM::language, LanguagesList, m_language_id, m_locale, COMMON_SETTINGS::m_System, JSON_SETTINGS::SaveToFile(), setLanguageId(), and traceLocale.

Referenced by InitPgm(), and KIWAY::SetLanguage().

◆ setLanguageId()

void PGM_BASE::setLanguageId ( int aId)
inlineprotectedinherited

Trap all changes in here, simplifies debugging.

Definition at line 434 of file pgm_base.h.

References m_language_id.

Referenced by PGM_BASE(), SetDefaultLanguage(), SetLanguage(), and SetLanguageIdentifier().

◆ SetLanguageIdentifier()

void PGM_BASE::SetLanguageIdentifier ( int menu_id)
virtualinherited

Set in .m_language_id member the wxWidgets language identifier ID from the KiCad menu id (internal menu identifier).

Parameters
menu_idThe KiCad menuitem id (returned by Menu Event, when clicking on a menu item)

Definition at line 748 of file pgm_base.cpp.

References arrayDim(), LanguagesList, setLanguageId(), and traceLocale.

Referenced by KIWAY::SetLanguage().

◆ SetLanguagePath()

void PGM_BASE::SetLanguagePath ( )
virtualinherited

Definition at line 782 of file pgm_base.cpp.

References GetExecutablePath(), PATHS::GetLocaleDataPath(), Pgm(), and PATHS::RunningFromBuildDir().

Referenced by InitPgm().

◆ SetLocalEnvVariable()

bool PGM_BASE::SetLocalEnvVariable ( const wxString & aName,
const wxString & aValue )
virtualinherited

Set the environment variable aName to aValue.

This function first checks to see if the environment variable aName is already defined. If it is not defined, then the environment variable aName is set to a value. Otherwise, the environment variable is left unchanged. This allows the user to override environment variables for testing purposes.

Parameters
aNameis a wxString containing the environment variable name.
aValueis a wxString containing the environment variable value.
Returns
true if the environment variable Name was set to aValue.

Definition at line 799 of file pgm_base.cpp.

References traceEnvVars.

Referenced by loadCommonSettings().

◆ SetLocalEnvVariables()

void PGM_BASE::SetLocalEnvVariables ( )
virtualinherited

Update the local environment with the contents of the current ENV_VAR_MAP stored in the COMMON_SETTINGS.

See also
GetLocalEnvVariables()

Definition at line 830 of file pgm_base.cpp.

References GetCommonSettings(), and traceEnvVars.

Referenced by DIALOG_CONFIGURE_PATHS::TransferDataFromWindow().

◆ SetPdfBrowserName()

virtual void PGM_BASE::SetPdfBrowserName ( const wxString & aFileName)
inlinevirtualinherited

Definition at line 179 of file pgm_base.h.

References m_pdf_browser.

Referenced by ReadPdfBrowserInfos(), and PANEL_COMMON_SETTINGS::TransferDataFromWindow().

◆ SetRunResult()

void PGM_BASE::SetRunResult ( int aResult)
inlineinherited

Records the code the application's run loop returned, which a fast exit still reports.

Definition at line 316 of file pgm_base.h.

References m_runResult.

◆ SetTextEditor()

void PGM_BASE::SetTextEditor ( const wxString & aFileName)
virtualinherited

◆ ShowSplash()

void PGM_BASE::ShowSplash ( )
inherited

Definition at line 322 of file pgm_base.cpp.

References KiBitmap(), m_splash, and splash.

Referenced by InitPgm().

◆ UnregisterLibraryLoadStatusBar()

void PGM_BASE::UnregisterLibraryLoadStatusBar ( KISTATUSBAR * aStatusBar)
inherited

Unregister a status bar from receiving library load warning messages.

Definition at line 1027 of file pgm_base.cpp.

References m_libraryLoadStatusBars, m_libraryLoadStatusBarsMutex, and traceLibraries.

Referenced by KICAD_MANAGER_FRAME::~KICAD_MANAGER_FRAME().

◆ UseSystemPdfBrowser()

virtual bool PGM_BASE::UseSystemPdfBrowser ( ) const
inlinevirtualinherited
Returns
true if the PDF browser is the default (system) PDF browser and false if the PDF browser is the preferred (selected) browser, else returns false if there is no selected browser.

Definition at line 186 of file pgm_base.h.

References m_pdf_browser, and m_use_system_pdf_browser.

◆ WaitForDesignBlockPreload()

void PGM_BASE::WaitForDesignBlockPreload ( )
inherited

Waits for the design block preload to end, so it no longer reaches the project, and clears the cancel.

Called on the main thread after the library loads were aborted and before the active project changes.

Definition at line 997 of file pgm_base.cpp.

References m_libraryPreloadAbort, and m_libraryPreloadReturn.

Referenced by SETTINGS_MANAGER::stopLibraryLoads().

◆ WritePdfBrowserInfos()

void PGM_BASE::WritePdfBrowserInfos ( )
virtualinherited

Member Data Documentation

◆ m_api_server

std::unique_ptr<KICAD_API_SERVER> PGM_BASE::m_api_server
protectedinherited

◆ m_argcUtf8

int PGM_BASE::m_argcUtf8
protectedinherited

Definition at line 478 of file pgm_base.h.

Referenced by BuildArgvUtf8(), PGM_BASE(), and ~PGM_BASE().

◆ m_argvUtf8

char** PGM_BASE::m_argvUtf8
protectedinherited

argv parameters converted to utf8 form because wxWidgets has opinions.

This will return argv as either force converted to ASCII in char* or wchar_t only.

Definition at line 476 of file pgm_base.h.

Referenced by BuildArgvUtf8(), PGM_BASE(), and ~PGM_BASE().

◆ m_background_jobs_monitor

std::unique_ptr<BACKGROUND_JOBS_MONITOR> PGM_BASE::m_background_jobs_monitor
protectedinherited

Definition at line 444 of file pgm_base.h.

Referenced by GetBackgroundJobMonitor(), and InitPgm().

◆ m_desktopAppId

wxString PGM_BASE::m_desktopAppId
protectedinherited

freedesktop app id of this process, or empty.

Definition at line 452 of file pgm_base.h.

Referenced by GetDesktopAppId(), and InitPgm().

◆ m_kicad_env

wxString PGM_BASE::m_kicad_env
protectedinherited

The KICAD system environment variable.

Definition at line 450 of file pgm_base.h.

Referenced by GetKicadEnvVariable(), InitPgm(), and IsKicadEnvVariableDefined().

◆ m_language_id

int PGM_BASE::m_language_id
protectedinherited

◆ m_library_manager

std::unique_ptr<LIBRARY_MANAGER> PGM_BASE::m_library_manager
protectedinherited

Definition at line 443 of file pgm_base.h.

Referenced by Destroy(), GetLibraryManager(), and InitPgm().

◆ m_libraryLoadStatusBars

std::vector<KISTATUSBAR*> PGM_BASE::m_libraryLoadStatusBars
protectedinherited

◆ m_libraryLoadStatusBarsMutex

std::mutex PGM_BASE::m_libraryLoadStatusBarsMutex
mutableprotectedinherited

◆ m_libraryPreloadAbort

std::atomic_bool PGM_BASE::m_libraryPreloadAbort
protectedinherited

◆ m_libraryPreloadBackgroundJob

std::shared_ptr<BACKGROUND_JOB> PGM_BASE::m_libraryPreloadBackgroundJob
protectedinherited

Definition at line 484 of file pgm_base.h.

Referenced by PreloadDesignBlockLibraries().

◆ m_libraryPreloadInProgress

std::atomic_bool PGM_BASE::m_libraryPreloadInProgress
protectedinherited

Definition at line 486 of file pgm_base.h.

Referenced by Destroy(), and PreloadDesignBlockLibraries().

◆ m_libraryPreloadReturn

std::future<void> PGM_BASE::m_libraryPreloadReturn
protectedinherited

◆ m_locale

wxLocale* PGM_BASE::m_locale
protectedinherited

Definition at line 454 of file pgm_base.h.

Referenced by GetLocale(), PGM_BASE(), SetDefaultLanguage(), SetLanguage(), and ~PGM_BASE().

◆ m_ModalDialogs

std::vector<void*> PGM_BASE::m_ModalDialogs
inherited

Definition at line 423 of file pgm_base.h.

Referenced by FilterAppEvent(), and KIUI::IsModalDialogFocused().

◆ m_notifications_manager

std::unique_ptr<NOTIFICATIONS_MANAGER> PGM_BASE::m_notifications_manager
protectedinherited

Definition at line 445 of file pgm_base.h.

Referenced by GetNotificationsManager(), and InitPgm().

◆ m_pdf_browser

wxString PGM_BASE::m_pdf_browser
protectedinherited

Filename of the app selected for browsing PDFs.

Definition at line 458 of file pgm_base.h.

Referenced by GetPdfBrowserName(), SetPdfBrowserName(), and UseSystemPdfBrowser().

◆ m_plugin_manager

std::unique_ptr<API_PLUGIN_MANAGER> PGM_BASE::m_plugin_manager
protectedinherited

Definition at line 447 of file pgm_base.h.

Referenced by GetPluginManager(), and InitPgm().

◆ m_Printing

bool PGM_BASE::m_Printing
inherited

wxWidgets on MSW tends to crash if you spool up more than one print job at a time.

Definition at line 421 of file pgm_base.h.

Referenced by DIALOG_PRINT_GENERIC::onPrintButtonClick(), PGM_BASE(), DIALOG_PRINT::printViaPdf(), and DIALOG_PRINT::TransferDataFromWindow().

◆ m_PropertyGridInitialized

bool PGM_BASE::m_PropertyGridInitialized
inherited

Definition at line 427 of file pgm_base.h.

Referenced by PGM_BASE(), and PROPERTIES_PANEL::PROPERTIES_PANEL().

◆ m_Quitting

bool PGM_BASE::m_Quitting
inherited

Definition at line 425 of file pgm_base.h.

Referenced by KICAD_MANAGER_FRAME::doCloseWindow(), and PGM_BASE().

◆ m_runResult

int PGM_BASE::m_runResult = 0
protectedinherited

Definition at line 482 of file pgm_base.h.

Referenced by ExitIfTeardownUnsafe(), and SetRunResult().

◆ m_sessionEnding

bool PGM_BASE::m_sessionEnding
protectedinherited

Set while wx handles a session-end event.

Definition at line 461 of file pgm_base.h.

Referenced by InitPgm(), IsSessionEnding(), and PGM_BASE().

◆ m_settings_manager

std::unique_ptr<SETTINGS_MANAGER> PGM_BASE::m_settings_manager
protectedinherited

◆ m_singleton

KICAD_SINGLETON PGM_BASE::m_singleton
protectedinherited

◆ m_splash

wxSplashScreen* PGM_BASE::m_splash
protectedinherited

Definition at line 480 of file pgm_base.h.

Referenced by HideSplash(), PGM_BASE(), and ShowSplash().

◆ m_text_editor

wxString PGM_BASE::m_text_editor
protectedinherited

Definition at line 460 of file pgm_base.h.

Referenced by GetTextEditor(), loadCommonSettings(), and SetTextEditor().

◆ m_use_system_pdf_browser

bool PGM_BASE::m_use_system_pdf_browser
protectedinherited

◆ workingDirKey

const wxChar PGM_BASE::workingDirKey[]
staticinherited

Definition at line 280 of file pgm_base.h.


The documentation for this struct was generated from the following file: