Expand description
Window layout management: relayout, event processing, state sync. Window layout management for solver3/text3
This module provides the high-level API for managing layout state across frames, including caching, incremental updates, and display list generation.
The main entry point is LayoutWindow, which encapsulates all
the state needed to perform layout and maintain consistency
across window resizes and DOM updates.
Key subsystems managed by LayoutWindow:
- Text editing: cursor/selection management, IME preedit, undo/redo, and incremental text relayout
- Accessibility: tree construction and incremental updates for screen readers via accesskit
- VirtualView: callback invocation and recursive layout for virtualized scrollable content
- Scrolling: scroll state, scrollbar opacity, and scroll-into-view for cursors and selections
Re-exports§
pub use crate::managers::text_input::PendingTextEdit;
Structs§
- Dirty
Text Node - A text node that has been edited since the last full layout. This allows us to perform lightweight relayout without rebuilding the entire DOM.
- DomLayout
Result - Result of a layout pass for a single DOM, before display list generation
- Layout
Result - Result of a layout operation
- Layout
Window - A window-level layout manager that encapsulates all layout state and caching.
- NoCursor
Destination - Error when no cursor destination is available
- Scrollbar
Drag State - State for tracking scrollbar drag interaction
- Text
Changeset Result - Result of applying a text changeset
- Text
Constraints Cache - Cached text layout constraints for a node These are the layout parameters that were used to shape the text
Enums§
- Cursor
Blink Timer Action - Action to take for the cursor blink timer when focus changes
- Cursor
Movement Result - Result of a cursor movement operation
- Cursor
Navigation Direction - Direction for cursor navigation
- Scroll
Mode - Scroll animation mode
- Selection
Scroll Type - Type of selection bounds to scroll into view
- Text
Edit Type - Tooltip
Timer Action - Action for the tooltip-delay timer, returned by
LayoutWindow::handle_hover_change_for_tooltip(). Platform layer translates these tostart_timer/stop_timercalls onTOOLTIP_DELAY_TIMER_ID.
Functions§
- cursor_
blink_ timer_ callback - Callback for the cursor blink timer
- tooltip_
delay_ timer_ callback - Callback for the tooltip-delay timer.