Skip to main content

TabControl

Defined in: src/widgets/containers.ts:121

Tab control that hosts panes inside. See also TabPane

Extends

Constructors

Constructor

new TabControl(dart): TabControl

Defined in: src/widgets/containers.ts:123

Parameters

ParameterType
dartany

Returns

TabControl

Overrides

DartWidget.constructor

Properties

PropertyModifierTypeDefault valueDescriptionInherited fromDefined in
_functionsprotectedFunc[][]-DartWidget._functionssrc/widgets/base.ts:243
_propertiesprotectedProperty[][]-DartWidget._propertiessrc/widgets/base.ts:242
_rootprotectedHTMLElementundefined-DartWidget._rootsrc/widgets/base.ts:241
dartpublicanyundefined-DartWidget.dartsrc/widgets/base.ts:246
factorypublicFunc | nullnullConstructor function. No parameters, returns [Widget].DartWidget.factorysrc/widgets/base.ts:239
isDetachedpublicbooleanfalse-DartWidget.isDetachedsrc/widgets/base.ts:247
propspublicanyundefined-DartWidget.propssrc/widgets/base.ts:244
subspublicSubscription[]undefined-DartWidget.subssrc/widgets/base.ts:245
temppublicanyundefinedContains auxiliary informationDartWidget.tempsrc/widgets/base.ts:236

Accessors

aiDescription

Get Signature

get aiDescription(): string | null

Defined in: src/widgets/base.ts:412

AI briefing of the underlying Dart widget.

Returns

string | null

Set Signature

set aiDescription(x): void

Defined in: src/widgets/base.ts:417

A short AI-facing briefing: what this widget is, what its functions do, and how the assistant should approach it (e.g. which getFunctions entries to call first). Shown to the AI assistant as part of the workspace context.

Parameters
ParameterType
xstring | null
Returns

void

Inherited from

DartWidget.aiDescription


children

Get Signature

get children(): Widget<any>[]

Defined in: src/widgets/base.ts:328

Parent widget up the DOM tree, or null.

Returns

Widget<any>[]

Inherited from

DartWidget.children


currentPane

Get Signature

get currentPane(): TabPane

Defined in: src/widgets/containers.ts:170

Currently visible pane

Returns

TabPane

Set Signature

set currentPane(v): void

Defined in: src/widgets/containers.ts:171

Parameters
ParameterType
vTabPane
Returns

void


Get Signature

get header(): HTMLDivElement

Defined in: src/widgets/containers.ts:144

Header shown on top of the control

Returns

HTMLDivElement


onBeforeTabChanged

Get Signature

get onBeforeTabChanged(): Observable<any>

Defined in: src/widgets/containers.ts:174

Occurs before the active pane is changed

Returns

Observable<any>


onTabAdded

Get Signature

get onTabAdded(): Observable<any>

Defined in: src/widgets/containers.ts:180

Occurs after a pane is added

Returns

Observable<any>


onTabChanged

Get Signature

get onTabChanged(): Observable<any>

Defined in: src/widgets/containers.ts:177

Occurs after the active pane is changed

Returns

Observable<any>


onTabRemoved

Get Signature

get onTabRemoved(): Observable<any>

Defined in: src/widgets/containers.ts:183

Occurs after a pane is removed

Returns

Observable<any>


panes

Get Signature

get panes(): TabPane[]

Defined in: src/widgets/containers.ts:150

Panes currently present in the pane control. Do not change the array, use addPane instead

Returns

TabPane[]


parent

Get Signature

get parent(): Widget<any> | null

Defined in: src/widgets/base.ts:325

Parent widget up the DOM tree, or null.

Returns

Widget<any> | null

Inherited from

DartWidget.parent


root

Get Signature

get root(): HTMLDivElement

Defined in: src/widgets/containers.ts:139

Visual root

Returns

HTMLDivElement

Overrides

DartWidget.root


type

Get Signature

get type(): string

Defined in: src/widgets/base.ts:405

Returns

string

Inherited from

DartWidget.type

Methods

addPane()

addPane(name, getContent, icon?, options?): TabPane

Defined in: src/widgets/containers.ts:160

Adds a new pane with the specified name

Parameters

ParameterTypeDefault value
namestringundefined
getContent() => HTMLElementundefined
iconanynull
options?{ allowClose: boolean; }undefined
options.allowClose?booleanundefined

Returns

TabPane


apply()

apply(properties): Widget

Defined in: src/widgets/base.ts:284

Parameters

ParameterTypeDescription
propertiesobject-

Returns

Widget

Inherited from

DartWidget.apply


clear()

clear(): void

Defined in: src/widgets/containers.ts:165

Removes all panes

Returns

void


detach()

detach(): void

Defined in: src/widgets/base.ts:337

Gets called when a widget is detached and will no longer be used. Typically used for unsubscribing from events. Be sure to call super.detach() if this method is overridden.

Returns

void

Inherited from

DartWidget.detach


getDartProperties()

getDartProperties(): any[]

Defined in: src/widgets/base.ts:313

Returns

any[]

Inherited from

DartWidget.getDartProperties


getFunctions()

getFunctions(): Func[]

Defined in: src/widgets/base.ts:408

Functions that are applicable to this particular widget. Used in the UI to display context actions, and for the AI integrations.

Returns

Func[]

Inherited from

DartWidget.getFunctions


getPane()

getPane(name): TabPane

Defined in: src/widgets/containers.ts:155

Gets the pane with the specified name

Parameters

ParameterType
namestring

Returns

TabPane


getProperties()

getProperties(): Property[]

Defined in: src/widgets/base.ts:407

Returns all properties of this widget.

Returns

Property[]

Inherited from

DartWidget.getProperties


getWidgetStatus()

getWidgetStatus(): IWidgetStatus

Defined in: src/widgets/base.ts:409

Returns the widget's runtime structure for automated testing and introspection.

Returns

IWidgetStatus

Inherited from

DartWidget.getWidgetStatus


onEvent()

onEvent(eventId?): Observable<any>

Defined in: src/widgets/base.ts:423

Observes events with the specified eventId. Override in subclasses to provide actual events.

Parameters

ParameterTypeDefault value
eventIdstring | nullnull

Returns

Observable<any>

Inherited from

DartWidget.onEvent


onFrameAttached()

onFrameAttached(dataFrame): void

Defined in: src/widgets/base.ts:319

Parameters

ParameterType
dataFrameDataFrame

Returns

void

Inherited from

DartWidget.onFrameAttached


onPropertyChanged()

onPropertyChanged(property): void

Defined in: src/widgets/base.ts:311

Gets called when viewer's property is changed.

Parameters

ParameterTypeDescription
propertyProperty | nullor null, if multiple properties were changed.

Returns

void

Inherited from

DartWidget.onPropertyChanged


sourceRowsChanged()

sourceRowsChanged(): void

Defined in: src/widgets/base.ts:317

Returns

void

Inherited from

DartWidget.sourceRowsChanged


sub()

sub(subscription): void

Defined in: src/widgets/base.ts:277

Registers a subscription to an external event.

Parameters

ParameterTypeDescription
subscriptionSubscription-

Returns

void

Inherited from

DartWidget.sub


toDart()

toDart(): any

Defined in: src/widgets/base.ts:269

Returns

any

Inherited from

DartWidget.toDart


create()

static create(options?, key?): TabControl

Defined in: src/widgets/containers.ts:133

Creates a new TabControl. When [options.key] is provided, the currently selected pane is persisted across sessions in localStorage. Without a key, state is not remembered.

Parameters

ParameterTypeDefault valueDescription
optionsboolean | ITabControlOptions{}see ITabControlOptions. Passing a boolean (vertical) is deprecated.
keystring | nullnulldeprecated, use options.key instead.

Returns

TabControl


find()

static find(root): Widget<any> | null

Defined in: src/widgets/base.ts:265

Finds existing widget from its visual root.

Parameters

ParameterType
rootElement

Returns

Widget<any> | null

Inherited from

DartWidget.find


fromRoot()

static fromRoot(root): Widget

Defined in: src/widgets/base.ts:382

Creates a new widget from the root element.

Parameters

ParameterType
rootHTMLElement

Returns

Widget

Inherited from

DartWidget.fromRoot


getAll()

static getAll(): Widget<any>[]

Defined in: src/widgets/base.ts:260

Returns all currently active widgets.

Returns

Widget<any>[]

Inherited from

DartWidget.getAll