pub struct DialogFrame<'a> { /* private fields */ }Expand description
Renders the frame and the Ok/Cancel buttons for a dialog window.
After rendering BaseDialogState::widget_area is available to render any content.
Implementations§
Source§impl<'a> DialogFrame<'a>
impl<'a> DialogFrame<'a>
pub fn new() -> Self
pub fn styles(self, styles: DialogFrameStyle) -> Self
Sourcepub fn border_style(self, style: Style) -> Self
pub fn border_style(self, style: Style) -> Self
Sets the border-style for the Block, if any.
Sourcepub fn title_style(self, style: Style) -> Self
pub fn title_style(self, style: Style) -> Self
Sets the title-style for the Block, if any.
Button style.
Sourcepub fn cancel_text(self, str: &'a str) -> Self
pub fn cancel_text(self, str: &'a str) -> Self
Cancel text.
Sourcepub fn left(self, left: Constraint) -> Self
pub fn left(self, left: Constraint) -> Self
Margin constraint for the left side.
Sourcepub fn top(self, top: Constraint) -> Self
pub fn top(self, top: Constraint) -> Self
Margin constraint for the top side.
Sourcepub fn right(self, right: Constraint) -> Self
pub fn right(self, right: Constraint) -> Self
Margin constraint for the right side.
Sourcepub fn bottom(self, bottom: Constraint) -> Self
pub fn bottom(self, bottom: Constraint) -> Self
Margin constraint for the bottom side.
Sourcepub fn width(self, width: Constraint) -> Self
pub fn width(self, width: Constraint) -> Self
Constraint for the width.
Sourcepub fn height(self, height: Constraint) -> Self
pub fn height(self, height: Constraint) -> Self
Constraint for the height.
Sourcepub fn layout_size(&self, area: Rect) -> Rect
pub fn layout_size(&self, area: Rect) -> Rect
Calculate the resulting dialog area. Returns the inner area that is available for drawing widgets.
Trait Implementations§
Source§impl<'a> Clone for DialogFrame<'a>
impl<'a> Clone for DialogFrame<'a>
Source§fn clone(&self) -> DialogFrame<'a>
fn clone(&self) -> DialogFrame<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for DialogFrame<'a>
impl<'a> Debug for DialogFrame<'a>
Source§impl<'a> Default for DialogFrame<'a>
impl<'a> Default for DialogFrame<'a>
Source§fn default() -> DialogFrame<'a>
fn default() -> DialogFrame<'a>
Returns the “default value” for a type. Read more
Source§impl<'a> StatefulWidget for DialogFrame<'a>
impl<'a> StatefulWidget for DialogFrame<'a>
Auto Trait Implementations§
impl<'a> Freeze for DialogFrame<'a>
impl<'a> RefUnwindSafe for DialogFrame<'a>
impl<'a> Send for DialogFrame<'a>
impl<'a> Sync for DialogFrame<'a>
impl<'a> Unpin for DialogFrame<'a>
impl<'a> UnwindSafe for DialogFrame<'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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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