FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    Panel

    struct · ferroui-controls · v0.5.0

    struct Panel
    

    Base class for controls that can contain multiple children.

    Controls can be added to a panel by adding them to its children collection. All children are layed out to fill the panel.

    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<Panel>
    

    Returns a strong reference to this object.

    Source

    children_changed

    fn children_changed(self: &Self, e: &NotifyCollectionChangedEventArgs<'_, Ref<Control>>)
    

    Called when the children collection changes.

    Source

    invalidate_measure_on_children_changed

    fn invalidate_measure_on_children_changed(self: &Self)
    

    Invalidates the measure of the panel after its children changed.

    Source

    background_property

    fn background_property() -> &'static StyledProperty<Option<Rc<dyn IBrush>>>
    

    Defines the Background property.

    Source

    construct

    fn construct() -> Self
    

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

    Source

    new

    fn new() -> Ref<Self>
    

    Source

    children

    fn children(self: &Self) -> Controls
    

    The children of the panel.

    Source

    background

    fn background(self: &Self) -> Option<Rc<dyn IBrush>>
    

    A brush with which to paint the background.

    Source

    set_background

    fn set_background(self: &Self, value: Option<Rc<dyn IBrush>>)
    

    Source

    is_items_host

    fn is_items_host(self: &Self) -> bool
    

    Whether this panel hosts the items created by an items presenter.

    Source

    set_is_items_host

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

    Marks the panel as the host of the items created by an items presenter: its children are then not its logical children.

    Source

    affects_parent_arrange

    fn affects_parent_arrange<TPanel: ObjectType + Upcast<Panel>>(properties: &[&'static FerroProperty])
    

    Marks a property on a child as affecting the parent panel's arrangement: after a change to any of the properties on a control, invalidate_arrange is called on its visual parent if that is a TPanel.

    Source

    affects_parent_measure

    fn affects_parent_measure<TPanel: ObjectType + Upcast<Panel>>(properties: &[&'static FerroProperty])
    

    Marks a property on a child as affecting the parent panel's measurement: after a change to any of the properties on a control, invalidate_measure is called on its visual parent if that is a TPanel.

    Source

    Trait implementations

    Availability

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