KiCad PCB EDA Suite
KIPLATFORM::APP Namespace Reference

Functions

bool RegisterApplicationRestart (const wxString &aCommandLine)
 Registers the application for restart with the OS with the given command line string to pass as args. More...
 
bool UnregisterApplicationRestart ()
 Unregisters the application from automatic restart. More...
 
bool SupportsShutdownBlockReason ()
 Whether or not the window supports setting a shutdown block reason. More...
 
void SetShutdownBlockReason (wxWindow *aWindow, const wxString &aReason)
 Sets the block reason why the window/application is preventing OS shutdown. More...
 
void RemoveShutdownBlockReason (wxWindow *aWindow)
 Removes any shutdown block reason set. More...
 
void ForceTimerMessagesToBeCreatedIfNecessary ()
 Forces wxTimers to fire more promptly on Win32. More...
 

Function Documentation

◆ ForceTimerMessagesToBeCreatedIfNecessary()

void KIPLATFORM::APP::ForceTimerMessagesToBeCreatedIfNecessary ( )

Forces wxTimers to fire more promptly on Win32.

wxTimers on win32 are not real timers They live in the message pump at the absolute lowest priority (only when no other events are pending) This functions "peeks" the message pump which causes them to get queued immediately

Call as needed in an application to ensure timers are dispatched

Definition at line 56 of file gtk/app.cpp.

57 {
58 }

Referenced by TOOL_DISPATCHER::DispatchWxEvent().

◆ RegisterApplicationRestart()

bool KIPLATFORM::APP::RegisterApplicationRestart ( const wxString &  aCommandLine)

Registers the application for restart with the OS with the given command line string to pass as args.

Parameters
aCommandLineis string the OS will invoke the application with

Definition at line 26 of file gtk/app.cpp.

27 {
28  // Not implemented on this platform
29  return true;
30 }

Referenced by KICAD_MANAGER_FRAME::LoadProject(), SCH_EDIT_FRAME::OpenProjectFiles(), and PCB_EDIT_FRAME::OpenProjectFiles().

◆ RemoveShutdownBlockReason()

void KIPLATFORM::APP::RemoveShutdownBlockReason ( wxWindow *  aWindow)

Removes any shutdown block reason set.

Parameters
aWindowthat has a shutdown block reason set

Definition at line 46 of file gtk/app.cpp.

47 {
48 }

Referenced by EDA_BASE_FRAME::~EDA_BASE_FRAME().

◆ SetShutdownBlockReason()

void KIPLATFORM::APP::SetShutdownBlockReason ( wxWindow *  aWindow,
const wxString &  aReason 
)

Sets the block reason why the window/application is preventing OS shutdown.

This should be set far ahead of any close event.

This is mainly intended for Windows platforms where this is a native feature.

Parameters
aWindowthat will have a shutdown blocker message
aReasonto display why the shutdown block is occuring

Definition at line 51 of file gtk/app.cpp.

52 {
53 }

Referenced by CVPCB_MAINFRAME::CVPCB_MAINFRAME(), EVT_UPDATE_UI_RANGE(), FOOTPRINT_EDIT_FRAME::FOOTPRINT_EDIT_FRAME(), LIB_EDIT_FRAME::LIB_EDIT_FRAME(), PCB_EDIT_FRAME::onBoardLoaded(), PL_EDITOR_FRAME::OnNewPageLayout(), SCH_EDIT_FRAME::OpenProjectFiles(), and SCH_EDIT_FRAME::SCH_EDIT_FRAME().

◆ SupportsShutdownBlockReason()

bool KIPLATFORM::APP::SupportsShutdownBlockReason ( )

Whether or not the window supports setting a shutdown block reason.

Definition at line 40 of file gtk/app.cpp.

41 {
42  return false;
43 }

Referenced by FOOTPRINT_EDIT_FRAME::canCloseWindow(), PL_EDITOR_FRAME::canCloseWindow(), CVPCB_MAINFRAME::canCloseWindow(), PCB_EDIT_FRAME::canCloseWindow(), LIB_EDIT_FRAME::canCloseWindow(), and SCH_EDIT_FRAME::canCloseWindow().

◆ UnregisterApplicationRestart()

bool KIPLATFORM::APP::UnregisterApplicationRestart ( )

Unregisters the application from automatic restart.

Depending on OS, this may not be required

Definition at line 33 of file gtk/app.cpp.

34 {
35  // Not implemented on this platform
36  return true;
37 }