FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    LayoutContext

    struct · ferroui-designer-tools · v0.5.0

    struct LayoutContext<'a>
    

    Bounds and resolved slots use one common coordinate space. Grid boundaries use panel-local units.

    View source

    Members

    document

    document: &'a ferroui_designer_core::Document
    

    Source

    bounds

    bounds: &'a std::collections::BTreeMap<ferroui_designer_core::NodeId, crate::Rect>
    

    Source

    new

    fn new(document: &'a Document, bounds: &'a BTreeMap<NodeId, Rect>) -> Self
    

    Source

    with_grid_lines

    fn with_grid_lines(self: Self, lines: &'a BTreeMap<NodeId, GridLines>) -> Self
    

    Source

    with_resolved_layout

    fn with_resolved_layout(self: Self, layout: &'a BTreeMap<NodeId, ResolvedLayout>) -> Self
    

    Source

    with_resolved_properties

    fn with_resolved_properties(self: Self, values: &'a BTreeMap<NodeId, BTreeMap<String, String>>) -> Self
    

    Effective runtime values used to interpret panel layout, including styles and bindings. These values never replace authored expressions when an operation writes a property.

    Source

    property

    fn property(self: &Self, node: NodeId, name: &str) -> Option<&str>
    

    Source

    children

    fn children(self: &Self, panel: NodeId) -> Result<Vec<NodeId>>
    

    The authored children, preserving their source order and explicit content slot.

    Source

    content_container

    fn content_container(self: &Self, panel: NodeId) -> Result<NodeId>
    

    The AST owner of the panel's content, including explicit Children/Content/Child elements.

    Source

    resolved_layout

    fn resolved_layout(self: &Self, node: NodeId) -> Result<ResolvedLayout>
    

    Resolved allocation before margin/alignment/render transforms, if supplied by the host.

    Source

    is_visible

    fn is_visible(self: &Self, node: NodeId) -> Result<bool>
    

    Source

    grid_boundaries

    fn grid_boundaries(self: &Self, panel: NodeId) -> Result<GridLines>
    

    Actual Grid track boundaries. A portable fallback resolves unconstrained pixel/star tracks.

    Source

    bounds

    fn bounds(self: &Self, node: NodeId) -> Result<Rect>
    

    Source

    Trait implementations

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

    Availability

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