Skip to main content

Crate operad

Crate operad 

Source
Expand description

Operad is a small retained-mode UI document layer.

The crate intentionally contains only reusable primitives: layout, text measurement, hit testing, focus, animation, and optional renderer backends. Product-specific screens and game/application state should live in the consuming application crate.

Re-exports§

pub use core::document::CosmicTextMeasurer;
pub use core::document::length;
pub use core::document::root_style;
pub use core::document::AccessibilityAction;
pub use core::document::AccessibilityChecked;
pub use core::document::AccessibilityLiveRegion;
pub use core::document::AccessibilityMeta;
pub use core::document::AccessibilityNode;
pub use core::document::AccessibilityRelationKind;
pub use core::document::AccessibilityRelations;
pub use core::document::AccessibilityRole;
pub use core::document::AccessibilitySortDirection;
pub use core::document::AccessibilityStateKind;
pub use core::document::AccessibilitySummary;
pub use core::document::AccessibilitySummaryItem;
pub use core::document::AccessibilityTree;
pub use core::document::AccessibilityValueRange;
pub use core::document::AccessibilityValueRangeIssue;
pub use core::document::AnimatedValues;
pub use core::document::AnimationActiveTransitionSnapshot;
pub use core::document::AnimationBlendBinding;
pub use core::document::AnimationCondition;
pub use core::document::AnimationInputValue;
pub use core::document::AnimationMachine;
pub use core::document::AnimationNumberComparison;
pub use core::document::AnimationState;
pub use core::document::AnimationTickOutcome;
pub use core::document::AnimationTickReport;
pub use core::document::AnimationTransition;
pub use core::document::AnimationTrigger;
pub use core::document::ApproxTextMeasurer;
pub use core::document::AvailableSize;
pub use core::document::CanvasContent;
pub use core::document::CanvasContextDescriptor;
pub use core::document::CanvasContextKind;
pub use core::document::CanvasInteractionPolicy;
pub use core::document::CanvasRenderMode;
pub use core::document::CanvasRenderProgram;
pub use core::document::CanvasShaderConstant;
pub use core::document::ClipBehavior;
pub use core::document::ClipScope;
pub use core::document::ColorRgba;
pub use core::document::ComputedLayout;
pub use core::document::EditPhase;
pub use core::document::FocusDirection;
pub use core::document::FontFamily;
pub use core::document::FontStretch;
pub use core::document::FontStyle;
pub use core::document::FontWeight;
pub use core::document::ImageContent;
pub use core::document::InputBehavior;
pub use core::document::InteractionVisuals;
pub use core::document::IntrinsicSize;
pub use core::document::KeyCode;
pub use core::document::KeyModifiers;
pub use core::document::KnownSize;
pub use core::document::LayoutSnapshot;
pub use core::document::LayoutStyle;
pub use core::document::PaintCompositorLayer;
pub use core::document::PaintItem;
pub use core::document::PaintKind;
pub use core::document::PaintList;
pub use core::document::PaintTransform;
pub use core::document::ScenePrimitive;
pub use core::document::ScrollAxes;
pub use core::document::ScrollState;
pub use core::document::ShaderEffect;
pub use core::document::ShaderUniform;
pub use core::document::StrokeStyle;
pub use core::document::TextContent;
pub use core::document::TextInteractionStyles;
pub use core::document::TextMeasurer;
pub use core::document::TextStyle;
pub use core::document::TextWrap;
pub use core::document::UiContent;
pub use core::document::UiDocument;
pub use core::document::UiDocumentScale;
pub use core::document::UiFocusState;
pub use core::document::UiInputEvent;
pub use core::document::UiInputResult;
pub use core::document::UiNode;
pub use core::document::UiNodeId;
pub use core::document::UiNodeLayoutConstraint;
pub use core::document::UiNodeStyle;
pub use core::document::UiPoint;
pub use core::document::UiPortalId;
pub use core::document::UiPortalTarget;
pub use core::document::UiRect;
pub use core::document::UiSize;
pub use core::document::UiVisual;
pub use core::document::UiWheelEvent;
pub use core::document::ANIMATION_INPUT_ACTIVATED;
pub use core::document::ANIMATION_INPUT_ACTIVE;
pub use core::document::ANIMATION_INPUT_FOCUSED;
pub use core::document::ANIMATION_INPUT_HOVER;
pub use core::document::ANIMATION_INPUT_POINTER_NORM_X;
pub use core::document::ANIMATION_INPUT_POINTER_NORM_Y;
pub use core::document::ANIMATION_INPUT_POINTER_X;
pub use core::document::ANIMATION_INPUT_POINTER_Y;
pub use core::document::ANIMATION_INPUT_PRESSED;
pub use core::document::APP_OVERLAY_PORTAL;
pub use accessibility::FocusNavigationDirection;
pub use accessibility::FocusRestoreTarget;
pub use accessibility::FocusTrap;
pub use actions::WidgetAction;
pub use actions::WidgetActionBinding;
pub use actions::WidgetActionId;
pub use actions::WidgetActionKind;
pub use actions::WidgetActionMode;
pub use actions::WidgetActionQueue;
pub use actions::WidgetActionTrigger;
pub use actions::WidgetActivation;
pub use actions::WidgetDrag;
pub use actions::WidgetDragPhase;
pub use actions::WidgetFocusChange;
pub use actions::WidgetPointerEdit;
pub use actions::WidgetSelection;
pub use actions::WidgetTextEdit;
pub use actions::WidgetValueEditPhase;
pub use assets::BuiltInIcon;
pub use commands::Command;
pub use commands::CommandEffect;
pub use commands::CommandId;
pub use commands::CommandMeta;
pub use commands::CommandRegistry;
pub use commands::CommandScope;
pub use commands::Shortcut;
pub use drag_drop::DragDropSurfaceKind;
pub use drag_drop::DropPayloadFilter;
pub use forms::FieldId;
pub use forms::FieldState;
pub use forms::FormId;
pub use forms::FormState;
pub use forms::ValidationMessage;
pub use forms::ValidationSeverity;
pub use i18n::BidiPolicy;
pub use i18n::DynamicLabelMeta;
pub use i18n::LabelUpdatePolicy;
pub use i18n::LayoutMirrorMode;
pub use i18n::LocaleId;
pub use i18n::LocaleIdentifierError;
pub use i18n::LocalizationPolicy;
pub use i18n::ResolvedTextDirection;
pub use i18n::TextDirection;
pub use input::DragGesture;
pub use input::GestureEvent;
pub use input::GesturePhase;
pub use input::PointerButton;
pub use input::PointerButtons;
pub use input::PointerClick;
pub use input::PointerEventKind;
pub use input::PointerId;
pub use input::PointerKind;
pub use layout::ContainedFlowLayout;
pub use layout::Layout;
pub use layout::LayoutAlignment;
pub use layout::LayoutDimension;
pub use layout::LayoutDisplay;
pub use layout::LayoutFlexDirection;
pub use layout::LayoutFlexWrap;
pub use layout::LayoutGap;
pub use layout::LayoutGridTrack;
pub use layout::LayoutInset;
pub use layout::LayoutInsets;
pub use layout::LayoutJustifyContent;
pub use layout::LayoutLength;
pub use layout::LayoutPosition;
pub use layout::LayoutSize;
pub use layout::LayoutSpacing;
pub use overlays::OverlayDismissPolicy;
pub use overlays::OverlayDismissReason;
pub use overlays::OverlayEntry;
pub use overlays::OverlayFocusRestoreTarget;
pub use overlays::OverlayId;
pub use overlays::OverlayKind;
pub use overlays::OverlayStack;
pub use paint::AlignedStroke;
pub use paint::CornerRadii;
pub use paint::GradientStop;
pub use paint::ImageAlignment;
pub use paint::ImageFit;
pub use paint::LinearGradient;
pub use paint::PaintBrush;
pub use paint::PaintEffect;
pub use paint::PaintEffectKind;
pub use paint::PaintImage;
pub use paint::PaintPath;
pub use paint::PaintRect;
pub use paint::PaintText;
pub use paint::PathFillRule;
pub use paint::PathStrokeOptions;
pub use paint::PathVerb;
pub use paint::PixelSnapPolicy;
pub use paint::StrokeAlignment;
pub use paint::StrokeLineCap;
pub use paint::StrokeLineJoin;
pub use paint::TextHorizontalAlign;
pub use paint::TextOverflow;
pub use paint::TextVerticalAlign;
pub use runtime::native;
pub use testing::DirtyFlags;
pub use testing::FrameTiming;
pub use theme::color_with_alpha;
pub use theme::text_style_with_color;
pub use theme::text_style_with_scale;
pub use theme::ColorTokens;
pub use theme::ComponentIconStates;
pub use theme::ComponentLayoutTokens;
pub use theme::ComponentRole;
pub use theme::ComponentState;
pub use theme::ComponentStateSlot;
pub use theme::ComponentStyle;
pub use theme::ComponentTextStates;
pub use theme::ComponentTokens;
pub use theme::ComponentVisualStates;
pub use theme::EffectTokens;
pub use theme::IconStyle;
pub use theme::LayerEffect;
pub use theme::LayerEffectKind;
pub use theme::MotionCurve;
pub use theme::MotionTokens;
pub use theme::OpacityTokens;
pub use theme::RadiusTokens;
pub use theme::ScopedThemeRegistry;
pub use theme::SpacingTokens;
pub use theme::StrokeTokens;
pub use theme::Theme;
pub use theme::ThemePatch;
pub use theme::ThemeScope;
pub use theme::ThemeScopeError;
pub use theme::ThemeScopeId;
pub use theme::ThemeScopeKind;
pub use theme::TypographyTokens;
pub use theme::OPERAD_DARK_THEME_NAME;

Modules§

accessibility
Backend-facing accessibility contracts.
actions
Renderer-neutral widget action events.
adapters
Optional host, renderer, and platform adapter integrations.
assets
Renderer-neutral icon and image asset registry contracts.
charts
Renderer-neutral chart, sparkline, and dense grid-map geometry helpers.
commands
Command metadata and keyboard shortcut routing primitives.
compositor
Backend-neutral compositor and layer contracts.
core
Core retained UI contracts.
debug
Renderer-neutral debug snapshots and dumps.
diagnostics
Diagnostics, error, limit, and test-support APIs.
display
Retained display-list cache contracts for static and semi-static surfaces.
domain
Higher-level reusable UI domains.
drag_drop
Renderer-neutral drag/drop surface metadata.
editor
Renderer-neutral editor surface geometry and interaction helpers.
effective_geometry
Backend-neutral effective geometry contracts.
errors
Structured error classification and local fallback contracts.
fonts
Backend-neutral font lifecycle and cache accounting.
forms
Form and validation lifecycle contracts.
host
Host adapter contracts for pre-paint interaction state.
i18n
Locale, text-direction, and dynamic label policy primitives.
input
Renderer-neutral raw input and gesture routing primitives.
input_devices
Higher-level input device policy contracts.
interaction
Backend-neutral input and interaction contracts.
layout
Operad-owned public layout primitives.
layout_animation
Layout animation planning.
limits
Resource and input limit policies with non-panicking validation reports.
navigation
Backend-neutral keyboard navigation contracts for composite widgets.
overlays
Shared overlay stack model for popovers, menus, dialogs, and tooltips.
paint
Renderer-neutral paint primitives for dense application and editor surfaces.
platform
Backend-neutral platform contracts for Operad adapters.
prelude
Common Operad imports for application code.
render
Backend-neutral rendering and display-list contracts.
renderer
Renderer/backend adapter contracts for Operad paint lists.
resource_cache
Backend-neutral resource lifecycle and cache accounting.
runtime
Backend-neutral runtime and frame scheduling contracts.
scrolling
Backend-neutral contracts for advanced scrolling behavior.
shell
Persistable app-shell and workspace state contracts.
state
Backend-neutral retained widget state and lifecycle reconciliation.
tasks
Backend-neutral async task lifecycle contracts.
testing
Renderer-neutral testing helpers for Operad documents.
theme
Backend-neutral theme tokens for Operad v3.
theme_stability
Stability records for v5 theme and design-token APIs.
tooltips
Tooltip and shortcut-display contracts for commands and compact controls.
transactions
Reusable edit transaction, selection, and text edit history primitives.
versioning
Public API stability and feature-versioning markers.
virtualization
Backend-neutral virtualization contracts for large retained collections.
wgpu_renderer
widgets
windows
Backend-neutral multi-window routing state.