* Handle text input. * @param str Text string to input. * @param marked Is the input a marked composition string from an IME? * @param caret Move the caret to this point in the insertion string. */
| 2737 | * @param caret Move the caret to this point in the insertion string. |
| 2738 | */ |
| 2739 | void HandleTextInput(std::string_view str, bool marked, std::optional<size_t> caret, std::optional<size_t> insert_location, std::optional<size_t> replacement_end) |
| 2740 | { |
| 2741 | if (!EditBoxInGlobalFocus()) return; |
| 2742 | |
| 2743 | _focused_window->InsertTextString(_focused_window->window_class == WC_CONSOLE ? 0 : _focused_window->nested_focus->GetIndex(), str, marked, caret, insert_location, replacement_end); |
| 2744 | } |
| 2745 | |
| 2746 | /** |
| 2747 | * If needed and switched on, perform auto scrolling (automatically |
no test coverage detected