zng::widget

Function modal

source
pub fn modal(child: impl UiNode, enabled: impl IntoVar<bool>) -> impl UiNode
Expand description

P Only allow interaction inside the widget, descendants and ancestors.

When a widget is in modal mode, only it, descendants and ancestors are interactive. If modal_includes is set on the widget the ancestors and descendants of each include are also allowed.

Only one widget can be the modal at a time, if multiple widgets set modal = true only the last one by traversal order is actually modal.

This property also sets the accessibility modal flag.