pub struct SequenceMember {
pub id: WidgetId,
pub role: MemberRole,
pub eligible_at: Option<EventTime>,
pub state: MemberState,
/* private fields */
}Expand description
One competitor for a pointer sequence.
Fields§
§id: WidgetIdThe competing node.
role: MemberRoleWhat it is competing as.
eligible_at: Option<EventTime>The earliest time this member may win, when its activation defers it.
None means “as soon as its threshold is met”.
state: MemberStateWhere it stands.
Implementations§
Source§impl SequenceMember
impl SequenceMember
Sourcepub fn is_eligible_at(&self, now: EventTime) -> bool
pub fn is_eligible_at(&self, now: EventTime) -> bool
Whether this member may win at now. A member deferred by
DragActivation::AfterLongPress cannot win before its timer, and a
holding member cannot win at all until it releases.
Sourcepub fn own_drag_armed_at(&self, now: EventTime) -> bool
pub fn own_drag_armed_at(&self, now: EventTime) -> bool
Whether this member’s node may run its own drag/swipe recognizers at
now.
Always true for a member carrying no self-drag deferral — which is
every member a mouse ever enrols, and every member of every sequence on
a node that is not dual-role — so this predicate is inert everywhere the
dual-role shape does not occur.
Three answers, and the third is the load-bearing one:
- no self-drag →
true, unconditionally; - a self-drag still inside its deferral →
falseuntilnowreachesown_drag_eligible_at; - a withdrawn self-drag →
falsefor the rest of the press, and deliberately so. A withdrawal means the press is not the hold the deferral was waiting for — the pan half took it, or the travel disproved the hold — and the node’s recognizers must stay silenced afterwards, or a deferral ripening later would start the node’s drag under a finger that had already committed to something else. Because the gate this feeds (WidgetTree::sequence_blocks_arena’s rule) is per node, that silence covers the node’s tap family too, which is the same thingWidgetTree::cancel_member_tapsdoes to the pan winner explicitly. For a dual-role node mid-pan that is the wanted answer: a finger that has committed to a pan is not also tapping, double-tapping or long-pressing the surface it is panning. A completed tap is not lost to it either way:end_sequencenulls the sequence before the release is dispatched, andTapRecognizerdecides the release against its ownTapBoundary, so a press that wandered and lifted inside the node still taps.
Trait Implementations§
Source§impl Clone for SequenceMember
impl Clone for SequenceMember
Source§fn clone(&self) -> SequenceMember
fn clone(&self) -> SequenceMember
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more