KiCad PCB EDA Suite
KIWAY Class Reference

A minimalistic software bus for communications between various DLLs/DSOs (DSOs) within the same KiCad process. More...

#include <kiway.h>

Inheritance diagram for KIWAY:

Public Types

enum  FACE_T {
  FACE_SCH, FACE_PCB, FACE_CVPCB, FACE_GERBVIEW,
  FACE_PL_EDITOR, FACE_PCB_CALCULATOR, FACE_BMP2CMP, FACE_PYTHON,
  KIWAY_FACE_COUNT
}
 Known KIFACE implementations. More...
 

Public Member Functions

 ~KIWAY () throw ()
 
virtual KIFACEKiFACE (FACE_T aFaceId, bool doLoad=true)
 Return the KIFACE* given a FACE_T. More...
 
virtual KIWAY_PLAYERPlayer (FRAME_T aFrameType, bool doCreate=true, wxTopLevelWindow *aParent=nullptr)
 Return the KIWAY_PLAYER* given a FRAME_T. More...
 
virtual bool PlayerClose (FRAME_T aFrameType, bool doForce)
 Call the KIWAY_PLAYER::Close( bool force ) function on the window and if not vetoed, returns true, else false. More...
 
virtual bool PlayersClose (bool doForce)
 Call the KIWAY_PLAYER::Close( bool force ) function on all the windows and if none are vetoed, returns true, else false. More...
 
virtual void ExpressMail (FRAME_T aDestination, MAIL_T aCommand, std::string &aPayload, wxWindow *aSource=nullptr)
 Send aPayload to aDestination from aSource. More...
 
virtual PROJECTPrj () const
 Return the PROJECT associated with this KIWAY. More...
 
virtual void SetLanguage (int aLanguage)
 Change the language and then calls ShowChangedLanguage() on all #KIWAY_PLAYERs. More...
 
virtual void CommonSettingsChanged (bool aEnvVarsChanged, bool aTextVarsChanged)
 Call CommonSettingsChanged() on all KIWAY_PLAYERs. More...
 
virtual void ProjectChanged ()
 Calls ProjectChanged() on all KIWAY_PLAYERs. More...
 
 KIWAY (PGM_BASE *aProgram, int aCtlBits, wxFrame *aTop=nullptr)
 
void SetTop (wxFrame *aTop)
 Tell this KIWAY about the top most frame in the program and optionally allows it to play the role of one of the KIWAY_PLAYERs if launched from single_top.cpp. More...
 
wxFrame * GetTop ()
 
void OnKiCadExit ()
 
void OnKiwayEnd ()
 
bool ProcessEvent (wxEvent &aEvent) override
 

Static Public Member Functions

static FACE_T KifaceType (FRAME_T aFrameType)
 A simple mapping function which returns the FACE_T which is known to implement aFrameType. More...
 

Private Member Functions

const wxString dso_search_path (FACE_T aFaceId)
 Get the [path &] name of the DSO holding the requested FACE_T. More...
 
bool set_kiface (FACE_T aFaceType, KIFACE *aKiface)
 
KIWAY_PLAYERGetPlayerFrame (FRAME_T aFrameType)
 

Private Attributes

PGM_BASEm_program
 
int m_ctl
 
wxFrame * m_top
 
std::atomic< wxWindowID > m_playerFrameId [KIWAY_PLAYER_COUNT]
 

Static Private Attributes

static KIFACEm_kiface [KIWAY_FACE_COUNT]
 
static int m_kiface_version [KIWAY_FACE_COUNT]
 

Friends

struct PGM_SINGLE_TOP
 

Detailed Description

A minimalistic software bus for communications between various DLLs/DSOs (DSOs) within the same KiCad process.

It makes it possible to call between DSOs without having to link them together, and without having to link to the top process module which houses the KIWAY(s). More importantly it makes it possible to send custom wxEvents between DSOs and from the top process module down into the DSOs. The latter capability is thought useful for driving the lower DSOs from a python test rig or for demo (automation) purposes.

Most all calls are via virtual functions, which means C++ vtables are used to hold function pointers and eliminate the need to link to specific object code libraries, speeding development and encouraging clearly defined interface design. Unlike Microsoft COM, which is a multi-vendor design supporting DLL's built at various points in time, the KIWAY alchemy is single project, with all components being built at the same time. So one should expect solid compatibility between all KiCad components, as long at they are compiled at the same time.

There is one KIWAY in the launching portion of the process for each open KiCad project. Each project has its own KIWAY. Available to each KIWAY is an actual PROJECT data structure. If you have a KIWAY, you can get to the PROJECT using KIWAY::Prj().

In summary, a KIWAY facilitates communicating between DSOs, where the topic of the communication is project specific. Here a "project" means a BOARD and a SCHEMATIC and a NETLIST, (anything relating to production of a single BOARD and added to class PROJECT.)

Definition at line 260 of file kiway.h.

Member Enumeration Documentation

◆ FACE_T

Known KIFACE implementations.

Enumerator
FACE_SCH 

eeschema DSO

FACE_PCB 

pcbnew DSO

FACE_CVPCB 
FACE_GERBVIEW 
FACE_PL_EDITOR 
FACE_PCB_CALCULATOR 
FACE_BMP2CMP 
FACE_PYTHON 
KIWAY_FACE_COUNT 

Definition at line 266 of file kiway.h.

Constructor & Destructor Documentation

◆ ~KIWAY()

KIWAY::~KIWAY ( )
throw (
)
inline

Definition at line 280 of file kiway.h.

280 {}

◆ KIWAY()

KIWAY::KIWAY ( PGM_BASE aProgram,
int  aCtlBits,
wxFrame *  aTop = nullptr 
)

Definition at line 51 of file kiway.cpp.

51  :
52  m_program( aProgram ), m_ctl( aCtlBits ), m_top( nullptr )
53 {
54  SetTop( aTop ); // hook player_destroy_handler() into aTop.
55 
56  // Set the array of all known frame window IDs to empty = wxID_NONE,
57  // once they are be created, they are added with FRAME_T as index to this array.
58  // Note: A non empty entry does not mean the frame still exists.
59  // It means only the frame was created at least once. It can be destroyed after.
60  // These entries are not cleared automatically on window closing. The purpose is just
61  // to allow a call to wxWindow::FindWindowById() using a FRAME_T frame type
62  for( int n = 0; n < KIWAY_PLAYER_COUNT; n++ )
63  m_playerFrameId[n] = wxID_NONE;
64 }
std::atomic< wxWindowID > m_playerFrameId[KIWAY_PLAYER_COUNT]
Definition: kiway.h:435
PGM_BASE * m_program
Definition: kiway.h:424
int m_ctl
Definition: kiway.h:425
void SetTop(wxFrame *aTop)
Tell this KIWAY about the top most frame in the program and optionally allows it to play the role of ...
Definition: kiway.cpp:82
wxFrame * m_top
Definition: kiway.h:427
int PGM_BASE * aProgram
Definition: cvpcb.cpp:110

References KIWAY_PLAYER_COUNT, m_playerFrameId, and SetTop().

Member Function Documentation

◆ CommonSettingsChanged()

void KIWAY::CommonSettingsChanged ( bool  aEnvVarsChanged,
bool  aTextVarsChanged 
)
virtual

Call CommonSettingsChanged() on all KIWAY_PLAYERs.

Use after changing suite-wide options such as panning, autosave interval, etc.

Definition at line 554 of file kiway.cpp.

555 {
557  {
558  // A dynamic_cast could be better, but creates link issues
559  // (some basic_frame functions not found) on some platforms,
560  // so a static_cast is used.
561  EDA_BASE_FRAME* top = static_cast<EDA_BASE_FRAME*>( m_top );
562 
563  if( top )
564  top->CommonSettingsChanged( aEnvVarsChanged, aTextVarsChanged );
565  }
566 
567  for( unsigned i=0; i < KIWAY_PLAYER_COUNT; ++i )
568  {
569  KIWAY_PLAYER* frame = GetPlayerFrame( ( FRAME_T )i );
570 
571  if( frame )
572  frame->CommonSettingsChanged( aEnvVarsChanged, aTextVarsChanged );
573  }
574 }
#define KFCTL_CPP_PROJECT_SUITE
Running under C++ project mgr, possibly with others.
Definition: kiway.h:157
A wxFrame capable of the OpenProjectFiles function, meaning it can load a portion of a KiCad project.
Definition: kiway_player.h:64
KIWAY_PLAYER * GetPlayerFrame(FRAME_T aFrameType)
Definition: kiway.cpp:365
FRAME_T
The set of EDA_BASE_FRAME derivatives, typically stored in EDA_BASE_FRAME::m_Ident.
Definition: frame_type.h:32
int m_ctl
Definition: kiway.h:425
void CommonSettingsChanged(bool aEnvVarsChanged, bool aTextVarsChanged) override
Notification event that some of the common (suite-wide) settings have changed.
The base frame for deriving all KiCad main window classes.
wxFrame * m_top
Definition: kiway.h:427

References EDA_BASE_FRAME::CommonSettingsChanged(), GetPlayerFrame(), KFCTL_CPP_PROJECT_SUITE, KIWAY_PLAYER_COUNT, m_ctl, and m_top.

Referenced by COMMON_CONTROL::ConfigurePaths(), PCB::IFACE::CreateWindow(), EDA_BASE_FRAME::OnPreferences(), PCB_EDIT_FRAME::ShowBoardSetupDialog(), and SCH_EDIT_FRAME::ShowSchematicSetupDialog().

◆ dso_search_path()

const wxString KIWAY::dso_search_path ( FACE_T  aFaceId)
private

Get the [path &] name of the DSO holding the requested FACE_T.

Definition at line 104 of file kiway.cpp.

105 {
106  const char* name;
107 
108  switch( aFaceId )
109  {
110  case FACE_SCH: name = KIFACE_PREFIX "eeschema"; break;
111  case FACE_PCB: name = KIFACE_PREFIX "pcbnew"; break;
112  case FACE_CVPCB: name = KIFACE_PREFIX "cvpcb"; break;
113  case FACE_GERBVIEW: name = KIFACE_PREFIX "gerbview"; break;
114  case FACE_PL_EDITOR: name = KIFACE_PREFIX "pl_editor"; break;
115  case FACE_PCB_CALCULATOR: name = KIFACE_PREFIX "pcb_calculator"; break;
116  case FACE_BMP2CMP: name = KIFACE_PREFIX "bitmap2component"; break;
117  case FACE_PYTHON: name = KIFACE_PREFIX "kipython"; break;
118 
119  default:
120  wxASSERT_MSG( 0, wxT( "caller has a bug, passed a bad aFaceId" ) );
121  return wxEmptyString;
122  }
123 
124 #ifndef __WXMAC__
125  wxString path;
126 
128  {
129  // The 2 *.cpp program launchers: single_top.cpp and kicad.cpp expect
130  // the *.kiface's to reside in same directory as their binaries do.
131  path = wxStandardPaths::Get().GetExecutablePath();
132  }
133 
134  wxFileName fn = path;
135 #else
136  // we have the dso's in main OSX bundle kicad.app/Contents/PlugIns
137  wxFileName fn = Pgm().GetExecutablePath();
138  fn.AppendDir( wxT( "Contents" ) );
139  fn.AppendDir( wxT( "PlugIns" ) );
140 #endif
141 
142  fn.SetName( name );
143 
144  // To speed up development, it's sometimes nice to run kicad from inside
145  // the build path. In that case, each program will be in a subdirectory.
146  // To find the DSOs, we need to go up one directory and then enter a subdirectory.
147 
148  if( wxGetEnv( wxT( "KICAD_RUN_FROM_BUILD_DIR" ), nullptr ) )
149  {
150 #ifdef __WXMAC__
151  // On Mac, all of the kifaces are placed in the kicad.app bundle, even though the individual
152  // standalone binaries are placed in separate bundles before the make install step runs.
153  // So, we have to jump up to the kicad directory, then the PlugIns section of the kicad
154  // bundle.
155  fn = wxStandardPaths::Get().GetExecutablePath();
156 
157  fn.RemoveLastDir();
158  fn.RemoveLastDir();
159  fn.RemoveLastDir();
160  fn.RemoveLastDir();
161  fn.AppendDir( wxT( "kicad" ) );
162  fn.AppendDir( wxT( "kicad.app" ) );
163  fn.AppendDir( wxT( "Contents" ) );
164  fn.AppendDir( wxT( "PlugIns" ) );
165  fn.SetName( name );
166 #else
167  const char* dirName;
168 
169  // The subdirectories usually have the same name as the kiface
170  switch( aFaceId )
171  {
172  case FACE_PL_EDITOR: dirName = "pagelayout_editor"; break;
173  case FACE_PYTHON: dirName = "scripting"; break;
174  default: dirName = name + 1; break;
175  }
176 
177  fn.RemoveLastDir();
178  fn.AppendDir( dirName );
179 #endif
180  }
181 
182  // Here a "suffix" == an extension with a preceding '.',
183  // so skip the preceding '.' to get an extension
184  fn.SetExt( &KIFACE_SUFFIX[1] );
185 
186  return fn.GetFullPath();
187 }
#define KFCTL_CPP_PROJECT_SUITE
Running under C++ project mgr, possibly with others.
Definition: kiway.h:157
KIWAY Kiway & Pgm(), KFCTL_STANDALONE
The global Program "get" accessor.
Definition: single_top.cpp:106
int m_ctl
Definition: kiway.h:425
pcbnew DSO
Definition: kiway.h:269
eeschema DSO
Definition: kiway.h:268
const char * name
Definition: DXF_plotter.cpp:56
#define KFCTL_STANDALONE
Running as a standalone Top.
Definition: kiway.h:156

References FACE_BMP2CMP, FACE_CVPCB, FACE_GERBVIEW, FACE_PCB, FACE_PCB_CALCULATOR, FACE_PL_EDITOR, FACE_PYTHON, FACE_SCH, KFCTL_CPP_PROJECT_SUITE, KFCTL_STANDALONE, m_ctl, name, path, and Pgm().

Referenced by KiFACE().

◆ ExpressMail()

void KIWAY::ExpressMail ( FRAME_T  aDestination,
MAIL_T  aCommand,
std::string &  aPayload,
wxWindow *  aSource = nullptr 
)
virtual

◆ GetPlayerFrame()

KIWAY_PLAYER * KIWAY::GetPlayerFrame ( FRAME_T  aFrameType)
private
Returns
the reference of the KIWAY_PLAYER having the type aFrameType if exists, or NULL if this KIWAY_PLAYER was not yet created, or was closed

Definition at line 365 of file kiway.cpp.

366 {
367  wxWindowID storedId = m_playerFrameId[aFrameType];
368 
369  if( storedId == wxID_NONE )
370  return nullptr;
371 
372  wxWindow* frame = wxWindow::FindWindowById( storedId );
373 
374  // Since wxWindow::FindWindow*() is not cheap (especially if the window does not exist),
375  // clear invalid entries to save CPU on repeated calls that do not lead to frame creation
376  if( !frame )
377  m_playerFrameId[aFrameType].compare_exchange_strong( storedId, wxID_NONE );
378 
379  return static_cast<KIWAY_PLAYER*>( frame );
380 }
std::atomic< wxWindowID > m_playerFrameId[KIWAY_PLAYER_COUNT]
Definition: kiway.h:435

References m_playerFrameId.

Referenced by CommonSettingsChanged(), Player(), PlayerClose(), ProjectChanged(), and SetLanguage().

◆ GetTop()

wxFrame* KIWAY::GetTop ( )
inline

Definition at line 387 of file kiway.h.

387 { return m_top; }
wxFrame * m_top
Definition: kiway.h:427

References m_top.

◆ KiFACE()

KIFACE * KIWAY::KiFACE ( FACE_T  aFaceId,
bool  doLoad = true 
)
virtual

Return the KIFACE* given a FACE_T.

If it is not already loaded, the KIFACE is loaded and initialized with a call to KIFACE::OnKifaceStart().

Definition at line 196 of file kiway.cpp.

197 {
198  // Since this will be called from python, cannot assume that code will
199  // not pass a bad aFaceId.
200  if( (unsigned) aFaceId >= arrayDim( m_kiface ) )
201  {
202  // @todo : throw an exception here for python's benefit, at least that
203  // way it gets some explanatory text.
204 
205  wxASSERT_MSG( 0, wxT( "caller has a bug, passed a bad aFaceId" ) );
206  return nullptr;
207  }
208 
209  // return the previously loaded KIFACE, if it was.
210  if( m_kiface[aFaceId] )
211  return m_kiface[aFaceId];
212 
213  wxString msg;
214 
215  // DSO with KIFACE has not been loaded yet, does caller want to load it?
216  if( doLoad )
217  {
218  wxString dname = dso_search_path( aFaceId );
219 
220  // Insert DLL search path for kicad_3dsg from build dir
221  if( wxGetEnv( wxT( "KICAD_RUN_FROM_BUILD_DIR" ), nullptr ) )
222  {
223  wxFileName myPath = wxStandardPaths::Get().GetExecutablePath();
224 
225  if( !myPath.GetPath().EndsWith( wxT( "pcbnew" ) ) )
226  {
227  myPath.RemoveLastDir();
228  myPath.AppendDir( wxT( "pcbnew" ) );
230  }
231  }
232 
233  wxDynamicLibrary dso;
234 
235  void* addr = nullptr;
236 
237  // For some reason wxDynamicLibrary::Load() crashes in some languages
238  // (chinese for instance) when loading the dynamic library.
239  // The crash happens for Eeschema.
240  // So switch to "C" locale during loading (LC_COLLATE is enough).
241  int lc_new_type = LC_COLLATE;
242  std::string user_locale = setlocale( lc_new_type, nullptr );
243  setlocale( lc_new_type, "C" );
244 
245  bool success = dso.Load( dname, wxDL_VERBATIM | wxDL_NOW | wxDL_GLOBAL );
246 
247  setlocale( lc_new_type, user_locale.c_str() );
248 
249  if( !success )
250  {
251  // Failure: error reporting UI was done via wxLogSysError().
252  // No further reporting required here. Apparently this is not true on all
253  // platforms and/or wxWidgets builds and KiCad will crash. Throwing the exception
254  // here and catching it in the KiCad launcher resolves the crash issue. See bug
255  // report https://bugs.launchpad.net/kicad/+bug/1577786.
256 
257  msg.Printf( _( "Failed to load kiface library '%s'." ), dname );
258  THROW_IO_ERROR( msg );
259  }
260  else if( ( addr = dso.GetSymbol( wxT( KIFACE_INSTANCE_NAME_AND_VERSION ) ) ) == nullptr )
261  {
262  // Failure: error reporting UI was done via wxLogSysError().
263  // No further reporting required here. Assume the same thing applies here as
264  // above with the Load() call. This has not been tested.
265  msg.Printf( _( "Could not read instance name and version from kiface library '%s'." ),
266  dname );
267  THROW_IO_ERROR( msg );
268  }
269  else
270  {
271  KIFACE_GETTER_FUNC* ki_getter = (KIFACE_GETTER_FUNC*) addr;
272 
273  KIFACE* kiface = ki_getter( &m_kiface_version[aFaceId], KIFACE_VERSION, m_program );
274 
275  // KIFACE_GETTER_FUNC function comment (API) says the non-NULL is unconditional.
276  wxASSERT_MSG( kiface,
277  wxT( "attempted DSO has a bug, failed to return a KIFACE*" ) );
278 
279  // Give the DSO a single chance to do its "process level" initialization.
280  // "Process level" specifically means stay away from any projects in there.
281  if( kiface->OnKifaceStart( m_program, m_ctl ) )
282  {
283  // Tell dso's wxDynamicLibrary destructor not to Unload() the program image.
284  ignore_unused( dso.Detach() );
285 
286  return m_kiface[aFaceId] = kiface;
287  }
288  }
289 
290  // In any of the failure cases above, dso.Unload() should be called here
291  // by dso destructor.
292  // However:
293 
294  // There is a file installation bug. We only look for KIFACE's which we know
295  // to exist, and we did not find one. If we do not find one, this is an
296  // installation bug.
297 
298  msg = wxString::Format( _( "Fatal Installation Bug. File:\n"
299  "'%s'\ncould not be loaded\n" ), dname );
300 
301  if( ! wxFileExists( dname ) )
302  msg << _( "It is missing.\n" );
303  else
304  msg << _( "Perhaps a shared library (.dll or .so) file is missing.\n" );
305 
306  msg << _( "From command line: argv[0]:\n'" );
307  msg << wxStandardPaths::Get().GetExecutablePath() << wxT( "'\n" );
308 
309  // This is a fatal error, one from which we cannot recover, nor do we want
310  // to protect against in client code which would require numerous noisy
311  // tests in numerous places. So we inform the user that the installation
312  // is bad. This exception will likely not get caught until way up in the
313  // wxApp derivative, at which point the process will exit gracefully.
314  THROW_IO_ERROR( msg );
315  }
316 
317  return nullptr;
318 }
BITMAP2CMP_SETTINGS kiface
#define KIFACE_VERSION
The KIWAY and KIFACE classes are used to communicate between various process modules,...
Definition: kiway.h:109
PGM_BASE * m_program
Definition: kiway.h:424
void AddDynamicLibrarySearchPath(const wxString &aPath)
Inserts a search path for loading dynamic libraries.
Definition: gtk/app.cpp:93
#define KIFACE_INSTANCE_NAME_AND_VERSION
Definition: kiway.h:114
KIFACE * KIFACE_GETTER_FUNC(int *aKIFACEversion, int aKIWAYversion, PGM_BASE *aProgram)
Point to the one and only KIFACE export.
Definition: kiway.h:458
int m_ctl
Definition: kiway.h:425
#define _(s)
constexpr std::size_t arrayDim(T const (&)[N]) noexcept
Returns # of elements in an array.
Definition: arraydim.h:31
const wxString dso_search_path(FACE_T aFaceId)
Get the [path &] name of the DSO holding the requested FACE_T.
Definition: kiway.cpp:104
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, const CPTREE &aTree)
Output a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
Definition: ptree.cpp:200
Implement a participant in the KIWAY alchemy.
Definition: kiway.h:148
void ignore_unused(const T &)
Definition: ignore.h:24
static int m_kiface_version[KIWAY_FACE_COUNT]
Definition: kiway.h:422
#define THROW_IO_ERROR(msg)
Definition: ki_exception.h:38
static KIFACE * m_kiface[KIWAY_FACE_COUNT]
Definition: kiway.h:421

References _, KIPLATFORM::APP::AddDynamicLibrarySearchPath(), arrayDim(), dso_search_path(), Format(), ignore_unused(), kiface, KIFACE_INSTANCE_NAME_AND_VERSION, KIFACE_VERSION, m_ctl, m_kiface, m_kiface_version, m_program, and THROW_IO_ERROR.

Referenced by COMMON_CONTROL::ConfigurePaths(), FOOTPRINT_PREVIEW_PANEL_BASE::Create(), get_instance_from_id(), SCRIPTING_TOOL::Init(), SAVE_AS_TRAVERSER::OnFile(), PROJECT::PcbFootprintLibs(), Player(), and COMMON_CONTROL::ShowLibraryTable().

◆ KifaceType()

KIWAY::FACE_T KIWAY::KifaceType ( FRAME_T  aFrameType)
static

A simple mapping function which returns the FACE_T which is known to implement aFrameType.

Returns
a valid value KIWAY::FACE_T or FACE_T(-1) if given a bad aFrameType.

Definition at line 321 of file kiway.cpp.

322 {
323  switch( aFrameType )
324  {
325  case FRAME_SCH:
327  case FRAME_SCH_VIEWER:
329  case FRAME_SIMULATOR:
330  return FACE_SCH;
331 
332  case FRAME_PCB_EDITOR:
337  case FRAME_PCB_DISPLAY3D:
338  return FACE_PCB;
339 
340  case FRAME_CVPCB:
341  case FRAME_CVPCB_DISPLAY:
342  return FACE_CVPCB;
343 
344  case FRAME_PYTHON:
345  return FACE_PYTHON;
346 
347  case FRAME_GERBER:
348  return FACE_GERBVIEW;
349 
350  case FRAME_PL_EDITOR:
351  return FACE_PL_EDITOR;
352 
353  case FRAME_CALC:
354  return FACE_PCB_CALCULATOR;
355 
356  case FRAME_BM2CMP:
357  return FACE_BMP2CMP;
358 
359  default:
360  return FACE_T( -1 );
361  }
362 }
pcbnew DSO
Definition: kiway.h:269
FACE_T
Known KIFACE implementations.
Definition: kiway.h:266
eeschema DSO
Definition: kiway.h:268

References FACE_BMP2CMP, FACE_CVPCB, FACE_GERBVIEW, FACE_PCB, FACE_PCB_CALCULATOR, FACE_PL_EDITOR, FACE_PYTHON, FACE_SCH, FRAME_BM2CMP, FRAME_CALC, FRAME_CVPCB, FRAME_CVPCB_DISPLAY, FRAME_FOOTPRINT_EDITOR, FRAME_FOOTPRINT_VIEWER, FRAME_FOOTPRINT_VIEWER_MODAL, FRAME_FOOTPRINT_WIZARD, FRAME_GERBER, FRAME_PCB_DISPLAY3D, FRAME_PCB_EDITOR, FRAME_PL_EDITOR, FRAME_PYTHON, FRAME_SCH, FRAME_SCH_SYMBOL_EDITOR, FRAME_SCH_VIEWER, FRAME_SCH_VIEWER_MODAL, and FRAME_SIMULATOR.

Referenced by PGM_SINGLE_TOP::OnPgmInit(), and Player().

◆ OnKiCadExit()

void KIWAY::OnKiCadExit ( )

Definition at line 626 of file kiway.cpp.

627 {
629  {
630  // A dynamic_cast could be better, but creates link issues
631  // (some basic_frame functions not found) on some platforms,
632  // so a static_cast is used.
633  EDA_BASE_FRAME* top = static_cast<EDA_BASE_FRAME*>( m_top );
634 
635  if( top )
636  top->Close( false );
637  }
638 }
#define KFCTL_CPP_PROJECT_SUITE
Running under C++ project mgr, possibly with others.
Definition: kiway.h:157
int m_ctl
Definition: kiway.h:425
The base frame for deriving all KiCad main window classes.
wxFrame * m_top
Definition: kiway.h:427

References KFCTL_CPP_PROJECT_SUITE, m_ctl, and m_top.

Referenced by PL_EDITOR_FRAME::OnExit(), SCH_EDIT_FRAME::OnExit(), FOOTPRINT_EDIT_FRAME::OnExitKiCad(), FOOTPRINT_VIEWER_FRAME::OnExitKiCad(), SYMBOL_EDIT_FRAME::OnExitKiCad(), and PCB_EDIT_FRAME::OnQuit().

◆ OnKiwayEnd()

void KIWAY::OnKiwayEnd ( )

Definition at line 641 of file kiway.cpp.

642 {
643  for( KIFACE* i : m_kiface )
644  {
645  if( i )
646  i->OnKifaceEnd();
647  }
648 }
Implement a participant in the KIWAY alchemy.
Definition: kiway.h:148
static KIFACE * m_kiface[KIWAY_FACE_COUNT]
Definition: kiway.h:421

References m_kiface.

Referenced by CreateWindow(), PGM_KICAD::OnPgmExit(), PGM_SINGLE_TOP::OnPgmExit(), and PGM_MOCK_EESCHEMA_FRAME::OnPgmExit().

◆ Player()

KIWAY_PLAYER * KIWAY::Player ( FRAME_T  aFrameType,
bool  doCreate = true,
wxTopLevelWindow *  aParent = nullptr 
)
virtual

Return the KIWAY_PLAYER* given a FRAME_T.

If it is not already created, the required KIFACE is found and loaded and initialized if necessary, then the KIWAY_PLAYER window is created but not shown. Caller must Show() it. If it is already created, then the existing KIWAY_PLAYER* pointer is returned.

Parameters
aFrameTypeis from enum FRAME_T.
doCreatewhen true asks that the player be created if it is not already created, false means do not create and maybe return NULL.
aParentis a parent for modal KIWAY_PLAYER frames, otherwise NULL used only when doCreate = true and by KIWAY_PLAYER frames created in modal form
Returns
a valid opened KIWAY_PLAYER or NULL if there is something wrong or doCreate was false and the player has yet to be created.
Exceptions
IO_ERRORif the *.kiface file could not be found, filled with text saying what.

Definition at line 383 of file kiway.cpp.

384 {
385  // Since this will be called from python, cannot assume that code will
386  // not pass a bad aFrameType.
387  if( (unsigned) aFrameType >= KIWAY_PLAYER_COUNT )
388  {
389  // @todo : throw an exception here for python's benefit, at least that
390  // way it gets some explanatory text.
391 
392  wxASSERT_MSG( 0, wxT( "caller has a bug, passed a bad aFrameType" ) );
393  return nullptr;
394  }
395 
396  // return the previously opened window
397  KIWAY_PLAYER* frame = GetPlayerFrame( aFrameType );
398 
399  if( frame )
400  return frame;
401 
402  if( doCreate )
403  {
404  try
405  {
406  FACE_T face_type = KifaceType( aFrameType );
407  KIFACE* kiface = KiFACE( face_type );
408 
409  frame = (KIWAY_PLAYER*) kiface->CreateWindow(
410  aParent, // Parent window of frame in modal mode,
411  // NULL in non modal mode
412  aFrameType,
413  this,
414  m_ctl // questionable need, these same flags
415  // were passed to KIFACE::OnKifaceStart()
416  );
417 
418  m_playerFrameId[aFrameType].store( frame->GetId() );
419  return frame;
420  }
421  catch( const IO_ERROR& ioe )
422  {
423  DisplayErrorMessage( nullptr, _( "Error loading editor." ), ioe.What() );
424  }
425  catch( const std::exception& e)
426  {
427  DisplayErrorMessage( nullptr, _( "Error loading editor." ), e.what() );
428  }
429  catch( ... )
430  {
431  DisplayErrorMessage( nullptr, _( "Error loading editor." ) );
432  }
433  }
434 
435  return nullptr;
436 }
BITMAP2CMP_SETTINGS kiface
A wxFrame capable of the OpenProjectFiles function, meaning it can load a portion of a KiCad project.
Definition: kiway_player.h:64
std::atomic< wxWindowID > m_playerFrameId[KIWAY_PLAYER_COUNT]
Definition: kiway.h:435
static FACE_T KifaceType(FRAME_T aFrameType)
A simple mapping function which returns the FACE_T which is known to implement aFrameType.
Definition: kiway.cpp:321
void DisplayErrorMessage(wxWindow *aParent, const wxString &aText, const wxString &aExtraInfo)
Display an error message with aMessage.
Definition: confirm.cpp:292
KIWAY_PLAYER * GetPlayerFrame(FRAME_T aFrameType)
Definition: kiway.cpp:365
virtual const wxString What() const
A composite of Problem() and Where()
Definition: exceptions.cpp:30
int m_ctl
Definition: kiway.h:425
#define _(s)
virtual KIFACE * KiFACE(FACE_T aFaceId, bool doLoad=true)
Return the KIFACE* given a FACE_T.
Definition: kiway.cpp:196
FACE_T
Known KIFACE implementations.
Definition: kiway.h:266
Implement a participant in the KIWAY alchemy.
Definition: kiway.h:148
Hold an error message and may be used when throwing exceptions containing meaningful error messages.
Definition: ki_exception.h:75

References _, DisplayErrorMessage(), GetPlayerFrame(), kiface, KiFACE(), KifaceType(), KIWAY_PLAYER_COUNT, m_ctl, m_playerFrameId, and IO_ERROR::What().

Referenced by FOOTPRINT_VIEWER_FRAME::AddFootprintToPCB(), PCB_BASE_EDIT_FRAME::AddLibrary(), SYMBOL_EDITOR_CONTROL::AddSymbolToSchematic(), SYMBOL_EDIT_FRAME::canCloseWindow(), SCH_EDIT_FRAME::canCloseWindow(), FOOTPRINT_EDITOR_CONTROL::CreateFootprint(), FIELDS_GRID_TRICKS::doPopupSelection(), FIELDS_EDITOR_GRID_TRICKS::doPopupSelection(), BOARD_EDITOR_CONTROL::EditFpInFpEditor(), SCH_EDITOR_CONTROL::EditWithSymbolEditor(), BACK_ANNOTATE::FetchNetlistFromPCB(), KICAD_MANAGER_FRAME::ImportNonKiCadProject(), InvokePcbLibTableEditor(), InvokeSchEditSymbolLibTable(), EDA_DRAW_FRAME::IsScriptingConsoleVisible(), DIALOG_CHANGE_SYMBOLS::launchMatchIdSymbolBrowser(), DIALOG_CHANGE_SYMBOLS::launchNewIdSymbolBrowser(), FOOTPRINT_EDIT_FRAME::LoadFootprintFromBoard(), TEXT_BUTTON_SYMBOL_CHOOSER::OnButtonClick(), TEXT_BUTTON_FP_CHOOSER::OnButtonClick(), SCH_EDIT_FRAME::OnOpenCvpcb(), SCH_EDIT_FRAME::OnOpenPcbnew(), PGM_SINGLE_TOP::OnPgmInit(), EDA_BASE_FRAME::OnPreferences(), DIALOG_SYMBOL_REMAP::OnRemapSymbols(), DIALOG_FIELD_PROPERTIES::OnTextValueSelectButtonClick(), FOOTPRINT_EDIT_FRAME::OnUpdateLoadFootprintFromBoard(), SCH_EDIT_FRAME::OnUpdatePCB(), FOOTPRINT_EDIT_FRAME::OnUpdateSaveFootprintToBoard(), SCH_BASE_FRAME::PickSymbolFromLibBrowser(), ProcessEvent(), SCH_EDIT_TOOL::Properties(), SCH_EDITOR_CONTROL::rescueProject(), PCB_EDIT_FRAME::RunEeschema(), EE_INSPECTION_TOOL::RunSimulation(), SYMBOL_EDIT_FRAME::Save(), FOOTPRINT_EDIT_FRAME::SaveFootprintToBoard(), EDA_DRAW_FRAME::ScriptingConsoleEnableDisable(), PCB_BASE_FRAME::SelectFootprintFromLibBrowser(), PCB_EDIT_FRAME::ShowFootprintPropertiesDialog(), CVPCB_CONTROL::ShowFootprintViewer(), COMMON_CONTROL::ShowPlayer(), KICAD_MANAGER_CONTROL::ShowPlayer(), SIM_PLOT_FRAME::SIM_PLOT_FRAME(), PCB_EDIT_FRAME::TestStandalone(), BOARD_EDITOR_CONTROL::UpdateSchematicFromPCB(), and DIALOG_EXCHANGE_FOOTPRINTS::ViewAndSelectFootprint().

◆ PlayerClose()

bool KIWAY::PlayerClose ( FRAME_T  aFrameType,
bool  doForce 
)
virtual

Call the KIWAY_PLAYER::Close( bool force ) function on the window and if not vetoed, returns true, else false.

If window actually closes, then this KIWAY marks it as not opened internally.

Returns
true if the window is closed and not vetoed, else false.

Definition at line 439 of file kiway.cpp.

440 {
441  // Since this will be called from python, cannot assume that code will
442  // not pass a bad aFrameType.
443  if( (unsigned) aFrameType >= KIWAY_PLAYER_COUNT )
444  {
445  // @todo : throw an exception here for python's benefit, at least that
446  // way it gets some explanatory text.
447 
448  wxASSERT_MSG( 0, wxT( "caller has a bug, passed a bad aFrameType" ) );
449  return false;
450  }
451 
452  KIWAY_PLAYER* frame = GetPlayerFrame( aFrameType );
453 
454  if( frame == nullptr ) // Already closed
455  return true;
456 
457  if( frame->NonUserClose( doForce ) )
458  return true;
459 
460  return false;
461 }
A wxFrame capable of the OpenProjectFiles function, meaning it can load a portion of a KiCad project.
Definition: kiway_player.h:64
KIWAY_PLAYER * GetPlayerFrame(FRAME_T aFrameType)
Definition: kiway.cpp:365
bool NonUserClose(bool aForce)

References GetPlayerFrame(), KIWAY_PLAYER_COUNT, and EDA_BASE_FRAME::NonUserClose().

Referenced by PlayersClose().

◆ PlayersClose()

bool KIWAY::PlayersClose ( bool  doForce)
virtual

Call the KIWAY_PLAYER::Close( bool force ) function on all the windows and if none are vetoed, returns true, else false.

If any window actually closes, then* this KIWAY marks it as not opened internally.

Returns
true indicates that all windows closed because none were vetoed, false means at least one cast a veto. Any that cast a veto are still open.

Definition at line 464 of file kiway.cpp.

465 {
466  bool ret = true;
467 
468  for( unsigned i=0; i < KIWAY_PLAYER_COUNT; ++i )
469  {
470  ret = ret && PlayerClose( FRAME_T( i ), doForce );
471  }
472 
473  return ret;
474 }
FRAME_T
The set of EDA_BASE_FRAME derivatives, typically stored in EDA_BASE_FRAME::m_Ident.
Definition: frame_type.h:32
virtual bool PlayerClose(FRAME_T aFrameType, bool doForce)
Call the KIWAY_PLAYER::Close( bool force ) function on the window and if not vetoed,...
Definition: kiway.cpp:439

References KIWAY_PLAYER_COUNT, and PlayerClose().

◆ Prj()

PROJECT & KIWAY::Prj ( ) const
virtual

Return the PROJECT associated with this KIWAY.

This is here as an accessor, so that there is freedom to put the actual PROJECT storage in a place decided by the implementation, and not known to the caller.

Definition at line 190 of file kiway.cpp.

191 {
192  return Pgm().GetSettingsManager().Prj();
193 }
virtual PROJECT & Prj() const
Return the PROJECT associated with this KIWAY.
Definition: kiway.cpp:190
KIWAY Kiway & Pgm(), KFCTL_STANDALONE
The global Program "get" accessor.
Definition: single_top.cpp:106

References Pgm(), and Prj().

Referenced by PCB::IFACE::CreateWindow(), SYMBOL_PREVIEW_WIDGET::DisplaySymbol(), FOOTPRINT_LIST::GetInstance(), InvokePcbLibTableEditor(), InvokeSchEditSymbolLibTable(), LIB_TREE_MODEL_ADAPTER::LIB_TREE_MODEL_ADAPTER(), KIWAY_HOLDER::Prj(), Prj(), Prj(), and LIB_TREE_MODEL_ADAPTER::SavePinnedItems().

◆ ProcessEvent()

bool KIWAY::ProcessEvent ( wxEvent &  aEvent)
override

Definition at line 600 of file kiway.cpp.

601 {
602  KIWAY_EXPRESS* mail = dynamic_cast<KIWAY_EXPRESS*>( &aEvent );
603 
604  if( mail )
605  {
606  FRAME_T dest = mail->Dest();
607 
608  // see if recipient is alive
609  KIWAY_PLAYER* alive = Player( dest, false );
610 
611  if( alive )
612  {
613 #if 1
614  return alive->ProcessEvent( aEvent );
615 #else
616  alive->KiwayMailIn( *mail );
617  return true;
618 #endif
619  }
620  }
621 
622  return false;
623 }
A wxFrame capable of the OpenProjectFiles function, meaning it can load a portion of a KiCad project.
Definition: kiway_player.h:64
Carry a payload from one KIWAY_PLAYER to another within a PROJECT.
Definition: kiway_express.h:38
FRAME_T
The set of EDA_BASE_FRAME derivatives, typically stored in EDA_BASE_FRAME::m_Ident.
Definition: frame_type.h:32
virtual KIWAY_PLAYER * Player(FRAME_T aFrameType, bool doCreate=true, wxTopLevelWindow *aParent=nullptr)
Return the KIWAY_PLAYER* given a FRAME_T.
Definition: kiway.cpp:383
virtual void KiwayMailIn(KIWAY_EXPRESS &aEvent)
Receive KIWAY_EXPRESS messages from other players.
FRAME_T Dest()
Return the destination player id of the message.
Definition: kiway_express.h:44
bool ProcessEvent(wxEvent &aEvent) override
Override the default process event handler to implement the auto save feature.

References KIWAY_EXPRESS::Dest(), KIWAY_PLAYER::KiwayMailIn(), Player(), and EDA_BASE_FRAME::ProcessEvent().

Referenced by ExpressMail().

◆ ProjectChanged()

void KIWAY::ProjectChanged ( )
virtual

Calls ProjectChanged() on all KIWAY_PLAYERs.

Used after changing the project to ensure all players are updated correctly.

Definition at line 577 of file kiway.cpp.

578 {
580  {
581  // A dynamic_cast could be better, but creates link issues
582  // (some basic_frame functions not found) on some platforms,
583  // so a static_cast is used.
584  EDA_BASE_FRAME* top = static_cast<EDA_BASE_FRAME*>( m_top );
585 
586  if( top )
587  top->ProjectChanged();
588  }
589 
590  for( unsigned i=0; i < KIWAY_PLAYER_COUNT; ++i )
591  {
592  KIWAY_PLAYER* frame = GetPlayerFrame( ( FRAME_T )i );
593 
594  if( frame )
595  frame->ProjectChanged();
596  }
597 }
#define KFCTL_CPP_PROJECT_SUITE
Running under C++ project mgr, possibly with others.
Definition: kiway.h:157
A wxFrame capable of the OpenProjectFiles function, meaning it can load a portion of a KiCad project.
Definition: kiway_player.h:64
KIWAY_PLAYER * GetPlayerFrame(FRAME_T aFrameType)
Definition: kiway.cpp:365
FRAME_T
The set of EDA_BASE_FRAME derivatives, typically stored in EDA_BASE_FRAME::m_Ident.
Definition: frame_type.h:32
int m_ctl
Definition: kiway.h:425
The base frame for deriving all KiCad main window classes.
virtual void ProjectChanged()
Notification event that the project has changed.
wxFrame * m_top
Definition: kiway.h:427

References GetPlayerFrame(), KFCTL_CPP_PROJECT_SUITE, KIWAY_PLAYER_COUNT, m_ctl, m_top, and EDA_BASE_FRAME::ProjectChanged().

Referenced by SETTINGS_MANAGER::LoadProject(), and SETTINGS_MANAGER::UnloadProject().

◆ set_kiface()

bool KIWAY::set_kiface ( FACE_T  aFaceType,
KIFACE aKiface 
)
inlineprivate

Definition at line 404 of file kiway.h.

405  {
406  if( (unsigned) aFaceType < (unsigned) KIWAY_FACE_COUNT )
407  {
408  m_kiface[aFaceType] = aKiface;
409  return true;
410  }
411 
412  return false;
413  }
static KIFACE * m_kiface[KIWAY_FACE_COUNT]
Definition: kiway.h:421

References KIWAY_FACE_COUNT, and m_kiface.

Referenced by PGM_SINGLE_TOP::OnPgmInit().

◆ SetLanguage()

void KIWAY::SetLanguage ( int  aLanguage)
virtual

Change the language and then calls ShowChangedLanguage() on all #KIWAY_PLAYERs.

Definition at line 486 of file kiway.cpp.

487 {
488  wxString errMsg;
489  bool ret = false;
490 
491  {
492  // Only allow the traces to be logged by wx. We use our own system to log when the
493  // OS doesn't support the language, so we want to hide the wx error.
494  WX_LOG_TRACE_ONLY logtraceOnly;
495  Pgm().SetLanguageIdentifier( aLanguage );
496  ret = Pgm().SetLanguage( errMsg );
497  }
498 
499  if( !ret )
500  {
501  wxString lang;
502 
503  for( unsigned ii = 0; LanguagesList[ii].m_KI_Lang_Identifier != 0; ii++ )
504  {
505  if( aLanguage == LanguagesList[ii].m_KI_Lang_Identifier )
506  {
507  if( LanguagesList[ii].m_DoNotTranslate )
508  lang = LanguagesList[ii].m_Lang_Label;
509  else
510  lang = wxGetTranslation( LanguagesList[ii].m_Lang_Label );
511 
512  break;
513  }
514  }
515 
516  DisplayErrorMessage( nullptr,
517  wxString::Format( _( "Unable to switch language to %s" ), lang ),
518  errMsg );
519  return;
520  }
521 
522 #if 1
523  // This is a risky hack that goes away if we allow the language to be
524  // set only from the top most frame if !Kiface.IsSingle()
525 
526  // Only for the C++ project manager, and not for the python one and not for
527  // single_top do we look for the EDA_BASE_FRAME as the top level window.
528  // For single_top this is not needed because that window is registered in
529  // the array below.
531  {
532  // A dynamic_cast could be better, but creates link issues
533  // (some basic_frame functions not found) on some platforms,
534  // so a static_cast is used.
535  EDA_BASE_FRAME* top = static_cast<EDA_BASE_FRAME*>( m_top );
536 
537  if( top )
538  top->ShowChangedLanguage();
539  }
540 #endif
541 
542  for( unsigned i=0; i < KIWAY_PLAYER_COUNT; ++i )
543  {
544  KIWAY_PLAYER* frame = GetPlayerFrame( ( FRAME_T )i );
545 
546  if( frame )
547  {
548  frame->ShowChangedLanguage();
549  }
550  }
551 }
#define KFCTL_CPP_PROJECT_SUITE
Running under C++ project mgr, possibly with others.
Definition: kiway.h:157
LANGUAGE_DESCR LanguagesList[]
An array containing all the languages that KiCad supports.
Definition: pgm_base.cpp:70
A wxFrame capable of the OpenProjectFiles function, meaning it can load a portion of a KiCad project.
Definition: kiway_player.h:64
void DisplayErrorMessage(wxWindow *aParent, const wxString &aText, const wxString &aExtraInfo)
Display an error message with aMessage.
Definition: confirm.cpp:292
void ShowChangedLanguage() override
Redraw the menus and what not in current language.
KIWAY_PLAYER * GetPlayerFrame(FRAME_T aFrameType)
Definition: kiway.cpp:365
FRAME_T
The set of EDA_BASE_FRAME derivatives, typically stored in EDA_BASE_FRAME::m_Ident.
Definition: frame_type.h:32
int m_KI_Lang_Identifier
KiCad identifier used in menu selection (See id.h)
Definition: pgm_base.h:65
virtual void SetLanguage(int aLanguage)
Change the language and then calls ShowChangedLanguage() on all #KIWAY_PLAYERs.
Definition: kiway.cpp:486
KIWAY Kiway & Pgm(), KFCTL_STANDALONE
The global Program "get" accessor.
Definition: single_top.cpp:106
int m_ctl
Definition: kiway.h:425
#define _(s)
wxString m_Lang_Label
Labels used in menus.
Definition: pgm_base.h:68
A logger class that filters out all log messages that are not generated by wxLogTrace and ignores the...
Definition: logging.h:31
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, const CPTREE &aTree)
Output a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
Definition: ptree.cpp:200
The base frame for deriving all KiCad main window classes.
wxFrame * m_top
Definition: kiway.h:427

References _, DisplayErrorMessage(), Format(), GetPlayerFrame(), KFCTL_CPP_PROJECT_SUITE, KIWAY_PLAYER_COUNT, LanguagesList, m_ctl, LANGUAGE_DESCR::m_KI_Lang_Identifier, LANGUAGE_DESCR::m_Lang_Label, m_top, Pgm(), SetLanguage(), and EDA_BASE_FRAME::ShowChangedLanguage().

Referenced by KICAD_MANAGER_FRAME::language_change(), KIWAY_PLAYER::language_change(), and SetLanguage().

◆ SetTop()

void KIWAY::SetTop ( wxFrame *  aTop)

Tell this KIWAY about the top most frame in the program and optionally allows it to play the role of one of the KIWAY_PLAYERs if launched from single_top.cpp.

Parameters
aTopis the top most wxFrame in the entire program.

Definition at line 82 of file kiway.cpp.

83 {
84 #if 0
85  if( m_top )
86  {
87  m_top->Disconnect( wxEVT_DESTROY,
88  wxWindowDestroyEventHandler( KIWAY::player_destroy_handler ),
89  nullptr, this );
90  }
91 
92  if( aTop )
93  {
94  aTop->Connect( wxEVT_DESTROY,
95  wxWindowDestroyEventHandler( KIWAY::player_destroy_handler ),
96  nullptr, this );
97  }
98 #endif
99 
100  m_top = aTop;
101 }
wxFrame * m_top
Definition: kiway.h:427

References m_top.

Referenced by KIWAY(), PGM_KICAD::OnPgmInit(), and PGM_SINGLE_TOP::OnPgmInit().

Friends And Related Function Documentation

◆ PGM_SINGLE_TOP

friend struct PGM_SINGLE_TOP
friend

Definition at line 262 of file kiway.h.

Member Data Documentation

◆ m_ctl

int KIWAY::m_ctl
private

◆ m_kiface

KIFACE * KIWAY::m_kiface
staticprivate

Definition at line 421 of file kiway.h.

Referenced by KiFACE(), OnKiwayEnd(), and set_kiface().

◆ m_kiface_version

int KIWAY::m_kiface_version
staticprivate

Definition at line 422 of file kiway.h.

Referenced by KiFACE().

◆ m_playerFrameId

std::atomic<wxWindowID> KIWAY::m_playerFrameId[KIWAY_PLAYER_COUNT]
private

Definition at line 435 of file kiway.h.

Referenced by GetPlayerFrame(), KIWAY(), and Player().

◆ m_program

PGM_BASE* KIWAY::m_program
private

Definition at line 424 of file kiway.h.

Referenced by KiFACE().

◆ m_top

wxFrame* KIWAY::m_top
private

Definition at line 427 of file kiway.h.

Referenced by CommonSettingsChanged(), GetTop(), OnKiCadExit(), ProjectChanged(), SetLanguage(), and SetTop().


The documentation for this class was generated from the following files: