FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    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.

    View source

    Members

    layout_helpers_visible

    fn layout_helpers_visible(self: &Self) -> bool
    

    Source

    set_layout_helpers_visible

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

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

    Source

    invalidate_layout_helpers

    fn invalidate_layout_helpers(self: &Self)
    

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

    Source

    layout_helper_snapshot

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

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

    Source

    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.

    Source

    TYPE

    const TYPE: &'static $crate::TypeInfo
    

    The runtime type of this class.

    Source

    to_ref

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

    Returns a strong reference to this object.

    Source

    new

    fn new() -> Ref<Self>
    

    Source

    attach

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

    Source

    on_commit

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

    Source

    on_selection_changed

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

    Source

    set_zoom

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

    Source

    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.

    Source

    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.

    Source

    canvas_guides

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

    Source

    focus_order_visible

    fn focus_order_visible(self: &Self) -> bool
    

    Source

    set_focus_order_visible

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

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

    Source

    interactive

    fn interactive(self: &Self) -> bool
    

    Source

    set_interactive

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

    Source

    cursor_position

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

    The local pointer in unsnapped artboard coordinates for collaboration presence.

    Source

    arm_insert

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

    Source

    begin_asset_drag

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

    Source

    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.

    Source

    Trait implementations

    Availability

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