pub struct Clipper<'a, W = usize>{ /* private fields */ }Expand description
This widget allows rendering to a temporary buffer and clips it to size for the final rendering.
Implementations§
Source§impl<'a, W> Clipper<'a, W>
impl<'a, W> Clipper<'a, W>
Sourcepub fn layout(self, layout: GenericLayout<W>) -> Self
pub fn layout(self, layout: GenericLayout<W>) -> Self
Set the layout. If no layout is set here the layout is taken from the state.
Sourcepub fn auto_label(self, auto: bool) -> Self
pub fn auto_label(self, auto: bool) -> Self
Render the label automatically when rendering the widget.
Default: true
Sourcepub fn label_style(self, style: Style) -> Self
pub fn label_style(self, style: Style) -> Self
Widget labels.
Sourcepub fn label_alignment(self, alignment: Alignment) -> Self
pub fn label_alignment(self, alignment: Alignment) -> Self
Widget labels.
Sourcepub fn styles(self, styles: ClipperStyle) -> Self
pub fn styles(self, styles: ClipperStyle) -> Self
Combined style.
Sourcepub fn buffer_uses_view_size(self) -> Self
pub fn buffer_uses_view_size(self) -> Self
By default, the buffer is sized according to the maximum extend of the visible widgets.
This may not be enough, when you use popups.
This flag indicates, that the buffer should be at least the size of the rendered view area.
Sourcepub fn layout_size(&self, area: Rect, state: &ClipperState<W>) -> Size
pub fn layout_size(&self, area: Rect, state: &ClipperState<W>) -> Size
Calculate the layout size. Returns the size of the inner area that is available for drawing widgets.
Sourcepub fn into_buffer(
self,
area: Rect,
state: &mut ClipperState<W>,
) -> ClipperBuffer<'a, W>
pub fn into_buffer( self, area: Rect, state: &mut ClipperState<W>, ) -> ClipperBuffer<'a, W>
Calculates the layout and creates a temporary buffer.
Trait Implementations§
Auto Trait Implementations§
impl<'a, W> Freeze for Clipper<'a, W>
impl<'a, W> RefUnwindSafe for Clipper<'a, W>where
W: RefUnwindSafe,
impl<'a, W> Send for Clipper<'a, W>where
W: Send,
impl<'a, W> Sync for Clipper<'a, W>where
W: Sync,
impl<'a, W> Unpin for Clipper<'a, W>where
W: Unpin,
impl<'a, W> UnwindSafe for Clipper<'a, W>where
W: UnwindSafe,
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