diff options
author | crupest <crupest@outlook.com> | 2018-11-09 22:59:38 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2018-11-09 22:59:38 +0800 |
commit | ac4b0f8d438e7a7c2ecd836af8332b5da1e035c9 (patch) | |
tree | e5b886f1884fa56dd90059523b1f4dc730bb5003 /src/ui/controls/text_block.hpp | |
parent | 4b219b569c16db6027dd36e4656152f261321c60 (diff) | |
download | cru-ac4b0f8d438e7a7c2ecd836af8332b5da1e035c9.tar.gz cru-ac4b0f8d438e7a7c2ecd836af8332b5da1e035c9.tar.bz2 cru-ac4b0f8d438e7a7c2ecd836af8332b5da1e035c9.zip |
Add predefine resource.
Diffstat (limited to 'src/ui/controls/text_block.hpp')
-rw-r--r-- | src/ui/controls/text_block.hpp | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/src/ui/controls/text_block.hpp b/src/ui/controls/text_block.hpp index b2b4aaf9..4d017da5 100644 --- a/src/ui/controls/text_block.hpp +++ b/src/ui/controls/text_block.hpp @@ -9,23 +9,15 @@ namespace cru::ui::controls public: static constexpr auto control_type = L"TextBlock"; - static TextBlock* Create( - const String& text = L"", - const Microsoft::WRL::ComPtr<IDWriteTextFormat>& init_text_format = nullptr, - const Microsoft::WRL::ComPtr<ID2D1Brush>& init_brush = nullptr) + static TextBlock* Create(const String& text = L"") { - const auto text_block = new TextBlock(init_text_format, init_brush); + const auto text_block = new TextBlock(); text_block->SetText(text); return text_block; } - using TextControl::SetSelectable; // Make this public. - protected: - TextBlock( - const Microsoft::WRL::ComPtr<IDWriteTextFormat>& init_text_format, - const Microsoft::WRL::ComPtr<ID2D1Brush>& init_brush - ); + TextBlock(); public: TextBlock(const TextBlock& other) = delete; TextBlock(TextBlock&& other) = delete; @@ -34,5 +26,7 @@ namespace cru::ui::controls ~TextBlock() override = default; StringView GetControlType() const override final; + + using TextControl::SetSelectable; // Make this public. }; } |