FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    DesignerSession

    struct · ferroui-designer · v0.5.0

    struct DesignerSession
    

    Shared UI-thread state. All authored changes pass through the same document history; runtime load errors preserve both source and the last successfully rendered tree.

    View source

    Members

    timeline

    fn timeline(self: &Self) -> &Timeline
    

    Source

    animation_programs

    fn animation_programs(self: &Self) -> &[AnimationProgram]
    

    Source

    active_animation_program

    fn active_animation_program(self: &Self) -> Option<NodeId>
    

    Source

    animation_warnings

    fn animation_warnings(self: &Self) -> &[String]
    

    Source

    time

    fn time(self: &Self) -> f64
    

    Source

    is_playing

    fn is_playing(self: &Self) -> bool
    

    Source

    recording

    fn recording(self: &Self) -> bool
    

    Source

    set_recording

    fn set_recording(self: &mut Self, value: bool)
    

    Source

    register_animation_codec

    fn register_animation_codec(self: &mut Self, codec: Box<dyn AnimationCodec>)
    

    Source

    select_animation_program

    fn select_animation_program(self: &mut Self, id: NodeId) -> Result<(), String>
    

    Source

    create_animation_program

    fn create_animation_program(self: &mut Self, name: &str, owner: NodeId, selector: &str, duration: f64) -> Result<NodeId, String>
    

    Source

    remove_animation_program

    fn remove_animation_program(self: &mut Self, id: NodeId) -> Result<(), String>
    

    Source

    rename_animation_program

    fn rename_animation_program(self: &mut Self, id: NodeId, name: &str) -> Result<(), String>
    

    Source

    duplicate_animation_program

    fn duplicate_animation_program(self: &mut Self, id: NodeId, name: &str) -> Result<NodeId, String>
    

    Source

    set_animation_program_selector

    fn set_animation_program_selector(self: &mut Self, id: NodeId, selector: &str) -> Result<(), String>
    

    Source

    set_animation_program_preview_targets

    fn set_animation_program_preview_targets(self: &mut Self, id: NodeId, targets: Option<Vec<NodeId>>) -> Result<(), String>
    

    Assign preview-only targets for a resource program or a currently inactive selector. None restores live selector matching. Authored selectors and source remain unchanged.

    Source

    set_animation_program_source

    fn set_animation_program_source(self: &mut Self, id: NodeId, source: &str) -> Result<(), String>
    

    Source

    update_animation_program

    fn update_animation_program(self: &mut Self, id: NodeId, timeline: Timeline) -> Result<(), String>
    

    Replace a program's complete typed timing/track model through its registered codec.

    Source

    seek

    fn seek(self: &mut Self, time: f64) -> Result<(), String>
    

    Source

    play

    fn play(self: &mut Self)
    

    Source

    play_all_animation_programs

    fn play_all_animation_programs(self: &mut Self)
    

    Source

    set_interactive

    fn set_interactive(self: &mut Self, value: bool)
    

    Source

    pause

    fn pause(self: &mut Self)
    

    Source

    stop

    fn stop(self: &mut Self)
    

    Source

    preview_animation_programs

    fn preview_animation_programs(self: &mut Self, ids: &[NodeId], elapsed: f64) -> Result<(), String>
    

    Source

    advance

    fn advance(self: &mut Self, seconds: f64) -> Result<(), String>
    

    Source

    set_duration

    fn set_duration(self: &mut Self, duration: f64) -> Result<(), String>
    

    Source

    record_keyframe

    fn record_keyframe(self: &mut Self, target: NodeId, property: &str, value: AnimationValue) -> Result<(), String>
    

    Source

    move_keyframe

    fn move_keyframe(self: &mut Self, target: NodeId, property: &str, from: f64, to: f64) -> Result<(), String>
    

    Source

    remove_keyframe

    fn remove_keyframe(self: &mut Self, target: NodeId, property: &str, time: f64) -> Result<(), String>
    

    Source

    set_keyframe_easing

    fn set_keyframe_easing(self: &mut Self, target: NodeId, property: &str, time: f64, easing: Easing) -> Result<(), String>
    

    Source

    commit_animation

    fn commit_animation(self: &mut Self) -> Result<(), String>
    

    Source

    component_catalog

    fn component_catalog(self: &Self) -> Result<ComponentCatalog, String>
    

    Source

    visible_component_resources

    fn visible_component_resources(self: &Self, target: NodeId) -> Result<Vec<ComponentEntry>, String>
    

    Source

    component_resource_context

    fn component_resource_context(self: &Self, target: NodeId) -> Option<ComponentResourceContext>
    

    Theme lookup follows the accepted native target and its complete variant chain. Opaque custom keys or an invalid/outdated preview retain conservative lookup.

    Source

    component_resource_references

    fn component_resource_references(self: &Self, resource: NodeId) -> Result<Vec<ComponentReference>, String>
    

    Source

    prepare_component_edit

    fn prepare_component_edit(self: &Self, action: &ComponentAction) -> Result<ComponentEditPreview, String>
    

    Source

    commit_component_edit

    fn commit_component_edit(self: &mut Self, preview: &ComponentEditPreview) -> Result<(), String>
    

    Source

    edit_component

    fn edit_component(self: &mut Self, action: ComponentAction) -> Result<(), String>
    

    Source

    copy_definition_for_instance

    fn copy_definition_for_instance(self: &mut Self, definition: NodeId, target: NodeId, property: &str, key: &str) -> Result<NodeId, String>
    

    Create an independent template/theme and apply it to one instance in a single transaction. Shared definitions keep their original source and other instances.

    Source

    set_property_object_source

    fn set_property_object_source(self: &mut Self, nodes: &[NodeId], property: &str, source: Option<&str>) -> Result<(), String>
    

    Source

    enter_definition_scope

    fn enter_definition_scope(self: &mut Self, node: NodeId) -> Result<(), String>
    

    Inspect and author a reusable definition in a native sample host. Entering a scope changes no source, history, resource ownership or collaboration state.

    Source

    enter_definition_scope_with_options

    fn enter_definition_scope_with_options(self: &mut Self, node: NodeId, options: DefinitionPreviewOptions) -> Result<(), String>
    

    Source

    exit_definition_scope

    fn exit_definition_scope(self: &mut Self) -> Result<(), String>
    

    Source

    definition_scope

    fn definition_scope(self: &Self) -> Option<&DefinitionScope>
    

    Source

    definition_scope_epoch

    fn definition_scope_epoch(self: &Self) -> u64
    

    Changes after accepted scope, design-data and preview-environment transitions, including returning to the same definition. Source revisions alone cannot retire an editor or spatial gesture when native preview conditions change.

    Source

    definition_preview_options

    fn definition_preview_options(self: &Self) -> DefinitionPreviewOptions
    

    Source

    design_time_enabled

    fn design_time_enabled(self: &Self) -> bool
    

    Source

    set_design_time_enabled

    fn set_design_time_enabled(self: &mut Self, enabled: bool) -> Result<(), String>
    

    Presentation state; source and undo history remain untouched. Viewers can inspect both the sample-data preview and the authored application values.

    Source

    design_time_properties

    fn design_time_properties(self: &Self, node: NodeId) -> Result<Vec<DesignTimeProperty>, String>
    

    Source

    apply_design_time_edits

    fn apply_design_time_edits(self: &mut Self, edits: &[DesignTimeEdit]) -> Result<(), String>
    

    Source

    design_preview_size

    fn design_preview_size(self: &Self) -> (Option<f64>, Option<f64>)
    

    The author-provided design size, independent from explicit environment presets. Invalid/nonliteral hints return None. Explicit d:Width/Height remain control values.

    Source

    rename_element

    fn rename_element(self: &mut Self, node: NodeId, name: &str) -> Result<(), String>
    

    Rename one authored element and its resolved references in one undo transaction. This command never records an animation key, even while recording is enabled.

    Source

    focus_order_catalog

    fn focus_order_catalog(self: &Self) -> Result<FocusOrderCatalog, String>
    

    Source

    focus_order_snapshot

    fn focus_order_snapshot(self: &Self) -> Result<FocusOrderSnapshot, String>
    

    Source

    commit_focus_order

    fn commit_focus_order(self: &mut Self, snapshot: &FocusOrderSnapshot, commands: &[FocusOrderEdit]) -> Result<(), String>
    

    Validate the entire staged dialog before making its single source/undo commit. Navigation changes are not animation keyframes and do not move runtime focus.

    Source

    state_groups

    fn state_groups(self: &Self) -> Vec<VisualStateGroup>
    

    Source

    active_preview_states

    fn active_preview_states(self: &Self) -> Vec<(NodeId, String, String)>
    

    The currently previewed native state endpoints. This is local presentation state and does not synthesize state declarations or edit the authored source.

    Source

    upsert_state_group

    fn upsert_state_group(self: &mut Self, group: VisualStateGroup) -> Result<(), String>
    

    Source

    remove_state_group

    fn remove_state_group(self: &mut Self, owner: NodeId, name: &str) -> Result<(), String>
    

    Source

    preview_state

    fn preview_state(self: &mut Self, owner: NodeId, name: &str, state: Option<&str>) -> Result<(), String>
    

    Source

    preview_state_at

    fn preview_state_at(self: &mut Self, owner: NodeId, name: &str, state: Option<&str>, elapsed: Option<f64>) -> Result<(), String>
    

    Preview a state at a transition-relative time, or at its endpoint when elapsed is None. Native animation instances resolve resources and bindings; authored local values remain in the document and Stop rebuilds the authored preview.

    Source

    advance_state_preview

    fn advance_state_preview(self: &mut Self, seconds: f64) -> Result<(), String>
    

    Source

    state_group_actions

    fn state_group_actions(self: &Self, owner: NodeId, name: &str, to: &str) -> Result<Vec<BehaviorAction>, String>
    

    Source

    state_group_transition_actions

    fn state_group_transition_actions(self: &Self, owner: NodeId, name: &str, from: Option<&str>, to: &str) -> Result<Vec<BehaviorAction>, String>
    

    Source

    behaviors

    fn behaviors(self: &Self, owner: NodeId) -> Vec<BehaviorModel>
    

    Source

    upsert_behavior

    fn upsert_behavior(self: &mut Self, model: BehaviorModel) -> Result<NodeId, String>
    

    Source

    remove_behavior

    fn remove_behavior(self: &mut Self, id: NodeId) -> Result<(), String>
    

    Source

    set_behavior_source

    fn set_behavior_source(self: &mut Self, id: NodeId, source: &str) -> Result<(), String>
    

    Source

    preview_behavior

    fn preview_behavior(self: &mut Self, id: NodeId) -> Result<(), String>
    

    Execute the real attached trigger's actions, preserving bindings, name scopes and custom IAction implementations. The host must be attached to a rooted logical tree so native action styles, bindings and lifecycle hooks have run. Stop/reload restores the authored preview afterwards.

    Source

    clear_interaction_preview

    fn clear_interaction_preview(self: &mut Self)
    

    Source

    layer_view_epoch

    fn layer_view_epoch(self: &Self) -> u64
    

    Source

    layer_view_snapshot

    fn layer_view_snapshot(self: &Self) -> LayerViewSnapshot
    

    Source

    restore_layer_view

    fn restore_layer_view(self: &mut Self, snapshot: &LayerViewSnapshot) -> bool
    

    Source

    reset_layer_view

    fn reset_layer_view(self: &mut Self)
    

    Source

    layer_isolation

    fn layer_isolation(self: &Self) -> &[NodeId]
    

    Current scope's isolated roots, in source order. Empty means normal editing.

    Source

    layer_state

    fn layer_state(self: &Self, node: NodeId) -> LayerState
    

    Source

    can_canvas_select

    fn can_canvas_select(self: &Self, node: NodeId) -> bool
    

    Canvas selection respects ancestor locks/visibility and the active definition and isolation scopes. The source Layers inspector deliberately uses ordinary select().

    Source

    ensure_layer_manipulable

    fn ensure_layer_manipulable(self: &Self, node: NodeId) -> Result<(), String>
    

    Shared guard for canvas, arrangement, hierarchy moves and layout extensions. This is presentation protection, not an authorization check: callers still use the normal writable/revision/preview checks before accepting authored changes.

    Source

    set_layers_locked

    fn set_layers_locked(self: &mut Self, nodes: &[NodeId], locked: bool) -> Result<(), String>
    

    Source

    set_layers_hidden

    fn set_layers_hidden(self: &mut Self, nodes: &[NodeId], hidden: bool) -> Result<(), String>
    

    Source

    isolate_layers

    fn isolate_layers(self: &mut Self, nodes: &[NodeId]) -> Result<(), String>
    

    Source

    clear_layer_isolation

    fn clear_layer_isolation(self: &mut Self)
    

    Source

    capture_layer_edit

    fn capture_layer_edit(self: &Self, nodes: &[NodeId]) -> Result<LayerEditSnapshot, String>
    

    Source

    apply_layer_edit

    fn apply_layer_edit(self: &mut Self, snapshot: &LayerEditSnapshot, command: LayerCommand) -> Result<(), String>
    

    Source

    apply_layer_command

    fn apply_layer_command(self: &mut Self, command: LayerCommand) -> Result<(), String>
    

    Source

    preview_host_options

    fn preview_host_options(self: &Self) -> PreviewHostOptions
    

    Clone construction services for independent preview hosts. Native controls, document histories and reload-session ownership are never shared by this value.

    Source

    preview_host_options_epoch

    fn preview_host_options_epoch(self: &Self) -> u64
    

    Changes only after accepted construction-service configuration, not when switching documents, focusing design-data variants or selecting authored nodes.

    Source

    configure_preview

    fn configure_preview(self: &mut Self, options: PreviewHostOptions) -> Result<(), String>
    

    Source

    open_native_preview

    fn open_native_preview(self: &mut Self) -> Result<Ref<Window>, String>
    

    Opens the actual platform Window, including native decorations and registered class behavior. A non-Window document is hosted inside a normal platform Window.

    Source

    close_native_preview

    fn close_native_preview(self: &mut Self)
    

    Source

    copy_properties

    fn copy_properties(self: &Self) -> Result<PropertyClipboard, String>
    

    Capture the selected element's authored appearance. Reading is available to collaboration viewers; bindings and context-dependent object graphs are reported.

    Source

    copy_properties_from

    fn copy_properties_from(self: &Self, node: NodeId) -> Result<PropertyClipboard, String>
    

    Capture an explicit authored source without changing selection. Native preview ownership limits this to the current document/definition scope. Hidden or locked source layers may be read; destination protections are enforced independently.

    Source

    prepare_property_paste

    fn prepare_property_paste(self: &Self, clipboard: &PropertyClipboard, property_names: &[String]) -> Result<PropertyPastePreview, String>
    

    Plan explicitly chosen clipboard properties for the complete current selection. Each destination uses its real native metadata and its authored lexical aliases. This method performs no source writes and remains available to viewers.

    Source

    commit_property_paste

    fn commit_property_paste(self: &mut Self, preview: &PropertyPastePreview) -> Result<(), String>
    

    Commit the reviewed plan as one ordinary source transaction. Appearance pasting does not create animation keys, even while timeline recording is enabled.

    Source

    plan_layout_reset

    fn plan_layout_reset(self: &Self, nodes: &[NodeId], reset: LayoutReset) -> Result<Vec<Edit>, String>
    

    Plan a selective reset against current authored control layers. Metadata resolves owner-qualified aliases to actual native property IDs; foreign homonyms are retained. Planning is observational and remains available to collaboration viewers.

    Source

    reset_selection_layout

    fn reset_selection_layout(self: &mut Self, reset: LayoutReset) -> Result<(), String>
    

    Reset the current selection as one ordinary source transaction, including while animation recording is enabled. A no-op does not add an undo entry or reload preview.

    Source

    plan_match_selection_size

    fn plan_match_selection_size(self: &Self, mode: LayoutMatch) -> Result<Vec<Edit>, String>
    

    Plan a measured resize for every selected control after the first. Each destination's registered layout adapter owns its positioning rules. Native min/max constraints, bindings and object-valued layout properties must permit the complete operation. The plan retains the untouched dimension and Canvas axis for Width/Height commands. Planning is observational and remains available to collaboration viewers.

    Source

    match_selection_size

    fn match_selection_size(self: &mut Self, mode: LayoutMatch) -> Result<(), String>
    

    Apply size matching in one undo step without recording animation keys.

    Source

    new

    fn new(source: impl Into<String>, preview_host: Ref<ContentControl>) -> Result<Self, String>
    

    Source

    with_uri

    fn with_uri(source: impl Into<String>, preview_host: Ref<ContentControl>, uri: String) -> Result<Self, String>
    

    Supply the original document URI when includes and relative resource references matter.

    Source

    layout_tools

    fn layout_tools(self: &Self) -> &ferroui_designer_tools::LayoutRegistry
    

    Register custom panel planners without replacing the native manipulation surface.

    Source

    layout_tools_mut

    fn layout_tools_mut(self: &mut Self) -> &mut ferroui_designer_tools::LayoutRegistry
    

    Source

    property_tools

    fn property_tools(self: &Self) -> &ferroui_designer_tools::PropertyRegistry
    

    Source

    property_tools_mut

    fn property_tools_mut(self: &mut Self) -> &mut ferroui_designer_tools::PropertyRegistry
    

    Source

    align_selection

    fn align_selection(self: &mut Self, alignment: ferroui_designer_tools::Alignment) -> Result<(), String>
    

    Source

    distribute_selection

    fn distribute_selection(self: &mut Self, axis: ferroui_designer_tools::Axis) -> Result<(), String>
    

    Source

    document_uri

    fn document_uri(self: &Self) -> &str
    

    Source

    mark_saved

    fn mark_saved(self: &mut Self)
    

    Record a successful write of the current authored buffer.

    Source

    set_document_uri

    fn set_document_uri(self: &mut Self, uri: String) -> Result<(), String>
    

    Change the base URI after Save As without replacing source history or collaboration.

    Source

    open_document

    fn open_document(self: &mut Self, source: String, uri: String) -> Result<(), String>
    

    Open a different document, clearing selection/history/sharing. Revision stays monotonic so automation holding a revision from the previous document cannot edit the new one. Hosts must resolve unsaved work before calling this explicit replacement command.

    Source

    restore_document

    fn restore_document(self: &mut Self, document: Document, uri: String) -> Result<(), String>
    

    Restore a tab buffer, including its undo history, onto this host's revision sequence.

    Source

    is_read_only

    fn is_read_only(self: &Self) -> bool
    

    Viewer sessions may inspect and play previews while all authored edits are rejected.

    Source

    set_read_only

    fn set_read_only(self: &mut Self, value: bool)
    

    Source

    document

    fn document(self: &Self) -> &Document
    

    Source

    selection

    fn selection(self: &Self) -> &[NodeId]
    

    Source

    generation

    fn generation(self: &Self) -> u64
    

    Changes on selection and timeline edits as well as document revisions.

    Source

    can_manipulate

    fn can_manipulate(self: &Self) -> bool
    

    Source

    preview_notices

    fn preview_notices(self: &Self) -> &[String]
    

    Source

    preview_status

    fn preview_status(self: &Self) -> &PreviewStatus
    

    Source

    preview_host

    fn preview_host(self: &Self) -> Ref<ContentControl>
    

    Source

    select

    fn select(self: &mut Self, ids: impl IntoIterator<Item = NodeId>)
    

    Source

    apply

    fn apply(self: &mut Self, label: impl Into<String>, edits: Vec<Edit>) -> Result<ChangeSet, DesignerError>
    

    Source

    apply_at

    fn apply_at(self: &mut Self, expected_revision: u64, label: impl Into<String>, edits: Vec<Edit>) -> Result<ChangeSet, DesignerError>
    

    Source

    update_source

    fn update_source(self: &mut Self, source: impl Into<String>) -> SourceUpdate
    

    Source

    stage_source

    fn stage_source(self: &mut Self, source: impl Into<String>) -> SourceUpdate
    

    Accept source-buffer text immediately; a host can debounce only expensive runtime reload.

    Source

    apply_staged_preview

    fn apply_staged_preview(self: &mut Self) -> Result<(), String>
    

    Source

    undo

    fn undo(self: &mut Self) -> Result<ChangeSet, DesignerError>
    

    Source

    redo

    fn redo(self: &mut Self) -> Result<ChangeSet, DesignerError>
    

    Source

    can_undo

    fn can_undo(self: &Self) -> bool
    

    Source

    can_redo

    fn can_redo(self: &Self) -> bool
    

    Source

    enable_collaboration

    fn enable_collaboration(self: &mut Self, actor: impl Into<String>, document_id: impl Into<String>) -> Result<(), String>
    

    Starts a transport-independent collaboration session. Hosts authenticate peers and carry SyncMessage envelopes over their existing transport; constructing a session opens no socket.

    Source

    join_collaboration

    fn join_collaboration(self: &mut Self, actor: impl Into<String>, snapshot: Snapshot) -> Result<(), String>
    

    Source

    leave_collaboration

    fn leave_collaboration(self: &mut Self)
    

    Detach transport/sharing while preserving the authored document and its history.

    Source

    collaboration_actor

    fn collaboration_actor(self: &Self) -> Option<&str>
    

    Identity of the currently attached replica, independent of document URI changes.

    Source

    collaboration_document_id

    fn collaboration_document_id(self: &Self) -> Option<&str>
    

    Source

    collaboration_version

    fn collaboration_version(self: &Self) -> Option<VersionVector>
    

    Source

    collaboration_snapshot

    fn collaboration_snapshot(self: &Self) -> Result<Snapshot, String>
    

    Source

    collaboration_message

    fn collaboration_message(self: &Self, operations: Vec<Operation>) -> Result<SyncMessage, String>
    

    Source

    collaboration_changes_since

    fn collaboration_changes_since(self: &Self, version: &VersionVector) -> Result<SyncMessage, String>
    

    Source

    collaboration_outbox_page

    fn collaboration_outbox_page(self: &Self, version: &VersionVector) -> Result<SyncMessage, String>
    

    Page only this writer's outbox, keeping offline uploads within the collaboration wire budget without allowing other actors' operation payloads to consume the page.

    Source

    collaboration_pending_operations

    fn collaboration_pending_operations(self: &Self, version: &VersionVector) -> Result<usize, String>
    

    Source

    take_collaboration_changes

    fn take_collaboration_changes(self: &mut Self) -> Result<SyncMessage, String>
    

    Source

    collaboration_conflicts

    fn collaboration_conflicts(self: &Self) -> Vec<Conflict>
    

    Source

    collaboration_error

    fn collaboration_error(self: &Self) -> Option<&str>
    

    Source

    merge_collaboration

    fn merge_collaboration(self: &mut Self, message: SyncMessage) -> Result<MergeReport, String>
    

    Remote operations are merged atomically. A local source draft remains visible and its original compare-and-set base is retained; remote changes cannot silently erase it.

    Source

    discard_collaboration_draft

    fn discard_collaboration_draft(self: &mut Self) -> Result<ChangeSet, String>
    

    Explicitly discard the local draft in favor of the merged collaboration projection.

    Source

    resolve_collaboration_draft

    fn resolve_collaboration_draft(self: &mut Self, expected_version: &VersionVector, source: String) -> Result<(), String>
    

    The host presents both sources and obtains an explicit merged result. A version guard prevents applying that resolution after another peer has advanced the shared document.

    Source

    presence_now

    fn presence_now(self: &Self) -> u64
    

    Receiver-owned monotonic time shared by native overlays and all MCP providers.

    Source

    current_presence

    fn current_presence(self: &Self, ttl_millis: u64) -> Vec<Presence>
    

    Source

    receive_presence_now

    fn receive_presence_now(self: &mut Self, presence: Presence) -> Result<bool, String>
    

    Source

    presence_source_node

    fn presence_source_node(self: &Self, shared: &ferroui_designer_collaboration::SharedNodeId) -> Option<NodeId>
    

    Map a shared identity into the current authored document without conflating the replica's node IDs with this host's IDs. Conflicting source drafts deliberately have no peer mapping.

    Source

    local_presence

    fn local_presence(self: &mut Self, display_name: String, cursor: Option<Cursor>) -> Result<Presence, String>
    

    Source

    receive_presence

    fn receive_presence(self: &mut Self, presence: Presence, now_millis: u64) -> Result<bool, String>
    

    Source

    presence

    fn presence(self: &Self, now_millis: u64, ttl_millis: u64) -> Vec<Presence>
    

    Source

    set_property

    fn set_property(self: &mut Self, nodes: &[NodeId], name: &str, value: &str) -> Result<(), String>
    

    A property edit records into the timeline when recording is enabled; ordinary edits write an attribute. Explicit resource/binding expressions remain ordinary XAML edits.

    Source

    reset_property

    fn reset_property(self: &mut Self, nodes: &[NodeId], name: &str) -> Result<(), String>
    

    Explicit reset removes either an attribute or a property element in one undoable edit.

    Source

    apply_visual

    fn apply_visual(self: &mut Self, label: &str, edits: Vec<Edit>) -> Result<(), String>
    

    Visual manipulators use the same recording path as property editors. All keyframes from one gesture and any required anchor cleanup become a single source/history transaction.

    Source

    runtime_tree

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

    Source

    selection_bounds

    fn selection_bounds(self: &Self, relative_to: &Ref<Visual>) -> Vec<(NodeId, Rect)>
    

    Source

    refresh_runtime_mapping

    fn refresh_runtime_mapping(self: &mut Self)
    

    Source

    can_edit_outline

    fn can_edit_outline(self: &Self, command: OutlineCommand) -> bool
    

    Tests whether a structural command can change the current authored selection.

    Source

    edit_outline

    fn edit_outline(self: &mut Self, command: OutlineCommand) -> Result<(), String>
    

    Applies a tree structural command in one source/undo transaction. A boundary no-op leaves revision/history untouched, and rejected selections are never partly moved.

    Source

    matching_native_type_selection

    fn matching_native_type_selection(self: &Self) -> Result<Vec<NodeId>, String>
    

    Finds the primary selection's exact native type in the current authored preview scope. Namespace aliases converge through TypeInfo identity; derived and unrelated same-named application types remain distinct. The primary seed stays first.

    Source

    select_matching_native_type

    fn select_matching_native_type(self: &mut Self) -> Result<(), String>
    

    Local selection command, including in read-only/viewer sessions. No authored properties, source history, animation keys, or collaboration edits are produced.

    Source

    edit_grid_tracks

    fn edit_grid_tracks(self: &mut Self, panel: NodeId, axis: Axis, change: GridTrackChange) -> Result<(), String>
    

    Edits definitions and affected child cells in a single ordinary source transaction. Grid structure is not recorded as an animation, even when recording is enabled.

    Source

    layout_helper_snapshot

    fn layout_helper_snapshot(self: &Self, panel: NodeId, pointer: Option<Point>, dragged_nodes: &[NodeId]) -> Result<LayoutHelperSnapshot, String>
    

    Measure one selected panel's helpers. The optional pointer is in artboard coordinates; it is converted into the provider's panel-local space before resolving placement.

    Source

    selection_layout_helpers

    fn selection_layout_helpers(self: &Self) -> Option<LayoutHelperSnapshot>
    

    Contextual helpers for the selected container, or the common parent of selected content. Unsupported or unavailable native layout has no idle overlay.

    Source

    preview_layout_move

    fn preview_layout_move(self: &Self, nodes: &[NodeId], position: Point, delta: Point) -> Result<Option<LayoutEditPreview>, String>
    

    Source

    preview_layout_move_cached

    fn preview_layout_move_cached(self: &Self, nodes: &[NodeId], position: Point, delta: Point, previous: Option<&LayoutEditPreview>) -> Result<Option<LayoutEditPreview>, String>
    

    Preview insertion/reordering without touching live controls or source. Returning None preserves ordinary translation inside the same free-layout parent. The cached variant reuses validation when pointer movement retains the exact semantic edits.

    Source

    preview_layout_insert

    fn preview_layout_insert(self: &Self, source: &str, position: Point) -> Result<LayoutEditPreview, String>
    

    Source

    preview_layout_insert_cached

    fn preview_layout_insert_cached(self: &Self, source: &str, position: Point, previous: Option<&LayoutEditPreview>) -> Result<LayoutEditPreview, String>
    

    Source

    preview_layout_handle

    fn preview_layout_handle(self: &Self, snapshot: &LayoutHelperSnapshot, handle_index: usize, delta: Point) -> Result<LayoutEditPreview, String>
    

    Stage a handle displacement using the press-time snapshot. The returned preview can be rendered freely; only commit_layout_preview performs an authored transaction.

    Source

    commit_layout_preview

    fn commit_layout_preview(self: &mut Self, preview: &LayoutEditPreview) -> Result<(), String>
    

    Apply the exact accepted edit list once after rechecking source and provider identity. Structural placement and layout helpers remain ordinary source operations even while recording animation, as their edits may include both properties and child ownership.

    Source

    plan_layout_action

    fn plan_layout_action(self: &Self, action: LayoutAction) -> Result<Vec<Edit>, String>
    

    Plans a panel-specific edit against the current, measured native preview. The returned edits share the same coordinate and expression rules as pointer tools.

    Source

    apply_layout_action

    fn apply_layout_action(self: &mut Self, action: LayoutAction, label: &str) -> Result<(), String>
    

    Applies one measured layout operation as one undoable transaction. Hosts can use this boundary for track/cell editors, docking pickers and registered panel property tools.

    Source

    runtime_layout_capabilities

    fn runtime_layout_capabilities(self: &Self, node: NodeId) -> Option<ferroui_designer_tools::LayoutCapabilities>
    

    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

    Availability

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