42 namespace visualization {
61 explicit Window(
const std::string& title,
int flags = 0);
66 Window(
const std::string& title,
74 Window(
const std::string& title,
113 void Show(
bool vis =
true);
132 void AddChild(std::shared_ptr<Widget> w);
138 std::function<
void()> callback);
176 const std::vector<std::shared_ptr<Widget>>&
GetChildren()
const;
179 enum DrawResult { NONE, REDRAW };
182 void ForceRedrawSceneWidget();
188 void* MakeDrawContextCurrent()
const;
189 void RestoreDrawContext(
void* old_context)
const;
192 static void DrawCallback(GLFWwindow* window);
193 static void ResizeCallback(GLFWwindow* window,
int os_width,
int os_height);
194 static void WindowMovedCallback(GLFWwindow* window,
int os_x,
int os_y);
195 static void RescaleCallback(GLFWwindow* window,
float xscale,
float yscale);
196 static void MouseMoveCallback(GLFWwindow* window,
double x,
double y);
197 static void MouseButtonCallback(GLFWwindow* window,
201 static void MouseScrollCallback(GLFWwindow* window,
double dx,
double dy);
202 static void KeyCallback(
203 GLFWwindow* window,
int key,
int scancode,
int action,
int mods);
204 static void CharCallback(GLFWwindow* window,
unsigned int utf32char);
205 static void DragDropCallback(GLFWwindow*,
int count,
const char* paths[]);
206 static void CloseCallback(GLFWwindow* window);
207 static void UpdateAfterEvent(
Window* w);
211 std::unique_ptr<Impl> impl_;
friend class Renderer
Definition: Window.h:52
Rect GetOSFrame() const
Definition: Window.cpp:486
Definition: Application.h:55
void ShowMessageBox(const char *title, const char *message)
Definition: Window.cpp:709
virtual ~Window()
Definition: Window.cpp:446
virtual void Layout(const Theme &theme)
Definition: Window.cpp:722
void RaiseToTop() const
Definition: Window.cpp:623
Point GlobalToWindowCoord(int global_x, int global_y)
Returns the global point (in OS pixels) in window local coordinates.
Definition: Window.cpp:590
void SetTopmost(bool topmost)
Definition: Window.cpp:156
void SetTitle(const char *title)
Definition: Window.cpp:500
virtual Size CalcPreferredSize()
Definition: Window.cpp:508
visualization::rendering::Renderer & GetRenderer() const
Definition: Window.cpp:482
void Close()
Definition: Window.cpp:608
void SetOSFrame(const Rect &r)
Definition: Window.cpp:493
void SetFocusWidget(Widget *w)
Sets.
Definition: Window.cpp:629
void CloseDialog()
Closes the dialog.
Definition: Window.cpp:686
void DestroyWindow()
Definition: Window.cpp:455
void SetNeedsLayout()
Instructs the window to relayout before the next draw.
Definition: Window.cpp:610
void SizeToFit()
Definition: Window.cpp:532
void * GetNativeDrawable(GLFWwindow *glfw_window)
Definition: NativeLinux.cpp:39
int size
Definition: FilePCD.cpp:59
void SetSize(const Size &size)
Sets the size of the window in pixels. Includes menubar on Linux.
Definition: Window.cpp:540
bool IsActiveWindow() const
Definition: Window.cpp:625
Window(const std::string &title, int flags=0)
Definition: Window.cpp:198
const Theme & GetTheme() const
Definition: Window.cpp:480
void PostRedraw()
Definition: Window.cpp:612
Definition: Renderer.h:64
const char * GetTitle() const
Definition: Window.cpp:498
bool IsVisible() const
Definition: Window.cpp:596
static const int FLAG_HIDDEN
Definition: Window.h:55
virtual void OnDragDropped(const char *path)
Definition: Window.cpp:1258
float GetScaling() const
Returns the scaling factor from OS pixels to device pixels.
Definition: Window.cpp:575
virtual void OnMenuItemSelected(Menu::ItemId item_id)
Definition: Window.cpp:734
Size GetSize() const
Definition: Window.cpp:555
int count
Definition: FilePCD.cpp:61
static const int FLAG_TOPMOST
Definition: Window.h:56
void AddChild(std::shared_ptr< Widget > w)
Definition: Window.cpp:631
Definition: PinholeCameraIntrinsic.cpp:35
void Show(bool vis=true)
Definition: Window.cpp:600
int height
Definition: FilePCD.cpp:72
void SetOnMenuItemActivated(Menu::ItemId item_id, std::function< void()> callback)
Definition: Window.cpp:636
Rect GetContentRect() const
Definition: Window.cpp:561
const std::vector< std::shared_ptr< Widget > > & GetChildren() const
Definition: Window.cpp:462
void SetOnTickEvent(std::function< bool()> callback)
Definition: Window.cpp:641
void ShowDialog(std::shared_ptr< Dialog > dlg)
Definition: Window.cpp:645
int width
Definition: FilePCD.cpp:71