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§

source

type Handle

The resulting handle type when this overlay is shown.

Required Methods§

source

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.

source

fn parent(self, id: WidgetId) -> Self

Show this overlay with a relationship to another widget.

source

fn left_of(self, id: WidgetId) -> Self

Show this overlay to the left of the specified widget.

source

fn right_of(self, id: WidgetId) -> Self

Show this overlay to the right of the specified widget.

source

fn below(self, id: WidgetId) -> Self

Show this overlay to show below the specified widget.

source

fn above(self, id: WidgetId) -> Self

Show this overlay to show above the specified widget.

source

fn near(self, id: WidgetId, direction: Direction) -> Self

Shows this overlay near id off to the direction side.

source

fn at(self, location: Point<Px>) -> Self

Shows this overlay at a specified window location.

source

fn on_dismiss(self, callback: Callback) -> Self

Sets callback to be invoked once this overlay is dismissed.

source

fn show(self) -> Self::Handle

Shows this overlay, returning a handle that to the displayed overlay.

Object Safety§

This trait is not object safe.

Implementors§