25 namespace visualization {
86 void SetMenubar(std::shared_ptr<Menu> menubar);
89 void AddWindow(std::shared_ptr<Window> window);
146 bool RunOneTick(EnvUnlocker &unlocker,
bool cleanup_if_no_windows =
true);
182 bool z_in_view_space =
false);
187 enum class RunStatus { CONTINUE, DONE };
188 RunStatus ProcessQueuedEvents(EnvUnlocker &unlocker);
192 std::unique_ptr<Impl> impl_;
Definition: Application.h:129
EnvUnlocker()
Definition: Application.h:131
virtual void unlock()
Definition: Application.h:133
virtual ~EnvUnlocker()
Definition: Application.h:132
virtual void relock()
Definition: Application.h:134
Definition: Application.h:39
void VerifyIsInitialized()
Definition: Application.cpp:315
FontId AddFont(const FontDescription &fd)
Definition: Application.cpp:350
std::shared_ptr< Menu > GetMenubar() const
Definition: Application.cpp:427
bool UsingNativeWindows() const
Definition: Application.cpp:332
double Now() const
Definition: Application.cpp:420
void SetWindowSystem(std::shared_ptr< WindowSystem > ws)
Definition: Application.cpp:342
void PostToMainThread(Window *window, std::function< void()> f)
Definition: Application.cpp:664
const Theme & GetTheme() const
Definition: Application.cpp:673
void OnTerminate()
Definition: Application.cpp:480
WindowSystem & GetWindowSystem() const
Definition: Application.cpp:338
virtual ~Application()
Definition: Application.cpp:258
void ShowMessageBox(const char *title, const char *message)
Definition: Application.cpp:177
void RunInThread(std::function< void()> f)
Definition: Application.cpp:658
void Run()
Does not return until the UI is completely finished.
Definition: Application.cpp:523
void SetMenubar(std::shared_ptr< Menu > menubar)
Definition: Application.cpp:431
bool RunOneTick(EnvUnlocker &unlocker, bool cleanup_if_no_windows=true)
Definition: Application.cpp:529
void AddWindow(std::shared_ptr< Window > window)
Must be called on the same thread that calls Run()
Definition: Application.cpp:450
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:699
std::shared_ptr< geometry::Image > RenderToImage(rendering::Renderer &renderer, rendering::View *view, rendering::Scene *scene, int width, int height)
Definition: Application.cpp:675
void SetFont(FontId id, const FontDescription &fd)
Definition: Application.cpp:357
void RemoveWindow(Window *window)
Definition: Application.cpp:456
static constexpr FontId DEFAULT_FONT_ID
Identifier for font used by default for all UI elements.
Definition: Application.h:57
void OnMenuItemSelected(Menu::ItemId itemId)
Delivers the itemId to the active window. Used internally.
Definition: Application.cpp:506
const char * GetResourcePath() const
Definition: Application.cpp:669
void Initialize()
Definition: Application.cpp:260
static Application & GetInstance()
Definition: Application.cpp:172
const std::vector< FontDescription > & GetFontDescriptions() const
Definition: Application.cpp:416
void Quit()
Closes all the windows, which exits as a result.
Definition: Application.cpp:474
Definition: WindowSystem.h:27
Definition: Renderer.h:55
unsigned int FontId
Definition: Gui.h:68
Definition: PinholeCameraIntrinsic.cpp:16