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);
173 const std::vector<std::shared_ptr<Widget>>&
GetChildren()
const;
176 enum DrawResult { NONE, REDRAW };
179 void ForceRedrawSceneWidget();
185 void* MakeDrawContextCurrent()
const;
186 void RestoreDrawContext(
void* old_context)
const;
189 static void DrawCallback(GLFWwindow* window);
190 static void ResizeCallback(GLFWwindow* window,
int os_width,
int os_height);
191 static void WindowMovedCallback(GLFWwindow* window,
int os_x,
int os_y);
192 static void RescaleCallback(GLFWwindow* window,
float xscale,
float yscale);
193 static void MouseMoveCallback(GLFWwindow* window,
double x,
double y);
194 static void MouseButtonCallback(GLFWwindow* window,
198 static void MouseScrollCallback(GLFWwindow* window,
double dx,
double dy);
199 static void KeyCallback(
200 GLFWwindow* window,
int key,
int scancode,
int action,
int mods);
201 static void CharCallback(GLFWwindow* window,
unsigned int utf32char);
202 static void DragDropCallback(GLFWwindow*,
int count,
const char* paths[]);
203 static void CloseCallback(GLFWwindow* window);
204 static void UpdateAfterEvent(
Window* w);
208 std::unique_ptr<Impl> impl_;
friend class Renderer
Definition: Window.h:52
Rect GetOSFrame() const
Definition: Window.cpp:423
Definition: Application.h:52
void ShowMessageBox(const char *title, const char *message)
Definition: Window.cpp:637
virtual ~Window()
Definition: Window.cpp:383
virtual void Layout(const Theme &theme)
Definition: Window.cpp:650
void RaiseToTop() const
Definition: Window.cpp:560
Point GlobalToWindowCoord(int global_x, int global_y)
Returns the global point (in OS pixels) in window local coordinates.
Definition: Window.cpp:527
void SetTopmost(bool topmost)
Definition: Window.cpp:156
void SetTitle(const char *title)
Definition: Window.cpp:437
virtual Size CalcPreferredSize()
Definition: Window.cpp:445
visualization::rendering::Renderer & GetRenderer() const
Definition: Window.cpp:419
void Close()
Definition: Window.cpp:545
void SetOSFrame(const Rect &r)
Definition: Window.cpp:430
void SetFocusWidget(Widget *w)
Sets.
Definition: Window.cpp:566
void CloseDialog()
Closes the dialog.
Definition: Window.cpp:623
void DestroyWindow()
Definition: Window.cpp:392
void SetNeedsLayout()
Instructs the window to relayout before the next draw.
Definition: Window.cpp:547
void SizeToFit()
Definition: Window.cpp:469
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:477
bool IsActiveWindow() const
Definition: Window.cpp:562
Window(const std::string &title, int flags=0)
Definition: Window.cpp:198
const Theme & GetTheme() const
Definition: Window.cpp:417
void PostRedraw()
Definition: Window.cpp:549
Definition: Renderer.h:65
const char * GetTitle() const
Definition: Window.cpp:435
bool IsVisible() const
Definition: Window.cpp:533
static const int FLAG_HIDDEN
Definition: Window.h:55
virtual void OnDragDropped(const char *path)
Definition: Window.cpp:1186
float GetScaling() const
Returns the scaling factor from OS pixels to device pixels.
Definition: Window.cpp:512
virtual void OnMenuItemSelected(Menu::ItemId item_id)
Definition: Window.cpp:662
Size GetSize() const
Definition: Window.cpp:492
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:568
Definition: PinholeCameraIntrinsic.cpp:35
void Show(bool vis=true)
Definition: Window.cpp:537
int height
Definition: FilePCD.cpp:72
void SetOnMenuItemActivated(Menu::ItemId item_id, std::function< void()> callback)
Definition: Window.cpp:573
Rect GetContentRect() const
Definition: Window.cpp:498
const std::vector< std::shared_ptr< Widget > > & GetChildren() const
Definition: Window.cpp:399
void SetOnTickEvent(std::function< bool()> callback)
Definition: Window.cpp:578
void ShowDialog(std::shared_ptr< Dialog > dlg)
Definition: Window.cpp:582
int width
Definition: FilePCD.cpp:71