[−][src]Struct crossterm::AlternateScreen
With this type you will be able to switch to alternate screen and back to main screen. Check also the Screen type for swishing to alternate mode.
Although this type is available for you to use I would recommend using Screen
instead.
Fields
screen: Screen
Methods
impl AlternateScreen
[src]
pub fn new(
command: Box<dyn IAlternateScreenCommand + 'static + Sync + Send>,
screen: Screen
) -> AlternateScreen
[src]
command: Box<dyn IAlternateScreenCommand + 'static + Sync + Send>,
screen: Screen
) -> AlternateScreen
Create new instance of alternate screen.
pub fn to_alternate_screen(
stdout: TerminalOutput,
raw_mode: bool
) -> Result<AlternateScreen, Error>
[src]
stdout: TerminalOutput,
raw_mode: bool
) -> Result<AlternateScreen, Error>
Switch to alternate screen. This function will return an AlternateScreen
instance if everything went well this type will give you control over the AlternateScreen
.
The bool specifies whether the screen should be in raw mode or not.
What is Alternate screen?
*Nix style applications often utilize an alternate screen buffer, so that they can modify the entire contents of the buffer, without affecting the application that started them. The alternate buffer is exactly the dimensions of the window, without any scrollback region. For an example of this behavior, consider when vim is launched from bash. Vim uses the entirety of the screen to edit the file, then returning to bash leaves the original buffer unchanged.
pub fn to_main_screen(&self) -> Result<(), Error>
[src]
Switch the alternate screen back to main screen.
Trait Implementations
impl Drop for AlternateScreen
[src]
Auto Trait Implementations
impl Send for AlternateScreen
impl Sync for AlternateScreen
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,