Skip to main content

alphaTab.platform.IUiFacade

Description

This interface represents the UI abstraction between alphaTab and the corresponding UI framework being used.

 interface IUiFacade<TSettings>

Properties

areWorkersSupported

Gets a value indicating whether the UI framework supports worker based rendering.

canRender

Gets or sets whether the UI is ready to render the music notation. On some platforms where pre-loading of assets is done asynchronously,

canRenderChanged

This events is fired when the canRender property changes.

resizeThrottle

Gets the resize throttling in milliseconds. Then the music sheet is resized, the re-rendering is deferred until this timeout is reached.

rootContainer

Gets the root UI element that holds the whole alphaTab control.

rootContainerBecameVisible

This event is fired when rootContainer became visible when it was invisible at the time rendering was initiated.

Methods

beginAppendRenderResults(RenderFinishedEventArgs | null)

Tells the UI layer to append the given render results to the UI. At this point

beginInvoke(() => void)

Tells the UI layer to invoke the given action.

beginUpdateRenderResults(RenderFinishedEventArgs)

Tells the UI layer to update the given render results within the UI.

createCanvasElement()

Creates the canvas element that wraps all individually rendered partials.

createCursors()

Creates the cursor objects that are used to highlight the currently played beats and bars.

createSelectionElement()

Creates a new UI element that is used to display the selection rectangle.

createWorkerPlayer()

Tells the UI layer to create a player worker.

createWorkerRenderer()

Tells the UI layer to create the worker renderer. This method is the UI layer supports worker rendering and worker rendering is not disabled via setting.

destroy()

Tells the UI layer to destroy the alphaTab controls and restore the initial state.

destroyCursors()

Destroys the cursor objects that are used to highlight the currently played beats and bars.

getOffset(IContainer | null, IContainer)

Calculates the relative offset of a container to the scroll element.

getScrollContainer()

Gets the UI element that is used for scrolling during playback.

highlightElements(string, number)

Tells the UI layer to highlight the music notation elements with the given ID.

initialize(AlphaTabApiBase<TSettings>, TSettings)

Initializes the UI using the given alphaTab API and settings object.

initialRender()

Tells the UI layer to do the initial rendering.

load(unknown, (score: Score) => void, (error: Error) => void)

Attempts a load of the score represented by the given data object.

loadSoundFont(unknown, boolean)

Attempts a load of the score represented by the given data object.

removeHighlights()

Tells the UI layer to remove all highlights from highlighted music notation elements.

scrollToX(IContainer, number, number)

Initiates a horizontal scroll on the given element.

scrollToY(IContainer, number, number)

Initiates a vertical scroll on the given element.

triggerEvent(IContainer, string, unknown, IMouseEventArgs)

Tells the UI layer to trigger an event with the given name and details.