pub struct FocusTraversalGroupNode {
pub policy: FocusTraversalPolicyRef,
pub last_requested_focus: Option<FocusNodeRef>,
/* private fields */
}Expand description
A special focus node that only FocusTraversalGroup uses so that it can be used to cache
the following in the focus tree:
- the focus traversal policy — this allows traversal code to find groups in the focus tree.
- the last focused node — this allows the policy to be invalidated when a focus change was not triggered via a traversal request.
Fields§
§policy: FocusTraversalPolicyRefThe policy this group imposes.
last_requested_focus: Option<FocusNodeRef>The node the policy last requested focus for.
Implementations§
Source§impl FocusTraversalGroupNode
impl FocusTraversalGroupNode
Sourcepub fn new(
app: &mut App,
policy: FocusTraversalPolicyRef,
) -> Ref<FocusTraversalGroupNode>
pub fn new( app: &mut App, policy: FocusTraversalPolicyRef, ) -> Ref<FocusTraversalGroupNode>
Creates a FocusTraversalGroupNode with the given policy.
Trait Implementations§
Source§impl ChangeNotifier for FocusTraversalGroupNode
impl ChangeNotifier for FocusTraversalGroupNode
fn change_notifier_data(&self) -> &ChangeNotifierData
fn change_notifier_data_mut(&mut self) -> &mut ChangeNotifierData
Source§fn will_add_listener(self: Handle<Self>, app: &mut App)
fn will_add_listener(self: Handle<Self>, app: &mut App)
Runs before the listener is stored. Dart overrides of
addListener that
work before super.addListener go here.Source§fn did_remove_listener(self: Handle<Self>, app: &mut App)
fn did_remove_listener(self: Handle<Self>, app: &mut App)
Runs after the listener is removed. Dart overrides of
removeListener that
work after super.removeListener go here.Source§impl FocusNodeLeaf for FocusTraversalGroupNode
impl FocusNodeLeaf for FocusTraversalGroupNode
Source§fn focus_node_data(self: Handle<Self>, app: &App) -> &FocusNodeData
fn focus_node_data(self: Handle<Self>, app: &App) -> &FocusNodeData
Source§fn focus_node_data_mut(self: Handle<Self>, app: &mut App) -> &mut FocusNodeData
fn focus_node_data_mut(self: Handle<Self>, app: &mut App) -> &mut FocusNodeData
See
focus_node_data.Source§fn as_node(self: Handle<Self>) -> AnyFocusNode
fn as_node(self: Handle<Self>) -> AnyFocusNode
Source§fn as_scope(self: Handle<Self>) -> Option<Handle<FocusScopeNode>>
fn as_scope(self: Handle<Self>) -> Option<Handle<FocusScopeNode>>
Dart’s
node is FocusScopeNode.Source§fn nearest_scope(
self: Handle<Self>,
app: &mut App,
) -> Option<Handle<FocusScopeNode>>
fn nearest_scope( self: Handle<Self>, app: &mut App, ) -> Option<Handle<FocusScopeNode>>
Returns the nearest enclosing scope node above this node, including this node, if it’s
a scope.
Source§fn descendants_are_focusable(self: Handle<Self>, app: &App) -> bool
fn descendants_are_focusable(self: Handle<Self>, app: &App) -> bool
If false, will disable focus for all of this node’s descendants.
Source§fn traversal_children(self: Handle<Self>, app: &mut App) -> Vec<AnyFocusNode>
fn traversal_children(self: Handle<Self>, app: &mut App) -> Vec<AnyFocusNode>
An iterator over the children that are allowed to be traversed by the
FocusTraversalPolicy.Source§fn traversal_descendants(self: Handle<Self>, app: &mut App) -> Vec<AnyFocusNode>
fn traversal_descendants(self: Handle<Self>, app: &mut App) -> Vec<AnyFocusNode>
Returns all descendants which do not have the
skip_traversal and do have the
can_request_focus flag set.Source§fn do_request_focus(self: Handle<Self>, app: &mut App, find_first_focus: bool)
fn do_request_focus(self: Handle<Self>, app: &mut App, find_first_focus: bool)
Requests the primary focus for this node; overridden by
FocusScopeNode.Source§fn debug_fill_properties(
self: Handle<Self>,
app: &App,
properties: &mut DiagnosticPropertiesBuilder,
)
fn debug_fill_properties( self: Handle<Self>, app: &App, properties: &mut DiagnosticPropertiesBuilder, )
Dart’s
FocusNode.debugFillProperties, which FocusScopeNode’s own body calls where
Dart writes super.Source§fn debug_describe_children(
self: Handle<Self>,
app: &mut App,
) -> Vec<Rc<dyn DiagnosticsNode>>
fn debug_describe_children( self: Handle<Self>, app: &mut App, ) -> Vec<Rc<dyn DiagnosticsNode>>
Dart’s
FocusNode.debugDescribeChildren: each child, named Child 1, Child 2, ….Source§fn to_string_short(self: Handle<Self>, app: &App) -> String
fn to_string_short(self: Handle<Self>, app: &App) -> String
Dart’s
FocusNode.toStringShort: the identity, then the debug label and the focus
markers.Source§fn on_key_event(
self: Handle<Self>,
app: &App,
) -> Option<FocusOnKeyEventCallback>
fn on_key_event( self: Handle<Self>, app: &App, ) -> Option<FocusOnKeyEventCallback>
Source§fn set_on_key_event(
self: Handle<Self>,
app: &mut App,
value: Option<FocusOnKeyEventCallback>,
)
fn set_on_key_event( self: Handle<Self>, app: &mut App, value: Option<FocusOnKeyEventCallback>, )
Source§fn parent(self: Handle<Self>, app: &App) -> Option<AnyFocusNode>
fn parent(self: Handle<Self>, app: &App) -> Option<AnyFocusNode>
See
AnyFocusNode::parent.Source§fn descendants(self: Handle<Self>, app: &mut App) -> Vec<AnyFocusNode>
fn descendants(self: Handle<Self>, app: &mut App) -> Vec<AnyFocusNode>
Source§fn highlight_mode(self: Handle<Self>, app: &mut App) -> FocusHighlightMode
fn highlight_mode(self: Handle<Self>, app: &mut App) -> FocusHighlightMode
Source§fn enclosing_scope(
self: Handle<Self>,
app: &mut App,
) -> Option<Handle<FocusScopeNode>>
fn enclosing_scope( self: Handle<Self>, app: &mut App, ) -> Option<Handle<FocusScopeNode>>
Source§fn attach(
self: Handle<Self>,
app: &mut App,
context: Option<BuildContext>,
on_key_event: Option<FocusOnKeyEventCallback>,
) -> Ref<FocusAttachment>
fn attach( self: Handle<Self>, app: &mut App, context: Option<BuildContext>, on_key_event: Option<FocusOnKeyEventCallback>, ) -> Ref<FocusAttachment>
See
AnyFocusNode::attach.Source§fn request_focus(self: Handle<Self>, app: &mut App, node: Option<AnyFocusNode>)
fn request_focus(self: Handle<Self>, app: &mut App, node: Option<AnyFocusNode>)
Auto Trait Implementations§
impl !RefUnwindSafe for FocusTraversalGroupNode
impl !Send for FocusTraversalGroupNode
impl !Sync for FocusTraversalGroupNode
impl !UnwindSafe for FocusTraversalGroupNode
impl Forget for FocusTraversalGroupNode
impl Freeze for FocusTraversalGroupNodewhere
*const u8 is !null: Freeze,
PhantomData<Option<Listener>>: Freeze,
*const RcInner<Cell<usize>> is !null: Freeze,
PhantomData<RcInner<Cell<usize>>>: Freeze,
NonZero<u32>: Freeze,
&'static ElementVTable: Freeze,
*const RcInner<dyn Fn(&mut App, AnyFocusNode, &KeyEvent) -> KeyEventResult> is !null: Freeze,
PhantomData<RcInner<dyn Fn(&mut App, AnyFocusNode, &KeyEvent) -> KeyEventResult>>: Freeze,
PhantomData<fn() -> FocusManager>: Freeze,
PhantomData<AnyFocusNode>: Freeze,
PhantomData<Retained<AnyFocusNode>>: Freeze,
&'static FocusNodeVTable: Freeze,
PhantomData<u8>: Freeze,
PhantomData<fn() -> FocusAttachment>: Freeze,
*const RcInner<Keep> is !null: Freeze,
PhantomData<RcInner<Keep>>: Freeze,
PhantomData<fn() -> FocusScopeNode>: Freeze,
&'static FocusTraversalPolicyVTable: Freeze,
impl Move for FocusTraversalGroupNode
impl Unpin for FocusTraversalGroupNodewhere
*const u8 is !null: Unpin,
Rc<dyn Fn(&mut App)>: Unpin,
NonZero<u32>: Unpin,
*const (): Unpin,
Rc<Cell<usize>>: Unpin,
&'static ElementVTable: Unpin,
Rc<dyn Fn(&mut App, AnyFocusNode, &KeyEvent) -> KeyEventResult>: Unpin,
&'static FocusNodeVTable: Unpin,
Rc<Keep>: Unpin,
&'static FocusTraversalPolicyVTable: Unpin,
impl UnsafeUnpin for FocusTraversalGroupNodewhere
*const u8 is !null: UnsafeUnpin,
PhantomData<Option<Listener>>: UnsafeUnpin,
*const RcInner<Cell<usize>> is !null: UnsafeUnpin,
PhantomData<RcInner<Cell<usize>>>: UnsafeUnpin,
NonZeroU32Inner: UnsafeUnpin,
&'static ElementVTable: UnsafeUnpin,
*const RcInner<dyn Fn(&mut App, AnyFocusNode, &KeyEvent) -> KeyEventResult> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Fn(&mut App, AnyFocusNode, &KeyEvent) -> KeyEventResult>>: UnsafeUnpin,
PhantomData<fn() -> FocusManager>: UnsafeUnpin,
PhantomData<AnyFocusNode>: UnsafeUnpin,
PhantomData<Retained<AnyFocusNode>>: UnsafeUnpin,
&'static FocusNodeVTable: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<fn() -> FocusAttachment>: UnsafeUnpin,
*const RcInner<Keep> is !null: UnsafeUnpin,
PhantomData<RcInner<Keep>>: UnsafeUnpin,
PhantomData<fn() -> FocusScopeNode>: UnsafeUnpin,
&'static FocusTraversalPolicyVTable: UnsafeUnpin,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more