# DesignSurface

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

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

```rust
struct DesignSurface
```

Transparent native adorner for selecting, moving, resizing and rotating live controls.
Motion changes only the adorner; release commits one semantic transaction. Escape and
capture loss cancel the gesture, so neither source nor history receive partial drags.

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

## Members

- [`layout_helpers_visible`](#function-layout_helpers_visible)
- [`set_layout_helpers_visible`](#function-set_layout_helpers_visible)
- [`invalidate_layout_helpers`](#function-invalidate_layout_helpers)
- [`layout_helper_snapshot`](#function-layout_helper_snapshot)
- [`layout_edit_preview`](#function-layout_edit_preview)
- [`TYPE`](#assoc_const-type)
- [`to_ref`](#function-to_ref)
- [`new`](#function-new)
- [`attach`](#function-attach)
- [`on_commit`](#function-on_commit)
- [`on_selection_changed`](#function-on_selection_changed)
- [`set_zoom`](#function-set_zoom)
- [`set_grid`](#function-set_grid)
- [`set_canvas_guides`](#function-set_canvas_guides)
- [`canvas_guides`](#function-canvas_guides)
- [`focus_order_visible`](#function-focus_order_visible)
- [`set_focus_order_visible`](#function-set_focus_order_visible)
- [`interactive`](#function-interactive)
- [`set_interactive`](#function-set_interactive)
- [`cursor_position`](#function-cursor_position)
- [`arm_insert`](#function-arm_insert)
- [`begin_asset_drag`](#function-begin_asset_drag)
- [`hit_stack`](#function-hit_stack)

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

### layout_helpers_visible

```rust
fn layout_helpers_visible(self: &Self) -> bool
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer/surface_helpers.rs#L19)

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

### set_layout_helpers_visible

```rust
fn set_layout_helpers_visible(self: &Self, visible: bool)
```

Changes only editor presentation. Hiding helpers cancels pending canvas drafts.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer/surface_helpers.rs#L24)

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

### invalidate_layout_helpers

```rust
fn invalidate_layout_helpers(self: &Self)
```

Invalidates measurements without disturbing a captured gesture or its source guard.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer/surface_helpers.rs#L35)

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

### layout_helper_snapshot

```rust
fn layout_helper_snapshot(self: &Self) -> Option<LayoutHelperSnapshot>
```

Current selection's panel features in panel coordinates with an artboard transform.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer/surface_helpers.rs#L40)

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

### layout_edit_preview

```rust
fn layout_edit_preview(self: &Self) -> Option<Rc<LayoutEditPreview>>
```

The currently displayed drop/handle proposal, useful to hosts and native UI tests.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer/surface_helpers.rs#L83)

<a id="assoc_const-type"></a>

### TYPE

```rust
const TYPE: &'static $crate::TypeInfo
```

The runtime type of this class.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer/surface.rs#L162)

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

### to_ref

```rust
fn to_ref(self: &Self) -> $crate::Ref<DesignSurface>
```

Returns a strong reference to this object.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer/surface.rs#L162)

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

### new

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



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer/surface.rs#L169)

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

### attach

```rust
fn attach(self: &Self, session: &Rc<RefCell<DesignerSession>>)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer/surface.rs#L187)

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

### on_commit

```rust
fn on_commit(self: &Self, callback: impl Fn(DesignGesture) -> () + 'static)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer/surface.rs#L191)

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

### on_selection_changed

```rust
fn on_selection_changed(self: &Self, callback: impl Fn() -> () + 'static)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer/surface.rs#L194)

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

### set_zoom

```rust
fn set_zoom(self: &Self, zoom: f64)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer/surface.rs#L197)

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

### set_grid

```rust
fn set_grid(self: &Self, size: f64)
```

Legacy standalone-host override. Any finite nonnegative spacing remains supported;
applying bounded CanvasGuideSettings later replaces this override.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer/surface.rs#L222)

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

### set_canvas_guides

```rust
fn set_canvas_guides(self: &Self, settings: crate::CanvasGuideSettings) -> Result<(), String>
```

Shared local snapping contract for standalone hosts and DesignerWorkspace.
Updating it retires pending gestures before their accepted snap index changes.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer/surface.rs#L229)

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

### canvas_guides

```rust
fn canvas_guides(self: &Self) -> crate::CanvasGuideSettings
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer/surface.rs#L248)

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

### focus_order_visible

```rust
fn focus_order_visible(self: &Self) -> bool
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer/surface.rs#L251)

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

### set_focus_order_visible

```rust
fn set_focus_order_visible(self: &Self, visible: bool)
```

Shows native keyboard-navigation diagnostics without changing source or history.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer/surface.rs#L255)

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

### interactive

```rust
fn interactive(self: &Self) -> bool
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer/surface.rs#L259)

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

### set_interactive

```rust
fn set_interactive(self: &Self, value: bool)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer/surface.rs#L262)

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

### cursor_position

```rust
fn cursor_position(self: &Self) -> Option<Point>
```

The local pointer in unsnapped artboard coordinates for collaboration presence.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer/surface.rs#L276)

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

### arm_insert

```rust
fn arm_insert(self: &Self, source: String)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer/surface.rs#L290)

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

### begin_asset_drag

```rust
fn begin_asset_drag(self: &Self, source: String, event: &PointerPressedEventArgs)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer/surface.rs#L297)

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

### hit_stack

```rust
fn hit_stack(self: &Self, position: Point) -> Vec<NodeId>
```

Authored controls beneath an artboard point in native front-to-back paint order.
Generated template visuals map back to their authored owner; duplicates, locked,
hidden and out-of-scope layers are omitted. Hosts may use this for a Select Layer menu.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer/surface.rs#L476)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- [`Receiver`](/docs/0.5.0/api/ferroui-system/task/oneshot/struct-receiver/)
- `Any`
- [`InputElementImplExt`](/docs/0.5.0/api/ferroui-base/input/trait-inputelementimplext/)
- [`InteractiveImplExt`](/docs/0.5.0/api/ferroui-base/interactivity/trait-interactiveimplext/)
- [`LayoutableImplExt`](/docs/0.5.0/api/ferroui-base/layout/trait-layoutableimplext/)
- [`FerroObjectImplExt`](/docs/0.5.0/api/ferroui-base/trait-ferroobjectimplext/)
- [`StyledElementImplExt`](/docs/0.5.0/api/ferroui-base/trait-styledelementimplext/)
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- [`VisualImplExt`](/docs/0.5.0/api/ferroui-base/trait-visualimplext/)
- `ErasedDestructor`
- `IntoEither`
- [`ControlImplExt`](/docs/0.5.0/api/ferroui-controls/trait-controlimplext/)
- `Same`
- `Deref`
- [`Upcast<T>`](/docs/0.5.0/api/ferroui-base/trait-upcast/)
- [`Upcast<DesignSurface>`](/docs/0.5.0/api/ferroui-base/trait-upcast/)
- [`StaticType`](/docs/0.5.0/api/ferroui-base/trait-statictype/)
- [`ObjectType`](/docs/0.5.0/api/ferroui-base/trait-objecttype/)
- [`Subclassable<T>`](/docs/0.5.0/api/ferroui-base/trait-subclassable/)
- [`DefaultConstructible`](/docs/0.5.0/api/ferroui-base/trait-defaultconstructible/)
- [`FerroObjectImpl`](/docs/0.5.0/api/ferroui-base/trait-ferroobjectimpl/)
- [`StyledElementImpl`](/docs/0.5.0/api/ferroui-base/trait-styledelementimpl/)
- [`LayoutableImpl`](/docs/0.5.0/api/ferroui-base/layout/trait-layoutableimpl/)
- [`InteractiveImpl`](/docs/0.5.0/api/ferroui-base/interactivity/trait-interactiveimpl/)
- [`ControlImpl`](/docs/0.5.0/api/ferroui-controls/trait-controlimpl/)
- `Default`
- [`InputElementImpl`](/docs/0.5.0/api/ferroui-base/input/trait-inputelementimpl/)
- [`VisualImpl`](/docs/0.5.0/api/ferroui-base/trait-visualimpl/)

## Availability

Extracted for `aarch64-apple-darwin`. Cargo features are listed in the [crate index](/docs/0.5.0/api/).
