* Insert a text string at the cursor position into the edit box widget. * @param wid Edit box widget. * @param str Text string to insert. */ virtual */
| 2720 | * @param str Text string to insert. |
| 2721 | */ |
| 2722 | /* virtual */ void Window::InsertTextString(WidgetID wid, std::string_view str, bool marked, std::optional<size_t> caret, std::optional<size_t> insert_location, std::optional<size_t> replacement_end) |
| 2723 | { |
| 2724 | QueryString *query = this->GetQueryString(wid); |
| 2725 | if (query == nullptr) return; |
| 2726 | |
| 2727 | if (query->text.InsertString(str, marked, caret, insert_location, replacement_end) || marked) { |
| 2728 | this->SetWidgetDirty(wid); |
| 2729 | this->OnEditboxChanged(wid); |
| 2730 | } |
| 2731 | } |
| 2732 | |
| 2733 | /** |
| 2734 | * Handle text input. |
no test coverage detected