KiCad PCB EDA Suite
mocks_eeschema.cpp File Reference
#include <kiface_i.h>
#include <pgm_base.h>
#include <transform.h>
#include <sch_edit_frame.h>
#include <settings/settings_manager.h>
#include <wx/app.h>

Go to the source code of this file.

Classes

struct  IFACE
 
struct  PGM_MOCK_EESCHEMA_FRAME
 

Functions

IFACE KIFACE_I kiface ("mock_eeschema", KIWAY::FACE_SCH)
 
 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...
 
PGM_BASEPgm ()
 The global Program "get" accessor. More...
 
PGM_BASEPgmOrNull ()
 similar 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...
 
KIFACE_IKiface ()
 Global KIFACE_I "get" accessor. More...
 

Variables

TRANSFORM DefaultTransform = TRANSFORM( 1, 0, 0, -1 )
 
PGM_MOCK_EESCHEMA_FRAME program
 

Function Documentation

◆ CreateWindow()

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

Definition at line 51 of file mocks_eeschema.cpp.

51  {
52  }
53 
54  wxWindow* CreateWindow(
55  wxWindow* aParent, int aClassId, KIWAY* aKiway, int aCtlBits = 0 ) override
56  {
wxWindow * CreateWindow(wxWindow *aParent, int aClassId, KIWAY *aKiway, int aCtlBits=0) override
A minimalistic software bus for communications between various DLLs/DSOs (DSOs) within the same KiCad...
Definition: kiway.h:260

◆ IFACE()

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

Definition at line 38 of file mocks_eeschema.cpp.

38 {
39  // Of course all are overloads, implementations of the KIFACE.
40 

◆ 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 69 of file mocks_eeschema.cpp.

73  {

◆ kiface()

IFACE KIFACE_I kiface ( "mock_eeschema"  ,
KIWAY::FACE_SCH   
)
static

Referenced by Kiface().

◆ Kiface()

KIFACE_I& Kiface ( )

Global KIFACE_I "get" accessor.

Definition at line 125 of file mocks_eeschema.cpp.

126 {
127  return kiface;
128 }
IFACE KIFACE_I kiface("mock_eeschema", KIWAY::FACE_SCH)

References kiface().

◆ OnKifaceEnd()

void kiface::OnKifaceEnd ( )
override

Definition at line 47 of file mocks_eeschema.cpp.

51  {

◆ OnKifaceStart()

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

Definition at line 42 of file mocks_eeschema.cpp.

42  {
43  }
44 
45  bool OnKifaceStart( PGM_BASE* aProgram, int aCtlBits ) override
Container for data for KiCad programs.
Definition: pgm_base.h:130
bool OnKifaceStart(PGM_BASE *aProgram, int aCtlBits) override
int PGM_BASE * aProgram
Definition: cvpcb.cpp:97

◆ 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 111 of file mocks_eeschema.cpp.

112 {
113  return program;
114 }
PGM_MOCK_EESCHEMA_FRAME program

References program.

◆ PgmOrNull()

PGM_BASE* PgmOrNull ( )

similar 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 119 of file mocks_eeschema.cpp.

120 {
121  return nullptr;
122 }

Variable Documentation

◆ DefaultTransform

TRANSFORM DefaultTransform = TRANSFORM( 1, 0, 0, -1 )

Definition at line 35 of file mocks_eeschema.cpp.

◆ program

PGM_MOCK_EESCHEMA_FRAME program
static

Referenced by Pgm().