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.
Members
TYPEto_refchildren_changedinvalidate_measure_on_children_changedbackground_propertyconstructnewchildrenbackgroundset_backgroundis_items_hostset_is_items_hostaffects_parent_arrangeaffects_parent_measure
TYPE
const TYPE: &'static $crate::TypeInfo
The runtime type of this class.
to_ref
fn to_ref(self: &Self) -> $crate::Ref<Panel>
Returns a strong reference to this object.
children_changed
fn children_changed(self: &Self, e: &NotifyCollectionChangedEventArgs<'_, Ref<Control>>)
Called when the children collection changes.
invalidate_measure_on_children_changed
fn invalidate_measure_on_children_changed(self: &Self)
Invalidates the measure of the panel after its children changed.
background_property
fn background_property() -> &'static StyledProperty<Option<Rc<dyn IBrush>>>
Defines the Background property.
construct
fn construct() -> Self
Creates the class data; see ferroui_base::FerroObject::construct.
new
fn new() -> Ref<Self>
children
fn children(self: &Self) -> Controls
The children of the panel.
background
fn background(self: &Self) -> Option<Rc<dyn IBrush>>
A brush with which to paint the background.
set_background
fn set_background(self: &Self, value: Option<Rc<dyn IBrush>>)
is_items_host
fn is_items_host(self: &Self) -> bool
Whether this panel hosts the items created by an items presenter.
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.
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.
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.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeControlImplExtPanelImplExtBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>ReceiverAnyInputElementImplExtInteractiveImplExtLayoutableImplExtFerroObjectImplExtStyledElementImplExtClassDefaultsVisualImplExtErasedDestructorIntoEitherDerefUpcast<T>Upcast<Panel>StaticTypeObjectTypeSubclassable<T>DefaultConstructibleLayoutableImplInteractiveImplInputElementImplControlImplVisualImplFerroObjectImplStyledElementImplPanelImpl
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.