@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.
Files changed (145) hide show
  1. package/LICENSE +0 -35
  2. package/dist/fonts/LiberationMono-Bold.woff2 +0 -0
  3. package/dist/fonts/LiberationMono-BoldItalic.woff2 +0 -0
  4. package/dist/fonts/LiberationMono-Italic.woff2 +0 -0
  5. package/dist/fonts/LiberationMono-Regular.woff2 +0 -0
  6. package/dist/fonts/LiberationSans-Bold.woff2 +0 -0
  7. package/dist/fonts/LiberationSans-BoldItalic.woff2 +0 -0
  8. package/dist/fonts/LiberationSans-Italic.woff2 +0 -0
  9. package/dist/fonts/LiberationSans-Regular.woff2 +0 -0
  10. package/dist/fonts/LiberationSerif-Bold.woff2 +0 -0
  11. package/dist/fonts/LiberationSerif-BoldItalic.woff2 +0 -0
  12. package/dist/fonts/LiberationSerif-Italic.woff2 +0 -0
  13. package/dist/fonts/LiberationSerif-Regular.woff2 +0 -0
  14. package/dist/opi.js +1 -1
  15. package/dist/opi.js.map +1 -1
  16. package/dist/types/Color.d.ts +36 -36
  17. package/dist/types/ColorMap.d.ts +23 -23
  18. package/dist/types/ConsoleHandler.d.ts +10 -10
  19. package/dist/types/DecimalFormat.d.ts +36 -36
  20. package/dist/types/DialogHandler.d.ts +14 -0
  21. package/dist/types/Display.d.ts +141 -130
  22. package/dist/types/EventHandler.d.ts +34 -34
  23. package/dist/types/Font.d.ts +15 -13
  24. package/dist/types/FontResolver.d.ts +4 -0
  25. package/dist/types/Graphics.d.ts +172 -172
  26. package/dist/types/HitCanvas.d.ts +14 -14
  27. package/dist/types/HitRegionSpecification.d.ts +15 -15
  28. package/dist/types/PathResolver.d.ts +10 -10
  29. package/dist/types/Range.d.ts +4 -4
  30. package/dist/types/Widget.d.ts +118 -112
  31. package/dist/types/XMLNode.d.ts +83 -83
  32. package/dist/types/actions/Action.d.ts +10 -0
  33. package/dist/types/actions/ExecuteCommandAction.d.ts +10 -0
  34. package/dist/types/actions/ExecuteJavaScriptAction.d.ts +10 -0
  35. package/dist/types/actions/OpenDisplayAction.d.ts +11 -0
  36. package/dist/types/actions/OpenFileAction.d.ts +8 -0
  37. package/dist/types/actions/OpenWebpageAction.d.ts +8 -0
  38. package/dist/types/actions/PlaySoundAction.d.ts +8 -0
  39. package/dist/types/actions/WritePVAction.d.ts +11 -0
  40. package/dist/types/actions.d.ts +10 -64
  41. package/dist/types/events.d.ts +41 -41
  42. package/dist/types/index.d.ts +11 -8
  43. package/dist/types/macros.d.ts +9 -9
  44. package/dist/types/positioning.d.ts +57 -57
  45. package/dist/types/properties.d.ts +89 -89
  46. package/dist/types/pv/FormulaPVProvider.d.ts +10 -10
  47. package/dist/types/pv/LocalPV.d.ts +10 -10
  48. package/dist/types/pv/PV.d.ts +62 -62
  49. package/dist/types/pv/PVEngine.d.ts +57 -47
  50. package/dist/types/pv/PVProvider.d.ts +8 -8
  51. package/dist/types/pv/Sample.d.ts +11 -11
  52. package/dist/types/pv/SimulatedPVProvider.d.ts +10 -10
  53. package/dist/types/pv/formulas/CompiledFormula.d.ts +23 -23
  54. package/dist/types/pv/formulas/FormulaCompiler.d.ts +5 -5
  55. package/dist/types/pv/formulas/ast.d.ts +60 -60
  56. package/dist/types/pv/formulas/manual-test.d.ts +1 -1
  57. package/dist/types/pv/sim.d.ts +60 -60
  58. package/dist/types/rules.d.ts +26 -26
  59. package/dist/types/scale.d.ts +39 -39
  60. package/dist/types/scripting/ActionWrapper.d.ts +12 -0
  61. package/dist/types/scripting/ArrayList.d.ts +5 -0
  62. package/dist/types/scripting/ColorFontUtil.d.ts +19 -19
  63. package/dist/types/scripting/ConsoleUtil.d.ts +8 -8
  64. package/dist/types/scripting/DataUtil.d.ts +6 -6
  65. package/dist/types/scripting/DisplayWrapper.d.ts +9 -7
  66. package/dist/types/scripting/FileUtil.d.ts +6 -6
  67. package/dist/types/scripting/GUIUtil.d.ts +11 -8
  68. package/dist/types/scripting/Java.d.ts +84 -18
  69. package/dist/types/scripting/MessageDialog.d.ts +8 -5
  70. package/dist/types/scripting/PVUtil.d.ts +19 -16
  71. package/dist/types/scripting/PVWrapper.d.ts +11 -10
  72. package/dist/types/scripting/ScriptEngine.d.ts +12 -8
  73. package/dist/types/scripting/ScriptUtil.d.ts +7 -7
  74. package/dist/types/scripting/SpreadSheetTable.d.ts +43 -36
  75. package/dist/types/scripting/SpreadSheetTableWrapper.d.ts +30 -0
  76. package/dist/types/scripting/TableWrapper.d.ts +10 -9
  77. package/dist/types/scripting/WidgetWrapper.d.ts +28 -25
  78. package/dist/types/scripting/XYGraphWrapper.d.ts +9 -9
  79. package/dist/types/scripting/utils.d.ts +4 -3
  80. package/dist/types/scripts.d.ts +19 -19
  81. package/dist/types/utils.d.ts +2 -2
  82. package/dist/types/widgets/controls/ActionButton.d.ts +23 -21
  83. package/dist/types/widgets/controls/BooleanButton.d.ts +37 -37
  84. package/dist/types/widgets/controls/BooleanSwitch.d.ts +32 -32
  85. package/dist/types/widgets/controls/CheckBox.d.ts +24 -24
  86. package/dist/types/widgets/controls/ChoiceButton.d.ts +23 -23
  87. package/dist/types/widgets/controls/Combo.d.ts +20 -20
  88. package/dist/types/widgets/controls/ImageBooleanButton.d.ts +33 -33
  89. package/dist/types/widgets/controls/MenuButton.d.ts +18 -18
  90. package/dist/types/widgets/controls/NativeButton.d.ts +9 -9
  91. package/dist/types/widgets/controls/RadioBox.d.ts +26 -26
  92. package/dist/types/widgets/controls/Scrollbar.d.ts +51 -51
  93. package/dist/types/widgets/controls/TextInput.d.ts +27 -27
  94. package/dist/types/widgets/figures/Ramp.d.ts +36 -36
  95. package/dist/types/widgets/graphics/Arc.d.ts +15 -15
  96. package/dist/types/widgets/graphics/Ellipse.d.ts +20 -20
  97. package/dist/types/widgets/graphics/ImageHelper.d.ts +3 -3
  98. package/dist/types/widgets/graphics/ImageWidget.d.ts +19 -19
  99. package/dist/types/widgets/graphics/Label.d.ts +15 -15
  100. package/dist/types/widgets/graphics/Polygon.d.ts +19 -19
  101. package/dist/types/widgets/graphics/Polyline.d.ts +20 -20
  102. package/dist/types/widgets/graphics/Rectangle.d.ts +20 -20
  103. package/dist/types/widgets/graphics/RoundedRectangle.d.ts +22 -22
  104. package/dist/types/widgets/monitors/ByteMonitor.d.ts +27 -27
  105. package/dist/types/widgets/monitors/Gauge.d.ts +40 -40
  106. package/dist/types/widgets/monitors/ImageBooleanIndicator.d.ts +25 -25
  107. package/dist/types/widgets/monitors/IntensityGraph.d.ts +43 -43
  108. package/dist/types/widgets/monitors/LED.d.ts +37 -37
  109. package/dist/types/widgets/monitors/LinearScale.d.ts +66 -66
  110. package/dist/types/widgets/monitors/Meter.d.ts +39 -39
  111. package/dist/types/widgets/monitors/ProgressBar.d.ts +64 -64
  112. package/dist/types/widgets/monitors/Tank.d.ts +52 -52
  113. package/dist/types/widgets/monitors/TextUpdate.d.ts +17 -17
  114. package/dist/types/widgets/monitors/Thermometer.d.ts +58 -58
  115. package/dist/types/widgets/monitors/xygraph/Axis.d.ts +41 -41
  116. package/dist/types/widgets/monitors/xygraph/CommandBuffer.d.ts +26 -26
  117. package/dist/types/widgets/monitors/xygraph/PlotAreaRegion.d.ts +22 -22
  118. package/dist/types/widgets/monitors/xygraph/Trace.d.ts +38 -38
  119. package/dist/types/widgets/monitors/xygraph/TraceBuffer.d.ts +32 -32
  120. package/dist/types/widgets/monitors/xygraph/XYGraph.d.ts +44 -44
  121. package/dist/types/widgets/monitors/xygraph/XYGraphToolbar.d.ts +54 -54
  122. package/dist/types/widgets/others/AbstractContainerWidget.d.ts +21 -21
  123. package/dist/types/widgets/others/Connection.d.ts +39 -39
  124. package/dist/types/widgets/others/DisplayWidget.d.ts +13 -13
  125. package/dist/types/widgets/others/GroupingContainer.d.ts +8 -8
  126. package/dist/types/widgets/others/LinkingContainer.d.ts +19 -19
  127. package/dist/types/widgets/others/TabbedContainer.d.ts +24 -24
  128. package/dist/types/widgets/others/Table.d.ts +22 -22
  129. package/dist/types/widgets/others/WebBrowser.d.ts +14 -14
  130. package/package.json +5 -10
  131. package/dist/fonts/LiberationMono-Bold.woff +0 -0
  132. package/dist/fonts/LiberationMono-BoldItalic.woff +0 -0
  133. package/dist/fonts/LiberationMono-Italic.woff +0 -0
  134. package/dist/fonts/LiberationMono-Regular.woff +0 -0
  135. package/dist/fonts/LiberationSans-Bold.woff +0 -0
  136. package/dist/fonts/LiberationSans-BoldItalic.woff +0 -0
  137. package/dist/fonts/LiberationSans-Italic.woff +0 -0
  138. package/dist/fonts/LiberationSans-Regular.woff +0 -0
  139. package/dist/fonts/LiberationSerif-Bold.woff +0 -0
  140. package/dist/fonts/LiberationSerif-BoldItalic.woff +0 -0
  141. package/dist/fonts/LiberationSerif-Italic.woff +0 -0
  142. package/dist/fonts/LiberationSerif-Regular.woff +0 -0
  143. package/dist/fonts/stylesheet.css +0 -83
  144. package/dist/opi.umd.js +0 -2
  145. package/dist/opi.umd.js.map +0 -1
@@ -1,112 +1,118 @@
1
- import { ActionSet } from './actions';
2
- import { Color } from './Color';
3
- import { Display } from './Display';
4
- import { Graphics } from './Graphics';
5
- import { Bounds } from './positioning';
6
- import { PropertyListener, PropertySet } from './properties';
7
- import { PV } from './pv/PV';
8
- import { RuleSet } from './rules';
9
- import { ScaleOptions } from './scale';
10
- import { ScriptSet } from './scripts';
11
- import { AbstractContainerWidget } from './widgets/others/AbstractContainerWidget';
12
- import { XMLNode } from './XMLNode';
13
- export declare abstract class Widget {
14
- readonly display: Display;
15
- readonly parent?: AbstractContainerWidget | undefined;
16
- x: number;
17
- y: number;
18
- width: number;
19
- height: number;
20
- private _value;
21
- protected fillRoundRectangleBackgroundBorder: boolean;
22
- private holderRegion?;
23
- properties: PropertySet;
24
- readonly vars: Map<string, any>;
25
- constructor(display: Display, parent?: AbstractContainerWidget | undefined);
26
- parseNode(node: XMLNode): void;
27
- drawHolder(g: Graphics): void;
28
- beforeDrawBorder(g: Graphics): void;
29
- private drawBorderStyle;
30
- drawDecoration(g: Graphics): void;
31
- drawOverlay(g: Graphics): void;
32
- drawSelection(ctx: CanvasRenderingContext2D): void;
33
- requestRepaint(): void;
34
- resolvePath(path: string): string;
35
- /**
36
- * Bounds of this widget (within its parent).
37
- * Bounds cover the entire widget: area + ornaments.
38
- */
39
- get bounds(): Bounds;
40
- get unscaledBounds(): Bounds;
41
- /**
42
- * Area where the widget can draw.
43
- * (this is smaller than the actual widget bounds).
44
- */
45
- get area(): Bounds;
46
- private drawShadowBorder;
47
- private drawDashedBorder;
48
- executeAction(index: number): void;
49
- expandMacro(text: string): string;
50
- get pv(): PV | undefined;
51
- isMinorSeverity(): boolean;
52
- isMajorSeverity(): boolean;
53
- get alarm(): boolean;
54
- get alarmSensitiveBackgroundColor(): Color;
55
- get alarmSensitiveForegroundColor(): Color;
56
- get scale(): number;
57
- get value(): any;
58
- set value(value: any);
59
- addPropertyListener(propertyName: string, listener: PropertyListener<any>): void;
60
- removePropertyListener(propertyName: string, listener: PropertyListener<any>): void;
61
- /**
62
- * Returns this widget as an image.
63
- */
64
- toDataURL(type?: string, quality?: any): string;
65
- get wuid(): string;
66
- get name(): string;
67
- get holderX(): number;
68
- get holderY(): number;
69
- get holderWidth(): number;
70
- get holderHeight(): number;
71
- get borderAlarmSensitive(): boolean;
72
- get backgroundAlarmSensitive(): boolean;
73
- get foregroundAlarmSensitive(): boolean;
74
- get pvName(): string | undefined;
75
- get pvValue(): any;
76
- get borderColor(): Color;
77
- get borderStyle(): number;
78
- get borderWidth(): number;
79
- get backgroundColor(): Color;
80
- get enabled(): boolean;
81
- get foregroundColor(): Color;
82
- get tooltip(): string | undefined;
83
- get transparent(): boolean;
84
- get visible(): boolean;
85
- get actions(): ActionSet;
86
- get scripts(): ScriptSet;
87
- get rules(): RuleSet;
88
- get scaleOptions(): ScaleOptions;
89
- get widgetType(): string | undefined;
90
- get text(): string;
91
- /**
92
- * Called exactly once post-construct. A destroyed widget will
93
- * never be re-inited.
94
- */
95
- init(): void;
96
- /**
97
- * Called when a widget should temporarily hide content
98
- * (tab switch).
99
- *
100
- * Most widgets don't need to override, but it used by some
101
- * that position HTML on top of the canvas.
102
- *
103
- * Unhide should occur upon the next draw request.
104
- */
105
- hide(): void;
106
- /**
107
- * Called when a widget will never be used again.
108
- * (display close).
109
- */
110
- destroy(): void;
111
- abstract draw(g: Graphics): void;
112
- }
1
+ import { ActionSet } from "./actions";
2
+ import { Action } from "./actions/Action";
3
+ import { Color } from "./Color";
4
+ import { Display } from "./Display";
5
+ import { Graphics } from "./Graphics";
6
+ import { Bounds } from "./positioning";
7
+ import { PropertyListener, PropertySet } from "./properties";
8
+ import { PV } from "./pv/PV";
9
+ import { RuleSet } from "./rules";
10
+ import { ScaleOptions } from "./scale";
11
+ import { ScriptSet } from "./scripts";
12
+ import { AbstractContainerWidget } from "./widgets/others/AbstractContainerWidget";
13
+ import { XMLNode } from "./XMLNode";
14
+ export declare abstract class Widget {
15
+ readonly display: Display;
16
+ readonly parent?: AbstractContainerWidget | undefined;
17
+ x: number;
18
+ y: number;
19
+ width: number;
20
+ height: number;
21
+ private _value;
22
+ protected fillRoundRectangleBackgroundBorder: boolean;
23
+ private holderRegion?;
24
+ properties: PropertySet;
25
+ readonly vars: Map<string, any>;
26
+ private pvs;
27
+ constructor(display: Display, parent?: AbstractContainerWidget | undefined);
28
+ parseNode(node: XMLNode): void;
29
+ getHookedActions(): Action[];
30
+ drawHolder(g: Graphics): void;
31
+ beforeDrawBorder(g: Graphics): void;
32
+ private drawBorderStyle;
33
+ private isDisconnected;
34
+ drawDecoration(g: Graphics): void;
35
+ drawOverlay(g: Graphics): void;
36
+ drawSelection(ctx: CanvasRenderingContext2D): void;
37
+ requestRepaint(): void;
38
+ resolvePath(path: string): string;
39
+ /**
40
+ * Bounds of this widget (within its parent).
41
+ * Bounds cover the entire widget: area + ornaments.
42
+ */
43
+ get bounds(): Bounds;
44
+ get unscaledBounds(): Bounds;
45
+ /**
46
+ * Area where the widget can draw.
47
+ * (this is smaller than the actual widget bounds).
48
+ */
49
+ get area(): Bounds;
50
+ private drawShadowBorder;
51
+ private drawDashedBorder;
52
+ executeActionByIndex(index: number): void;
53
+ executeAction(action: Action): void;
54
+ expandMacro(text: string): string;
55
+ private loadFont;
56
+ get pv(): PV | undefined;
57
+ isMinorSeverity(): boolean;
58
+ isMajorSeverity(): boolean;
59
+ get alarm(): boolean;
60
+ get alarmSensitiveBackgroundColor(): Color;
61
+ get alarmSensitiveForegroundColor(): Color;
62
+ get scale(): number;
63
+ get value(): any;
64
+ set value(value: any);
65
+ addPropertyListener(propertyName: string, listener: PropertyListener<any>): void;
66
+ removePropertyListener(propertyName: string, listener: PropertyListener<any>): void;
67
+ /**
68
+ * Returns this widget as an image.
69
+ */
70
+ toDataURL(type?: string, quality?: any): string;
71
+ get wuid(): string;
72
+ get name(): string;
73
+ get holderX(): number;
74
+ get holderY(): number;
75
+ get holderWidth(): number;
76
+ get holderHeight(): number;
77
+ get borderAlarmSensitive(): boolean;
78
+ get backgroundAlarmSensitive(): boolean;
79
+ get foregroundAlarmSensitive(): boolean;
80
+ get pvName(): string | undefined;
81
+ get pvValue(): any;
82
+ get borderColor(): Color;
83
+ get borderStyle(): number;
84
+ get borderWidth(): number;
85
+ get backgroundColor(): Color;
86
+ get enabled(): boolean;
87
+ get foregroundColor(): Color;
88
+ get tooltip(): string | undefined;
89
+ get transparent(): boolean;
90
+ get visible(): boolean;
91
+ get actions(): ActionSet;
92
+ get scripts(): ScriptSet;
93
+ get rules(): RuleSet;
94
+ get scaleOptions(): ScaleOptions;
95
+ get widgetType(): string | undefined;
96
+ get text(): string;
97
+ /**
98
+ * Called exactly once post-construct. A destroyed widget will
99
+ * never be re-inited.
100
+ */
101
+ init(): void;
102
+ /**
103
+ * Called when a widget should temporarily hide content
104
+ * (tab switch).
105
+ *
106
+ * Most widgets don't need to override, but it used by some
107
+ * that position HTML on top of the canvas.
108
+ *
109
+ * Unhide should occur upon the next draw request.
110
+ */
111
+ hide(): void;
112
+ /**
113
+ * Called when a widget will never be used again.
114
+ * (display close).
115
+ */
116
+ destroy(): void;
117
+ abstract draw(g: Graphics): void;
118
+ }
@@ -1,83 +1,83 @@
1
- import { ActionSet } from './actions';
2
- import { Color } from './Color';
3
- import { ColorMap } from './ColorMap';
4
- import { Font } from './Font';
5
- import { MacroSet } from './macros';
6
- import { RuleSet } from './rules';
7
- import { AutoScaleWidgets, ScaleOptions } from './scale';
8
- import { ScriptSet } from './scripts';
9
- export declare class XMLNode {
10
- private node;
11
- constructor(node: Node);
12
- get name(): string;
13
- static parseFromXML(xml: string): XMLNode;
14
- /**
15
- * Searches for a direct child with the specified name.
16
- *
17
- * @throws when no such child was found
18
- */
19
- getNode(name: string): XMLNode;
20
- /**
21
- * Searches for all direct children with the specified name.
22
- * If this name is undefined, all children are returned.
23
- */
24
- getNodes(name?: string): XMLNode[];
25
- hasNode(name: string): boolean;
26
- hasAttribute(name: string): boolean;
27
- /**
28
- * Returns the inner content of this node as a string
29
- */
30
- getTextContent(defaultValue?: string): string;
31
- /**
32
- * Parses the child node contents of the given parent node as a string.
33
- *
34
- * @throws when no such child was found and defaultValue was undefined
35
- */
36
- getString(name: string, defaultValue?: string): string;
37
- getStringAttribute(name: string): string;
38
- /**
39
- * Parses the child node contents of the given parent node as a float.
40
- *
41
- * @throws when no such child was found and defaultValue was undefined.
42
- */
43
- getFloat(name: string, defaultValue?: number): number;
44
- /**
45
- * Parses the child node contents of the given parent node as an integer.
46
- *
47
- * @throws when no such child was found and defaultValue was undefined.
48
- */
49
- getInt(name: string, defaultValue?: number): number;
50
- getIntAttribute(name: string): number;
51
- /**
52
- * Parses the child node contents of the given parent node as a boolean.
53
- *
54
- * @throws when no such child was found and defaultValue was undefined.
55
- */
56
- getBoolean(name: string, defaultValue?: boolean): boolean;
57
- getBooleanAttribute(name: string, defaultValue?: boolean): boolean;
58
- /**
59
- * Parses the child node contents as a color.
60
- *
61
- * @throws when no such child was found and defaultValue was undefined.
62
- */
63
- getColor(name: string, defaultValue?: Color): Color;
64
- /**
65
- * Parses the child node contents as a font.
66
- */
67
- getFont(name: string): Font;
68
- getPoints(name: string): {
69
- x: number;
70
- y: number;
71
- }[];
72
- getStringList(name: string): string[];
73
- getStringTable(name: string): string[][];
74
- getScripts(name: string): ScriptSet;
75
- getScaleOptions(name: string): ScaleOptions;
76
- getAutoScaleWidgets(name: string): AutoScaleWidgets;
77
- getColorMap(name: string): ColorMap | undefined;
78
- getRules(name: string): RuleSet;
79
- getMacros(name: string): MacroSet;
80
- getActions(name: string): ActionSet;
81
- private parseColorNode;
82
- private findChild;
83
- }
1
+ import { ActionSet } from "./actions";
2
+ import { Color } from "./Color";
3
+ import { ColorMap } from "./ColorMap";
4
+ import { Font } from "./Font";
5
+ import { MacroSet } from "./macros";
6
+ import { RuleSet } from "./rules";
7
+ import { AutoScaleWidgets, ScaleOptions } from "./scale";
8
+ import { ScriptSet } from "./scripts";
9
+ export declare class XMLNode {
10
+ private node;
11
+ constructor(node: Node);
12
+ get name(): string;
13
+ static parseFromXML(xml: string): XMLNode;
14
+ /**
15
+ * Searches for a direct child with the specified name.
16
+ *
17
+ * @throws when no such child was found
18
+ */
19
+ getNode(name: string): XMLNode;
20
+ /**
21
+ * Searches for all direct children with the specified name.
22
+ * If this name is undefined, all children are returned.
23
+ */
24
+ getNodes(name?: string): XMLNode[];
25
+ hasNode(name: string): boolean;
26
+ hasAttribute(name: string): boolean;
27
+ /**
28
+ * Returns the inner content of this node as a string
29
+ */
30
+ getTextContent(defaultValue?: string): string;
31
+ /**
32
+ * Parses the child node contents of the given parent node as a string.
33
+ *
34
+ * @throws when no such child was found and defaultValue was undefined
35
+ */
36
+ getString(name: string, defaultValue?: string): string;
37
+ getStringAttribute(name: string): string;
38
+ /**
39
+ * Parses the child node contents of the given parent node as a float.
40
+ *
41
+ * @throws when no such child was found and defaultValue was undefined.
42
+ */
43
+ getFloat(name: string, defaultValue?: number): number;
44
+ /**
45
+ * Parses the child node contents of the given parent node as an integer.
46
+ *
47
+ * @throws when no such child was found and defaultValue was undefined.
48
+ */
49
+ getInt(name: string, defaultValue?: number): number;
50
+ getIntAttribute(name: string): number;
51
+ /**
52
+ * Parses the child node contents of the given parent node as a boolean.
53
+ *
54
+ * @throws when no such child was found and defaultValue was undefined.
55
+ */
56
+ getBoolean(name: string, defaultValue?: boolean): boolean;
57
+ getBooleanAttribute(name: string, defaultValue?: boolean): boolean;
58
+ /**
59
+ * Parses the child node contents as a color.
60
+ *
61
+ * @throws when no such child was found and defaultValue was undefined.
62
+ */
63
+ getColor(name: string, defaultValue?: Color): Color;
64
+ /**
65
+ * Parses the child node contents as a font.
66
+ */
67
+ getFont(name: string): Font;
68
+ getPoints(name: string): {
69
+ x: number;
70
+ y: number;
71
+ }[];
72
+ getStringList(name: string): string[];
73
+ getStringTable(name: string): string[][];
74
+ getScripts(name: string): ScriptSet;
75
+ getScaleOptions(name: string): ScaleOptions;
76
+ getAutoScaleWidgets(name: string): AutoScaleWidgets;
77
+ getColorMap(name: string): ColorMap | undefined;
78
+ getRules(name: string): RuleSet;
79
+ getMacros(name: string): MacroSet;
80
+ getActions(name: string): ActionSet;
81
+ private parseColorNode;
82
+ private findChild;
83
+ }
@@ -0,0 +1,10 @@
1
+ import { PropertySet } from "../properties";
2
+ import { Widget } from "../Widget";
3
+ import { XMLNode } from "../XMLNode";
4
+ export declare abstract class Action {
5
+ properties: PropertySet;
6
+ constructor();
7
+ parseNode(node: XMLNode): void;
8
+ abstract execute(widget: Widget): void;
9
+ get description(): string;
10
+ }
@@ -0,0 +1,10 @@
1
+ import { Widget } from "../Widget";
2
+ import { Action } from "./Action";
3
+ export declare class ExecuteCommandAction extends Action {
4
+ constructor();
5
+ execute(widget: Widget): void;
6
+ get command(): string;
7
+ get commandDirectory(): string;
8
+ get waitTime(): number;
9
+ toString(): string;
10
+ }
@@ -0,0 +1,10 @@
1
+ import { Widget } from "../Widget";
2
+ import { Action } from "./Action";
3
+ export declare class ExecuteJavaScriptAction extends Action {
4
+ constructor();
5
+ execute(widget: Widget): void;
6
+ get path(): string;
7
+ get embedded(): boolean;
8
+ get scriptText(): string;
9
+ toString(): string;
10
+ }
@@ -0,0 +1,11 @@
1
+ import { MacroSet } from "../macros";
2
+ import { Widget } from "../Widget";
3
+ import { Action } from "./Action";
4
+ export declare class OpenDisplayAction extends Action {
5
+ constructor();
6
+ execute(widget: Widget): void;
7
+ get macros(): MacroSet;
8
+ get path(): string;
9
+ get mode(): number;
10
+ toString(): string;
11
+ }
@@ -0,0 +1,8 @@
1
+ import { Widget } from "../Widget";
2
+ import { Action } from "./Action";
3
+ export declare class OpenFileAction extends Action {
4
+ constructor();
5
+ execute(widget: Widget): void;
6
+ get path(): string;
7
+ toString(): string;
8
+ }
@@ -0,0 +1,8 @@
1
+ import { Widget } from "../Widget";
2
+ import { Action } from "./Action";
3
+ export declare class OpenWebpageAction extends Action {
4
+ constructor();
5
+ execute(widget: Widget): void;
6
+ get hyperlink(): string;
7
+ toString(): string;
8
+ }
@@ -0,0 +1,8 @@
1
+ import { Widget } from "../Widget";
2
+ import { Action } from "./Action";
3
+ export declare class PlaySoundAction extends Action {
4
+ constructor();
5
+ execute(widget: Widget): void;
6
+ get path(): string;
7
+ toString(): string;
8
+ }
@@ -0,0 +1,11 @@
1
+ import { Widget } from "../Widget";
2
+ import { Action } from "./Action";
3
+ export declare class WritePVAction extends Action {
4
+ constructor();
5
+ execute(widget: Widget): void;
6
+ get pvName(): string;
7
+ get value(): string;
8
+ get timeout(): number;
9
+ get confirmMessage(): string;
10
+ toString(): string;
11
+ }
@@ -1,64 +1,10 @@
1
- export declare class ActionSet {
2
- actions: (Action | null)[];
3
- hookFirstActionToClick: boolean;
4
- hookAllActionsToClick: boolean;
5
- add(action: Action | null): void;
6
- isClickable(): boolean | 0;
7
- getAction(index: number): Action | null | undefined;
8
- getClickActions(): number[];
9
- toString(): string;
10
- }
11
- declare type Action = ExecuteCommandAction | ExecuteJavaScriptAction | OpenDisplayAction | OpenFileAction | OpenWebpageAction | WritePVAction | PlaySoundAction;
12
- export declare class OpenDisplayAction {
13
- path: string;
14
- readonly type = "OPEN_DISPLAY";
15
- mode?: number;
16
- description?: string;
17
- constructor(path: string);
18
- toString(): string;
19
- }
20
- export declare class OpenFileAction {
21
- readonly type = "OPEN_FILE";
22
- path?: string;
23
- description?: string;
24
- toString(): string;
25
- }
26
- export declare class ExecuteJavaScriptAction {
27
- embedded: boolean;
28
- readonly type = "EXECUTE_JAVASCRIPT";
29
- text?: string;
30
- path?: string;
31
- description?: string;
32
- constructor(embedded: boolean);
33
- toString(): string;
34
- }
35
- export declare class ExecuteCommandAction {
36
- readonly type = "EXECUTE_CMD";
37
- command?: string;
38
- commandDirectory?: string;
39
- waitTime?: number;
40
- description?: string;
41
- toString(): string;
42
- }
43
- export declare class WritePVAction {
44
- pvName: string;
45
- value: string;
46
- readonly type = "WRITE_PV";
47
- confirmMessage?: string;
48
- description?: string;
49
- constructor(pvName: string, value: string);
50
- toString(): string;
51
- }
52
- export declare class PlaySoundAction {
53
- readonly type = "PLAY_SOUND";
54
- path?: string;
55
- description?: string;
56
- toString(): string;
57
- }
58
- export declare class OpenWebpageAction {
59
- readonly type = "OPEN_WEBPAGE";
60
- hyperlink?: string;
61
- description?: string;
62
- toString(): string;
63
- }
64
- export {};
1
+ import { Action } from "./actions/Action";
2
+ export declare class ActionSet {
3
+ actions: (Action | null)[];
4
+ hookFirstActionToClick: boolean;
5
+ hookAllActionsToClick: boolean;
6
+ add(action: Action | null): void;
7
+ isClickable(): boolean | 0;
8
+ getAction(index: number): Action | null | undefined;
9
+ toString(): string;
10
+ }
@@ -1,41 +1,41 @@
1
- export interface OPIEvent {
2
- detail?: any;
3
- }
4
- export interface OPIEventMap {
5
- [index: string]: OPIEvent;
6
- 'closedisplay': CloseDisplayEvent;
7
- 'opendisplay': OpenDisplayEvent;
8
- 'openpv': OpenPVEvent;
9
- 'selection': SelectionEvent;
10
- 'scale': ScaleEvent;
11
- }
12
- export interface SelectionEvent extends OPIEvent {
13
- selected: string[];
14
- }
15
- /**
16
- * A script or a button requested to open another display.
17
- */
18
- export interface OpenDisplayEvent extends OPIEvent {
19
- path: string;
20
- replace: boolean;
21
- }
22
- /**
23
- * The user has selected a widget with a navigable PV.
24
- */
25
- export interface OpenPVEvent extends OPIEvent {
26
- pvName: string;
27
- }
28
- /**
29
- * A script or a button requested to close the current display.
30
- */
31
- export interface CloseDisplayEvent extends OPIEvent {
32
- }
33
- /**
34
- * This display scale has changed.
35
- */
36
- export interface ScaleEvent extends OPIEvent {
37
- scale: number;
38
- }
39
- export declare type OPIEventHandlers = {
40
- [index: string]: Array<(ev: OPIEvent) => void>;
41
- };
1
+ export interface OPIEvent {
2
+ detail?: any;
3
+ }
4
+ export interface OPIEventMap {
5
+ [index: string]: OPIEvent;
6
+ closedisplay: CloseDisplayEvent;
7
+ opendisplay: OpenDisplayEvent;
8
+ openpv: OpenPVEvent;
9
+ selection: SelectionEvent;
10
+ scale: ScaleEvent;
11
+ }
12
+ export interface SelectionEvent extends OPIEvent {
13
+ selected: string[];
14
+ }
15
+ /**
16
+ * A script or a button requested to open another display.
17
+ */
18
+ export interface OpenDisplayEvent extends OPIEvent {
19
+ path: string;
20
+ replace: boolean;
21
+ }
22
+ /**
23
+ * The user has selected a widget with a navigable PV.
24
+ */
25
+ export interface OpenPVEvent extends OPIEvent {
26
+ pvName: string;
27
+ }
28
+ /**
29
+ * A script or a button requested to close the current display.
30
+ */
31
+ export interface CloseDisplayEvent extends OPIEvent {
32
+ }
33
+ /**
34
+ * This display scale has changed.
35
+ */
36
+ export interface ScaleEvent extends OPIEvent {
37
+ scale: number;
38
+ }
39
+ export type OPIEventHandlers = {
40
+ [index: string]: Array<(ev: OPIEvent) => void>;
41
+ };