import { Modifier } from './modifier'; import { ModifierContextState } from './modifiercontext'; export declare enum AnnotationHorizontalJustify { LEFT = 1, CENTER = 2, RIGHT = 3, CENTER_STEM = 4 } export declare enum AnnotationVerticalJustify { TOP = 1, CENTER = 2, BOTTOM = 3, CENTER_STEM = 4 } /** * Annotations are modifiers that can be attached to * notes. * * See `tests/annotation_tests.ts` for usage examples. */ export declare class Annotation extends Modifier { /** To enable logging for this class. Set `VexFlow.Annotation.DEBUG` to `true`. */ static DEBUG: boolean; /** Annotations category string. */ static get CATEGORY(): string; /** Text annotations can be positioned and justified relative to the note. */ static HorizontalJustify: typeof AnnotationHorizontalJustify; static HorizontalJustifyString: Record; static VerticalJustify: typeof AnnotationVerticalJustify; static VerticalJustifyString: Record; static get minAnnotationPadding(): number; /** Arrange annotations within a `ModifierContext` */ static format(annotations: Annotation[], state: ModifierContextState): boolean; protected horizontalJustification: AnnotationHorizontalJustify; protected verticalJustification: AnnotationVerticalJustify; /** Optional absolute baseline for lyrics aligned across a stave or system. */ protected textBaseline?: number; /** * Annotations inherit from `Modifier` and is positioned correctly when * in a `ModifierContext`. * Create a new `Annotation` with the string `text`. */ constructor(text: string); /** * Set vertical position of text (above or below stave). * @param just value in `AnnotationVerticalJustify`. */ setVerticalJustification(just: string | AnnotationVerticalJustify): this; /** Get the annotation's position relative to the note. */ getVerticalJustification(): AnnotationVerticalJustify; /** * Get horizontal justification. */ getJustification(): AnnotationHorizontalJustify; /** * Set horizontal justification. * @param just value in `Annotation.Justify`. */ setJustification(just: string | AnnotationHorizontalJustify): this; /** A phrase lane places this mark outside local tuplets. */ phraseManaged: boolean; private layoutBaseline?; private connectorPadding; /** Space reserved on both sides for a syllable connector during horizontal formatting. */ setConnectorPadding(px: number): this; /** An authored baseline always takes precedence over automatic phrase placement. */ getTextBaseline(): number | undefined; setLayoutBaseline(y?: number): void; /** Use an absolute text baseline. Pass undefined to restore automatic placement. */ setTextBaseline(y?: number): this; /** Compute horizontal placement after formatting, without drawing or changing position. */ computeX(): { x: number; textWidth: number; }; /** Vertical space reserved for this annotation, in renderer pixels. */ protected getLayoutHeight(): number; /** Compute the text baseline after formatting. Subclasses may override just this axis. */ computeY(): { y: number; textHeight: number; }; /** Draw using the same positioning methods available to callers before rendering. */ draw(): void; }