From: Bowon Ryu Date: Fri, 14 May 2021 07:50:39 +0000 (+0900) Subject: Add InputFilter to TextField, TextEditor X-Git-Tag: dali_2.0.33~5^2 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=commitdiff_plain;h=0a6073b11b32d2153deb0e4a581a9314eef8ab10;hp=0a6073b11b32d2153deb0e4a581a9314eef8ab10 Add InputFilter to TextField, TextEditor Text input filter based on regular expressions. // example Property::Map filter; filter[InputFilter::Property::ACCEPTED] = "[\\d]"; filter[InputFilter::Property::REJECTED] = "[0-5]"; field.SetProperty(DevelTextField::Property::INPUT_FILTER, filter); DevelTextField::InputFilteredSignal(field).Connect(this, &OnInputFiltered); ``` void OnInputFiltered(TextField field, InputFilter::Property::Type type) { Property::Map filter = field.GetProperty(DevelTextField::Property::INPUT_FILTER); if (type == InputFilter::Property::ACCEPTED) { std::cout << "only follow character set is accepted " << filter[type] << std::endl; } else if (type == InputFilter::Property::REJECTED) { std::cout << "follow character set is rejected " << filter[type] << std::endl; } } Change-Id: Ia512438c9cb8aeb28c81f38e7b0220544a0751f0 Signed-off-by: Bowon Ryu ---