KiCad PCB EDA Suite
TERMINATE_HANDLER Class Reference
Inheritance diagram for TERMINATE_HANDLER:

Public Member Functions

 TERMINATE_HANDLER (const wxString &appName)
 
void OnTerminate (int pid, int status) override
 

Private Attributes

wxString m_appName
 

Detailed Description

Definition at line 714 of file kicad_manager_control.cpp.

Constructor & Destructor Documentation

◆ TERMINATE_HANDLER()

TERMINATE_HANDLER::TERMINATE_HANDLER ( const wxString &  appName)
inline

Definition at line 717 of file kicad_manager_control.cpp.

717  :
718  m_appName( appName )
719  { }

Member Function Documentation

◆ OnTerminate()

void TERMINATE_HANDLER::OnTerminate ( int  pid,
int  status 
)
inlineoverride

Definition at line 721 of file kicad_manager_control.cpp.

722  {
723  wxString msg = wxString::Format( _( "%s closed [pid=%d]\n" ), m_appName, pid );
724 
725  wxWindow* window = wxWindow::FindWindowByName( KICAD_MANAGER_FRAME_NAME );
726 
727  if( window ) // Should always happen.
728  {
729  // Be sure the kicad frame manager is found
730  // This dynamic cast is not really mandatory, but ...
731  KICAD_MANAGER_FRAME* frame = dynamic_cast<KICAD_MANAGER_FRAME*>( window );
732 
733  if( frame )
734  frame->PrintMsg( msg );
735  }
736 
737  delete this;
738  }
void PrintMsg(const wxString &text)
#define _(s)
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
#define KICAD_MANAGER_FRAME_NAME
The main KiCad project manager frame.

References _, Format(), KICAD_MANAGER_FRAME_NAME, m_appName, and EDA_BASE_FRAME::PrintMsg().

Member Data Documentation

◆ m_appName

wxString TERMINATE_HANDLER::m_appName
private

Definition at line 741 of file kicad_manager_control.cpp.

Referenced by OnTerminate().


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