diff options
Diffstat (limited to 'include/cru/ui/render/text_render_object.hpp')
-rw-r--r-- | include/cru/ui/render/text_render_object.hpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/cru/ui/render/text_render_object.hpp b/include/cru/ui/render/text_render_object.hpp index 5394ee0a..33d34f78 100644 --- a/include/cru/ui/render/text_render_object.hpp +++ b/include/cru/ui/render/text_render_object.hpp @@ -1,6 +1,8 @@ #pragma once #include "render_object.hpp" +#include "cru/platform/graph/text_layout.hpp" + #include <memory> #include <string> @@ -8,7 +10,6 @@ namespace cru::platform::graph { struct IBrush; struct IFont; -struct ITextLayout; } // namespace cru::platform::graph namespace cru::ui::render { @@ -34,6 +35,10 @@ class TextRenderObject : public RenderObject { std::shared_ptr<platform::graph::IFont> GetFont() const; void SetFont(std::shared_ptr<platform::graph::IFont> font); + std::vector<Rect> TextRangeRect(const TextRange& text_range); + Point TextSingleRect(int position, bool trailing); + platform::graph::TextHitTestResult TextHitTest(const Point& point); + std::optional<TextRange> GetSelectionRange() const { return selection_range_; } |