vexflow.d.ts 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. declare namespace Vex {
  2. export module Flow {
  3. export class Formatter {
  4. public hasMinTotalWidth: boolean;
  5. public minTotalWidth: number;
  6. preCalculateMinTotalWidth(voices: Voice[]);
  7. constructor();
  8. }
  9. export class BoundingBox {
  10. mergeWith(bb: BoundingBox): BoundingBox;
  11. getX(): number;
  12. getY(): number;
  13. getW(): number;
  14. getH(): number;
  15. constructor(x: number, y: number, w: number, h: number);
  16. }
  17. export class Voice {
  18. getBoundingBox(): BoundingBox;
  19. setStave(stave: Stave): Voice;
  20. addTickables(notes: StaveNote[]): Voice;
  21. constructor(time: any);
  22. }
  23. export class StaveNote {
  24. constructor(note_struct: any);
  25. }
  26. export class Stave {
  27. x: number;
  28. start_x: number;
  29. end_x: number;
  30. getYForGlyphs(): number;
  31. getWidth(): number;
  32. setWidth(width: number): Stave;
  33. getNoteStartX(): number;
  34. format(): void;
  35. getSpacingBetweenLines(): number;
  36. getNumLines(): number;
  37. getLineForY(y: number): number;
  38. getModifiers(pos: any, cat: any): Vex.Flow.Clef[]; // FIXME
  39. setContext(ctx: any);
  40. addModifier(mod: any, pos: any);
  41. draw(): void;
  42. constructor(x: number, y: number, width: number);
  43. }
  44. export class StaveModifier {
  45. public static Position: any;
  46. }
  47. export class Clef {
  48. public static category: string;
  49. public static types: { [type: string]: any; } ;
  50. public glyph: any;
  51. public x: number;
  52. public stave: Stave;
  53. public getBoundingBox(): Vex.Flow.BoundingBox;
  54. public setStave(stave: Vex.Flow.Stave): void;
  55. constructor(type: any);
  56. }
  57. export class Renderer {
  58. constructor(canvas: HTMLCanvasElement, backend: any);
  59. public resize(a: number, b:number);
  60. public getContext(): any;
  61. public static Backends: any;
  62. }
  63. //export class
  64. }
  65. }
  66. declare module "vexflow" {
  67. export = Vex;
  68. }