SPH
Functions
MainLoop.cpp File Reference
#include "gui/MainLoop.h"
#include <wx/app.h>

Go to the source code of this file.

Functions

 wxDEFINE_EVENT (MAIN_LOOP_TYPE, Sph::MainLoopEvent)
 
NAMESPACE_SPH_BEGIN void executeOnMainThread (const Function< void()> &function)
 Posts a callback to be executed on main thread. More...
 

Function Documentation

◆ executeOnMainThread()

NAMESPACE_SPH_BEGIN void executeOnMainThread ( const Function< void()> &  function)

Posts a callback to be executed on main thread.

The function does not wait for the callback to be executed. The callback is executed by wxWidget framework; that means the event loop must be running and there must be an event handler executing the callback.

Definition at line 8 of file MainLoop.cpp.

◆ wxDEFINE_EVENT()

wxDEFINE_EVENT ( MAIN_LOOP_TYPE  ,
Sph::MainLoopEvent   
)