KiCad PCB EDA Suite
Loading...
Searching...
No Matches
pcbnew.cpp File Reference

Go to the source code of this file.

Classes

struct  PCB::IFACE
 

Namespaces

namespace  PCB
 

Functions

PyObject * PyInit__pcbnew (void)
 
PCB::IFACE KIFACE_BASE, UNITS_PROVIDER PCB::kiface ("pcbnew", KIWAY::FACE_PCB)
 
 IFACE (const char *aName, KIWAY::FACE_T aType)
 
bool OnKifaceStart (PGM_BASE *aProgram, int aCtlBits) override
 
void Reset () override
 
void OnKifaceEnd () override
 
wxWindow * CreateKiWindow (wxWindow *aParent, int aClassId, KIWAY *aKiway, int aCtlBits=0) override
 
void * IfaceOrAddress (int aDataId) override
 Return a pointer to the requested object. More...
 
void SaveFileAs (const wxString &aProjectBasePath, const wxString &aSrcProjectName, const wxString &aNewProjectBasePath, const wxString &aNewProjectName, const wxString &aSrcFilePath, wxString &aErrors) override
 Saving a file under a different name is delegated to the various KIFACEs because the project doesn't know the internal format of the various files (which may have paths in them that need updating). More...
 
int HandleJob (JOB *aJob) override
 
bool loadGlobalLibTable ()
 
KIFACE_BASEKiface ()
 Global KIFACE_BASE "get" accessor. More...
 
 MY_API (KIFACE *) KIFACE_GETTER(int *aKIFACEversion
 

Variables

std::unique_ptr< PCBNEW_JOBS_HANDLERm_jobHandler
 
static PGM_BASEprocess
 
int aKiwayVersion
 
int PGM_BASEaProgram
 
return & kiface
 
FP_LIB_TABLE GFootprintTable
 The global footprint library table. More...
 
FOOTPRINT_LIST_IMPL GFootprintList
 The global footprint info table. More...
 

Function Documentation

◆ CreateKiWindow()

wxWindow * kiface::CreateKiWindow ( wxWindow *  aParent,
int  aClassId,
KIWAY aKiway,
int  aCtlBits = 0 
)
override

Definition at line 13 of file pcbnew.cpp.

◆ HandleJob()

int kiface::HandleJob ( JOB aJob)
override

◆ IFACE()

kiface::IFACE ( const char *  aName,
KIWAY::FACE_T  aType 
)

Definition at line 2 of file pcbnew.cpp.

◆ IfaceOrAddress()

void * kiface::IfaceOrAddress ( int  aDataId)
override

Return a pointer to the requested object.

The safest way to use this is to retrieve a pointer to a static instance of an interface, similar to how the KIFACE interface is exported. But if you know what you are doing use it to retrieve anything you want.

Parameters
aDataIdidentifies which object you want the address of.
Returns
the object which must be cast into the know type.

Definition at line 180 of file pcbnew.cpp.

◆ Kiface()

KIFACE_BASE & Kiface ( )

Global KIFACE_BASE "get" accessor.

Definition at line 307 of file pcbnew.cpp.

References kiface.

◆ loadGlobalLibTable()

bool kiface::loadGlobalLibTable ( )
private

◆ MY_API()

MY_API ( KIFACE )

◆ OnKifaceEnd()

void kiface::OnKifaceEnd ( )
override

Definition at line 11 of file test_app_main.cpp.

◆ OnKifaceStart()

bool kiface::OnKifaceStart ( PGM_BASE aProgram,
int  aCtlBits 
)
override

Definition at line 6 of file test_app_main.cpp.

◆ PyInit__pcbnew()

PyObject * PyInit__pcbnew ( void  )

◆ Reset()

void kiface::Reset ( )
override

◆ SaveFileAs()

void kiface::SaveFileAs ( const wxString &  aProjectBasePath,
const wxString &  aSrcProjectName,
const wxString &  aNewProjectBasePath,
const wxString &  aNewProjectName,
const wxString &  aSrcFilePath,
wxString &  aErrors 
)
override

Saving a file under a different name is delegated to the various KIFACEs because the project doesn't know the internal format of the various files (which may have paths in them that need updating).

Variable Documentation

◆ aKiwayVersion

int aKiwayVersion

Definition at line 312 of file pcbnew.cpp.

◆ aProgram

int PGM_BASE* aProgram
Initial value:
{
static PGM_BASE * process
Definition: pcbnew.cpp:304
int PGM_BASE * aProgram
Definition: pcbnew.cpp:313

Definition at line 312 of file pcbnew.cpp.

◆ GFootprintList

FOOTPRINT_LIST_IMPL GFootprintList

The global footprint info table.

This is performance-intensive to build so we keep a hash-stamped global version. Any deviation from the request vs. stored hash will result in it being rebuilt.

Definition at line 343 of file pcbnew.cpp.

Referenced by FOOTPRINT_EDIT_FRAME::doCloseWindow(), PCB_BASE_EDIT_FRAME::doCloseWindow(), FP_TREE_MODEL_ADAPTER::getFootprints(), CV::IFACE::IfaceOrAddress(), PCB::IFACE::IfaceOrAddress(), FOOTPRINT_EDIT_FRAME::initLibraryTree(), PCB_EDIT_FRAME::OpenProjectFiles(), PCB_BASE_FRAME::SelectFootprintFromLibTree(), and FOOTPRINT_EDIT_FRAME::SyncLibraryTree().

◆ GFootprintTable

FP_LIB_TABLE GFootprintTable

The global footprint library table.

This is not dynamically allocated because in a multiple project environment we must keep its address constant (since it is the fallback table for multiple projects).

Definition at line 338 of file pcbnew.cpp.

◆ kiface

return& kiface

Definition at line 315 of file pcbnew.cpp.

Referenced by Kiface().

◆ m_jobHandler

std::unique_ptr<PCBNEW_JOBS_HANDLER> m_jobHandler
private

Definition at line 218 of file pcbnew.cpp.

◆ process

PGM_BASE* process
static

Definition at line 304 of file pcbnew.cpp.