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

Method access

src/views/stack.rs:267–288  ·  view source on GitHub ↗
(
        &self,
        path: &mut IdPath,
        cx: &mut Context,
        nodes: &mut Vec<(accesskit::NodeId, accesskit::Node)>,
    )

Source from the content-addressed store, hash-verified

265 }
266
267 fn access(
268 &self,
269 path: &mut IdPath,
270 cx: &mut Context,
271 nodes: &mut Vec<(accesskit::NodeId, accesskit::Node)>,
272 ) -> Option<accesskit::NodeId> {
273 let mut c = 0;
274 let mut builder = accesskit::NodeBuilder::new(accesskit::Role::List);
275 let mut children = vec![];
276 self.children.foreach_view(&mut |child| {
277 path.push(c);
278 if let Some(id) = child.access(path, cx, nodes) {
279 children.push(id)
280 }
281 path.pop();
282 c += 1;
283 });
284 builder.set_children(children);
285 let aid = cx.view_id(path).access_id();
286 nodes.push((aid, builder.build()));
287 Some(aid)
288 }
289}
290
291impl<VT: ViewTuple, D: StackDirection> Stack<VT, D> {

Callers

nothing calls this directly

Calls 2

access_idMethod · 0.80
view_idMethod · 0.80

Tested by

no test coverage detected