LayoutRegistry
struct · ferroui-designer-tools · v0.5.0
struct LayoutRegistry
Members
newbuilt_inregisterrevisiondesign_helpersplacementplan_helpersupportspanel_typesadapter_foris_builtin_adapter_foradapteradapter_exactplanplan_manyplan_batchmove_selectionalign_selectiondistribute_selection
new
fn new() -> Self
built_in
fn built_in() -> Self
register
fn register(self: &mut Self, adapter: Box<dyn LayoutAdapter>) -> Option<Box<dyn LayoutAdapter>>
revision
fn revision(self: &Self) -> u64
Changes whenever a provider is registered/replaced; hosts capture it in active gestures.
design_helpers
fn design_helpers(self: &Self, context: &LayoutContext<'_>, request: &LayoutHelperRequest) -> Result<LayoutHelperScene>
placement
fn placement(self: &Self, context: &LayoutContext<'_>, panel: NodeId, position: Point, dragged: &[NodeId]) -> Result<Option<LayoutPlacement>>
plan_helper
fn plan_helper(self: &Self, context: &LayoutContext<'_>, panel: NodeId, action: &LayoutHandleAction, value: f64) -> Result<Vec<Edit>>
supports
fn supports(self: &Self, panel_type: &str) -> bool
panel_types
fn panel_types(self: &Self) -> impl Iterator<Item = &str>
adapter_for
fn adapter_for(self: &Self, document: &Document, node: NodeId) -> Option<&dyn LayoutAdapter>
Resolve canonical XAML type identity before legacy lexical names. A custom namespace with a built-in local name never silently inherits that framework panel's semantics.
is_builtin_adapter_for
fn is_builtin_adapter_for(self: &Self, document: &Document, node: NodeId) -> bool
Whether canonical resolution selected an unchanged framework provider.
adapter
fn adapter(self: &Self, panel_type: &str) -> Option<&dyn LayoutAdapter>
adapter_exact
fn adapter_exact(self: &Self, panel_type: &str) -> Option<&dyn LayoutAdapter>
Exact lookup for application-qualified adapters without confusing an application type with a built-in panel that happens to have the same local name.
plan
fn plan(self: &Self, context: &LayoutContext<'_>, action: LayoutAction) -> Result<Vec<Edit>>
plan_many
fn plan_many(self: &Self, context: &LayoutContext<'_>, actions: impl IntoIterator<Item = LayoutAction>) -> Result<Vec<Edit>>
Plans independent actions against one immutable snapshot and validates their combined transaction once. Insertion indices and node identities refer to the original snapshot.
plan_batch
fn plan_batch<'context, 'document: 'context>(self: &Self, plans: impl IntoIterator<Item = (&'context LayoutContext<'document>, LayoutAction)>) -> Result<Vec<Edit>>
A batch may use different measured coordinate spaces, but every context must reference the same Document. This supports multiselection across different transformed parents without cloning and reparsing the complete source once per selected element.
move_selection
fn move_selection(self: &Self, context: &LayoutContext<'_>, nodes: &[NodeId], delta: Point) -> Result<Vec<Edit>>
align_selection
fn align_selection(self: &Self, context: &LayoutContext<'_>, nodes: &[NodeId], alignment: crate::Alignment) -> Result<Vec<Edit>>
distribute_selection
fn distribute_selection(self: &Self, context: &LayoutContext<'_>, nodes: &[NodeId], axis: Axis) -> Result<Vec<Edit>>
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>AnyDefault
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.