Struct rat_widget::scrolled::View
source · pub struct View<T> { /* private fields */ }Expand description
View has its own size, and can contain a stateless widget that will be rendered to a view sized buffer. This buffer is then offset and written to the actual frame buffer.
Implementations§
Trait Implementations§
source§impl<State, T> ScrollingWidget<State> for View<T>where
T: Widget,
impl<State, T> ScrollingWidget<State> for View<T>where
T: Widget,
source§fn need_scroll(&self, area: Rect, _state: &mut State) -> (bool, bool)
fn need_scroll(&self, area: Rect, _state: &mut State) -> (bool, bool)
Widget wants a (horizontal, vertical) scrollbar.
This gets combined with the ScrollbarPolicy.
source§impl<T> StatefulWidget for View<T>where
T: Widget,
impl<T> StatefulWidget for View<T>where
T: Widget,
source§impl<T> StatefulWidgetRef for View<T>where
T: WidgetRef,
impl<T> StatefulWidgetRef for View<T>where
T: WidgetRef,
source§fn render_ref(
&self,
area: Rect,
buf: &mut Buffer,
state: &mut <View<T> as StatefulWidgetRef>::State,
)
fn render_ref( &self, area: Rect, buf: &mut Buffer, state: &mut <View<T> as StatefulWidgetRef>::State, )
Draws the current state of the widget in the given buffer. That is the only method required
to implement a custom stateful widget.
Auto Trait Implementations§
impl<T> Freeze for View<T>where
T: Freeze,
impl<T> RefUnwindSafe for View<T>where
T: RefUnwindSafe,
impl<T> Send for View<T>where
T: Send,
impl<T> Sync for View<T>where
T: Sync,
impl<T> Unpin for View<T>where
T: Unpin,
impl<T> UnwindSafe for View<T>where
T: 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> 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