Add a clear-focus()function on all elements that have a focus() function

This is the counter-part, which removes focus from the element if it's currently focused. The window - if focused - may still be focused towards the windowing system.
This commit is contained in:
Simon Hausmann 2024-04-24 16:45:47 +02:00 committed by Simon Hausmann
parent e10e97c944
commit 31767eb6ab
21 changed files with 268 additions and 23 deletions

View file

@ -19,6 +19,7 @@ shortcut will be implemented in a future version: <https://github.com/slint-ui/s
### Functions
- **`focus()`** Call this function to focus the TextEdit and make it receive future keyboard events.
- **`clear-focus()`** Call this function to remove keyboard focus from this `TextEdit` if it currently has the focus.
- **`set-selection-offsets(int, int)`** Selects the text between two UTF-8 offsets.
- **`select-all()`** Selects all text.
- **`clear-selection()`** Clears the selection.