DesignSurface
struct · ferroui-designer · v0.5.0
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.
Members
layout_helpers_visibleset_layout_helpers_visibleinvalidate_layout_helperslayout_helper_snapshotlayout_edit_previewTYPEto_refnewattachon_commiton_selection_changedset_zoomset_gridset_canvas_guidescanvas_guidesfocus_order_visibleset_focus_order_visibleinteractiveset_interactivecursor_positionarm_insertbegin_asset_draghit_stack
layout_helpers_visible
fn layout_helpers_visible(self: &Self) -> bool
set_layout_helpers_visible
fn set_layout_helpers_visible(self: &Self, visible: bool)
Changes only editor presentation. Hiding helpers cancels pending canvas drafts.
invalidate_layout_helpers
fn invalidate_layout_helpers(self: &Self)
Invalidates measurements without disturbing a captured gesture or its source guard.
layout_helper_snapshot
fn layout_helper_snapshot(self: &Self) -> Option<LayoutHelperSnapshot>
Current selection's panel features in panel coordinates with an artboard transform.
layout_edit_preview
fn layout_edit_preview(self: &Self) -> Option<Rc<LayoutEditPreview>>
The currently displayed drop/handle proposal, useful to hosts and native UI tests.
TYPE
const TYPE: &'static $crate::TypeInfo
The runtime type of this class.
to_ref
fn to_ref(self: &Self) -> $crate::Ref<DesignSurface>
Returns a strong reference to this object.
new
fn new() -> Ref<Self>
attach
fn attach(self: &Self, session: &Rc<RefCell<DesignerSession>>)
on_commit
fn on_commit(self: &Self, callback: impl Fn(DesignGesture) -> () + 'static)
on_selection_changed
fn on_selection_changed(self: &Self, callback: impl Fn() -> () + 'static)
set_zoom
fn set_zoom(self: &Self, zoom: f64)
set_grid
fn set_grid(self: &Self, size: f64)
Legacy standalone-host override. Any finite nonnegative spacing remains supported; applying bounded CanvasGuideSettings later replaces this override.
set_canvas_guides
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.
canvas_guides
fn canvas_guides(self: &Self) -> crate::CanvasGuideSettings
focus_order_visible
fn focus_order_visible(self: &Self) -> bool
set_focus_order_visible
fn set_focus_order_visible(self: &Self, visible: bool)
Shows native keyboard-navigation diagnostics without changing source or history.
interactive
fn interactive(self: &Self) -> bool
set_interactive
fn set_interactive(self: &Self, value: bool)
cursor_position
fn cursor_position(self: &Self) -> Option<Point>
The local pointer in unsnapped artboard coordinates for collaboration presence.
arm_insert
fn arm_insert(self: &Self, source: String)
begin_asset_drag
fn begin_asset_drag(self: &Self, source: String, event: &PointerPressedEventArgs)
hit_stack
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.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>ReceiverAnyInputElementImplExtInteractiveImplExtLayoutableImplExtFerroObjectImplExtStyledElementImplExtClassDefaultsVisualImplExtErasedDestructorIntoEitherControlImplExtSameDerefUpcast<T>Upcast<DesignSurface>StaticTypeObjectTypeSubclassable<T>DefaultConstructibleFerroObjectImplStyledElementImplLayoutableImplInteractiveImplControlImplDefaultInputElementImplVisualImpl
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.