pub struct WindowFrame<'a> { /* private fields */ }
Expand description
Widget for a moveable window.
This widget ignores the area given to render, and uses the area stored in the state instead. The area given to render is used as the outer limit for the window instead.
Render this widget and then use WindowState::widget_area to render your content.
It can handle events for move/resize/close.
Implementations§
Source§impl<'a> WindowFrame<'a>
impl<'a> WindowFrame<'a>
pub fn new() -> Self
Sourcepub fn limit(self, area: Rect) -> Self
pub fn limit(self, area: Rect) -> Self
Limits for the window.
If this is not set, the area given to render will be used.
Sourcepub fn can_resize(self, v: bool) -> Self
pub fn can_resize(self, v: bool) -> Self
Window can be resized?
pub fn styles(self, styles: WindowFrameStyle) -> Self
Sourcepub fn title_style(self, style: Style) -> Self
pub fn title_style(self, style: Style) -> Self
Window title style
Sourcepub fn focus_style(self, style: Style) -> Self
pub fn focus_style(self, style: Style) -> Self
Window focus style
Sourcepub fn hover_style(self, hover: Style) -> Self
pub fn hover_style(self, hover: Style) -> Self
Hover style
Sourcepub fn drag_style(self, drag: Style) -> Self
pub fn drag_style(self, drag: Style) -> Self
Drag style
Trait Implementations§
Source§impl<'a> Debug for WindowFrame<'a>
impl<'a> Debug for WindowFrame<'a>
Source§impl<'a> Default for WindowFrame<'a>
impl<'a> Default for WindowFrame<'a>
Source§fn default() -> WindowFrame<'a>
fn default() -> WindowFrame<'a>
Returns the “default value” for a type. Read more
Source§impl<'a> StatefulWidget for WindowFrame<'a>
impl<'a> StatefulWidget for WindowFrame<'a>
Auto Trait Implementations§
impl<'a> Freeze for WindowFrame<'a>
impl<'a> RefUnwindSafe for WindowFrame<'a>
impl<'a> Send for WindowFrame<'a>
impl<'a> Sync for WindowFrame<'a>
impl<'a> Unpin for WindowFrame<'a>
impl<'a> UnwindSafe for WindowFrame<'a>
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more