pub struct WidgetViewport {
pub screen_row: u16,
pub height: u16,
pub content_row: usize,
}Expand description
A viewport assigned to one renderer item.
content_row is a row in the terminal-width-dependent visual layout.
Fields§
§screen_row: u16§height: u16§content_row: usizeImplementations§
Source§impl WidgetViewport
impl WidgetViewport
Sourcepub fn scroll_to_include(&mut self, position: VisualPosition) -> ViewportChange
pub fn scroll_to_include(&mut self, position: VisualPosition) -> ViewportChange
Scrolls the minimum distance needed to include position.
Moving inside the current viewport leaves content_row unchanged.
Trait Implementations§
Source§impl Clone for WidgetViewport
impl Clone for WidgetViewport
Source§fn clone(&self) -> WidgetViewport
fn clone(&self) -> WidgetViewport
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for WidgetViewport
Source§impl Debug for WidgetViewport
impl Debug for WidgetViewport
Source§impl Default for WidgetViewport
impl Default for WidgetViewport
Source§fn default() -> WidgetViewport
fn default() -> WidgetViewport
Returns the “default value” for a type. Read more
impl Eq for WidgetViewport
Source§impl PartialEq for WidgetViewport
impl PartialEq for WidgetViewport
impl StructuralPartialEq for WidgetViewport
Auto Trait Implementations§
impl Freeze for WidgetViewport
impl RefUnwindSafe for WidgetViewport
impl Send for WidgetViewport
impl Sync for WidgetViewport
impl Unpin for WidgetViewport
impl UnsafeUnpin for WidgetViewport
impl UnwindSafe for WidgetViewport
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