Skip to main content

Event

Enum Event 

Source
pub enum Event {
Show 46 variants RichCommand { command: RichCommand, revision: u64, selection: Option<TextSelection>, }, RichRejected { revision: u64, }, RichEdit(Box<RichSnapshot>), RichSelection(Box<RichSnapshot>), Files(Box<FileEvent>), TreeNavigate { from: NodeId, command: TreeCommand, }, Clipboard { revision: u64, request: u64, outcome: ClipboardOutcome, }, GridNavigate { from: NodeId, command: GridCommand, }, InputEdit(InputEdit), CollapseComplete { revision: u64, }, PresenceComplete { revision: u64, }, ContextMenu { from: NodeId, point: ContextPoint, source: ContextSource, }, Sheet { from: NodeId, revision: u64, command: SheetCommand, }, NavigationPanel { from: NodeId, command: NavigationPanelCommand, }, Spin { from: NodeId, command: RangeCommand, }, Range { from: NodeId, command: RangeCommand, }, ScrollKeyboard { from: NodeId, command: ScrollCommand, }, ImageStatus { revision: u64, status: ImageStatus, }, Menu { from: NodeId, command: MenuCommand, }, PlotPointer { from: NodeId, pointer: PlotPointer, }, Pointer { from: NodeId, related: Option<NodeId>, phase: PointerPhase, }, PointerWithin { from: NodeId, related: Option<NodeId>, phase: PointerPhase, }, Submit { submitter: Option<NodeId>, }, Reset, Activate, DisplayClick(u16), Dismiss(DismissReason), ColorSchemeChanged { dark: bool, }, Keyboard { from: NodeId, command: KeyboardCommand, }, Palette { from: NodeId, }, Swipe { from: NodeId, phase: DragPhase, x: f64, y: f64, revision: u64, }, Drag { from: NodeId, phase: DragPhase, x: f64, y: f64, }, ValueChanged { value: String, composing: bool, revision: u64, }, Commit { value: String, revision: u64, }, CheckedChanged(bool), Tags { from: NodeId, revision: u64, command: TagsCommand, }, Choice { from: NodeId, command: ChoiceCommand, }, SelectChanged { keys: Vec<SemanticId>, revision: u64, }, FocusChanged(bool), FocusWithin { node: NodeId, focused: bool, }, Navigate { from: NodeId, command: Navigation, }, Typeahead { from: NodeId, text: String, at_millis: u64, }, Composition { active: bool, }, Scroll { x: f64, y: f64, viewport: Rect, ack: Option<ScrollAck>, }, Resize { size: Rect, viewport: Rect, }, Anchor { row: NodeId, within: f64, viewport: Rect, },
}

Variants§

§

RichCommand

Fields

§command: RichCommand
§revision: u64
§selection: Option<TextSelection>

Source inputs capture the exact selection at keydown; rich editors continue to use their independently accepted rich selection.

§

RichRejected

Current physical content exceeded the finite rich document grammar or budgets. The host restores its accepted value before publishing this.

Fields

§revision: u64
§

RichEdit(Box<RichSnapshot>)

§

RichSelection(Box<RichSnapshot>)

§

Files(Box<FileEvent>)

§

TreeNavigate

Fields

§from: NodeId
§command: TreeCommand
§

Clipboard

Fields

§revision: u64
§request: u64
§

GridNavigate

Fields

§from: NodeId
§command: GridCommand
§

InputEdit(InputEdit)

§

CollapseComplete

Terminal presentation observation; valid while the closing subtree is logically hidden/inert, without admitting business input there.

Fields

§revision: u64
§

PresenceComplete

Fields

§revision: u64
§

ContextMenu

Fields

§from: NodeId
§

Sheet

Fields

§from: NodeId
§revision: u64
§

NavigationPanel

§

Spin

Fields

§from: NodeId
§

Range

Fields

§from: NodeId
§

ScrollKeyboard

Fields

§from: NodeId
§

ImageStatus

Terminal observation for one program-selected image request.

Fields

§revision: u64
§

Menu

Fields

§from: NodeId
§command: MenuCommand
§

PlotPointer

A queued observation in an explicitly observed View’s local border box.

Fields

§from: NodeId
§pointer: PlotPointer
§

Pointer

Fields

§from: NodeId
§related: Option<NodeId>
§

PointerWithin

Logical boundary observation derived from a physical pointer origin.

Fields

§from: NodeId
§related: Option<NodeId>
§

Submit

Native form default behavior is cancelled before this queued request. None represents a programmatic request or implicit keyboard submission.

Fields

§submitter: Option<NodeId>
§

Reset

§

Activate

§

DisplayClick(u16)

An activation of an explicitly declared target in a display instance.

§

Dismiss(DismissReason)

A request only: the application may keep controlled state open.

§

ColorSchemeChanged

Host preference, independent of an application’s explicit appearance.

Fields

§dark: bool
§

Keyboard

Physical origin remains explicit while App routes to the nearest observer.

Fields

§from: NodeId
§

Palette

Only the explicit palette chord; other application commands stay native.

Fields

§from: NodeId
§

Swipe

Start/Move/Cancel target the source. Drop targets a live accepting node.

Fields

§from: NodeId
§revision: u64
§

Drag

Fields

§from: NodeId
§

ValueChanged

Fields

§value: String
§composing: bool
§revision: u64
§

Commit

Fields

§value: String
§revision: u64
§

CheckedChanged(bool)

§

Tags

Fields

§from: NodeId
§revision: u64
§command: TagsCommand
§

Choice

Fields

§from: NodeId
§

SelectChanged

Fields

§revision: u64
§

FocusChanged(bool)

Direct focus origin. Hosts report this even if only an ancestor has a FocusWithin interest; App derives the logical ancestor observations.

§

FocusWithin

Focus transition originating at node, delivered to observing logical ancestors (including boxless Groups). FocusChanged itself stays direct.

Fields

§node: NodeId
§focused: bool
§

Navigate

Origin stays explicit when routed to the nearest logical observer.

Fields

§from: NodeId
§command: Navigation
§

Typeahead

Fields

§from: NodeId
§text: String
§at_millis: u64
§

Composition

Fields

§active: bool
§

Scroll

Fields

§viewport: Rect
§ack: Option<ScrollAck>

Last accepted assignment, separate from current x/y (which may already include native movement). None before any host assignment.

§

Resize

Border-box size and client viewport are distinct (borders/scrollbars). Size uses local x/y=0; adapters preserve fractional layout dimensions.

Fields

§size: Rect
§viewport: Rect
§

Anchor

Restore an existing visible row and its pixel inset at host handover.

Fields

§within: f64
§viewport: Rect

Implementations§

Source§

impl Event

Source

pub fn is_user_interaction(&self) -> bool

User input is suppressed by inherited inert regions. Resource/layout observations and terminal cleanup remain available to live Owners.

Source

pub fn is_terminal_loss(&self) -> bool

Cleanup observations still reach live scopes after suspension. Retired identities never become valid again because an event is terminal.

Source

pub fn validate_payload<'a>( &self, target: NodeId, node: impl Into<DescriptorView<'a>>, ) -> Result<(), Error>

Check typed host input before business handlers. Embedded identities’ liveness/ancestry require a tree and are checked by Memory::validate_event. Scroll offsets may be negative; local geometry must have x/y=0.

Source

pub fn kind(&self) -> EventKind

Trait Implementations§

Source§

impl Clone for Event

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 Event

Source§

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

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

impl PartialEq for Event

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Event

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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.