KiCad PCB EDA Suite
pl_editor.cpp File Reference
#include <wx/file.h>
#include <wx/snglinst.h>
#include <kiface_base.h>
#include <confirm.h>
#include <gestfich.h>
#include <pgm_base.h>
#include <settings/settings_manager.h>
#include <dialogs/panel_pl_editor_display_options.h>
#include <dialogs/panel_pl_editor_color_settings.h>
#include "pl_editor_frame.h"
#include "pl_editor_settings.h"

Go to the source code of this file.

Classes

struct  PGE::IFACE
 

Namespaces

namespace  PGE
 

Functions

PGE::IFACE KIFACE_BASE PGE::kiface ("pl_editor", KIWAY::FACE_PL_EDITOR)
 
 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
 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...
 
KIFACE_BASEKiface ()
 Global KIFACE_BASE "get" accessor. More...
 
 MY_API (KIFACE *) KIFACE_GETTER(int *aKIFACEversion
 
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...
 

Variables

static PGM_BASEprocess
 
int aKiwayVersion
 
int PGM_BASEaProgram
 
return & kiface
 

Function Documentation

◆ CreateWindow()

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

Definition at line 10 of file pl_editor.cpp.

19 :
20 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
21 * or you may search the http://www.gnu.org website for the version 2 license,
22 * or you may write to the Free Software Foundation, Inc.,
23 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
24 */
25
26#include <wx/file.h>
27#include <wx/snglinst.h>
28
29#include <kiface_base.h>
30#include <confirm.h>
31#include <gestfich.h>
32#include <pgm_base.h>
This file is part of the common library.
see class PGM_BASE

◆ IFACE()

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

Definition at line 2 of file pl_editor.cpp.

19 :
20 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html

◆ 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 requested and must be cast into the know type.

Definition at line 46 of file pl_editor.cpp.

47 :
48 KIFACE_BASE( aName, aType )
49 {}
A KIFACE implementation.
Definition: kiface_base.h:39

◆ Kiface()

KIFACE_BASE & Kiface ( )

Global KIFACE_BASE "get" accessor.

Definition at line 116 of file pl_editor.cpp.

116{ return kiface; }
return & kiface
Definition: pl_editor.cpp:124

References kiface.

◆ MY_API()

MY_API ( KIFACE )

◆ OnKifaceEnd()

void kiface::OnKifaceEnd ( )
override

Definition at line 11 of file test_app_main.cpp.

18:
19 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html

◆ OnKifaceStart()

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

Definition at line 6 of file test_app_main.cpp.

18 :
19 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html

◆ 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 128 of file pl_editor.cpp.

129{
130 wxASSERT( process ); // KIFACE_GETTER has already been called.
131 return *process;
132}
static PGM_BASE * process
Definition: pl_editor.cpp:113

References process.

Referenced by SaveFileAs().

◆ 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 136 of file pl_editor.cpp.

137{
138 return process;
139}

References process.

◆ 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).

References FRAME_PL_EDITOR, SETTINGS_MANAGER::GetAppSettings(), PGM_BASE::GetSettingsManager(), PANEL_DS_COLORS, PANEL_DS_DISPLAY_OPTIONS, and Pgm().

Variable Documentation

◆ aKiwayVersion

int aKiwayVersion

Definition at line 121 of file pl_editor.cpp.

◆ aProgram

int PGM_BASE* aProgram
Initial value:
{
Container for data for KiCad programs.
Definition: pgm_base.h:94
int PGM_BASE * aProgram
Definition: pl_editor.cpp:122

Definition at line 121 of file pl_editor.cpp.

Referenced by PGE::IFACE::OnKifaceStart().

◆ kiface

return& kiface

Definition at line 124 of file pl_editor.cpp.

Referenced by Kiface().

◆ process

PGM_BASE* process
static

Definition at line 113 of file pl_editor.cpp.

Referenced by Pgm(), and PgmOrNull().