(&self, path: &mut IdPath, args: &mut DrawArgs)
| 64 | } |
| 65 | |
| 66 | fn draw(&self, path: &mut IdPath, args: &mut DrawArgs) { |
| 67 | let mut c = 0; |
| 68 | self.children.foreach_view(&mut |child| { |
| 69 | path.push(c); |
| 70 | let layout_box = args.cx.get_layout(path); |
| 71 | |
| 72 | args.vger.save(); |
| 73 | |
| 74 | args.vger.translate(layout_box.offset); |
| 75 | |
| 76 | (*child).draw(path, args); |
| 77 | c += 1; |
| 78 | |
| 79 | if DEBUG_LAYOUT { |
| 80 | let paint = args.vger.color_paint(CONTROL_BACKGROUND); |
| 81 | args.vger.stroke_rect( |
| 82 | layout_box.rect.min(), |
| 83 | layout_box.rect.max(), |
| 84 | 0.0, |
| 85 | 1.0, |
| 86 | paint, |
| 87 | ); |
| 88 | } |
| 89 | |
| 90 | path.pop(); |
| 91 | |
| 92 | args.vger.restore(); |
| 93 | }) |
| 94 | } |
| 95 | |
| 96 | fn layout(&self, path: &mut IdPath, args: &mut LayoutArgs) -> LocalSize { |
| 97 | let n = self.children.len() as f32; |
nothing calls this directly
no test coverage detected