OverlayPopupHost
struct · ferroui-controls · v0.5.0
struct OverlayPopupHost
The popup host that shows a popup inside its top-level, on the popup overlay layer.
Members
TYPEto_reftransform_propertynewtests_keyboard_navigation_handlerset_childhosted_visual_tree_roottransformset_transformdisposeshowhidetake_focusconfigure_positionto_popup_hostcreate_popup_host
TYPE
const TYPE: &'static $crate::TypeInfo
The runtime type of this class.
to_ref
fn to_ref(self: &Self) -> $crate::Ref<OverlayPopupHost>
Returns a strong reference to this object.
transform_property
fn transform_property() -> &'static StyledProperty<Option<Ref<Transform>>>
Defines the Transform property.
new
fn new(overlay_layer: &Ref<PopupOverlayLayer>) -> Ref<Self>
Creates a host that is shown on overlay_layer (internal upstream).
tests_keyboard_navigation_handler
fn tests_keyboard_navigation_handler(self: &Self) -> Option<Rc<dyn IKeyboardNavigationHandler>>
The keyboard navigation handler of the host (for unit tests).
set_child
fn set_child(self: &Self, control: impl Into<Nullable<Control>>)
Sets the control to display in the popup.
hosted_visual_tree_root
fn hosted_visual_tree_root(self: &Self) -> Option<Ref<Visual>>
The root of the separate visual tree of the popup: none, an overlay popup lives in the visual tree of its top-level.
transform
fn transform(self: &Self) -> Option<Ref<Transform>>
A transform that will be applied to the popup.
set_transform
fn set_transform(self: &Self, value: impl Into<Nullable<Transform>>)
dispose
fn dispose(self: &Self)
Hides the popup.
show
fn show(self: &Self)
Shows the popup: adds the host to its overlay layer.
hide
fn hide(self: &Self)
Hides the popup: removes the host from its overlay layer.
take_focus
fn take_focus(self: &Self)
Takes focus from any currently focused native control.
configure_position
fn configure_position(self: &Self, position_request: PopupPositionRequest)
Configures the position of the popup according to a target control and a set of placement parameters.
to_popup_host
fn to_popup_host(self: &Self) -> Rc<dyn IPopupHost>
The host as a popup host (the popup host contract it implements upstream).
create_popup_host
fn create_popup_host(target: &Visual, dependency_resolver: Option<Rc<dyn IFerroDependencyResolver>>, should_use_overlay_layer: bool) -> Rc<dyn IPopupHost>
Creates the popup host for a popup placed relative to target: a
native popup root when the platform of the top-level of target
creates popups and should_use_overlay_layer is false, otherwise an
overlay popup host on the popup overlay layer of target (internal
upstream).
Panics
Panics when neither can be created.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeTemplatedControlImplExtContentControlImplExtControlImplExtBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>ReceiverAnyInputElementImplExtInteractiveImplExtLayoutableImplExtFerroObjectImplExtStyledElementImplExtClassDefaultsVisualImplExtErasedDestructorIntoEitherDerefUpcast<T>Upcast<OverlayPopupHost>StaticTypeObjectTypeSubclassable<T>StyledElementImplVisualImplControlImplTemplatedControlImplContentControlImplIFocusScopeFerroObjectImplInteractiveImplInputElementImplLayoutableImpl
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.