UIControl

UI Controls display individual UI controls, such as labels and buttons.

class UIControl abstract

extends UIComponent

Represents an interactive UI control component (abstract).

Note: This class should not be instantiated on its own. Instead, use one of the predefined control components such as UIButton or UILabel.

Constructor

(): UIControl

.applyStyle() protected

(style?: UIStyle): void

Applies given style set to individual style objects (e.g. UIComponent.dimensions). This method is overridden by derived classes to copy only applicable styles.

.textStyle

Readonly<TextStyle>

Text style options.

.decoration

Readonly<Decoration>

Options for the appearance of this control.

.disabled

boolean

Set to true to disable this control.

.shrinkwrap

boolean

Set to true to shrink this element to use as little space as possible within its container, set to false to expand; defaults to true but may be overridden by individual components, e.g. UILabel (also overrides grow property of UIComponent.dimensions).

.propagateComponentEvent() deprecated

(name: string, inner?: ManagedEvent, event?: any): void

Inherited from UIComponent.propagateComponentEvent.

.delegateEvent() protected

(e: ManagedEvent, propertyName: string): true

Inherited from UIComponent.delegateEvent.

.render()

(callback: RenderCallback<Output<UIRenderable, any>>): void

Inherited from UIComponent.render.

.isFocusable()

(): boolean

Inherited from UIComponent.isFocusable.

.isKeyboardFocusable()

(): boolean

Inherited from UIComponent.isKeyboardFocusable.

.requestFocus()

(): void

Inherited from UIComponent.requestFocus.

.requestFocusNext()

(): void

Inherited from UIComponent.requestFocusNext.

.requestFocusPrevious()

(): void

Inherited from UIComponent.requestFocusPrevious.

.style

UIStyle

Inherited from UIComponent.style.

.hidden

boolean

Inherited from UIComponent.hidden.

.dimensions

Readonly<Dimensions>

Inherited from UIComponent.dimensions.

.position

Readonly<Position>

Inherited from UIComponent.position.

.accessibleRole

string

Inherited from UIComponent.accessibleRole.

.accessibleLabel

string

Inherited from UIComponent.accessibleLabel.

.lastRenderOutput

Output<this, any>

Inherited from UIComponent.lastRenderOutput.

.isPresetComponent() protected

(): boolean

Inherited from Component.isPresetComponent.

.getParentComponent()

<TParent extends Component = Component>(ParentClass?: ComponentConstructor<TParent>): TParent

Inherited from Component.getParentComponent.

.getBoundParentComponent()

<TParent extends Component>(ParentClass?: ComponentConstructor<TParent>): TParent

Inherited from Component.getBoundParentComponent.

.emitAction()

(name: string, inner?: ManagedEvent, context?: ManagedObject): void

Inherited from Component.emitAction.

.managedId

number

Inherited from ManagedObject.managedId.

.managedState

ManagedState

Inherited from ManagedObject.managedState.

.getReferenceCount() protected

(): number

Inherited from ManagedObject.getReferenceCount.

.getManagedReferrers() protected

(): ManagedObject[]

Inherited from ManagedObject.getManagedReferrers.

.getManagedParent() protected

<TParent extends ManagedObject = ManagedObject>(ParentClass?: ManagedObjectConstructor<TParent>): TParent

Inherited from ManagedObject.getManagedParent.

.emit()

<TEvent extends ManagedEvent = ManagedEvent, TConstructorArgs extends any[] = any[]>(e: string | TEvent | (new (...args: TConstructorArgs) => TEvent), ...constructorArgs: TConstructorArgs): this

Inherited from ManagedObject.emit.

.emitChange()

(name?: string): void

Inherited from ManagedObject.emitChange.

.propagateChildEvents() protected deprecated

(...types: ((new (...args: any[]) => ManagedEvent) | ((e: ManagedEvent) => any))[]): this

Inherited from ManagedObject.propagateChildEvents.

.activateManagedAsync() protected

(): Promise<any>

Inherited from ManagedObject.activateManagedAsync.

.deactivateManagedAsync() protected

(): Promise<void>

Inherited from ManagedObject.deactivateManagedAsync.

.destroyManagedAsync() protected

(): Promise<void>

Inherited from ManagedObject.destroyManagedAsync.

.onManagedStateActivatingAsync() protected

(): Promise<void>

Inherited from ManagedObject.onManagedStateActivatingAsync.

.onManagedStateActiveAsync() protected

(): Promise<void>

Inherited from ManagedObject.onManagedStateActiveAsync.

.onManagedStateDeactivatingAsync() protected

(): Promise<void>

Inherited from ManagedObject.onManagedStateDeactivatingAsync.

.onManagedStateInactiveAsync() protected

(): Promise<void>

Inherited from ManagedObject.onManagedStateInactiveAsync.

.onManagedStateDestroyingAsync() protected

(): Promise<void>

Inherited from ManagedObject.onManagedStateDestroyingAsync.


UIControl.Presets

extends UIComponent.Presets

UIControl presets type, for use with Component.with.

.textStyle

Partial<{} | TextStyle>

Text style options (overrides).

.decoration

Partial<{} | Decoration>

Options for the appearance of this control (overrides).

.disabled

boolean

Disable this control.

.shrinkwrap

boolean

Shrink or grow this control.

.style

string | UIStyle

Inherited from UIComponent.Presets.style.

.hidden

boolean

Inherited from UIComponent.Presets.hidden.

.dimensions

Partial<{} | Dimensions>

Inherited from UIComponent.Presets.dimensions.

.position

Partial<{} | Position>

Inherited from UIComponent.Presets.position.

.accessibleRole

string

Inherited from UIComponent.Presets.accessibleRole.

.accessibleLabel

string

Inherited from UIComponent.Presets.accessibleLabel.

.requestFocus

boolean

Inherited from UIComponent.Presets.requestFocus.