pub struct Viewport {
pub first_row: usize,
pub first_col: usize,
pub rows: usize,
pub cols: usize,
pub overscan: usize,
}Expand description
A scroll viewport in cell coordinates, with a render margin.
Fields§
§first_row: usize§first_col: usize§rows: usize§cols: usize§overscan: usizeExtra rows/cols rendered beyond the visible edge, to absorb scroll jitter.
Implementations§
Source§impl Viewport
impl Viewport
Sourcepub fn visible_range(&self) -> CellRange
pub fn visible_range(&self) -> CellRange
The range of cells actually visible.
Sourcepub fn render_range(&self) -> CellRange
pub fn render_range(&self) -> CellRange
The range to render, including overscan.
Sourcepub fn active_cell(&self) -> CellRef
pub fn active_cell(&self) -> CellRef
The cell holding keyboard focus.
Trait Implementations§
impl Copy for Viewport
Source§impl<'de> Deserialize<'de> for Viewport
impl<'de> Deserialize<'de> for Viewport
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl FromWasmAbi for Viewport
impl FromWasmAbi for Viewport
Source§impl IntoWasmAbi for Viewport
impl IntoWasmAbi for Viewport
Source§impl LongRefFromWasmAbi for Viewport
impl LongRefFromWasmAbi for Viewport
Source§impl OptionFromWasmAbi for Viewport
impl OptionFromWasmAbi for Viewport
Source§impl OptionIntoWasmAbi for Viewport
impl OptionIntoWasmAbi for Viewport
Source§impl RefFromWasmAbi for Viewport
impl RefFromWasmAbi for Viewport
Source§impl RefMutFromWasmAbi for Viewport
impl RefMutFromWasmAbi for Viewport
impl SupportsConstructor for Viewport
impl SupportsInstanceProperty for Viewport
impl SupportsStaticProperty for Viewport
Source§impl TryFromJsValue for Viewport
impl TryFromJsValue for Viewport
Source§impl VectorFromWasmAbi for Viewport
impl VectorFromWasmAbi for Viewport
Source§impl VectorIntoWasmAbi for Viewport
impl VectorIntoWasmAbi for Viewport
Auto Trait Implementations§
impl Freeze for Viewport
impl RefUnwindSafe for Viewport
impl Send for Viewport
impl Sync for Viewport
impl Unpin for Viewport
impl UnsafeUnpin 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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
Source§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as
IntoWasmAbi::AbiSource§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
Same as
IntoWasmAbi::into_abi, except that it may throw and never
return in the case of Err.