Skip to main content

selection_of

Function selection_of 

pub fn selection_of(widget: &(impl Widget + ?Sized)) -> Option<SharedSelection>
Expand description

The selection widget holds, if it is focused and holds one.

A widget’s own PublishesPresence::shared_selection wins. Otherwise it is derived from what the widget already publishes: its outbound presence (focused only), keyed to a resource item, gives the place; its accessibility node’s value and text selection give the excerpt. A field that hides its value from assistive technology (a password) shares nothing.