FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    PreviewStageBoard

    struct · ferroui-designer · v0.5.0

    struct PreviewStageBoard
    

    One UI-thread collection of native comparison stages across the host's open document buffers. It never owns document history or performs authored mutations.

    View source

    Members

    new

    fn new() -> Self
    

    Source

    epoch

    fn epoch(self: &Self) -> u64
    

    Source

    active

    fn active(self: &Self) -> Option<PreviewStageId>
    

    Source

    prototype

    fn prototype(self: &Self) -> PreviewPrototype
    

    Source

    set_prototype

    fn set_prototype(self: &mut Self, prototype: PreviewPrototype) -> Result<(), String>
    

    Replace local interaction descriptors without rebuilding native stages or mutating authored source. Rejected graphs leave the accepted board intact.

    Source

    stages

    fn stages(self: &Self) -> Vec<PreviewStageInfo>
    

    Source

    stage

    fn stage(self: &Self, id: PreviewStageId) -> Option<PreviewStageInfo>
    

    Source

    control

    fn control(self: &Self, id: PreviewStageId) -> Option<Ref<Control>>
    

    Source

    sync_sources

    fn sync_sources(self: &mut Self, active_uri: &str, sources: Vec<PreviewStageSource>, options: PreviewHostOptions, options_epoch: u64) -> Result<(), String>
    

    Source

    add

    fn add(self: &mut Self, configuration: PreviewStageConfiguration) -> Result<PreviewStageId, String>
    

    Source

    update

    fn update(self: &mut Self, id: PreviewStageId, configuration: PreviewStageConfiguration) -> Result<(), String>
    

    Source

    set_active

    fn set_active(self: &mut Self, id: PreviewStageId) -> Result<(), String>
    

    Source

    duplicate

    fn duplicate(self: &mut Self, id: PreviewStageId) -> Result<PreviewStageId, String>
    

    Source

    remove

    fn remove(self: &mut Self, id: PreviewStageId) -> Result<(), String>
    

    Source

    move_stage

    fn move_stage(self: &mut Self, id: PreviewStageId, index: usize) -> Result<(), String>
    

    Source

    set_paused

    fn set_paused(self: &mut Self, id: PreviewStageId, paused: bool) -> Result<(), String>
    

    Source

    refresh

    fn refresh(self: &mut Self, id: PreviewStageId) -> Result<(), String>
    

    Explicit refresh also works while automatic updates are paused.

    Source

    refresh_all

    fn refresh_all(self: &mut Self) -> Vec<(PreviewStageId, String)>
    

    Source

    compare_variants

    fn compare_variants(self: &mut Self, id: PreviewStageId, variants: Vec<(String, PreviewEnvironment)>) -> Result<Vec<PreviewStageId>, String>
    

    Create variants atomically with respect to descriptor validation and capacity. Each native failure remains isolated to its resulting card.

    Source

    add_configurations

    fn add_configurations(self: &mut Self, configurations: Vec<PreviewStageConfiguration>) -> Result<Vec<PreviewStageId>, String>
    

    Add a bounded comparison batch. Descriptor validation and capacity are checked for the entire batch before any native factory can be called. Individual native loading failures remain visible on their own cards.

    Source

    manifest

    fn manifest(self: &Self) -> PreviewStageManifest
    

    Source

    snapshot

    fn snapshot(self: &Self) -> PreviewStageSnapshot
    

    Source

    restore_manifest

    fn restore_manifest(self: &mut Self, manifest: PreviewStageManifest) -> Result<(), String>
    

    Imported IDs are freshly allocated so callbacks from a retired board cannot address a new card. Validation finishes before any old stage is removed.

    Source

    restore

    fn restore(self: &mut Self, snapshot: PreviewStageSnapshot) -> Result<(), String>
    

    Source

    retarget_source

    fn retarget_source(self: &mut Self, old_uri: &str, new_uri: &str) -> Result<(), String>
    

    Call after a successful Save As, before synchronizing the new URI snapshots. The old graph stays visible but immediately loses source-selection authority.

    Source

    runtime_tree

    fn runtime_tree(self: &Self, id: PreviewStageId, kind: TreeKind) -> Result<Vec<RuntimeNode>, String>
    

    Source

    prototype_hotspot_bounds

    fn prototype_hotspot_bounds(self: &Self, id: PreviewStageId, anchor: &PreviewSourceAnchor) -> Result<ferroui_base::Rect, String>
    

    Resolve one authored hotspot against the exact accepted native graph. The returned axis-aligned rectangle uses stage logical coordinates and is clipped to the stage viewport and native ancestor clips. Call again immediately before activation: native scrolling and layout can move a target without source edits.

    Source

    source_is_current

    fn source_is_current(self: &Self, id: PreviewStageId, uri: &str, document: &Document, pending: bool, options_epoch: u64) -> bool
    

    Validate a supplied current buffer without synchronizing, constructing or refreshing anything. Read-only automation uses this before exposing source identities when an editor change precedes the board's next UI refresh.

    Source

    frame_is_current

    fn frame_is_current(self: &Self, id: PreviewStageId, uri: &str, document: &Document, pending: bool, options_epoch: u64) -> bool
    

    Check whether an accepted native frame represents these exact current buffers, including a paused frame explicitly refreshed at this revision. This does not grant source-selection or application-input authority. Hosts must also validate all their current dependency buffers through dependencies_are_current before publishing an image of the frame.

    Source

    dependencies_are_current

    fn dependencies_are_current(self: &Self, id: PreviewStageId, sources: &[PreviewStageSource]) -> bool
    

    Read-only validation against all current host buffers, including native include dependencies changed before the board's next synchronization.

    Source

    refresh_runtime_mappings

    fn refresh_runtime_mappings(self: &mut Self)
    

    Refresh identities after native attachment or template/item realization. This neither reloads source nor resets a stage's temporary interaction state.

    Source

    refresh_runtime_mapping

    fn refresh_runtime_mapping(self: &mut Self, id: PreviewStageId) -> Result<(), String>
    

    Refresh only the presented screen. Prototype playback can retain many screens without traversing every hidden graph on each native layout tick. The same accepted-source/dependency checks apply as the whole-board update.

    Source

    selection_token

    fn selection_token(self: &Self, id: PreviewStageId, inspector_id: u64) -> Result<PreviewStageSelectionToken, String>
    

    Source

    hit_test_selection

    fn hit_test_selection(self: &Self, id: PreviewStageId, point: Point) -> Result<PreviewStageSelectionToken, String>
    

    Source

    resolve_selection

    fn resolve_selection(self: &Self, token: &PreviewStageSelectionToken) -> Result<PreviewStageSelection, String>
    

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • Borrow<T>
    • BorrowMut<T>
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any
    • ClassDefaults
    • ErasedDestructor
    • IntoEither
    • Same
    • Default
    • Drop

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.