diff options
author | crupest <crupest@outlook.com> | 2022-02-26 21:13:52 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2022-02-26 21:13:52 +0800 |
commit | 38221428a5ea4bc71f03508dafdc6ad65ebfbea1 (patch) | |
tree | 3248edb39faf98aa19647f30477bcc6cf734ebb3 /include/cru/ui/controls | |
parent | 8da596f7b5fdbcf11fbda4aa66efc87a219f58ae (diff) | |
download | cru-38221428a5ea4bc71f03508dafdc6ad65ebfbea1.tar.gz cru-38221428a5ea4bc71f03508dafdc6ad65ebfbea1.tar.bz2 cru-38221428a5ea4bc71f03508dafdc6ad65ebfbea1.zip |
...
Diffstat (limited to 'include/cru/ui/controls')
-rw-r--r-- | include/cru/ui/controls/TextBlock.h | 9 |
1 files changed, 9 insertions, 0 deletions
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<platform::graphics::IBrush> GetTextBrush() const { + return text_render_object_->GetBrush(); + } + void SetTextBrush(std::shared_ptr<platform::graphics::IBrush> brush) { + text_render_object_->SetBrush(std::move(brush)); + } + void SetTextColor(const Color& color); + gsl::not_null<render::TextRenderObject*> GetTextRenderObject() override; render::ScrollRenderObject* GetScrollRenderObject() override { return nullptr; |