44 namespace visualization {
105 void SetMenubar(std::shared_ptr<Menu> menubar);
108 void AddWindow(std::shared_ptr<Window> window);
165 bool RunOneTick(EnvUnlocker &unlocker,
bool cleanup_if_no_windows =
true);
201 bool z_in_view_space =
false);
206 enum class RunStatus { CONTINUE, DONE };
207 RunStatus ProcessQueuedEvents(EnvUnlocker &unlocker);
211 std::unique_ptr<Impl> impl_;
Definition: Application.h:148
EnvUnlocker()
Definition: Application.h:150
virtual void unlock()
Definition: Application.h:152
virtual ~EnvUnlocker()
Definition: Application.h:151
virtual void relock()
Definition: Application.h:153
Definition: Application.h:58
void VerifyIsInitialized()
Definition: Application.cpp:282
FontId AddFont(const FontDescription &fd)
Definition: Application.cpp:317
std::shared_ptr< Menu > GetMenubar() const
Definition: Application.cpp:394
bool UsingNativeWindows() const
Definition: Application.cpp:299
double Now() const
Definition: Application.cpp:387
void SetWindowSystem(std::shared_ptr< WindowSystem > ws)
Definition: Application.cpp:309
void PostToMainThread(Window *window, std::function< void()> f)
Definition: Application.cpp:628
const Theme & GetTheme() const
Definition: Application.cpp:637
void OnTerminate()
Definition: Application.cpp:444
WindowSystem & GetWindowSystem() const
Definition: Application.cpp:305
virtual ~Application()
Definition: Application.cpp:225
void ShowMessageBox(const char *title, const char *message)
Definition: Application.cpp:149
void RunInThread(std::function< void()> f)
Definition: Application.cpp:622
void Run()
Does not return until the UI is completely finished.
Definition: Application.cpp:487
void SetMenubar(std::shared_ptr< Menu > menubar)
Definition: Application.cpp:398
bool RunOneTick(EnvUnlocker &unlocker, bool cleanup_if_no_windows=true)
Definition: Application.cpp:493
void AddWindow(std::shared_ptr< Window > window)
Must be called on the same thread that calls Run()
Definition: Application.cpp:417
std::shared_ptr< geometry::Image > RenderToDepthImage(rendering::Renderer &renderer, rendering::View *view, rendering::Scene *scene, int width, int height, bool z_in_view_space=false)
Definition: Application.cpp:663
std::shared_ptr< geometry::Image > RenderToImage(rendering::Renderer &renderer, rendering::View *view, rendering::Scene *scene, int width, int height)
Definition: Application.cpp:639
void SetFont(FontId id, const FontDescription &fd)
Definition: Application.cpp:324
void RemoveWindow(Window *window)
Definition: Application.cpp:423
static constexpr FontId DEFAULT_FONT_ID
Identifier for font used by default for all UI elements.
Definition: Application.h:76
void OnMenuItemSelected(Menu::ItemId itemId)
Delivers the itemId to the active window. Used internally.
Definition: Application.cpp:470
const char * GetResourcePath() const
Definition: Application.cpp:633
void Initialize()
Definition: Application.cpp:227
static Application & GetInstance()
Definition: Application.cpp:144
const std::vector< FontDescription > & GetFontDescriptions() const
Definition: Application.cpp:383
void Quit()
Closes all the windows, which exits as a result.
Definition: Application.cpp:438
Definition: WindowSystem.h:46
Definition: Renderer.h:74
unsigned int FontId
Definition: Gui.h:87
Definition: PinholeCameraIntrinsic.cpp:35