diff options
author | crupest <crupest@outlook.com> | 2021-11-21 16:53:10 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2021-11-21 16:53:10 +0800 |
commit | 73b90d4fe6c93a288ca6514432fe1e83ddcf4928 (patch) | |
tree | 9e97626fa23e7855f994a6c451eab65b9efc81f1 /include | |
parent | eeb1f55d5a483720441c3f44e83d02cc882a3bc0 (diff) | |
download | cru-73b90d4fe6c93a288ca6514432fe1e83ddcf4928.tar.gz cru-73b90d4fe6c93a288ca6514432fe1e83ddcf4928.tar.bz2 cru-73b90d4fe6c93a288ca6514432fe1e83ddcf4928.zip |
...
Diffstat (limited to 'include')
-rw-r--r-- | include/cru/osx/graphics/quartz/TextLayout.hpp | 5 | ||||
-rw-r--r-- | include/cru/ui/controls/TextBox.hpp | 3 |
2 files changed, 8 insertions, 0 deletions
diff --git a/include/cru/osx/graphics/quartz/TextLayout.hpp b/include/cru/osx/graphics/quartz/TextLayout.hpp index d069cc28..80c257cc 100644 --- a/include/cru/osx/graphics/quartz/TextLayout.hpp +++ b/include/cru/osx/graphics/quartz/TextLayout.hpp @@ -45,6 +45,8 @@ class OsxCTTextLayout : public OsxQuartzResource, public virtual ITextLayout { String GetDebugString() override; private: + void DoSetText(String text); + void ReleaseResource(); void RecreateFrame(); @@ -72,6 +74,9 @@ class OsxCTTextLayout : public OsxQuartzResource, public virtual ITextLayout { int line_count_; std::vector<CGPoint> line_origins_; std::vector<CTLineRef> lines_; + std::vector<float> line_ascents_; + std::vector<float> line_descents_; + std::vector<float> line_heights_; // The empty line count in the front of the lines. int head_empty_line_count_; // The trailing empty line count in the back of the lines. diff --git a/include/cru/ui/controls/TextBox.hpp b/include/cru/ui/controls/TextBox.hpp index f3925c88..baca6e3e 100644 --- a/include/cru/ui/controls/TextBox.hpp +++ b/include/cru/ui/controls/TextBox.hpp @@ -34,6 +34,9 @@ class TextBox : public NoChildControl, gsl::not_null<render::TextRenderObject*> GetTextRenderObject() override; render::ScrollRenderObject* GetScrollRenderObject() override; + bool GetMultiLine() const; + void SetMultiLine(bool value); + void ApplyBorderStyle(const style::ApplyBorderStyleInfo& style) override; private: |