From b6db663269201fa14a6a4aa1b9042645a9e8f859 Mon Sep 17 00:00:00 2001 From: crupest Date: Fri, 24 May 2019 23:45:58 +0800 Subject: ... --- include/cru/win/graph/win_text_layout.hpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'include/cru/win/graph/win_text_layout.hpp') diff --git a/include/cru/win/graph/win_text_layout.hpp b/include/cru/win/graph/win_text_layout.hpp index b861fda7..7339eff9 100644 --- a/include/cru/win/graph/win_text_layout.hpp +++ b/include/cru/win/graph/win_text_layout.hpp @@ -6,12 +6,12 @@ #include namespace cru::win::graph { -class GraphManager; +struct IWinNativeFactory; class WinFontDescriptor; -class WinTextLayout : public Object, public virtual platform::graph::TextLayout { +class WinTextLayout : public Object, public virtual platform::graph::ITextLayout { public: - explicit WinTextLayout(GraphManager* graph_manager, + explicit WinTextLayout(IWinNativeFactory* factory, std::shared_ptr font, std::wstring text); WinTextLayout(const WinTextLayout& other) = delete; WinTextLayout(WinTextLayout&& other) = delete; @@ -21,8 +21,8 @@ class WinTextLayout : public Object, public virtual platform::graph::TextLayout std::wstring GetText() override; void SetText(std::wstring new_text) override; - std::shared_ptr GetFont(); - void SetFont(std::shared_ptr font); + std::shared_ptr GetFont(); + void SetFont(std::shared_ptr font); void SetMaxWidth(float max_width) override; void SetMaxHeight(float max_height) override; ui::Rect GetTextBounds() override; @@ -32,7 +32,7 @@ class WinTextLayout : public Object, public virtual platform::graph::TextLayout IDWriteTextLayout* GetDWriteTextLayout() const { return text_layout_.Get(); } private: - GraphManager* graph_manager_; + IWinNativeFactory* factory_; std::wstring text_; std::shared_ptr font_descriptor_; float max_width_ = 0.0f; -- cgit v1.2.3