IPopupHost
trait · ferroui-controls · v0.5.0
trait IPopupHost: IDisposable + IFocusScope
Represents the top-level control opened by a Popup.
A popup host can be either be a popup window created by the operating
system (PopupRoot) or an OverlayPopupHost which is created on a
popup overlay layer.
Both hosts convert to Rc<dyn IPopupHost> with to_popup_host()
(internal upstream).
Members
widthset_widthmin_widthset_min_widthmax_widthset_max_widthheightset_heightmin_heightset_min_heightmax_heightset_max_heightpresentertopmostset_topmostis_hit_test_visibleset_is_hit_test_visibletransformset_transformhosted_visual_tree_roottemplate_appliedconfigure_positionset_childshowhidetake_focusas_controlas_popup_rootas_overlay_popup_host
width
fn width(self: &Self) -> f64
Gets the fixed width of the popup.
set_width
fn set_width(self: &Self, value: f64)
Sets the fixed width of the popup.
min_width
fn min_width(self: &Self) -> f64
Gets the minimum width of the popup.
set_min_width
fn set_min_width(self: &Self, value: f64)
Sets the minimum width of the popup.
max_width
fn max_width(self: &Self) -> f64
Gets the maximum width of the popup.
set_max_width
fn set_max_width(self: &Self, value: f64)
Sets the maximum width of the popup.
height
fn height(self: &Self) -> f64
Gets the fixed height of the popup.
set_height
fn set_height(self: &Self, value: f64)
Sets the fixed height of the popup.
min_height
fn min_height(self: &Self) -> f64
Gets the minimum height of the popup.
set_min_height
fn set_min_height(self: &Self, value: f64)
Sets the minimum height of the popup.
max_height
fn max_height(self: &Self) -> f64
Gets the maximum height of the popup.
set_max_height
fn set_max_height(self: &Self, value: f64)
Sets the maximum height of the popup.
presenter
fn presenter(self: &Self) -> Option<Ref<ContentPresenter>>
Gets the presenter from the control's template.
topmost
fn topmost(self: &Self) -> bool
Gets whether the popup appears on top of all other windows.
set_topmost
fn set_topmost(self: &Self, value: bool)
Sets whether the popup appears on top of all other windows.
is_hit_test_visible
fn is_hit_test_visible(self: &Self) -> bool
Gets whether the popup takes part in pointer hit testing.
set_is_hit_test_visible
fn set_is_hit_test_visible(self: &Self, value: bool)
Sets whether the popup takes part in pointer hit testing.
transform
fn transform(self: &Self) -> Option<Ref<Transform>>
Gets a transform that will be applied to the popup.
set_transform
fn set_transform(self: &Self, value: Option<Ref<Transform>>)
Sets a transform that will be applied to the popup.
hosted_visual_tree_root
fn hosted_visual_tree_root(self: &Self) -> Option<Ref<Visual>>
Gets the root of the visual tree in the case where the popup is presented using a separate visual tree.
template_applied
fn template_applied(self: &Self, handler: Rc<dyn Fn(&TemplateAppliedEventArgs) -> ()>) -> Rc<dyn IDisposable>
Raised when the control's template is applied. Disposing the returned handle unsubscribes.
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.
set_child
fn set_child(self: &Self, control: Option<Ref<Control>>)
Sets the control to display in the popup.
show
fn show(self: &Self)
Shows the popup.
hide
fn hide(self: &Self)
Hides the popup.
take_focus
fn take_focus(self: &Self)
Takes focus from any currently focused native control.
as_control
fn as_control(self: &Self) -> Ref<Control>
The control that is the host (the host cast to a control).
as_popup_root
fn as_popup_root(self: &Self) -> Option<Ref<PopupRoot>>
The host as a popup root, if it is one.
as_overlay_popup_host
fn as_overlay_popup_host(self: &Self) -> Option<Ref<OverlayPopupHost>>
The host as an overlay popup host, if it is one.
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.