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 224 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 282 of file kicad.cpp.

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

283  {
284  Pgm().MacOpenFile( aFileName );
285  }
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 245 of file kicad.cpp.

References PGM_KICAD::OnPgmExit().

246  {
247  program.OnPgmExit();
248 
249  return wxApp::OnExit();
250  }
static PGM_KICAD program
Definition: kicad.cpp:62
void OnPgmExit()
Definition: kicad.cpp:178
bool APP_KICAD::OnInit ( )
inlineoverride

Definition at line 240 of file kicad.cpp.

References PGM_KICAD::OnPgmInit().

241  {
242  return program.OnPgmInit();
243  }
bool OnPgmInit()
Definition: kicad.cpp:77
static PGM_KICAD program
Definition: kicad.cpp:62
int APP_KICAD::OnRun ( )
inlineoverride

Definition at line 252 of file kicad.cpp.

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

253  {
254  try
255  {
256  return wxApp::OnRun();
257  }
258  catch( const std::exception& e )
259  {
260  wxLogError( wxT( "Unhandled exception class: %s what: %s" ),
261  GetChars( FROM_UTF8( typeid(e).name() )),
262  GetChars( FROM_UTF8( e.what() ) ) );
263  }
264  catch( const IO_ERROR& ioe )
265  {
266  wxLogError( GetChars( ioe.What() ) );
267  }
268  catch(...)
269  {
270  wxLogError( wxT( "Unhandled exception of unknown type" ) );
271  }
272 
273  return -1;
274  }
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: