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
Definition: FilamentRenderer.cpp:182
ImGuiContext * context
Definition: Window.cpp:76
Definition: Application.h:39
WindowSystem::OSWindow GetOSWindow() const
Definition: Window.cpp:701
void SetOnMenuItemActivated(Menu::ItemId item_id, std::function< void()> callback)
Definition: Window.cpp:602
const Theme & GetTheme() const
Definition: Window.cpp:445
void OnMouseEvent(const MouseEvent &e)
Definition: Window.cpp:1034
void CloseDialog()
Closes the dialog.
Definition: Window.cpp:648
void SetTitle(const char *title)
Definition: Window.cpp:466
void SetOnKeyEvent(std::function< bool(const KeyEvent &)> callback)
Definition: Window.cpp:615
void PostRedraw()
Definition: Window.cpp:573
void SetTopmost(bool topmost)
LayoutContext GetLayoutContext()
Definition: Window.cpp:679
void SetOnClose(std::function< bool()> callback)
Definition: Window.cpp:611
void AddChild(std::shared_ptr< Widget > w)
Definition: Window.cpp:597
const char * GetTitle() const
Definition: Window.cpp:464
void SetOSFrame(const Rect &r)
Definition: Window.cpp:458
std::string GetWebRTCUID() const
Definition: Window.cpp:418
friend class Renderer
Definition: Window.h:32
void ShowMessageBox(const char *title, const char *message)
Definition: Window.cpp:661
void ShowDialog(std::shared_ptr< Dialog > dlg)
Definition: Window.cpp:619
virtual void Layout(const LayoutContext &context)
Definition: Window.cpp:681
virtual void OnDragDropped(const char *path)
Definition: Window.cpp:1224
Size GetSize() const
Definition: Window.cpp:521
virtual Size CalcPreferredSize()
Definition: Window.cpp:475
int GetMouseMods() const
Definition: Window.cpp:416
void SetSize(const Size &size)
Sets the size of the window in pixels. Includes menubar on Linux.
Definition: Window.cpp:508
static const int FLAG_HIDDEN
Definition: Window.h:35
void Show(bool vis=true)
Definition: Window.cpp:554
visualization::rendering::Renderer & GetRenderer() const
Definition: Window.cpp:447
void OnResize()
Definition: Window.cpp:956
Rect GetOSFrame() const
Definition: Window.cpp:451
void Close()
Definition: Window.cpp:559
Point GlobalToWindowCoord(int global_x, int global_y)
Returns the global point (in OS pixels) in window local coordinates.
Definition: Window.cpp:543
void RaiseToTop() const
Definition: Window.cpp:585
const std::vector< std::shared_ptr< Widget > > & GetChildren() const
Definition: Window.cpp:431
void OnDraw()
Definition: Window.cpp:925
void SetNeedsLayout()
Instructs the window to relayout before the next draw.
Definition: Window.cpp:571
void DestroyWindow()
Definition: Window.cpp:409
bool IsVisible() const
Definition: Window.cpp:549
void OnTickEvent(const TickEvent &e)
Definition: Window.cpp:1204
bool IsActiveWindow() const
Definition: Window.cpp:590
void SetOnTickEvent(std::function< bool()> callback)
Definition: Window.cpp:607
static const int FLAG_TOPMOST
Definition: Window.h:36
float GetScaling() const
Returns the scaling factor from OS pixels to device pixels.
Definition: Window.cpp:538
virtual void OnMenuItemSelected(Menu::ItemId item_id)
Definition: Window.cpp:693
Rect GetContentRect() const
Definition: Window.cpp:526
void SetFocusWidget(Widget *w)
Sets.
Definition: Window.cpp:595
Window(const std::string &title, int flags=0)
Definition: Window.cpp:237
void ShowMenu(bool show)
Definition: Window.cpp:674
void OnTextInput(const TextInputEvent &e)
Definition: Window.cpp:1195
virtual ~Window()
Definition: Window.cpp:400
void SizeToFit()
Definition: Window.cpp:500
void OnKeyEvent(const KeyEvent &e)
Definition: Window.cpp:1154
void * OSWindow
Definition: WindowSystem.h:29
Definition: Renderer.h:55
Definition: PinholeCameraIntrinsic.cpp:16
Definition: Window.cpp:192