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) |
Additional command loop for external app control.