Skip to main content

Node

Trait Node 

Source
pub trait Node: Clone {
Show 78 methods // Provided methods fn node_id(&self, node_id: impl Into<String>) -> &Self where Self: Sized { ... } fn semantic_role(&self, role: SemanticRole) -> &Self where Self: Sized { ... } fn semantic_label(&self, label: impl Into<String>) -> &Self where Self: Sized { ... } fn semantic_checked(&self, state: SemanticCheckedState) -> &Self where Self: Sized { ... } fn semantic_disabled(&self, disabled: bool) -> &Self where Self: Sized { ... } fn clear_semantic_disabled(&self) -> &Self where Self: Sized { ... } fn semantic_selected(&self, selected: bool) -> &Self where Self: Sized { ... } fn clear_semantic_selected(&self) -> &Self where Self: Sized { ... } fn semantic_expanded(&self, expanded: bool) -> &Self where Self: Sized { ... } fn clear_semantic_expanded(&self) -> &Self where Self: Sized { ... } fn semantic_value_range( &self, value_now: f32, value_min: f32, value_max: f32, ) -> &Self where Self: Sized { ... } fn clear_semantic_value_range(&self) -> &Self where Self: Sized { ... } fn semantic_orientation(&self, orientation: Orientation) -> &Self where Self: Sized { ... } fn request_semantic_announcement(&self) -> &Self where Self: Sized { ... } fn child_count(&self) -> usize { ... } fn is_enabled(&self) -> bool { ... } fn is_visible(&self) -> bool { ... } fn cursor_style(&self) -> CursorStyle { ... } fn persist_state(&self, adapter: Rc<dyn PersistedStateAdapter>) -> &Self where Self: Sized { ... } fn handle(&self) -> NodeHandle { ... } fn has_built_handle(&self) -> bool { ... } fn on_context_menu( &self, handler: impl Fn(ContextMenuEventArgs) + 'static, ) -> &Self where Self: Sized { ... } fn clear_context_menu(&self) -> &Self where Self: Sized { ... } fn disable_context_menu(&self, flag: bool) -> &Self where Self: Sized { ... } fn on_pointer_click( &self, handler: impl Fn(&mut PointerEventArgs) + 'static, ) -> &Self where Self: Sized { ... } fn on_pointer_double_click( &self, handler: impl Fn(&mut PointerEventArgs) + 'static, ) -> &Self where Self: Sized { ... } fn on_pointer_triple_click( &self, handler: impl Fn(&mut PointerEventArgs) + 'static, ) -> &Self where Self: Sized { ... } fn on_pointer_down( &self, handler: impl Fn(&mut PointerEventArgs) + 'static, ) -> &Self where Self: Sized { ... } fn on_pointer_move( &self, handler: impl Fn(&mut PointerEventArgs) + 'static, ) -> &Self where Self: Sized { ... } fn on_pointer_up( &self, handler: impl Fn(&mut PointerEventArgs) + 'static, ) -> &Self where Self: Sized { ... } fn on_pointer_enter( &self, handler: impl Fn(&mut PointerEventArgs) + 'static, ) -> &Self where Self: Sized { ... } fn on_pointer_leave( &self, handler: impl Fn(&mut PointerEventArgs) + 'static, ) -> &Self where Self: Sized { ... } fn on_pointer_cancel( &self, handler: impl Fn(&mut PointerEventArgs) + 'static, ) -> &Self where Self: Sized { ... } fn on_wheel(&self, handler: impl Fn(&mut WheelEventArgs) + 'static) -> &Self where Self: Sized { ... } fn on_pan_gesture( &self, handler: impl Fn(&mut GestureEventArgs) + 'static, ) -> &Self where Self: Sized { ... } fn on_pinch_gesture( &self, handler: impl Fn(&mut GestureEventArgs) + 'static, ) -> &Self where Self: Sized { ... } fn long_press_options( &self, minimum_duration_ms: i32, movement_tolerance: f32, ) -> &Self where Self: Sized { ... } fn on_long_press( &self, handler: impl Fn(&mut LongPressEventArgs) + 'static, ) -> &Self where Self: Sized { ... } fn focusable(&self, enabled: bool, tab_index: i32) -> &Self where Self: Sized { ... } fn focus_now(&self) -> &Self where Self: Sized { ... } fn enabled(&self, enabled: bool) -> &Self where Self: Sized { ... } fn visibility(&self, visibility: Visibility) -> &Self where Self: Sized { ... } fn cursor(&self, style: CursorStyle) -> &Self where Self: Sized { ... } fn clear_cursor(&self) -> &Self where Self: Sized { ... } fn on_key_down( &self, handler: impl Fn(&mut KeyEventArgs) + 'static, ) -> &Self where Self: Sized { ... } fn on_key_up(&self, handler: impl Fn(&mut KeyEventArgs) + 'static) -> &Self where Self: Sized { ... } fn on_focus_changed( &self, handler: impl Fn(FocusChangedEventArgs) + 'static, ) -> &Self where Self: Sized { ... } fn drag_allowed_effects(&self, effects: DragDropEffects) -> &Self where Self: Sized { ... } fn drag_data( &self, handler: impl Fn() -> Option<DragDataObject> + 'static, ) -> &Self where Self: Sized { ... } fn clear_drag_data(&self) -> &Self where Self: Sized { ... } fn allow_drop(&self, flag: bool) -> &Self where Self: Sized { ... } fn on_drag_completed( &self, handler: impl Fn(DragCompletedEventArgs) + 'static, ) -> &Self where Self: Sized { ... } fn on_drag_enter( &self, handler: impl Fn(DragEventArgs) -> DropProposal + 'static, ) -> &Self where Self: Sized { ... } fn on_drag_over( &self, handler: impl Fn(DragEventArgs) -> DropProposal + 'static, ) -> &Self where Self: Sized { ... } fn on_drag_leave(&self, handler: impl Fn(DragEventArgs) + 'static) -> &Self where Self: Sized { ... } fn on_drop(&self, handler: impl Fn(DragEventArgs) + 'static) -> &Self where Self: Sized { ... } fn allow_external_drop(&self, flag: bool) -> &Self where Self: Sized { ... } fn on_external_drag_enter( &self, handler: impl Fn(ExternalDropEventArgs) -> DropProposal + 'static, ) -> &Self where Self: Sized { ... } fn on_external_drag_over( &self, handler: impl Fn(ExternalDropEventArgs) -> DropProposal + 'static, ) -> &Self where Self: Sized { ... } fn on_external_drag_leave( &self, handler: impl Fn(ExternalDropEventArgs) + 'static, ) -> &Self where Self: Sized { ... } fn on_external_drop( &self, handler: impl Fn(ExternalDropEventArgs) + 'static, ) -> &Self where Self: Sized { ... } fn get_bounds(&self) -> [f32; 4] { ... } fn absolute_to_local_position( &self, absolute_x: f32, absolute_y: f32, ) -> [f32; 2] { ... } fn local_to_absolute_position(&self, local_x: f32, local_y: f32) -> [f32; 2] { ... } fn ensure_handle(&self) { ... } fn build(&self) { ... } fn dispose(&self) { ... } fn build_children(&self) { ... } fn append_child<T: Node>(&self, child: &T) { ... } fn remove_child<T: Node>(&self, child: &T) -> bool { ... } fn parent_handle(&self) -> Option<NodeHandle> { ... } fn notify_retained_layout_mutation(&self) { ... } fn notify_retained_mutation(&self) { ... } fn notify_retained_child_layout_changed(&self) { ... } fn preserve_selection_on_pointer_down(&self, preserve: bool) -> &Self where Self: Sized { ... } fn tool_tip(&self, tool_tip: ToolTip) -> &Self where Self: Sized { ... } fn tool_tip_text(&self, text: impl Into<String>) -> &Self where Self: Sized { ... } fn clear_tool_tip(&self) -> &Self where Self: Sized { ... }
}
Expand description

Universal retained-node capabilities shared by every visual node and control.

Rust controls use composition rather than FUI-AS class inheritance, but this trait preserves the common retained identity, state, semantics, focus, routed-input, gesture, geometry, and child-inspection contract. Layout and appearance are exposed separately through the cohesive surface traits.

Provided Methods§

Source

fn node_id(&self, node_id: impl Into<String>) -> &Self
where Self: Sized,

Source

fn semantic_role(&self, role: SemanticRole) -> &Self
where Self: Sized,

Source

fn semantic_label(&self, label: impl Into<String>) -> &Self
where Self: Sized,

Source

fn semantic_checked(&self, state: SemanticCheckedState) -> &Self
where Self: Sized,

Source

fn semantic_disabled(&self, disabled: bool) -> &Self
where Self: Sized,

Source

fn clear_semantic_disabled(&self) -> &Self
where Self: Sized,

Source

fn semantic_selected(&self, selected: bool) -> &Self
where Self: Sized,

Source

fn clear_semantic_selected(&self) -> &Self
where Self: Sized,

Source

fn semantic_expanded(&self, expanded: bool) -> &Self
where Self: Sized,

Source

fn clear_semantic_expanded(&self) -> &Self
where Self: Sized,

Source

fn semantic_value_range( &self, value_now: f32, value_min: f32, value_max: f32, ) -> &Self
where Self: Sized,

Source

fn clear_semantic_value_range(&self) -> &Self
where Self: Sized,

Source

fn semantic_orientation(&self, orientation: Orientation) -> &Self
where Self: Sized,

Source

fn request_semantic_announcement(&self) -> &Self
where Self: Sized,

Source

fn child_count(&self) -> usize

Source

fn is_enabled(&self) -> bool

Source

fn is_visible(&self) -> bool

Source

fn cursor_style(&self) -> CursorStyle

Source

fn persist_state(&self, adapter: Rc<dyn PersistedStateAdapter>) -> &Self
where Self: Sized,

Source

fn handle(&self) -> NodeHandle

Source

fn has_built_handle(&self) -> bool

Source

fn on_context_menu( &self, handler: impl Fn(ContextMenuEventArgs) + 'static, ) -> &Self
where Self: Sized,

Source

fn clear_context_menu(&self) -> &Self
where Self: Sized,

Source

fn disable_context_menu(&self, flag: bool) -> &Self
where Self: Sized,

Source

fn on_pointer_click( &self, handler: impl Fn(&mut PointerEventArgs) + 'static, ) -> &Self
where Self: Sized,

Handles the low-level routed pointer-click event.

This is not control activation. Use Button::on_click for a button action that also supports keyboard activation.

Source

fn on_pointer_double_click( &self, handler: impl Fn(&mut PointerEventArgs) + 'static, ) -> &Self
where Self: Sized,

Handles a low-level routed pointer double-click after the ordinary pointer-click callback.

Source

fn on_pointer_triple_click( &self, handler: impl Fn(&mut PointerEventArgs) + 'static, ) -> &Self
where Self: Sized,

Handles a low-level routed pointer triple-click after the ordinary pointer-click callback.

Source

fn on_pointer_down( &self, handler: impl Fn(&mut PointerEventArgs) + 'static, ) -> &Self
where Self: Sized,

Source

fn on_pointer_move( &self, handler: impl Fn(&mut PointerEventArgs) + 'static, ) -> &Self
where Self: Sized,

Source

fn on_pointer_up( &self, handler: impl Fn(&mut PointerEventArgs) + 'static, ) -> &Self
where Self: Sized,

Source

fn on_pointer_enter( &self, handler: impl Fn(&mut PointerEventArgs) + 'static, ) -> &Self
where Self: Sized,

Source

fn on_pointer_leave( &self, handler: impl Fn(&mut PointerEventArgs) + 'static, ) -> &Self
where Self: Sized,

Source

fn on_pointer_cancel( &self, handler: impl Fn(&mut PointerEventArgs) + 'static, ) -> &Self
where Self: Sized,

Source

fn on_wheel(&self, handler: impl Fn(&mut WheelEventArgs) + 'static) -> &Self
where Self: Sized,

Source

fn on_pan_gesture( &self, handler: impl Fn(&mut GestureEventArgs) + 'static, ) -> &Self
where Self: Sized,

Source

fn on_pinch_gesture( &self, handler: impl Fn(&mut GestureEventArgs) + 'static, ) -> &Self
where Self: Sized,

Source

fn long_press_options( &self, minimum_duration_ms: i32, movement_tolerance: f32, ) -> &Self
where Self: Sized,

Source

fn on_long_press( &self, handler: impl Fn(&mut LongPressEventArgs) + 'static, ) -> &Self
where Self: Sized,

Source

fn focusable(&self, enabled: bool, tab_index: i32) -> &Self
where Self: Sized,

Source

fn focus_now(&self) -> &Self
where Self: Sized,

Source

fn enabled(&self, enabled: bool) -> &Self
where Self: Sized,

Source

fn visibility(&self, visibility: Visibility) -> &Self
where Self: Sized,

Source

fn cursor(&self, style: CursorStyle) -> &Self
where Self: Sized,

Source

fn clear_cursor(&self) -> &Self
where Self: Sized,

Source

fn on_key_down(&self, handler: impl Fn(&mut KeyEventArgs) + 'static) -> &Self
where Self: Sized,

Source

fn on_key_up(&self, handler: impl Fn(&mut KeyEventArgs) + 'static) -> &Self
where Self: Sized,

Source

fn on_focus_changed( &self, handler: impl Fn(FocusChangedEventArgs) + 'static, ) -> &Self
where Self: Sized,

Source

fn drag_allowed_effects(&self, effects: DragDropEffects) -> &Self
where Self: Sized,

Source

fn drag_data( &self, handler: impl Fn() -> Option<DragDataObject> + 'static, ) -> &Self
where Self: Sized,

Source

fn clear_drag_data(&self) -> &Self
where Self: Sized,

Source

fn allow_drop(&self, flag: bool) -> &Self
where Self: Sized,

Source

fn on_drag_completed( &self, handler: impl Fn(DragCompletedEventArgs) + 'static, ) -> &Self
where Self: Sized,

Source

fn on_drag_enter( &self, handler: impl Fn(DragEventArgs) -> DropProposal + 'static, ) -> &Self
where Self: Sized,

Source

fn on_drag_over( &self, handler: impl Fn(DragEventArgs) -> DropProposal + 'static, ) -> &Self
where Self: Sized,

Source

fn on_drag_leave(&self, handler: impl Fn(DragEventArgs) + 'static) -> &Self
where Self: Sized,

Source

fn on_drop(&self, handler: impl Fn(DragEventArgs) + 'static) -> &Self
where Self: Sized,

Source

fn allow_external_drop(&self, flag: bool) -> &Self
where Self: Sized,

Source

fn on_external_drag_enter( &self, handler: impl Fn(ExternalDropEventArgs) -> DropProposal + 'static, ) -> &Self
where Self: Sized,

Source

fn on_external_drag_over( &self, handler: impl Fn(ExternalDropEventArgs) -> DropProposal + 'static, ) -> &Self
where Self: Sized,

Source

fn on_external_drag_leave( &self, handler: impl Fn(ExternalDropEventArgs) + 'static, ) -> &Self
where Self: Sized,

Source

fn on_external_drop( &self, handler: impl Fn(ExternalDropEventArgs) + 'static, ) -> &Self
where Self: Sized,

Source

fn get_bounds(&self) -> [f32; 4]

Source

fn absolute_to_local_position( &self, absolute_x: f32, absolute_y: f32, ) -> [f32; 2]

Source

fn local_to_absolute_position(&self, local_x: f32, local_y: f32) -> [f32; 2]

Source

fn ensure_handle(&self)

Source

fn build(&self)

Source

fn dispose(&self)

Source

fn build_children(&self)

Source

fn append_child<T: Node>(&self, child: &T)

Source

fn remove_child<T: Node>(&self, child: &T) -> bool

Source

fn parent_handle(&self) -> Option<NodeHandle>

Source

fn notify_retained_layout_mutation(&self)

Source

fn notify_retained_mutation(&self)

Source

fn notify_retained_child_layout_changed(&self)

Source

fn preserve_selection_on_pointer_down(&self, preserve: bool) -> &Self
where Self: Sized,

Source

fn tool_tip(&self, tool_tip: ToolTip) -> &Self
where Self: Sized,

Source

fn tool_tip_text(&self, text: impl Into<String>) -> &Self
where Self: Sized,

Source

fn clear_tool_tip(&self) -> &Self
where Self: Sized,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T: Node> Node for &T

Implementors§