@yamcs/opi 1.2.6 → 1.2.8
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/LICENSE +0 -35
- package/dist/fonts/LiberationMono-Bold.woff2 +0 -0
- package/dist/fonts/LiberationMono-BoldItalic.woff2 +0 -0
- package/dist/fonts/LiberationMono-Italic.woff2 +0 -0
- package/dist/fonts/LiberationMono-Regular.woff2 +0 -0
- package/dist/fonts/LiberationSans-Bold.woff2 +0 -0
- package/dist/fonts/LiberationSans-BoldItalic.woff2 +0 -0
- package/dist/fonts/LiberationSans-Italic.woff2 +0 -0
- package/dist/fonts/LiberationSans-Regular.woff2 +0 -0
- package/dist/fonts/LiberationSerif-Bold.woff2 +0 -0
- package/dist/fonts/LiberationSerif-BoldItalic.woff2 +0 -0
- package/dist/fonts/LiberationSerif-Italic.woff2 +0 -0
- package/dist/fonts/LiberationSerif-Regular.woff2 +0 -0
- package/dist/opi.js +1 -1
- package/dist/opi.js.map +1 -1
- package/dist/types/Color.d.ts +36 -36
- package/dist/types/ColorMap.d.ts +23 -23
- package/dist/types/ConsoleHandler.d.ts +10 -10
- package/dist/types/DecimalFormat.d.ts +36 -36
- package/dist/types/DialogHandler.d.ts +14 -0
- package/dist/types/Display.d.ts +141 -130
- package/dist/types/EventHandler.d.ts +34 -34
- package/dist/types/Font.d.ts +15 -13
- package/dist/types/FontResolver.d.ts +4 -0
- package/dist/types/Graphics.d.ts +172 -172
- package/dist/types/HitCanvas.d.ts +14 -14
- package/dist/types/HitRegionSpecification.d.ts +15 -15
- package/dist/types/PathResolver.d.ts +10 -10
- package/dist/types/Range.d.ts +4 -4
- package/dist/types/Widget.d.ts +118 -112
- package/dist/types/XMLNode.d.ts +83 -83
- package/dist/types/actions/Action.d.ts +10 -0
- package/dist/types/actions/ExecuteCommandAction.d.ts +10 -0
- package/dist/types/actions/ExecuteJavaScriptAction.d.ts +10 -0
- package/dist/types/actions/OpenDisplayAction.d.ts +11 -0
- package/dist/types/actions/OpenFileAction.d.ts +8 -0
- package/dist/types/actions/OpenWebpageAction.d.ts +8 -0
- package/dist/types/actions/PlaySoundAction.d.ts +8 -0
- package/dist/types/actions/WritePVAction.d.ts +11 -0
- package/dist/types/actions.d.ts +10 -64
- package/dist/types/events.d.ts +41 -41
- package/dist/types/index.d.ts +11 -8
- package/dist/types/macros.d.ts +9 -9
- package/dist/types/positioning.d.ts +57 -57
- package/dist/types/properties.d.ts +89 -89
- package/dist/types/pv/FormulaPVProvider.d.ts +10 -10
- package/dist/types/pv/LocalPV.d.ts +10 -10
- package/dist/types/pv/PV.d.ts +62 -62
- package/dist/types/pv/PVEngine.d.ts +57 -47
- package/dist/types/pv/PVProvider.d.ts +8 -8
- package/dist/types/pv/Sample.d.ts +11 -11
- package/dist/types/pv/SimulatedPVProvider.d.ts +10 -10
- package/dist/types/pv/formulas/CompiledFormula.d.ts +23 -23
- package/dist/types/pv/formulas/FormulaCompiler.d.ts +5 -5
- package/dist/types/pv/formulas/ast.d.ts +60 -60
- package/dist/types/pv/formulas/manual-test.d.ts +1 -1
- package/dist/types/pv/sim.d.ts +60 -60
- package/dist/types/rules.d.ts +26 -26
- package/dist/types/scale.d.ts +39 -39
- package/dist/types/scripting/ActionWrapper.d.ts +12 -0
- package/dist/types/scripting/ArrayList.d.ts +5 -0
- package/dist/types/scripting/ColorFontUtil.d.ts +19 -19
- package/dist/types/scripting/ConsoleUtil.d.ts +8 -8
- package/dist/types/scripting/DataUtil.d.ts +6 -6
- package/dist/types/scripting/DisplayWrapper.d.ts +9 -7
- package/dist/types/scripting/FileUtil.d.ts +6 -6
- package/dist/types/scripting/GUIUtil.d.ts +11 -8
- package/dist/types/scripting/Java.d.ts +84 -18
- package/dist/types/scripting/MessageDialog.d.ts +8 -5
- package/dist/types/scripting/PVUtil.d.ts +19 -16
- package/dist/types/scripting/PVWrapper.d.ts +11 -10
- package/dist/types/scripting/ScriptEngine.d.ts +12 -8
- package/dist/types/scripting/ScriptUtil.d.ts +7 -7
- package/dist/types/scripting/SpreadSheetTable.d.ts +43 -36
- package/dist/types/scripting/SpreadSheetTableWrapper.d.ts +30 -0
- package/dist/types/scripting/TableWrapper.d.ts +10 -9
- package/dist/types/scripting/WidgetWrapper.d.ts +28 -25
- package/dist/types/scripting/XYGraphWrapper.d.ts +9 -9
- package/dist/types/scripting/utils.d.ts +4 -3
- package/dist/types/scripts.d.ts +19 -19
- package/dist/types/utils.d.ts +2 -2
- package/dist/types/widgets/controls/ActionButton.d.ts +23 -21
- package/dist/types/widgets/controls/BooleanButton.d.ts +37 -37
- package/dist/types/widgets/controls/BooleanSwitch.d.ts +32 -32
- package/dist/types/widgets/controls/CheckBox.d.ts +24 -24
- package/dist/types/widgets/controls/ChoiceButton.d.ts +23 -23
- package/dist/types/widgets/controls/Combo.d.ts +20 -20
- package/dist/types/widgets/controls/ImageBooleanButton.d.ts +33 -33
- package/dist/types/widgets/controls/MenuButton.d.ts +18 -18
- package/dist/types/widgets/controls/NativeButton.d.ts +9 -9
- package/dist/types/widgets/controls/RadioBox.d.ts +26 -26
- package/dist/types/widgets/controls/Scrollbar.d.ts +51 -51
- package/dist/types/widgets/controls/TextInput.d.ts +27 -27
- package/dist/types/widgets/figures/Ramp.d.ts +36 -36
- package/dist/types/widgets/graphics/Arc.d.ts +15 -15
- package/dist/types/widgets/graphics/Ellipse.d.ts +20 -20
- package/dist/types/widgets/graphics/ImageHelper.d.ts +3 -3
- package/dist/types/widgets/graphics/ImageWidget.d.ts +19 -19
- package/dist/types/widgets/graphics/Label.d.ts +15 -15
- package/dist/types/widgets/graphics/Polygon.d.ts +19 -19
- package/dist/types/widgets/graphics/Polyline.d.ts +20 -20
- package/dist/types/widgets/graphics/Rectangle.d.ts +20 -20
- package/dist/types/widgets/graphics/RoundedRectangle.d.ts +22 -22
- package/dist/types/widgets/monitors/ByteMonitor.d.ts +27 -27
- package/dist/types/widgets/monitors/Gauge.d.ts +40 -40
- package/dist/types/widgets/monitors/ImageBooleanIndicator.d.ts +25 -25
- package/dist/types/widgets/monitors/IntensityGraph.d.ts +43 -43
- package/dist/types/widgets/monitors/LED.d.ts +37 -37
- package/dist/types/widgets/monitors/LinearScale.d.ts +66 -66
- package/dist/types/widgets/monitors/Meter.d.ts +39 -39
- package/dist/types/widgets/monitors/ProgressBar.d.ts +64 -64
- package/dist/types/widgets/monitors/Tank.d.ts +52 -52
- package/dist/types/widgets/monitors/TextUpdate.d.ts +17 -17
- package/dist/types/widgets/monitors/Thermometer.d.ts +58 -58
- package/dist/types/widgets/monitors/xygraph/Axis.d.ts +41 -41
- package/dist/types/widgets/monitors/xygraph/CommandBuffer.d.ts +26 -26
- package/dist/types/widgets/monitors/xygraph/PlotAreaRegion.d.ts +22 -22
- package/dist/types/widgets/monitors/xygraph/Trace.d.ts +38 -38
- package/dist/types/widgets/monitors/xygraph/TraceBuffer.d.ts +32 -32
- package/dist/types/widgets/monitors/xygraph/XYGraph.d.ts +44 -44
- package/dist/types/widgets/monitors/xygraph/XYGraphToolbar.d.ts +54 -54
- package/dist/types/widgets/others/AbstractContainerWidget.d.ts +21 -21
- package/dist/types/widgets/others/Connection.d.ts +39 -39
- package/dist/types/widgets/others/DisplayWidget.d.ts +13 -13
- package/dist/types/widgets/others/GroupingContainer.d.ts +8 -8
- package/dist/types/widgets/others/LinkingContainer.d.ts +19 -19
- package/dist/types/widgets/others/TabbedContainer.d.ts +24 -24
- package/dist/types/widgets/others/Table.d.ts +22 -22
- package/dist/types/widgets/others/WebBrowser.d.ts +14 -14
- package/package.json +5 -10
- package/dist/fonts/LiberationMono-Bold.woff +0 -0
- package/dist/fonts/LiberationMono-BoldItalic.woff +0 -0
- package/dist/fonts/LiberationMono-Italic.woff +0 -0
- package/dist/fonts/LiberationMono-Regular.woff +0 -0
- package/dist/fonts/LiberationSans-Bold.woff +0 -0
- package/dist/fonts/LiberationSans-BoldItalic.woff +0 -0
- package/dist/fonts/LiberationSans-Italic.woff +0 -0
- package/dist/fonts/LiberationSans-Regular.woff +0 -0
- package/dist/fonts/LiberationSerif-Bold.woff +0 -0
- package/dist/fonts/LiberationSerif-BoldItalic.woff +0 -0
- package/dist/fonts/LiberationSerif-Italic.woff +0 -0
- package/dist/fonts/LiberationSerif-Regular.woff +0 -0
- package/dist/fonts/stylesheet.css +0 -83
- package/dist/opi.umd.js +0 -2
- package/dist/opi.umd.js.map +0 -1
package/dist/types/Color.d.ts
CHANGED
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
export declare class Color {
|
|
2
|
-
red: number;
|
|
3
|
-
green: number;
|
|
4
|
-
blue: number;
|
|
5
|
-
alpha: number;
|
|
6
|
-
static TRANSPARENT: Color;
|
|
7
|
-
static BLACK: Color;
|
|
8
|
-
static BLUE: Color;
|
|
9
|
-
static CYAN: Color;
|
|
10
|
-
static DARK_GRAY: Color;
|
|
11
|
-
static GRAY: Color;
|
|
12
|
-
static GREEN: Color;
|
|
13
|
-
static LIGHT_BLUE: Color;
|
|
14
|
-
static ORANGE: Color;
|
|
15
|
-
static PINK: Color;
|
|
16
|
-
static PURPLE: Color;
|
|
17
|
-
static RED: Color;
|
|
18
|
-
static WHITE: Color;
|
|
19
|
-
static YELLOW: Color;
|
|
20
|
-
static BUTTON: Color;
|
|
21
|
-
static BUTTON_DARKER: Color;
|
|
22
|
-
static BUTTON_DARKEST: Color;
|
|
23
|
-
static BUTTON_LIGHTEST: Color;
|
|
24
|
-
constructor(red: number, green: number, blue: number, alpha?: number);
|
|
25
|
-
withAlpha(alpha: number): Color;
|
|
26
|
-
mixWith(color: Color, weight: number): Color;
|
|
27
|
-
brighter(): Color;
|
|
28
|
-
darker(): Color;
|
|
29
|
-
contrast(): Color;
|
|
30
|
-
hex(): string;
|
|
31
|
-
/** @scriptapi */
|
|
32
|
-
getRGBValue(): this;
|
|
33
|
-
/** @scriptapi */
|
|
34
|
-
equals(other: Color): boolean;
|
|
35
|
-
toString(): string;
|
|
36
|
-
}
|
|
1
|
+
export declare class Color {
|
|
2
|
+
red: number;
|
|
3
|
+
green: number;
|
|
4
|
+
blue: number;
|
|
5
|
+
alpha: number;
|
|
6
|
+
static TRANSPARENT: Color;
|
|
7
|
+
static BLACK: Color;
|
|
8
|
+
static BLUE: Color;
|
|
9
|
+
static CYAN: Color;
|
|
10
|
+
static DARK_GRAY: Color;
|
|
11
|
+
static GRAY: Color;
|
|
12
|
+
static GREEN: Color;
|
|
13
|
+
static LIGHT_BLUE: Color;
|
|
14
|
+
static ORANGE: Color;
|
|
15
|
+
static PINK: Color;
|
|
16
|
+
static PURPLE: Color;
|
|
17
|
+
static RED: Color;
|
|
18
|
+
static WHITE: Color;
|
|
19
|
+
static YELLOW: Color;
|
|
20
|
+
static BUTTON: Color;
|
|
21
|
+
static BUTTON_DARKER: Color;
|
|
22
|
+
static BUTTON_DARKEST: Color;
|
|
23
|
+
static BUTTON_LIGHTEST: Color;
|
|
24
|
+
constructor(red: number, green: number, blue: number, alpha?: number);
|
|
25
|
+
withAlpha(alpha: number): Color;
|
|
26
|
+
mixWith(color: Color, weight: number): Color;
|
|
27
|
+
brighter(): Color;
|
|
28
|
+
darker(): Color;
|
|
29
|
+
contrast(): Color;
|
|
30
|
+
hex(): string;
|
|
31
|
+
/** @scriptapi */
|
|
32
|
+
getRGBValue(): this;
|
|
33
|
+
/** @scriptapi */
|
|
34
|
+
equals(other: Color): boolean;
|
|
35
|
+
toString(): string;
|
|
36
|
+
}
|
package/dist/types/ColorMap.d.ts
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
export declare class ColorMap {
|
|
3
|
-
readonly code: number;
|
|
4
|
-
private interpolate;
|
|
5
|
-
readonly autoscale: boolean;
|
|
6
|
-
private values;
|
|
7
|
-
private colors;
|
|
8
|
-
private entries;
|
|
9
|
-
private dirty;
|
|
10
|
-
constructor(code: number, interpolate: boolean, autoscale: boolean);
|
|
11
|
-
addMapping(value: number, red: number, green: number, blue: number): void;
|
|
12
|
-
private compile;
|
|
13
|
-
lookup(value: number): rgb;
|
|
14
|
-
getMinMax(): number[];
|
|
15
|
-
/**
|
|
16
|
-
* Returns the index of the value in the sorted entry list.
|
|
17
|
-
* If the value is not found, returns a negative number
|
|
18
|
-
* describing which (when negated), tells the insert
|
|
19
|
-
* position of the provide value.
|
|
20
|
-
*/
|
|
21
|
-
private binarySearch;
|
|
22
|
-
}
|
|
23
|
-
export {};
|
|
1
|
+
type rgb = [number, number, number];
|
|
2
|
+
export declare class ColorMap {
|
|
3
|
+
readonly code: number;
|
|
4
|
+
private interpolate;
|
|
5
|
+
readonly autoscale: boolean;
|
|
6
|
+
private values;
|
|
7
|
+
private colors;
|
|
8
|
+
private entries;
|
|
9
|
+
private dirty;
|
|
10
|
+
constructor(code: number, interpolate: boolean, autoscale: boolean);
|
|
11
|
+
addMapping(value: number, red: number, green: number, blue: number): void;
|
|
12
|
+
private compile;
|
|
13
|
+
lookup(value: number): rgb;
|
|
14
|
+
getMinMax(): number[];
|
|
15
|
+
/**
|
|
16
|
+
* Returns the index of the value in the sorted entry list.
|
|
17
|
+
* If the value is not found, returns a negative number
|
|
18
|
+
* describing which (when negated), tells the insert
|
|
19
|
+
* position of the provide value.
|
|
20
|
+
*/
|
|
21
|
+
private binarySearch;
|
|
22
|
+
}
|
|
23
|
+
export {};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export interface ConsoleHandler {
|
|
2
|
-
writeInfo(message: string): void;
|
|
3
|
-
writeError(message: string): void;
|
|
4
|
-
writeWarning(message: string): void;
|
|
5
|
-
}
|
|
6
|
-
export declare class DefaultConsoleHandler implements ConsoleHandler {
|
|
7
|
-
writeInfo(message: string): void;
|
|
8
|
-
writeError(message: string): void;
|
|
9
|
-
writeWarning(message: string): void;
|
|
10
|
-
}
|
|
1
|
+
export interface ConsoleHandler {
|
|
2
|
+
writeInfo(message: string): void;
|
|
3
|
+
writeError(message: string): void;
|
|
4
|
+
writeWarning(message: string): void;
|
|
5
|
+
}
|
|
6
|
+
export declare class DefaultConsoleHandler implements ConsoleHandler {
|
|
7
|
+
writeInfo(message: string): void;
|
|
8
|
+
writeError(message: string): void;
|
|
9
|
+
writeWarning(message: string): void;
|
|
10
|
+
}
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
export declare class DecimalFormat {
|
|
2
|
-
private prefix;
|
|
3
|
-
private suffix;
|
|
4
|
-
/**
|
|
5
|
-
* Grouping size
|
|
6
|
-
*/
|
|
7
|
-
private comma;
|
|
8
|
-
/**
|
|
9
|
-
* Minimum integer digits to be displayed
|
|
10
|
-
*/
|
|
11
|
-
private minInt;
|
|
12
|
-
/**
|
|
13
|
-
* Minimum fractional digits to be displayed
|
|
14
|
-
*/
|
|
15
|
-
private minFrac;
|
|
16
|
-
/**
|
|
17
|
-
* Maximum fractional digits to be displayed
|
|
18
|
-
*/
|
|
19
|
-
private maxFrac;
|
|
20
|
-
constructor(formatStr: string);
|
|
21
|
-
/**
|
|
22
|
-
* 1223.06 --> $1,223.06
|
|
23
|
-
*/
|
|
24
|
-
format(numStr: any): any;
|
|
25
|
-
/**
|
|
26
|
-
* Converts formatted value back to non-formatted value
|
|
27
|
-
*/
|
|
28
|
-
private formatBack;
|
|
29
|
-
/**
|
|
30
|
-
* We shouldn't return strings like 1.000 in formatBack method.
|
|
31
|
-
* However, using only Number(str) is not enough, because it omits . in big numbers
|
|
32
|
-
* like 23423423423342234.34 => 23423423423342236 . There's a conflict in cases
|
|
33
|
-
* 6143 and 6541.
|
|
34
|
-
*/
|
|
35
|
-
private getNumericString;
|
|
36
|
-
}
|
|
1
|
+
export declare class DecimalFormat {
|
|
2
|
+
private prefix;
|
|
3
|
+
private suffix;
|
|
4
|
+
/**
|
|
5
|
+
* Grouping size
|
|
6
|
+
*/
|
|
7
|
+
private comma;
|
|
8
|
+
/**
|
|
9
|
+
* Minimum integer digits to be displayed
|
|
10
|
+
*/
|
|
11
|
+
private minInt;
|
|
12
|
+
/**
|
|
13
|
+
* Minimum fractional digits to be displayed
|
|
14
|
+
*/
|
|
15
|
+
private minFrac;
|
|
16
|
+
/**
|
|
17
|
+
* Maximum fractional digits to be displayed
|
|
18
|
+
*/
|
|
19
|
+
private maxFrac;
|
|
20
|
+
constructor(formatStr: string);
|
|
21
|
+
/**
|
|
22
|
+
* 1223.06 --> $1,223.06
|
|
23
|
+
*/
|
|
24
|
+
format(numStr: any): any;
|
|
25
|
+
/**
|
|
26
|
+
* Converts formatted value back to non-formatted value
|
|
27
|
+
*/
|
|
28
|
+
private formatBack;
|
|
29
|
+
/**
|
|
30
|
+
* We shouldn't return strings like 1.000 in formatBack method.
|
|
31
|
+
* However, using only Number(str) is not enough, because it omits . in big numbers
|
|
32
|
+
* like 23423423423342234.34 => 23423423423342236 . There's a conflict in cases
|
|
33
|
+
* 6143 and 6541.
|
|
34
|
+
*/
|
|
35
|
+
private getNumericString;
|
|
36
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface DialogHandler {
|
|
2
|
+
openConfirmDialog(title: string, message: string): boolean;
|
|
3
|
+
openInformationDialog(title: string, message: string): void;
|
|
4
|
+
openWarningDialog(title: string, message: string): void;
|
|
5
|
+
openErrorDialog(title: string, message: string): void;
|
|
6
|
+
openPasswordDialog(title: string, message: string, password: string): boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare class DefaultDialogHandler implements DialogHandler {
|
|
9
|
+
openConfirmDialog(title: string, message: string): boolean;
|
|
10
|
+
openInformationDialog(title: string, message: string): void;
|
|
11
|
+
openWarningDialog(title: string, message: string): void;
|
|
12
|
+
openErrorDialog(title: string, message: string): void;
|
|
13
|
+
openPasswordDialog(title: string, message: string, password: string): boolean;
|
|
14
|
+
}
|
package/dist/types/Display.d.ts
CHANGED
|
@@ -1,130 +1,141 @@
|
|
|
1
|
-
import { ConsoleHandler } from
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
private
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
private
|
|
53
|
-
|
|
54
|
-
private
|
|
55
|
-
private
|
|
56
|
-
private
|
|
57
|
-
private
|
|
58
|
-
private
|
|
59
|
-
private
|
|
60
|
-
private
|
|
61
|
-
private
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* Prefix for
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
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
|
-
|
|
1
|
+
import { ConsoleHandler } from "./ConsoleHandler";
|
|
2
|
+
import { DialogHandler } from "./DialogHandler";
|
|
3
|
+
import { OPIEvent, OPIEventMap } from "./events";
|
|
4
|
+
import { FontResolver } from "./FontResolver";
|
|
5
|
+
import { PathResolver } from "./PathResolver";
|
|
6
|
+
import { Bounds } from "./positioning";
|
|
7
|
+
import { PVEngine } from "./pv/PVEngine";
|
|
8
|
+
import { PVProvider } from "./pv/PVProvider";
|
|
9
|
+
import { Sample } from "./pv/Sample";
|
|
10
|
+
import { Widget } from "./Widget";
|
|
11
|
+
import { ActionButton } from "./widgets/controls/ActionButton";
|
|
12
|
+
import { BooleanButton } from "./widgets/controls/BooleanButton";
|
|
13
|
+
import { BooleanSwitch } from "./widgets/controls/BooleanSwitch";
|
|
14
|
+
import { CheckBox } from "./widgets/controls/CheckBox";
|
|
15
|
+
import { ChoiceButton } from "./widgets/controls/ChoiceButton";
|
|
16
|
+
import { Combo } from "./widgets/controls/Combo";
|
|
17
|
+
import { ImageBooleanButton } from "./widgets/controls/ImageBooleanButton";
|
|
18
|
+
import { MenuButton } from "./widgets/controls/MenuButton";
|
|
19
|
+
import { RadioBox } from "./widgets/controls/RadioBox";
|
|
20
|
+
import { Scrollbar } from "./widgets/controls/Scrollbar";
|
|
21
|
+
import { TextInput } from "./widgets/controls/TextInput";
|
|
22
|
+
import { Arc } from "./widgets/graphics/Arc";
|
|
23
|
+
import { Ellipse } from "./widgets/graphics/Ellipse";
|
|
24
|
+
import { ImageWidget } from "./widgets/graphics/ImageWidget";
|
|
25
|
+
import { Label } from "./widgets/graphics/Label";
|
|
26
|
+
import { Polygon } from "./widgets/graphics/Polygon";
|
|
27
|
+
import { Polyline } from "./widgets/graphics/Polyline";
|
|
28
|
+
import { Rectangle } from "./widgets/graphics/Rectangle";
|
|
29
|
+
import { RoundedRectangle } from "./widgets/graphics/RoundedRectangle";
|
|
30
|
+
import { ByteMonitor } from "./widgets/monitors/ByteMonitor";
|
|
31
|
+
import { Gauge } from "./widgets/monitors/Gauge";
|
|
32
|
+
import { ImageBooleanIndicator } from "./widgets/monitors/ImageBooleanIndicator";
|
|
33
|
+
import { IntensityGraph } from "./widgets/monitors/IntensityGraph";
|
|
34
|
+
import { LED } from "./widgets/monitors/LED";
|
|
35
|
+
import { Meter } from "./widgets/monitors/Meter";
|
|
36
|
+
import { ProgressBar } from "./widgets/monitors/ProgressBar";
|
|
37
|
+
import { Tank } from "./widgets/monitors/Tank";
|
|
38
|
+
import { TextUpdate } from "./widgets/monitors/TextUpdate";
|
|
39
|
+
import { Thermometer } from "./widgets/monitors/Thermometer";
|
|
40
|
+
import { XYGraph } from "./widgets/monitors/xygraph/XYGraph";
|
|
41
|
+
import { AbstractContainerWidget } from "./widgets/others/AbstractContainerWidget";
|
|
42
|
+
import { DisplayWidget } from "./widgets/others/DisplayWidget";
|
|
43
|
+
import { GroupingContainer } from "./widgets/others/GroupingContainer";
|
|
44
|
+
import { LinkingContainer } from "./widgets/others/LinkingContainer";
|
|
45
|
+
import { TabbedContainer } from "./widgets/others/TabbedContainer";
|
|
46
|
+
import { Table } from "./widgets/others/Table";
|
|
47
|
+
import { WebBrowser } from "./widgets/others/WebBrowser";
|
|
48
|
+
export declare class Display {
|
|
49
|
+
private readonly targetElement;
|
|
50
|
+
rootPanel: HTMLDivElement;
|
|
51
|
+
private g;
|
|
52
|
+
private ctx;
|
|
53
|
+
pvEngine: PVEngine;
|
|
54
|
+
private pathResolver;
|
|
55
|
+
private fontResolver?;
|
|
56
|
+
private consoleHandler;
|
|
57
|
+
private dialogHandler;
|
|
58
|
+
private repaintRequested;
|
|
59
|
+
private _editMode;
|
|
60
|
+
private _showGrid;
|
|
61
|
+
private _showOutline;
|
|
62
|
+
private _showRuler;
|
|
63
|
+
private _selection;
|
|
64
|
+
private _scale;
|
|
65
|
+
private _transparent;
|
|
66
|
+
private refreshCycle;
|
|
67
|
+
/**
|
|
68
|
+
* Prefix for images sourced during draw.
|
|
69
|
+
* (does not include workspace images)
|
|
70
|
+
*/
|
|
71
|
+
imagesPrefix: string;
|
|
72
|
+
/**
|
|
73
|
+
* Prefix for workspace references (images, scripts, displays)
|
|
74
|
+
*/
|
|
75
|
+
absPrefix: string;
|
|
76
|
+
relPrefix: string;
|
|
77
|
+
instance?: DisplayWidget;
|
|
78
|
+
private eventListeners;
|
|
79
|
+
private displayRegion;
|
|
80
|
+
constructor(targetElement: HTMLElement);
|
|
81
|
+
addProvider(provider: PVProvider): void;
|
|
82
|
+
addScriptLibrary(name: string, library: any): void;
|
|
83
|
+
setPathResolver(pathResolver: PathResolver): void;
|
|
84
|
+
getPathResolver(): PathResolver;
|
|
85
|
+
setConsoleHandler(consoleHandler: ConsoleHandler): void;
|
|
86
|
+
getConsoleHandler(): ConsoleHandler;
|
|
87
|
+
setDialogHandler(dialogHandler: DialogHandler): void;
|
|
88
|
+
getDialogHandler(): DialogHandler;
|
|
89
|
+
setFontResolver(fontResolver: FontResolver): void;
|
|
90
|
+
getFontResolver(): FontResolver | undefined;
|
|
91
|
+
private step;
|
|
92
|
+
private drawScreen;
|
|
93
|
+
/**
|
|
94
|
+
* Request a repaint of the canvas. The repaint is done async from a
|
|
95
|
+
* UI render loop.
|
|
96
|
+
*/
|
|
97
|
+
requestRepaint(): void;
|
|
98
|
+
setTooltip(tooltip: string | undefined): void;
|
|
99
|
+
createWidget(kind: string, parent: AbstractContainerWidget): LinkingContainer | ActionButton | Arc | BooleanButton | BooleanSwitch | ByteMonitor | CheckBox | ChoiceButton | Combo | Ellipse | Gauge | GroupingContainer | ImageWidget | ImageBooleanButton | ImageBooleanIndicator | IntensityGraph | Label | LED | MenuButton | Meter | Polygon | Polyline | ProgressBar | RadioBox | Rectangle | RoundedRectangle | Scrollbar | TabbedContainer | Table | Tank | TextInput | TextUpdate | Thermometer | WebBrowser | XYGraph | undefined;
|
|
100
|
+
destroy(): void;
|
|
101
|
+
resolvePath(path: string, widget?: Widget): string;
|
|
102
|
+
setSource(href: string): Promise<void>;
|
|
103
|
+
private setSourceString;
|
|
104
|
+
getRefreshCycle(): number;
|
|
105
|
+
setRefreshCycle(refreshCycle: number): void;
|
|
106
|
+
private reset;
|
|
107
|
+
/**
|
|
108
|
+
* Bounds of this widget relative to the root
|
|
109
|
+
* of all of its parents.
|
|
110
|
+
*/
|
|
111
|
+
measureAbsoluteArea(widget: Widget): Bounds;
|
|
112
|
+
addEventListener<K extends keyof OPIEventMap>(type: K, listener: (ev: OPIEventMap[K]) => void): void;
|
|
113
|
+
removeEventListener<K extends keyof OPIEventMap>(type: K, listener: (ev: OPIEventMap[K]) => void): void;
|
|
114
|
+
fireEvent(type: string, event: OPIEvent): void;
|
|
115
|
+
get showGrid(): boolean;
|
|
116
|
+
set showGrid(showGrid: boolean);
|
|
117
|
+
get showOutline(): boolean;
|
|
118
|
+
set showOutline(showOutline: boolean);
|
|
119
|
+
get showRuler(): boolean;
|
|
120
|
+
set showRuler(showRuler: boolean);
|
|
121
|
+
get selection(): string[];
|
|
122
|
+
set selection(selection: string[]);
|
|
123
|
+
get editMode(): boolean;
|
|
124
|
+
set editMode(editMode: boolean);
|
|
125
|
+
get scale(): number;
|
|
126
|
+
set scale(scale: number);
|
|
127
|
+
get transparent(): boolean;
|
|
128
|
+
set transparent(transparent: boolean);
|
|
129
|
+
get widgets(): Widget[];
|
|
130
|
+
clearSelection(): void;
|
|
131
|
+
findWidget(wuid: string): Widget | undefined;
|
|
132
|
+
findWidgetByName(name: string): Widget | undefined;
|
|
133
|
+
getPVNames(): string[];
|
|
134
|
+
getPV(pvName: string): import(".").PV | undefined;
|
|
135
|
+
setValues(samples: Map<string, Sample>): void;
|
|
136
|
+
copyCanvas(area?: Bounds): HTMLCanvasElement;
|
|
137
|
+
/**
|
|
138
|
+
* Returns this display as an image.
|
|
139
|
+
*/
|
|
140
|
+
toDataURL(type?: string, quality?: any): string;
|
|
141
|
+
}
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import { Display } from
|
|
2
|
-
import { HitCanvas } from
|
|
3
|
-
import { Point } from
|
|
4
|
-
export interface OpiMouseEvent {
|
|
5
|
-
clientX: number;
|
|
6
|
-
clientY: number;
|
|
7
|
-
point: Point;
|
|
8
|
-
}
|
|
9
|
-
export interface OpiGrabEvent extends OpiMouseEvent {
|
|
10
|
-
dx: number;
|
|
11
|
-
dy: number;
|
|
12
|
-
}
|
|
13
|
-
export declare class EventHandler {
|
|
14
|
-
private display;
|
|
15
|
-
private canvas;
|
|
16
|
-
private hitCanvas;
|
|
17
|
-
private grabbing;
|
|
18
|
-
private grabTarget?;
|
|
19
|
-
private grabPoint?;
|
|
20
|
-
private documentMouseMoveListener;
|
|
21
|
-
private documentMouseUpListener;
|
|
22
|
-
private prevEnteredRegion?;
|
|
23
|
-
constructor(display: Display, canvas: HTMLCanvasElement, hitCanvas: HitCanvas);
|
|
24
|
-
private toPoint;
|
|
25
|
-
private onCanvasClick;
|
|
26
|
-
private onCanvasMouseDown;
|
|
27
|
-
private onCanvasMouseUp;
|
|
28
|
-
private onCanvasMouseOut;
|
|
29
|
-
private onCanvasMouseMove;
|
|
30
|
-
private initiateGrab;
|
|
31
|
-
private onDocumentMouseUp;
|
|
32
|
-
private onDocumentMouseMove;
|
|
33
|
-
private selectSingleWidget;
|
|
34
|
-
}
|
|
1
|
+
import { Display } from "./Display";
|
|
2
|
+
import { HitCanvas } from "./HitCanvas";
|
|
3
|
+
import { Point } from "./positioning";
|
|
4
|
+
export interface OpiMouseEvent {
|
|
5
|
+
clientX: number;
|
|
6
|
+
clientY: number;
|
|
7
|
+
point: Point;
|
|
8
|
+
}
|
|
9
|
+
export interface OpiGrabEvent extends OpiMouseEvent {
|
|
10
|
+
dx: number;
|
|
11
|
+
dy: number;
|
|
12
|
+
}
|
|
13
|
+
export declare class EventHandler {
|
|
14
|
+
private display;
|
|
15
|
+
private canvas;
|
|
16
|
+
private hitCanvas;
|
|
17
|
+
private grabbing;
|
|
18
|
+
private grabTarget?;
|
|
19
|
+
private grabPoint?;
|
|
20
|
+
private documentMouseMoveListener;
|
|
21
|
+
private documentMouseUpListener;
|
|
22
|
+
private prevEnteredRegion?;
|
|
23
|
+
constructor(display: Display, canvas: HTMLCanvasElement, hitCanvas: HitCanvas);
|
|
24
|
+
private toPoint;
|
|
25
|
+
private onCanvasClick;
|
|
26
|
+
private onCanvasMouseDown;
|
|
27
|
+
private onCanvasMouseUp;
|
|
28
|
+
private onCanvasMouseOut;
|
|
29
|
+
private onCanvasMouseMove;
|
|
30
|
+
private initiateGrab;
|
|
31
|
+
private onDocumentMouseUp;
|
|
32
|
+
private onDocumentMouseMove;
|
|
33
|
+
private selectSingleWidget;
|
|
34
|
+
}
|
package/dist/types/Font.d.ts
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
export declare class Font {
|
|
2
|
-
name: string;
|
|
3
|
-
style: number;
|
|
4
|
-
static ARIAL_9: Font;
|
|
5
|
-
static ARIAL_10: Font;
|
|
6
|
-
static ARIAL_11: Font;
|
|
7
|
-
static ARIAL_12_BOLD: Font;
|
|
8
|
-
height: number;
|
|
9
|
-
constructor(name: string, height: number, style: number, pixels: boolean);
|
|
10
|
-
scale(scale: number): Font;
|
|
11
|
-
getFontString(): string;
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
export declare class Font {
|
|
2
|
+
name: string;
|
|
3
|
+
style: number;
|
|
4
|
+
static ARIAL_9: Font;
|
|
5
|
+
static ARIAL_10: Font;
|
|
6
|
+
static ARIAL_11: Font;
|
|
7
|
+
static ARIAL_12_BOLD: Font;
|
|
8
|
+
height: number;
|
|
9
|
+
constructor(name: string, height: number, style: number, pixels: boolean);
|
|
10
|
+
scale(scale: number): Font;
|
|
11
|
+
getFontString(): string;
|
|
12
|
+
get bold(): boolean;
|
|
13
|
+
get italic(): boolean;
|
|
14
|
+
isWebSafe(): boolean;
|
|
15
|
+
}
|