teksilo_scene/view/
widget_trait.rs1use super::*;
16
17impl Widget for SceneView {
18 fn build(&mut self, ctx: &mut BuildContext) -> Vec<WidgetId> {
19 self.build_impl(ctx)
20 }
21
22 fn layout_response(&self, proposal: SizeProposal, ctx: &LayoutContext) -> LayoutResponse {
23 self.layout_response_impl(proposal, ctx)
24 }
25
26 fn place_children(
27 &self,
28 bounds: Rect,
29 proposal: SizeProposal,
30 children: &mut [WidgetPlacement],
31 ctx: &LayoutContext,
32 ) {
33 self.place_children_impl(bounds, proposal, children, ctx)
34 }
35
36 fn paint(&self, bounds: Rect, canvas: &mut teksilo_canvas::Canvas, ctx: &PaintContext) {
37 self.paint_impl(bounds, canvas, ctx)
38 }
39
40 fn wants_post_paint(&self) -> bool {
41 self.wants_post_paint_impl()
42 }
43
44 fn post_paint(&self, bounds: Rect, canvas: &mut teksilo_canvas::Canvas, ctx: &PaintContext) {
45 self.post_paint_impl(bounds, canvas, ctx)
46 }
47
48 fn clips_children(&self) -> bool {
49 true
50 }
51
52 fn preserves_children_on_rebuild(&self) -> bool {
53 true
54 }
55
56 fn wants_descendant_redirects(&self) -> bool {
57 true
58 }
59
60 fn a11y_redirect_descendant(
61 &self,
62 self_id: WidgetId,
63 descendant: WidgetId,
64 ) -> Option<accesskit::NodeId> {
65 self.a11y_redirect_descendant_impl(self_id, descendant)
66 }
67
68 fn accessibility(&self, builder: &mut teksilo_core::accessibility::AccessNodeBuilder) {
69 self.accessibility_impl(builder)
70 }
71
72 fn as_any(&self) -> Option<&dyn std::any::Any> {
73 Some(self)
74 }
75
76 fn as_any_mut(&mut self) -> Option<&mut dyn std::any::Any> {
77 Some(self)
78 }
79}