Skip to main content

alphaTab.ICursorHandler

Classes implementing this interface can handle the cursor placement logic as the playback in alphaTab progresses.

 interface ICursorHandler

Methods​

onAttach​

Called when this handler activates. This can be on dynamic cursor creation or when setting a custom handler with cursors already created.

onAttach(cursors: Cursors): void
ParameterSummary
cursorsAll

A container holding information about the cursor elements.

onDetach​

Called when this handler deactivates. This can be on dynamic cursor destroy or when setting a new custom handler.

onDetach(cursors: Cursors): void
ParameterSummary
cursorsAll

A container holding information about the cursor elements.

placeBarCursor​

Instructs the handler to place the bar cursor for the given beat bounds instantly .

placeBarCursor(barCursor: IContainer, beatBounds: BeatBounds): void
ParameterSummary
barCursorAll

The bar cursor.

beatBoundsAll

The bounds of the currently active beat.

placeBeatCursor​

Instructs the handler to place the beat cursor for the given beat bounds instantly.

placeBeatCursor(beatCursor: IContainer, beatBounds: BeatBounds, startBeatX: number): void
ParameterSummary
beatCursorAll

(no description)

beatBoundsAll

The bounds of the currently active beat.

startBeatXAll

(no description)

transitionBeatCursor​

Instructs the handler to initiate a transition of the beat cursor (e.g. for dynamic animation).

transitionBeatCursor(beatCursor: IContainer, beatBounds: BeatBounds, startBeatX: number, nextBeatX: number, duration: number, cursorMode: MidiTickLookupFindBeatResultCursorMode): void
ParameterSummary
beatCursorAll

The beat cursor

beatBoundsAll

The bounds of the currently active beat.

startBeatXAll

The X-position where the transition of the beat cursor should start.

nextBeatXAll

The X-position where the transition of the beat cursor should end (typically the next beat or end of bar depending on the cursor mode and seeks)

durationAll

The duration in milliseconds on how long the transition should take.

cursorModeAll

The active cursor mode for the cursor placement.