pub trait Overlayable: Sized {
type Handle;
// Required methods
fn hide_on_unhover(self) -> Self;
fn parent(self, id: WidgetId) -> Self;
fn left_of(self, id: WidgetId) -> Self;
fn right_of(self, id: WidgetId) -> Self;
fn below(self, id: WidgetId) -> Self;
fn above(self, id: WidgetId) -> Self;
fn near(self, id: WidgetId, direction: Direction) -> Self;
fn at(self, location: Point<Px>) -> Self;
fn on_dismiss(self, callback: Callback) -> Self;
fn show(self) -> Self::Handle;
}
Expand description
A type that is being prepared to be shown in an OverlayLayer
.
Required Associated Types§
Required Methods§
Sourcefn hide_on_unhover(self) -> Self
fn hide_on_unhover(self) -> Self
Sets this overlay to hide automatically when it or its relative widget are no longer hovered by the mouse cursor.
Sourcefn right_of(self, id: WidgetId) -> Self
fn right_of(self, id: WidgetId) -> Self
Show this overlay to the right of the specified widget.
Sourcefn near(self, id: WidgetId, direction: Direction) -> Self
fn near(self, id: WidgetId, direction: Direction) -> Self
Shows this overlay near id
off to the direction
side.
Sourcefn on_dismiss(self, callback: Callback) -> Self
fn on_dismiss(self, callback: Callback) -> Self
Sets callback
to be invoked once this overlay is dismissed.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.