KiCad PCB EDA Suite
cvpcb/cvpcb.cpp File Reference
#include <confirm.h>
#include <fp_lib_table.h>
#include <kiface_i.h>
#include <pgm_base.h>
#include <settings/settings_manager.h>
#include <cvpcb_mainframe.h>
#include <cvpcb_settings.h>
#include <display_footprints_frame.h>

Go to the source code of this file.

Classes

struct  CV::IFACE
 

Namespaces

 CV
 

Functions

CV::IFACE KIFACE_I CV::kiface ("cvpcb", KIWAY::FACE_CVPCB)
 
 IFACE (const char *aName, KIWAY::FACE_T aType)
 
bool OnKifaceStart (PGM_BASE *aProgram, int aCtlBits) override
 
void OnKifaceEnd () override
 
wxWindow * CreateWindow (wxWindow *aParent, int aClassId, KIWAY *aKiway, int aCtlBits=0) override
 
void * IfaceOrAddress (int aDataId) override
 Function IfaceOrAddress return a pointer to the requested object. More...
 
KIFACE_IKiface ()
 Global KIFACE_I "get" accessor. More...
 
 MY_API (KIFACE *) KIFACE_GETTER(int *aKIFACEversion
 
PGM_BASEPgm ()
 The global Program "get" accessor. More...
 
PGM_BASEPgmOrNull ()
 similat to PGM_BASE& Pgm(), but return a reference that can be nullptr when running a shared lib from a script, not from a kicad appl More...
 

Variables

static PGM_BASEprocess
 
int aKIWAYversion
 
int PGM_BASEaProgram
 
return & kiface
 
FP_LIB_TABLE GFootprintTable
 !!!!!!!!!!!!!! This code is obsolete because of the merge into pcbnew, don't bother with it. More...
 

Function Documentation

◆ CreateWindow()

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

Definition at line 188 of file cvpcb/cvpcb.cpp.

◆ IFACE()

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

Definition at line 180 of file cvpcb/cvpcb.cpp.

◆ IfaceOrAddress()

void* kiface::IfaceOrAddress ( int  aDataId)
override

Function IfaceOrAddress 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
void* - and must be cast into the know type.

Definition at line 209 of file cvpcb/cvpcb.cpp.

◆ Kiface()

KIFACE_I& Kiface ( )

Global KIFACE_I "get" accessor.

Definition at line 91 of file cvpcb/cvpcb.cpp.

91 { return kiface; }
return & kiface
Definition: cvpcb/cvpcb.cpp:99

References CV::kiface().

◆ MY_API()

MY_API ( KIFACE )

◆ OnKifaceEnd()

void kiface::OnKifaceEnd ( )
override

Definition at line 45 of file mocks_eeschema.cpp.

49  {

◆ OnKifaceStart()

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

Definition at line 40 of file common_mocks.cpp.

40 {
41  static PGM_TEST_FRAME program;
42  return program;
43 }
PGM_SINGLE_TOP program

◆ Pgm()

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 103 of file cvpcb/cvpcb.cpp.

104 {
105  wxASSERT( process ); // KIFACE_GETTER has already been called.
106  return *process;
107 }
static PGM_BASE * process
Definition: cvpcb/cvpcb.cpp:88

References process.

◆ PgmOrNull()

PGM_BASE* PgmOrNull ( )

similat to PGM_BASE& Pgm(), but return a reference that can be nullptr when running a shared lib from a script, not from a kicad appl

Definition at line 112 of file cvpcb/cvpcb.cpp.

113 {
114  return process;
115 }
static PGM_BASE * process
Definition: cvpcb/cvpcb.cpp:88

Referenced by BOARD_ADAPTER::BOARD_ADAPTER(), BOARD::ComputeBoundingBox(), and LIB_PIN::LIB_PIN().

Variable Documentation

◆ aKIWAYversion

int aKIWAYversion

Definition at line 96 of file cvpcb/cvpcb.cpp.

◆ aProgram

int PGM_BASE* aProgram
Initial value:
{
PGM_BASE keeps program (whole process) data for KiCad programs.
Definition: pgm_base.h:137
static PGM_BASE * process
Definition: cvpcb/cvpcb.cpp:88
int PGM_BASE * aProgram
Definition: cvpcb/cvpcb.cpp:97

Definition at line 97 of file cvpcb/cvpcb.cpp.

Referenced by KIFACE_GETTER(), CV::IFACE::OnKifaceStart(), and KIGFX::SHADER::programInfo().

◆ GFootprintTable

◆ kiface

return& kiface

Definition at line 99 of file cvpcb/cvpcb.cpp.

◆ process

PGM_BASE* process
static

Definition at line 88 of file cvpcb/cvpcb.cpp.

Referenced by Pgm(), and PgmOrNull().