From 38221428a5ea4bc71f03508dafdc6ad65ebfbea1 Mon Sep 17 00:00:00 2001 From: crupest Date: Sat, 26 Feb 2022 21:13:52 +0800 Subject: ... --- include/cru/ui/controls/TextBlock.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'include/cru/ui/controls/TextBlock.h') diff --git a/include/cru/ui/controls/TextBlock.h b/include/cru/ui/controls/TextBlock.h index dc47d00a..e43d472f 100644 --- a/include/cru/ui/controls/TextBlock.h +++ b/include/cru/ui/controls/TextBlock.h @@ -3,6 +3,7 @@ #include "../render/TextRenderObject.h" #include "TextHostControlService.h" +#include "cru/platform/graphics/Brush.h" namespace cru::ui::controls { class CRU_UI_API TextBlock : public NoChildControl, @@ -33,6 +34,14 @@ class CRU_UI_API TextBlock : public NoChildControl, bool IsSelectable() const; void SetSelectable(bool value); + std::shared_ptr GetTextBrush() const { + return text_render_object_->GetBrush(); + } + void SetTextBrush(std::shared_ptr brush) { + text_render_object_->SetBrush(std::move(brush)); + } + void SetTextColor(const Color& color); + gsl::not_null GetTextRenderObject() override; render::ScrollRenderObject* GetScrollRenderObject() override { return nullptr; -- cgit v1.2.3