pub struct Window { /* private fields */ }Expand description
A draggable window with a bottom-right resize handle and retained geometry. Position and size builders set initial values; later interaction is kept by ID.
Implementations§
Source§impl Window
impl Window
pub fn new(title: impl Into<String>) -> Self
pub fn style(self, style: WindowStyle) -> Self
pub fn id(self, id: Id) -> Self
pub fn default_position(self, position: Vec2) -> Self
Sourcepub fn offset(self, offset: Vec2) -> Self
pub fn offset(self, offset: Vec2) -> Self
Translate the entire panel for this pass without changing its retained
drag position. Chrome, content, blur, clipping and hits move together.
Unlike default_position, this is evaluated on every pass and may move
outside the viewport for an exit animation.
pub fn default_size(self, size: Vec2) -> Self
pub fn min_size(self, size: Vec2) -> Self
pub fn draggable(self, value: bool) -> Self
pub fn resizable(self, value: bool) -> Self
pub fn padding(self, padding: Padding) -> Self
pub fn rounding(self, rounding: CornerRadius) -> Self
👎Deprecated:
use .corner_radius(..); one name for the corner radius of every component
pub fn corner_radius(self, radius: impl Into<CornerRadius>) -> Self
Sourcepub fn blur(self, radius: f32) -> Self
pub fn blur(self, radius: f32) -> Self
Blur the backdrop with sigma in logical pixels (0 disables, maximum 64). Window and title fills become translucent while blur is enabled.
pub fn show<R>( self, context: &mut Context, build: impl FnOnce(&mut Ui<'_>) -> R, ) -> R
Auto Trait Implementations§
impl !RefUnwindSafe for Window
impl !UnwindSafe for Window
impl Freeze for Window
impl Send for Window
impl Sync for Window
impl Unpin for Window
impl UnsafeUnpin 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.