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

GERBVIEW main file. More...

#include <gerbview.h>
#include <gerbview_frame.h>
#include <gerbview_settings.h>
#include <gestfich.h>
#include <kiface_base.h>
#include <macros.h>
#include <nlohmann/json.hpp>
#include <pgm_base.h>
#include <richio.h>
#include <settings/settings_manager.h>
#include <string_utils.h>
#include <dialogs/panel_gerbview_display_options.h>
#include <dialogs/panel_gerbview_excellon_settings.h>
#include <dialogs/panel_grid_settings.h>
#include <dialogs/panel_gerbview_color_settings.h>
#include <wildcards_and_files_ext.h>
#include <wx/ffile.h>

Go to the source code of this file.

Classes

struct  GERBV::IFACE
 

Namespaces

namespace  GERBV
 

Typedefs

using json = nlohmann::json
 

Functions

GERBV::IFACE KIFACE_BASE, UNITS_PROVIDER GERBV::kiface ("gerbview", KIWAY::FACE_GERBVIEW)
 
 IFACE (const char *aName, KIWAY::FACE_T aType)
 
bool OnKifaceStart (PGM_BASE *aProgram, int aCtlBits, KIWAY *aKiway) 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.
 
void SaveFileAs (const wxString &aProjectBasePath, const wxString &aProjectName, 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).
 
KIFACE_BASEKiface ()
 Global KIFACE_BASE "get" accessor.
 
KIFACE_API KIFACEKIFACE_GETTER (int *aKIFACEversion, int aKiwayVersion, PGM_BASE *aProgram)
 No name mangling. Each KIFACE (DSO/DLL) will implement this once.
 

Detailed Description

GERBVIEW main file.

Definition in file gerbview.cpp.

Typedef Documentation

◆ json

using json = nlohmann::json

Definition at line 47 of file gerbview.cpp.

Function Documentation

◆ CreateKiWindow()

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

Definition at line 11 of file gerbview.cpp.

◆ IFACE()

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

Definition at line 2 of file gerbview.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 requested and must be cast into the know type.

Definition at line 57 of file gerbview.cpp.

◆ Kiface()

KIFACE_BASE & Kiface ( )

Global KIFACE_BASE "get" accessor.

Definition at line 133 of file gerbview.cpp.

References GERBV::kiface().

◆ KIFACE_GETTER()

KIFACE_API KIFACE * KIFACE_GETTER ( int *  aKIFACEversion,
int  aKiwayVersion,
PGM_BASE aProgram 
)

No name mangling. Each KIFACE (DSO/DLL) will implement this once.

Definition at line 138 of file gerbview.cpp.

References GERBV::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,
KIWAY aKiway 
)
override

Definition at line 6 of file test_app_main.cpp.

◆ SaveFileAs()

void kiface::SaveFileAs ( const wxString &  aProjectBasePath,
const wxString &  aProjectName,
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_GERBER, SETTINGS_MANAGER::GetAppSettings(), PGM_BASE::GetSettingsManager(), PANEL_GBR_COLORS, PANEL_GBR_DISPLAY_OPTIONS, PANEL_GBR_EXCELLON_OPTIONS, PANEL_GBR_GRIDS, Pgm(), KIWAY::Player(), and UNITS_PROVIDER::SetUserUnits().