# LayoutRegistry

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-designer-tools/struct-layoutregistry/

**struct** · [`ferroui-designer-tools`](/docs/0.5.0/api/ferroui-designer-tools/) · v0.5.0

```rust
struct LayoutRegistry
```



[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Tools/layout.rs#L385)

## Members

- [`new`](#function-new)
- [`built_in`](#function-built_in)
- [`register`](#function-register)
- [`revision`](#function-revision)
- [`design_helpers`](#function-design_helpers)
- [`placement`](#function-placement)
- [`plan_helper`](#function-plan_helper)
- [`supports`](#function-supports)
- [`panel_types`](#function-panel_types)
- [`adapter_for`](#function-adapter_for)
- [`is_builtin_adapter_for`](#function-is_builtin_adapter_for)
- [`adapter`](#function-adapter)
- [`adapter_exact`](#function-adapter_exact)
- [`plan`](#function-plan)
- [`plan_many`](#function-plan_many)
- [`plan_batch`](#function-plan_batch)
- [`move_selection`](#function-move_selection)
- [`align_selection`](#function-align_selection)
- [`distribute_selection`](#function-distribute_selection)

<a id="function-new"></a>

### new

```rust
fn new() -> Self
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Tools/layout.rs#L396)

<a id="function-built_in"></a>

### built_in

```rust
fn built_in() -> Self
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Tools/layout.rs#L403)

<a id="function-register"></a>

### register

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



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Tools/layout.rs#L442)

<a id="function-revision"></a>

### revision

```rust
fn revision(self: &Self) -> u64
```

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

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Tools/layout.rs#L449)

<a id="function-design_helpers"></a>

### design_helpers

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



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Tools/layout.rs#L452)

<a id="function-placement"></a>

### placement

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



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Tools/layout.rs#L479)

<a id="function-plan_helper"></a>

### plan_helper

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



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Tools/layout.rs#L505)

<a id="function-supports"></a>

### supports

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



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Tools/layout.rs#L545)

<a id="function-panel_types"></a>

### panel_types

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



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Tools/layout.rs#L548)

<a id="function-adapter_for"></a>

### adapter_for

```rust
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](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Tools/layout.rs#L553)

<a id="function-is_builtin_adapter_for"></a>

### is_builtin_adapter_for

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

Whether canonical resolution selected an unchanged framework provider.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Tools/layout.rs#L582)

<a id="function-adapter"></a>

### adapter

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



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Tools/layout.rs#L586)

<a id="function-adapter_exact"></a>

### adapter_exact

```rust
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](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Tools/layout.rs#L594)

<a id="function-plan"></a>

### plan

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



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Tools/layout.rs#L597)

<a id="function-plan_many"></a>

### plan_many

```rust
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](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Tools/layout.rs#L602)

<a id="function-plan_batch"></a>

### plan_batch

```rust
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](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Tools/layout.rs#L612)

<a id="function-move_selection"></a>

### move_selection

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



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Tools/layout.rs#L708)

<a id="function-align_selection"></a>

### align_selection

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



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Tools/layout.rs#L722)

<a id="function-distribute_selection"></a>

### distribute_selection

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



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Tools/layout.rs#L734)

## 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](/docs/0.5.0/api/).
