pub trait OverlayExt: IsA<Overlay> + 'static {
// Provided methods
fn add_overlay(&self, widget: &impl IsA<Widget>) { ... }
fn is_overlay_pass_through(&self, widget: &impl IsA<Widget>) -> bool { ... }
fn reorder_overlay(&self, child: &impl IsA<Widget>, index_: i32) { ... }
fn set_overlay_pass_through(
&self,
widget: &impl IsA<Widget>,
pass_through: bool,
) { ... }
fn child_index<T: IsA<Widget>>(&self, item: &T) -> i32 { ... }
fn set_child_index<T: IsA<Widget>>(&self, item: &T, index: i32) { ... }
}Provided Methods§
Sourcefn add_overlay(&self, widget: &impl IsA<Widget>)
fn add_overlay(&self, widget: &impl IsA<Widget>)
Adds widget to self.
The widget will be stacked on top of the main widget
added with ContainerExt::add().
The position at which widget is placed is determined
from its halign and valign properties.
§widget
a Widget to be added to the container
Sourcefn is_overlay_pass_through(&self, widget: &impl IsA<Widget>) -> bool
fn is_overlay_pass_through(&self, widget: &impl IsA<Widget>) -> bool
Convenience function to get the value of the pass-through
child property for widget.
§widget
an overlay child of Overlay
§Returns
whether the widget is a pass through child.
Sourcefn reorder_overlay(&self, child: &impl IsA<Widget>, index_: i32)
fn reorder_overlay(&self, child: &impl IsA<Widget>, index_: i32)
Moves child to a new index in the list of self children.
The list contains overlays in the order that these were
added to self by default. See also index.
A widget’s index in the self children list determines which order
the children are drawn if they overlap. The first child is drawn at
the bottom. It also affects the default focus chain order.
§child
the overlaid Widget to move
§index_
the new index for child in the list of overlay children
of self, starting from 0. If negative, indicates the end of
the list
Sourcefn set_overlay_pass_through(
&self,
widget: &impl IsA<Widget>,
pass_through: bool,
)
fn set_overlay_pass_through( &self, widget: &impl IsA<Widget>, pass_through: bool, )
Convenience function to set the value of the pass-through
child property for widget.
§widget
an overlay child of Overlay
§pass_through
whether the child should pass the input through
fn child_index<T: IsA<Widget>>(&self, item: &T) -> i32
fn set_child_index<T: IsA<Widget>>(&self, item: &T, index: i32)
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".