Skip to main content

Crate fret_ui

Crate fret_ui 

Source
Expand description

UI runtime contract and mechanisms for the Fret workspace.

This crate focuses on the mechanisms needed for editor-grade UI (tree, layout, input routing, paint orchestration) rather than policy-heavy components. Radix/shadcn-style interaction policies live in the ecosystem layer (fret-ui-kit, fret-ui-shadcn) instead.

For module ownership and “where should this go?” guidance, see crates/fret-ui/README.md.

§Where to start

  • UiTree: retained UI tree and per-window interaction state machine
  • ElementContext: per-frame context passed to element constructors
  • [AnyElement]: type-erased element node used by the declarative surface
  • Theme/ThemeConfig: token-driven theme configuration

Most applications should not wire this crate directly; prefer fret-bootstrap or the ecosystem fret facade for the “golden path” runner/driver wiring.

Re-exports§

pub use theme::keys as theme_keys;
pub use elements::ElementContext;
pub use elements::ElementContextAccess;
pub use elements::ElementRuntime;
pub use elements::GlobalElementId;
pub use pending_shortcut::PendingShortcutOverlayState;
pub use scroll::ScrollHandle;
pub use scroll::ScrollStrategy;
pub use scroll::VirtualListScrollHandle;
pub use theme::Theme;
pub use theme::ThemeConfig;
pub use theme::ThemeSnapshot;
pub use theme_keys::ThemeColorKey;
pub use theme_keys::ThemeMetricKey;
pub use theme_keys::ThemeNamedColorKey;
pub use tree::OverlayRootOptions;
pub use tree::PaintCachePolicy;
pub use tree::UiDebugFrameStats;
pub use tree::UiDebugHitTest;
pub use tree::UiDebugHoverDeclarativeInvalidationHotspot;
pub use tree::UiDebugLayerInfo;
pub use tree::UiLayerId;
pub use tree::UiTree;

Modules§

action
cache_key
canvas
declarative
element
elements
focus_visible
frame_pipeline
host
input_modality
internal_drag
Internal drag routing helpers.
layout_constraints
layout_engine
layout_pass
overlay_placement
paint
pending_shortcut
pixel_snap
scroll
theme
tree
virtual_list

Structs§

ResizablePanelGroupStyle
TextAreaStyle
TextInputStyle
UiFrameCx

Enums§

CommandAvailability
Command availability query result used by UiTree::is_command_available (ADR 0218).
Invalidation
SvgSource

Traits§

UiHost
Host services required by the retained UI runtime (fret-ui).

Type Aliases§

ItemKey
Stable key type used by keyed element APIs (e.g. lists and cached subtrees).
UiFrameContext