FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    LayoutRegistry

    struct · ferroui-designer-tools · v0.5.0

    struct LayoutRegistry
    

    View source

    Members

    new

    fn new() -> Self
    

    Source

    built_in

    fn built_in() -> Self
    

    Source

    register

    fn register(self: &mut Self, adapter: Box<dyn LayoutAdapter>) -> Option<Box<dyn LayoutAdapter>>
    

    Source

    revision

    fn revision(self: &Self) -> u64
    

    Changes whenever a provider is registered/replaced; hosts capture it in active gestures.

    Source

    design_helpers

    fn design_helpers(self: &Self, context: &LayoutContext<'_>, request: &LayoutHelperRequest) -> Result<LayoutHelperScene>
    

    Source

    placement

    fn placement(self: &Self, context: &LayoutContext<'_>, panel: NodeId, position: Point, dragged: &[NodeId]) -> Result<Option<LayoutPlacement>>
    

    Source

    plan_helper

    fn plan_helper(self: &Self, context: &LayoutContext<'_>, panel: NodeId, action: &LayoutHandleAction, value: f64) -> Result<Vec<Edit>>
    

    Source

    supports

    fn supports(self: &Self, panel_type: &str) -> bool
    

    Source

    panel_types

    fn panel_types(self: &Self) -> impl Iterator<Item = &str>
    

    Source

    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.

    Source

    is_builtin_adapter_for

    fn is_builtin_adapter_for(self: &Self, document: &Document, node: NodeId) -> bool
    

    Whether canonical resolution selected an unchanged framework provider.

    Source

    adapter

    fn adapter(self: &Self, panel_type: &str) -> Option<&dyn LayoutAdapter>
    

    Source

    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.

    Source

    plan

    fn plan(self: &Self, context: &LayoutContext<'_>, action: LayoutAction) -> Result<Vec<Edit>>
    

    Source

    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.

    Source

    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.

    Source

    move_selection

    fn move_selection(self: &Self, context: &LayoutContext<'_>, nodes: &[NodeId], delta: Point) -> Result<Vec<Edit>>
    

    Source

    align_selection

    fn align_selection(self: &Self, context: &LayoutContext<'_>, nodes: &[NodeId], alignment: crate::Alignment) -> Result<Vec<Edit>>
    

    Source

    distribute_selection

    fn distribute_selection(self: &Self, context: &LayoutContext<'_>, nodes: &[NodeId], axis: Axis) -> Result<Vec<Edit>>
    

    Source

    Trait implementations

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

    Availability

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