diff options
Diffstat (limited to 'include/cru/ui/controls/TextBlock.h')
-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; |