FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    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.

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

    Returns a strong reference to this object.

    Source

    transform_property

    fn transform_property() -> &'static StyledProperty<Option<Ref<Transform>>>
    

    Defines the Transform property.

    Source

    new

    fn new(overlay_layer: &Ref<PopupOverlayLayer>) -> Ref<Self>
    

    Creates a host that is shown on overlay_layer (internal upstream).

    Source

    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).

    Source

    set_child

    fn set_child(self: &Self, control: impl Into<Nullable<Control>>)
    

    Sets the control to display in the popup.

    Source

    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.

    Source

    transform

    fn transform(self: &Self) -> Option<Ref<Transform>>
    

    A transform that will be applied to the popup.

    Source

    set_transform

    fn set_transform(self: &Self, value: impl Into<Nullable<Transform>>)
    

    Source

    dispose

    fn dispose(self: &Self)
    

    Hides the popup.

    Source

    show

    fn show(self: &Self)
    

    Shows the popup: adds the host to its overlay layer.

    Source

    hide

    fn hide(self: &Self)
    

    Hides the popup: removes the host from its overlay layer.

    Source

    take_focus

    fn take_focus(self: &Self)
    

    Takes focus from any currently focused native control.

    Source

    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.

    Source

    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).

    Source

    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.

    Source

    Trait implementations

    Availability

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