Skip to main content

Interaction

Struct Interaction 

Source
pub struct Interaction {
    pub hovered: Option<Target>,
    pub focused: Option<Target>,
    pub pressed: Option<Target>,
    pub editor: Option<TextEdit>,
    /* private fields */
}

Fields§

§hovered: Option<Target>§focused: Option<Target>§pressed: Option<Target>§editor: Option<TextEdit>

Implementations§

Source§

impl Interaction

Source

pub fn begin_text_composition(&mut self, scene: &Node, id: u64) -> bool

Source

pub fn update_text_composition( &mut self, scene: &Node, id: u64, text: String, ) -> bool

Source

pub fn finish_text_composition(&mut self, scene: &Node, id: u64) -> (bool, bool)

Source

pub fn cancel_text_composition(&mut self, id: Option<u64>) -> bool

Source§

impl Interaction

Source

pub fn begin_pointer_sequence( &self, scene: &Node, layout: &LayoutNode, point: Point, event: PointerEvent, now: Instant, ) -> Option<(PointerSequence, PointerDelivery)>

Source

pub fn direct_pointer_claimed(&self) -> bool

Source

pub fn owns_pointer_press(&self, target: &Target) -> bool

Source

pub fn cancel_pointer_activation(&mut self, target: &Target)

Source

pub fn wheel_route( &self, scene: &Node, layout: &LayoutNode, event: WheelEvent, ) -> Option<WheelRoute>

Source

pub fn update_tooltip( &mut self, scene: &Node, layout: &LayoutNode, now: Instant, ) -> bool

Source

pub fn tooltip_deadline(&self) -> Option<Instant>

Source

pub fn dismiss_tooltip(&mut self) -> bool

Source

pub fn tooltip_popup<'a>( &self, scene: &'a Node, layout: &LayoutNode, ) -> Option<TooltipPopup<'a>>

Source

pub fn overlay_layers<'a>( &'a self, layout: &'a LayoutNode, ) -> impl DoubleEndedIterator<Item = &'a [usize]> + 'a

Source

pub fn dialog_layers<'a>( &'a self, layout: &'a LayoutNode, ) -> impl DoubleEndedIterator<Item = &'a [usize]> + 'a

Source

pub fn allows_popup(&self, layout: &LayoutNode, path: &[usize]) -> bool

Source

pub fn arm_drag(&mut self, scene: &Node, layout: &LayoutNode, point: Point)

Source

pub fn drag_motion( &mut self, scene: &Node, layout: &LayoutNode, point: Point, requested: Option<DragAction>, ) -> DragUpdate

Source

pub fn finish_drag( &mut self, scene: &Node, layout: &LayoutNode, point: Point, requested: Option<DragAction>, ) -> DragUpdate

Source

pub fn cancel_drag(&mut self) -> DragUpdate

Source

pub fn reconcile_drag( &mut self, scene: &Node, layout: &LayoutNode, requested: Option<DragAction>, ) -> DragUpdate

Source

pub fn drag_position(&self) -> Option<Point>

Source

pub fn drag_action(&self) -> Option<DragAction>

Source

pub fn is_drop_target(&self, node: &Node, path: &[usize]) -> bool

Source

pub fn file_drop_scope(&self, layout: &LayoutNode) -> FileDropScope

Source

pub fn file_drag_event( &mut self, scene: &Node, layout: &LayoutNode, input: FileDragInput, ) -> DragUpdate

Source

pub fn reconcile_file_drag( &mut self, scene: &Node, layout: &LayoutNode, ) -> DragUpdate

Source

pub fn clear_file_drag(&mut self)

Source

pub fn popup_outside_press( &self, scene: &Node, layout: &LayoutNode, ) -> Option<ControlInput>

Source

pub fn dialog_button( &self, scene: &Node, layout: &LayoutNode, target: &Target, ) -> Option<ControlInput>

Source

pub fn dialog_accept( &self, scene: &Node, layout: &LayoutNode, ) -> Option<ControlInput>

Source

pub fn dialog_escape( &self, scene: &Node, layout: &LayoutNode, ) -> Option<ControlInput>

Source

pub fn dialog_pointer_press(&mut self, layout: &LayoutNode) -> bool

Keep focus on the dialog when pressing its backdrop or empty panel area.

Source

pub fn dialog_pointer_release( &mut self, scene: &Node, layout: &LayoutNode, ) -> Option<ControlInput>

Source

pub fn menu_open(&self) -> bool

Source

pub fn dismiss_menu(&mut self)

Source

pub fn close_menu(&mut self, scene: &Node, layout: &LayoutNode)

Source

pub fn menu_panels<'a>( &'a self, scene: &'a Node, layout: &LayoutNode, ) -> Vec<MenuPanel<'a>>

Source

pub fn menu_trigger(&self) -> Option<&Target>

Source

pub fn accessibility_menu_entry( &mut self, scene: &Node, layout: &LayoutNode, trigger: &Target, entry: &MenuEntry, activate: bool, ) -> Option<ControlInput>

Source

pub fn menu_header_open(&self, path: &[usize]) -> bool

Source

pub fn accessibility_close_menu( &mut self, scene: &Node, layout: &LayoutNode, trigger: &Target, path: &[usize], session: u64, )

Source

pub fn menu_shortcut( &self, scene: &Node, layout: &LayoutNode, key: MenuShortcut, ) -> Option<ControlInput>

Source

pub fn shortcut_press( &mut self, scene: &Node, layout: &LayoutNode, key: MenuShortcut, repeat: bool, now: Instant, ) -> ShortcutOutcome

Source

pub fn cancel_shortcut_sequence(&mut self)

Source

pub fn pointer_hover_target( &self, scene: &Node, layout: &LayoutNode, ) -> Option<Target>

Source

pub fn scale_rotate_target_at( &self, scene: &Node, layout: &LayoutNode, point: Point, ) -> Option<ScaleRotateTarget>

Source

pub fn window_gestures_allowed(&self, scene: &Node, layout: &LayoutNode) -> bool

Source

pub fn window_resize_edge( &self, scene: &Node, layout: &LayoutNode, ) -> Option<WindowResizeEdge>

Hit the opt-in client resize border without covering interactive content.

Source

pub fn arm_window_move(&mut self, scene: &Node, layout: &LayoutNode) -> bool

Source

pub fn take_window_move( &mut self, scene: &Node, layout: &LayoutNode, point: Point, ) -> bool

Source

pub fn cancel_window_move(&mut self) -> bool

Source

pub fn sync_stack_transitions(&mut self, transitions: &StackTransitions) -> bool

Synchronize the pointer gate with the presentation state before reconciling input.

Source

pub fn pointer_on_stack_slide(&self) -> bool

Source

pub fn open_menu_bar( &mut self, scene: &Node, layout: &LayoutNode, target: Target, ) -> bool

Source

pub fn open_context_menu( &mut self, scene: &Node, layout: &LayoutNode, keyboard: bool, ) -> bool

Source

pub fn supports_context_menu( &self, scene: &Node, layout: &LayoutNode, target: &Target, ) -> bool

Source

pub fn reconcile_text_menu(&mut self, scene: &Node, layout: &LayoutNode) -> bool

Source

pub fn pointer_context_menu_changes_focus( &self, scene: &Node, layout: &LayoutNode, ) -> bool

Source

pub fn menu_press(&mut self, scene: &Node, layout: &LayoutNode) -> bool

Source

pub fn menu_release( &mut self, scene: &Node, layout: &LayoutNode, ) -> Option<ControlInput>

Source

pub fn menu_scroll( &mut self, scene: &Node, layout: &LayoutNode, rows: isize, ) -> bool

Source

pub fn menu_key( &mut self, scene: &Node, layout: &LayoutNode, key: MenuKey, ) -> Option<ControlInput>

Source

pub fn scroll_offsets(&self) -> &BTreeMap<Vec<usize>, f32>

Source

pub fn horizontal_scroll_offsets(&self) -> &BTreeMap<Vec<usize>, f32>

Source

pub fn pointer_position(&self) -> Option<Point>

Source

pub fn pointer_press_origin(&self) -> Option<Point>

Source

pub fn text_scroll(&self, path: &[usize]) -> Point

Source

pub fn set_text_scroll(&mut self, target: &Target, offset: Point)

Source

pub fn scroll_y(&mut self, layout: &LayoutNode, delta: f32) -> bool

Source

pub fn scroll_x(&mut self, layout: &LayoutNode, delta: f32) -> bool

Source

pub fn scroll_wheel( &mut self, layout: &LayoutNode, delta: Point, shift: bool, ) -> bool

Source

pub fn accessibility_scroll_to( &mut self, layout: &LayoutNode, path: &[usize], orientation: Orientation, offset: f32, ) -> bool

Scroll only the named container, without pointer hit testing or ancestor bubbling.

Source

pub fn scroll_to_top(&mut self, scene: &Node, layout: &LayoutNode) -> bool

Return the primary vertical viewport in the active layer to its start.

Source

pub fn scroll_bar_press( &mut self, scene: &Node, layout: &LayoutNode, ) -> Option<ScrollBarUpdate>

Returns Some when the scroll bar captures the press.

Source

pub fn scroll_bar_drag( &mut self, scene: &Node, layout: &LayoutNode, ) -> Option<ScrollBarUpdate>

Continue handling movement after the cursor leaves a captured thumb’s track.

Source

pub fn release_scroll_bar( &mut self, scene: &Node, layout: &LayoutNode, ) -> Option<ScrollBarUpdate>

Source

pub fn scroll_bar_key( &mut self, scene: &Node, layout: &LayoutNode, key: NavigationKey, ) -> Option<ScrollBarUpdate>

Source

pub fn finish_scroll_bar(&mut self) -> bool

Source

pub fn scroll_bar_captured(&self) -> bool

Source

pub fn touch_scroll_bar_press( &mut self, scene: &Node, layout: &LayoutNode, point: Point, ) -> Option<ScrollBarUpdate>

Source

pub fn touch_scroll_bar_drag( &mut self, scene: &Node, layout: &LayoutNode, point: Point, ) -> ScrollBarUpdate

Source

pub fn finish_touch_scroll_bar(&mut self) -> bool

Source

pub fn release_touch_scroll_bar( &mut self, scene: &Node, layout: &LayoutNode, point: Point, ) -> Option<ScrollBarUpdate>

Source

pub fn scroll_bar_highlighted( &self, path: &[usize], orientation: Orientation, ) -> bool

Source

pub fn arm_mouse_viewport_pan( &mut self, scene: &Node, layout: &LayoutNode, point: Point, now: Instant, ) -> bool

Arm a left-button pan after ordinary press handling. The press stays with its original control until movement crosses the drag threshold.

Source

pub fn mouse_viewport_pan_claimed(&self) -> bool

Source

pub fn begin_scroll_gesture( &mut self, scene: &Node, layout: &LayoutNode, point: Point, now: Instant, kind: ScrollGestureKind, ) -> bool

Capture scroll owners at contact start. Touches become taps only on release.

Source

pub fn move_scroll_gesture( &mut self, scene: &Node, layout: &LayoutNode, point: Point, now: Instant, ) -> bool

Source

pub fn end_scroll_gesture( &mut self, scene: &Node, layout: &LayoutNode, point: Point, now: Instant, ) -> ScrollGestureEnd

Source

pub fn advance_scroll_motion( &mut self, scene: &Node, layout: &LayoutNode, now: Instant, ) -> bool

Source

pub fn tab_move_active(&self) -> bool

Source

pub fn tab_move_marker( &self, bar: &Node, item: &LayoutNode, path: &[usize], ) -> Option<Rect>

Source

pub fn advance_tumbler_motion( &mut self, scene: &Node, layout: &LayoutNode, now: Instant, ) -> ScrollGestureEnd

Source

pub fn scroll_motion_active(&self) -> bool

Source

pub fn scroll_motion_deadline(&self) -> Option<Instant>

Source

pub fn tumbler_preview(&self) -> Option<(&[usize], f32)>

Source

pub fn has_switch_preview(&self) -> bool

Source

pub fn has_swipe_preview(&self) -> bool

Source

pub fn swipe_preview(&self) -> Option<(&[usize], Option<RowKey>, f32)>

Source

pub fn tumbler_scroll( &mut self, scene: &Node, layout: &LayoutNode, delta: f32, lines: bool, ) -> TumblerScroll

Source

pub fn reset_wheel_adjustment(&mut self)

Source

pub fn wheel_adjustment( &mut self, scene: &Node, layout: &LayoutNode, event: WheelEvent, now: Instant, ) -> Option<WheelAdjustment>

Source

pub fn tumbler_key( &mut self, scene: &Node, layout: &LayoutNode, key: NavigationKey, ) -> Option<ControlInput>

Source

pub fn reduce_motion(&self) -> bool

Whether the host has requested reduced motion.

Source

pub fn pull_to_refresh_progress(&self, node: &Node) -> Option<f32>

The pull distance as a fraction of the refresh threshold.

Source

pub fn cancel_scroll_gesture(&mut self)

Source

pub fn overscroll_frame(&self) -> OverscrollFrame

Source

pub fn has_overscroll(&self) -> bool

Source

pub fn has_pending_swipe_events(&self) -> bool

Source

pub fn reconcile_swipe(&mut self, scene: &Node, layout: &LayoutNode)

Source

pub fn take_swipe_events(&mut self) -> Vec<SwipeDelivery>

Source

pub fn begin_pointer_delay( &mut self, scene: &Node, layout: &LayoutNode, now: Instant, )

Source

pub fn begin_key_delay( &mut self, scene: &Node, layout: &LayoutNode, key: ActivationKey, now: Instant, )

Source

pub fn begin_pointer_button_hold( &mut self, scene: &Node, layout: &LayoutNode, now: Instant, ) -> bool

Source

pub fn begin_key_button_hold( &mut self, scene: &Node, layout: &LayoutNode, key: ActivationKey, now: Instant, )

Source

pub fn button_hold_deadline(&self) -> Option<Instant>

Source

pub fn advance_button_hold( &mut self, scene: &Node, layout: &LayoutNode, now: Instant, ) -> Option<(Target, ButtonHoldEvent)>

Source

pub fn advance_delay( &mut self, scene: &Node, layout: &LayoutNode, now: Instant, ) -> Option<ControlInput>

Source

pub fn accessibility_delay_click( &mut self, scene: &Node, layout: &LayoutNode, target: Target, now: Instant, ) -> Option<ControlInput>

Source

pub fn cancel_delay(&mut self) -> bool

Source

pub fn delay_deadline(&self) -> Option<Instant>

Source

pub fn delay_progress(&self, path: &[usize]) -> Option<(f32, bool)>

Source

pub fn delay_accessibility(&self) -> Option<(&Target, bool)>

Source

pub fn editor_value<'a>(&'a self, node: &'a Node) -> Cow<'a, str>

Source

pub fn table_cell_editing(&self, path: &[usize]) -> bool

Source

pub fn table_cell_edit_invalid(&self, node: &Node, path: &[usize]) -> bool

Source

pub fn is_text_editor(&self, node: &Node, target: &Target) -> bool

Source

pub fn table_cell_click( &mut self, scene: &Node, layout: &LayoutNode, target: Option<&Target>, now: Instant, ) -> bool

Source

pub fn begin_table_edit(&mut self, scene: &Node, layout: &LayoutNode) -> bool

Source

pub fn begin_accessible_table_edit( &mut self, scene: &Node, layout: &LayoutNode, target: Target, ) -> bool

Start editing the addressed accessible cell using its current row identity.

Source

pub fn begin_table_typing(&mut self, scene: &Node, layout: &LayoutNode) -> bool

Source

pub fn cancel_table_edit(&mut self) -> bool

Source

pub fn commit_table_edit( &mut self, component: &mut impl Component, scene: &Node, ) -> bool

Source

pub fn finish_table_edit( &mut self, component: &mut impl Component, scene: &Node, ) -> TableEditCommit

Source

pub fn tab_edit_origin(&self, scene: &Node) -> Option<TableEditTarget>

Source

pub fn next_table_edit_target( &self, component: &impl Component, scene: &Node, layout: &LayoutNode, origin: &TableEditTarget, backward: bool, ) -> Option<TableEditTarget>

Source

pub fn begin_table_edit_target( &mut self, scene: &Node, layout: &LayoutNode, target: &TableEditTarget, ) -> bool

Source

pub fn sync_editor(&mut self, scene: &Node)

Source

pub fn break_text_edit_group(&mut self)

Source

pub fn edit_text( &mut self, component: &mut impl Component, scene: &Node, action: EditAction<'_>, source: EditSource, now: Instant, ) -> bool

Source

pub fn select_search_suggestion( &mut self, component: &mut impl Component, scene: &Node, index: usize, now: Instant, ) -> bool

Source

pub fn replay_text_edit( &mut self, component: &mut impl Component, scene: &Node, redo: bool, ) -> bool

Source

pub fn edit_spin(&mut self, node: &Node, action: EditAction<'_>)

Source

pub fn edit_spin_from( &mut self, node: &Node, action: EditAction<'_>, source: EditSource, now: Instant, )

Source

pub fn discard_spin_draft(&mut self)

Source

pub fn commit_spin_draft(&mut self) -> Option<ControlInput>

Source

pub fn spin_press(&mut self, scene: &Node, layout: &LayoutNode) -> bool

Source

pub fn spin_release( &mut self, scene: &Node, layout: &LayoutNode, ) -> Option<ControlInput>

Source

pub fn combo_completion( &self, node: &Node, path: &[usize], ) -> Option<ComboCompletion>

Source

pub fn set_painted_combo_completion( &mut self, completion: Option<ComboCompletion>, )

Source

pub fn painted_combo_completion_for( &self, node: &Node, path: &[usize], ) -> Option<&ComboCompletion>

Source

pub fn combo_completion_accepts(&self, key: NavigationKey) -> bool

Source

pub fn accept_combo_completion( &mut self, component: &mut impl Component, scene: &Node, now: Instant, ) -> bool

Source

pub fn dismiss_combo_completion(&mut self, scene: &Node) -> bool

Source

pub fn open_choice( &mut self, scene: &Node, layout: &LayoutNode, target: Target, ) -> bool

Source

pub fn open_choice_at_pointer( &mut self, scene: &Node, layout: &LayoutNode, target: Target, ) -> bool

Source

pub fn choice_open(&self) -> bool

Source

pub fn choice_is_open_for(&self, path: &[usize]) -> bool

Source

pub fn dismiss_choice(&mut self)

Source

pub fn choice_menu<'a>( &self, scene: &'a Node, layout: &LayoutNode, ) -> Option<ChoiceMenu<'a>>

Source

pub fn choice_press(&mut self, scene: &Node, layout: &LayoutNode) -> bool

Source

pub fn choice_release( &mut self, scene: &Node, layout: &LayoutNode, ) -> Option<ControlInput>

Source

pub fn choice_scroll( &mut self, scene: &Node, layout: &LayoutNode, rows: isize, ) -> bool

Source

pub fn choice_key( &mut self, scene: &Node, layout: &LayoutNode, key: ChoiceKey, ) -> Option<ControlInput>

Source

pub fn choice_typeahead( &mut self, scene: &Node, layout: &LayoutNode, text: &str, now: Instant, ) -> Option<ControlInput>

Source

pub fn list_typeahead_focus(&self, scene: &Node) -> Option<&Target>

Source

pub fn list_typeahead_ime_area( &self, scene: &Node, layout: &LayoutNode, ) -> Option<Rect>

Source

pub fn reset_list_typeahead(&mut self)

Source

pub fn list_typeahead( &mut self, scene: &Node, layout: &LayoutNode, text: &str, now: Instant, ) -> Option<ControlInput>

Source

pub fn pointer_move( &mut self, scene: &Node, layout: &LayoutNode, point: Point, ) -> bool

Source

pub fn pointer_leave(&mut self) -> bool

Source

pub fn pointer_press(&mut self)

Source

pub fn pointer_press_in_scene(&mut self, scene: &Node, layout: &LayoutNode)

Source

pub fn replay_tap_in_scene(&mut self, scene: &Node, layout: &LayoutNode)

Reuse click routing for a gesture that has already delivered its press lifecycle.

Source

pub fn split_press(&mut self, scene: &Node, layout: &LayoutNode)

Source

pub fn split_resize_active(&self) -> bool

Source

pub fn touch_split_press( &mut self, scene: &Node, layout: &LayoutNode, point: Point, ) -> bool

Source

pub fn split_orientation(&self, scene: &Node) -> Option<Orientation>

Source

pub fn split_drag( &self, scene: &Node, layout: &LayoutNode, ) -> Option<SplitResize>

Source

pub fn finish_split_resize(&mut self) -> bool

Source

pub fn split_key( &self, scene: &Node, layout: &LayoutNode, key: NavigationKey, ) -> Option<SplitResize>

Source

pub fn split_set_value( &self, scene: &Node, layout: &LayoutNode, target: &Target, value: f64, ) -> Option<SplitResize>

Set the leading pane size using the same limits and layout mode as a drag.

Source

pub fn range_pointer_press( &mut self, scene: &Node, layout: &LayoutNode, point: Point, ) -> bool

Source

pub fn touch_range_press( &mut self, scene: &Node, layout: &LayoutNode, point: Point, ) -> bool

Source

pub fn touch_range_captured(&self) -> bool

Source

pub fn finish_touch_range(&mut self)

Source

pub fn slider_press( &mut self, scene: &Node, layout: &LayoutNode, ) -> Option<RangeInput>

Source

pub fn slider_drag( &mut self, scene: &Node, layout: &LayoutNode, ) -> Option<RangeInput>

Source

pub fn slider_preview(&self, path: &[usize]) -> Option<f64>

Source

pub fn has_slider_preview(&self) -> bool

Source

pub fn cancel_slider_preview(&mut self) -> bool

Source

pub fn slider_release( &mut self, scene: &Node, layout: &LayoutNode, ) -> Option<RangeInput>

Source

pub fn slider_key( &mut self, scene: &Node, layout: &LayoutNode, key: SliderKey, pressed: bool, ) -> Option<RangeInput>

Source

pub fn accessibility_tab_close_target( &self, scene: &Node, layout: &LayoutNode, path: &[usize], ) -> Option<Target>

Resolve a close affordance against the current scene and clipped header. Capture the offered tab and model revision for a native close button.

Source

pub fn tab_close_action( &self, scene: &Node, layout: &LayoutNode, target: &Target, ) -> Option<ControlInput>

Source

pub fn focused_tab_close( &self, scene: &Node, layout: &LayoutNode, ) -> Option<ControlInput>

Source

pub fn tab_close_hovered(&self, path: &[usize]) -> bool

Source

pub fn select_group_option( &self, scene: &Node, layout: &LayoutNode, target: &Target, ) -> Option<ControlInput>

Source

pub fn tree_pointer_action( &self, scene: &Node, layout: &LayoutNode, target: &Target, ) -> Option<ControlInput>

Source

pub fn tree_has_focus(&self, scene: &Node, layout: &LayoutNode) -> bool

Source

pub fn tree_toggle( &self, scene: &Node, layout: &LayoutNode, ) -> Option<ControlInput>

Source

pub fn tree_key( &mut self, scene: &Node, layout: &LayoutNode, key: NavigationKey, ) -> Option<ControlInput>

Source

pub fn tree_key_with_selection( &mut self, scene: &Node, layout: &LayoutNode, key: NavigationKey, operation: RowSelection, ) -> Option<ControlInput>

Source

pub fn select_group_option_with_selection( &self, scene: &Node, layout: &LayoutNode, target: &Target, operation: RowSelection, ) -> Option<ControlInput>

Source

pub fn list_item_delegate_selection( &self, scene: &Node, layout: &LayoutNode, target: &Target, ) -> Option<ControlInput>

Source

pub fn current_item_delegate( &self, scene: &Node, layout: &LayoutNode, view: &Target, ) -> Option<Target>

Source

pub fn resolve_item_delegate( &self, scene: &Node, layout: &LayoutNode, view: &[usize], row: RowKey, ) -> Option<Target>

Source

pub fn table_row_header_selection( &self, scene: &Node, layout: &LayoutNode, target: &Target, operation: RowSelection, ) -> Option<ControlInput>

Source

pub fn press_table_reorder(&mut self, scene: &Node, layout: &LayoutNode) -> bool

Start the ordinary press route only on a movable table header.

Source

pub fn table_row_header_move( &self, scene: &Node, layout: &LayoutNode, target: &Target, direction: NavigationKey, ) -> Option<ControlInput>

A row header’s accessible action can move its record without a pointer.

Source

pub fn table_row_move_key( &self, scene: &Node, layout: &LayoutNode, direction: NavigationKey, ) -> Option<ControlInput>

Source

pub fn table_delegate_selection( &self, scene: &Node, layout: &LayoutNode, target: &Target, operation: RowSelection, ) -> Option<ControlInput>

A cell’s component can receive its click after the table updates selection.

Source

pub fn selection_key_action( &self, scene: &Node, layout: &LayoutNode, key: &str, modifiers: KeyModifiers, ) -> Option<ControlInput>

Resolve a selection shortcut in the current focus scope.

Source

pub fn tree_selection_key( &self, scene: &Node, layout: &LayoutNode, key: TableSelectionKey, ) -> Option<ControlInput>

Source

pub fn table_selection_key( &self, scene: &Node, key: TableSelectionKey, ) -> Option<ControlInput>

Source

pub fn table_edit_history_target<'a>( &'a self, scene: &Node, layout: &LayoutNode, ) -> Option<&'a [usize]>

Source

pub fn table_copy_target( &self, scene: &Node, layout: &LayoutNode, ) -> Option<(Vec<usize>, Vec<usize>)>

Source

pub fn table_paste_target( &self, scene: &Node, layout: &LayoutNode, ) -> Option<TablePasteDestination>

Source

pub fn list_key_with_selection( &mut self, scene: &Node, layout: &LayoutNode, key: NavigationKey, operation: RowSelection, ) -> Option<ControlInput>

Source

pub fn list_key( &mut self, scene: &Node, layout: &LayoutNode, key: NavigationKey, ) -> Option<ControlInput>

Source

pub fn tab_move_key( &self, scene: &Node, layout: &LayoutNode, key: NavigationKey, ) -> Option<Option<ControlInput>>

An outer Some consumes the shortcut even at the first or last movable tab.

Source

pub fn group_key( &mut self, scene: &Node, layout: &LayoutNode, key: NavigationKey, ) -> Option<ControlInput>

Source

pub fn swipe_key( &mut self, scene: &Node, layout: &LayoutNode, key: NavigationKey, ) -> Option<ControlInput>

Source

pub fn swipe_delegate_key( &self, scene: &Node, layout: &LayoutNode, key: NavigationKey, ) -> Option<ControlInput>

Source

pub fn swipe_delegate_accessibility( &self, scene: &Node, layout: &LayoutNode, target: &Target, expand: bool, ) -> Option<ControlInput>

Source

pub fn dismiss_focused_swipe( &self, scene: &Node, layout: &LayoutNode, ) -> Option<ControlInput>

Source

pub fn stack_back( &self, scene: &Node, layout: &LayoutNode, ) -> Option<ControlInput>

Source

pub fn stack_back_in_window( &self, scene: &Node, layout: &LayoutNode, ) -> Option<ControlInput>

Resolve window-level Back when focus is outside a navigation stack. A focused stack wins; otherwise require one visible innermost candidate.

Source

pub fn pointer_release(&mut self) -> Option<&'static str>

Source

pub fn page_marker_release( &mut self, scene: &Node, layout: &LayoutNode, ) -> Option<ControlInput>

Source

pub fn control_part_release( &mut self, scene: &Node, layout: &LayoutNode, ) -> Option<ControlInput>

Source

pub fn page_marker_hovered(&self, path: &[usize], index: usize) -> bool

Source

pub fn page_indicator_key( &self, scene: &Node, layout: &LayoutNode, key: NavigationKey, ) -> Option<ControlInput>

Source

pub fn calendar_key( &self, scene: &Node, layout: &LayoutNode, key: NavigationKey, ) -> Option<ControlInput>

Source

pub fn calendar_activate( &self, scene: &Node, layout: &LayoutNode, target: &Target, ) -> Option<ControlInput>

Source

pub fn pointer_release_target(&mut self) -> Option<Target>

Source

pub fn table_sort_release(&mut self) -> Option<ControlInput>

Source

pub fn table_header_release( &mut self, scene: &Node, operation: RowSelection, sort: bool, ) -> Option<ControlInput>

Source

pub fn table_column_hovered(&self, path: &[usize], column: usize) -> bool

Source

pub fn arm_table_drag_selection( &mut self, scene: &Node, layout: &LayoutNode, additive: bool, ) -> bool

Arm a mouse selection after the ordinary click and drag-source routes are resolved.

Source

pub fn press_table_drag_selection( &mut self, scene: &Node, layout: &LayoutNode, additive: bool, ) -> bool

Press a table cell only if it can arm a drag selection.

Source

pub fn advance_table_touch_hold( &mut self, scene: &Node, layout: &LayoutNode, now: Instant, ) -> bool

Claim an undragged press when the table’s hold deadline expires.

Source

pub fn table_touch_hold_deadline(&self) -> Option<Instant>

Source

pub fn table_selection_handles( &self, path: &[usize], node: &Node, item: &LayoutNode, ) -> impl Iterator<Item = Rect>

The hit bounds of the visible handles, in the table’s layout coordinates.

Source

pub fn table_selection_handle_parts( &self, path: &[usize], node: &Node, item: &LayoutNode, ) -> impl Iterator<Item = (usize, Rect)>

Keep the start/end slot identity even when one corner is clipped.

Source

pub fn press_table_selection_handle( &mut self, scene: &Node, layout: &LayoutNode, ) -> bool

Source

pub fn touch_table_selection_claimed(&self) -> bool

Source

pub fn touch_table_drag_claimed(&self) -> bool

Source

pub fn scroll_table_drag_claimed(&self) -> bool

Source

pub fn cancel_scroll_table_drag(&mut self) -> bool

Source

pub fn cancel_table_touch_drag(&mut self) -> bool

Source

pub fn table_drag_selection_armed(&self) -> bool

Source

pub fn move_table_drag_selection( &mut self, layout: &LayoutNode, now: Instant, ) -> bool

Source

pub fn table_drag_selection_claimed(&self) -> bool

Source

pub fn cancel_table_drag_selection(&mut self) -> bool

Source

pub fn finish_table_drag_selection( &mut self, scene: &Node, layout: &LayoutNode, ) -> Option<ControlInput>

Source

pub fn table_drag_preview( &self, path: &[usize], node: &Node, layout: &LayoutNode, ) -> Vec<Rect>

Source

pub fn table_drag_selection_deadline( &self, scene: &Node, layout: &LayoutNode, ) -> Option<Instant>

Source

pub fn advance_table_drag_selection( &mut self, scene: &Node, layout: &LayoutNode, now: Instant, ) -> bool

Source

pub fn table_column_move_drag( &mut self, layout: &LayoutNode, now: Instant, ) -> bool

Source

pub fn table_row_move_drag(&mut self, layout: &LayoutNode, now: Instant) -> bool

Source

pub fn table_row_move_claimed(&self) -> bool

Source

pub fn cancel_table_row_move(&mut self) -> bool

Source

pub fn table_row_move_marker( &self, path: &[usize], node: &Node, layout: &LayoutNode, ) -> Option<Rect>

Source

pub fn table_row_move_source( &self, path: &[usize], node: &Node, ) -> Option<RowKey>

Source

pub fn table_row_move_deadline( &self, scene: &Node, layout: &LayoutNode, ) -> Option<Instant>

Source

pub fn advance_table_row_move( &mut self, scene: &Node, layout: &LayoutNode, now: Instant, ) -> bool

Source

pub fn finish_table_row_move( &mut self, scene: &Node, layout: &LayoutNode, ) -> Option<ControlInput>

Source

pub fn table_column_move_claimed(&self) -> bool

Source

pub fn table_column_move_deadline( &self, scene: &Node, layout: &LayoutNode, ) -> Option<Instant>

Source

pub fn advance_table_column_move( &mut self, scene: &Node, layout: &LayoutNode, now: Instant, ) -> bool

Source

pub fn table_column_move_marker( &self, path: &[usize], node: &Node, layout: &LayoutNode, ) -> Option<f32>

Source

pub fn finish_table_column_move( &mut self, scene: &Node, layout: &LayoutNode, ) -> Option<ControlInput>

Source

pub fn table_resize_drag( &self, scene: &Node, layout: &LayoutNode, ) -> Option<ControlInput>

Source

pub fn finish_table_resize(&mut self) -> bool

Source

pub fn table_resize_cursor(&self) -> bool

Source

pub fn table_row_resize_cursor(&self) -> bool

Source

pub fn table_resize_row(&self, path: &[usize]) -> Option<RowKey>

Source

pub fn table_row_resize_drag( &self, scene: &Node, layout: &LayoutNode, ) -> Option<ControlInput>

Source

pub fn table_resize_column(&self, path: &[usize]) -> Option<usize>

Source

pub fn reconcile(&mut self, scene: &Node, layout: &LayoutNode)

Source

pub fn focus_next( &mut self, scene: &Node, layout: &LayoutNode, reverse: bool, ) -> bool

Move focus, returning whether revealing the focused tab requires layout.

Source

pub fn accessibility_target( &self, scene: &Node, layout: &LayoutNode, path: &[usize], ) -> Option<Target>

Resolve an accessibility action through the current modal and layout scope.

Source

pub fn remember_focus_scope(&mut self, scene: &Node, layout: &LayoutNode)

Source

pub fn key_route(&self, scene: &Node, layout: &LayoutNode) -> Option<KeyRoute>

Source

pub fn discard_range_key(&mut self, key: SliderKey)

Source

pub fn focus_target( &mut self, scene: &Node, layout: &LayoutNode, target: Target, )

A focus request uses the same scene eligibility and modal gate as native input.

Source

pub fn apply_focus_requests( &mut self, scene: &Node, layout: &LayoutNode, requests: impl IntoIterator<Item = FocusRequest>, )

Source

pub fn apply_focus_request( &mut self, scene: &Node, layout: &LayoutNode, request: FocusRequest, ) -> Option<TextCommand>

Apply a focus command or resolve a text command against the current editor.

Source

pub fn apply_text_selection(&mut self, scene: &Node, command: TextCommand)

Source

pub fn accessibility_focus(&mut self, target: Target)

Source

pub fn key_press(&mut self, key: ActivationKey)

Source

pub fn key_press_with_scene(&mut self, scene: &Node, key: ActivationKey)

Source

pub fn key_release(&mut self, key: ActivationKey) -> Option<&'static str>

Source

pub fn key_release_target(&mut self, key: ActivationKey) -> Option<Target>

Source

pub fn key_release_with_scene( &mut self, scene: &Node, key: ActivationKey, ) -> Option<Target>

Source

pub fn cancel_press(&mut self)

Source

pub fn is_hovered(&self, path: &[usize]) -> bool

Source

pub fn is_focused(&self, path: &[usize]) -> bool

Source

pub fn publish_button_presses(&mut self, scene: &Node, layout: &LayoutNode)

Publish pressed state only for observed buttons which still own a live input.

Source

pub fn dispatch_button_press_events( &mut self, component: &mut impl Component, scene: &Node, layout: &LayoutNode, ) -> bool

Publish the reactive state before delivering events to their original buttons.

Source

pub fn is_pressed(&self, path: &[usize]) -> bool

Source§

impl Interaction

Source

pub fn take_scroll_events( &mut self, scene: &Node, layout: &LayoutNode, ) -> Vec<ScrollDelivery>

Resolve movement after layout clamps offsets and replaces virtual rows.

Source

pub fn clear_scroll_events(&mut self)

Source

pub fn apply_scroll_requests( &mut self, scene: &Node, layout: &LayoutNode, requests: impl IntoIterator<Item = ScrollRequest>, ) -> bool

Trait Implementations§

Source§

impl Clone for Interaction

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Interaction

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Interaction

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more