KiCad PCB EDA Suite
kicad.cpp File Reference

Main KiCad Project manager file. More...

#include <wx/filename.h>
#include <wx/log.h>
#include <wx/stdpaths.h>
#include <wx/string.h>
#include <common.h>
#include <hotkeys_basic.h>
#include <kiway.h>
#include <richio.h>
#include <wildcards_and_files_ext.h>
#include <systemdirsappend.h>
#include <stdexcept>
#include "pgm_kicad.h"
#include "kicad.h"
#include <kiface_i.h>

Go to the source code of this file.

Classes

struct  APP_KICAD
 Struct APP_KICAD is not publicly visible because most of the action is in PGM_KICAD these days. More...
 

Functions

KIFACE_IKiface ()
 Global KIFACE_I "get" accessor. More...
 
PGM_BASEPgm ()
 The global Program "get" accessor. More...
 
PGM_KICADPgmTop ()
 
PROJECTPrj ()
 

Variables

static PGM_KICAD program
 

Detailed Description

Main KiCad Project manager file.

Definition in file kicad.cpp.

Function Documentation

KIFACE_I& Kiface ( )

Global KIFACE_I "get" accessor.

Definition at line 52 of file kicad.cpp.

Referenced by add_search_paths(), AUTOPLACER::AUTOPLACER(), PCB_EDIT_FRAME::Begin_Zone(), CVPCB_MAINFRAME::buildEquivalenceList(), EDA_BASE_FRAME::config(), DIALOG_BOM::DIALOG_BOM(), DIALOG_COPPER_ZONE::DIALOG_COPPER_ZONE(), DIALOG_DRC_CONTROL::DIALOG_DRC_CONTROL(), DIALOG_DXF_IMPORT::DIALOG_DXF_IMPORT(), DIALOG_EXPORT_3DFILE::DIALOG_EXPORT_3DFILE(), DIALOG_EXPORT_IDF3::DIALOG_EXPORT_IDF3(), DIALOG_EXPORT_STEP::DIALOG_EXPORT_STEP(), DIALOG_FOOTPRINT_WIZARD_LIST::DIALOG_FOOTPRINT_WIZARD_LIST(), DIALOG_GENDRILL::DIALOG_GENDRILL(), DIALOG_GLOBAL_SYM_LIB_TABLE_CONFIG::DIALOG_GLOBAL_SYM_LIB_TABLE_CONFIG(), DIALOG_KEEPOUT_AREA_PROPERTIES::DIALOG_KEEPOUT_AREA_PROPERTIES(), DIALOG_NETLIST::DIALOG_NETLIST(), DIALOG_PLOT::DIALOG_PLOT(), DIALOG_PLOT_SCHEMATIC::DIALOG_PLOT_SCHEMATIC(), DIALOG_PRINT_FOR_MODEDIT::DIALOG_PRINT_FOR_MODEDIT(), DIALOG_PRINT_USING_PRINTER::DIALOG_PRINT_USING_PRINTER(), DIALOG_RESCUE_EACH::DIALOG_RESCUE_EACH(), DIALOG_SVG_PRINT::DIALOG_SVG_PRINT(), SCH_EDIT_FRAME::doUpdatePcb(), EDA_DRAW_PANEL::EDA_DRAW_PANEL(), FOOTPRINT_EDIT_FRAME::Export_Module(), EDA_BASE_FRAME::GetFileFromHistory(), FOOTPRINT_EDIT_FRAME::GetIconScale(), LIB_EDIT_FRAME::GetIconScale(), GERBVIEW_FRAME::GetIconScale(), SCH_EDIT_FRAME::GetIconScale(), PCB_EDIT_FRAME::GetIconScale(), EDA_BASE_FRAME::help_name(), FOOTPRINT_EDIT_FRAME::Import_Module(), DIALOG_GEN_FOOTPRINT_POSITION::initDialog(), DIALOG_ANNOTATE::InitValues(), PCB_EDIT_FRAME::InstallNetlistFrame(), PART_LIBS::LibNamesAndPaths(), EDA_DRAW_FRAME::loadCanvasTypeSetting(), FP_LIB_TABLE::LoadGlobalTable(), SYMBOL_LIB_TABLE::LoadGlobalTable(), CVPCB_MAINFRAME::LoadProjectFile(), SCH_EDIT_FRAME::LoadProjectFile(), PCB_EDIT_FRAME::LoadProjectSettings(), WORKSHEET_LAYOUT::MakeFullFileName(), WORKSHEET_LAYOUT::MakeShortFileName(), NETLIST_DIALOG::NETLIST_DIALOG(), PL_EDITOR_FRAME::OnCloseWindow(), SCH_EDIT_FRAME::OnCloseWindow(), LAYERS_MAP_DIALOG::OnGetSetup(), DIALOG_NON_COPPER_ZONES_EDITOR::OnOkClick(), SCH_EDIT_FRAME::OnOpenPcbnew(), SCH_EDIT_FRAME::OnPrint(), LAYERS_MAP_DIALOG::OnStoreSetup(), PCB_EDIT_FRAME::OnUpdatePCBFromSch(), SCH_EDIT_FRAME::OpenProjectFiles(), prepareFilesMenu(), SCH_EDIT_FRAME::Process_Config(), PCB_EDIT_FRAME::Process_Config(), PCB_EDIT_FRAME::Process_Special_Functions(), SCH_EDIT_FRAME::ReCreateHToolbar(), PCB_EDIT_FRAME::ReCreateHToolbar(), PL_EDITOR_FRAME::ReCreateMenuBar(), GERBVIEW_FRAME::ReCreateMenuBar(), SCH_EDIT_FRAME::ReCreateMenuBar(), PCB_EDIT_FRAME::ReCreateMenuBar(), EDA_DRAW_FRAME::saveCanvasTypeSetting(), CVPCB_MAINFRAME::SaveProjectFile(), SCH_EDIT_FRAME::SaveProjectSettings(), PCB_EDIT_FRAME::SaveProjectSettings(), SCH_EDIT_FRAME::SendCrossProbeNetName(), PCB_EDIT_FRAME::SendCrossProbeNetName(), CVPCB_MAINFRAME::SendMessageToEESCHEMA(), PCB_EDIT_FRAME::SendMessageToEESCHEMA(), SCH_EDIT_FRAME::SendMessageToPCBNEW(), LIB_EDIT_FRAME::SetIconScale(), GERBVIEW_FRAME::SetIconScale(), SCH_EDIT_FRAME::SetIconScale(), PCB_EDIT_FRAME::SetIconScale(), EDA_BASE_FRAME::sys_search(), EDA_BASE_FRAME::UpdateFileHistory(), and EDA_DRAW_PANEL::~EDA_DRAW_PANEL().

53 {
54  // This function should never be called. It is only referenced from
55  // EDA_BASE_FRAME::config() and this is only provided to satisfy the linker,
56  // not to be actually called.
57  wxLogFatalError( wxT( "Unexpected call to Kiface() in kicad/kicad.cpp" ) );
58 
59  throw std::logic_error( "Unexpected call to Kiface() in kicad/kicad.cpp" );
60 }
PGM_BASE & Pgm ( )

The global Program "get" accessor.

Implemented in: 1) common/single_top.cpp, 2) kicad/kicad.cpp, and 3) scripting/kiway.i

Definition at line 66 of file kicad.cpp.

Referenced by TREEPROJECT_ITEM::Activate(), add_search_paths(), EDA_BASE_FRAME::AddMenuIconsOptions(), AddMenuItem(), CONTEXT_MENU::appendCopy(), DIALOG_SYMBOL_LIB_TABLE::browseLibrariesHandler(), DIALOG_FP_LIB_TABLE::browseLibrariesHandler(), WS_DRAW_ITEM_LIST::BuildFullText(), buildKicadAboutBanner(), EDA_BASE_FRAME::CheckForAutoSaveFile(), DIALOG_BOM::choosePlugin(), CMP_TREE_NODE_UNIT::CMP_TREE_NODE_UNIT(), PROJECT::ConfigSave(), CreateHeaderInfoData(), DIALOG_SYMBOL_REMAP::createProjectSymbolLibTable(), PGM_KICAD::Destroy(), DIALOG_CONFIG_EQUFILES::DIALOG_CONFIG_EQUFILES(), DIALOG_FOOTPRINT_BOARD_EDITOR::DIALOG_FOOTPRINT_BOARD_EDITOR(), DIALOG_FOOTPRINT_FP_EDITOR::DIALOG_FOOTPRINT_FP_EDITOR(), DIALOG_SHIM::DIALOG_SHIM(), PCB_EDIT_FRAME::DoGenFootprintsPositionFile(), PCB_EDIT_FRAME::DoGenFootprintsReport(), KIWAY::dso_search_path(), FindKicadFile(), NETLIST_EXPORTER_PSPICE::Format(), TEMPLATE_FIELDNAME::GetDefaultFieldName(), DIALOG_GENERALOPTIONS::init(), KicadDatasPath(), S3D_PLUGIN_MANAGER::loadPlugins(), APP_KICAD::MacOpenFile(), NETLIST_DIALOG_ADD_PLUGIN::OnBrowsePlugins(), EDA_BASE_FRAME::OnChangeIconsOptions(), PCB_EDIT_FRAME::OnCloseWindow(), DLG_3D_PATH_CONFIG::OnConfigEnvVar(), FOOTPRINT_EDIT_FRAME::OnConfigurePaths(), CVPCB_MAINFRAME::OnConfigurePaths(), KICAD_MANAGER_FRAME::OnConfigurePaths(), SCH_BASE_FRAME::OnConfigurePaths(), PCB_EDIT_FRAME::OnConfigurePaths(), KICAD_MANAGER_FRAME::OnCreateProjectFromTemplate(), DIALOG_CONFIG_EQUFILES::OnEditEquFile(), DIALOG_BOM::OnEditPlugin(), DIALOG_GENERALOPTIONS::OnOkClick(), KICAD_MANAGER_FRAME::OnOpenFileInTextEditor(), TREE_PROJECT_FRAME::OnOpenSelectedFileWithTextEditor(), KICAD_MANAGER_FRAME::OnOpenTextEditor(), KICAD_MANAGER_FRAME::OnSelectDefaultPdfBrowser(), EDA_BASE_FRAME::OnSelectPreferredEditor(), KICAD_MANAGER_FRAME::OnSelectPreferredPdfBrowser(), GERBVIEW_FRAME::OnShowGerberSourceFile(), KICAD_MANAGER_FRAME::OnUpdateDefaultPdfBrowser(), KICAD_MANAGER_FRAME::OnUpdatePreferredPdfBrowser(), OpenPDF(), PCB_EDIT_FRAME::PCB_EDIT_FRAME(), preparePreferencesMenu(), PCB_EDIT_FRAME::Process_Special_Functions(), PyScriptingPath(), CVPCB_MAINFRAME::ReCreateMenuBar(), FOOTPRINT_EDIT_FRAME::ReCreateMenuBar(), PL_EDITOR_FRAME::ReCreateMenuBar(), KICAD_MANAGER_FRAME::ReCreateMenuBar(), LIB_EDIT_FRAME::ReCreateMenuBar(), GERBVIEW_FRAME::ReCreateMenuBar(), SearchHelpFileFullPath(), set_wxMenuIcon(), KIWAY::SetLanguage(), SystemDirsAppend(), DIALOG_ERC::TestErc(), DIALOG_ENV_VAR_CONFIG::TransferDataFromWindow(), WIZARD_3DSHAPE_LIBS_DOWNLOADER::WIZARD_3DSHAPE_LIBS_DOWNLOADER(), CACHE_WRAPPER::~CACHE_WRAPPER(), and WIZARD_3DSHAPE_LIBS_DOWNLOADER::~WIZARD_3DSHAPE_LIBS_DOWNLOADER().

67 {
68  return program;
69 }
static PGM_KICAD program
Definition: kicad.cpp:63
PROJECT& Prj ( )

Definition at line 287 of file kicad.cpp.

References KIWAY::Prj().

Referenced by DIALOG_FP_LIB_TABLE::browseLibrariesHandler(), PCB_BASE_FRAME::CheckFootprint(), KICAD_MANAGER_FRAME::CreateNewProject(), DIALOG_FP_LIB_TABLE::DIALOG_FP_LIB_TABLE(), SCH_EDIT_FRAME::doUpdatePcb(), EDA_3D_VIEWER::EDA_3D_VIEWER(), EDA_BASE_FRAME::ExportHotkeyConfigToFile(), PCB_EDIT_FRAME::ExportVRML_File(), PCB_EDIT_FRAME::GenD356File(), KICAD_MANAGER_FRAME::GetProjectFileName(), PCB_BASE_FRAME::loadFootprint(), PCB_EDIT_FRAME::LoadFootprints(), PCB_BASE_FRAME::LoadModuleFromLibrary(), KICAD_MANAGER_FRAME::LoadProject(), SCH_EDIT_FRAME::OnCloseWindow(), KICAD_MANAGER_FRAME::OnCreateProjectFromTemplate(), SCH_EDIT_FRAME::OnLoadProject(), SCH_EDIT_FRAME::OnOpenCvpcb(), KICAD_MANAGER_FRAME::OnOpenFileInTextEditor(), SCH_EDIT_FRAME::OnOpenLibraryEditor(), SCH_EDIT_FRAME::OnOpenPcbModuleEditor(), SCH_EDIT_FRAME::OnOpenPcbnew(), DIALOG_GEN_FOOTPRINT_POSITION::OnOutputDirectoryBrowseClicked(), SCH_EDIT_FRAME::OnPrint(), KICAD_MANAGER_FRAME::OnRunGerbview(), KICAD_MANAGER_FRAME::OnSaveProject(), KICAD_MANAGER_FRAME::OnUnarchiveFiles(), PCB_EDIT_FRAME::OnUpdatePCBFromSch(), SCH_EDIT_FRAME::PrintPage(), FOOTPRINT_EDIT_FRAME::Process_Special_Functions(), PCB_EDIT_FRAME::RecreateBOMFileFromBoard(), SCH_EDIT_FRAME::RescueLegacyProject(), SCH_EDIT_FRAME::RescueSymbolLibTableProject(), KICAD_MANAGER_FRAME::SetProjectFileName(), SCH_EDIT_FRAME::UpdateTitle(), KIWAY::~KIWAY(), and LAUNCHER_PANEL::~LAUNCHER_PANEL().

288 {
289  return Kiway.Prj();
290 }
VTBL_ENTRY PROJECT & Prj() const
Function Prj returns the PROJECT associated with this KIWAY.
Definition: kiway.cpp:142
KIWAY Kiway

Variable Documentation

PGM_KICAD program
static

Definition at line 63 of file kicad.cpp.

Referenced by Pgm(), and PgmTop().