22 namespace visualization {
41 explicit Window(
const std::string& title,
int flags = 0);
46 Window(
const std::string& title,
54 Window(
const std::string& title,
93 void Show(
bool vis =
true);
112 void AddChild(std::shared_ptr<Widget> w);
180 const std::vector<std::shared_ptr<Widget>>&
GetChildren()
const;
194 void CreateRenderer();
196 void* MakeDrawContextCurrent()
const;
197 void RestoreDrawContext(
void* old_context)
const;
201 std::unique_ptr<Impl> impl_;
std::function< void(std::shared_ptr< core::Tensor >)> callback
void SetFocusWidget(Widget *w)
Sets.
const std::vector< std::shared_ptr< Widget > > & GetChildren() const
static const int FLAG_TOPMOST
bool IsActiveWindow() const
void SetNeedsLayout()
Instructs the window to relayout before the next draw.
void OnTickEvent(const TickEvent &e)
void OnTextInput(const TextInputEvent &e)
static const int FLAG_HIDDEN
const Theme & GetTheme() const
std::string GetWebRTCUID() const
Window(const std::string &title, int flags=0)
Point GlobalToWindowCoord(int global_x, int global_y)
Returns the global point (in OS pixels) in window local coordinates.
void SetSize(const Size &size)
Sets the size of the window in pixels. Includes menubar on Linux.
virtual Size CalcPreferredSize()
void SetTopmost(bool topmost)
const char * GetTitle() const
void AddChild(std::shared_ptr< Widget > w)
WindowSystem::OSWindow GetOSWindow() const
void SetOnMenuItemActivated(Menu::ItemId item_id, std::function< void()> callback)
Rect GetContentRect() const
void SetOnKeyEvent(std::function< bool(const KeyEvent &)> callback)
visualization::rendering::Renderer & GetRenderer() const
void SetTitle(const char *title)
virtual void Layout(const LayoutContext &context)
void SetOSFrame(const Rect &r)
void ShowDialog(std::shared_ptr< Dialog > dlg)
void OnKeyEvent(const KeyEvent &e)
void SetOnTickEvent(std::function< bool()> callback)
LayoutContext GetLayoutContext()
void CloseDialog()
Closes the dialog.
void ShowMessageBox(const char *title, const char *message)
float GetScaling() const
Returns the scaling factor from OS pixels to device pixels.
void SetOnClose(std::function< bool()> callback)
virtual void OnMenuItemSelected(Menu::ItemId item_id)
void OnMouseEvent(const MouseEvent &e)
virtual void OnDragDropped(const char *path)
static const std::string path
Generic file read and write utility for python interface.