FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    Canvas

    struct · ferroui-controls · v0.5.0

    struct Canvas
    

    A panel that displays child controls at arbitrary locations.

    Unlike other Panel implementations, the canvas doesn't lay out its children in any particular layout. Instead, the positioning of each child control is defined by the Canvas.Left, Canvas.Top, Canvas.Right and Canvas.Bottom attached properties.

    View source

    Members

    TYPE

    const TYPE: &'static $crate::TypeInfo
    

    The runtime type of this class.

    Source

    to_ref

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

    Returns a strong reference to this object.

    Source

    arrange_child

    fn arrange_child(self: &Self, child: &Ref<Control>, final_size: Size)
    

    Arranges a single child within the size allocated to the canvas.

    Source

    left_property

    fn left_property() -> &'static AttachedProperty<f64>
    

    Defines the Left attached property.

    Source

    top_property

    fn top_property() -> &'static AttachedProperty<f64>
    

    Defines the Top attached property.

    Source

    right_property

    fn right_property() -> &'static AttachedProperty<f64>
    

    Defines the Right attached property.

    Source

    bottom_property

    fn bottom_property() -> &'static AttachedProperty<f64>
    

    Defines the Bottom attached property.

    Source

    construct

    fn construct() -> Self
    

    Creates the class data; see ferroui_base::FerroObject::construct.

    Source

    new

    fn new() -> Ref<Self>
    

    Source

    get_left

    fn get_left(element: &FerroObject) -> f64
    

    Gets the value of the Left attached property for a control.

    Source

    set_left

    fn set_left(element: &FerroObject, value: f64)
    

    Sets the value of the Left attached property for a control.

    Source

    get_top

    fn get_top(element: &FerroObject) -> f64
    

    Gets the value of the Top attached property for a control.

    Source

    set_top

    fn set_top(element: &FerroObject, value: f64)
    

    Sets the value of the Top attached property for a control.

    Source

    get_right

    fn get_right(element: &FerroObject) -> f64
    

    Gets the value of the Right attached property for a control.

    Source

    set_right

    fn set_right(element: &FerroObject, value: f64)
    

    Sets the value of the Right attached property for a control.

    Source

    get_bottom

    fn get_bottom(element: &FerroObject) -> f64
    

    Gets the value of the Bottom attached property for a control.

    Source

    set_bottom

    fn set_bottom(element: &FerroObject, value: f64)
    

    Sets the value of the Bottom attached property for a control.

    Source

    Trait implementations

    Availability

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