From 2d6cbf8a0bb81bfe55a7d4e04d53a704f93c6b2e Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Wed, 9 Oct 2019 18:02:19 +0200 Subject: Make FileBrowser window always-on-top and try to position it inside the plugin gui window rectangle. --- plugingui/nativewindow.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'plugingui/nativewindow.h') diff --git a/plugingui/nativewindow.h b/plugingui/nativewindow.h index 3995d43..400ff57 100644 --- a/plugingui/nativewindow.h +++ b/plugingui/nativewindow.h @@ -37,6 +37,8 @@ namespace GUI { +struct Point; + //! Interface class for native window implementations. class NativeWindow { @@ -48,6 +50,9 @@ public: //! It resizes the window and disallows user resizing. virtual void setFixedSize(std::size_t width, std::size_t height) = 0; + //! Force window to stay on top of other windows + virtual void setAlwaysOnTop(bool always_on_top) = 0; + //! Set a new size of the window. virtual void resize(std::size_t width, std::size_t height) = 0; @@ -84,8 +89,12 @@ public: //! \return A queue of shared pointers to events. virtual EventQueue getEvents() = 0; - // \returns the native window handle, it HWND on Win32 or Window id on X11 + //! \returns the native window handle, it HWND on Win32 or Window id on X11 virtual void* getNativeWindowHandle() const = 0; + + //! Translate a the local native window coordinate to a global screen + //! coordinate. + virtual Point translateToScreen(const Point& point) = 0; }; } // GUI:: -- cgit v1.2.3