Class: TabbedContainer
Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/TabbedContainer/TabbedContainer.tsx:106
A container which displays content organized into an arbitrary number of tabs. Only the content associated with one tab is displayed at any given time. Tabs are displayed on one of the four edges of the container in a list which supports scrolling if the total number of tabs exceeds the amount that can be displayed simultaneously.
The container's contents are added as children that implement the TabbedContent interface. It is forbidden to add children to TabbedContainer that do not implement TabbedContent. Each TabbedContent child defines one tab and its contents. The order in which tabs are presented in the container's tab list is the same as the order in which their associated TabbedContents were added to the container as children.
Extends
DisplayComponent
<TabbedContainerProps
>
Implements
Constructors
Constructor
new TabbedContainer(
props
):TabbedContainer
Defined in: src/sdk/components/FSComponent.ts:73
Creates an instance of a DisplayComponent.
Parameters
Parameter | Type | Description |
---|---|---|
props | TabbedContainerProps | The propertis of the component. |
Returns
TabbedContainer
Inherited from
DisplayComponent<TabbedContainerProps>.constructor
Properties
context?
optional
context: [] =undefined
Defined in: src/sdk/components/FSComponent.ts:64
The context on this component, if any.
Inherited from
DisplayComponent.context
contextType?
readonly
optional
contextType: readonly [] =undefined
Defined in: src/sdk/components/FSComponent.ts:67
The type of context for this component, if any.
Inherited from
DisplayComponent.contextType
knobLabelState
readonly
knobLabelState:SubscribableMap
<UiKnobId
,string
> &Subscribable
<UiKnobRequestedLabelState
>
Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/TabbedContainer/TabbedContainer.tsx:171
The bezel rotary knob label state requested by this container.
props
props:
TabbedContainerProps
&ComponentProps
Defined in: src/sdk/components/FSComponent.ts:61
The properties of the component.
Inherited from
DisplayComponent.props
Methods
close()
close():
void
Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/TabbedContainer/TabbedContainer.tsx:316
Closes this container. This will close the currently selected tab, if one exists. If the container is resumed, then this will also pause the container before closing it.
Returns
void
Throws
Error if this container has been destroyed.
destroy()
destroy():
void
Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/TabbedContainer/TabbedContainer.tsx:849
Returns
void
Inherit Doc
Overrides
DisplayComponent.destroy
getContext()
protected
getContext(context
):never
Defined in: src/sdk/components/FSComponent.ts:106
Gets a context data subscription from the context collection.
Parameters
Parameter | Type | Description |
---|---|---|
context | never | The context to get the subscription for. |
Returns
never
The requested context.
Throws
An error if no data for the specified context type could be found.
Inherited from
DisplayComponent.getContext
onAfterRender()
onAfterRender():
void
Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/TabbedContainer/TabbedContainer.tsx:183
Returns
void
Inherit Doc
Overrides
DisplayComponent.onAfterRender
onBeforeRender()
onBeforeRender():
void
Defined in: src/sdk/components/FSComponent.ts:80
A callback that is called before the component is rendered.
Returns
void
Inherited from
DisplayComponent.onBeforeRender
onUiInteractionEvent()
onUiInteractionEvent(
event
):boolean
Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/TabbedContainer/TabbedContainer.tsx:595
Handles a UiInteractionEvent.
Parameters
Parameter | Type | Description |
---|---|---|
event | UiInteractionEvent | The event to handle. |
Returns
boolean
Whether the event was handled.
Implementation of
UiInteractionHandler
.onUiInteractionEvent
open()
open():
void
Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/TabbedContainer/TabbedContainer.tsx:290
Opens this container. This will open the currently selected tab, if one exists. While open, this container can be updated.
Returns
void
Throws
Error if this container has been destroyed.
pause()
pause():
void
Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/TabbedContainer/TabbedContainer.tsx:377
Pauses this container. This will pause the currently selected tab, if one exists.
Returns
void
Throws
Error if this container has been destroyed.
render()
render():
VNode
Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/TabbedContainer/TabbedContainer.tsx:713
Returns
VNode
Inherit Doc
Overrides
DisplayComponent.render
resume()
resume():
void
Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/TabbedContainer/TabbedContainer.tsx:346
Resumes this container. This will resume the currently selected tab, if one exists. If the container is closed, then this will also open the container before resuming it. While resumed, the container will forward requested bezel rotary knob label states from the selected tab and handle UI interaction events (including routing events to the selected tab).
Returns
void
Throws
Error if this container has been destroyed.
selectFirstTab()
selectFirstTab(
startIndex
):number
Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/TabbedContainer/TabbedContainer.tsx:546
Selects the lowest-indexed enabled tab. Tabs are indexed in the order in which they were added to this container as children.
Parameters
Parameter | Type | Default value | Description |
---|---|---|---|
startIndex | number | 0 | The index from which to start the search for enabled tabs to select. Defaults to 0 . |
Returns
number
The index of the selected tab, or -1
if there were no enabled tabs to select.
Throws
Error if this container has been destroyed or has not been rendered.
selectLastTab()
selectLastTab(
startIndex
):number
Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/TabbedContainer/TabbedContainer.tsx:574
Selects the highest-indexed enabled tab. Tabs are indexed in the order in which they were added to this container as children.
Parameters
Parameter | Type | Description |
---|---|---|
startIndex | number | The index from which to start the search for enabled tabs to select. Defaults to the index of this container's highest-indexed tab. |
Returns
number
The index of the selected tab, or -1
if there were no enabled tabs to select.
Throws
Error if this container has been destroyed or has not been rendered.
selectNextTab()
selectNextTab():
number
Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/TabbedContainer/TabbedContainer.tsx:508
Selects the lowest-indexed enabled tab with a higher index than the currently selected tab. If there is no currently selected tab, then selects the overall lowest-indexed enabled tab. Tabs are indexed in the order in which they were added to this container as children.
Returns
number
The index of the selected tab, or -1
if there were no enabled tabs to select.
Throws
Error if this container has been destroyed or has not been rendered.
selectPrevTab()
selectPrevTab():
number
Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/TabbedContainer/TabbedContainer.tsx:527
Selects the highest-indexed enabled tab with a lower index than the currently selected tab. If there is no currently selected tab, then selects the overall highest-indexed enabled tab. Tabs are indexed in the order in which they were added to this container as children.
Returns
number
The index of the selected tab, or -1
if there were no enabled tabs to select.
Throws
Error if this container has been destroyed or has not been rendered.
selectTabIndex()
selectTabIndex(
index
):void
Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/TabbedContainer/TabbedContainer.tsx:428
Selects a tab by index. Tabs are indexed in the order in which they were added to this container as children.
Parameters
Parameter | Type | Description |
---|---|---|
index | number | The index of the tab to select, or -1 to deselect the currently selected tab without selecting a new tab. |
Returns
void
Throws
Error if this container has been destroyed or has not been rendered.
update()
update(
time
):void
Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/TabbedContainer/TabbedContainer.tsx:407
Updates this container. This will update the currently selected tab, if one exists. If this container is closed, then this method does nothing.
Parameters
Parameter | Type | Description |
---|---|---|
time | number | The current real (operating system) time, as a Javascript timestamp. |
Returns
void
Throws
Error if this container has been destroyed.