Get the top most control under the given point, or None if there is none (or is the canvas itself)
(&self, x: f32, y: f32)
| 166 | |
| 167 | /// Get the top most control under the given point, or None if there is none (or is the canvas itself) |
| 168 | pub fn topmost_at_point(&self, x: f32, y: f32) -> Option<&Box<dyn Element>> { |
| 169 | if let Some(control) = self.topmost_child_at_point(x, y) { |
| 170 | // control is not this canvas |
| 171 | if control.id() != self.id() { |
| 172 | return Some(control); |
| 173 | } |
| 174 | } |
| 175 | |
| 176 | None |
| 177 | } |
| 178 | |
| 179 | //Internal |
| 180 |
no test coverage detected