diff options
author | crupest <crupest@outlook.com> | 2022-02-11 17:46:20 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2022-02-11 17:46:20 +0800 |
commit | 2fd37d41bb804a06acc8e2d341d5ce5d8370184b (patch) | |
tree | 4a87909043189928c38ee325377ee600d5321b19 /include/cru/ui/controls/TextBox.h | |
parent | 85746e9f053432bdcfb99b21997efa040eac1bc3 (diff) | |
download | cru-2fd37d41bb804a06acc8e2d341d5ce5d8370184b.tar.gz cru-2fd37d41bb804a06acc8e2d341d5ce5d8370184b.tar.bz2 cru-2fd37d41bb804a06acc8e2d341d5ce5d8370184b.zip |
...
Diffstat (limited to 'include/cru/ui/controls/TextBox.h')
-rw-r--r-- | include/cru/ui/controls/TextBox.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/cru/ui/controls/TextBox.h b/include/cru/ui/controls/TextBox.h index 94a1ac0c..3e041880 100644 --- a/include/cru/ui/controls/TextBox.h +++ b/include/cru/ui/controls/TextBox.h @@ -32,6 +32,14 @@ class CRU_UI_API TextBox : public NoChildControl, void ApplyBorderStyle(const style::ApplyBorderStyleInfo& style) override; + String GetText() const { return service_->GetText(); } + StringView GetTextView() const { return service_->GetTextView(); } + void SetText(String text) { service_->SetText(std::move(text)); } + + IEvent<std::nullptr_t>* TextChangeEvent() { + return service_->TextChangeEvent(); + } + private: std::unique_ptr<render::BorderRenderObject> border_render_object_; std::unique_ptr<render::ScrollRenderObject> scroll_render_object_; |