Trait cushy::widgets::layers::Overlayable
source · 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.
Object Safety§
This trait is not object safe.