diff options
author | Yuqian Yang <crupest@crupest.life> | 2025-10-17 12:06:14 +0800 |
---|---|---|
committer | Yuqian Yang <crupest@crupest.life> | 2025-10-17 12:06:14 +0800 |
commit | 32aa6f116acc6e3e20a1ec76cef45b29f7005ad7 (patch) | |
tree | 892b71060a88b58d9293d78033000b05818783df /include/cru/ui/components/Input.h | |
parent | faf77949e19dc0d01f75bf8abb783eda70328048 (diff) | |
download | cru-32aa6f116acc6e3e20a1ec76cef45b29f7005ad7.tar.gz cru-32aa6f116acc6e3e20a1ec76cef45b29f7005ad7.tar.bz2 cru-32aa6f116acc6e3e20a1ec76cef45b29f7005ad7.zip |
Remove String stage 1.
Diffstat (limited to 'include/cru/ui/components/Input.h')
-rw-r--r-- | include/cru/ui/components/Input.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/include/cru/ui/components/Input.h b/include/cru/ui/components/Input.h index e808afd7..0f077983 100644 --- a/include/cru/ui/components/Input.h +++ b/include/cru/ui/components/Input.h @@ -5,17 +5,17 @@ namespace cru::ui::components { struct CRU_UI_API InputValidateResult { bool valid; - String message; + std::string message; }; struct CRU_UI_API IInputValidator : public virtual Interface { - virtual InputValidateResult Validate(StringView text) const = 0; + virtual InputValidateResult Validate(std::string_view text) const = 0; }; struct CRU_UI_API InputChangeEventArgs { - String text; + std::string text; bool valid; - String message; + std::string message; }; class CRU_UI_API Input : public Component { @@ -26,8 +26,8 @@ class CRU_UI_API Input : public Component { public: controls::Control* GetRootControl() override; - String GetText() const; - void SetText(String text); + std::string GetText() const; + void SetText(std::string text); IInputValidator* GetValidator() const; void SetValidator(IInputValidator* validator); @@ -48,7 +48,7 @@ class CRU_UI_API Input : public Component { class CRU_UI_API FloatInputValidator : public Object, public virtual IInputValidator { public: - InputValidateResult Validate(StringView text) const override; + InputValidateResult Validate(std::string_view text) const override; std::optional<float> min; std::optional<float> max; |