pub struct Window {
pub buffer_index: usize,
pub position: Point,
pub size: (usize, usize),
pub vtop: usize,
pub vleft: usize,
pub cursor_x: usize,
pub cursor_y: usize,
pub active: bool,
pub vx: usize,
}Fields§
§buffer_index: usize§position: Point§size: (usize, usize)§vtop: usize§vleft: usize§cursor_x: usize§cursor_y: usize§active: bool§vx: usizeImplementations§
Source§impl Window
impl Window
Sourcepub fn inner_width(&self) -> usize
pub fn inner_width(&self) -> usize
Sourcepub fn inner_height(&self) -> usize
pub fn inner_height(&self) -> usize
Sourcepub fn contains_position(&self, x: usize, y: usize) -> bool
pub fn contains_position(&self, x: usize, y: usize) -> bool
Sourcepub fn terminal_to_local_transform(
&self,
terminal_x: usize,
terminal_y: usize,
) -> Option<(usize, usize)>
pub fn terminal_to_local_transform( &self, terminal_x: usize, terminal_y: usize, ) -> Option<(usize, usize)>
Transforms terminal coordinates to local coordinates, i.e., position relative to the window
§Arguments
terminal_x: The x coordinate relative to the terminalterminal_y: The y coordinate relative to the terminal
§Returns
- Local coordinates if the terminal coordinates provided are contained within the window
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Window
impl RefUnwindSafe for Window
impl Send for Window
impl Sync for Window
impl Unpin for Window
impl UnsafeUnpin for Window
impl UnwindSafe for Window
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