pub struct TerminalPane { /* private fields */ }Expand description
A terminal pane being built: terminal or terminal_with, then
node (or .into()) to place it.
The program starts when the pane is first laid out, at the pane’s size,
and is told every new size after. While the pane has the focus, every
key goes to the program (Ctrl+C and Tab included) except the ones
release_keys names, which go to the app; the
mouse goes to it when it asked for the mouse, and pastes always do.
Shift+PgUp and Shift+PgDn, and the wheel when the program does not want
the mouse, scroll back through what scrolled off the top; any other key
returns to the live screen. When the program exits its last screen
stays, status is set, on_exit
runs, and keys go to the app again. The program is ended when the pane
leaves the tree.
Implementations§
Source§impl TerminalPane
impl TerminalPane
Sourcepub fn on_exit(
self,
handler: impl FnMut(ExitStatus, &mut Ctx) + 'static,
) -> TerminalPane
pub fn on_exit( self, handler: impl FnMut(ExitStatus, &mut Ctx) + 'static, ) -> TerminalPane
Run handler on the app’s thread when the program exits, with how
it ended.
Sourcepub fn status(&self) -> Signal<Option<ExitStatus>>
pub fn status(&self) -> Signal<Option<ExitStatus>>
How the program ended: None while it runs. Read it in a node to
show it.
Sourcepub fn scrollback(self, rows: usize) -> TerminalPane
pub fn scrollback(self, rows: usize) -> TerminalPane
Keep up to rows rows that scrolled off the top (default
DEFAULT_SCROLLBACK). Before the pane is first laid out.
Sourcepub fn release_keys(self, keys: &str) -> TerminalPane
pub fn release_keys(self, keys: &str) -> TerminalPane
Keys (space-separated names, as Node::on_key takes them) that
are not sent to the program but go on to the app’s bindings: a way
out of the pane, such as "ctrl+q f10".
Trait Implementations§
Source§impl From<TerminalPane> for Node
impl From<TerminalPane> for Node
Source§fn from(pane: TerminalPane) -> Node
fn from(pane: TerminalPane) -> Node
Auto Trait Implementations§
impl !RefUnwindSafe for TerminalPane
impl !Send for TerminalPane
impl !Sync for TerminalPane
impl !UnwindSafe for TerminalPane
impl Freeze for TerminalPane
impl Unpin for TerminalPane
impl UnsafeUnpin for TerminalPane
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
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.