Expand description
Layer 1+2 of Frust: the declarative view API, the retained widget tree, box-constraint layout,
and the rebuild/layout/paint pass skeleton. Modelled on xilem/Masonry, depending on neither,
with no unsafe.
anim— the frame clock, curves, tweens, springs and animation controllers.app— theRenderRooteach platform shell drives through rebuild, layout and paint.component—Component, a subtree with retained local state and its ownOwner.event— input events and theEventCtxhandlers mutate state through.hotpatch(featurehotpatch) — the hot-patch seam everyComponent::buildruns through.hit— hit tests for content drawn under an arbitrarykurbo::Affine.input— slop/wheel constants,VelocityTrackerand fling-decay math.insets— theWindowInsetssafe-area and keyboard inset model.layout— theBoxConstraintsbox model.overlay— the portal a widget floats a pod above the whole app through.retained— retained-page keys and the renderer’s resident-key ledger.selection_toolbar— a text field’s toolbar request and the policy/builder slots.semantics— the accessibility tree pass behindSemanticsUpdate.shortcuts— theChordspec and the per-paint keyboard-shortcut declarations.sliver— the sliver protocol a scrolling viewport lays children out with.tree— theWidgetTreearena and the read-onlyInspectNodewalk.view— theViewtrait,ChangeFlags,BuildCtxandViewSeq.widget— theWidgettrait, its contexts,PaintSceneandChildPod.
Re-exports§
pub use anim::AnimationController;pub use anim::AnimationStatus;pub use anim::Curve;pub use anim::FrameTime;pub use anim::Lerp;pub use anim::Spring;pub use anim::SpringDesc;pub use anim::Tween;pub use app::FocusRingPolicy;pub use app::Orientation;pub use app::RenderRoot;pub use app::WindowMetrics;pub use component::Component;pub use component::ComponentView;pub use component::ComponentWidget;pub use component::component;pub use event::CursorIcon;pub use event::EditCommand;pub use event::EditingState;pub use event::EventCtx;pub use event::EventOutcome;pub use event::EventResult;pub use event::ImeContentType;pub use event::ImeEvent;pub use event::ImeState;pub use event::InputEvent;pub use event::Key;pub use event::KeyEvent;pub use event::Modifiers;pub use event::NamedKey;pub use event::OverlayEvent;pub use event::OverlayEventKind;pub use event::PointerButton;pub use event::PointerEvent;pub use event::PointerPhase;pub use event::ScrollDelta;pub use event::has_pending_result_flush;pub use event::mark_focus_orphaned;pub use event::mark_pending_result_flush;pub use event::take_focus_orphaned;pub use event::take_pending_result_flush;pub use input::FLING_DECAY;pub use input::FLING_STOP;pub use input::MOUSE_SLOP;pub use input::TOUCH_SLOP;pub use input::VELOCITY_WINDOW_MS;pub use input::VelocityTracker;pub use input::WHEEL_LINE_PX;pub use input::fling_decay;pub use input::fling_displacement;pub use insets::CornerInset;pub use insets::CornerInsets;pub use insets::EdgeInsets as WindowEdgeInsets;pub use insets::WindowInsets;pub use layout::BoxConstraints;pub use overlay::OutsideTap;pub use overlay::OverlayBand;pub use overlay::OverlayEntry;pub use overlay::OverlayHit;pub use overlay::OverlayInput;pub use overlay::OverlayKey;pub use overlay::OverlayKeys;pub use overlay::OverlayPod;pub use retained::RetainedEntry;pub use retained::RetainedKey;pub use retained::RetainedLedger;pub use selection_toolbar::SelectionToolbarActions;pub use selection_toolbar::SelectionToolbarBuilder;pub use selection_toolbar::SelectionToolbarPolicy;pub use selection_toolbar::SelectionToolbarRequest;pub use selection_toolbar::install_selection_toolbar_builder_if_unset;pub use selection_toolbar::lock_selection_toolbar_policy;pub use selection_toolbar::selection_toolbar_builder;pub use selection_toolbar::selection_toolbar_policy;pub use selection_toolbar::set_selection_toolbar_builder;pub use selection_toolbar::set_selection_toolbar_policy;pub use semantics::SemanticsCtx;pub use semantics::SemanticsUpdate;pub use shortcuts::Chord;pub use shortcuts::ChordParseError;pub use shortcuts::ShortcutDecl;pub use shortcuts::ShortcutHint;pub use shortcuts::ShortcutId;pub use shortcuts::ShortcutScope;pub use sliver::GrowthDirection;pub use sliver::ScrollAxis;pub use sliver::ScrollDirection;pub use sliver::SliverConstraints;pub use sliver::SliverGeometry;pub use sliver::SliverWidget;pub use tree::InspectNode;pub use tree::WidgetPod;pub use tree::WidgetTree;pub use view::AnyView;pub use view::BuildCtx;pub use view::ChangeFlags;pub use view::View;pub use view::ViewSeq;pub use view::WidgetId;pub use view::any;pub use view::views;pub use widget::ChildPod;pub use widget::DiscardScene;pub use widget::HeroDirective;pub use widget::HeroFrames;pub use widget::LayoutCtx;pub use widget::PaintCtx;pub use widget::PaintOutcome;pub use widget::PaintScene;pub use widget::TickClass;pub use widget::Widget;pub use accesskit;
Modules§
- anim
- Animation vocabulary: the shared frame clock (
FrameTime) plus the pure math widgets consume it through: easingCurves,Tweeninterpolation, analyticSpringdynamics, and theAnimationController. - app
- The render root: the object each platform shell drives each frame.
- component
- Component: Flutter’s
StatefulWidgetanalog. - event
- Layer 2 input: the
InputEventvocabulary and theEventCtxa widget mutates handling it. - hit
- Hit-testing under an arbitrary
kurbo::Affine: the helpers a transformedChildPoduses, for canvas hit closures and pan/zoom containers. - input
- Pure, deterministic gesture helpers: slop/wheel constants, a trailing-window
VelocityTrackerand fling-decay math (cross-checked against masonry’s). Times are logical ms; positions and velocities are logical px and px/s. - insets
- Window insets: Flutter’s
ViewportMetricsinset model in the framework core. - layout
- Box-constraint layout, the Flutter/Masonry box model (not CSS): a parent
hands each child
BoxConstraintsand the child returns aSizewithin them. - overlay
- The overlay portal: how a widget anywhere in the tree floats a pod above the whole app (menus, popovers, tooltips, selection toolbars).
- retained
- Retained-page keys and the resident-key ledger.
- selection_
toolbar - The selection-toolbar seam: what a focused text field publishes about its selection, and who draws the copy/cut/paste/select-all bar over it.
- semantics
- The semantics seam: a pull-based accessibility tree pass.
- shortcuts
- Keyboard shortcuts: the
Chordspec and the per-paint declaration table behindPaintCtx::register_shortcut. - sliver
- The sliver layout protocol for a scrolling viewport’s children, mirroring
Flutter’s
RenderSliver(rendering/sliver.dart). - tree
- The retained widget tree, backed by
tree_arena. - view
- Layer 1: the declarative
Viewtrait. - widget
- Layer 2: the retained
Widgettrait and its layout/paint contexts.
Structs§
- Corner
Radii - Re-exported so widgets can name
PaintScene’s argument types. Per-corner radii for a rounded rectangle, in the pre-transform coordinate space. - Dash
Pattern - Re-exported so widgets can name
PaintScene’s argument types. A stroke’s dash pattern: anonrun, anoffgap, and aphaseoffset into that repeating cycle — all lengths in the pre-transform coordinate space.