Struct ambient_ui::window::Window
source · pub struct Window {
pub title: String,
pub close: Option<Cb<dyn Fn() + Send + Sync>>,
pub visible: bool,
pub style: Option<WindowStyle>,
pub child: Element,
}
Expand description
A window with a title bar and a child element. Can be moved around.
Fields§
§title: String
The title of the window.
close: Option<Cb<dyn Fn() + Send + Sync>>
A callback to be called when the window requests to be closed.
If this is None
, the window will not have a close button.
This callback should update visible
to false
.
visible: bool
Whether the window is visible.
style: Option<WindowStyle>
An optional chance to style the body of the window.
child: Element
The child element.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Window
impl Send for Window
impl Sync for Window
impl Unpin for Window
impl !UnwindSafe for Window
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> Downcast for T
impl<T> Downcast for T
source§impl<T> ElementComponentExt for Twhere
T: ElementComponent + 'static,
impl<T> ElementComponentExt for Twhere
T: ElementComponent + 'static,
source§impl<T> ElementComponentName for T
impl<T> ElementComponentName for T
source§fn element_component_name(&self) -> &'static str
fn element_component_name(&self) -> &'static str
Returns the name of the type implementing ElementComponent.