* Get tooptip for a given point on the line. * @param r Rect of line. * @param pt Point of interest. * @return EncodedString of tooltip, or \c std::nullopt if none. */
| 1426 | * @return EncodedString of tooltip, or \c std::nullopt if none. |
| 1427 | */ |
| 1428 | virtual std::optional<EncodedString> GetTooltip(Rect r, const Point &pt) const |
| 1429 | { |
| 1430 | ButtonCommon *button = this->GetButton(r, pt); |
| 1431 | if (button == nullptr) return {}; |
| 1432 | return GetEncodedString(button->tooltip); |
| 1433 | } |
| 1434 | |
| 1435 | protected: |
| 1436 | /** |
no test coverage detected