* Get the current caret position if an edit box has the focus. * @return Top-left location of the caret, relative to the window. */ virtual */
| 377 | * @return Top-left location of the caret, relative to the window. |
| 378 | */ |
| 379 | /* virtual */ Point Window::GetCaretPosition() const |
| 380 | { |
| 381 | if (this->nested_focus != nullptr && this->nested_focus->type == WWT_EDITBOX && !this->querystrings.empty()) { |
| 382 | return this->GetQueryString(this->nested_focus->GetIndex())->GetCaretPosition(this, this->nested_focus->GetIndex()); |
| 383 | } |
| 384 | |
| 385 | Point pt = {0, 0}; |
| 386 | return pt; |
| 387 | } |
| 388 | |
| 389 | /** |
| 390 | * Get the bounding rectangle for a text range if an edit box has the focus. |
no test coverage detected