virtual */
| 502 | } |
| 503 | |
| 504 | /* virtual */ void TextfileWindow::OnClick([[maybe_unused]] Point pt, WidgetID widget, [[maybe_unused]] int click_count) |
| 505 | { |
| 506 | switch (widget) { |
| 507 | case WID_TF_WRAPTEXT: |
| 508 | this->ToggleWidgetLoweredState(WID_TF_WRAPTEXT); |
| 509 | this->InvalidateData(); |
| 510 | break; |
| 511 | |
| 512 | case WID_TF_JUMPLIST: { |
| 513 | DropDownList list; |
| 514 | for (size_t line : this->jumplist) { |
| 515 | list.push_back(MakeDropDownListStringItem(GetString(STR_TEXTFILE_JUMPLIST_ITEM, this->lines[line].text), (int)line)); |
| 516 | } |
| 517 | ShowDropDownList(this, std::move(list), -1, widget); |
| 518 | break; |
| 519 | } |
| 520 | |
| 521 | case WID_TF_NAVBACK: |
| 522 | this->NavigateHistory(-1); |
| 523 | break; |
| 524 | |
| 525 | case WID_TF_NAVFORWARD: |
| 526 | this->NavigateHistory(+1); |
| 527 | break; |
| 528 | |
| 529 | case WID_TF_BACKGROUND: { |
| 530 | const Hyperlink *link = this->GetHyperlink(pt); |
| 531 | if (link != nullptr) this->OnHyperlinkClick(*link); |
| 532 | break; |
| 533 | } |
| 534 | } |
| 535 | } |
| 536 | |
| 537 | /* virtual */ bool TextfileWindow::OnTooltip([[maybe_unused]] Point pt, WidgetID widget, TooltipCloseCondition close_cond) |
| 538 | { |
nothing calls this directly
no test coverage detected