FlyoutBase
struct · ferroui-controls · v0.5.0
struct FlyoutBase
The base class of flyouts.
This class is abstract: only its subclasses can be created.
Members
TYPEto_refshow_athideon_openedon_closedis_open_propertytarget_propertyattached_flyout_propertyconstructopenedclosedis_openset_is_opentargetset_targetget_attached_flyoutset_attached_flyoutshow_attached_flyout
TYPE
const TYPE: &'static $crate::TypeInfo
The runtime type of this class.
to_ref
fn to_ref(self: &Self) -> $crate::Ref<FlyoutBase>
Returns a strong reference to this object.
show_at
fn show_at(self: &Self, placement_target: &Control)
Shows the flyout at the given control.
hide
fn hide(self: &Self)
Hides the flyout.
on_opened
fn on_opened(self: &Self)
Raises the Opened event.
on_closed
fn on_closed(self: &Self)
Raises the Closed event.
is_open_property
fn is_open_property() -> &'static StyledProperty<bool>
Defines the IsOpen property.
target_property
fn target_property() -> &'static DirectProperty<FlyoutBase, Option<ElementRef<Control>>>
Defines the Target property.
attached_flyout_property
fn attached_flyout_property() -> &'static AttachedProperty<Option<Ref<FlyoutBase>>>
Defines the AttachedFlyout attached property.
construct
fn construct() -> Self
Creates the class data; see ferroui_base::FerroObject::construct.
opened
fn opened(self: &Self, handler: impl Fn() -> () + 'static) -> Subscription
Raised when the flyout is opened. Dropping the returned guard removes the handler;
Subscription::detach keeps it for the life of the flyout.
closed
fn closed(self: &Self, handler: impl Fn() -> () + 'static) -> Subscription
Raised when the flyout is closed. Dropping the returned guard removes the handler;
Subscription::detach keeps it for the life of the flyout.
is_open
fn is_open(self: &Self) -> bool
Whether this flyout is currently open.
Setting this property to true will show the flyout at the last
known placement target. If no target has been set via show_at,
setting this to true will have no effect.
set_is_open
fn set_is_open(self: &Self, value: bool)
target
fn target(self: &Self) -> Option<Ref<Control>>
The target used for showing the flyout.
set_target
fn set_target(self: &Self, value: impl Into<Nullable<Control>>)
Sets the target used for showing the flyout. For derived classes.
get_attached_flyout
fn get_attached_flyout(element: &Control) -> Option<Ref<FlyoutBase>>
Gets the flyout attached to element.
set_attached_flyout
fn set_attached_flyout(element: &Control, value: impl Into<Nullable<FlyoutBase>>)
Attaches a flyout to element.
show_attached_flyout
fn show_attached_flyout(flyout_owner: &Control)
Shows the flyout attached to flyout_owner, if any, at it.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeFlyoutBaseImplExtBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>ReceiverAnyFerroObjectImplExtClassDefaultsErasedDestructorIntoEitherDerefUpcast<T>Upcast<FlyoutBase>StaticTypeObjectTypeSubclassable<T>FerroObjectImplFlyoutBaseImpl
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.