swing-ui 0.1.25 → 1.0.3
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 +5 -4
- package/README.md +144 -7
- package/SwingUI.js +2611 -0
- package/classes/Arc.js +185 -0
- package/classes/Button.js +55 -0
- package/classes/CheckBox.js +33 -0
- package/classes/CheckBoxMenuItem.js +24 -0
- package/classes/ComboBox.js +329 -0
- package/classes/ComponentContainer.js +828 -0
- package/classes/ContextMenu.js +141 -0
- package/classes/DocumentEditor.js +168 -0
- package/classes/Ellipse.js +76 -0
- package/classes/InternalWindow.js +397 -0
- package/classes/InternalWindowContainer.js +93 -0
- package/classes/Label.js +52 -0
- package/classes/Line.js +105 -0
- package/classes/List.js +452 -0
- package/classes/MediaPlayer.js +504 -0
- package/classes/Menu.js +74 -0
- package/classes/MenuBar.js +56 -0
- package/classes/MenuItem.js +92 -0
- package/classes/Panel.js +50 -0
- package/classes/PasswordField.js +47 -0
- package/classes/Polygon.js +236 -0
- package/classes/Polyline.js +240 -0
- package/classes/ProgressBar.js +62 -0
- package/classes/RadioButton.js +110 -0
- package/classes/RadioButtonMenuItem.js +106 -0
- package/classes/Rectangle.js +199 -0
- package/classes/ScrollPane.js +53 -0
- package/classes/ScrollableComponent.js +141 -0
- package/classes/Separator.js +24 -0
- package/classes/Shape.js +584 -0
- package/classes/ShapeContainer.js +231 -0
- package/classes/Slider.js +172 -0
- package/classes/Spinner.js +172 -0
- package/classes/SplitView.js +82 -0
- package/classes/Stroke.js +115 -0
- package/classes/Table.js +982 -0
- package/classes/Tabs.js +228 -0
- package/classes/TextArea.js +125 -0
- package/classes/TextComponent.js +207 -0
- package/classes/TextField.js +128 -0
- package/classes/TextShape.js +123 -0
- package/classes/ToggleButton.js +147 -0
- package/classes/ToolBar.js +120 -0
- package/classes/TrayIcon.js +54 -0
- package/classes/Tree.js +569 -0
- package/classes/UIComponent.js +2154 -0
- package/classes/Window.js +609 -0
- package/enums.js +298 -0
- package/fonts.conf +32 -0
- package/functions.js +254 -0
- package/icon.png +0 -0
- package/index.js +109 -4
- package/jar/gui-11.jar +0 -0
- package/jar/lib/flatlaf.jar +0 -0
- package/jar/lib/jna.jar +0 -0
- package/package.json +58 -33
- package/typedefs.js +973 -0
- package/types/SwingUI.d.ts +727 -0
- package/types/classes/Arc.d.ts +111 -0
- package/types/classes/Button.d.ts +38 -0
- package/types/classes/CheckBox.d.ts +22 -0
- package/types/classes/CheckBoxMenuItem.d.ts +18 -0
- package/types/classes/ComboBox.d.ts +172 -0
- package/types/classes/ComponentContainer.d.ts +131 -0
- package/types/classes/ContextMenu.d.ts +74 -0
- package/types/classes/DocumentEditor.d.ts +95 -0
- package/types/classes/Ellipse.d.ts +34 -0
- package/types/classes/InternalWindow.d.ts +163 -0
- package/types/classes/InternalWindowContainer.d.ts +36 -0
- package/types/classes/Label.d.ts +33 -0
- package/types/classes/Line.d.ts +48 -0
- package/types/classes/List.d.ts +223 -0
- package/types/classes/MediaPlayer.d.ts +381 -0
- package/types/classes/Menu.d.ts +43 -0
- package/types/classes/MenuBar.d.ts +26 -0
- package/types/classes/MenuItem.d.ts +57 -0
- package/types/classes/Panel.d.ts +28 -0
- package/types/classes/PasswordField.d.ts +22 -0
- package/types/classes/Polygon.d.ts +93 -0
- package/types/classes/Polyline.d.ts +96 -0
- package/types/classes/ProgressBar.d.ts +36 -0
- package/types/classes/RadioButton.d.ts +70 -0
- package/types/classes/RadioButtonMenuItem.d.ts +71 -0
- package/types/classes/Rectangle.d.ts +82 -0
- package/types/classes/ScrollPane.d.ts +23 -0
- package/types/classes/ScrollableComponent.d.ts +81 -0
- package/types/classes/Separator.d.ts +14 -0
- package/types/classes/Shape.d.ts +223 -0
- package/types/classes/ShapeContainer.d.ts +92 -0
- package/types/classes/Slider.d.ts +107 -0
- package/types/classes/Spinner.d.ts +129 -0
- package/types/classes/SplitView.d.ts +47 -0
- package/types/classes/Stroke.d.ts +99 -0
- package/types/classes/Table.d.ts +652 -0
- package/types/classes/Tabs.d.ts +118 -0
- package/types/classes/TextArea.d.ts +45 -0
- package/types/classes/TextComponent.d.ts +136 -0
- package/types/classes/TextField.d.ts +94 -0
- package/types/classes/TextShape.d.ts +73 -0
- package/types/classes/ToggleButton.d.ts +84 -0
- package/types/classes/ToolBar.d.ts +82 -0
- package/types/classes/TrayIcon.d.ts +43 -0
- package/types/classes/Tree.d.ts +354 -0
- package/types/classes/UIComponent.d.ts +966 -0
- package/types/classes/Window.d.ts +334 -0
- package/types/enums.d.ts +437 -0
- package/types/functions.d.ts +109 -0
- package/types/index.d.ts +188 -0
- package/types/typedefs.d.ts +1626 -0
- package/ui-process-manager.js +317 -0
- package/video-devices-linux.sh +72 -0
- package/video-devices-mac.sh +33 -0
- package/CHANGES.md +0 -3
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* An `Arc` shape that extends the {@link Shape} class.
|
|
3
|
+
*
|
|
4
|
+
* An Arc is a portion of a circle defined by its center coordinates, width (horizontal diameter), height (vertical diameter), starting angle, and extent (the angular span of the arc) in degrees.
|
|
5
|
+
*
|
|
6
|
+
* @class
|
|
7
|
+
* @global
|
|
8
|
+
* @see Shape
|
|
9
|
+
*/
|
|
10
|
+
export class Arc extends Shape {
|
|
11
|
+
/**
|
|
12
|
+
* Enum for arc drawing types: Pie and Chord.
|
|
13
|
+
*
|
|
14
|
+
* @readonly
|
|
15
|
+
* @enum {number}
|
|
16
|
+
* @property {number} Chord - Draws the arc as a straight chord between the start and end points.
|
|
17
|
+
* @property {number} Pie - Draws the arc as a pie shape (arc connected to the center).
|
|
18
|
+
* @example
|
|
19
|
+
* Arc.Type.Pie
|
|
20
|
+
*/
|
|
21
|
+
static readonly Type: Readonly<{
|
|
22
|
+
Chord: 1;
|
|
23
|
+
Pie: 2;
|
|
24
|
+
}>;
|
|
25
|
+
/**
|
|
26
|
+
* Creates an instance of Arc shape.
|
|
27
|
+
*
|
|
28
|
+
* @param {Stroke} [stroke] - A border of the shape.
|
|
29
|
+
* @param {string} [background] - Color, gradient, or image background, similar to CSS. Use an empty string to remove the background.
|
|
30
|
+
* @param {number} [opacity] - Opacity of the shape (0 to 1).
|
|
31
|
+
* @param {number} [x] - Horizontal position from the left edge.
|
|
32
|
+
* @param {number} [y] - Vertical position from the top edge.
|
|
33
|
+
* @param {number} [width] - Width of the arc (horizontal diameter).
|
|
34
|
+
* @param {number} [height] - Height of the arc (vertical diameter). If omitted, height will be same as width.
|
|
35
|
+
* @param {number} [startAngle] - Starting angle of the arc (0 to 360 degrees).
|
|
36
|
+
* @param {number} [sweepAngle] - How much the arc is open (0 to 360 degrees).
|
|
37
|
+
* @param {Arc.Type} [type] = Arc type. One of: `Arc.Type.Chord`, `Arc.Type.Pie`.
|
|
38
|
+
*/
|
|
39
|
+
constructor(stroke?: Stroke, background?: string, opacity?: number, x?: number, y?: number, width?: number, height?: number, startAngle?: number, sweepAngle?: number, type?: Readonly<{
|
|
40
|
+
Chord: 1;
|
|
41
|
+
Pie: 2;
|
|
42
|
+
}>);
|
|
43
|
+
_size: {
|
|
44
|
+
width: number;
|
|
45
|
+
height: number;
|
|
46
|
+
};
|
|
47
|
+
_hole_size: {
|
|
48
|
+
width: number;
|
|
49
|
+
height: number;
|
|
50
|
+
};
|
|
51
|
+
_start_angle: number;
|
|
52
|
+
_extent: number;
|
|
53
|
+
_arc_type: 1;
|
|
54
|
+
/**
|
|
55
|
+
* Sets or gets the size of the arc (horizontal and vertical diameter).
|
|
56
|
+
*
|
|
57
|
+
* @param {number|{width:number, height:number}} width - Width of the arc (horizontal diameter), or a size object (e.g., {width:300,height:300}).
|
|
58
|
+
* @param {number} [height] - Height of the arc (vertical diameter).
|
|
59
|
+
* @returns {{width:number, height:number}|Arc} If called without parameters, current size is returned; otherwise this Arc object is returned.
|
|
60
|
+
*/
|
|
61
|
+
size(...args: any[]): {
|
|
62
|
+
width: number;
|
|
63
|
+
height: number;
|
|
64
|
+
} | Arc;
|
|
65
|
+
/**
|
|
66
|
+
* Sets or gets the size of the hollow space inside the arc. The hole make it look more like a donut.
|
|
67
|
+
*
|
|
68
|
+
* @param {number|{width:number, height:number}} width - Width of the hole (horizontal diameter), or a size object (e.g., {width:50,height:50}).
|
|
69
|
+
* @param {number} [height] - Height of the hole (vertical diameter).
|
|
70
|
+
* @returns {{width:number, height:number}|Arc} If called without parameters, current hole size is returned; otherwise this Arc object is returned.
|
|
71
|
+
*/
|
|
72
|
+
holeSize(...args: any[]): {
|
|
73
|
+
width: number;
|
|
74
|
+
height: number;
|
|
75
|
+
} | Arc;
|
|
76
|
+
/**
|
|
77
|
+
* Sets or gets the type of the arc to Arc.Type.Chord or Arc.Type.Pie
|
|
78
|
+
*
|
|
79
|
+
* @param {Arc.Type} [type] - One of the type values: Arc.Type.Pie, Arc.Type.Chord
|
|
80
|
+
* @returns {Arc.Type|Arc} If called without parameters, current type is returned; otherwise this Arc object is returned.
|
|
81
|
+
*/
|
|
82
|
+
type(...args: any[]): Readonly<{
|
|
83
|
+
Chord: 1;
|
|
84
|
+
Pie: 2;
|
|
85
|
+
}> | Arc;
|
|
86
|
+
/**
|
|
87
|
+
* Gets or sets the starting angle of the arc.
|
|
88
|
+
*
|
|
89
|
+
* The starting angle defines where the arc begins, measured in degrees
|
|
90
|
+
* from the positive x-axis in a clockwise direction.
|
|
91
|
+
*
|
|
92
|
+
* @param {number} [angle] - Sets the start angle (0 to 360 degrees).
|
|
93
|
+
* @returns {number|Arc} Returns the current start angle if no parameter is given, otherwise returns the Arc instance for chaining.
|
|
94
|
+
*/
|
|
95
|
+
startAngle(...args: any[]): number | Arc;
|
|
96
|
+
/**
|
|
97
|
+
* Sets or gets how much the arc is open in degrees, between 0 and 360.
|
|
98
|
+
*
|
|
99
|
+
* @param {number} [sweepAngle] - Sweep angle of the opening starting from the start angle (0 and 360).
|
|
100
|
+
* @returns {number|Arc} If called without parameters, current value is returned; otherwise this Arc object is returned.
|
|
101
|
+
*/
|
|
102
|
+
sweepAngle(...args: any[]): number | Arc;
|
|
103
|
+
/**
|
|
104
|
+
* Returns a JSON object that contains this shape properties. It may be converted back to this shape.
|
|
105
|
+
*
|
|
106
|
+
* @param {string} [include="all"] - Specified what to include. "all" is default. Valid values are: "all", "stroke", "background", "points", "basic".
|
|
107
|
+
* @return {object} Returns an object containing this shape's properties.
|
|
108
|
+
*/
|
|
109
|
+
toObject(include?: string): object;
|
|
110
|
+
}
|
|
111
|
+
import { Shape } from "./Shape.js";
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Button UI component that extends UIComponent class.
|
|
3
|
+
* For more methods for this component check UIComponent class.
|
|
4
|
+
* @class
|
|
5
|
+
* @global
|
|
6
|
+
*/
|
|
7
|
+
export class Button extends UIComponent {
|
|
8
|
+
/**
|
|
9
|
+
* Button constructor.
|
|
10
|
+
*
|
|
11
|
+
* @param {string} [text] - Button text
|
|
12
|
+
* @example
|
|
13
|
+
* this.button1 = new Button().text("Click Me");
|
|
14
|
+
* this.button2 = new Button("Click Me");
|
|
15
|
+
*/
|
|
16
|
+
constructor(...args: any[]);
|
|
17
|
+
/**
|
|
18
|
+
* Sets or gets an action command. This command is specified in event object for onAction(e => {alert(e.command);}) event handler.
|
|
19
|
+
* Default value of action command for a Button is it's initial text.
|
|
20
|
+
*
|
|
21
|
+
* @param {string} [command] (Optional)
|
|
22
|
+
* @return {string|Button} If called without arguments, returns `number` value, otherwise returns `this` Button instance.
|
|
23
|
+
* @example
|
|
24
|
+
* const button = new Button("Activate").addTo(window).center();
|
|
25
|
+
* button.command("Activate Motor 1");
|
|
26
|
+
* button.onAction(e => {
|
|
27
|
+
* alert(e.command); // shows a dialog window with a message "Activate Motor 1" when button is clicked.
|
|
28
|
+
* });
|
|
29
|
+
*/
|
|
30
|
+
command(...args: any[]): string | Button;
|
|
31
|
+
/**
|
|
32
|
+
* Returns current size of an icon, or `null` when no icon has been set or icon failed to load.
|
|
33
|
+
* @readonly
|
|
34
|
+
* @type {Size|null}
|
|
35
|
+
*/
|
|
36
|
+
readonly get iconSize(): Size | null;
|
|
37
|
+
}
|
|
38
|
+
import { UIComponent } from "./UIComponent.js";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Check box UI component that extends UIComponent class.
|
|
3
|
+
* For more methods for this component check UIComponent class.
|
|
4
|
+
* @class
|
|
5
|
+
* @global
|
|
6
|
+
*/
|
|
7
|
+
export class CheckBox extends UIComponent {
|
|
8
|
+
/**
|
|
9
|
+
* CheckBox constructor.
|
|
10
|
+
*
|
|
11
|
+
* @param {string} [text] - Text displayed next to the checkbox
|
|
12
|
+
*/
|
|
13
|
+
constructor(...args: any[]);
|
|
14
|
+
/**
|
|
15
|
+
* Sets or gets the selection state of the checkbox.
|
|
16
|
+
*
|
|
17
|
+
* @param {boolean} [selected] - `true` to select, `false` to deselect the checkbox.
|
|
18
|
+
* @return {boolean|CheckBox} If called without arguments, returns `boolean` value, otherwise returns `this` CheckBox instance.
|
|
19
|
+
*/
|
|
20
|
+
selected(...args: any[]): boolean | CheckBox;
|
|
21
|
+
}
|
|
22
|
+
import { UIComponent } from "./UIComponent.js";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Check box menu item UI component that extends MenuItem class.
|
|
3
|
+
* For more methods for this component check MenuItem and UIComponent class.
|
|
4
|
+
* @class
|
|
5
|
+
* @global
|
|
6
|
+
* @see MenuItem
|
|
7
|
+
* @extends MenuItem
|
|
8
|
+
*/
|
|
9
|
+
export class CheckBoxMenuItem extends MenuItem {
|
|
10
|
+
/**
|
|
11
|
+
* Sets or gets boolean indicating whether this component is be selected.
|
|
12
|
+
*
|
|
13
|
+
* @param {boolean} selected - `true` to select, `false` to deselect.
|
|
14
|
+
* @return {CheckBoxMenuItem|boolean} Returns `this` CheckBoxMenuItem instance if argument is provided, otherwise returns `boolean` value.
|
|
15
|
+
*/
|
|
16
|
+
selected(...args: any[]): CheckBoxMenuItem | boolean;
|
|
17
|
+
}
|
|
18
|
+
import { MenuItem } from "./MenuItem.js";
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ComboBox UI component that extends UIComponent class.
|
|
3
|
+
* Check examples below and become familiar with a {@link ListItem} object format.
|
|
4
|
+
* @class
|
|
5
|
+
* @global
|
|
6
|
+
* @see ListItem
|
|
7
|
+
* @example
|
|
8
|
+
*
|
|
9
|
+
* // ListItem object format:
|
|
10
|
+
* ListItem {
|
|
11
|
+
* text: string, // Item text (required only for a new item).
|
|
12
|
+
* id: string|number, // Value that can be used by software logic to identify this item
|
|
13
|
+
* value: string|number, // Additional value to be stored in the item for later use.
|
|
14
|
+
* icon: string, // Absolute or relative path to icon image, base64 encoded image string, or `null` to remove icon.
|
|
15
|
+
* color: string, // Item text color as a 6 character hex encoded color string (e.g. #665500)
|
|
16
|
+
* background: string, // Item background color as a 6 character hex encoded color string (e.g. #665500)
|
|
17
|
+
* tooltip: string, // Tooltip text to show when pointer hover the item. (in List and Tree components only)
|
|
18
|
+
* font: Font // Object{name: string, size: number, bold: boolean, ...}. See complete list of font properties in example of font() method.
|
|
19
|
+
* }
|
|
20
|
+
*/
|
|
21
|
+
export class ComboBox extends TextComponent {
|
|
22
|
+
/**
|
|
23
|
+
* Adds a list item at the end of the list, or inserts the item at specified index.
|
|
24
|
+
*
|
|
25
|
+
* @param {string|number|ListItem} item - List item as a string, number or a {@link ListItem} formatted object.
|
|
26
|
+
* @param {number} [index=undefined] - Integer position at which to add the item.
|
|
27
|
+
* @returns {number} Returns an index of the added item, or -1 if the item was not added.
|
|
28
|
+
* @see ListItem
|
|
29
|
+
* @example
|
|
30
|
+
* const i = combo1.add({text: "New Item", ...more optional properties}); // Adding item as object
|
|
31
|
+
* const i = combo1.add("New Item"); // Adding item as string
|
|
32
|
+
* const i = combo1.add(45); // Adding item as number
|
|
33
|
+
*/
|
|
34
|
+
add(item: string | number | ListItem, index?: number): number;
|
|
35
|
+
/**
|
|
36
|
+
* If index argument is specified, N amount of items starting form specified index will be removed.
|
|
37
|
+
* If called without parameters, this component will be removed from it's parent. See examples below.
|
|
38
|
+
*
|
|
39
|
+
* @param {number} [index=undefined] - Index of the item to remove. If not provided, the component will be removed from its parent.
|
|
40
|
+
* @returns {ComboBox} Returns `this` ComboBox instance for method chaining.
|
|
41
|
+
* @example
|
|
42
|
+
* combo.remove(); // removes the component from it's parent container
|
|
43
|
+
* combo1.remove(4); // removes list item at index 4
|
|
44
|
+
*/
|
|
45
|
+
remove(...args: any[]): ComboBox;
|
|
46
|
+
/**
|
|
47
|
+
* Gets the amount of items in the list.
|
|
48
|
+
* @readonly
|
|
49
|
+
* @type {number}
|
|
50
|
+
*/
|
|
51
|
+
readonly get length(): number;
|
|
52
|
+
/**
|
|
53
|
+
* Gets, sets or updates an item at a specified index. Check usage examples below.
|
|
54
|
+
*
|
|
55
|
+
* @param {number} index - Index of the list item
|
|
56
|
+
* @param {ListItem} [item] - ListItem formatted object. See {@link ListItem} documentation.
|
|
57
|
+
* @param {boolean} [update=false] - `true` to update specified item properties with provided item properties, `false` to replace the item with new one. Default is `false`.
|
|
58
|
+
* @returns {ComboBox|ListItem} If item argument is passed, then `this` ComboBox instance is returned, otherwise item at specified index is returned. If index is out of range, `undefined` is returned.
|
|
59
|
+
* @see ListItem
|
|
60
|
+
* @example
|
|
61
|
+
* const item = combo1.item(3); // gets the item at index 3
|
|
62
|
+
* combo1.item(3, {text: "New text", value:"new value"}); // replaces item at index 3
|
|
63
|
+
* combo1.item(3, {background: "#FF7777"}, true); // changes item's background color at index 3
|
|
64
|
+
*/
|
|
65
|
+
item(index: number, ...args: any[]): ComboBox | ListItem;
|
|
66
|
+
/**
|
|
67
|
+
* Gets a selected item. Returns a selected item as a ListItem formatted object, or `null` if no item is selected.
|
|
68
|
+
*
|
|
69
|
+
* @readonly
|
|
70
|
+
* @type {ListItem|null}
|
|
71
|
+
*/
|
|
72
|
+
readonly get selectedItem(): ListItem | null;
|
|
73
|
+
/**
|
|
74
|
+
* Sets or gets an index of a selected item. Can be used to make an item at certain index to be selected.
|
|
75
|
+
*
|
|
76
|
+
* @param {number} [index] - Index of an item to select. Set -1 to make no item be selected.
|
|
77
|
+
* @returns {ComboBox|number} If index is specified, then `this` component instance is returned, otherwise currently selected index is returned.
|
|
78
|
+
*/
|
|
79
|
+
selectedIndex(...args: any[]): ComboBox | number;
|
|
80
|
+
/**
|
|
81
|
+
* Selects and item that has a specified value, or gets a value of currently selected item.
|
|
82
|
+
*
|
|
83
|
+
* @param {string|number|null} [value] - Value of an item to be selected. Set `null` to make no item selected.
|
|
84
|
+
* @returns {ComboBox|number|string|null} If a `value` is specified, then `this` ComboBox instance is returned, otherwise a value of selected item is returned, or `null` if no item is selected.
|
|
85
|
+
*/
|
|
86
|
+
selectedValue(...args: any[]): ComboBox | number | string | null;
|
|
87
|
+
/**
|
|
88
|
+
* Selects a first item whose `id` property matches provided `id`, or gets an `id` property of currently selected item.
|
|
89
|
+
*
|
|
90
|
+
* @param {string|number} [id] - ID of an item to be selected.
|
|
91
|
+
* @returns {ComboBox|number|string|null} If `id` parameter is specified, then `this` ComboBox instance is returned, otherwise an `id` of selected item is returned, or `null` if no item is selected.
|
|
92
|
+
*/
|
|
93
|
+
selectedID(...args: any[]): ComboBox | number | string | null;
|
|
94
|
+
/**
|
|
95
|
+
*
|
|
96
|
+
* Sets or gets an array of list items. When setting, all existing items in the list will be removed before new ones are added.
|
|
97
|
+
*
|
|
98
|
+
* @param {Array<string|number|ListItem>} [items] - Items as an Array of objects, strings or numbers. Can be a mix of these types. For item Object's format check out add() method example .
|
|
99
|
+
* @returns {ComboBox|Array<ListItem>} When getting, an Array is returned, otherwise `this` component instance is returned.
|
|
100
|
+
*/
|
|
101
|
+
items(...args: any[]): ComboBox | Array<ListItem>;
|
|
102
|
+
/**
|
|
103
|
+
* Removes all items.
|
|
104
|
+
* @return {ComboBox} Returns `this` component instance.
|
|
105
|
+
*/
|
|
106
|
+
clear(): ComboBox;
|
|
107
|
+
/**
|
|
108
|
+
* Shows or hides the popup list, or get a boolean whether the popup is visible.
|
|
109
|
+
*
|
|
110
|
+
* @param {bool} [visible] - `true` to show, `false` to hide.
|
|
111
|
+
* @return {ComboBox|boolean} Returns `this` component instance if argument is passed, otherwise returns `boolean` value indication if the popup list is currently visible.
|
|
112
|
+
*/
|
|
113
|
+
open(...args: any[]): ComboBox | boolean;
|
|
114
|
+
/**
|
|
115
|
+
* Registers, unregisters and gets a list of handler functions for the popup list events (when the popup becomes visible and hidden).
|
|
116
|
+
*
|
|
117
|
+
* @param {function(PopupEvent):any} [callback] - Handler function receiving {@link PopupEvent} object. Pass `null` to unregister all handler callbacks.
|
|
118
|
+
* @param {boolean} [remove] - Set to `true` to unregister the handler function.
|
|
119
|
+
* @return {function[]|ComboBox} Returns an array of registered handler functions if arguments are omitted, otherwise returns `this` component instance.
|
|
120
|
+
* @see PopupEvent
|
|
121
|
+
* @example
|
|
122
|
+
* // event Object format:
|
|
123
|
+
* const e = {
|
|
124
|
+
* target: object, // The component that triggered the event.
|
|
125
|
+
* type: string, // `show`, `hide`, `cancel`.
|
|
126
|
+
* x: number, // Component's X position
|
|
127
|
+
* y: number, // Component's Y position
|
|
128
|
+
* interactive: boolean, // Indicates if the popup was triggered by user's interaction (not programmatically).
|
|
129
|
+
* };
|
|
130
|
+
*/
|
|
131
|
+
onPopupEvents(callback?: (arg0: PopupEvent) => any, ...args: any[]): Function[] | ComboBox;
|
|
132
|
+
/**
|
|
133
|
+
* Sets or gets the maximum number of items to show in a popup list without having to scroll.
|
|
134
|
+
*
|
|
135
|
+
* @param {number} size - Defines the maximum amount of items that should be visible in the popup list without having to scroll.
|
|
136
|
+
* @return {ComboBox|number} Returns `number` value if argument is omitted, otherwise returns `this` component instance.
|
|
137
|
+
*/
|
|
138
|
+
popupSize(...args: any[]): ComboBox | number;
|
|
139
|
+
/**
|
|
140
|
+
* Gets or sets a padding for each item in the list. See example below.
|
|
141
|
+
*
|
|
142
|
+
* @param {number|string} padding - Number for same padding on all sides, string to specify padding for each side "top right bottom left"
|
|
143
|
+
* @return {string|List} Returns `this` component instance if at least one argument is provided, otherwise returns current padding.
|
|
144
|
+
* @example
|
|
145
|
+
* combobox.itemPadding(3); // defines same padding for top, right, bottom and left.
|
|
146
|
+
* combobox.itemPadding("5 0 5 3"); // defines padding for each side separately, top=5, right=0, bottom=5 and left=3.
|
|
147
|
+
* const padding = combobox.itemPadding(); // gets the padding object
|
|
148
|
+
*/
|
|
149
|
+
itemPadding(...args: any[]): string | List;
|
|
150
|
+
/**
|
|
151
|
+
* Finds first item whose text matches the string argument. If item is {text: "First Item", value: "item1"}, it should be found by passing value "First Item".
|
|
152
|
+
*
|
|
153
|
+
* @param {string} value - Search by this text
|
|
154
|
+
* @return {ListItem[]} Returns an array of found items. Each found item will have an `index` property fo convenience.
|
|
155
|
+
*/
|
|
156
|
+
findByText(value: string): ListItem[];
|
|
157
|
+
/**
|
|
158
|
+
* Finds first item whose value matches the argument. If item is {text: "First Item", value: "item1", id: 1}, it should be found by passing value "item1".
|
|
159
|
+
*
|
|
160
|
+
* @param {string|number} value - Search by this text or number
|
|
161
|
+
* @return {ListItem[]} Returns an array of found items. Each found item will have an `index` property fo convenience.
|
|
162
|
+
*/
|
|
163
|
+
findByValue(value: string | number): ListItem[];
|
|
164
|
+
/**
|
|
165
|
+
* Finds first item whose ID matches the argument. If item is {text: "First Item", value: "item1", id: 1}, it should be found by passing value 1.
|
|
166
|
+
*
|
|
167
|
+
* @param {string|number} value - Search by this text or number
|
|
168
|
+
* @return {ListItem[]} Returns an array of found items. Each found item will have an `index` property fo convenience.
|
|
169
|
+
*/
|
|
170
|
+
findByID(value: string | number): ListItem[];
|
|
171
|
+
}
|
|
172
|
+
import { TextComponent } from "./TextComponent.js";
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ComponentContainer is not a standalone component and should not be instantiated.
|
|
3
|
+
* It provides methods and members for managing child components.
|
|
4
|
+
* ComponentContainer is extended by {@link Window}, {@link InternalWindowContainer}, {@link InternalWindow}, {@link Panel}, {@link ToolBar}, {@link MenuBar}, {@link Menu}, {@link ContextMenu}, {@link Tabs}, {@link SplitView} and a {@link ScrollPane}.
|
|
5
|
+
* @class
|
|
6
|
+
* @global
|
|
7
|
+
*/
|
|
8
|
+
export class ComponentContainer extends UIComponent {
|
|
9
|
+
static preInitProperties: string[];
|
|
10
|
+
static postInitProperties: string[];
|
|
11
|
+
/**
|
|
12
|
+
* ComponentContainer constructor.
|
|
13
|
+
* @internal
|
|
14
|
+
* @ignore
|
|
15
|
+
*/
|
|
16
|
+
constructor(...args: any[]);
|
|
17
|
+
applyComponentProperties: any;
|
|
18
|
+
/**
|
|
19
|
+
* Loads UI Components and properties from UI designer file FILE_NAME.ui.json where FILE_NAME is the name of JavaScript file of the component.
|
|
20
|
+
*
|
|
21
|
+
* @param {string} class_name - Class name for which to load UI
|
|
22
|
+
* @private
|
|
23
|
+
* @ignore
|
|
24
|
+
*/
|
|
25
|
+
private applyUIDefinition;
|
|
26
|
+
/**
|
|
27
|
+
* Gets an array of child components.
|
|
28
|
+
*
|
|
29
|
+
* A new array of child components is created each time `.children` is accessed, so you may not want to use it directly inside a `for(let i=0; i < component.children.length, i++){}` or `while(...){}` loops. First save it to a variable, then use it in such loop.
|
|
30
|
+
*
|
|
31
|
+
* In loops `for..in`, `for..of` or `component.children.forEach((c, i)=>{...})` it's accessed only once, so you are looping through the same array.
|
|
32
|
+
*
|
|
33
|
+
* @readonly
|
|
34
|
+
* @type {Object[]}
|
|
35
|
+
* @example <h2>Looping through Window's components</h2>
|
|
36
|
+
* // method 1
|
|
37
|
+
* for(child of window.children)
|
|
38
|
+
* {
|
|
39
|
+
* ...
|
|
40
|
+
* }
|
|
41
|
+
*
|
|
42
|
+
* // method 2
|
|
43
|
+
* const _children = window.children;
|
|
44
|
+
* for(let i = 0; i < _children.length; i++)
|
|
45
|
+
* {
|
|
46
|
+
* const child = _children[i];
|
|
47
|
+
* ...
|
|
48
|
+
* }
|
|
49
|
+
*
|
|
50
|
+
* // method 3
|
|
51
|
+
* window.children.each(child=>{
|
|
52
|
+
* ...
|
|
53
|
+
* });
|
|
54
|
+
*/
|
|
55
|
+
readonly get children(): Object[];
|
|
56
|
+
/**
|
|
57
|
+
* Gets the number of components added to this container.
|
|
58
|
+
* @readonly
|
|
59
|
+
* @type {number}
|
|
60
|
+
*/
|
|
61
|
+
readonly get childCount(): number;
|
|
62
|
+
/**
|
|
63
|
+
* Returns a child component at specified index, or `null` if index is outside of range.
|
|
64
|
+
*
|
|
65
|
+
* @param {number} index - Component index (z order).
|
|
66
|
+
* @return {UIComponent|null} A child component at specified index, or `null` if there is no child at specified index.
|
|
67
|
+
*/
|
|
68
|
+
child(index: number): UIComponent | null;
|
|
69
|
+
/**
|
|
70
|
+
* Gets or sets the index of a child component within this container. Setting new index changes z-order of the component.
|
|
71
|
+
*
|
|
72
|
+
* @param {Object} child - Child component
|
|
73
|
+
* @param {number} [new_index] - The new index to assign to the child. Moves the component in z-order.
|
|
74
|
+
* @return {this|null|number} If `new_index` is provided, returns `this` component. If the child is not found in this container, returns `null`. Otherwise, returns the child's current z-index.
|
|
75
|
+
*/
|
|
76
|
+
childIndex(child: Object, new_index?: number): this | null | number;
|
|
77
|
+
/**
|
|
78
|
+
* Adds a child component to this container component.
|
|
79
|
+
*
|
|
80
|
+
* @param {object} component - UI Component that can be a child of this component.
|
|
81
|
+
* @param {number|object} [data_or_index] - Argument to pass some extra data (such as Tab Name to add Panel to Tabs), or index at which to insert the child. By default component is added to the end.
|
|
82
|
+
* @returns {this} Returns an instance of `this` component for chaining.
|
|
83
|
+
* @see UIComponent#addTo
|
|
84
|
+
* @example <h2>Adding a component at specified index 5</h2>
|
|
85
|
+
* panel.addChild(new CheckBox("Enabled checkbox").position(10, 15), 5); // adds to panel and positions at (10,15) coordinates
|
|
86
|
+
*
|
|
87
|
+
* @example <h2>Adding a component at specified index</h2>
|
|
88
|
+
* tabs.addChild(new Panel(), {text: "Registration", enabled: true, tooltip: "Create new account", icon: "images/user.png"});
|
|
89
|
+
*/
|
|
90
|
+
addChild(component: object, ...args: any[]): this;
|
|
91
|
+
/**
|
|
92
|
+
* Removes component's child by child object or child index.
|
|
93
|
+
*
|
|
94
|
+
* @param {object|number} child_or_index - Child component object or index of the child.
|
|
95
|
+
* @param {boolean} [recursive=false] - Boolean indicates if all descendents of this child should also be removed.
|
|
96
|
+
* @returns {UIComponent|null} The removed child component, or `null` if there is no child at specified index.
|
|
97
|
+
*/
|
|
98
|
+
removeChild(child_or_index: object | number, recursive?: boolean): UIComponent | null;
|
|
99
|
+
/**
|
|
100
|
+
* Checks if passed component is a descendant of this container component.
|
|
101
|
+
*
|
|
102
|
+
* @param descendant - Child component to check.
|
|
103
|
+
* @returns {boolean} If the descendant component is inside of this component.
|
|
104
|
+
* @throws {TypeError} When passed argument is not an instance of UIComponent.
|
|
105
|
+
* @see UIComponent#insideOf
|
|
106
|
+
*/
|
|
107
|
+
contains(descendant: any): boolean;
|
|
108
|
+
/**
|
|
109
|
+
* Gets, registers or unregisters an event handler function for container-related events
|
|
110
|
+
* triggered when a child component is added or removed.
|
|
111
|
+
*
|
|
112
|
+
* @param {function(ContainerEvent): any} [callback=undefined] - The event handler function that receives a {@link ContainerEvent} object. Pass `null` to unregister all handler functions.
|
|
113
|
+
* @param {boolean} [remove=false] - Set to `true` to unregister the event handler.
|
|
114
|
+
* @returns {this|function[]} An array of handler functions if no arguments are passed, otherwise `this` component for method chaining.
|
|
115
|
+
* @see ContainerEvent
|
|
116
|
+
* @example
|
|
117
|
+
* // Example event object:
|
|
118
|
+
* const e = {
|
|
119
|
+
* target: object, // The container component that triggered the event.
|
|
120
|
+
* type: string, // `add`, `remove`.
|
|
121
|
+
* child: object // The child component that was added or removed
|
|
122
|
+
* };
|
|
123
|
+
*/
|
|
124
|
+
onContainerEvents(...args: any[]): this | Function[];
|
|
125
|
+
/**
|
|
126
|
+
* @private
|
|
127
|
+
*/
|
|
128
|
+
private applyComponentPropertiesV1_0;
|
|
129
|
+
#private;
|
|
130
|
+
}
|
|
131
|
+
import { UIComponent } from "./UIComponent.js";
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ContextMenu UI component that extends ComponentContainer, which extends UIComponent class.
|
|
3
|
+
* ContextMenu is used to create menus that pop up when user right clicks on UI component or system tray icon.
|
|
4
|
+
* @class
|
|
5
|
+
* @global
|
|
6
|
+
* @see ComponentContainer
|
|
7
|
+
*/
|
|
8
|
+
export class ContextMenu extends ComponentContainer {
|
|
9
|
+
_parents: any[];
|
|
10
|
+
/**
|
|
11
|
+
* Registers, unregisters and gets a list of handler functions for the context menu popup events (when the the context menu becomes visible and hidden).
|
|
12
|
+
*
|
|
13
|
+
* @param {function(PopupEvent):any|null} [callback] - Event handler function that receives a {@link PopupEvent} as an argument. Pass `null` to unregister all registered callbacks.
|
|
14
|
+
* @param {boolean} [remove] - Set to `true` to unregister the handler function.
|
|
15
|
+
* @return {function[]|ComboBox} Returns an array of registered handler functions if arguments are omitted, otherwise returns `this` component instance.
|
|
16
|
+
* @see PopupEvent
|
|
17
|
+
* @example
|
|
18
|
+
* // event Object format:
|
|
19
|
+
* const e = {
|
|
20
|
+
* target: object, // The component that triggered the event.
|
|
21
|
+
* type: string, // `show`, `hide`, `cancel`.
|
|
22
|
+
* invoker: Object // UI Component that invoked the popup, or `null` if it was invoked programmatically.
|
|
23
|
+
* x: number, // X position relative to invoker. Only present when invoker is not `null`.
|
|
24
|
+
* y: number, // Y position relative to invoker. Only present when invoker is not `null`.
|
|
25
|
+
* screenX: number, // X position relative to default screen.
|
|
26
|
+
* screenY: number, // Y position relative to default screen.
|
|
27
|
+
* interactive: boolean, // Indicates if the popup was triggered by user's interaction (not programmatically).
|
|
28
|
+
* };
|
|
29
|
+
*/
|
|
30
|
+
onPopupEvents(callback?: (arg0: PopupEvent) => any | null, ...args: any[]): Function[] | ComboBox;
|
|
31
|
+
/**
|
|
32
|
+
* Adds a child component to this container component.
|
|
33
|
+
* Overrides addChild() method from UIComponent class to add component validation logic.
|
|
34
|
+
*
|
|
35
|
+
* @param {Object} component - UI Component that can be a child of this component.
|
|
36
|
+
* @param {...any} [data_or_index] - Argument to pass some extra data (such as Tab Name to add Panel to Tabs), or index at which to insert the child. By default component is added to the end.
|
|
37
|
+
* @returns {this}
|
|
38
|
+
*/
|
|
39
|
+
addChild(component: Object, ...data: any[]): this;
|
|
40
|
+
/**
|
|
41
|
+
* Open the menu with all its parent menus or context menu.
|
|
42
|
+
* @param {object} [position] - Example: {x: 100, y: 100}. Used to specify position where to open the ContextMenu. If invoker is specified, then position is relative to position of invoker component, otherwise it a screen position.
|
|
43
|
+
* @param {object} [invoker] - Used to set invoker if the context menu isn't assigned to any object and you want to be able to get invoker by using "invoker" getter.
|
|
44
|
+
* @return {ContextMenu} Returns `this` ContextMenu instance.
|
|
45
|
+
*/
|
|
46
|
+
open(position?: object, invoker?: object): ContextMenu;
|
|
47
|
+
/**
|
|
48
|
+
* Returns last invoker Object that invoked the popup, or `null` if no invoker was involved.
|
|
49
|
+
* @readonly
|
|
50
|
+
* @type {Object|null}
|
|
51
|
+
*/
|
|
52
|
+
readonly get invoker(): Object | null;
|
|
53
|
+
/**
|
|
54
|
+
* Adds this ContextMenu to a specified parent component.
|
|
55
|
+
*
|
|
56
|
+
* @param {object} parent - A valid component that accepts ContextMenu. `parent` must be derived from UIComponent.
|
|
57
|
+
* @return {ContextMenu} Returns an instance of `this` object.
|
|
58
|
+
*/
|
|
59
|
+
addTo(parent: object, ...args: any[]): ContextMenu;
|
|
60
|
+
/**
|
|
61
|
+
* Removes this ContextMenu from all parent components or removes a specified child component from this ContextMenu.
|
|
62
|
+
*
|
|
63
|
+
* @param {Object} [child] - Child to be removed. When omitted, this context menu gets removed from all parent components.
|
|
64
|
+
* @param {boolean} [recursive] - Indicates whether to also remove all child's descendents.
|
|
65
|
+
* @return {ContextMenu} Returns an instance of `this` component.
|
|
66
|
+
* @example
|
|
67
|
+
* child.remove(); // Removes this context menu from it's parent components
|
|
68
|
+
* child.remove(true); // Removes this context menu from it's parent components and all its descendants recursively
|
|
69
|
+
* parent.remove(child); // removes child from parent container
|
|
70
|
+
* parent.remove(child, true); // Removes child from parent container and all of child's descendants recursively
|
|
71
|
+
*/
|
|
72
|
+
remove(...args: any[]): ContextMenu;
|
|
73
|
+
}
|
|
74
|
+
import { ComponentContainer } from "./ComponentContainer.js";
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DocumentEditor UI component that extends TextComponent and ScrollableComponent, which extend UIComponent class.
|
|
3
|
+
* DocumentEditor is a text editor that can be switched to HTML mode to display or edit an HTML styled page. Only HTML 3.2 is supported. Modern tags like in HTML5 are not supported and may be ignored. HTML page can be styles with CSS but CSS support is also limited.
|
|
4
|
+
* Editing the HTML page is not great, but may be enough for basic purposes. CSS can be added to the document separately by setCSS() and addCSS() methods, or it can be embedded into the HTML content using `style` tags.
|
|
5
|
+
*
|
|
6
|
+
* For more methods for this component check UIComponent class.
|
|
7
|
+
* @class
|
|
8
|
+
* @global
|
|
9
|
+
* @see TextComponent
|
|
10
|
+
* @see ScrollableComponent
|
|
11
|
+
*/
|
|
12
|
+
export class DocumentEditor extends TextComponent {
|
|
13
|
+
/**
|
|
14
|
+
* Sets or gets text or HTML content of the component (depending if HTML is enabled using html(boolean) method.
|
|
15
|
+
*
|
|
16
|
+
* @param {string} [text] - Can be plain text or HTML. HTML should be surrounded with HTML tags. Check example below.
|
|
17
|
+
* @param {TextAction} [action] - Specific action to perform with text. Replace, append, prepend, or insert. Do not use this argument for HTML content.
|
|
18
|
+
* @param {number} [insert_position] - Position where to insert text. Applies only if `action` argument is TextAction.Insert.
|
|
19
|
+
* @return {string|this} Returns text or HTML if no argument is set, otherwise returns `this` component.
|
|
20
|
+
* @example
|
|
21
|
+
* const txt = textfield.text(); // gets text value
|
|
22
|
+
* textfield.text("New Text"); // sets new text value
|
|
23
|
+
* textfield.html(true).text("<html>New Text Line 1<br />New Text Line 2</html>"); // changes editor's content type to HTML and sets HTML content
|
|
24
|
+
* textfield.text("Appended Text", TextAction.Append); // Appends new text to the end of current text
|
|
25
|
+
* textfield.text("Inserted Text", TextAction.Insert); // Inserts at current caret position
|
|
26
|
+
* textfield.text("Inserted Text", TextAction.Insert, textfield.caretPosition() - 50); // Inserts at specified position
|
|
27
|
+
*/
|
|
28
|
+
text(...args: any[]): string | this;
|
|
29
|
+
/**
|
|
30
|
+
* Enables/Disables Word/Character line wrapping of long lines instead of scrolling horizontally.
|
|
31
|
+
*
|
|
32
|
+
* @param {LineWrap} [value] - LineWrap.Word, LineWrap.Character, or LineWrap.None
|
|
33
|
+
* @return {LineWrap|DocumentEditor} If argument is passed, `this` component instance is returned, otherwise line wrap value is returned.
|
|
34
|
+
* @see LineWrap
|
|
35
|
+
*/
|
|
36
|
+
lineWrap(...args: any[]): LineWrap | DocumentEditor;
|
|
37
|
+
/**
|
|
38
|
+
* Sets or gets boolean value stating if content type of the document is HTML or not. True means HTML, false means plain text.
|
|
39
|
+
*
|
|
40
|
+
* @param {boolean} [value] - `true` to enable HTML content type, `false` to switch to plain text.
|
|
41
|
+
* @return {DocumentEditor|boolean} If argument is passed, `this` component instance is returned, otherwise `boolean` is returned.
|
|
42
|
+
*/
|
|
43
|
+
html(...args: any[]): DocumentEditor | boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Adds CSS styles to be applied to the HTML document without adding this CSS to the HTML content. This method should be used only when DocumentEditor's HTML content type is enabled using html(true) method. Added CSS cannot be removed separately. To remove all added CSS use setCSS("") method.
|
|
46
|
+
*
|
|
47
|
+
* @param {string} css - CSS content (without `style` tags).
|
|
48
|
+
* @return {DocumentEditor}
|
|
49
|
+
*/
|
|
50
|
+
addCSS(css: string): DocumentEditor;
|
|
51
|
+
/**
|
|
52
|
+
* Sets new CSS styles to be applied to the HTML document without adding this CSS to the HTML content. It replaces previously added CSS. This method can be used to remove previously added CSS by calling setCSS(""). This method should be used only when DocumentEditor's HTML content type is enabled using html(true) method.
|
|
53
|
+
*
|
|
54
|
+
* @param {string} css - CSS content (without `style` tags).
|
|
55
|
+
* @return {DocumentEditor}
|
|
56
|
+
*/
|
|
57
|
+
setCSS(css: string): DocumentEditor;
|
|
58
|
+
/**
|
|
59
|
+
* Sets/gets a comma separated list of HTML tags to be excluded (stripped away) from HTML document (when content type is set to HTML using html(true).
|
|
60
|
+
*
|
|
61
|
+
* @param {string} [tags] - A list of tags separated by comma. e.g. editor.excludedTags("hr audio video div");
|
|
62
|
+
* @return {DocumentEditor|string}
|
|
63
|
+
*/
|
|
64
|
+
excludedTags(...args: any[]): DocumentEditor | string;
|
|
65
|
+
/**
|
|
66
|
+
* Sets or gets the ability to click on HTML document's hypertext links made with `a` tag to open the link in a web browser. When enabled, user can click on a hyperlink to open the link's URL in a default web browser. For that HTML content type must be enabled with html(true) method and editing should be disabled with editable(false) method.
|
|
67
|
+
*
|
|
68
|
+
* @param {boolean} [enabled] - `true` to enable, `false` to disable.
|
|
69
|
+
* @return {DocumentEditor|boolean} If argument is omitted, `boolean` is returned, otherwise `this` DocumentEditor instance is returned.
|
|
70
|
+
*/
|
|
71
|
+
linksEnabled(...args: any[]): DocumentEditor | boolean;
|
|
72
|
+
/**
|
|
73
|
+
* Registers, unregisters, and gets an Array of event handlers for the event when user clicks on a hyperlink. It gives the ability to create a custom action for hyperlink clicks. Check for event Object format in example below.
|
|
74
|
+
*
|
|
75
|
+
* @param {function(LinkEvent):any} [callback] - Handler function receiving {@link LinkEvent} object. Pass `null` to unregister all handler callbacks.
|
|
76
|
+
* @param {boolean} [remove] - Set to `true` to unregister the handler function.
|
|
77
|
+
* @return {function[]|ComboBox} Returns an array of registered handler functions if arguments are omitted, otherwise returns `this` component instance.
|
|
78
|
+
* @see LinkEvent
|
|
79
|
+
* @example
|
|
80
|
+
* // LinkEvent format example
|
|
81
|
+
* LinkEvent {
|
|
82
|
+
* target: DocumentEditor, // This component
|
|
83
|
+
* type: string, // `click`, `mouseenter`, or `mouseleave`
|
|
84
|
+
* url: string, // The href="" attribute of the `a` tag
|
|
85
|
+
* text: string, // Text of the hyperlink
|
|
86
|
+
* shift: boolean, // Indicates if Shift key was pressed when the event occurred
|
|
87
|
+
* ctrl: boolean, // Indicates if Ctrl key was pressed when the event occurred
|
|
88
|
+
* alt: boolean, // Indicates if Alt key was pressed when the event occurred
|
|
89
|
+
* modifiers: string // Keyboard modifiers mask
|
|
90
|
+
* modifiersText: string // Text representation of keyboard modifiers
|
|
91
|
+
* }
|
|
92
|
+
*/
|
|
93
|
+
onLinkEvents(callback?: (arg0: LinkEvent) => any, ...args: any[]): Function[] | ComboBox;
|
|
94
|
+
}
|
|
95
|
+
import { TextComponent } from "./TextComponent.js";
|