pub struct Tab {
pub id: TabId,
pub terminal: Arc<Mutex<TerminalManager>>,
pub title: String,
pub has_activity: bool,
pub scroll_state: ScrollState,
pub mouse: MouseState,
pub bell: BellState,
pub cache: RenderCache,
pub refresh_task: Option<JoinHandle<()>>,
pub working_directory: Option<String>,
}Expand description
A single terminal tab with its own state
Fields§
§id: TabIdUnique identifier for this tab
terminal: Arc<Mutex<TerminalManager>>The terminal session for this tab
title: StringTab title (from OSC sequences or fallback)
has_activity: boolWhether this tab has unread activity since last viewed
scroll_state: ScrollStateScroll state for this tab
mouse: MouseStateMouse state for this tab
bell: BellStateBell state for this tab
cache: RenderCacheRender cache for this tab
refresh_task: Option<JoinHandle<()>>Async task for refresh polling
working_directory: Option<String>Working directory when tab was created (for inheriting)
Implementations§
Source§impl Tab
impl Tab
Sourcepub fn new(
id: TabId,
config: &Config,
_runtime: Arc<Runtime>,
working_directory: Option<String>,
) -> Result<Self>
pub fn new( id: TabId, config: &Config, _runtime: Arc<Runtime>, working_directory: Option<String>, ) -> Result<Self>
Create a new tab with a terminal session
Sourcepub fn is_bell_active(&self) -> bool
pub fn is_bell_active(&self) -> bool
Check if the visual bell is currently active (within flash duration)
Sourcepub fn update_title(&mut self)
pub fn update_title(&mut self)
Update tab title from terminal OSC sequences
Sourcepub fn is_running(&self) -> bool
pub fn is_running(&self) -> bool
Check if the terminal in this tab is still running
Sourcepub fn start_refresh_task(
&mut self,
runtime: Arc<Runtime>,
window: Arc<Window>,
max_fps: u32,
)
pub fn start_refresh_task( &mut self, runtime: Arc<Runtime>, window: Arc<Window>, max_fps: u32, )
Start the refresh polling task for this tab
Sourcepub fn stop_refresh_task(&mut self)
pub fn stop_refresh_task(&mut self)
Stop the refresh polling task
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Tab
impl !RefUnwindSafe for Tab
impl Send for Tab
impl Sync for Tab
impl Unpin for Tab
impl !UnwindSafe for Tab
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> 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>
Convert
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>
Convert
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)
Convert
&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)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more