109#define KIFACE_VERSION 1
110#define KIFACE_GETTER KIFACE_1
114#define KIFACE_INSTANCE_NAME_AND_VERSION "KIFACE_1"
117#if defined(__linux__) || defined(__FreeBSD__)
118 #define LIB_ENV_VAR wxT( "LD_LIBRARY_PATH" )
119#elif defined(__WXMAC__)
120 #define LIB_ENV_VAR wxT( "DYLD_LIBRARY_PATH" )
122 #define LIB_ENV_VAR wxT( "PATH" )
124 #error Platform support missing
133class wxTopLevelWindow;
158#define KFCTL_STANDALONE ( 1 << 0 )
159#define KFCTL_CPP_PROJECT_SUITE ( 1 << 1 )
160#define KFCTL_CLI ( 1 << 2 )
209 KIWAY* aKIWAY,
int aCtlBits = 0 ) = 0;
217 const wxString& srcProjectName,
218 const wxString& newProjectBasePath,
219 const wxString& newProjectName,
220 const wxString& srcFilePath,
242 virtual void GetActions( std::vector<TOOL_ACTION*>& aActions )
const = 0;
311 static FACE_T KifaceType(
FRAME_T aFrameType );
321 virtual KIFACE* KiFACE( FACE_T aFaceId,
bool doLoad =
true );
343 wxTopLevelWindow* aParent =
nullptr );
353 virtual bool PlayerClose(
FRAME_T aFrameType,
bool doForce );
364 virtual bool PlayersClose(
bool doForce );
369 void PlayerDidClose(
FRAME_T aFrameType );
377 virtual void ExpressMail(
FRAME_T aDestination,
MAIL_T aCommand, std::string& aPayload,
378 wxWindow* aSource =
nullptr );
383 virtual void GetActions( std::vector<TOOL_ACTION*>& aActions )
const;
396 virtual void SetLanguage(
int aLanguage );
403 virtual void CommonSettingsChanged(
bool aEnvVarsChanged,
bool aTextVarsChanged );
409 virtual void ProjectChanged();
411 KIWAY(
int aCtlBits, wxFrame* aTop =
nullptr );
425 void SetTop( wxFrame* aTop );
432 bool ProcessEvent( wxEvent& aEvent )
override;
435 bool ProcessJobConfigDialog(
KIWAY::FACE_T aFace,
JOB* aJob, wxWindow* aWindow );
441 wxWindow* GetBlockingDialog();
442 void SetBlockingDialog( wxWindow* aWin );
446 const wxString dso_search_path( FACE_T aFaceId );
450 if( (
unsigned) aFaceType < (
unsigned) KIWAY_FACE_COUNT )
452 m_kiface[aFaceType] = aKiface;
465 static KIFACE* m_kiface[KIWAY_FACE_COUNT];
466 static int m_kiface_version[KIWAY_FACE_COUNT];
510#if defined(BUILD_KIWAY_DLL)
An simple container class that lets us dispatch output jobs to kifaces.
A wxFrame capable of the OpenProjectFiles function, meaning it can load a portion of a KiCad project.
A minimalistic software bus for communications between various DLLs/DSOs (DSOs) within the same KiCad...
void SetCtlBits(int aCtlBits)
Overwrites previously set ctl bits, only for use in kicad.cpp to flip between standalone and manager ...
wxWindowID m_blockingDialog
bool set_kiface(FACE_T aFaceType, KIFACE *aKiface)
FACE_T
Known KIFACE implementations.
Container for data for KiCad programs.
Container for project specific data.
FRAME_T
The set of EDA_BASE_FRAME derivatives, typically stored in EDA_BASE_FRAME::m_Ident.
KIFACE * KIFACE_GETTER_FUNC(int *aKIFACEversion, int aKIWAYversion, PGM_BASE *aProgram)
Point to the one and only KIFACE export.
MAIL_T
The set of mail types sendable via KIWAY::ExpressMail() and supplied as the aCommand parameter to tha...
Implement a participant in the KIWAY alchemy.
virtual bool HandleJobConfig(JOB *aJob, wxWindow *aParent)
virtual wxWindow * CreateKiWindow(wxWindow *aParent, int aClassId, KIWAY *aKIWAY, int aCtlBits=0)=0
Create a wxWindow for the current project.
virtual bool OnKifaceStart(PGM_BASE *aProgram, int aCtlBits, KIWAY *aKiway)=0
Called just once shortly after the DSO is loaded.
virtual void OnKifaceEnd()=0
Called just once just before the DSO is to be unloaded.
virtual void * IfaceOrAddress(int aDataId)=0
Return pointer to the requested object.
virtual void SaveFileAs(const wxString &srcProjectBasePath, const wxString &srcProjectName, const wxString &newProjectBasePath, const wxString &newProjectName, const wxString &srcFilePath, wxString &aErrors)
Saving a file under a different name is delegated to the various KIFACEs because the project doesn't ...
virtual void Reset()=0
Reloads global state.
virtual void GetActions(std::vector< TOOL_ACTION * > &aActions) const =0
Append this Kiface's registered actions to the given list.
virtual int HandleJob(JOB *aJob)
Struct PGM_SINGLE_TOP implements PGM_BASE with its own OnPgmInit() and OnPgmExit().