KiCad PCB EDA Suite
|
Struct PGM_SINGLE_TOP implements PGM_BASE with its own OnPgmInit() and OnPgmExit(). More...
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. | |
virtual SETTINGS_MANAGER & | GetSettingsManager () const |
virtual COMMON_SETTINGS * | GetCommonSettings () const |
virtual BACKGROUND_JOBS_MONITOR & | GetBackgroundJobMonitor () const |
virtual NOTIFICATIONS_MANAGER & | GetNotificationsManager () 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) |
Shows 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) |
Sets the environment variable aName to aValue. | |
virtual void | SetLocalEnvVariables () |
Updates 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 () |
Returns a bare naked wxApp which may come from wxPython, SINGLE_TOP, or kicad.exe. | |
bool | InitPgm (bool aHeadless=false, bool aSkipPyInit=false, bool aIsUnitTest=false) |
Initialize this program. | |
void | Destroy () |
void | SaveCommonSettings () |
Save the program (process) settings subset which are stored .kicad_common. | |
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. | |
bool | IsGUI () |
Determine if the application is running with a GUI. | |
void | ShowSplash () |
void | HideSplash () |
std::unique_ptr< wxSingleInstanceChecker > & | SingleInstance () |
Allows access to the wxSingleInstanceChecker to test for other running KiCads. | |
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 () |
Loads 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< BACKGROUND_JOBS_MONITOR > | m_background_jobs_monitor |
std::unique_ptr< NOTIFICATIONS_MANAGER > | m_notifications_manager |
std::unique_ptr< SCRIPTING > | m_python_scripting |
std::unique_ptr< wxSingleInstanceChecker > | m_pgm_checker |
Checks if there is another copy of Kicad running at the same time. | |
wxString | m_kicad_env |
wxLocale * | m_locale |
The KICAD system environment variable. | |
int | m_language_id |
bool | m_use_system_pdf_browser |
wxString | m_pdf_browser |
wxString | m_text_editor |
Filename of the app selected for browsing PDFs. | |
char ** | m_argvUtf8 |
int | m_argcUtf8 |
argv parameters converted to utf8 form, because wxwidgets has opinions and will return argv as either force converted to ascii in char* or wchar_t only | |
wxSplashScreen * | m_splash |
Struct PGM_SINGLE_TOP implements PGM_BASE with its own OnPgmInit() and OnPgmExit().
Definition at line 77 of file single_top.cpp.
|
virtualinherited |
Returns a bare naked wxApp which may come from wxPython, SINGLE_TOP, or kicad.exe.
This should return what wxGetApp() returns.
Definition at line 182 of file pgm_base.cpp.
Referenced by PGM_BASE::BuildArgvUtf8(), DIALOG_SHIM::DIALOG_SHIM(), drawShapes(), PGM_BASE::InitPgm(), MacOpenFile(), PGM_KICAD::MacOpenFile(), PGM_TEST_FRAME::MacOpenFile(), PGM_KICAD::OnPgmInit(), playground_main_func(), PROJECT_SCH::SchLibs(), SetTopFrame(), and DIALOG_DRC::updateUI().
|
virtualinherited |
Shows a dialog that instructs the user to select a new preferred editor.
aDefaultEditor | Default full path for the default editor this dialog should show by default. |
Definition at line 232 of file pgm_base.cpp.
Referenced by PGM_BASE::GetTextEditor(), and PANEL_COMMON_SETTINGS::OnTextEditorClick().
|
inherited |
Builds the UTF8 based argv variable.
Definition at line 412 of file pgm_base.cpp.
References PGM_BASE::App(), PGM_BASE::m_argcUtf8, and PGM_BASE::m_argvUtf8.
|
inherited |
Definition at line 170 of file pgm_base.cpp.
References KICAD_CURL::Cleanup(), and PGM_BASE::m_pgm_checker.
Referenced by PGM_KICAD::Destroy(), main(), OnPgmExit(), PGM_TEST_FRAME::OnPgmExit(), and PGM_BASE::~PGM_BASE().
|
inlinevirtualinherited |
Force the use of system PDF browser, even if a preferred PDF browser is set.
Definition at line 204 of file pgm_base.h.
Referenced by PGM_BASE::PGM_BASE(), and PANEL_COMMON_SETTINGS::TransferDataFromWindow().
|
inlinevirtualinherited |
Definition at line 146 of file pgm_base.h.
Referenced by UPDATE_MANAGER::CheckForUpdate(), EVT_MENU_RANGE(), KISTATUSBAR::onBackgroundProgressClick(), PLUGIN_CONTENT_MANAGER::RunBackgroundUpdate(), and KICAD_MANAGER_FRAME::~KICAD_MANAGER_FRAME().
|
virtualinherited |
Definition at line 679 of file pgm_base.cpp.
References PGM_BASE::m_settings_manager.
Referenced by ACTION_TOOLBAR_PALETTE::AddAction(), KIUI::AddBitmapToMenuItem(), SYMBOL_TREE_MODEL_ADAPTER::AddLibraries(), DESIGN_BLOCK_TREE_MODEL_ADAPTER::AddLibraries(), FP_TREE_MODEL_ADAPTER::AddLibraries(), DIALOG_FOOTPRINT_CHOOSER::build3DCanvas(), CVPCB_MAINFRAME::BuildLibrariesList(), PROJECT_PCB::Cleanup3DCache(), TOOLS_HOLDER::CommonSettingsChanged(), EDA_BASE_FRAME::CommonSettingsChanged(), EDA_DRAW_FRAME::CommonSettingsChanged(), KICAD_MANAGER_FRAME::CommonSettingsChanged(), DESIGN_BLOCK_PREVIEW_WIDGET::DESIGN_BLOCK_PREVIEW_WIDGET(), DIALOG_EXPORT_STEP::DIALOG_EXPORT_STEP(), GERBVIEW_FRAME::GERBVIEW_FRAME(), EDA_BASE_FRAME::GetAutoSaveInterval(), PGM_BASE::GetLocalEnvVariables(), WX_AUI_TOOLBAR_ART::GetToolSize(), EDA_DRAW_PANEL_GAL::GetVcSettings(), SCH_DRAWING_TOOLS::ImportSheet(), PGM_BASE::InitPgm(), KIGFX::PCB_RENDER_SETTINGS::LoadColors(), EDA_3D_VIEWER_FRAME::loadCommonSettings(), PGM_BASE::loadCommonSettings(), PANEL_PREVIEW_3D_MODEL::loadSettings(), KIGFX::WX_VIEW_CONTROLS::LoadSettings(), EDA_BASE_FRAME::LoadSettings(), EDA_DRAW_FRAME::LoadSettings(), APP_SETTINGS_BASE::MigrateFromLegacy(), EESCHEMA_SETTINGS::MigrateFromLegacy(), GERBVIEW_SETTINGS::MigrateFromLegacy(), PROJECT_TREE_PANE::onGitCommit(), DIALOG_CONFIGURE_PATHS::OnGridCellChanging(), KICAD_MANAGER_FRAME::OnIdle(), BITMAP_BUTTON::OnPaint(), SYMBOL_EDITOR_CONTROL::OpenDirectory(), FOOTPRINT_EDITOR_CONTROL::OpenDirectory(), PANEL_EESCHEMA_COLOR_SETTINGS::PANEL_EESCHEMA_COLOR_SETTINGS(), PANEL_SETUP_NETCLASSES::PANEL_SETUP_NETCLASSES(), PANEL_SETUP_RULES::PANEL_SETUP_RULES(), PANEL_SYMBOL_CHOOSER::PANEL_SYMBOL_CHOOSER(), PROJECT::PinLibrary(), BOARD_EDITOR_CONTROL::PlaceFootprint(), SCH_DRAWING_TOOLS::PlaceImage(), DRAWING_TOOL::PlaceReferenceImage(), SCH_DRAWING_TOOLS::PlaceSymbol(), DRAWING_TOOL::PlaceText(), PGM_BASE::ReadPdfBrowserInfos(), SCH_EDIT_FRAME::ReCreateHToolbar(), PCB_EDIT_FRAME::ReCreateHToolbar(), SYMBOL_VIEWER_FRAME::ReCreateLibList(), FOOTPRINT_VIEWER_FRAME::ReCreateLibraryList(), SAVE_AS_DIALOG::SAVE_AS_DIALOG(), PGM_BASE::SaveCommonSettings(), PCB_BASE_FRAME::SelectLibrary(), SCH_BASE_FRAME::SelectLibraryFromList(), PGM_BASE::SetLanguage(), PGM_BASE::SetLocalEnvVariables(), PANEL_PACKAGES_VIEW::SetSashOnIdle(), PGM_BASE::SetTextEditor(), SYMBOL_PREVIEW_WIDGET::SYMBOL_PREVIEW_WIDGET(), SYMBOL_TREE_SYNCHRONIZING_ADAPTER::Sync(), FP_TREE_SYNCHRONIZING_ADAPTER::Sync(), BITMAP_STORE::ThemeChanged(), PANEL_GIT_REPOS::TransferDataFromWindow(), PANEL_COMMON_SETTINGS::TransferDataFromWindow(), PANEL_MOUSE_SETTINGS::TransferDataFromWindow(), PANEL_GIT_REPOS::TransferDataToWindow(), PANEL_COMMON_SETTINGS::TransferDataToWindow(), PANEL_MOUSE_SETTINGS::TransferDataToWindow(), PANEL_PCBNEW_ACTION_PLUGINS::TransferDataToWindow(), SCH_DRAWING_TOOLS::TwoClickPlace(), SYMBOL_EDITOR_DRAWING_TOOLS::TwoClickPlace(), PCB_CONTROL::unfilledZoneCheck(), PROJECT::UnpinLibrary(), PGM_BASE::WritePdfBrowserInfos(), PANEL_PACKAGES_VIEW::~PANEL_PACKAGES_VIEW(), PANEL_SETUP_NETCLASSES::~PANEL_SETUP_NETCLASSES(), and PANEL_SETUP_RULES::~PANEL_SETUP_RULES().
|
virtualinherited |
Definition at line 1039 of file pgm_base.cpp.
References PATHS::GetExecutablePath().
Referenced by KIWAY::dso_search_path(), EVT_UPDATE_UI_RANGE(), FindKicadFile(), NETLIST_DIALOG_ADD_GENERATOR::OnBrowseGenerators(), OnPgmInit(), PGM_BASE::SetLanguagePath(), and SystemDirsAppend().
|
inlinevirtualinherited |
Definition at line 181 of file pgm_base.h.
Referenced by FindKicadFile().
|
virtualinherited |
Definition at line 843 of file pgm_base.cpp.
References PGM_BASE::m_language_id.
Referenced by UPDATE_MANAGER::CheckForUpdate().
|
inlinevirtualinherited |
Definition at line 185 of file pgm_base.h.
Referenced by LIB_TREE_NODE_UNIT::LIB_TREE_NODE_UNIT(), SearchHelpFileFullPath(), and COMMON_CONTROL::ShowHelp().
|
virtualinherited |
Definition at line 924 of file pgm_base.cpp.
References PGM_BASE::GetCommonSettings(), COMMON_SETTINGS::m_Env, and COMMON_SETTINGS::ENVIRONMENT::vars.
Referenced by SYMBOL_EDIT_FRAME::addLibTableEntry(), BOOST_AUTO_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), PANEL_DESIGN_BLOCK_LIB_TABLE::browseLibrariesHandler(), PANEL_FP_LIB_TABLE::browseLibrariesHandler(), PANEL_SYM_LIB_TABLE::browseLibrariesHandler(), FILENAME_RESOLVER::GetKicadPaths(), SETTINGS_MANAGER::loadAllColorSettings(), DESIGN_BLOCK_LIB_TABLE::LoadGlobalTable(), FP_LIB_TABLE::LoadGlobalTable(), SYMBOL_LIB_TABLE::LoadGlobalTable(), KICAD_MANAGER_CONTROL::NewFromTemplate(), PGM_KICAD::OnPgmInit(), PCB_EDIT_FRAME::PythonSyncEnvironmentVariables(), PLUGIN_CONTENT_MANAGER::ReadEnvVar(), API_PLUGIN_MANAGER::ReloadPlugins(), SYMBOL_EDIT_FRAME::replaceLibTableEntry(), DIALOG_CONFIGURE_PATHS::TransferDataFromWindow(), DIALOG_CONFIGURE_PATHS::TransferDataToWindow(), and DIALOG_GLOBAL_LIB_TABLE_CONFIG::TransferDataToWindow().
|
inlinevirtualinherited |
Definition at line 148 of file pgm_base.h.
Referenced by KICAD_MANAGER_FRAME::CreatePCM(), EVT_MENU_RANGE(), PGM_BASE::InitPgm(), KISTATUSBAR::onNotificationsIconClick(), and KICAD_MANAGER_FRAME::~KICAD_MANAGER_FRAME().
|
inlinevirtualinherited |
Definition at line 187 of file pgm_base.h.
Referenced by PANEL_COMMON_SETTINGS::OnPDFViewerClick(), OpenPDF(), and PGM_BASE::WritePdfBrowserInfos().
|
inlinevirtualinherited |
Definition at line 238 of file pgm_base.h.
Referenced by InitTables(), and EDA_BASE_FRAME::setupUIConditions().
|
inlinevirtualinherited |
Definition at line 142 of file pgm_base.h.
Referenced by PANEL_DESIGN_BLOCK_LIB_TABLE::browseLibrariesHandler(), PANEL_FP_LIB_TABLE::browseLibrariesHandler(), PANEL_SYM_LIB_TABLE::browseLibrariesHandler(), DIALOG_FOOTPRINT_CHOOSER::build3DCanvas(), FOOTPRINT_CHOOSER_FRAME::build3DCanvas(), PCB_NET_INSPECTOR_PANEL::buildColumns(), PCB_NET_INSPECTOR_PANEL::buildNetsList(), UPDATE_MANAGER::CheckForUpdate(), KICAD_MANAGER_FRAME::CloseProject(), EDA_BASE_FRAME::commonInit(), SCH_EDIT_FRAME::CommonSettingsChanged(), SYMBOL_VIEWER_FRAME::CommonSettingsChanged(), GERBVIEW_FRAME::CommonSettingsChanged(), PL_EDITOR_FRAME::CommonSettingsChanged(), FOOTPRINT_EDIT_FRAME::CommonSettingsChanged(), FOOTPRINT_EDIT_FRAME::config(), PANEL_SYMBOL_CHOOSER::constructRightPanel(), BMP2CMP::IFACE::CreateKiWindow(), PCB::IFACE::CreateKiWindow(), DESIGN_BLOCK_PREVIEW_WIDGET::DESIGN_BLOCK_PREVIEW_WIDGET(), DIALOG_FOOTPRINT_WIZARD_LIST::DIALOG_FOOTPRINT_WIZARD_LIST(), SYMBOL_EDITOR_DRAWING_TOOLS::doDrawShape(), SCH_MOVE_TOOL::doMoveSelection(), GRID_CELL_LAYER_RENDERER::Draw(), BIN_MOD::End(), EVT_TOOL_RANGE(), GERBVIEW_DRAW_PANEL_GAL::GERBVIEW_DRAW_PANEL_GAL(), PCB_EDITOR_CONDITIONS::get45degModeFunc(), PCB_EDIT_FRAME::GetActionPluginButtonVisible(), PCBNEW_JOBS_HANDLER::getBoard(), BOARD_ADAPTER::GetBoardEditorCopperLayerColors(), SCH_MARKER::getColor(), PCB_MARKER::getColor(), FOOTPRINT_CHOOSER_FRAME::GetColorSettings(), EDA_DRAW_FRAME::GetColorSettings(), DISPLAY_FOOTPRINTS_FRAME::GetColorSettings(), SCH_BASE_FRAME::GetColorSettings(), SYMBOL_EDIT_FRAME::GetColorSettings(), GERBVIEW_FRAME::GetColorSettings(), FOOTPRINT_EDIT_FRAME::GetColorSettings(), FOOTPRINT_VIEWER_FRAME::GetColorSettings(), FOOTPRINT_WIZARD_FRAME::GetColorSettings(), PCB_BASE_EDIT_FRAME::GetColorSettings(), SCH_ITEM::GetDefaultFont(), PCB_BASE_FRAME::GetFootprintEditorSettings(), GetLastPinLength(), GetLastPinNameSize(), GetLastPinNumSize(), PCB_LAYER_PRESENTATION::getLayerColor(), GetLayerColor(), BOARD_ADAPTER::GetLayerColors(), DISPLAY_FOOTPRINTS_FRAME::GetMagneticItemsSettings(), PCB_EDIT_FRAME::GetOrderedActionPlugins(), PCB_BASE_FRAME::GetPcbNewSettings(), KICAD_MANAGER_FRAME::GetProjectFileName(), EESCHEMA_JOBS_HANDLER::getSchematic(), FOOTPRINT_EDIT_FRAME::GetSettings(), SCH_BASE_FRAME::GetViewerSettingsBase(), PCB_BASE_FRAME::GetViewerSettingsBase(), DISPLAY_FOOTPRINTS_FRAME::GetViewerSettingsBase(), DISPLAY_FOOTPRINTS_FRAME::GetWindowSettings(), gvconfig(), API_HANDLER_COMMON::handleExpandTextVariables(), API_HANDLER_COMMON::handleGetNetClasses(), HandleJobConfig(), IfaceOrAddress(), DIALOG_EXPORT_2581::Init(), DIALOG_EXPORT_ODBPP::Init(), init_unit_test(), DIALOG_PLOT_SCHEMATIC::initDlg(), PGM_BASE::InitPgm(), EESCHEMA_JOBS_HANDLER::InitRenderSettings(), PCB_TOOL_BASE::Is45Limited(), PCBNEW_JOBS_HANDLER::JobExportPdf(), PCBNEW_JOBS_HANDLER::JobExportRender(), EESCHEMA_JOBS_HANDLER::JobSymExportSvg(), PCBNEW_PRINTOUT_SETTINGS::Load(), PANEL_EESCHEMA_EDITING_OPTIONS::loadEEschemaSettings(), DESIGN_BLOCK_LIB_TABLE::LoadGlobalTable(), FP_LIB_TABLE::LoadGlobalTable(), SYMBOL_LIB_TABLE::LoadGlobalTable(), loadKicadProject(), KICAD_MANAGER_FRAME::LoadProject(), PANEL_PREVIEW_3D_MODEL::loadSettings(), PCB_TEST_FRAME_BASE::LoadSettings(), SYMBOL_VIEWER_FRAME::LoadSettings(), FOOTPRINT_VIEWER_FRAME::LoadSettings(), PCB_VIEWER_TOOLS::MeasureTool(), EESCHEMA_SETTINGS::MigrateFromLegacy(), GERBVIEW_SETTINGS::MigrateFromLegacy(), FOOTPRINT_EDITOR_SETTINGS::MigrateFromLegacy(), PCBNEW_SETTINGS::MigrateFromLegacy(), PCB_NET_INSPECTOR_PANEL::netFilterMatches(), FOOTPRINT_PREVIEW_PANEL::New(), KICAD_MANAGER_CONTROL::NewFromTemplate(), PCB_NET_INSPECTOR_PANEL::OnBoardChanged(), PCB_NET_INSPECTOR_PANEL::OnConfigButton(), LIB_TREE::onDetailsLink(), PANEL_PACKAGES_VIEW::OnDownloadVersionClicked(), CV::IFACE::OnKifaceStart(), SCH::IFACE::OnKifaceStart(), GERBV::IFACE::OnKifaceStart(), PGE::IFACE::OnKifaceStart(), PCBCALC::IFACE::OnKifaceStart(), PCB::IFACE::OnKifaceStart(), DIALOG_PCM::OnManageRepositoriesClicked(), DIALOG_CONFIG_EQUFILES::OnOkClick(), PGM_KICAD::OnPgmInit(), PANEL_COLOR_SETTINGS::OnThemeChanged(), PANEL_DESIGN_BLOCK_CHOOSER::PANEL_DESIGN_BLOCK_CHOOSER(), PANEL_DESIGN_BLOCK_LIB_TABLE::PANEL_DESIGN_BLOCK_LIB_TABLE(), PANEL_EESCHEMA_COLOR_SETTINGS::PANEL_EESCHEMA_COLOR_SETTINGS(), PANEL_FP_EDITOR_COLOR_SETTINGS::PANEL_FP_EDITOR_COLOR_SETTINGS(), PANEL_FP_LIB_TABLE::PANEL_FP_LIB_TABLE(), PANEL_FP_PROPERTIES_3D_MODEL::PANEL_FP_PROPERTIES_3D_MODEL(), PANEL_GERBVIEW_COLOR_SETTINGS::PANEL_GERBVIEW_COLOR_SETTINGS(), PANEL_GERBVIEW_DISPLAY_OPTIONS::PANEL_GERBVIEW_DISPLAY_OPTIONS(), PANEL_PCBNEW_COLOR_SETTINGS::PANEL_PCBNEW_COLOR_SETTINGS(), PANEL_SYM_LIB_TABLE::PANEL_SYM_LIB_TABLE(), PANEL_SYMBOL_CHOOSER::PANEL_SYMBOL_CHOOSER(), PANEL_TEMPLATE_FIELDNAMES::PANEL_TEMPLATE_FIELDNAMES(), PROJECT::PinLibrary(), PL_DRAW_PANEL_GAL::PL_DRAW_PANEL_GAL(), EXPORT_SVG::Plot(), SCH_PLOTTER::Plot(), SCH_SHEET::Plot(), DIALOG_PLOT::Plot(), POSITION_RELATIVE_TOOL::PositionRelativeInteractively(), SCH_PRINTOUT::PrintPage(), KIWAY::Prj(), EDA_3D_VIEWER_FRAME::Process_Special_Functions(), SCH::readSchematicFromFile(), PIN_LAYOUT_CACHE::recomputeCaches(), BOARD_ADAPTER::ReloadColorSettings(), EDA_3D_CANVAS::RenderEngineChanged(), SCH_EDIT_TOOL::RepeatDrawItem(), SYMBOL_EDITOR_PIN_TOOL::RepeatPin(), PCBNEW_PRINTOUT_SETTINGS::Save(), PANEL_COLOR_SETTINGS::saveCurrentTheme(), SaveFileAs(), PCB_NET_INSPECTOR_PANEL::SaveSettings(), EDA_3D_VIEWER_FRAME::SaveSettings(), SYMBOL_VIEWER_FRAME::SaveSettings(), GERBVIEW_FRAME::SaveSettings(), SCH_DRAW_PANEL::SCH_DRAW_PANEL(), SCHEMATIC_SETTINGS::SCHEMATIC_SETTINGS(), PCB_TEST_FRAME_BASE::SetBoard(), PGM_BASE::SetLanguage(), BOARD_ADAPTER::SetLayerColors(), PANEL_SYM_LIB_TABLE::setupGrid(), PANEL_FP_LIB_TABLE::setupGrid(), PIN_TABLE_DATA_MODEL::SetValue(), KICAD_MANAGER_CONTROL::ShowPluginManager(), EDA_BASE_FRAME::ShowPreferences(), SCH_EDIT_FRAME::ShowSchematicSetupDialog(), SYMBOL_EDIT_FRAME::SYMBOL_EDIT_FRAME(), SYMBOL_PREVIEW_WIDGET::SYMBOL_PREVIEW_WIDGET(), EDA_3D_VIEWER_FRAME::ToggleAppearanceManager(), DRAWING_TOOL::ToggleHV45Mode(), PANEL_3D_DISPLAY_OPTIONS::TransferDataFromWindow(), PANEL_3D_OPENGL_OPTIONS::TransferDataFromWindow(), PANEL_3D_RAYTRACING_OPTIONS::TransferDataFromWindow(), PANEL_PACKAGES_AND_UPDATES::TransferDataFromWindow(), PANEL_EESCHEMA_ANNOTATION_OPTIONS::TransferDataFromWindow(), PANEL_EESCHEMA_COLOR_SETTINGS::TransferDataFromWindow(), PANEL_EESCHEMA_DISPLAY_OPTIONS::TransferDataFromWindow(), PANEL_EESCHEMA_EDITING_OPTIONS::TransferDataFromWindow(), PANEL_SIMULATOR_PREFERENCES::TransferDataFromWindow(), PANEL_SYM_COLOR_SETTINGS::TransferDataFromWindow(), PANEL_SYM_DISPLAY_OPTIONS::TransferDataFromWindow(), PANEL_SYM_EDITING_OPTIONS::TransferDataFromWindow(), PANEL_TEMPLATE_FIELDNAMES::TransferDataFromWindow(), PANEL_GERBVIEW_COLOR_SETTINGS::TransferDataFromWindow(), PANEL_GERBVIEW_DISPLAY_OPTIONS::TransferDataFromWindow(), PANEL_GERBVIEW_EXCELLON_SETTINGS::TransferDataFromWindow(), PANEL_COMMON_SETTINGS::TransferDataFromWindow(), PANEL_PLUGIN_SETTINGS::TransferDataFromWindow(), DIALOG_UPDATE_CHECK_PROMPT::TransferDataFromWindow(), PANEL_PL_EDITOR_COLOR_SETTINGS::TransferDataFromWindow(), DIALOG_EXPORT_2581::TransferDataFromWindow(), DIALOG_EXPORT_ODBPP::TransferDataFromWindow(), PANEL_EDIT_OPTIONS::TransferDataFromWindow(), PANEL_FP_EDITOR_COLOR_SETTINGS::TransferDataFromWindow(), PANEL_FP_EDITOR_DEFAULTS::TransferDataFromWindow(), PANEL_PCB_DISPLAY_OPTIONS::TransferDataFromWindow(), PANEL_PCBNEW_COLOR_SETTINGS::TransferDataFromWindow(), PANEL_3D_DISPLAY_OPTIONS::TransferDataToWindow(), PANEL_3D_OPENGL_OPTIONS::TransferDataToWindow(), PANEL_3D_RAYTRACING_OPTIONS::TransferDataToWindow(), PANEL_PACKAGES_AND_UPDATES::TransferDataToWindow(), DIALOG_LIB_SYMBOL_PROPERTIES::TransferDataToWindow(), PANEL_EESCHEMA_ANNOTATION_OPTIONS::TransferDataToWindow(), PANEL_EESCHEMA_DISPLAY_OPTIONS::TransferDataToWindow(), PANEL_EESCHEMA_EDITING_OPTIONS::TransferDataToWindow(), PANEL_SIMULATOR_PREFERENCES::TransferDataToWindow(), PANEL_SYM_COLOR_SETTINGS::TransferDataToWindow(), PANEL_SYM_DISPLAY_OPTIONS::TransferDataToWindow(), PANEL_SYM_EDITING_OPTIONS::TransferDataToWindow(), PANEL_GERBVIEW_DISPLAY_OPTIONS::TransferDataToWindow(), PANEL_GERBVIEW_EXCELLON_SETTINGS::TransferDataToWindow(), PANEL_PLUGIN_SETTINGS::TransferDataToWindow(), PANEL_PL_EDITOR_COLOR_SETTINGS::TransferDataToWindow(), PANEL_EDIT_OPTIONS::TransferDataToWindow(), PANEL_FP_EDITOR_DEFAULTS::TransferDataToWindow(), PANEL_PCB_DISPLAY_OPTIONS::TransferDataToWindow(), SYMBOL_EDITOR_DRAWING_TOOLS::TwoClickPlace(), PROJECT::UnpinLibrary(), PCB_DRAW_PANEL_GAL::UpdateColors(), DRAWING_TOOL::UpdateStatusBar(), KIGFX::PCB_PAINTER::viewer_settings(), DIALOG_FOOTPRINT_WIZARD_LIST::~DIALOG_FOOTPRINT_WIZARD_LIST(), PANEL_FOOTPRINT_CHOOSER::~PANEL_FOOTPRINT_CHOOSER(), and SYMBOL_EDIT_FRAME::~SYMBOL_EDIT_FRAME().
|
virtualinherited |
Return the path to the preferred text editor application.
aCanShowFileChooser | If 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. |
Definition at line 196 of file pgm_base.cpp.
References _, PGM_BASE::AskUserForPreferredEditor(), DisplayInfoMessage(), PGM_BASE::m_text_editor, and PGM_BASE::SetTextEditor().
Referenced by KICAD_MANAGER_CONTROL::Execute(), DIALOG_CONFIG_EQUFILES::OnEditEquFile(), DIALOG_BOM::OnEditGenerator(), PROJECT_TREE_PANE::onOpenSelectedFileWithTextEditor(), SYMBOL_EDITOR_CONTROL::OpenWithTextEditor(), FOOTPRINT_EDITOR_CONTROL::OpenWithTextEditor(), and GERBVIEW_INSPECTION_TOOL::ShowSource().
|
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
aFile | the file path of the assert |
aLine | the line number of the assert |
aFunc | the function name the assert is within |
aCond | the condition of the assert |
aMsg | the attached assert message (can be empty) |
Definition at line 996 of file pgm_base.cpp.
|
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
aPtr | Pass the std::current_exception() from within the catch block |
Definition at line 939 of file pgm_base.cpp.
References From_UTF8(), name, and IO_ERROR::What().
Referenced by KIWAY::KiFACE(), APP_SINGLE_TOP::OnInit(), APP_SINGLE_TOP::OnRun(), APP_KICAD::OnRun(), APP_KICAD_CLI::OnRun(), and KIWAY::Player().
|
inherited |
Definition at line 446 of file pgm_base.cpp.
References PGM_BASE::m_splash.
Referenced by SCH::IFACE::loadGlobalLibTable(), PCB::IFACE::loadGlobalLibTable(), PGM_KICAD::OnPgmInit(), SCH_EDIT_FRAME::OpenProjectFiles(), and PGM_BASE::~PGM_BASE().
|
inherited |
Initialize this program.
Initialize the process in a KiCad standard way using some generalized techniques:
aHeadless | If true, run in headless mode (e.g. for unit tests) |
aSkipPyInit | If true, do not init python stuff. Useful in application that do not use python, to disable python dependency at run time |
Should never happen but boost unit_test isn't playing nicely in some cases
Definition at line 457 of file pgm_base.cpp.
References _, PGM_BASE::App(), DisplayErrorMessage(), PATHS::EnsurePathExists(), PATHS::EnsureUserPathsExist(), ADVANCED_CFG::GetCfg(), PGM_BASE::GetCommonSettings(), PATHS::GetInstanceCheckerPath(), GetMajorMinorVersion(), PGM_BASE::GetNotificationsManager(), PGM_BASE::GetSettingsManager(), KICAD_CURL::Init(), COMMON_SETTINGS::InitializeEnvironment(), NOTIFICATIONS_MANAGER::Load(), SETTINGS_MANAGER::Load(), PGM_BASE::loadCommonSettings(), SETTINGS_MANAGER::LoadProject(), COMMON_SETTINGS::m_Api, PGM_BASE::m_background_jobs_monitor, PGM_BASE::m_kicad_env, PGM_BASE::m_notifications_manager, PGM_BASE::m_pgm_checker, PGM_BASE::m_python_scripting, PGM_BASE::m_settings_manager, COMMON_SETTINGS::API::python_interpreter, PGM_BASE::ReadPdfBrowserInfos(), PGM_BASE::SetDefaultLanguage(), PGM_BASE::SetLanguage(), PGM_BASE::SetLanguagePath(), PGM_BASE::ShowSplash(), UNIX_STRING_DIR_SEP, WarnUserIfOperatingSystemUnsupported(), WIN_STRING_DIR_SEP, and wxPGGlobalVars.
Referenced by init_unit_test(), main(), and PGM_KICAD::OnPgmInit().
|
inherited |
Determine if the application is running with a GUI.
Definition at line 930 of file pgm_base.cpp.
|
inlinevirtualinherited |
Definition at line 179 of file pgm_base.h.
|
protectedinherited |
Loads internal settings from COMMON_SETTINGS.
Definition at line 643 of file pgm_base.cpp.
References PGM_BASE::GetCommonSettings(), COMMON_SETTINGS::m_System, PGM_BASE::m_text_editor, PROJECT_VAR_NAME, PGM_BASE::SetLocalEnvVariable(), COMMON_SETTINGS::SYSTEM::text_editor, and traceEnvVars.
Referenced by PGM_BASE::InitPgm().
|
inlineoverridevirtual |
Specific to MacOSX (not used under Linux or Windows).
MacOSX requires it for file association.
Implements PGM_BASE.
Definition at line 102 of file single_top.cpp.
References PGM_BASE::App(), KIWAY::GetBlockingDialog(), KIWAY_HOLDER::Kiway(), and KIWAY_PLAYER::OpenProjectFiles().
|
inline |
Definition at line 81 of file single_top.cpp.
References PGM_BASE::Destroy(), Kiway, PGM_BASE::m_settings_manager, KIWAY::OnKiwayEnd(), and PGM_BASE::SaveCommonSettings().
Referenced by APP_SINGLE_TOP::OnExit(), and APP_SINGLE_TOP::OnInit().
bool PGM_SINGLE_TOP::OnPgmInit | ( | ) |
Definition at line 308 of file single_top.cpp.
References EDA_BASE_FRAME::GetAboutTitle(), PGM_BASE::GetExecutablePath(), GetSettingsManager(), kiface(), KIFACE_GETTER, KIFACE_VERSION, KIWAY::KifaceType(), Kiway, KIWAY_PLAYER::OpenProjectFiles(), KIWAY::Player(), SETTINGS_MANAGER::RegisterSettings(), KIWAY::set_kiface(), SETTINGS_MANAGER::SetKiway(), and KIWAY::SetTop().
Referenced by APP_SINGLE_TOP::OnInit().
|
virtualinherited |
Read the PDF browser choice from the common configuration.
Definition at line 1045 of file pgm_base.cpp.
References PGM_BASE::GetCommonSettings(), COMMON_SETTINGS::m_System, PGM_BASE::m_use_system_pdf_browser, PGM_BASE::SetPdfBrowserName(), and COMMON_SETTINGS::SYSTEM::use_system_pdf_viewer.
Referenced by PGM_BASE::InitPgm(), PANEL_COMMON_SETTINGS::OnPDFViewerClick(), and OpenPDF().
|
inherited |
Save the program (process) settings subset which are stored .kicad_common.
Definition at line 670 of file pgm_base.cpp.
References PGM_BASE::GetCommonSettings(), COMMON_SETTINGS::m_System, and COMMON_SETTINGS::SYSTEM::working_dir.
Referenced by OnPgmExit(), and PGM_KICAD::OnPgmExit().
|
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
aErrMsg | String to return the error message(s) in |
Definition at line 786 of file pgm_base.cpp.
References _, PGM_BASE::m_language_id, PGM_BASE::m_locale, PGM_BASE::setLanguageId(), and traceLocale.
Referenced by PGM_BASE::InitPgm().
|
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
aErrMsg | is the string to return the error message it. |
first_time | must be set to true the first time this function is called, false otherwise. |
Definition at line 685 of file pgm_base.cpp.
References _, PGM_BASE::GetCommonSettings(), PGM_BASE::GetSettingsManager(), COMMON_SETTINGS::SYSTEM::language, LanguagesList, LANGUAGE_DESCR::m_KI_Lang_Identifier, LANGUAGE_DESCR::m_Lang_Label, PGM_BASE::m_language_id, PGM_BASE::m_locale, COMMON_SETTINGS::m_System, JSON_SETTINGS::SaveToFile(), PGM_BASE::setLanguageId(), and traceLocale.
Referenced by PGM_BASE::InitPgm(), and KIWAY::SetLanguage().
|
inlineprotectedinherited |
Trap all changes in here, simplifies debugging.
Definition at line 399 of file pgm_base.h.
Referenced by PGM_BASE::PGM_BASE(), PGM_BASE::SetDefaultLanguage(), PGM_BASE::SetLanguage(), and PGM_BASE::SetLanguageIdentifier().
|
virtualinherited |
Set in .m_language_id member the wxWidgets language identifier ID from the KiCad menu id (internal menu identifier).
menu_id | The KiCad menuitem id (returned by Menu Event, when clicking on a menu item) |
Definition at line 827 of file pgm_base.cpp.
References arrayDim(), LanguagesList, LANGUAGE_DESCR::m_KI_Lang_Identifier, PGM_BASE::setLanguageId(), and traceLocale.
Referenced by KIWAY::SetLanguage().
|
virtualinherited |
Definition at line 859 of file pgm_base.cpp.
References PGM_BASE::GetExecutablePath(), PATHS::GetLocaleDataPath(), and Pgm().
Referenced by PGM_BASE::InitPgm().
|
virtualinherited |
Sets 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.
aName | is a wxString containing the environment variable name. |
aValue | is a wxString containing the environment variable value. |
Definition at line 877 of file pgm_base.cpp.
References traceEnvVars.
Referenced by PGM_BASE::loadCommonSettings().
|
virtualinherited |
Updates the local environment with the contents of the current ENV_VAR_MAP stored in the COMMON_SETTINGS.
Definition at line 908 of file pgm_base.cpp.
References PGM_BASE::GetCommonSettings(), and traceEnvVars.
Referenced by DIALOG_CONFIGURE_PATHS::TransferDataFromWindow().
|
inlinevirtualinherited |
Definition at line 189 of file pgm_base.h.
Referenced by PGM_BASE::ReadPdfBrowserInfos(), and PANEL_COMMON_SETTINGS::TransferDataFromWindow().
|
virtualinherited |
Definition at line 189 of file pgm_base.cpp.
References PGM_BASE::GetCommonSettings(), COMMON_SETTINGS::m_System, PGM_BASE::m_text_editor, and COMMON_SETTINGS::SYSTEM::text_editor.
Referenced by PGM_BASE::GetTextEditor(), and PANEL_COMMON_SETTINGS::TransferDataFromWindow().
|
inherited |
Definition at line 427 of file pgm_base.cpp.
References KiBitmap(), and PGM_BASE::m_splash.
Referenced by PGM_BASE::InitPgm().
|
inlineinherited |
Allows access to the wxSingleInstanceChecker to test for other running KiCads.
Definition at line 378 of file pgm_base.h.
|
inlinevirtualinherited |
Definition at line 196 of file pgm_base.h.
|
virtualinherited |
Save the PDF browser choice to the common configuration.
Definition at line 1052 of file pgm_base.cpp.
References PGM_BASE::GetCommonSettings(), PGM_BASE::GetPdfBrowserName(), COMMON_SETTINGS::m_System, PGM_BASE::m_use_system_pdf_browser, COMMON_SETTINGS::SYSTEM::pdf_viewer_name, and COMMON_SETTINGS::SYSTEM::use_system_pdf_viewer.
Referenced by PANEL_COMMON_SETTINGS::TransferDataFromWindow().
|
protectedinherited |
argv parameters converted to utf8 form, because wxwidgets has opinions and will return argv as either force converted to ascii in char* or wchar_t only
Definition at line 441 of file pgm_base.h.
Referenced by PGM_BASE::BuildArgvUtf8(), PGM_BASE::PGM_BASE(), and PGM_BASE::~PGM_BASE().
|
protectedinherited |
Definition at line 438 of file pgm_base.h.
Referenced by PGM_BASE::BuildArgvUtf8(), PGM_BASE::PGM_BASE(), and PGM_BASE::~PGM_BASE().
|
protectedinherited |
Definition at line 409 of file pgm_base.h.
Referenced by PGM_BASE::InitPgm().
|
protectedinherited |
Definition at line 422 of file pgm_base.h.
Referenced by PGM_BASE::InitPgm().
|
protectedinherited |
Definition at line 425 of file pgm_base.h.
Referenced by PGM_BASE::GetLanguageTag(), PGM_BASE::SetDefaultLanguage(), and PGM_BASE::SetLanguage().
|
protectedinherited |
The KICAD system environment variable.
Definition at line 424 of file pgm_base.h.
Referenced by PGM_BASE::PGM_BASE(), PGM_BASE::SetDefaultLanguage(), PGM_BASE::SetLanguage(), and PGM_BASE::~PGM_BASE().
|
inherited |
Definition at line 388 of file pgm_base.h.
Referenced by APP_SINGLE_TOP::FilterEvent(), APP_KICAD::FilterEvent(), and KIUI::IsModalDialogFocused().
|
protectedinherited |
Definition at line 410 of file pgm_base.h.
Referenced by PGM_BASE::InitPgm().
|
protectedinherited |
Definition at line 428 of file pgm_base.h.
|
protectedinherited |
Checks if there is another copy of Kicad running at the same time.
Definition at line 415 of file pgm_base.h.
Referenced by PGM_BASE::Destroy(), and PGM_BASE::InitPgm().
|
inherited |
wxWidgets on MSW tends to crash if you spool up more than one print job at a time.
Definition at line 386 of file pgm_base.h.
Referenced by DIALOG_PRINT_GENERIC::onPrintButtonClick(), PGM_BASE::PGM_BASE(), and DIALOG_PRINT_USING_PRINTER::TransferDataFromWindow().
|
inherited |
Definition at line 392 of file pgm_base.h.
Referenced by PGM_BASE::PGM_BASE(), and PROPERTIES_PANEL::PROPERTIES_PANEL().
|
protectedinherited |
Definition at line 412 of file pgm_base.h.
Referenced by PGM_BASE::InitPgm().
|
inherited |
Definition at line 390 of file pgm_base.h.
Referenced by KICAD_MANAGER_FRAME::doCloseWindow(), and PGM_BASE::PGM_BASE().
|
protectedinherited |
Definition at line 408 of file pgm_base.h.
Referenced by PGM_BASE::GetCommonSettings(), PGM_BASE::InitPgm(), OnPgmExit(), and PGM_KICAD::OnPgmExit().
|
protectedinherited |
Definition at line 443 of file pgm_base.h.
Referenced by PGM_BASE::HideSplash(), PGM_BASE::PGM_BASE(), and PGM_BASE::ShowSplash().
|
protectedinherited |
Filename of the app selected for browsing PDFs.
Definition at line 430 of file pgm_base.h.
Referenced by PGM_BASE::GetTextEditor(), PGM_BASE::loadCommonSettings(), and PGM_BASE::SetTextEditor().
|
protectedinherited |
Definition at line 427 of file pgm_base.h.
Referenced by PGM_BASE::ReadPdfBrowserInfos(), and PGM_BASE::WritePdfBrowserInfos().
|
staticinherited |
Definition at line 287 of file pgm_base.h.