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_;
void SetMenubar(std::shared_ptr< Menu > menubar)
const std::vector< FontDescription > & GetFontDescriptions() const
std::shared_ptr< geometry::Image > RenderToImage(rendering::Renderer &renderer, rendering::View *view, rendering::Scene *scene, int width, int height)
bool UsingNativeWindows() const
static Application & GetInstance()
static constexpr FontId DEFAULT_FONT_ID
Identifier for font used by default for all UI elements.
void SetFont(FontId id, const FontDescription &fd)
void RemoveWindow(Window *window)
void VerifyIsInitialized()
std::shared_ptr< Menu > GetMenubar() const
const char * GetResourcePath() const
WindowSystem & GetWindowSystem() const
void RunInThread(std::function< void()> f)
FontId AddFont(const FontDescription &fd)
void Run()
Does not return until the UI is completely finished.
void SetWindowSystem(std::shared_ptr< WindowSystem > ws)
void ShowMessageBox(const char *title, const char *message)
void OnMenuItemSelected(Menu::ItemId itemId)
Delivers the itemId to the active window. Used internally.
void AddWindow(std::shared_ptr< Window > window)
Must be called on the same thread that calls Run()
void Quit()
Closes all the windows, which exits as a result.
const Theme & GetTheme() const
void PostToMainThread(Window *window, std::function< void()> f)
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)
bool RunOneTick(EnvUnlocker &unlocker, bool cleanup_if_no_windows=true)
Generic file read and write utility for python interface.