From 74bb9cd27242b9320f99ff4d2b50c3051576cc14 Mon Sep 17 00:00:00 2001 From: crupest Date: Tue, 8 Feb 2022 16:53:51 +0800 Subject: ... --- include/cru/platform/graphics/TextLayout.hpp | 33 ---------------------------- 1 file changed, 33 deletions(-) delete mode 100644 include/cru/platform/graphics/TextLayout.hpp (limited to 'include/cru/platform/graphics/TextLayout.hpp') diff --git a/include/cru/platform/graphics/TextLayout.hpp b/include/cru/platform/graphics/TextLayout.hpp deleted file mode 100644 index f9ccc824..00000000 --- a/include/cru/platform/graphics/TextLayout.hpp +++ /dev/null @@ -1,33 +0,0 @@ -#pragma once -#include "Resource.hpp" - -#include -#include - -namespace cru::platform::graphics { -// Requirement: -// All text must be left-top aligned. -struct CRU_PLATFORM_GRAPHICS_API ITextLayout : virtual IGraphicsResource { - virtual String GetText() = 0; - virtual void SetText(String new_text) = 0; - - virtual std::shared_ptr GetFont() = 0; - virtual void SetFont(std::shared_ptr font) = 0; - - virtual void SetMaxWidth(float max_width) = 0; - virtual void SetMaxHeight(float max_height) = 0; - - virtual bool IsEditMode() = 0; - virtual void SetEditMode(bool enable) = 0; - - virtual Index GetLineIndexFromCharIndex(Index char_index) = 0; - virtual Index GetLineCount() = 0; - virtual float GetLineHeight(Index line_index) = 0; - - virtual Rect GetTextBounds(bool includingTrailingSpace = false) = 0; - virtual std::vector TextRangeRect(const TextRange& text_range) = 0; - // Width is always 0, height is line height. - virtual Rect TextSinglePoint(Index position, bool trailing) = 0; - virtual TextHitTestResult HitTest(const Point& point) = 0; -}; -} // namespace cru::platform::graphics -- cgit v1.2.3