Options
All
  • Public
  • Public/Protected
  • All
Menu

Class BaseTerminalTabComponent

A class to base your custom terminal tabs on

Hierarchy

  • BaseTabComponent
    • BaseTerminalTabComponent

Implements

  • OnInit
  • OnDestroy

Index

Constructors

constructor

Properties

alternateScreenActive

alternateScreenActive: boolean = false

Protected app

app: AppService

color

color: null | string

CSS color override for the tab's header

config

config: ConfigService

Protected contextMenuProviders

contextMenuProviders: TabContextMenuItemProvider[]

customTitle

customTitle: string

User-defined title override

Protected decorators

decorators: TerminalDecorator[] = []

disableDynamicTitle

disableDynamicTitle: boolean = false

Disables display of dynamic window/tab title provided by the shell

element

element: ElementRef<any>

enablePassthrough

enablePassthrough: boolean = true

Enables normall passthrough from session output to terminal input

Optional frontend

frontend?: Frontend

frontendReady

frontendReady: Subject<void> = ...

hasActivity

hasActivity: boolean

Last tab activity state

hasFocus

hasFocus: boolean

Protected hostApp

hostApp: HostAppService

hostView

hostView: ViewRef

ViewRef to the tab DOM element

Protected hostWindow

hostWindow: HostWindowService

Protected hotkeys

hotkeys: HotkeysService

Protected injector

injector: Injector

Protected log

log: LogService

Protected logger

logger: Logger

Protected notifications

notifications: NotificationsService

Protected output

output: Subject<string> = ...

parent

parent: null | BaseTabComponent

Parent tab (usually a SplitTabComponent)

Protected platform

platform: PlatformService

Protected recoveryStateChangedHint

recoveryStateChangedHint: Subject<void>

Ping this if your recovery state has been changed and you want your tab state to be saved sooner

Optional savedState

savedState?: any

savedStateIsLive

savedStateIsLive: boolean = false

session

session: null | BaseSession = null

Protected sessionChanged

sessionChanged: Subject<null | BaseSession> = ...

showSearchPanel

showSearchPanel: boolean = false

size

Protected terminalContainersService

terminalContainersService: TerminalFrontendService

title

title: string

Current tab title

Protected Optional viewContainer

viewContainer?: ViewContainerRef

Optional viewContainerEmbeddedRef

viewContainerEmbeddedRef?: EmbeddedViewRef<any>

Protected zone

zone: NgZone

zoom

zoom: number = 0

Static animations

animations: AnimationTriggerMetadata[] = ...

Static styles

styles: string[] = ...

Static template

template: string = ...

Accessors

activity$

  • get activity$(): Observable<boolean>
  • Returns Observable<boolean>

alternateScreenActive$

  • get alternateScreenActive$(): Observable<boolean>

blurred$

  • get blurred$(): Observable<void>
  • Returns Observable<void>

destroyed$

  • get destroyed$(): Observable<void>
  • Returns Observable<void>

focused$

  • get focused$(): Observable<void>
  • Returns Observable<void>

frontendReady$

  • get frontendReady$(): Observable<void>

input$

  • get input$(): Observable<Buffer>

output$

  • get output$(): Observable<string>

progress$

  • get progress$(): Observable<null | number>
  • Returns Observable<null | number>

recoveryStateChangedHint$

  • get recoveryStateChangedHint$(): Observable<void>
  • Returns Observable<void>

resize$

sessionChanged$

titleChange$

  • get titleChange$(): Observable<string>
  • Returns Observable<string>

Methods

addEventListenerUntilDestroyed

  • addEventListenerUntilDestroyed(element: HTMLElement, event: string, handler: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void
  • Parameters

    • element: HTMLElement
    • event: string
    • handler: EventListenerOrEventListenerObject
    • Optional options: boolean | AddEventListenerOptions

    Returns void

Protected attachSessionHandler

  • attachSessionHandler<T>(observable: Observable<T>, handler: (v: T) => void): void

Protected attachSessionHandlers

  • attachSessionHandlers(destroyOnSessionClose?: boolean): void

Protected attachTermContainerHandlers

  • attachTermContainerHandlers(): void

buildContextMenu

  • buildContextMenu(): Promise<MenuItemOptions[]>

canClose

  • canClose(): Promise<boolean>
  • Return false to prevent the tab from being closed

    Returns Promise<boolean>

cancelFocusAllPanes

  • cancelFocusAllPanes(): void

clearActivity

  • clearActivity(): void
  • Removes the acticity marker from the tab header

    Returns void

configure

  • configure(): void

copyCurrentPath

  • copyCurrentPath(): Promise<void>

destroy

  • destroy(): Promise<void>

Protected detachSessionHandlers

  • detachSessionHandlers(): void

Protected detachTermContainerHandlers

  • detachTermContainerHandlers(): void

displayActivity

  • displayActivity(): void
  • Shows the acticity marker on the tab header

    Returns void

emitBlurred

  • emitBlurred(): void
  • Returns void

emitFocused

  • emitFocused(): void
  • Returns void

focusAllPanes

  • focusAllPanes(): void

Protected forEachFocusedTerminalPane

getCurrentProcess

  • getCurrentProcess(): Promise<null | BaseTabProcess>
  • Override this to enable task completion notifications for the tab

    Returns Promise<null | BaseTabProcess>

getRecoveryToken

  • getRecoveryToken(): Promise<null | RecoveryToken>
  • Override this and implement a [[TabRecoveryProvider]] to enable recovery for your custom tab

    Returns Promise<null | RecoveryToken>

    JSON serializable tab state representation for your [[TabRecoveryProvider]] to parse

Protected handleRightClick

  • handleRightClick(event: MouseEvent): Promise<void>

hideToolbar

  • hideToolbar(): void

insertIntoContainer

  • insertIntoContainer(container: ViewContainerRef): EmbeddedViewRef<any>
  • Parameters

    • container: ViewContainerRef

    Returns EmbeddedViewRef<any>

Protected onFrontendReady

  • onFrontendReady(): void

paste

  • paste(): Promise<void>

removeFromContainer

  • removeFromContainer(): void
  • Returns void

resetZoom

  • resetZoom(): void

sendInput

  • sendInput(data: string | Buffer): void

setProgress

  • setProgress(progress: null | number): void
  • Sets visual progressbar on the tab

    Parameters

    • progress: null | number

    Returns void

setSession

  • setSession(session: null | BaseSession, destroyOnSessionClose?: boolean): void

setTitle

  • setTitle(title: string): void
  • Parameters

    • title: string

    Returns void

showToolbar

  • showToolbar(): void

Protected startSpinner

  • startSpinner(text?: string): void

Protected stopSpinner

  • stopSpinner(): void

subscribeUntilDestroyed

  • subscribeUntilDestroyed<T>(observable: Observable<T>, handler: (v: T) => void): void
  • Type parameters

    • T

    Parameters

    • observable: Observable<T>
    • handler: (v: T) => void
        • (v: T): void
        • Parameters

          • v: T

          Returns void

    Returns void

togglePinToolbar

  • togglePinToolbar(): void

Protected withSpinnerPaused

  • withSpinnerPaused(work: () => void): void

write

  • write(data: string): void

Protected writeRaw

  • writeRaw(data: string): void

zoomIn

  • zoomIn(): void

zoomOut

  • zoomOut(): void

Generated using TypeDoc