(&self, x: f32, y: f32)
| 346 | } |
| 347 | |
| 348 | fn contains(&self, x: f32, y: f32) -> bool { |
| 349 | let comp = self.as_ref().borrow(); |
| 350 | |
| 351 | assert!( |
| 352 | !comp.destroyed, |
| 353 | "Widget was already destroyed but is being interacted with" |
| 354 | ); |
| 355 | |
| 356 | let inside = Helper::in_rect(x, y, comp.x, comp.y, comp.w, comp.h); |
| 357 | |
| 358 | if comp.clip.is_none() { |
| 359 | return inside; |
| 360 | } |
| 361 | |
| 362 | // if inside { |
| 363 | // if let Some(clip) = comp.clip { |
| 364 | // if let Some(widget) = clip.widget() { |
| 365 | // return widget.contains(x, y); |
| 366 | // } |
| 367 | // } |
| 368 | // } |
| 369 | // false |
| 370 | inside |
| 371 | } |
| 372 | |
| 373 | fn onclipchanged(&self) { |
| 374 | let comp = self.as_ref().borrow(); |
no test coverage detected