diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/cru/osx/gui/Window.hpp | 7 | ||||
-rw-r--r-- | include/cru/platform/GraphicsBase.hpp | 5 |
2 files changed, 11 insertions, 1 deletions
diff --git a/include/cru/osx/gui/Window.hpp b/include/cru/osx/gui/Window.hpp index 1e790a65..6bb6b747 100644 --- a/include/cru/osx/gui/Window.hpp +++ b/include/cru/osx/gui/Window.hpp @@ -1,5 +1,6 @@ #pragma once #include "Resource.hpp" +#include "cru/platform/gui/Base.hpp" #include "cru/platform/gui/Window.hpp" #include <memory> @@ -15,7 +16,8 @@ class OsxWindow : public OsxGuiResource, public INativeWindow { friend details::OsxWindowPrivate; public: - explicit OsxWindow(OsxUiApplication* ui_application); + OsxWindow(OsxUiApplication* ui_application, INativeWindow* parent, + bool frame); CRU_DELETE_COPY(OsxWindow) CRU_DELETE_MOVE(OsxWindow) @@ -62,6 +64,9 @@ class OsxWindow : public OsxGuiResource, public INativeWindow { IInputMethodContext* GetInputMethodContext() override; private: + void CreateWindow(); + + private: std::unique_ptr<details::OsxWindowPrivate> p_; }; } // namespace cru::platform::gui::osx diff --git a/include/cru/platform/GraphicsBase.hpp b/include/cru/platform/GraphicsBase.hpp index e7201ec0..aee718a1 100644 --- a/include/cru/platform/GraphicsBase.hpp +++ b/include/cru/platform/GraphicsBase.hpp @@ -182,6 +182,11 @@ struct Rect final { return Point(left + width / 2.0f, top + height / 2.0f); } + constexpr void SetSize(const Size& size) { + width = size.width; + height = size.height; + } + constexpr Size GetSize() const { return Size(width, height); } constexpr Rect Expand(const Thickness& thickness) const { |