MCPcopy Create free account
hub / github.com/audulus/rui / process

Method process

src/views/stack.rs:49–64  ·  view source on GitHub ↗
(
        &self,
        event: &Event,
        path: &mut IdPath,
        cx: &mut Context,
        actions: &mut Vec<Box<dyn Any>>,
    )

Source from the content-addressed store, hash-verified

47
48impl<VT: ViewTuple + 'static, D: StackDirection + 'static> DynView for Stack<VT, D> {
49 fn process(
50 &self,
51 event: &Event,
52 path: &mut IdPath,
53 cx: &mut Context,
54 actions: &mut Vec<Box<dyn Any>>,
55 ) {
56 let mut c = self.children.len() as i64 - 1;
57 self.children.foreach_view_rev(&mut |child| {
58 path.push(c as u64);
59 let offset = cx.get_layout(path).offset;
60 (*child).process(&event.offset(-offset), path, cx, actions);
61 path.pop();
62 c -= 1;
63 })
64 }
65
66 fn draw(&self, path: &mut IdPath, args: &mut DrawArgs) {
67 let mut c = 0;

Callers

nothing calls this directly

Calls 3

lenMethod · 0.80
get_layoutMethod · 0.80
offsetMethod · 0.45

Tested by

no test coverage detected