| 24 | void TextField::focus() { core<TextField::Core>()->focus(); } |
| 25 | |
| 26 | void TextField::bindViewCore() |
| 27 | { |
| 28 | View::bindViewCore(); |
| 29 | if (auto core = View::core<TextField::Core>()) { |
| 30 | core->text.bind(text); |
| 31 | core->autocorrectionType.bind(autocorrectionType); |
| 32 | core->returnKeyType.bind(returnKeyType); |
| 33 | core->placeholder.bind(placeholder); |
| 34 | core->textInputType.bind(textInputType); |
| 35 | core->obscureInput.bind(obscureInput); |
| 36 | |
| 37 | _submitCallbackReceiver = core->submitCallback.set([=]() { |
| 38 | SubmitEvent evt(shared_from_this()); |
| 39 | onSubmit().notify(evt); |
| 40 | }); |
| 41 | } |
| 42 | } |
| 43 | |
| 44 | void TextField::updateFromStylesheet() |
| 45 | { |