diff options
Diffstat (limited to 'include/cru/win/graph/direct/TextLayout.hpp')
-rw-r--r-- | include/cru/win/graph/direct/TextLayout.hpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/include/cru/win/graph/direct/TextLayout.hpp b/include/cru/win/graph/direct/TextLayout.hpp index 40c63dbe..c53cf655 100644 --- a/include/cru/win/graph/direct/TextLayout.hpp +++ b/include/cru/win/graph/direct/TextLayout.hpp @@ -15,7 +15,7 @@ class DWriteTextLayout : public DirectGraphResource, public virtual IComResource<IDWriteTextLayout> { public: DWriteTextLayout(DirectGraphFactory* factory, std::shared_ptr<IFont> font, - std::string text); + std::u16string text); CRU_DELETE_COPY(DWriteTextLayout) CRU_DELETE_MOVE(DWriteTextLayout) @@ -28,8 +28,8 @@ class DWriteTextLayout : public DirectGraphResource, } public: - std::string GetText() override; - void SetText(std::string new_text) override; + std::u16string GetText() override; + void SetText(std::u16string new_text) override; std::shared_ptr<IFont> GetFont() override; void SetFont(std::shared_ptr<IFont> font) override; @@ -41,12 +41,11 @@ class DWriteTextLayout : public DirectGraphResource, // Return empty vector if text_range.count is 0. Text range could be in // reverse direction, it should be normalized first in implementation. std::vector<Rect> TextRangeRect(const TextRange& text_range) override; - Point TextSinglePoint(gsl::index position, bool trailing) override; + Point TextSinglePoint(Index position, bool trailing) override; TextHitTestResult HitTest(const Point& point) override; private: - std::string text_; - std::wstring w_text_; + std::u16string text_; std::shared_ptr<DWriteFont> font_; float max_width_ = std::numeric_limits<float>::max(); float max_height_ = std::numeric_limits<float>::max(); |