Options
All
  • Public
  • Public/Protected
  • All
Menu

Class SideTabBar

A specialized tab bar for side areas.

Hierarchy

Index

Constructors

constructor

  • new SideTabBar(options?: IOptions<Widget> & Options): SideTabBar

Properties

Readonly collapseRequested

collapseRequested: Signal<SideTabBar, Title<Widget>> = ...

Side panels can be collapsed by clicking on the currently selected tab. This signal is emitted when the mouse is released on the selected tab without initiating a drag.

Private Optional mouseData

mouseData: { mouseDownTabIndex: number; pressX: number; pressY: number }

Type declaration

  • mouseDownTabIndex: number
  • pressX: number
  • pressY: number

Protected Optional scrollBar

scrollBar: PerfectScrollbar

Readonly tabAdded

tabAdded: Signal<SideTabBar, { title: Title<Widget> }> = ...

Emitted when a tab is added to the tab bar.

toCancelViewContainerDND

toCancelViewContainerDND: DisposableCollection = ...

Protected Readonly toDispose

toDispose: DisposableCollection = ...

Static Private Readonly DRAG_THRESHOLD

DRAG_THRESHOLD: 5 = 5

Accessors

hiddenContentNode

  • get hiddenContentNode(): HTMLUListElement
  • Tab bars of the left and right side panel are arranged vertically by rotating their labels. Rotation is realized with the CSS transform property, which disrupts the browser's ability to arrange the involved elements automatically. Therefore the elements are arranged explicitly by the TabBarRenderer using inline height and top styles. However, the size of labels must still be computed by the browser, so the rendering is performed in two steps: first the tab bar is rendered horizontally inside a hidden content node, then it is rendered again vertically inside the proper content node. After the first step, size information is gathered from all labels so it can be applied during the second step.

    Returns HTMLUListElement

Protected scrollbarHost

  • get scrollbarHost(): HTMLElement

Methods

Protected cancelViewContainerDND

  • cancelViewContainerDND(): void

dispose

  • dispose(): void

handleEvent

  • handleEvent(event: Event): void
  • The following event processing is used to generate collapseRequested signals when the mouse goes up on the currently selected tab without too much movement between mousedown and mouseup. The movement threshold is the same that is used by the superclass to detect a drag event. The allowDeselect option of the TabBar constructor cannot be used here because it is triggered when the mouse goes down, and thus collides with dragging.

    Parameters

    • event: Event

    Returns void

insertTab

  • insertTab(index: number, value: Title<Widget> | IOptions<Widget>): Title<Widget>

Protected onAfterAttach

  • onAfterAttach(msg: Message): void

Protected onAfterDetach

  • onAfterDetach(msg: Message): void

Protected onBeforeDetach

  • onBeforeDetach(msg: Message): void

Protected onDragEnter

  • onDragEnter(event: IDragEvent): void

Protected onDragOver

  • onDragOver(event: IDragEvent): void
  • Handle viewContainerPart drag over, Defines the appropriate drpAction and opens the tab on which the mouse stands on for more than 800 ms.

    Parameters

    • event: IDragEvent

    Returns void

Private onMouseDown

  • onMouseDown(event: MouseEvent): void

Private onMouseMove

  • onMouseMove(event: MouseEvent): void

Private onMouseUp

  • onMouseUp(event: MouseEvent): void

Protected onResize

  • onResize(msg: ResizeMessage): void

Protected onUpdateRequest

  • onUpdateRequest(msg: Message): void

Protected renderTabBar

  • renderTabBar(): void
  • Render the tab bar in the hidden content node (see hiddenContentNode for explanation), then gather size information for labels and render it again in the proper content node.

    Returns void

Protected renderTabs

revealTab

  • revealTab(index: number): Promise<void>