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.
Members
timelineanimation_programsactive_animation_programanimation_warningstimeis_playingrecordingset_recordingregister_animation_codecselect_animation_programcreate_animation_programremove_animation_programrename_animation_programduplicate_animation_programset_animation_program_selectorset_animation_program_preview_targetsset_animation_program_sourceupdate_animation_programseekplayplay_all_animation_programsset_interactivepausestoppreview_animation_programsadvanceset_durationrecord_keyframemove_keyframeremove_keyframeset_keyframe_easingcommit_animationcomponent_catalogvisible_component_resourcescomponent_resource_contextcomponent_resource_referencesprepare_component_editcommit_component_editedit_componentcopy_definition_for_instanceset_property_object_sourceenter_definition_scopeenter_definition_scope_with_optionsexit_definition_scopedefinition_scopedefinition_scope_epochdefinition_preview_optionsdesign_time_enabledset_design_time_enableddesign_time_propertiesapply_design_time_editsdesign_preview_sizerename_elementfocus_order_catalogfocus_order_snapshotcommit_focus_orderstate_groupsactive_preview_statesupsert_state_groupremove_state_grouppreview_statepreview_state_atadvance_state_previewstate_group_actionsstate_group_transition_actionsbehaviorsupsert_behaviorremove_behaviorset_behavior_sourcepreview_behaviorclear_interaction_previewlayer_view_epochlayer_view_snapshotrestore_layer_viewreset_layer_viewlayer_isolationlayer_statecan_canvas_selectensure_layer_manipulableset_layers_lockedset_layers_hiddenisolate_layersclear_layer_isolationcapture_layer_editapply_layer_editapply_layer_commandpreview_host_optionspreview_host_options_epochconfigure_previewopen_native_previewclose_native_previewcopy_propertiescopy_properties_fromprepare_property_pastecommit_property_pasteplan_layout_resetreset_selection_layoutplan_match_selection_sizematch_selection_sizenewwith_urilayout_toolslayout_tools_mutproperty_toolsproperty_tools_mutalign_selectiondistribute_selectiondocument_urimark_savedset_document_uriopen_documentrestore_documentis_read_onlyset_read_onlydocumentselectiongenerationcan_manipulatepreview_noticespreview_statuspreview_hostselectapplyapply_atupdate_sourcestage_sourceapply_staged_previewundoredocan_undocan_redoenable_collaborationjoin_collaborationleave_collaborationcollaboration_actorcollaboration_document_idcollaboration_versioncollaboration_snapshotcollaboration_messagecollaboration_changes_sincecollaboration_outbox_pagecollaboration_pending_operationstake_collaboration_changescollaboration_conflictscollaboration_errormerge_collaborationdiscard_collaboration_draftresolve_collaboration_draftpresence_nowcurrent_presencereceive_presence_nowpresence_source_nodelocal_presencereceive_presencepresenceset_propertyreset_propertyapply_visualruntime_treeselection_boundsrefresh_runtime_mappingcan_edit_outlineedit_outlinematching_native_type_selectionselect_matching_native_typeedit_grid_trackslayout_helper_snapshotselection_layout_helperspreview_layout_movepreview_layout_move_cachedpreview_layout_insertpreview_layout_insert_cachedpreview_layout_handlecommit_layout_previewplan_layout_actionapply_layout_actionruntime_layout_capabilities
timeline
fn timeline(self: &Self) -> &Timeline
animation_programs
fn animation_programs(self: &Self) -> &[AnimationProgram]
active_animation_program
fn active_animation_program(self: &Self) -> Option<NodeId>
animation_warnings
fn animation_warnings(self: &Self) -> &[String]
time
fn time(self: &Self) -> f64
is_playing
fn is_playing(self: &Self) -> bool
recording
fn recording(self: &Self) -> bool
set_recording
fn set_recording(self: &mut Self, value: bool)
register_animation_codec
fn register_animation_codec(self: &mut Self, codec: Box<dyn AnimationCodec>)
select_animation_program
fn select_animation_program(self: &mut Self, id: NodeId) -> Result<(), String>
create_animation_program
fn create_animation_program(self: &mut Self, name: &str, owner: NodeId, selector: &str, duration: f64) -> Result<NodeId, String>
remove_animation_program
fn remove_animation_program(self: &mut Self, id: NodeId) -> Result<(), String>
rename_animation_program
fn rename_animation_program(self: &mut Self, id: NodeId, name: &str) -> Result<(), String>
duplicate_animation_program
fn duplicate_animation_program(self: &mut Self, id: NodeId, name: &str) -> Result<NodeId, String>
set_animation_program_selector
fn set_animation_program_selector(self: &mut Self, id: NodeId, selector: &str) -> Result<(), String>
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.
set_animation_program_source
fn set_animation_program_source(self: &mut Self, id: NodeId, source: &str) -> Result<(), String>
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.
seek
fn seek(self: &mut Self, time: f64) -> Result<(), String>
play
fn play(self: &mut Self)
play_all_animation_programs
fn play_all_animation_programs(self: &mut Self)
set_interactive
fn set_interactive(self: &mut Self, value: bool)
pause
fn pause(self: &mut Self)
stop
fn stop(self: &mut Self)
preview_animation_programs
fn preview_animation_programs(self: &mut Self, ids: &[NodeId], elapsed: f64) -> Result<(), String>
advance
fn advance(self: &mut Self, seconds: f64) -> Result<(), String>
set_duration
fn set_duration(self: &mut Self, duration: f64) -> Result<(), String>
record_keyframe
fn record_keyframe(self: &mut Self, target: NodeId, property: &str, value: AnimationValue) -> Result<(), String>
move_keyframe
fn move_keyframe(self: &mut Self, target: NodeId, property: &str, from: f64, to: f64) -> Result<(), String>
remove_keyframe
fn remove_keyframe(self: &mut Self, target: NodeId, property: &str, time: f64) -> Result<(), String>
set_keyframe_easing
fn set_keyframe_easing(self: &mut Self, target: NodeId, property: &str, time: f64, easing: Easing) -> Result<(), String>
commit_animation
fn commit_animation(self: &mut Self) -> Result<(), String>
component_catalog
fn component_catalog(self: &Self) -> Result<ComponentCatalog, String>
visible_component_resources
fn visible_component_resources(self: &Self, target: NodeId) -> Result<Vec<ComponentEntry>, String>
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.
component_resource_references
fn component_resource_references(self: &Self, resource: NodeId) -> Result<Vec<ComponentReference>, String>
prepare_component_edit
fn prepare_component_edit(self: &Self, action: &ComponentAction) -> Result<ComponentEditPreview, String>
commit_component_edit
fn commit_component_edit(self: &mut Self, preview: &ComponentEditPreview) -> Result<(), String>
edit_component
fn edit_component(self: &mut Self, action: ComponentAction) -> Result<(), String>
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.
set_property_object_source
fn set_property_object_source(self: &mut Self, nodes: &[NodeId], property: &str, source: Option<&str>) -> Result<(), String>
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.
enter_definition_scope_with_options
fn enter_definition_scope_with_options(self: &mut Self, node: NodeId, options: DefinitionPreviewOptions) -> Result<(), String>
exit_definition_scope
fn exit_definition_scope(self: &mut Self) -> Result<(), String>
definition_scope
fn definition_scope(self: &Self) -> Option<&DefinitionScope>
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.
definition_preview_options
fn definition_preview_options(self: &Self) -> DefinitionPreviewOptions
design_time_enabled
fn design_time_enabled(self: &Self) -> bool
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.
design_time_properties
fn design_time_properties(self: &Self, node: NodeId) -> Result<Vec<DesignTimeProperty>, String>
apply_design_time_edits
fn apply_design_time_edits(self: &mut Self, edits: &[DesignTimeEdit]) -> Result<(), String>
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.
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.
focus_order_catalog
fn focus_order_catalog(self: &Self) -> Result<FocusOrderCatalog, String>
focus_order_snapshot
fn focus_order_snapshot(self: &Self) -> Result<FocusOrderSnapshot, String>
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.
state_groups
fn state_groups(self: &Self) -> Vec<VisualStateGroup>
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.
upsert_state_group
fn upsert_state_group(self: &mut Self, group: VisualStateGroup) -> Result<(), String>
remove_state_group
fn remove_state_group(self: &mut Self, owner: NodeId, name: &str) -> Result<(), String>
preview_state
fn preview_state(self: &mut Self, owner: NodeId, name: &str, state: Option<&str>) -> Result<(), String>
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.
advance_state_preview
fn advance_state_preview(self: &mut Self, seconds: f64) -> Result<(), String>
state_group_actions
fn state_group_actions(self: &Self, owner: NodeId, name: &str, to: &str) -> Result<Vec<BehaviorAction>, String>
state_group_transition_actions
fn state_group_transition_actions(self: &Self, owner: NodeId, name: &str, from: Option<&str>, to: &str) -> Result<Vec<BehaviorAction>, String>
behaviors
fn behaviors(self: &Self, owner: NodeId) -> Vec<BehaviorModel>
upsert_behavior
fn upsert_behavior(self: &mut Self, model: BehaviorModel) -> Result<NodeId, String>
remove_behavior
fn remove_behavior(self: &mut Self, id: NodeId) -> Result<(), String>
set_behavior_source
fn set_behavior_source(self: &mut Self, id: NodeId, source: &str) -> Result<(), String>
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.
clear_interaction_preview
fn clear_interaction_preview(self: &mut Self)
layer_view_epoch
fn layer_view_epoch(self: &Self) -> u64
layer_view_snapshot
fn layer_view_snapshot(self: &Self) -> LayerViewSnapshot
restore_layer_view
fn restore_layer_view(self: &mut Self, snapshot: &LayerViewSnapshot) -> bool
reset_layer_view
fn reset_layer_view(self: &mut Self)
layer_isolation
fn layer_isolation(self: &Self) -> &[NodeId]
Current scope's isolated roots, in source order. Empty means normal editing.
layer_state
fn layer_state(self: &Self, node: NodeId) -> LayerState
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().
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.
set_layers_locked
fn set_layers_locked(self: &mut Self, nodes: &[NodeId], locked: bool) -> Result<(), String>
set_layers_hidden
fn set_layers_hidden(self: &mut Self, nodes: &[NodeId], hidden: bool) -> Result<(), String>
isolate_layers
fn isolate_layers(self: &mut Self, nodes: &[NodeId]) -> Result<(), String>
clear_layer_isolation
fn clear_layer_isolation(self: &mut Self)
capture_layer_edit
fn capture_layer_edit(self: &Self, nodes: &[NodeId]) -> Result<LayerEditSnapshot, String>
apply_layer_edit
fn apply_layer_edit(self: &mut Self, snapshot: &LayerEditSnapshot, command: LayerCommand) -> Result<(), String>
apply_layer_command
fn apply_layer_command(self: &mut Self, command: LayerCommand) -> Result<(), String>
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.
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.
configure_preview
fn configure_preview(self: &mut Self, options: PreviewHostOptions) -> Result<(), String>
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.
close_native_preview
fn close_native_preview(self: &mut Self)
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.
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.
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.
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.
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.
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.
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.
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.
new
fn new(source: impl Into<String>, preview_host: Ref<ContentControl>) -> Result<Self, String>
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.
layout_tools
fn layout_tools(self: &Self) -> &ferroui_designer_tools::LayoutRegistry
Register custom panel planners without replacing the native manipulation surface.
layout_tools_mut
fn layout_tools_mut(self: &mut Self) -> &mut ferroui_designer_tools::LayoutRegistry
property_tools
fn property_tools(self: &Self) -> &ferroui_designer_tools::PropertyRegistry
property_tools_mut
fn property_tools_mut(self: &mut Self) -> &mut ferroui_designer_tools::PropertyRegistry
align_selection
fn align_selection(self: &mut Self, alignment: ferroui_designer_tools::Alignment) -> Result<(), String>
distribute_selection
fn distribute_selection(self: &mut Self, axis: ferroui_designer_tools::Axis) -> Result<(), String>
document_uri
fn document_uri(self: &Self) -> &str
mark_saved
fn mark_saved(self: &mut Self)
Record a successful write of the current authored buffer.
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.
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.
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.
is_read_only
fn is_read_only(self: &Self) -> bool
Viewer sessions may inspect and play previews while all authored edits are rejected.
set_read_only
fn set_read_only(self: &mut Self, value: bool)
document
fn document(self: &Self) -> &Document
selection
fn selection(self: &Self) -> &[NodeId]
generation
fn generation(self: &Self) -> u64
Changes on selection and timeline edits as well as document revisions.
can_manipulate
fn can_manipulate(self: &Self) -> bool
preview_notices
fn preview_notices(self: &Self) -> &[String]
preview_status
fn preview_status(self: &Self) -> &PreviewStatus
preview_host
fn preview_host(self: &Self) -> Ref<ContentControl>
select
fn select(self: &mut Self, ids: impl IntoIterator<Item = NodeId>)
apply
fn apply(self: &mut Self, label: impl Into<String>, edits: Vec<Edit>) -> Result<ChangeSet, DesignerError>
apply_at
fn apply_at(self: &mut Self, expected_revision: u64, label: impl Into<String>, edits: Vec<Edit>) -> Result<ChangeSet, DesignerError>
update_source
fn update_source(self: &mut Self, source: impl Into<String>) -> SourceUpdate
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.
apply_staged_preview
fn apply_staged_preview(self: &mut Self) -> Result<(), String>
undo
fn undo(self: &mut Self) -> Result<ChangeSet, DesignerError>
redo
fn redo(self: &mut Self) -> Result<ChangeSet, DesignerError>
can_undo
fn can_undo(self: &Self) -> bool
can_redo
fn can_redo(self: &Self) -> bool
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.
join_collaboration
fn join_collaboration(self: &mut Self, actor: impl Into<String>, snapshot: Snapshot) -> Result<(), String>
leave_collaboration
fn leave_collaboration(self: &mut Self)
Detach transport/sharing while preserving the authored document and its history.
collaboration_actor
fn collaboration_actor(self: &Self) -> Option<&str>
Identity of the currently attached replica, independent of document URI changes.
collaboration_document_id
fn collaboration_document_id(self: &Self) -> Option<&str>
collaboration_version
fn collaboration_version(self: &Self) -> Option<VersionVector>
collaboration_snapshot
fn collaboration_snapshot(self: &Self) -> Result<Snapshot, String>
collaboration_message
fn collaboration_message(self: &Self, operations: Vec<Operation>) -> Result<SyncMessage, String>
collaboration_changes_since
fn collaboration_changes_since(self: &Self, version: &VersionVector) -> Result<SyncMessage, String>
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.
collaboration_pending_operations
fn collaboration_pending_operations(self: &Self, version: &VersionVector) -> Result<usize, String>
take_collaboration_changes
fn take_collaboration_changes(self: &mut Self) -> Result<SyncMessage, String>
collaboration_conflicts
fn collaboration_conflicts(self: &Self) -> Vec<Conflict>
collaboration_error
fn collaboration_error(self: &Self) -> Option<&str>
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.
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.
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.
presence_now
fn presence_now(self: &Self) -> u64
Receiver-owned monotonic time shared by native overlays and all MCP providers.
current_presence
fn current_presence(self: &Self, ttl_millis: u64) -> Vec<Presence>
receive_presence_now
fn receive_presence_now(self: &mut Self, presence: Presence) -> Result<bool, String>
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.
local_presence
fn local_presence(self: &mut Self, display_name: String, cursor: Option<Cursor>) -> Result<Presence, String>
receive_presence
fn receive_presence(self: &mut Self, presence: Presence, now_millis: u64) -> Result<bool, String>
presence
fn presence(self: &Self, now_millis: u64, ttl_millis: u64) -> Vec<Presence>
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.
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.
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.
runtime_tree
fn runtime_tree(self: &Self, kind: TreeKind) -> Vec<RuntimeNode>
selection_bounds
fn selection_bounds(self: &Self, relative_to: &Ref<Visual>) -> Vec<(NodeId, Rect)>
refresh_runtime_mapping
fn refresh_runtime_mapping(self: &mut Self)
can_edit_outline
fn can_edit_outline(self: &Self, command: OutlineCommand) -> bool
Tests whether a structural command can change the current authored selection.
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.
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.
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.
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.
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.
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.
preview_layout_move
fn preview_layout_move(self: &Self, nodes: &[NodeId], position: Point, delta: Point) -> Result<Option<LayoutEditPreview>, String>
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.
preview_layout_insert
fn preview_layout_insert(self: &Self, source: &str, position: Point) -> Result<LayoutEditPreview, String>
preview_layout_insert_cached
fn preview_layout_insert_cached(self: &Self, source: &str, position: Point, previous: Option<&LayoutEditPreview>) -> Result<LayoutEditPreview, String>
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.
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.
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.
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.
runtime_layout_capabilities
fn runtime_layout_capabilities(self: &Self, node: NodeId) -> Option<ferroui_designer_tools::LayoutCapabilities>
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>AnyClassDefaultsErasedDestructorIntoEitherSame
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.