pub struct Viewport { /* private fields */ }Implementations§
Source§impl Viewport
impl Viewport
pub fn new(terminal_width: u16, terminal_height: u16) -> Self
pub fn update_terminal_size(&mut self, width: u16, height: u16) -> bool
pub fn scroll_up(&mut self, lines: usize)
pub fn scroll_down(&mut self, lines: usize)
pub fn scroll_to_top(&mut self)
pub fn scroll_to_bottom(&mut self)
pub fn page_up(&mut self)
pub fn page_down(&mut self)
pub fn update_content_height(&mut self, new_content_height: usize)
pub fn update_content_height_silent(&mut self, new_content_height: usize)
pub fn set_scroll_offset_direct_silent(&mut self, offset: usize)
pub fn enable_auto_scroll_silent(&mut self)
pub fn force_auto_scroll(&mut self)
pub fn set_scroll_offset_direct(&mut self, offset: usize)
pub fn enable_auto_scroll(&mut self)
pub fn disable_auto_scroll(&mut self)
pub fn get_visible_range(&self) -> (usize, usize)
pub fn output_area(&self) -> LayoutArea
pub fn input_area(&self) -> LayoutArea
pub fn window_height(&self) -> usize
pub fn content_height(&self) -> usize
pub fn scroll_offset(&self) -> usize
pub fn is_auto_scroll_enabled(&self) -> bool
pub fn terminal_size(&self) -> (u16, u16)
pub fn is_usable(&self) -> bool
pub fn debug_info(&self) -> String
pub fn short_debug(&self) -> String
pub fn handle_event(&mut self, event: ViewportEvent) -> bool
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Viewport
impl RefUnwindSafe for Viewport
impl Send for Viewport
impl Sync for Viewport
impl Unpin for Viewport
impl UnwindSafe for Viewport
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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