59 explicit Window(
const std::string& title,
int flags = 0);
64 Window(
const std::string& title,
72 Window(
const std::string& title,
111 void Show(
bool vis =
true);
130 void AddChild(std::shared_ptr<Widget> w);
160 enum DrawResult { NONE, REDRAW };
168 void* MakeDrawContextCurrent()
const;
169 void RestoreDrawContext(
void* old_context)
const;
172 static void DrawCallback(GLFWwindow* window);
173 static void ResizeCallback(GLFWwindow* window,
int os_width,
int os_height);
174 static void RescaleCallback(GLFWwindow* window,
float xscale,
float yscale);
175 static void MouseMoveCallback(GLFWwindow* window,
double x,
double y);
176 static void MouseButtonCallback(GLFWwindow* window,
180 static void MouseScrollCallback(GLFWwindow* window,
double dx,
double dy);
181 static void KeyCallback(
182 GLFWwindow* window,
int key,
int scancode,
int action,
int mods);
183 static void CharCallback(GLFWwindow* window,
unsigned int utf32char);
184 static void DragDropCallback(GLFWwindow*,
int count,
const char* paths[]);
185 static void CloseCallback(GLFWwindow* window);
186 static void UpdateAfterEvent(
Window* w);
190 std::unique_ptr<Impl> impl_;
void SetNeedsLayout()
Instructs the window to relayout before the next draw.
Definition: Window.cpp:485
void Close()
Definition: Window.cpp:483
virtual Size CalcPreferredSize()
Definition: Window.cpp:397
void PostRedraw()
Definition: Window.cpp:487
bool IsVisible() const
Definition: Window.cpp:471
virtual void OnMenuItemSelected(Menu::ItemId item_id)
Definition: Window.cpp:558
static const int FLAG_TOPMOST
Definition: Window.h:54
void SetTitle(const char *title)
Definition: Window.cpp:389
Point GlobalToWindowCoord(int global_x, int global_y)
Returns the global point (in OS pixels) in window local coordinates.
Definition: Window.cpp:465
void RaiseToTop() const
Definition: Window.cpp:489
Definition: Window.cpp:139
Window(const std::string &title, int flags=0)
Definition: Window.cpp:176
const char * GetTitle() const
Definition: Window.cpp:387
const Theme & GetTheme() const
Definition: Window.cpp:369
int size
Definition: FilePCD.cpp:57
void Show(bool vis=true)
Definition: Window.cpp:475
void SetSize(const Size &size)
Sets the size of the window in pixels. Includes menubar on Linux.
Definition: Window.cpp:420
virtual void Layout(const Theme &theme)
Definition: Window.cpp:546
void SetTopmost(bool topmost)
Definition: Renderer.h:64
float GetScaling() const
Returns the scaling factor from OS pixels to device pixels.
Definition: Window.cpp:454
void CloseDialog()
Closes the dialog.
Definition: Window.cpp:526
int count
Definition: FilePCD.cpp:59
void SizeToFit()
Definition: Window.cpp:412
Definition: Open3DViewer.h:29
void AddChild(std::shared_ptr< Widget > w)
Definition: Window.cpp:497
visualization::Renderer & GetRenderer() const
Definition: Window.cpp:371
virtual void OnDragDropped(const char *path)
Definition: Window.cpp:1030
void SetFocusWidget(Widget *w)
Sets.
Definition: Window.cpp:495
Size GetSize() const
Definition: Window.cpp:434
int height
Definition: FilePCD.cpp:70
void ShowMessageBox(const char *title, const char *message)
Definition: Window.cpp:533
void SetOSFrame(const Rect &r)
Definition: Window.cpp:382
Rect GetContentRect() const
Definition: Window.cpp:440
Rect GetOSFrame() const
Definition: Window.cpp:375
bool IsActiveWindow() const
Definition: Window.cpp:491
void ShowDialog(std::shared_ptr< Dialog > dlg)
Definition: Window.cpp:502
Definition: Application.h:40
virtual ~Window()
Definition: Window.cpp:347
void * GetNativeDrawable(GLFWwindow *glfw_window)
Definition: NativeLinux.cpp:40
int width
Definition: FilePCD.cpp:69