MeshLib C++ Docs
Loading...
Searching...
No Matches
MR::CommandLoop Class Reference

Additional command loop for external app control. More...

#include <MRCommandLoop.h>

Public Types

enum class  StartPosition {
  StartPosition::AfterWindowInit , StartPosition::AfterSplashAppear , StartPosition::AfterPluginInit , StartPosition::BeforeWindowAppear ,
  StartPosition::AfterWindowAppear
}
 Specify execution in specific time of application start. More...
 
using CommandFunc = std::function<void()>
 

Static Public Member Functions

static MRVIEWER_API void setMainThreadId (const std::thread::id &id)
 This function setups main thread id, it should be called before any command.
 
static MRVIEWER_API std::thread::id getMainThreadId ()
 
static MRVIEWER_API void setState (StartPosition state)
 Update state of command loop, only can rise.
 
static MRVIEWER_API void appendCommand (CommandFunc func, StartPosition state=StartPosition::BeforeWindowAppear)
 
static MRVIEWER_API void runCommandFromGUIThread (CommandFunc func)
 
static MRVIEWER_API void processCommands ()
 Execute all commands from loop.
 
static MRVIEWER_API bool empty ()
 Return true if loop is empty.
 
static MRVIEWER_API void removeCommands (bool closeLoop)
 

Detailed Description

Additional command loop for external app control.


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