KiCad PCB EDA Suite
APP_KICAD Struct Reference

Struct APP_KICAD is not publicly visible because most of the action is in PGM_KICAD these days. More...

Inheritance diagram for APP_KICAD:

Public Member Functions

bool OnInit () override
 
int OnExit () override
 
int OnRun () override
 
void MacOpenFile (const wxString &aFileName)
 Function MacOpenFile is specific to MacOSX (not used under Linux or Windows). More...
 

Detailed Description

Struct APP_KICAD is not publicly visible because most of the action is in PGM_KICAD these days.

Definition at line 201 of file kicad.cpp.

Member Function Documentation

void APP_KICAD::MacOpenFile ( const wxString &  aFileName)
inline

Function MacOpenFile is specific to MacOSX (not used under Linux or Windows).

MacOSX requires it for file association.

See also
http://wiki.wxwidgets.org/WxMac-specific_topics

Definition at line 259 of file kicad.cpp.

References PGM_BASE::MacOpenFile(), and Pgm().

260  {
261  Pgm().MacOpenFile( aFileName );
262  }
PGM_BASE & Pgm()
The global Program "get" accessor.
Definition: kicad.cpp:65
VTBL_ENTRY void MacOpenFile(const wxString &aFileName)=0
Function MacOpenFile is specific to MacOSX (not used under Linux or Windows).
int APP_KICAD::OnExit ( )
inlineoverride

Definition at line 222 of file kicad.cpp.

References PGM_KICAD::OnPgmExit().

223  {
224  program.OnPgmExit();
225 
226  return wxApp::OnExit();
227  }
static PGM_KICAD program
Definition: kicad.cpp:62
void OnPgmExit()
Definition: kicad.cpp:157
bool APP_KICAD::OnInit ( )
inlineoverride

Definition at line 217 of file kicad.cpp.

References PGM_KICAD::OnPgmInit().

218  {
219  return program.OnPgmInit();
220  }
bool OnPgmInit()
Definition: kicad.cpp:77
static PGM_KICAD program
Definition: kicad.cpp:62
int APP_KICAD::OnRun ( )
inlineoverride

Definition at line 229 of file kicad.cpp.

References FROM_UTF8(), GetChars(), name, and IO_ERROR::What().

230  {
231  try
232  {
233  return wxApp::OnRun();
234  }
235  catch( const std::exception& e )
236  {
237  wxLogError( wxT( "Unhandled exception class: %s what: %s" ),
238  GetChars( FROM_UTF8( typeid(e).name() )),
239  GetChars( FROM_UTF8( e.what() ) ) );
240  }
241  catch( const IO_ERROR& ioe )
242  {
243  wxLogError( GetChars( ioe.What() ) );
244  }
245  catch(...)
246  {
247  wxLogError( wxT( "Unhandled exception of unknown type" ) );
248  }
249 
250  return -1;
251  }
static wxString FROM_UTF8(const char *cstring)
function FROM_UTF8 converts a UTF8 encoded C string to a wxString for all wxWidgets build modes...
Definition: macros.h:53
virtual const wxString What() const
A composite of Problem() and Where()
Definition: exceptions.cpp:33
static const wxChar * GetChars(const wxString &s)
Function GetChars returns a wxChar* to the actual wxChar* data within a wxString, and is helpful for ...
Definition: macros.h:92
const char * name
Struct IO_ERROR is a class used to hold an error message and may be used when throwing exceptions con...
Definition: ki_exception.h:47

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