@@ -21,6 +21,8 @@ declare const enum _BrushOrPenType {
21
21
THEME_COLOR ,
22
22
}
23
23
24
+ type _Bounds = Bounds | [ number , number , number , number ]
25
+
24
26
/**
25
27
* A global class containing central information about ScriptUI. Not instantiable.
26
28
*/
@@ -151,7 +153,7 @@ declare class Window extends _Control {
151
153
* The bounds of the window frame in screen coordinates.
152
154
* The frame consists of the title bar and borders that enclose the content region of a window, depending on the windowing system.
153
155
*/
154
- readonly frameBounds : Bounds | [ number , number , number , number ]
156
+ readonly frameBounds : _Bounds
155
157
156
158
/**
157
159
* The top left corner of the window frame in screen coordinates.
@@ -246,7 +248,7 @@ declare class Window extends _Control {
246
248
constructor (
247
249
type : string ,
248
250
title ?: string ,
249
- bounds ?: Bounds | [ number , number , number , number ] ,
251
+ bounds ?: _Bounds ,
250
252
properties ?: Partial < _AddControlPropertiesWindow > ,
251
253
)
252
254
@@ -2524,7 +2526,7 @@ declare class _Control {
2524
2526
* The boundaries of the element, in parent-relative coordinates.
2525
2527
* Setting an element's size or location changes its bounds property, and vice-versa.
2526
2528
*/
2527
- bounds : Bounds | [ number , number , number , number ]
2529
+ bounds : _Bounds
2528
2530
2529
2531
/**
2530
2532
* True if this element is enabled.
@@ -2596,7 +2598,7 @@ declare class _Control {
2596
2598
/**
2597
2599
* The bounds of this element relative to the top-level parent window.
2598
2600
*/
2599
- readonly windowBounds : Bounds | [ number , number , number , number ]
2601
+ readonly windowBounds : _Bounds
2600
2602
2601
2603
/**
2602
2604
* Registers an event handler for a particular type of event occurring in this element.
@@ -2770,29 +2772,19 @@ interface _AddControl {
2770
2772
* The third argument can be the initial text value.
2771
2773
* Special name "ok" makes the button primary for parent dialog, and the special name "cancel" makes the button default cancel button for parent dialog.
2772
2774
*/
2773
- (
2774
- type : "button" ,
2775
- bounds ?: Bounds | [ number , number , number , number ] ,
2776
- text ?: string ,
2777
- properties ?: _AddControlProperties ,
2778
- ) : Button
2775
+ ( type : "button" , bounds ?: _Bounds , text ?: string , properties ?: _AddControlProperties ) : Button
2779
2776
2780
2777
/**
2781
2778
* Creation of a CheckBox.
2782
2779
* The third argument is the text to be displayed.
2783
2780
*/
2784
- (
2785
- type : "checkbox" ,
2786
- bounds ?: Bounds | [ number , number , number , number ] ,
2787
- text ?: string ,
2788
- properties ?: _AddControlProperties ,
2789
- ) : Checkbox
2781
+ ( type : "checkbox" , bounds ?: _Bounds , text ?: string , properties ?: _AddControlProperties ) : Checkbox
2790
2782
2791
2783
/**
2792
2784
*/
2793
2785
(
2794
2786
type : "dropdownlist" ,
2795
- bounds ?: Bounds | [ number , number , number , number ] ,
2787
+ bounds ?: _Bounds ,
2796
2788
items ?: string [ ] ,
2797
2789
properties ?: Partial < _AddControlPropertiesDropDownList > ,
2798
2790
) : DropDownList
@@ -2801,7 +2793,7 @@ interface _AddControl {
2801
2793
*/
2802
2794
(
2803
2795
type : "edittext" ,
2804
- bounds ?: Bounds | [ number , number , number , number ] ,
2796
+ bounds ?: _Bounds ,
2805
2797
text ?: string ,
2806
2798
properties ?: Partial < _AddControlPropertiesEditText > ,
2807
2799
) : EditText
@@ -2810,42 +2802,33 @@ interface _AddControl {
2810
2802
*/
2811
2803
(
2812
2804
type : "flashplayer" ,
2813
- bounds ?: Bounds | [ number , number , number , number ] ,
2805
+ bounds ?: _Bounds ,
2814
2806
movieToLoad ?: string | File ,
2815
2807
properties ?: _AddControlProperties ,
2816
2808
) : FlashPlayer
2817
2809
2818
2810
/**
2819
2811
*/
2820
- (
2821
- type : "group" ,
2822
- bounds ?: Bounds | [ number , number , number , number ] ,
2823
- properties ?: _AddControlProperties ,
2824
- ) : Group
2812
+ ( type : "group" , bounds ?: _Bounds , properties ?: _AddControlProperties ) : Group
2825
2813
2826
2814
/**
2827
2815
*/
2828
2816
(
2829
2817
type : "iconbutton" ,
2830
- bounds ?: Bounds | [ number , number , number , number ] ,
2818
+ bounds ?: _Bounds ,
2831
2819
icon ?: string | File ,
2832
2820
properties ?: Partial < _AddControlPropertiesIconButton > ,
2833
2821
) : IconButton
2834
2822
2835
2823
/**
2836
2824
*/
2837
- (
2838
- type : "image" ,
2839
- bounds ?: Bounds | [ number , number , number , number ] ,
2840
- icon ?: string | File ,
2841
- properties ?: _AddControlProperties ,
2842
- ) : Image
2825
+ ( type : "image" , bounds ?: _Bounds , icon ?: string | File , properties ?: _AddControlProperties ) : Image
2843
2826
2844
2827
/**
2845
2828
*/
2846
2829
(
2847
2830
type : "listbox" ,
2848
- bounds ?: Bounds | [ number , number , number , number ] ,
2831
+ bounds ?: _Bounds ,
2849
2832
items ?: string [ ] ,
2850
2833
properties ?: Partial < _AddControlPropertiesListBox > ,
2851
2834
) : ListBox
@@ -2854,7 +2837,7 @@ interface _AddControl {
2854
2837
*/
2855
2838
(
2856
2839
type : "panel" ,
2857
- bounds ?: Bounds | [ number , number , number , number ] ,
2840
+ bounds ?: _Bounds ,
2858
2841
text ?: string ,
2859
2842
properties ?: Partial < _AddControlPropertiesPanel > ,
2860
2843
) : Panel
@@ -2865,7 +2848,7 @@ interface _AddControl {
2865
2848
*/
2866
2849
(
2867
2850
type : "progressbar" ,
2868
- bounds ?: Bounds | [ number , number , number , number ] ,
2851
+ bounds ?: _Bounds ,
2869
2852
value ?: number ,
2870
2853
max ?: number ,
2871
2854
properties ?: _AddControlProperties ,
@@ -2877,7 +2860,7 @@ interface _AddControl {
2877
2860
*/
2878
2861
(
2879
2862
type : "radiobutton" ,
2880
- bounds ?: Bounds | [ number , number , number , number ] ,
2863
+ bounds ?: _Bounds ,
2881
2864
text ?: string ,
2882
2865
properties ?: _AddControlProperties ,
2883
2866
) : RadioButton
@@ -2888,7 +2871,7 @@ interface _AddControl {
2888
2871
*/
2889
2872
(
2890
2873
type : "scrollbar" ,
2891
- bounds ?: Bounds | [ number , number , number , number ] ,
2874
+ bounds ?: _Bounds ,
2892
2875
value ?: number ,
2893
2876
min ?: number ,
2894
2877
max ?: number ,
@@ -2901,7 +2884,7 @@ interface _AddControl {
2901
2884
*/
2902
2885
(
2903
2886
type : "slider" ,
2904
- bounds ?: Bounds | [ number , number , number , number ] ,
2887
+ bounds ?: _Bounds ,
2905
2888
value ?: number ,
2906
2889
min ?: number ,
2907
2890
max ?: number ,
@@ -2912,25 +2895,20 @@ interface _AddControl {
2912
2895
*/
2913
2896
(
2914
2897
type : "statictext" ,
2915
- bounds ?: Bounds | [ number , number , number , number ] ,
2898
+ bounds ?: _Bounds ,
2916
2899
text ?: string ,
2917
2900
properties ?: Partial < _AddControlPropertiesStaticText > ,
2918
2901
) : StaticText
2919
2902
2920
2903
/**
2921
2904
*/
2922
- (
2923
- type : "tab" ,
2924
- bounds : Bounds | [ number , number , number , number ] ,
2925
- text ?: string [ ] ,
2926
- properties ?: _AddControlProperties ,
2927
- ) : Tab
2905
+ ( type : "tab" , bounds : _Bounds , text ?: string [ ] , properties ?: _AddControlProperties ) : Tab
2928
2906
2929
2907
/**
2930
2908
*/
2931
2909
(
2932
2910
type : "tabbedpanel" ,
2933
- bounds ?: Bounds | [ number , number , number , number ] ,
2911
+ bounds ?: _Bounds ,
2934
2912
text ?: string ,
2935
2913
properties ?: _AddControlProperties ,
2936
2914
) : TabbedPanel
@@ -2939,7 +2917,7 @@ interface _AddControl {
2939
2917
*/
2940
2918
(
2941
2919
type : "treeview" ,
2942
- bounds ?: Bounds | [ number , number , number , number ] ,
2920
+ bounds ?: _Bounds ,
2943
2921
items ?: string [ ] ,
2944
2922
properties ?: Partial < _AddControlPropertiesTreeView > ,
2945
2923
) : TreeView
0 commit comments