| 218 | } |
| 219 | |
| 220 | void OnPaint() override |
| 221 | { |
| 222 | /* Start the timeout if not already started and the message is not critical. This is handled during OnPaint so that any delay between |
| 223 | * creating the window and displaying it does not affect how long the message is visible. */ |
| 224 | if (!this->is_critical && this->display_timeout.HasFired()) { |
| 225 | this->display_timeout.Reset(); |
| 226 | } |
| 227 | |
| 228 | this->Window::OnPaint(); |
| 229 | } |
| 230 | |
| 231 | void OnMouseLoop() override |
| 232 | { |