smoosic 1.0.40 → 1.0.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/smoosic.js +4 -4
- package/package.json +1 -1
- package/release/smoosic.js +4 -4
- package/src/smo/data/score.ts +3 -0
- package/src/smo/data/scoreModifiers.ts +2 -2
- package/src/ui/components/dialogs/timeSignature.vue +25 -4
- package/types/src/application/application.d.ts +103 -102
- package/types/src/application/common.d.ts +6 -0
- package/types/src/application/configuration.d.ts +75 -75
- package/types/src/application/dynamicInit.d.ts +6 -6
- package/types/src/application/eventHandler.d.ts +87 -81
- package/types/src/application/exports.d.ts +482 -485
- package/types/src/render/audio/oscillator.d.ts +99 -99
- package/types/src/render/audio/player.d.ts +143 -143
- package/types/src/render/audio/samples.d.ts +56 -56
- package/types/src/render/sui/NoteEntryCaret.d.ts +107 -0
- package/types/src/render/sui/NoteEntryMediator.d.ts +24 -0
- package/types/src/render/sui/configuration.d.ts +53 -49
- package/types/src/render/sui/formatter.d.ts +163 -161
- package/types/src/render/sui/layoutDebug.d.ts +46 -46
- package/types/src/render/sui/mapper.d.ts +138 -135
- package/types/src/render/sui/renderState.d.ts +92 -90
- package/types/src/render/sui/scoreRender.d.ts +97 -96
- package/types/src/render/sui/scoreView.d.ts +280 -279
- package/types/src/render/sui/scoreViewOperations.d.ts +604 -594
- package/types/src/render/sui/scroller.d.ts +41 -41
- package/types/src/render/sui/svgPageMap.d.ts +344 -344
- package/types/src/render/sui/textEdit.d.ts +316 -316
- package/types/src/render/sui/tracker.d.ts +10 -4
- package/types/src/render/vex/vxMeasure.d.ts +97 -97
- package/types/src/smo/data/common.d.ts +220 -220
- package/types/src/smo/data/measure.d.ts +511 -511
- package/types/src/smo/data/measureModifiers.d.ts +509 -508
- package/types/src/smo/data/music.d.ts +2 -1
- package/types/src/smo/data/note.d.ts +2 -0
- package/types/src/smo/data/noteModifiers.d.ts +2 -0
- package/types/src/smo/data/score.d.ts +7 -5
- package/types/src/smo/data/scoreModifiers.d.ts +441 -440
- package/types/src/smo/data/systemStaff.d.ts +2 -2
- package/types/src/smo/data/tuplet.d.ts +7 -0
- package/types/src/smo/midi/midiToSmo.d.ts +12 -12
- package/types/src/smo/midi/smoToMidi.d.ts +3 -3
- package/types/src/smo/mxml/smoToXml.d.ts +4 -4
- package/types/src/smo/mxml/xmlState.d.ts +3 -3
- package/types/src/smo/mxml/xmlToSmo.d.ts +2 -2
- package/types/src/smo/xform/operations.d.ts +3 -3
- package/types/src/smo/xform/selections.d.ts +154 -154
- package/types/src/ui/buttons/display.d.ts +1 -0
- package/types/src/ui/common.d.ts +69 -67
- package/types/src/ui/composable/draggable.d.ts +1 -1
- package/types/src/ui/configuration.d.ts +30 -30
- package/types/src/ui/dialogs/chordChange.d.ts +35 -35
- package/types/src/ui/dialogs/components/baseComponent.d.ts +158 -158
- package/types/src/ui/dialogs/components/button.d.ts +54 -54
- package/types/src/ui/dialogs/components/dropdown.d.ts +78 -78
- package/types/src/ui/dialogs/components/pitch.d.ts +95 -95
- package/types/src/ui/dialogs/components/rocker.d.ts +66 -66
- package/types/src/ui/dialogs/components/textInPlace.d.ts +90 -90
- package/types/src/ui/dialogs/components/textInput.d.ts +58 -58
- package/types/src/ui/dialogs/components/toggle.d.ts +53 -53
- package/types/src/ui/dialogs/dialog.d.ts +203 -203
- package/types/src/ui/dialogs/endings.d.ts +2 -2
- package/types/src/ui/dialogs/lyric.d.ts +39 -39
- package/types/src/ui/dialogs/measureFormat.d.ts +2 -2
- package/types/src/ui/dialogs/tempo.d.ts +3 -3
- package/types/src/ui/dialogs/textBlock.d.ts +55 -61
- package/types/src/ui/dialogs/timeSignature.d.ts +2 -34
- package/types/src/ui/exceptions.d.ts +15 -15
- package/types/src/ui/help.d.ts +6 -1
- package/types/src/ui/menus/manager.d.ts +59 -59
- package/types/src/ui/navigation.d.ts +44 -37
- package/types/typedoc.d.ts +157 -157
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
import { SvgBox, SvgPoint } from '../../smo/data/common';
|
|
2
|
-
import { SmoMeasure } from '../../smo/data/measure';
|
|
3
|
-
import { SmoSelector } from '../../smo/xform/selections';
|
|
4
|
-
import { SuiNavigation } from './configuration';
|
|
5
|
-
/**
|
|
6
|
-
* SuiRender
|
|
7
|
-
* @internal
|
|
8
|
-
*/
|
|
9
|
-
export interface CodeRegion {
|
|
10
|
-
time: number;
|
|
11
|
-
percent: number;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* @category SuiRender
|
|
15
|
-
*/
|
|
16
|
-
export declare class layoutDebug {
|
|
17
|
-
static get values(): Record<string, number>;
|
|
18
|
-
static get classes(): Record<number, string>;
|
|
19
|
-
static get codeRegions(): Record<string, number>;
|
|
20
|
-
testThrow: boolean;
|
|
21
|
-
static get codeRegionStrings(): string[];
|
|
22
|
-
mask: number;
|
|
23
|
-
_textDebug: number[];
|
|
24
|
-
timestampHash: Record<number, number>;
|
|
25
|
-
_dialogEvents: string[];
|
|
26
|
-
navigation: SuiNavigation;
|
|
27
|
-
constructor(navigation: SuiNavigation);
|
|
28
|
-
clearTimestamps(): void;
|
|
29
|
-
setTimestamp(region: number, millis: number): void;
|
|
30
|
-
printTimeReport(): void;
|
|
31
|
-
flagSet(value: number): number;
|
|
32
|
-
clearAll(): void;
|
|
33
|
-
setAll(): void;
|
|
34
|
-
setRenderFlags(): void;
|
|
35
|
-
clearDebugBoxes(value: number): void;
|
|
36
|
-
debugBox(svg: SVGSVGElement, box: SvgBox | null, flag: number): void;
|
|
37
|
-
setFlag(value: number): void;
|
|
38
|
-
setFlagDivs(): void;
|
|
39
|
-
updateScrollDebug(point: SvgPoint): void;
|
|
40
|
-
updateMouseDebug(client: SvgPoint, logical: SvgPoint, offset: SvgPoint): void;
|
|
41
|
-
updateDragDebug(client: SvgPoint, logical: SvgPoint, state: string): void;
|
|
42
|
-
updatePlayDebug(selector: SmoSelector, logical: SvgBox): void;
|
|
43
|
-
addTextDebug(value: number): void;
|
|
44
|
-
addDialogDebug(value: string): void;
|
|
45
|
-
measureHistory(measure: SmoMeasure, oldVal: string, newVal: any, description: string): void;
|
|
46
|
-
}
|
|
1
|
+
import { SvgBox, SvgPoint } from '../../smo/data/common';
|
|
2
|
+
import { SmoMeasure } from '../../smo/data/measure';
|
|
3
|
+
import { SmoSelector } from '../../smo/xform/selections';
|
|
4
|
+
import { SuiNavigation } from './configuration';
|
|
5
|
+
/**
|
|
6
|
+
* SuiRender
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
|
+
export interface CodeRegion {
|
|
10
|
+
time: number;
|
|
11
|
+
percent: number;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* @category SuiRender
|
|
15
|
+
*/
|
|
16
|
+
export declare class layoutDebug {
|
|
17
|
+
static get values(): Record<string, number>;
|
|
18
|
+
static get classes(): Record<number, string>;
|
|
19
|
+
static get codeRegions(): Record<string, number>;
|
|
20
|
+
testThrow: boolean;
|
|
21
|
+
static get codeRegionStrings(): string[];
|
|
22
|
+
mask: number;
|
|
23
|
+
_textDebug: number[];
|
|
24
|
+
timestampHash: Record<number, number>;
|
|
25
|
+
_dialogEvents: string[];
|
|
26
|
+
navigation: SuiNavigation;
|
|
27
|
+
constructor(navigation: SuiNavigation);
|
|
28
|
+
clearTimestamps(): void;
|
|
29
|
+
setTimestamp(region: number, millis: number): void;
|
|
30
|
+
printTimeReport(): void;
|
|
31
|
+
flagSet(value: number): number;
|
|
32
|
+
clearAll(): void;
|
|
33
|
+
setAll(): void;
|
|
34
|
+
setRenderFlags(): void;
|
|
35
|
+
clearDebugBoxes(value: number): void;
|
|
36
|
+
debugBox(svg: SVGSVGElement, box: SvgBox | null, flag: number): void;
|
|
37
|
+
setFlag(value: number): void;
|
|
38
|
+
setFlagDivs(): void;
|
|
39
|
+
updateScrollDebug(point: SvgPoint): void;
|
|
40
|
+
updateMouseDebug(client: SvgPoint, logical: SvgPoint, offset: SvgPoint): void;
|
|
41
|
+
updateDragDebug(client: SvgPoint, logical: SvgPoint, state: string): void;
|
|
42
|
+
updatePlayDebug(selector: SmoSelector, logical: SvgBox): void;
|
|
43
|
+
addTextDebug(value: number): void;
|
|
44
|
+
addDialogDebug(value: string): void;
|
|
45
|
+
measureHistory(measure: SmoMeasure, oldVal: string, newVal: any, description: string): void;
|
|
46
|
+
}
|
|
@@ -1,135 +1,138 @@
|
|
|
1
|
-
import { SmoSelector, SmoSelection, ModifierTab } from '../../smo/xform/selections';
|
|
2
|
-
import { OutlineInfo } from './svgHelpers';
|
|
3
|
-
import { layoutDebug } from './layoutDebug';
|
|
4
|
-
import { SuiScroller } from './scroller';
|
|
5
|
-
import { SmoSystemStaff } from '../../smo/data/systemStaff';
|
|
6
|
-
import { SmoMeasure } from '../../smo/data/measure';
|
|
7
|
-
import { SmoNoteModifierBase } from '../../smo/data/noteModifiers';
|
|
8
|
-
import { SvgBox, SvgPoint } from '../../smo/data/common';
|
|
9
|
-
import { SmoGlobalLayout } from '../../smo/data/scoreModifiers';
|
|
10
|
-
import { SmoScore } from '../../smo/data/score';
|
|
11
|
-
import { SvgPageMap } from './svgPageMap';
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
*
|
|
15
|
-
* @
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
* @param
|
|
32
|
-
* @param
|
|
33
|
-
* @param
|
|
34
|
-
* @param
|
|
35
|
-
* @param
|
|
36
|
-
* @param
|
|
37
|
-
* @
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
*
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
abstract
|
|
84
|
-
abstract
|
|
85
|
-
abstract
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
*
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
*
|
|
112
|
-
* @
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
*
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
1
|
+
import { SmoSelector, SmoSelection, ModifierTab } from '../../smo/xform/selections';
|
|
2
|
+
import { OutlineInfo } from './svgHelpers';
|
|
3
|
+
import { layoutDebug } from './layoutDebug';
|
|
4
|
+
import { SuiScroller } from './scroller';
|
|
5
|
+
import { SmoSystemStaff } from '../../smo/data/systemStaff';
|
|
6
|
+
import { SmoMeasure } from '../../smo/data/measure';
|
|
7
|
+
import { SmoNoteModifierBase } from '../../smo/data/noteModifiers';
|
|
8
|
+
import { SvgBox, SvgPoint } from '../../smo/data/common';
|
|
9
|
+
import { SmoGlobalLayout } from '../../smo/data/scoreModifiers';
|
|
10
|
+
import { SmoScore } from '../../smo/data/score';
|
|
11
|
+
import { SvgPageMap } from './svgPageMap';
|
|
12
|
+
import { SuiScoreRender } from "./scoreRender";
|
|
13
|
+
/**
|
|
14
|
+
* Decide if this layout is horizontal or vertical
|
|
15
|
+
* @param layout
|
|
16
|
+
* @returns
|
|
17
|
+
*/
|
|
18
|
+
export declare function isHorizontalLayout(layout?: SmoGlobalLayout): boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Provide the layout and some convenience functions for horizontal vs. vertical layout
|
|
21
|
+
*/
|
|
22
|
+
export interface layoutProvider {
|
|
23
|
+
getLayout(): SmoGlobalLayout | undefined;
|
|
24
|
+
isLayoutHorizontal(): boolean;
|
|
25
|
+
getFlowDimensionExtent(box: SvgBox): number;
|
|
26
|
+
getFlowDimensionPosition(box: SvgBox | SvgPoint): number;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* DI information about renderer, so we can notify renderer and it can contain
|
|
30
|
+
* a tracker object
|
|
31
|
+
* @param pageMap {@link SvgPageMap}: SvgPageMap - container of SVG elements and vex renderers
|
|
32
|
+
* @param score {@link SmoScore}
|
|
33
|
+
* @param dirty lets the caller know the display needs update
|
|
34
|
+
* @param passState state machine in rendering part/all of the score
|
|
35
|
+
* @param renderPromise awaits on render all
|
|
36
|
+
* @param addToReplaceQueue adds a measure to the quick update queue
|
|
37
|
+
* @param renderElement a little redundant with svg
|
|
38
|
+
* @category SuiRender
|
|
39
|
+
*/
|
|
40
|
+
export interface SuiRendererBase {
|
|
41
|
+
pageMap: SvgPageMap;
|
|
42
|
+
score: SmoScore | null;
|
|
43
|
+
dirty: boolean;
|
|
44
|
+
passState: number;
|
|
45
|
+
renderPromise(): Promise<any>;
|
|
46
|
+
addToReplaceQueue(mm: SmoSelection[]): void;
|
|
47
|
+
renderElement: Element;
|
|
48
|
+
debug: layoutDebug;
|
|
49
|
+
renderer: SuiScoreRender;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* used to perform highlights in the backgroundd
|
|
53
|
+
* @category SuiRender
|
|
54
|
+
*/
|
|
55
|
+
export interface HighlightQueue {
|
|
56
|
+
selectionCount: number;
|
|
57
|
+
deferred: boolean;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Map the notes in the svg so they can respond to events and interact
|
|
61
|
+
* with the mouse/keyboard
|
|
62
|
+
* @category SuiRender
|
|
63
|
+
*/
|
|
64
|
+
export declare abstract class SuiMapper {
|
|
65
|
+
renderer: SuiRendererBase;
|
|
66
|
+
scroller: SuiScroller;
|
|
67
|
+
measureNoteMap: Record<string | number, SmoSelection>;
|
|
68
|
+
modifierSelections: ModifierTab[];
|
|
69
|
+
selections: SmoSelection[];
|
|
70
|
+
localModifiers: ModifierTab[];
|
|
71
|
+
modifierIndex: number;
|
|
72
|
+
modifierSuggestion: ModifierTab | null;
|
|
73
|
+
pitchIndex: number;
|
|
74
|
+
deferHighlightMode: boolean;
|
|
75
|
+
suggestion: SmoSelection | null;
|
|
76
|
+
highlightQueue: HighlightQueue;
|
|
77
|
+
mouseHintBox: OutlineInfo | null;
|
|
78
|
+
selectionRects: Record<number, OutlineInfo[]>;
|
|
79
|
+
outlines: Record<string, OutlineInfo>;
|
|
80
|
+
mapping: boolean;
|
|
81
|
+
debug: layoutDebug;
|
|
82
|
+
constructor(renderer: SuiRendererBase, scroller: SuiScroller);
|
|
83
|
+
abstract highlightSelection(): void;
|
|
84
|
+
abstract _growSelectionRight(hold?: boolean): number;
|
|
85
|
+
abstract _setModifierAsSuggestion(sel: ModifierTab): void;
|
|
86
|
+
abstract _setArtifactAsSuggestion(sel: SmoSelection): void;
|
|
87
|
+
abstract getIdleTime(): number;
|
|
88
|
+
updateHighlight(): void;
|
|
89
|
+
deferHighlight(): void;
|
|
90
|
+
_createLocalModifiersList(): void;
|
|
91
|
+
/**
|
|
92
|
+
* When a modifier is selected graphically, update the selection list
|
|
93
|
+
* and create a local modifier list
|
|
94
|
+
* @param modifierTabs
|
|
95
|
+
*/
|
|
96
|
+
createLocalModifiersFromModifierTabs(modifierTabs: ModifierTab[]): void;
|
|
97
|
+
removeModifierSelectionBox(): void;
|
|
98
|
+
clearModifierSelections(): void;
|
|
99
|
+
loadScore(): void;
|
|
100
|
+
clearMeasureMap(measure: SmoMeasure): void;
|
|
101
|
+
_copySelectionsByMeasure(staffIndex: number, measureIndex: number): {
|
|
102
|
+
ticks: number;
|
|
103
|
+
selectors: SmoSelector[];
|
|
104
|
+
};
|
|
105
|
+
deleteMeasure(selection: SmoSelection): void;
|
|
106
|
+
_updateNoteModifier(selection: SmoSelection, modMap: Record<string, boolean>, modifier: SmoNoteModifierBase, ix: number): number;
|
|
107
|
+
_updateModifiers(): void;
|
|
108
|
+
_getClosestTick(selector: SmoSelector): SmoSelection;
|
|
109
|
+
_setModifierBoxes(measure: SmoMeasure): void;
|
|
110
|
+
/**
|
|
111
|
+
* returns true of the selections are adjacent
|
|
112
|
+
* @param s1 a selections
|
|
113
|
+
* @param s2 another election
|
|
114
|
+
* @returns
|
|
115
|
+
*/
|
|
116
|
+
isAdjacentSelection(s1: SmoSelection, s2: SmoSelection): boolean;
|
|
117
|
+
areSelectionsAdjacent(): boolean;
|
|
118
|
+
/**
|
|
119
|
+
* This is the logic that stores the screen location of music after it's rendered
|
|
120
|
+
*/
|
|
121
|
+
mapMeasure(staff: SmoSystemStaff, measure: SmoMeasure, printing: boolean): void;
|
|
122
|
+
_getTicksFromSelections(): number;
|
|
123
|
+
_copySelections(): SmoSelector[];
|
|
124
|
+
getExtremeSelection(sign: number): SmoSelection;
|
|
125
|
+
_selectClosest(selector: SmoSelector): void;
|
|
126
|
+
updateMap(): void;
|
|
127
|
+
createMousePositionBox(logicalBox: SvgBox): void;
|
|
128
|
+
eraseMousePositionBox(): void;
|
|
129
|
+
/**
|
|
130
|
+
* Find any musical elements at the supplied screen coordinates and set them as the selection
|
|
131
|
+
* @param bb
|
|
132
|
+
* @returns
|
|
133
|
+
*/
|
|
134
|
+
intersectingArtifact(bb: SvgBox): void;
|
|
135
|
+
getIntersectingArtifact(bb: SvgBox): SmoSelection | null;
|
|
136
|
+
_getRectangleChain(selection: SmoSelection): number[];
|
|
137
|
+
_updateMeasureNoteMap(artifact: SmoSelection, printing: boolean): void;
|
|
138
|
+
}
|
|
@@ -1,90 +1,92 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Classes to support the state machine associated with background music rendering.
|
|
3
|
-
* @module renderState
|
|
4
|
-
*/
|
|
5
|
-
import { SmoMeasure } from '../../smo/data/measure';
|
|
6
|
-
import { UndoBuffer } from '../../smo/xform/undo';
|
|
7
|
-
import { SmoSelection } from '../../smo/xform/selections';
|
|
8
|
-
import { SmoScore } from '../../smo/data/score';
|
|
9
|
-
import { SmoTextGroup } from '../../smo/data/scoreText';
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
* render
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
*
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Classes to support the state machine associated with background music rendering.
|
|
3
|
+
* @module renderState
|
|
4
|
+
*/
|
|
5
|
+
import { SmoMeasure } from '../../smo/data/measure';
|
|
6
|
+
import { UndoBuffer } from '../../smo/xform/undo';
|
|
7
|
+
import { SmoSelection } from '../../smo/xform/selections';
|
|
8
|
+
import { SmoScore } from '../../smo/data/score';
|
|
9
|
+
import { SmoTextGroup } from '../../smo/data/scoreText';
|
|
10
|
+
import { displayMode } from '../../smo/data/scoreModifiers';
|
|
11
|
+
import { SuiMapper, SuiRendererBase } from './mapper';
|
|
12
|
+
import { SuiScoreRender, ScoreRenderParams } from './scoreRender';
|
|
13
|
+
import { layoutDebug } from './layoutDebug';
|
|
14
|
+
import { SuiNavigation } from './configuration';
|
|
15
|
+
export declare var scoreChangeEvent: string;
|
|
16
|
+
/**
|
|
17
|
+
* Manage the state of the score rendering. The score can be rendered either completely,
|
|
18
|
+
* or partially for editing. This class works with the RenderDemon to decide when to
|
|
19
|
+
* render the score after it has been modified, and keeps track of what the current
|
|
20
|
+
* render state is (dirty, etc.)
|
|
21
|
+
* @category SuiRender
|
|
22
|
+
* */
|
|
23
|
+
export declare class SuiRenderState implements SuiRendererBase {
|
|
24
|
+
static debugMask: number;
|
|
25
|
+
dirty: boolean;
|
|
26
|
+
replaceQ: SmoSelection[];
|
|
27
|
+
stateRepCount: 0;
|
|
28
|
+
viewportChanged: boolean;
|
|
29
|
+
_resetViewport: boolean;
|
|
30
|
+
measureMapper: SuiMapper | null;
|
|
31
|
+
passState: number;
|
|
32
|
+
_score: SmoScore | null;
|
|
33
|
+
_backupZoomScale: number;
|
|
34
|
+
backupDisplayMode: displayMode;
|
|
35
|
+
renderer: SuiScoreRender;
|
|
36
|
+
idleRedrawTime: number;
|
|
37
|
+
idleLayoutTimer: number;
|
|
38
|
+
demonPollTime: number;
|
|
39
|
+
handlingRedraw: boolean;
|
|
40
|
+
suspendRendering: boolean;
|
|
41
|
+
undoBuffer: UndoBuffer;
|
|
42
|
+
navigation: SuiNavigation;
|
|
43
|
+
undoStatus: number;
|
|
44
|
+
debug: layoutDebug;
|
|
45
|
+
constructor(config: ScoreRenderParams);
|
|
46
|
+
get elementId(): any;
|
|
47
|
+
get pageMap(): import("./svgPageMap").SvgPageMap;
|
|
48
|
+
setMeasureMapper(mapper: SuiMapper): void;
|
|
49
|
+
set stepMode(value: boolean);
|
|
50
|
+
static get passStates(): Record<string, number>;
|
|
51
|
+
get renderElement(): Element;
|
|
52
|
+
notifyFontChange(): void;
|
|
53
|
+
addToReplaceQueue(selection: SmoSelection | SmoSelection[]): void;
|
|
54
|
+
addColumnToReplaceQueue(mm: number): void;
|
|
55
|
+
setDirty(): void;
|
|
56
|
+
setRefresh(): void;
|
|
57
|
+
rerenderAll(): void;
|
|
58
|
+
clearLine(measure: SmoMeasure): void;
|
|
59
|
+
get renderStateClean(): boolean;
|
|
60
|
+
get renderStateRendered(): boolean;
|
|
61
|
+
/**
|
|
62
|
+
* Do a quick re-render of a measure that has changed, defer the whole score.
|
|
63
|
+
* @returns
|
|
64
|
+
*/
|
|
65
|
+
replaceMeasures(): Promise<void>;
|
|
66
|
+
preserveScroll(): Promise<void>;
|
|
67
|
+
_renderStatePromise(condition: () => boolean): Promise<void>;
|
|
68
|
+
renderPromise(): Promise<void>;
|
|
69
|
+
updatePromise(): Promise<void>;
|
|
70
|
+
handleRedrawTimer(): Promise<void>;
|
|
71
|
+
pollRedraw(): void;
|
|
72
|
+
startDemon(): void;
|
|
73
|
+
renderTextGroup(gg: SmoTextGroup): void;
|
|
74
|
+
/**
|
|
75
|
+
* Set the SVG viewport
|
|
76
|
+
* @param reset whether to re-render the entire SVG DOM
|
|
77
|
+
* @returns
|
|
78
|
+
*/
|
|
79
|
+
setViewport(): void;
|
|
80
|
+
renderForPrintPromise(): Promise<any>;
|
|
81
|
+
restoreLayoutAfterPrint(): void;
|
|
82
|
+
setPassState(st: number, location: string): void;
|
|
83
|
+
get score(): SmoScore | null;
|
|
84
|
+
dbgDrawDot(x: number, y: number, radius: number, startAngle: number, endAngle: number, counterclockwise: boolean): void;
|
|
85
|
+
set score(score: SmoScore | null);
|
|
86
|
+
unrenderColumn(measure: SmoMeasure): void;
|
|
87
|
+
forceRender(): void;
|
|
88
|
+
unrenderMeasure(measure: SmoMeasure): void;
|
|
89
|
+
rerenderTextGroups(): Promise<void>;
|
|
90
|
+
unrenderTextGroups(): Promise<void>;
|
|
91
|
+
render(): Promise<any>;
|
|
92
|
+
}
|