Trait gtk::prelude::OverlayExt
source · [−]pub trait OverlayExt: 'static {
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);
}
Expand description
Required Methods
fn 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 property::Widget::halign
and property::Widget::valign
properties.
widget
a Widget
to be added to the container
fn is_overlay_pass_through(&self, widget: &impl IsA<Widget>) -> bool
fn is_overlay_pass_through(&self, widget: &impl IsA<Widget>) -> bool
fn 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 property::Overlay::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
fn 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 property::Overlay::pass-through
child property for widget
.
widget
an overlay child of Overlay
pass_through
whether the child should pass the input through