Struct tty_interface::layout::InterfaceLayout
source · [−]pub struct InterfaceLayout { /* private fields */ }Expand description
A rendered layout including constituent line and segment arrangement.
Implementations
sourceimpl InterfaceLayout
impl InterfaceLayout
sourcepub fn terminal_size(&self) -> (u16, u16)
pub fn terminal_size(&self) -> (u16, u16)
The terminal size when this layout was created.
sourcepub fn lines(&self) -> &Vec<LineLayout>
pub fn lines(&self) -> &Vec<LineLayout>
This layout’s constituent lines.
sourcepub fn get_line(&self, line_id: LineId) -> Option<&LineLayout>
pub fn get_line(&self, line_id: LineId) -> Option<&LineLayout>
Get the specified line’s layout.
sourcepub fn rendered_line_count(&self) -> u16
pub fn rendered_line_count(&self) -> u16
The total number of rendered terminal lines in this layout, after wrapping.
sourcepub fn end_position(&self) -> Option<AbsolutePosition>
pub fn end_position(&self) -> Option<AbsolutePosition>
The exclusive position on screen where this interface ends.
sourcepub fn get_absolute_position(
&self,
relative: RelativePosition
) -> Option<AbsolutePosition>
pub fn get_absolute_position(
&self,
relative: RelativePosition
) -> Option<AbsolutePosition>
Given a relative position, derive its absolute position in this layout. Returns None if
the relative position is invalid for this layout.
Trait Implementations
sourceimpl Clone for InterfaceLayout
impl Clone for InterfaceLayout
sourcefn clone(&self) -> InterfaceLayout
fn clone(&self) -> InterfaceLayout
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
Auto Trait Implementations
impl RefUnwindSafe for InterfaceLayout
impl Send for InterfaceLayout
impl Sync for InterfaceLayout
impl Unpin for InterfaceLayout
impl UnwindSafe for InterfaceLayout
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more