pub enum SystemChange {
Show 28 variants
TextSelectionClick {
position: LogicalPosition,
timestamp: Instant,
},
TextSelectionDrag {
start_position: LogicalPosition,
current_position: LogicalPosition,
},
ApplySelectionOp {
target: DomNodeId,
op: SelectionOp,
},
CopyToClipboard,
CutToClipboard {
target: DomNodeId,
},
PasteFromClipboard,
SelectAllText,
UndoTextEdit {
target: DomNodeId,
},
RedoTextEdit {
target: DomNodeId,
},
AddCursorAtClick {
position: LogicalPosition,
},
SelectNextOccurrence {
target: DomNodeId,
},
ApplyPendingTextInput,
ApplyTextChangeset,
ActivateNodeDrag {
dom_id: DomId,
node_id: NodeId,
},
ActivateWindowDrag,
InitDragVisualState,
SetDragOverState {
target: DomNodeId,
active: bool,
},
UpdateDropTarget {
target: DomNodeId,
},
UpdateDragGpuTransform,
DeactivateDrag,
SetFocus {
new_focus: Option<DomNodeId>,
old_focus: Option<DomNodeId>,
},
ClearAllSelections,
FinalizePendingFocusChanges,
ScrollSelectionIntoView,
ScrollNodeIntoView {
target: DomNodeId,
},
ScrollCursorIntoViewAfterTextInput,
StartAutoScrollTimer,
StopAutoScrollTimer,
}Expand description
Framework-determined side effects (system changes).
Unlike CallbackChange (from user callbacks), these are determined by the
framework’s event analysis: hit tests, gesture detection, focus rules,
text selection, keyboard shortcuts, etc.
Both CallbackChange (user) and SystemChange (framework) are processed
through exhaustive match on PlatformWindowV2 — adding a new variant
causes a compile error in apply_system_change().
Variants§
TextSelectionClick
Process a mouse click for text selection (single/double/triple click).
TextSelectionDrag
Extend text selection via mouse drag.
ApplySelectionOp
Unified selection operation: cursor movement, selection extension, or deletion.
Replaces the old ArrowKeyNavigation and DeleteTextSelection variants. Every keyboard shortcut maps to a single SelectionOp — see its docs.
CopyToClipboard
Copy selected text to system clipboard (Ctrl+C / Cmd+C).
CutToClipboard
Cut selected text to clipboard and delete (Ctrl+X / Cmd+X).
PasteFromClipboard
Paste text from system clipboard at cursor (Ctrl+V / Cmd+V).
SelectAllText
Select all text in focused node (Ctrl+A / Cmd+A).
UndoTextEdit
Undo last text edit (Ctrl+Z / Cmd+Z).
RedoTextEdit
Redo last undone edit (Ctrl+Y / Ctrl+Shift+Z / Cmd+Shift+Z).
AddCursorAtClick
Add a cursor at the clicked position (Ctrl+Click). The position will be hit-tested to find the text cursor location.
Fields
position: LogicalPositionSelectNextOccurrence
Select the next occurrence of the current selection’s text (Ctrl+D). If the primary selection is a cursor, expand it to the word first.
ApplyPendingTextInput
Apply pending text input from platform (keyboard/IME).
ApplyTextChangeset
Apply text changeset (incremental relayout).
ActivateNodeDrag
Activate node drag on a draggable element.
ActivateWindowDrag
Activate window drag (CSD titlebar).
InitDragVisualState
Set up drag visual state (:dragging pseudo-state, GPU transform key, DragDropManager sync).
SetDragOverState
Set :drag-over pseudo-state on a target node.
UpdateDropTarget
Update current drop target in drag context.
UpdateDragGpuTransform
Update GPU transform for active node drag.
DeactivateDrag
End drag: clear pseudo-states, remove GPU keys, end drag session.
SetFocus
Change focus to a new target (or clear focus if None). Handles: set_focused_node, apply_focus_restyle, scroll_node_into_view, cursor_blink_timer start/stop.
ClearAllSelections
Clear all text selections.
FinalizePendingFocusChanges
Finalize pending focus changes (cursor initialization after layout).
ScrollSelectionIntoView
Scroll cursor/selection into view.
ScrollNodeIntoView
Scroll a specific node into view.
ScrollCursorIntoViewAfterTextInput
Scroll cursor into view after text input (needs relayout first).
StartAutoScrollTimer
Start auto-scroll timer for drag-to-scroll (60Hz).
StopAutoScrollTimer
Cancel auto-scroll timer.
Trait Implementations§
Source§impl Clone for SystemChange
impl Clone for SystemChange
Source§fn clone(&self) -> SystemChange
fn clone(&self) -> SystemChange
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SystemChange
impl Debug for SystemChange
Source§impl FromIterator<SystemChange> for SystemChangeVec
impl FromIterator<SystemChange> for SystemChangeVec
Source§fn from_iter<T>(iter: T) -> Selfwhere
T: IntoIterator<Item = SystemChange>,
fn from_iter<T>(iter: T) -> Selfwhere
T: IntoIterator<Item = SystemChange>,
Source§impl PartialEq for SystemChange
impl PartialEq for SystemChange
Source§fn eq(&self, other: &SystemChange) -> bool
fn eq(&self, other: &SystemChange) -> bool
self and other values to be equal, and is used by ==.