import Vex from "vexflow" ; import { SourceMeasure } from "../../VoiceData/SourceMeasure" ; import { Staff } from "../../VoiceData/Staff" ; import { StaffLine } from "../StaffLine" ; import { Beam } from "../../VoiceData/Beam" ; import { GraphicalNote } from "../GraphicalNote" ; import { GraphicalStaffEntry } from "../GraphicalStaffEntry" ; import { Tuplet } from "../../VoiceData/Tuplet" ; import { GraphicalVoiceEntry } from "../GraphicalVoiceEntry" ; import { Voice } from "../../VoiceData/Voice" ; import { VexFlowMeasure } from "./VexFlowMeasure" ; /** A GraphicalMeasure drawing a multiple-rest measure in Vexflow.
 *  Mostly copied from VexFlowMeasure.
 *  Even though most of those functions aren't needed, apparently you can't remove the layoutStaffEntry function.
 */ export class VexFlowMultiRestMeasure extends VexFlowMeasure { private multiRestElement : any ; constructor ( staff , sourceMeasure = undefined , staffLine = undefined ) { super ( staff , sourceMeasure , staffLine ) ; this . minimumStaffEntriesWidth = - 1 ; if ( staffLine ) { this . rules = staffLine . ParentMusicSystem . rules ; } else if ( sourceMeasure ) { this . rules = sourceMeasure . Rules ; } this . resetLayout ( ) ; this . multiRestElement = new Vex . Flow . MultiMeasureRest ( sourceMeasure . multipleRestMeasures , { } ) ; } param ctx public draw ( ctx ) { this . stave . setContext ( ctx ) . draw ( ) ; this . multiRestElement . setStave ( this . stave ) ; this . multiRestElement . setContext ( ctx ) ; this . multiRestElement . draw ( ) ; for ( const connector of this . connectors ) { connector . setContext ( ctx ) . draw ( ) ; } } public format ( ) { } /**
     * Returns all the voices that are present in this measure
     */ public getVoicesWithinMeasure ( ) { return [ ] ; } param voice public getGraphicalVoiceEntriesPerVoice ( voice ) { return [ ] ; } param voice protected getRestFilledVexFlowStaveNotesPerVoice ( voice ) { return [ ] ; } param graphicalNote param beam public handleBeam ( graphicalNote , beam ) { return ; } public handleTuplet ( graphicalNote , tuplet ) { return ; } /**
     * Complete the creation of VexFlow Beams in this measure
     */ public finalizeBeams ( ) { return ; } /**
     * Complete the creation of VexFlow Tuplets in this measure
     */ public finalizeTuplets ( ) { return ; } public layoutStaffEntry ( graphicalStaffEntry ) { return ; } public graphicalMeasureCreatedCalculations ( ) { return ; } /**
     * Create the articulations for all notes of the current staff entry
     */ protected createArticulations ( ) { return ; } /**
     * Create the ornaments for all notes of the current staff entry
     */ protected createOrnaments ( ) { return ; } protected createFingerings ( voiceEntry ) { return ; } returns { Vex . Flow . Stave } public getVFStave ( ) { return this . stave ; } }