Function zng_wgt_text::interactive_caret_visual
source ยท pub fn interactive_caret_visual(
child: impl UiNode,
visual: impl IntoVar<WidgetFn<CaretShape>>,
) -> impl UiNode
Expand description
P
Defines custom caret visual for interactive caret.
The visual
node becomes the content of a layered widget at the ADORNER+1
layer, the text widget context is
propagated so contextual variables and value work seamless inside the node.
The visual
node must set one special value during layout, the set_interactive_caret_spot
must be called to
set the offset to the middle of the caret line in the visual inner-bounds, this is used to position the caret.
Sets the INTERACTIVE_CARET_VISUAL_VAR
.