PopupFlyoutBase
struct · ferroui-controls · v0.5.0
struct PopupFlyoutBase
The base class of flyouts that are shown in a Popup.
This class is abstract: only its subclasses can be created.
Members
TYPEto_refhide_coreshow_at_coreshow_at_rect_coreon_openingon_closingcreate_presenterplacement_propertyhorizontal_offset_propertyvertical_offset_propertyplacement_anchor_propertyplacement_gravity_propertycustom_popup_placement_callback_propertyshow_mode_propertyoverlay_dismiss_event_pass_through_propertyoverlay_input_pass_through_element_propertyplacement_constraint_adjustment_propertyconstructpopupplacementset_placementplacement_gravityset_placement_gravityplacement_anchorset_placement_anchorhorizontal_offsetset_horizontal_offsetvertical_offsetset_vertical_offsetcustom_popup_placement_callbackset_custom_popup_placement_callbackshow_modeset_show_modeoverlay_dismiss_event_pass_throughset_overlay_dismiss_event_pass_throughoverlay_input_pass_through_elementset_overlay_input_pass_through_elementplacement_constraint_adjustmentset_placement_constraint_adjustmentto_popup_host_providerclosingopeningshow_at_with
TYPE
const TYPE: &'static $crate::TypeInfo
The runtime type of this class.
to_ref
fn to_ref(self: &Self) -> $crate::Ref<PopupFlyoutBase>
Returns a strong reference to this object.
hide_core
fn hide_core(self: &Self, can_cancel: bool) -> bool
Hides the flyout; can_cancel tells whether the Closing event
is raised and may cancel. Returns true if the action was handled.
show_at_core
fn show_at_core(self: &Self, placement_target: &Control, show_at_pointer: bool) -> bool
Shows the flyout at the given control, at the pointer location
when show_at_pointer. Returns true if the action was handled.
show_at_rect_core
fn show_at_rect_core(self: &Self, placement_target: &Control, placement_rect: Rect) -> bool
Shows the flyout below an explicit rectangle in the target's coordinates. The popup positioner applies RTL and screen constraints. This request does not modify the flyout's placement properties.
on_opening
fn on_opening(self: &Self, args: &CancelEventArgs)
Raises the Opening event.
on_closing
fn on_closing(self: &Self, args: &CancelEventArgs)
Raises the Closing event.
create_presenter
fn create_presenter(self: &Self) -> Ref<Control>
Used to create the content the flyout displays.
placement_property
fn placement_property() -> &'static StyledProperty<PlacementMode>
Defines the Placement property.
horizontal_offset_property
fn horizontal_offset_property() -> &'static StyledProperty<f64>
Defines the HorizontalOffset property.
vertical_offset_property
fn vertical_offset_property() -> &'static StyledProperty<f64>
Defines the VerticalOffset property.
placement_anchor_property
fn placement_anchor_property() -> &'static StyledProperty<PopupAnchor>
Defines the PlacementAnchor property.
placement_gravity_property
fn placement_gravity_property() -> &'static StyledProperty<PopupGravity>
Defines the PlacementGravity property.
custom_popup_placement_callback_property
fn custom_popup_placement_callback_property() -> &'static StyledProperty<Option<CustomPopupPlacementCallbackValue>>
Defines the CustomPopupPlacementCallback property.
show_mode_property
fn show_mode_property() -> &'static StyledProperty<FlyoutShowMode>
Defines the ShowMode property.
overlay_dismiss_event_pass_through_property
fn overlay_dismiss_event_pass_through_property() -> &'static StyledProperty<bool>
Defines the OverlayDismissEventPassThrough property.
overlay_input_pass_through_element_property
fn overlay_input_pass_through_element_property() -> &'static StyledProperty<Option<ferroui_base::ElementRef<InputElement>>>
Defines the OverlayInputPassThroughElement property.
placement_constraint_adjustment_property
fn placement_constraint_adjustment_property() -> &'static StyledProperty<PopupPositionerConstraintAdjustment>
Defines the PlacementConstraintAdjustment property.
construct
fn construct() -> Self
Creates the class data; see ferroui_base::FerroObject::construct.
popup
fn popup(self: &Self) -> Ref<Popup>
The popup the flyout is shown in, created on first use. For derived classes.
placement
fn placement(self: &Self) -> PlacementMode
The desired placement of the flyout in relation to its target.
set_placement
fn set_placement(self: &Self, value: PlacementMode)
placement_gravity
fn placement_gravity(self: &Self) -> PopupGravity
Defines in what direction the flyout should open when the placement
is PlacementMode::AnchorAndGravity.
set_placement_gravity
fn set_placement_gravity(self: &Self, value: PopupGravity)
placement_anchor
fn placement_anchor(self: &Self) -> PopupAnchor
The anchor point on the placement rect when the placement is
PlacementMode::AnchorAndGravity.
set_placement_anchor
fn set_placement_anchor(self: &Self, value: PopupAnchor)
horizontal_offset
fn horizontal_offset(self: &Self) -> f64
The horizontal offset of the flyout in relation to its target.
set_horizontal_offset
fn set_horizontal_offset(self: &Self, value: f64)
vertical_offset
fn vertical_offset(self: &Self) -> f64
The vertical offset of the flyout in relation to its target.
set_vertical_offset
fn set_vertical_offset(self: &Self, value: f64)
custom_popup_placement_callback
fn custom_popup_placement_callback(self: &Self) -> Option<CustomPopupPlacementCallback>
The callback that positions the flyout when the placement is
PlacementMode::Custom.
set_custom_popup_placement_callback
fn set_custom_popup_placement_callback(self: &Self, value: Option<CustomPopupPlacementCallback>)
show_mode
fn show_mode(self: &Self) -> FlyoutShowMode
The desired show mode.
set_show_mode
fn set_show_mode(self: &Self, value: FlyoutShowMode)
overlay_dismiss_event_pass_through
fn overlay_dismiss_event_pass_through(self: &Self) -> bool
Whether the event that closes the flyout is passed through to the parent window.
Clicks outside the popup cause the popup to close. When this is false, these clicks will be handled by the popup and not be registered by the parent window. When true, the events will be passed through to the parent window.
set_overlay_dismiss_event_pass_through
fn set_overlay_dismiss_event_pass_through(self: &Self, value: bool)
overlay_input_pass_through_element
fn overlay_input_pass_through_element(self: &Self) -> Option<Ref<InputElement>>
An element that should receive pointer input events even when underneath the flyout's overlay.
set_overlay_input_pass_through_element
fn set_overlay_input_pass_through_element(self: &Self, value: impl Into<Nullable<InputElement>>)
placement_constraint_adjustment
fn placement_constraint_adjustment(self: &Self) -> PopupPositionerConstraintAdjustment
Describes how the flyout position will be adjusted if the unadjusted position would result in the flyout being partly constrained.
set_placement_constraint_adjustment
fn set_placement_constraint_adjustment(self: &Self, value: PopupPositionerConstraintAdjustment)
to_popup_host_provider
fn to_popup_host_provider(self: &Self) -> Rc<dyn IPopupHostProvider>
The flyout as a popup host provider (the diagnostics contract it implements in the reference).
closing
fn closing(self: &Self, handler: impl Fn(&CancelEventArgs) -> () + 'static) -> Subscription
Raised before the flyout closes; the close can be cancelled. Dropping the returned guard
removes the handler; Subscription::detach keeps it for the life of the flyout.
opening
fn opening(self: &Self, handler: impl Fn(&CancelEventArgs) -> () + 'static) -> Subscription
Raised before the flyout opens; the opening can be cancelled. Dropping the returned guard
removes the handler; Subscription::detach keeps it for the life of the flyout.
show_at_with
fn show_at_with(self: &Self, placement_target: &Control, show_at_pointer: bool)
Shows the flyout for the given control at the current pointer
location when show_at_pointer, as in a context flyout.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeFlyoutBaseImplExtPopupFlyoutBaseImplExtBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>ReceiverAnyFerroObjectImplExtClassDefaultsErasedDestructorIntoEitherDerefUpcast<T>Upcast<PopupFlyoutBase>StaticTypeObjectTypeSubclassable<T>FerroObjectImplFlyoutBaseImplPopupFlyoutBaseImpl
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.