@babylonjs/gui 5.0.0-rc.7 → 5.0.0-rc.9

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 (203) hide show
  1. package/2D/adtInstrumentation.d.ts +52 -52
  2. package/2D/adtInstrumentation.js +126 -126
  3. package/2D/advancedDynamicTexture.d.ts +448 -448
  4. package/2D/advancedDynamicTexture.js +1318 -1318
  5. package/2D/controls/button.d.ts +135 -135
  6. package/2D/controls/button.js +276 -276
  7. package/2D/controls/checkbox.d.ts +59 -59
  8. package/2D/controls/checkbox.js +188 -188
  9. package/2D/controls/colorpicker.d.ts +103 -103
  10. package/2D/controls/colorpicker.js +1417 -1417
  11. package/2D/controls/container.d.ts +175 -175
  12. package/2D/controls/container.js +570 -570
  13. package/2D/controls/control.d.ts +866 -866
  14. package/2D/controls/control.js +2433 -2433
  15. package/2D/controls/displayGrid.d.ts +53 -53
  16. package/2D/controls/displayGrid.js +245 -245
  17. package/2D/controls/ellipse.d.ts +21 -21
  18. package/2D/controls/ellipse.js +85 -85
  19. package/2D/controls/focusableButton.d.ts +59 -59
  20. package/2D/controls/focusableButton.js +99 -99
  21. package/2D/controls/focusableControl.d.ts +34 -34
  22. package/2D/controls/focusableControl.js +1 -1
  23. package/2D/controls/grid.d.ts +139 -139
  24. package/2D/controls/grid.js +529 -529
  25. package/2D/controls/image.d.ts +204 -204
  26. package/2D/controls/image.js +887 -887
  27. package/2D/controls/index.d.ts +29 -29
  28. package/2D/controls/index.js +29 -29
  29. package/2D/controls/inputPassword.d.ts +8 -8
  30. package/2D/controls/inputPassword.js +25 -25
  31. package/2D/controls/inputText.d.ts +201 -201
  32. package/2D/controls/inputText.js +1119 -1119
  33. package/2D/controls/line.d.ts +66 -66
  34. package/2D/controls/line.js +271 -271
  35. package/2D/controls/multiLine.d.ts +75 -75
  36. package/2D/controls/multiLine.js +262 -262
  37. package/2D/controls/radioButton.d.ts +49 -49
  38. package/2D/controls/radioButton.js +205 -205
  39. package/2D/controls/rectangle.d.ts +29 -29
  40. package/2D/controls/rectangle.js +150 -150
  41. package/2D/controls/scrollViewers/scrollViewer.d.ts +182 -182
  42. package/2D/controls/scrollViewers/scrollViewer.js +677 -677
  43. package/2D/controls/scrollViewers/scrollViewerWindow.d.ts +57 -57
  44. package/2D/controls/scrollViewers/scrollViewerWindow.js +278 -278
  45. package/2D/controls/selector.d.ts +263 -263
  46. package/2D/controls/selector.js +692 -692
  47. package/2D/controls/sliders/baseSlider.d.ts +82 -82
  48. package/2D/controls/sliders/baseSlider.js +347 -347
  49. package/2D/controls/sliders/imageBasedSlider.d.ts +49 -49
  50. package/2D/controls/sliders/imageBasedSlider.js +192 -192
  51. package/2D/controls/sliders/imageScrollBar.d.ts +65 -65
  52. package/2D/controls/sliders/imageScrollBar.js +263 -263
  53. package/2D/controls/sliders/scrollBar.d.ts +38 -38
  54. package/2D/controls/sliders/scrollBar.js +143 -143
  55. package/2D/controls/sliders/slider.d.ts +35 -35
  56. package/2D/controls/sliders/slider.js +271 -271
  57. package/2D/controls/stackPanel.d.ts +64 -64
  58. package/2D/controls/stackPanel.js +246 -246
  59. package/2D/controls/statics.d.ts +6 -6
  60. package/2D/controls/statics.js +49 -49
  61. package/2D/controls/textBlock.d.ts +175 -175
  62. package/2D/controls/textBlock.js +603 -603
  63. package/2D/controls/textWrapper.d.ts +13 -13
  64. package/2D/controls/textWrapper.js +101 -101
  65. package/2D/controls/toggleButton.d.ts +117 -117
  66. package/2D/controls/toggleButton.js +268 -268
  67. package/2D/controls/virtualKeyboard.d.ts +96 -96
  68. package/2D/controls/virtualKeyboard.js +256 -256
  69. package/2D/index.d.ts +9 -9
  70. package/2D/index.js +9 -9
  71. package/2D/math2D.d.ts +117 -117
  72. package/2D/math2D.js +221 -221
  73. package/2D/measure.d.ts +77 -77
  74. package/2D/measure.js +139 -139
  75. package/2D/multiLinePoint.d.ts +47 -47
  76. package/2D/multiLinePoint.js +127 -127
  77. package/2D/style.d.ts +46 -46
  78. package/2D/style.js +97 -97
  79. package/2D/valueAndUnit.d.ts +89 -89
  80. package/2D/valueAndUnit.js +226 -226
  81. package/2D/xmlLoader.d.ts +60 -60
  82. package/2D/xmlLoader.js +348 -348
  83. package/3D/behaviors/defaultBehavior.d.ts +73 -73
  84. package/3D/behaviors/defaultBehavior.js +121 -121
  85. package/3D/controls/abstractButton3D.d.ts +15 -15
  86. package/3D/controls/abstractButton3D.js +25 -25
  87. package/3D/controls/button3D.d.ts +30 -30
  88. package/3D/controls/button3D.js +93 -93
  89. package/3D/controls/container3D.d.ts +72 -72
  90. package/3D/controls/container3D.js +139 -139
  91. package/3D/controls/contentDisplay3D.d.ts +30 -30
  92. package/3D/controls/contentDisplay3D.js +79 -79
  93. package/3D/controls/control3D.d.ts +201 -201
  94. package/3D/controls/control3D.js +445 -445
  95. package/3D/controls/cylinderPanel.d.ts +17 -17
  96. package/3D/controls/cylinderPanel.js +66 -66
  97. package/3D/controls/handMenu.d.ts +28 -28
  98. package/3D/controls/handMenu.js +47 -47
  99. package/3D/controls/holographicBackplate.d.ts +49 -49
  100. package/3D/controls/holographicBackplate.js +120 -120
  101. package/3D/controls/holographicButton.d.ts +84 -84
  102. package/3D/controls/holographicButton.js +339 -339
  103. package/3D/controls/holographicSlate.d.ts +131 -131
  104. package/3D/controls/holographicSlate.js +431 -431
  105. package/3D/controls/index.d.ts +21 -21
  106. package/3D/controls/index.js +21 -21
  107. package/3D/controls/meshButton3D.d.ts +21 -21
  108. package/3D/controls/meshButton3D.js +62 -62
  109. package/3D/controls/nearMenu.d.ts +44 -44
  110. package/3D/controls/nearMenu.js +114 -114
  111. package/3D/controls/planePanel.d.ts +9 -9
  112. package/3D/controls/planePanel.js +36 -36
  113. package/3D/controls/scatterPanel.d.ts +18 -18
  114. package/3D/controls/scatterPanel.js +108 -108
  115. package/3D/controls/slider3D.d.ts +81 -81
  116. package/3D/controls/slider3D.js +268 -268
  117. package/3D/controls/spherePanel.d.ts +17 -17
  118. package/3D/controls/spherePanel.js +67 -67
  119. package/3D/controls/stackPanel3D.d.ts +22 -22
  120. package/3D/controls/stackPanel3D.js +107 -107
  121. package/3D/controls/touchButton3D.d.ts +80 -80
  122. package/3D/controls/touchButton3D.js +233 -233
  123. package/3D/controls/touchHolographicButton.d.ts +110 -110
  124. package/3D/controls/touchHolographicButton.js +445 -445
  125. package/3D/controls/touchHolographicMenu.d.ts +61 -61
  126. package/3D/controls/touchHolographicMenu.js +149 -149
  127. package/3D/controls/touchMeshButton3D.d.ts +21 -21
  128. package/3D/controls/touchMeshButton3D.js +62 -62
  129. package/3D/controls/volumeBasedPanel.d.ts +53 -53
  130. package/3D/controls/volumeBasedPanel.js +174 -174
  131. package/3D/gizmos/gizmoHandle.d.ts +108 -108
  132. package/3D/gizmos/gizmoHandle.js +209 -209
  133. package/3D/gizmos/index.d.ts +2 -2
  134. package/3D/gizmos/index.js +2 -2
  135. package/3D/gizmos/slateGizmo.d.ts +57 -57
  136. package/3D/gizmos/slateGizmo.js +369 -369
  137. package/3D/gui3DManager.d.ts +94 -94
  138. package/3D/gui3DManager.js +257 -257
  139. package/3D/index.d.ts +5 -5
  140. package/3D/index.js +5 -5
  141. package/3D/materials/fluent/fluentMaterial.d.ts +90 -90
  142. package/3D/materials/fluent/fluentMaterial.js +292 -292
  143. package/3D/materials/fluent/index.d.ts +1 -1
  144. package/3D/materials/fluent/index.js +1 -1
  145. package/3D/materials/fluent/shaders/fluent.fragment.d.ts +5 -5
  146. package/3D/materials/fluent/shaders/fluent.fragment.js +8 -8
  147. package/3D/materials/fluent/shaders/fluent.vertex.d.ts +5 -5
  148. package/3D/materials/fluent/shaders/fluent.vertex.js +8 -8
  149. package/3D/materials/fluentBackplate/fluentBackplateMaterial.d.ts +154 -154
  150. package/3D/materials/fluentBackplate/fluentBackplateMaterial.js +469 -469
  151. package/3D/materials/fluentBackplate/index.d.ts +1 -1
  152. package/3D/materials/fluentBackplate/index.js +1 -1
  153. package/3D/materials/fluentBackplate/shaders/fluentBackplate.fragment.d.ts +5 -5
  154. package/3D/materials/fluentBackplate/shaders/fluentBackplate.fragment.js +8 -8
  155. package/3D/materials/fluentBackplate/shaders/fluentBackplate.vertex.d.ts +5 -5
  156. package/3D/materials/fluentBackplate/shaders/fluentBackplate.vertex.js +8 -8
  157. package/3D/materials/fluentButton/fluentButtonMaterial.d.ts +189 -189
  158. package/3D/materials/fluentButton/fluentButtonMaterial.js +539 -539
  159. package/3D/materials/fluentButton/index.d.ts +1 -1
  160. package/3D/materials/fluentButton/index.js +1 -1
  161. package/3D/materials/fluentButton/shaders/fluentButton.fragment.d.ts +5 -5
  162. package/3D/materials/fluentButton/shaders/fluentButton.fragment.js +8 -8
  163. package/3D/materials/fluentButton/shaders/fluentButton.vertex.d.ts +5 -5
  164. package/3D/materials/fluentButton/shaders/fluentButton.vertex.js +8 -8
  165. package/3D/materials/fluentMaterial.d.ts +4 -4
  166. package/3D/materials/fluentMaterial.js +4 -4
  167. package/3D/materials/handle/handleMaterial.d.ts +68 -68
  168. package/3D/materials/handle/handleMaterial.js +126 -126
  169. package/3D/materials/handle/index.d.ts +1 -1
  170. package/3D/materials/handle/index.js +1 -1
  171. package/3D/materials/handle/shaders/handle.fragment.d.ts +5 -5
  172. package/3D/materials/handle/shaders/handle.fragment.js +8 -8
  173. package/3D/materials/handle/shaders/handle.vertex.d.ts +5 -5
  174. package/3D/materials/handle/shaders/handle.vertex.js +8 -8
  175. package/3D/materials/index.d.ts +5 -5
  176. package/3D/materials/index.js +5 -5
  177. package/3D/materials/mrdl/index.d.ts +3 -3
  178. package/3D/materials/mrdl/index.js +3 -3
  179. package/3D/materials/mrdl/mrdlBackplateMaterial.d.ts +147 -147
  180. package/3D/materials/mrdl/mrdlBackplateMaterial.js +436 -436
  181. package/3D/materials/mrdl/mrdlSliderBarMaterial.d.ts +333 -333
  182. package/3D/materials/mrdl/mrdlSliderBarMaterial.js +851 -851
  183. package/3D/materials/mrdl/mrdlSliderThumbMaterial.d.ts +333 -333
  184. package/3D/materials/mrdl/mrdlSliderThumbMaterial.js +851 -851
  185. package/3D/materials/mrdl/shaders/mrdlBackplate.fragment.d.ts +5 -5
  186. package/3D/materials/mrdl/shaders/mrdlBackplate.fragment.js +8 -8
  187. package/3D/materials/mrdl/shaders/mrdlBackplate.vertex.d.ts +5 -5
  188. package/3D/materials/mrdl/shaders/mrdlBackplate.vertex.js +8 -8
  189. package/3D/materials/mrdl/shaders/mrdlSliderBar.fragment.d.ts +5 -5
  190. package/3D/materials/mrdl/shaders/mrdlSliderBar.fragment.js +8 -8
  191. package/3D/materials/mrdl/shaders/mrdlSliderBar.vertex.d.ts +5 -5
  192. package/3D/materials/mrdl/shaders/mrdlSliderBar.vertex.js +8 -8
  193. package/3D/materials/mrdl/shaders/mrdlSliderThumb.fragment.d.ts +5 -5
  194. package/3D/materials/mrdl/shaders/mrdlSliderThumb.fragment.js +8 -8
  195. package/3D/materials/mrdl/shaders/mrdlSliderThumb.vertex.d.ts +5 -5
  196. package/3D/materials/mrdl/shaders/mrdlSliderThumb.vertex.js +8 -8
  197. package/3D/vector3WithInfo.d.ts +16 -16
  198. package/3D/vector3WithInfo.js +23 -23
  199. package/index.d.ts +2 -2
  200. package/index.js +2 -2
  201. package/legacy/legacy.d.ts +1 -1
  202. package/legacy/legacy.js +13 -13
  203. package/package.json +2 -2
@@ -1,866 +1,866 @@
1
- import { Nullable } from "@babylonjs/core/types.js";
2
- import { Observable } from "@babylonjs/core/Misc/observable.js";
3
- import { Vector2, Vector3 } from "@babylonjs/core/Maths/math.vector.js";
4
- import { PointerInfoBase } from "@babylonjs/core/Events/pointerEvents.js";
5
- import { TransformNode } from "@babylonjs/core/Meshes/transformNode.js";
6
- import { Scene } from "@babylonjs/core/scene.js";
7
- import { Container } from "./container";
8
- import { AdvancedDynamicTexture } from "../advancedDynamicTexture";
9
- import { ValueAndUnit } from "../valueAndUnit";
10
- import { Measure } from "../measure";
11
- import { Style } from "../style";
12
- import { Matrix2D, Vector2WithInfo } from "../math2D";
13
- import { ICanvasRenderingContext } from "@babylonjs/core/Engines/ICanvas.js";
14
- /**
15
- * Root class used for all 2D controls
16
- * @see https://doc.babylonjs.com/how_to/gui#controls
17
- */
18
- export declare class Control {
19
- /** defines the name of the control */
20
- name?: string | undefined;
21
- /**
22
- * Gets or sets a boolean indicating if alpha must be an inherited value (false by default)
23
- */
24
- static AllowAlphaInheritance: boolean;
25
- private _alpha;
26
- private _alphaSet;
27
- private _zIndex;
28
- /** @hidden */
29
- _host: AdvancedDynamicTexture;
30
- /** Gets or sets the control parent */
31
- parent: Nullable<Container>;
32
- /** @hidden */
33
- _currentMeasure: Measure;
34
- /** @hidden */
35
- _tempPaddingMeasure: Measure;
36
- private _fontFamily;
37
- private _fontStyle;
38
- private _fontWeight;
39
- private _fontSize;
40
- private _font;
41
- /** @hidden */
42
- _width: ValueAndUnit;
43
- /** @hidden */
44
- _height: ValueAndUnit;
45
- /** @hidden */
46
- protected _fontOffset: {
47
- ascent: number;
48
- height: number;
49
- descent: number;
50
- };
51
- private _color;
52
- private _style;
53
- private _styleObserver;
54
- /** @hidden */
55
- protected _horizontalAlignment: number;
56
- /** @hidden */
57
- protected _verticalAlignment: number;
58
- /** @hidden */
59
- protected _isDirty: boolean;
60
- /** @hidden */
61
- protected _wasDirty: boolean;
62
- /** @hidden */
63
- _tempParentMeasure: Measure;
64
- /** @hidden */
65
- _prevCurrentMeasureTransformedIntoGlobalSpace: Measure;
66
- /** @hidden */
67
- protected _cachedParentMeasure: Measure;
68
- private _descendantsOnlyPadding;
69
- private _paddingLeft;
70
- private _paddingRight;
71
- private _paddingTop;
72
- private _paddingBottom;
73
- /** @hidden */
74
- _left: ValueAndUnit;
75
- /** @hidden */
76
- _top: ValueAndUnit;
77
- private _scaleX;
78
- private _scaleY;
79
- private _rotation;
80
- private _transformCenterX;
81
- private _transformCenterY;
82
- /** @hidden */
83
- _transformMatrix: Matrix2D;
84
- /** @hidden */
85
- protected _invertTransformMatrix: Matrix2D;
86
- /** @hidden */
87
- protected _transformedPosition: Vector2;
88
- private _isMatrixDirty;
89
- private _cachedOffsetX;
90
- private _cachedOffsetY;
91
- private _isVisible;
92
- private _isHighlighted;
93
- private _highlightColor;
94
- protected _highlightLineWidth: number;
95
- /** @hidden */
96
- _linkedMesh: Nullable<TransformNode>;
97
- private _fontSet;
98
- private _dummyVector2;
99
- private _downCount;
100
- private _enterCount;
101
- private _doNotRender;
102
- private _downPointerIds;
103
- private _evaluatedMeasure;
104
- private _evaluatedParentMeasure;
105
- protected _isEnabled: boolean;
106
- protected _disabledColor: string;
107
- protected _disabledColorItem: string;
108
- protected _isReadOnly: boolean;
109
- /** @hidden */
110
- protected _rebuildLayout: boolean;
111
- /** @hidden */
112
- _customData: any;
113
- /** @hidden */
114
- _isClipped: boolean;
115
- /** @hidden */
116
- _automaticSize: boolean;
117
- /** @hidden */
118
- _tag: any;
119
- /**
120
- * Gets or sets the unique id of the node. Please note that this number will be updated when the control is added to a container
121
- */
122
- uniqueId: number;
123
- /**
124
- * Gets or sets a boolean indicating if the control is readonly (default: false).
125
- * A readonly control will still raise pointer events but will not react to them
126
- */
127
- get isReadOnly(): boolean;
128
- set isReadOnly(value: boolean);
129
- /**
130
- * Gets the transformed measure, that is the bounding box of the control after applying all transformations
131
- */
132
- get transformedMeasure(): Measure;
133
- /**
134
- * Gets or sets an object used to store user defined information for the node
135
- */
136
- metadata: any;
137
- /** Gets or sets a boolean indicating if the control can be hit with pointer events */
138
- isHitTestVisible: boolean;
139
- /** Gets or sets a boolean indicating if the control can block pointer events */
140
- isPointerBlocker: boolean;
141
- /** Gets or sets a boolean indicating if the control can be focusable */
142
- isFocusInvisible: boolean;
143
- /**
144
- * Gets or sets a boolean indicating if the children are clipped to the current control bounds.
145
- * Please note that not clipping children may generate issues with adt.useInvalidateRectOptimization so it is recommended to turn this optimization off if you want to use unclipped children
146
- */
147
- clipChildren: boolean;
148
- /**
149
- * Gets or sets a boolean indicating that control content must be clipped
150
- * Please note that not clipping children may generate issues with adt.useInvalidateRectOptimization so it is recommended to turn this optimization off if you want to use unclipped children
151
- */
152
- clipContent: boolean;
153
- /**
154
- * Gets or sets a boolean indicating that the current control should cache its rendering (useful when the control does not change often)
155
- */
156
- useBitmapCache: boolean;
157
- private _cacheData;
158
- private _shadowOffsetX;
159
- /** Gets or sets a value indicating the offset to apply on X axis to render the shadow */
160
- get shadowOffsetX(): number;
161
- set shadowOffsetX(value: number);
162
- private _shadowOffsetY;
163
- /** Gets or sets a value indicating the offset to apply on Y axis to render the shadow */
164
- get shadowOffsetY(): number;
165
- set shadowOffsetY(value: number);
166
- private _shadowBlur;
167
- private _previousShadowBlur;
168
- /** Gets or sets a value indicating the amount of blur to use to render the shadow */
169
- get shadowBlur(): number;
170
- set shadowBlur(value: number);
171
- private _shadowColor;
172
- /** Gets or sets a value indicating the color of the shadow (black by default ie. "#000") */
173
- get shadowColor(): string;
174
- set shadowColor(value: string);
175
- /** Gets or sets the cursor to use when the control is hovered */
176
- hoverCursor: string;
177
- /** @hidden */
178
- protected _linkOffsetX: ValueAndUnit;
179
- /** @hidden */
180
- protected _linkOffsetY: ValueAndUnit;
181
- /** Gets the control type name */
182
- get typeName(): string;
183
- /**
184
- * Get the current class name of the control.
185
- * @returns current class name
186
- */
187
- getClassName(): string;
188
- /**
189
- * An event triggered when pointer wheel is scrolled
190
- */
191
- onWheelObservable: Observable<Vector2>;
192
- /**
193
- * An event triggered when the pointer moves over the control.
194
- */
195
- onPointerMoveObservable: Observable<Vector2>;
196
- /**
197
- * An event triggered when the pointer moves out of the control.
198
- */
199
- onPointerOutObservable: Observable<Control>;
200
- /**
201
- * An event triggered when the pointer taps the control
202
- */
203
- onPointerDownObservable: Observable<Vector2WithInfo>;
204
- /**
205
- * An event triggered when pointer up
206
- */
207
- onPointerUpObservable: Observable<Vector2WithInfo>;
208
- /**
209
- * An event triggered when a control is clicked on
210
- */
211
- onPointerClickObservable: Observable<Vector2WithInfo>;
212
- /**
213
- * An event triggered when pointer enters the control
214
- */
215
- onPointerEnterObservable: Observable<Control>;
216
- /**
217
- * An event triggered when the control is marked as dirty
218
- */
219
- onDirtyObservable: Observable<Control>;
220
- /**
221
- * An event triggered before drawing the control
222
- */
223
- onBeforeDrawObservable: Observable<Control>;
224
- /**
225
- * An event triggered after the control was drawn
226
- */
227
- onAfterDrawObservable: Observable<Control>;
228
- /**
229
- * An event triggered when the control has been disposed
230
- */
231
- onDisposeObservable: Observable<Control>;
232
- /**
233
- * Get the hosting AdvancedDynamicTexture
234
- */
235
- get host(): AdvancedDynamicTexture;
236
- /** Gets or set information about font offsets (used to render and align text) */
237
- get fontOffset(): {
238
- ascent: number;
239
- height: number;
240
- descent: number;
241
- };
242
- set fontOffset(offset: {
243
- ascent: number;
244
- height: number;
245
- descent: number;
246
- });
247
- /** Gets or sets alpha value for the control (1 means opaque and 0 means entirely transparent) */
248
- get alpha(): number;
249
- set alpha(value: number);
250
- /**
251
- * Gets or sets a number indicating size of stroke we want to highlight the control with (mostly for debugging purpose)
252
- */
253
- get highlightLineWidth(): number;
254
- set highlightLineWidth(value: number);
255
- /**
256
- * Gets or sets a boolean indicating that we want to highlight the control (mostly for debugging purpose)
257
- */
258
- get isHighlighted(): boolean;
259
- set isHighlighted(value: boolean);
260
- /**
261
- * Gets or sets a string defining the color to use for highlighting this control
262
- */
263
- get highlightColor(): string;
264
- set highlightColor(value: string);
265
- /** Gets or sets a value indicating the scale factor on X axis (1 by default)
266
- * @see https://doc.babylonjs.com/how_to/gui#rotation-and-scaling
267
- */
268
- get scaleX(): number;
269
- set scaleX(value: number);
270
- /** Gets or sets a value indicating the scale factor on Y axis (1 by default)
271
- * @see https://doc.babylonjs.com/how_to/gui#rotation-and-scaling
272
- */
273
- get scaleY(): number;
274
- set scaleY(value: number);
275
- /** Gets or sets the rotation angle (0 by default)
276
- * @see https://doc.babylonjs.com/how_to/gui#rotation-and-scaling
277
- */
278
- get rotation(): number;
279
- set rotation(value: number);
280
- /** Gets or sets the transformation center on Y axis (0 by default)
281
- * @see https://doc.babylonjs.com/how_to/gui#rotation-and-scaling
282
- */
283
- get transformCenterY(): number;
284
- set transformCenterY(value: number);
285
- /** Gets or sets the transformation center on X axis (0 by default)
286
- * @see https://doc.babylonjs.com/how_to/gui#rotation-and-scaling
287
- */
288
- get transformCenterX(): number;
289
- set transformCenterX(value: number);
290
- /**
291
- * Gets or sets the horizontal alignment
292
- * @see https://doc.babylonjs.com/how_to/gui#alignments
293
- */
294
- get horizontalAlignment(): number;
295
- set horizontalAlignment(value: number);
296
- /**
297
- * Gets or sets the vertical alignment
298
- * @see https://doc.babylonjs.com/how_to/gui#alignments
299
- */
300
- get verticalAlignment(): number;
301
- set verticalAlignment(value: number);
302
- /**
303
- * Gets or sets a fixed ratio for this control.
304
- * When different from 0, the ratio is used to compute the "second" dimension.
305
- * The first dimension used in the computation is the last one set (by setting width / widthInPixels or height / heightInPixels), and the
306
- * second dimension is computed as first dimension * fixedRatio
307
- */
308
- fixedRatio: number;
309
- private _fixedRatioMasterIsWidth;
310
- /**
311
- * Gets or sets control width
312
- * @see https://doc.babylonjs.com/how_to/gui#position-and-size
313
- */
314
- get width(): string | number;
315
- set width(value: string | number);
316
- /**
317
- * Gets or sets the control width in pixel
318
- * @see https://doc.babylonjs.com/how_to/gui#position-and-size
319
- */
320
- get widthInPixels(): number;
321
- set widthInPixels(value: number);
322
- /**
323
- * Gets or sets control height
324
- * @see https://doc.babylonjs.com/how_to/gui#position-and-size
325
- */
326
- get height(): string | number;
327
- set height(value: string | number);
328
- /**
329
- * Gets or sets control height in pixel
330
- * @see https://doc.babylonjs.com/how_to/gui#position-and-size
331
- */
332
- get heightInPixels(): number;
333
- set heightInPixels(value: number);
334
- /** Gets or set font family */
335
- get fontFamily(): string;
336
- set fontFamily(value: string);
337
- /** Gets or sets font style */
338
- get fontStyle(): string;
339
- set fontStyle(value: string);
340
- /** Gets or sets font weight */
341
- get fontWeight(): string;
342
- set fontWeight(value: string);
343
- /**
344
- * Gets or sets style
345
- * @see https://doc.babylonjs.com/how_to/gui#styles
346
- */
347
- get style(): Nullable<Style>;
348
- set style(value: Nullable<Style>);
349
- /** @hidden */
350
- get _isFontSizeInPercentage(): boolean;
351
- /** Gets or sets font size in pixels */
352
- get fontSizeInPixels(): number;
353
- set fontSizeInPixels(value: number);
354
- /** Gets or sets font size */
355
- get fontSize(): string | number;
356
- set fontSize(value: string | number);
357
- /** Gets or sets foreground color */
358
- get color(): string;
359
- set color(value: string);
360
- /** Gets or sets z index which is used to reorder controls on the z axis */
361
- get zIndex(): number;
362
- set zIndex(value: number);
363
- /** Gets or sets a boolean indicating if the control can be rendered */
364
- get notRenderable(): boolean;
365
- set notRenderable(value: boolean);
366
- /** Gets or sets a boolean indicating if the control is visible */
367
- get isVisible(): boolean;
368
- set isVisible(value: boolean);
369
- /** Gets a boolean indicating that the control needs to update its rendering */
370
- get isDirty(): boolean;
371
- /**
372
- * Gets the current linked mesh (or null if none)
373
- */
374
- get linkedMesh(): Nullable<TransformNode>;
375
- /**
376
- * Gets or sets a value indicating the padding should work like in CSS.
377
- * Basically, it will add the padding amount on each side of the parent control for its children.
378
- */
379
- get descendantsOnlyPadding(): boolean;
380
- set descendantsOnlyPadding(value: boolean);
381
- /**
382
- * Gets or sets a value indicating the padding to use on the left of the control
383
- * @see https://doc.babylonjs.com/how_to/gui#position-and-size
384
- */
385
- get paddingLeft(): string | number;
386
- set paddingLeft(value: string | number);
387
- /**
388
- * Gets or sets a value indicating the padding in pixels to use on the left of the control
389
- * @see https://doc.babylonjs.com/how_to/gui#position-and-size
390
- */
391
- get paddingLeftInPixels(): number;
392
- set paddingLeftInPixels(value: number);
393
- /** @hidden */
394
- get _paddingLeftInPixels(): number;
395
- /**
396
- * Gets or sets a value indicating the padding to use on the right of the control
397
- * @see https://doc.babylonjs.com/how_to/gui#position-and-size
398
- */
399
- get paddingRight(): string | number;
400
- set paddingRight(value: string | number);
401
- /**
402
- * Gets or sets a value indicating the padding in pixels to use on the right of the control
403
- * @see https://doc.babylonjs.com/how_to/gui#position-and-size
404
- */
405
- get paddingRightInPixels(): number;
406
- set paddingRightInPixels(value: number);
407
- /** @hidden */
408
- get _paddingRightInPixels(): number;
409
- /**
410
- * Gets or sets a value indicating the padding to use on the top of the control
411
- * @see https://doc.babylonjs.com/how_to/gui#position-and-size
412
- */
413
- get paddingTop(): string | number;
414
- set paddingTop(value: string | number);
415
- /**
416
- * Gets or sets a value indicating the padding in pixels to use on the top of the control
417
- * @see https://doc.babylonjs.com/how_to/gui#position-and-size
418
- */
419
- get paddingTopInPixels(): number;
420
- set paddingTopInPixels(value: number);
421
- /** @hidden */
422
- get _paddingTopInPixels(): number;
423
- /**
424
- * Gets or sets a value indicating the padding to use on the bottom of the control
425
- * @see https://doc.babylonjs.com/how_to/gui#position-and-size
426
- */
427
- get paddingBottom(): string | number;
428
- set paddingBottom(value: string | number);
429
- /**
430
- * Gets or sets a value indicating the padding in pixels to use on the bottom of the control
431
- * @see https://doc.babylonjs.com/how_to/gui#position-and-size
432
- */
433
- get paddingBottomInPixels(): number;
434
- set paddingBottomInPixels(value: number);
435
- /** @hidden */
436
- get _paddingBottomInPixels(): number;
437
- /**
438
- * Gets or sets a value indicating the left coordinate of the control
439
- * @see https://doc.babylonjs.com/how_to/gui#position-and-size
440
- */
441
- get left(): string | number;
442
- set left(value: string | number);
443
- /**
444
- * Gets or sets a value indicating the left coordinate in pixels of the control
445
- * @see https://doc.babylonjs.com/how_to/gui#position-and-size
446
- */
447
- get leftInPixels(): number;
448
- set leftInPixels(value: number);
449
- /**
450
- * Gets or sets a value indicating the top coordinate of the control
451
- * @see https://doc.babylonjs.com/how_to/gui#position-and-size
452
- */
453
- get top(): string | number;
454
- set top(value: string | number);
455
- /**
456
- * Gets or sets a value indicating the top coordinate in pixels of the control
457
- * @see https://doc.babylonjs.com/how_to/gui#position-and-size
458
- */
459
- get topInPixels(): number;
460
- set topInPixels(value: number);
461
- /**
462
- * Gets or sets a value indicating the offset on X axis to the linked mesh
463
- * @see https://doc.babylonjs.com/how_to/gui#tracking-positions
464
- */
465
- get linkOffsetX(): string | number;
466
- set linkOffsetX(value: string | number);
467
- /**
468
- * Gets or sets a value indicating the offset in pixels on X axis to the linked mesh
469
- * @see https://doc.babylonjs.com/how_to/gui#tracking-positions
470
- */
471
- get linkOffsetXInPixels(): number;
472
- set linkOffsetXInPixels(value: number);
473
- /**
474
- * Gets or sets a value indicating the offset on Y axis to the linked mesh
475
- * @see https://doc.babylonjs.com/how_to/gui#tracking-positions
476
- */
477
- get linkOffsetY(): string | number;
478
- set linkOffsetY(value: string | number);
479
- /**
480
- * Gets or sets a value indicating the offset in pixels on Y axis to the linked mesh
481
- * @see https://doc.babylonjs.com/how_to/gui#tracking-positions
482
- */
483
- get linkOffsetYInPixels(): number;
484
- set linkOffsetYInPixels(value: number);
485
- /** Gets the center coordinate on X axis */
486
- get centerX(): number;
487
- /** Gets the center coordinate on Y axis */
488
- get centerY(): number;
489
- /** Gets or sets if control is Enabled */
490
- get isEnabled(): boolean;
491
- set isEnabled(value: boolean);
492
- /** Gets or sets background color of control if it's disabled. Only applies to Button class. */
493
- get disabledColor(): string;
494
- set disabledColor(value: string);
495
- /** Gets or sets front color of control if it's disabled. Only applies to Checkbox class. */
496
- get disabledColorItem(): string;
497
- set disabledColorItem(value: string);
498
- /**
499
- * Gets/sets the overlap group of the control.
500
- * Controls with overlapGroup set to a number can be deoverlapped.
501
- * Controls with overlapGroup set to undefined are not deoverlapped.
502
- * @see https://doc.babylonjs.com/how_to/gui#deoverlapping
503
- */
504
- overlapGroup?: number;
505
- /**
506
- * Gets/sets the deoverlap movement multiplier
507
- */
508
- overlapDeltaMultiplier?: number;
509
- /**
510
- * Creates a new control
511
- * @param name defines the name of the control
512
- */
513
- constructor(
514
- /** defines the name of the control */
515
- name?: string | undefined);
516
- /** @hidden */
517
- protected _getTypeName(): string;
518
- /**
519
- * Gets the first ascendant in the hierarchy of the given type
520
- * @param className defines the required type
521
- * @returns the ascendant or null if not found
522
- */
523
- getAscendantOfClass(className: string): Nullable<Control>;
524
- /**
525
- * Mark control element as dirty
526
- * @param force force non visible elements to be marked too
527
- */
528
- markAsDirty(force?: boolean): void;
529
- /**
530
- * Mark the element and its children as dirty
531
- */
532
- markAllAsDirty(): void;
533
- /** @hidden */
534
- _resetFontCache(): void;
535
- /**
536
- * Determines if a container is an ascendant of the current control
537
- * @param container defines the container to look for
538
- * @returns true if the container is one of the ascendant of the control
539
- */
540
- isAscendant(container: Control): boolean;
541
- /**
542
- * Gets coordinates in local control space
543
- * @param globalCoordinates defines the coordinates to transform
544
- * @returns the new coordinates in local space
545
- */
546
- getLocalCoordinates(globalCoordinates: Vector2): Vector2;
547
- /**
548
- * Gets coordinates in local control space
549
- * @param globalCoordinates defines the coordinates to transform
550
- * @param result defines the target vector2 where to store the result
551
- * @returns the current control
552
- */
553
- getLocalCoordinatesToRef(globalCoordinates: Vector2, result: Vector2): Control;
554
- /**
555
- * Gets coordinates in parent local control space
556
- * @param globalCoordinates defines the coordinates to transform
557
- * @returns the new coordinates in parent local space
558
- */
559
- getParentLocalCoordinates(globalCoordinates: Vector2): Vector2;
560
- /**
561
- * Move the current control to a vector3 position projected onto the screen.
562
- * @param position defines the target position
563
- * @param scene defines the hosting scene
564
- */
565
- moveToVector3(position: Vector3, scene: Scene): void;
566
- /**
567
- * Will store all controls that have this control as ascendant in a given array
568
- * @param results defines the array where to store the descendants
569
- * @param directDescendantsOnly defines if true only direct descendants of 'this' will be considered, if false direct and also indirect (children of children, an so on in a recursive manner) descendants of 'this' will be considered
570
- * @param predicate defines an optional predicate that will be called on every evaluated child, the predicate must return true for a given child to be part of the result, otherwise it will be ignored
571
- */
572
- getDescendantsToRef(results: Control[], directDescendantsOnly?: boolean, predicate?: (control: Control) => boolean): void;
573
- /**
574
- * Will return all controls that have this control as ascendant
575
- * @param directDescendantsOnly defines if true only direct descendants of 'this' will be considered, if false direct and also indirect (children of children, an so on in a recursive manner) descendants of 'this' will be considered
576
- * @param predicate defines an optional predicate that will be called on every evaluated child, the predicate must return true for a given child to be part of the result, otherwise it will be ignored
577
- * @return all child controls
578
- */
579
- getDescendants(directDescendantsOnly?: boolean, predicate?: (control: Control) => boolean): Control[];
580
- /**
581
- * Link current control with a target mesh
582
- * @param mesh defines the mesh to link with
583
- * @see https://doc.babylonjs.com/how_to/gui#tracking-positions
584
- */
585
- linkWithMesh(mesh: Nullable<TransformNode>): void;
586
- /**
587
- * Shorthand function to set the top, right, bottom, and left padding values on the control.
588
- * @param { string | number} paddingTop - The value of the top padding.
589
- * @param { string | number} paddingRight - The value of the right padding. If omitted, top is used.
590
- * @param { string | number} paddingBottom - The value of the bottom padding. If omitted, top is used.
591
- * @param { string | number} paddingLeft - The value of the left padding. If omitted, right is used.
592
- * @see https://doc.babylonjs.com/how_to/gui#position-and-size
593
- */
594
- setPadding(paddingTop: string | number, paddingRight?: string | number, paddingBottom?: string | number, paddingLeft?: string | number): void;
595
- /**
596
- * Shorthand funtion to set the top, right, bottom, and left padding values in pixels on the control.
597
- * @param { number} paddingTop - The value in pixels of the top padding.
598
- * @param { number} paddingRight - The value in pixels of the right padding. If omitted, top is used.
599
- * @param { number} paddingBottom - The value in pixels of the bottom padding. If omitted, top is used.
600
- * @param { number} paddingLeft - The value in pixels of the left padding. If omitted, right is used.
601
- * @see https://doc.babylonjs.com/how_to/gui#position-and-size
602
- */
603
- setPaddingInPixels(paddingTop: number, paddingRight?: number, paddingBottom?: number, paddingLeft?: number): void;
604
- /**
605
- * @param projectedPosition
606
- * @hidden
607
- */
608
- _moveToProjectedPosition(projectedPosition: Vector3): void;
609
- /**
610
- * @param offset
611
- * @hidden
612
- */
613
- _offsetLeft(offset: number): void;
614
- /**
615
- * @param offset
616
- * @hidden
617
- */
618
- _offsetTop(offset: number): void;
619
- /** @hidden */
620
- _markMatrixAsDirty(): void;
621
- /** @hidden */
622
- _flagDescendantsAsMatrixDirty(): void;
623
- /**
624
- * @param rect
625
- * @param context
626
- * @hidden
627
- */
628
- _intersectsRect(rect: Measure, context?: ICanvasRenderingContext): boolean;
629
- /** @hidden */
630
- protected _computeAdditionnalOffsetX(): number;
631
- /** @hidden */
632
- protected _computeAdditionnalOffsetY(): number;
633
- /** @hidden */
634
- protected invalidateRect(): void;
635
- /**
636
- * @param force
637
- * @hidden
638
- */
639
- _markAsDirty(force?: boolean): void;
640
- /** @hidden */
641
- _markAllAsDirty(): void;
642
- /**
643
- * @param host
644
- * @hidden
645
- */
646
- _link(host: AdvancedDynamicTexture): void;
647
- /**
648
- * @param context
649
- * @hidden
650
- */
651
- protected _transform(context?: ICanvasRenderingContext): void;
652
- /**
653
- * @param context
654
- * @hidden
655
- */
656
- _renderHighlight(context: ICanvasRenderingContext): void;
657
- /**
658
- * @param context
659
- * @hidden
660
- */
661
- _renderHighlightSpecific(context: ICanvasRenderingContext): void;
662
- /**
663
- * @param context
664
- * @hidden
665
- */
666
- protected _applyStates(context: ICanvasRenderingContext): void;
667
- /**
668
- * @param parentMeasure
669
- * @param context
670
- * @hidden
671
- */
672
- _layout(parentMeasure: Measure, context: ICanvasRenderingContext): boolean;
673
- /**
674
- * @param parentMeasure
675
- * @param context
676
- * @hidden
677
- */
678
- protected _processMeasures(parentMeasure: Measure, context: ICanvasRenderingContext): void;
679
- protected _evaluateClippingState(parentMeasure: Measure): void;
680
- /** @hidden */
681
- _measure(): void;
682
- /**
683
- * @param parentMeasure
684
- * @param context
685
- * @hidden
686
- */
687
- protected _computeAlignment(parentMeasure: Measure, context: ICanvasRenderingContext): void;
688
- /**
689
- * @param parentMeasure
690
- * @param context
691
- * @hidden
692
- */
693
- protected _preMeasure(parentMeasure: Measure, context: ICanvasRenderingContext): void;
694
- /**
695
- * @param parentMeasure
696
- * @param context
697
- * @hidden
698
- */
699
- protected _additionalProcessing(parentMeasure: Measure, context: ICanvasRenderingContext): void;
700
- /**
701
- * @param context
702
- * @hidden
703
- */
704
- protected _clipForChildren(context: ICanvasRenderingContext): void;
705
- private static _ClipMeasure;
706
- private _tmpMeasureA;
707
- private _clip;
708
- /**
709
- * @param context
710
- * @param invalidatedRectangle
711
- * @hidden
712
- */
713
- _render(context: ICanvasRenderingContext, invalidatedRectangle?: Nullable<Measure>): boolean;
714
- /**
715
- * @param context
716
- * @param invalidatedRectangle
717
- * @hidden
718
- */
719
- _draw(context: ICanvasRenderingContext, invalidatedRectangle?: Nullable<Measure>): void;
720
- /**
721
- * Tests if a given coordinates belong to the current control
722
- * @param x defines x coordinate to test
723
- * @param y defines y coordinate to test
724
- * @returns true if the coordinates are inside the control
725
- */
726
- contains(x: number, y: number): boolean;
727
- /**
728
- * @param x
729
- * @param y
730
- * @param pi
731
- * @param type
732
- * @param pointerId
733
- * @param buttonIndex
734
- * @param deltaX
735
- * @param deltaY
736
- * @hidden
737
- */
738
- _processPicking(x: number, y: number, pi: Nullable<PointerInfoBase>, type: number, pointerId: number, buttonIndex: number, deltaX?: number, deltaY?: number): boolean;
739
- /**
740
- * @param target
741
- * @param coordinates
742
- * @param pointerId
743
- * @param pi
744
- * @hidden
745
- */
746
- _onPointerMove(target: Control, coordinates: Vector2, pointerId: number, pi: Nullable<PointerInfoBase>): void;
747
- /**
748
- * @param target
749
- * @param pi
750
- * @hidden
751
- */
752
- _onPointerEnter(target: Control, pi: Nullable<PointerInfoBase>): boolean;
753
- /**
754
- * @param target
755
- * @param pi
756
- * @param force
757
- * @hidden
758
- */
759
- _onPointerOut(target: Control, pi: Nullable<PointerInfoBase>, force?: boolean): void;
760
- /**
761
- * @param target
762
- * @param coordinates
763
- * @param pointerId
764
- * @param buttonIndex
765
- * @param pi
766
- * @hidden
767
- */
768
- _onPointerDown(target: Control, coordinates: Vector2, pointerId: number, buttonIndex: number, pi: Nullable<PointerInfoBase>): boolean;
769
- /**
770
- * @param target
771
- * @param coordinates
772
- * @param pointerId
773
- * @param buttonIndex
774
- * @param notifyClick
775
- * @param pi
776
- * @hidden
777
- */
778
- _onPointerUp(target: Control, coordinates: Vector2, pointerId: number, buttonIndex: number, notifyClick: boolean, pi?: Nullable<PointerInfoBase>): void;
779
- /**
780
- * @param pointerId
781
- * @hidden
782
- */
783
- _forcePointerUp(pointerId?: Nullable<number>): void;
784
- /**
785
- * @param deltaX
786
- * @param deltaY
787
- * @hidden
788
- */
789
- _onWheelScroll(deltaX?: number, deltaY?: number): void;
790
- /** @hidden */
791
- _onCanvasBlur(): void;
792
- /**
793
- * @param type
794
- * @param x
795
- * @param y
796
- * @param pi
797
- * @param pointerId
798
- * @param buttonIndex
799
- * @param deltaX
800
- * @param deltaY
801
- * @hidden
802
- */
803
- _processObservables(type: number, x: number, y: number, pi: Nullable<PointerInfoBase>, pointerId: number, buttonIndex: number, deltaX?: number, deltaY?: number): boolean;
804
- private _prepareFont;
805
- /**
806
- * Serializes the current control
807
- * @param serializationObject defined the JSON serialized object
808
- */
809
- serialize(serializationObject: any): void;
810
- /**
811
- * @param serializedObject
812
- * @param host
813
- * @hidden
814
- */
815
- _parseFromContent(serializedObject: any, host: AdvancedDynamicTexture): void;
816
- /** Releases associated resources */
817
- dispose(): void;
818
- private static _HORIZONTAL_ALIGNMENT_LEFT;
819
- private static _HORIZONTAL_ALIGNMENT_RIGHT;
820
- private static _HORIZONTAL_ALIGNMENT_CENTER;
821
- private static _VERTICAL_ALIGNMENT_TOP;
822
- private static _VERTICAL_ALIGNMENT_BOTTOM;
823
- private static _VERTICAL_ALIGNMENT_CENTER;
824
- /** HORIZONTAL_ALIGNMENT_LEFT */
825
- static get HORIZONTAL_ALIGNMENT_LEFT(): number;
826
- /** HORIZONTAL_ALIGNMENT_RIGHT */
827
- static get HORIZONTAL_ALIGNMENT_RIGHT(): number;
828
- /** HORIZONTAL_ALIGNMENT_CENTER */
829
- static get HORIZONTAL_ALIGNMENT_CENTER(): number;
830
- /** VERTICAL_ALIGNMENT_TOP */
831
- static get VERTICAL_ALIGNMENT_TOP(): number;
832
- /** VERTICAL_ALIGNMENT_BOTTOM */
833
- static get VERTICAL_ALIGNMENT_BOTTOM(): number;
834
- /** VERTICAL_ALIGNMENT_CENTER */
835
- static get VERTICAL_ALIGNMENT_CENTER(): number;
836
- private static _FontHeightSizes;
837
- /**
838
- * @param font
839
- * @hidden
840
- */
841
- static _GetFontOffset(font: string): {
842
- ascent: number;
843
- height: number;
844
- descent: number;
845
- };
846
- /**
847
- * Creates a Control from parsed data
848
- * @param serializedObject defines parsed data
849
- * @param host defines the hosting AdvancedDynamicTexture
850
- * @returns a new Control
851
- */
852
- static Parse(serializedObject: any, host: AdvancedDynamicTexture): Control;
853
- static AddHeader: (control: Control, text: string, size: string | number, options: {
854
- isHorizontal: boolean;
855
- controlFirst: boolean;
856
- }) => any;
857
- /**
858
- * @param x
859
- * @param y
860
- * @param width
861
- * @param height
862
- * @param context
863
- * @hidden
864
- */
865
- protected static drawEllipse(x: number, y: number, width: number, height: number, context: ICanvasRenderingContext): void;
866
- }
1
+ import { Nullable } from "@babylonjs/core/types.js";
2
+ import { Observable } from "@babylonjs/core/Misc/observable.js";
3
+ import { Vector2, Vector3 } from "@babylonjs/core/Maths/math.vector.js";
4
+ import { PointerInfoBase } from "@babylonjs/core/Events/pointerEvents.js";
5
+ import { TransformNode } from "@babylonjs/core/Meshes/transformNode.js";
6
+ import { Scene } from "@babylonjs/core/scene.js";
7
+ import { Container } from "./container";
8
+ import { AdvancedDynamicTexture } from "../advancedDynamicTexture";
9
+ import { ValueAndUnit } from "../valueAndUnit";
10
+ import { Measure } from "../measure";
11
+ import { Style } from "../style";
12
+ import { Matrix2D, Vector2WithInfo } from "../math2D";
13
+ import { ICanvasRenderingContext } from "@babylonjs/core/Engines/ICanvas.js";
14
+ /**
15
+ * Root class used for all 2D controls
16
+ * @see https://doc.babylonjs.com/how_to/gui#controls
17
+ */
18
+ export declare class Control {
19
+ /** defines the name of the control */
20
+ name?: string | undefined;
21
+ /**
22
+ * Gets or sets a boolean indicating if alpha must be an inherited value (false by default)
23
+ */
24
+ static AllowAlphaInheritance: boolean;
25
+ private _alpha;
26
+ private _alphaSet;
27
+ private _zIndex;
28
+ /** @hidden */
29
+ _host: AdvancedDynamicTexture;
30
+ /** Gets or sets the control parent */
31
+ parent: Nullable<Container>;
32
+ /** @hidden */
33
+ _currentMeasure: Measure;
34
+ /** @hidden */
35
+ _tempPaddingMeasure: Measure;
36
+ private _fontFamily;
37
+ private _fontStyle;
38
+ private _fontWeight;
39
+ private _fontSize;
40
+ private _font;
41
+ /** @hidden */
42
+ _width: ValueAndUnit;
43
+ /** @hidden */
44
+ _height: ValueAndUnit;
45
+ /** @hidden */
46
+ protected _fontOffset: {
47
+ ascent: number;
48
+ height: number;
49
+ descent: number;
50
+ };
51
+ private _color;
52
+ private _style;
53
+ private _styleObserver;
54
+ /** @hidden */
55
+ protected _horizontalAlignment: number;
56
+ /** @hidden */
57
+ protected _verticalAlignment: number;
58
+ /** @hidden */
59
+ protected _isDirty: boolean;
60
+ /** @hidden */
61
+ protected _wasDirty: boolean;
62
+ /** @hidden */
63
+ _tempParentMeasure: Measure;
64
+ /** @hidden */
65
+ _prevCurrentMeasureTransformedIntoGlobalSpace: Measure;
66
+ /** @hidden */
67
+ protected _cachedParentMeasure: Measure;
68
+ private _descendantsOnlyPadding;
69
+ private _paddingLeft;
70
+ private _paddingRight;
71
+ private _paddingTop;
72
+ private _paddingBottom;
73
+ /** @hidden */
74
+ _left: ValueAndUnit;
75
+ /** @hidden */
76
+ _top: ValueAndUnit;
77
+ private _scaleX;
78
+ private _scaleY;
79
+ private _rotation;
80
+ private _transformCenterX;
81
+ private _transformCenterY;
82
+ /** @hidden */
83
+ _transformMatrix: Matrix2D;
84
+ /** @hidden */
85
+ protected _invertTransformMatrix: Matrix2D;
86
+ /** @hidden */
87
+ protected _transformedPosition: Vector2;
88
+ private _isMatrixDirty;
89
+ private _cachedOffsetX;
90
+ private _cachedOffsetY;
91
+ private _isVisible;
92
+ private _isHighlighted;
93
+ private _highlightColor;
94
+ protected _highlightLineWidth: number;
95
+ /** @hidden */
96
+ _linkedMesh: Nullable<TransformNode>;
97
+ private _fontSet;
98
+ private _dummyVector2;
99
+ private _downCount;
100
+ private _enterCount;
101
+ private _doNotRender;
102
+ private _downPointerIds;
103
+ private _evaluatedMeasure;
104
+ private _evaluatedParentMeasure;
105
+ protected _isEnabled: boolean;
106
+ protected _disabledColor: string;
107
+ protected _disabledColorItem: string;
108
+ protected _isReadOnly: boolean;
109
+ /** @hidden */
110
+ protected _rebuildLayout: boolean;
111
+ /** @hidden */
112
+ _customData: any;
113
+ /** @hidden */
114
+ _isClipped: boolean;
115
+ /** @hidden */
116
+ _automaticSize: boolean;
117
+ /** @hidden */
118
+ _tag: any;
119
+ /**
120
+ * Gets or sets the unique id of the node. Please note that this number will be updated when the control is added to a container
121
+ */
122
+ uniqueId: number;
123
+ /**
124
+ * Gets or sets a boolean indicating if the control is readonly (default: false).
125
+ * A readonly control will still raise pointer events but will not react to them
126
+ */
127
+ get isReadOnly(): boolean;
128
+ set isReadOnly(value: boolean);
129
+ /**
130
+ * Gets the transformed measure, that is the bounding box of the control after applying all transformations
131
+ */
132
+ get transformedMeasure(): Measure;
133
+ /**
134
+ * Gets or sets an object used to store user defined information for the node
135
+ */
136
+ metadata: any;
137
+ /** Gets or sets a boolean indicating if the control can be hit with pointer events */
138
+ isHitTestVisible: boolean;
139
+ /** Gets or sets a boolean indicating if the control can block pointer events */
140
+ isPointerBlocker: boolean;
141
+ /** Gets or sets a boolean indicating if the control can be focusable */
142
+ isFocusInvisible: boolean;
143
+ /**
144
+ * Gets or sets a boolean indicating if the children are clipped to the current control bounds.
145
+ * Please note that not clipping children may generate issues with adt.useInvalidateRectOptimization so it is recommended to turn this optimization off if you want to use unclipped children
146
+ */
147
+ clipChildren: boolean;
148
+ /**
149
+ * Gets or sets a boolean indicating that control content must be clipped
150
+ * Please note that not clipping children may generate issues with adt.useInvalidateRectOptimization so it is recommended to turn this optimization off if you want to use unclipped children
151
+ */
152
+ clipContent: boolean;
153
+ /**
154
+ * Gets or sets a boolean indicating that the current control should cache its rendering (useful when the control does not change often)
155
+ */
156
+ useBitmapCache: boolean;
157
+ private _cacheData;
158
+ private _shadowOffsetX;
159
+ /** Gets or sets a value indicating the offset to apply on X axis to render the shadow */
160
+ get shadowOffsetX(): number;
161
+ set shadowOffsetX(value: number);
162
+ private _shadowOffsetY;
163
+ /** Gets or sets a value indicating the offset to apply on Y axis to render the shadow */
164
+ get shadowOffsetY(): number;
165
+ set shadowOffsetY(value: number);
166
+ private _shadowBlur;
167
+ private _previousShadowBlur;
168
+ /** Gets or sets a value indicating the amount of blur to use to render the shadow */
169
+ get shadowBlur(): number;
170
+ set shadowBlur(value: number);
171
+ private _shadowColor;
172
+ /** Gets or sets a value indicating the color of the shadow (black by default ie. "#000") */
173
+ get shadowColor(): string;
174
+ set shadowColor(value: string);
175
+ /** Gets or sets the cursor to use when the control is hovered */
176
+ hoverCursor: string;
177
+ /** @hidden */
178
+ protected _linkOffsetX: ValueAndUnit;
179
+ /** @hidden */
180
+ protected _linkOffsetY: ValueAndUnit;
181
+ /** Gets the control type name */
182
+ get typeName(): string;
183
+ /**
184
+ * Get the current class name of the control.
185
+ * @returns current class name
186
+ */
187
+ getClassName(): string;
188
+ /**
189
+ * An event triggered when pointer wheel is scrolled
190
+ */
191
+ onWheelObservable: Observable<Vector2>;
192
+ /**
193
+ * An event triggered when the pointer moves over the control.
194
+ */
195
+ onPointerMoveObservable: Observable<Vector2>;
196
+ /**
197
+ * An event triggered when the pointer moves out of the control.
198
+ */
199
+ onPointerOutObservable: Observable<Control>;
200
+ /**
201
+ * An event triggered when the pointer taps the control
202
+ */
203
+ onPointerDownObservable: Observable<Vector2WithInfo>;
204
+ /**
205
+ * An event triggered when pointer up
206
+ */
207
+ onPointerUpObservable: Observable<Vector2WithInfo>;
208
+ /**
209
+ * An event triggered when a control is clicked on
210
+ */
211
+ onPointerClickObservable: Observable<Vector2WithInfo>;
212
+ /**
213
+ * An event triggered when pointer enters the control
214
+ */
215
+ onPointerEnterObservable: Observable<Control>;
216
+ /**
217
+ * An event triggered when the control is marked as dirty
218
+ */
219
+ onDirtyObservable: Observable<Control>;
220
+ /**
221
+ * An event triggered before drawing the control
222
+ */
223
+ onBeforeDrawObservable: Observable<Control>;
224
+ /**
225
+ * An event triggered after the control was drawn
226
+ */
227
+ onAfterDrawObservable: Observable<Control>;
228
+ /**
229
+ * An event triggered when the control has been disposed
230
+ */
231
+ onDisposeObservable: Observable<Control>;
232
+ /**
233
+ * Get the hosting AdvancedDynamicTexture
234
+ */
235
+ get host(): AdvancedDynamicTexture;
236
+ /** Gets or set information about font offsets (used to render and align text) */
237
+ get fontOffset(): {
238
+ ascent: number;
239
+ height: number;
240
+ descent: number;
241
+ };
242
+ set fontOffset(offset: {
243
+ ascent: number;
244
+ height: number;
245
+ descent: number;
246
+ });
247
+ /** Gets or sets alpha value for the control (1 means opaque and 0 means entirely transparent) */
248
+ get alpha(): number;
249
+ set alpha(value: number);
250
+ /**
251
+ * Gets or sets a number indicating size of stroke we want to highlight the control with (mostly for debugging purpose)
252
+ */
253
+ get highlightLineWidth(): number;
254
+ set highlightLineWidth(value: number);
255
+ /**
256
+ * Gets or sets a boolean indicating that we want to highlight the control (mostly for debugging purpose)
257
+ */
258
+ get isHighlighted(): boolean;
259
+ set isHighlighted(value: boolean);
260
+ /**
261
+ * Gets or sets a string defining the color to use for highlighting this control
262
+ */
263
+ get highlightColor(): string;
264
+ set highlightColor(value: string);
265
+ /** Gets or sets a value indicating the scale factor on X axis (1 by default)
266
+ * @see https://doc.babylonjs.com/how_to/gui#rotation-and-scaling
267
+ */
268
+ get scaleX(): number;
269
+ set scaleX(value: number);
270
+ /** Gets or sets a value indicating the scale factor on Y axis (1 by default)
271
+ * @see https://doc.babylonjs.com/how_to/gui#rotation-and-scaling
272
+ */
273
+ get scaleY(): number;
274
+ set scaleY(value: number);
275
+ /** Gets or sets the rotation angle (0 by default)
276
+ * @see https://doc.babylonjs.com/how_to/gui#rotation-and-scaling
277
+ */
278
+ get rotation(): number;
279
+ set rotation(value: number);
280
+ /** Gets or sets the transformation center on Y axis (0 by default)
281
+ * @see https://doc.babylonjs.com/how_to/gui#rotation-and-scaling
282
+ */
283
+ get transformCenterY(): number;
284
+ set transformCenterY(value: number);
285
+ /** Gets or sets the transformation center on X axis (0 by default)
286
+ * @see https://doc.babylonjs.com/how_to/gui#rotation-and-scaling
287
+ */
288
+ get transformCenterX(): number;
289
+ set transformCenterX(value: number);
290
+ /**
291
+ * Gets or sets the horizontal alignment
292
+ * @see https://doc.babylonjs.com/how_to/gui#alignments
293
+ */
294
+ get horizontalAlignment(): number;
295
+ set horizontalAlignment(value: number);
296
+ /**
297
+ * Gets or sets the vertical alignment
298
+ * @see https://doc.babylonjs.com/how_to/gui#alignments
299
+ */
300
+ get verticalAlignment(): number;
301
+ set verticalAlignment(value: number);
302
+ /**
303
+ * Gets or sets a fixed ratio for this control.
304
+ * When different from 0, the ratio is used to compute the "second" dimension.
305
+ * The first dimension used in the computation is the last one set (by setting width / widthInPixels or height / heightInPixels), and the
306
+ * second dimension is computed as first dimension * fixedRatio
307
+ */
308
+ fixedRatio: number;
309
+ private _fixedRatioMasterIsWidth;
310
+ /**
311
+ * Gets or sets control width
312
+ * @see https://doc.babylonjs.com/how_to/gui#position-and-size
313
+ */
314
+ get width(): string | number;
315
+ set width(value: string | number);
316
+ /**
317
+ * Gets or sets the control width in pixel
318
+ * @see https://doc.babylonjs.com/how_to/gui#position-and-size
319
+ */
320
+ get widthInPixels(): number;
321
+ set widthInPixels(value: number);
322
+ /**
323
+ * Gets or sets control height
324
+ * @see https://doc.babylonjs.com/how_to/gui#position-and-size
325
+ */
326
+ get height(): string | number;
327
+ set height(value: string | number);
328
+ /**
329
+ * Gets or sets control height in pixel
330
+ * @see https://doc.babylonjs.com/how_to/gui#position-and-size
331
+ */
332
+ get heightInPixels(): number;
333
+ set heightInPixels(value: number);
334
+ /** Gets or set font family */
335
+ get fontFamily(): string;
336
+ set fontFamily(value: string);
337
+ /** Gets or sets font style */
338
+ get fontStyle(): string;
339
+ set fontStyle(value: string);
340
+ /** Gets or sets font weight */
341
+ get fontWeight(): string;
342
+ set fontWeight(value: string);
343
+ /**
344
+ * Gets or sets style
345
+ * @see https://doc.babylonjs.com/how_to/gui#styles
346
+ */
347
+ get style(): Nullable<Style>;
348
+ set style(value: Nullable<Style>);
349
+ /** @hidden */
350
+ get _isFontSizeInPercentage(): boolean;
351
+ /** Gets or sets font size in pixels */
352
+ get fontSizeInPixels(): number;
353
+ set fontSizeInPixels(value: number);
354
+ /** Gets or sets font size */
355
+ get fontSize(): string | number;
356
+ set fontSize(value: string | number);
357
+ /** Gets or sets foreground color */
358
+ get color(): string;
359
+ set color(value: string);
360
+ /** Gets or sets z index which is used to reorder controls on the z axis */
361
+ get zIndex(): number;
362
+ set zIndex(value: number);
363
+ /** Gets or sets a boolean indicating if the control can be rendered */
364
+ get notRenderable(): boolean;
365
+ set notRenderable(value: boolean);
366
+ /** Gets or sets a boolean indicating if the control is visible */
367
+ get isVisible(): boolean;
368
+ set isVisible(value: boolean);
369
+ /** Gets a boolean indicating that the control needs to update its rendering */
370
+ get isDirty(): boolean;
371
+ /**
372
+ * Gets the current linked mesh (or null if none)
373
+ */
374
+ get linkedMesh(): Nullable<TransformNode>;
375
+ /**
376
+ * Gets or sets a value indicating the padding should work like in CSS.
377
+ * Basically, it will add the padding amount on each side of the parent control for its children.
378
+ */
379
+ get descendantsOnlyPadding(): boolean;
380
+ set descendantsOnlyPadding(value: boolean);
381
+ /**
382
+ * Gets or sets a value indicating the padding to use on the left of the control
383
+ * @see https://doc.babylonjs.com/how_to/gui#position-and-size
384
+ */
385
+ get paddingLeft(): string | number;
386
+ set paddingLeft(value: string | number);
387
+ /**
388
+ * Gets or sets a value indicating the padding in pixels to use on the left of the control
389
+ * @see https://doc.babylonjs.com/how_to/gui#position-and-size
390
+ */
391
+ get paddingLeftInPixels(): number;
392
+ set paddingLeftInPixels(value: number);
393
+ /** @hidden */
394
+ get _paddingLeftInPixels(): number;
395
+ /**
396
+ * Gets or sets a value indicating the padding to use on the right of the control
397
+ * @see https://doc.babylonjs.com/how_to/gui#position-and-size
398
+ */
399
+ get paddingRight(): string | number;
400
+ set paddingRight(value: string | number);
401
+ /**
402
+ * Gets or sets a value indicating the padding in pixels to use on the right of the control
403
+ * @see https://doc.babylonjs.com/how_to/gui#position-and-size
404
+ */
405
+ get paddingRightInPixels(): number;
406
+ set paddingRightInPixels(value: number);
407
+ /** @hidden */
408
+ get _paddingRightInPixels(): number;
409
+ /**
410
+ * Gets or sets a value indicating the padding to use on the top of the control
411
+ * @see https://doc.babylonjs.com/how_to/gui#position-and-size
412
+ */
413
+ get paddingTop(): string | number;
414
+ set paddingTop(value: string | number);
415
+ /**
416
+ * Gets or sets a value indicating the padding in pixels to use on the top of the control
417
+ * @see https://doc.babylonjs.com/how_to/gui#position-and-size
418
+ */
419
+ get paddingTopInPixels(): number;
420
+ set paddingTopInPixels(value: number);
421
+ /** @hidden */
422
+ get _paddingTopInPixels(): number;
423
+ /**
424
+ * Gets or sets a value indicating the padding to use on the bottom of the control
425
+ * @see https://doc.babylonjs.com/how_to/gui#position-and-size
426
+ */
427
+ get paddingBottom(): string | number;
428
+ set paddingBottom(value: string | number);
429
+ /**
430
+ * Gets or sets a value indicating the padding in pixels to use on the bottom of the control
431
+ * @see https://doc.babylonjs.com/how_to/gui#position-and-size
432
+ */
433
+ get paddingBottomInPixels(): number;
434
+ set paddingBottomInPixels(value: number);
435
+ /** @hidden */
436
+ get _paddingBottomInPixels(): number;
437
+ /**
438
+ * Gets or sets a value indicating the left coordinate of the control
439
+ * @see https://doc.babylonjs.com/how_to/gui#position-and-size
440
+ */
441
+ get left(): string | number;
442
+ set left(value: string | number);
443
+ /**
444
+ * Gets or sets a value indicating the left coordinate in pixels of the control
445
+ * @see https://doc.babylonjs.com/how_to/gui#position-and-size
446
+ */
447
+ get leftInPixels(): number;
448
+ set leftInPixels(value: number);
449
+ /**
450
+ * Gets or sets a value indicating the top coordinate of the control
451
+ * @see https://doc.babylonjs.com/how_to/gui#position-and-size
452
+ */
453
+ get top(): string | number;
454
+ set top(value: string | number);
455
+ /**
456
+ * Gets or sets a value indicating the top coordinate in pixels of the control
457
+ * @see https://doc.babylonjs.com/how_to/gui#position-and-size
458
+ */
459
+ get topInPixels(): number;
460
+ set topInPixels(value: number);
461
+ /**
462
+ * Gets or sets a value indicating the offset on X axis to the linked mesh
463
+ * @see https://doc.babylonjs.com/how_to/gui#tracking-positions
464
+ */
465
+ get linkOffsetX(): string | number;
466
+ set linkOffsetX(value: string | number);
467
+ /**
468
+ * Gets or sets a value indicating the offset in pixels on X axis to the linked mesh
469
+ * @see https://doc.babylonjs.com/how_to/gui#tracking-positions
470
+ */
471
+ get linkOffsetXInPixels(): number;
472
+ set linkOffsetXInPixels(value: number);
473
+ /**
474
+ * Gets or sets a value indicating the offset on Y axis to the linked mesh
475
+ * @see https://doc.babylonjs.com/how_to/gui#tracking-positions
476
+ */
477
+ get linkOffsetY(): string | number;
478
+ set linkOffsetY(value: string | number);
479
+ /**
480
+ * Gets or sets a value indicating the offset in pixels on Y axis to the linked mesh
481
+ * @see https://doc.babylonjs.com/how_to/gui#tracking-positions
482
+ */
483
+ get linkOffsetYInPixels(): number;
484
+ set linkOffsetYInPixels(value: number);
485
+ /** Gets the center coordinate on X axis */
486
+ get centerX(): number;
487
+ /** Gets the center coordinate on Y axis */
488
+ get centerY(): number;
489
+ /** Gets or sets if control is Enabled */
490
+ get isEnabled(): boolean;
491
+ set isEnabled(value: boolean);
492
+ /** Gets or sets background color of control if it's disabled. Only applies to Button class. */
493
+ get disabledColor(): string;
494
+ set disabledColor(value: string);
495
+ /** Gets or sets front color of control if it's disabled. Only applies to Checkbox class. */
496
+ get disabledColorItem(): string;
497
+ set disabledColorItem(value: string);
498
+ /**
499
+ * Gets/sets the overlap group of the control.
500
+ * Controls with overlapGroup set to a number can be deoverlapped.
501
+ * Controls with overlapGroup set to undefined are not deoverlapped.
502
+ * @see https://doc.babylonjs.com/how_to/gui#deoverlapping
503
+ */
504
+ overlapGroup?: number;
505
+ /**
506
+ * Gets/sets the deoverlap movement multiplier
507
+ */
508
+ overlapDeltaMultiplier?: number;
509
+ /**
510
+ * Creates a new control
511
+ * @param name defines the name of the control
512
+ */
513
+ constructor(
514
+ /** defines the name of the control */
515
+ name?: string | undefined);
516
+ /** @hidden */
517
+ protected _getTypeName(): string;
518
+ /**
519
+ * Gets the first ascendant in the hierarchy of the given type
520
+ * @param className defines the required type
521
+ * @returns the ascendant or null if not found
522
+ */
523
+ getAscendantOfClass(className: string): Nullable<Control>;
524
+ /**
525
+ * Mark control element as dirty
526
+ * @param force force non visible elements to be marked too
527
+ */
528
+ markAsDirty(force?: boolean): void;
529
+ /**
530
+ * Mark the element and its children as dirty
531
+ */
532
+ markAllAsDirty(): void;
533
+ /** @hidden */
534
+ _resetFontCache(): void;
535
+ /**
536
+ * Determines if a container is an ascendant of the current control
537
+ * @param container defines the container to look for
538
+ * @returns true if the container is one of the ascendant of the control
539
+ */
540
+ isAscendant(container: Control): boolean;
541
+ /**
542
+ * Gets coordinates in local control space
543
+ * @param globalCoordinates defines the coordinates to transform
544
+ * @returns the new coordinates in local space
545
+ */
546
+ getLocalCoordinates(globalCoordinates: Vector2): Vector2;
547
+ /**
548
+ * Gets coordinates in local control space
549
+ * @param globalCoordinates defines the coordinates to transform
550
+ * @param result defines the target vector2 where to store the result
551
+ * @returns the current control
552
+ */
553
+ getLocalCoordinatesToRef(globalCoordinates: Vector2, result: Vector2): Control;
554
+ /**
555
+ * Gets coordinates in parent local control space
556
+ * @param globalCoordinates defines the coordinates to transform
557
+ * @returns the new coordinates in parent local space
558
+ */
559
+ getParentLocalCoordinates(globalCoordinates: Vector2): Vector2;
560
+ /**
561
+ * Move the current control to a vector3 position projected onto the screen.
562
+ * @param position defines the target position
563
+ * @param scene defines the hosting scene
564
+ */
565
+ moveToVector3(position: Vector3, scene: Scene): void;
566
+ /**
567
+ * Will store all controls that have this control as ascendant in a given array
568
+ * @param results defines the array where to store the descendants
569
+ * @param directDescendantsOnly defines if true only direct descendants of 'this' will be considered, if false direct and also indirect (children of children, an so on in a recursive manner) descendants of 'this' will be considered
570
+ * @param predicate defines an optional predicate that will be called on every evaluated child, the predicate must return true for a given child to be part of the result, otherwise it will be ignored
571
+ */
572
+ getDescendantsToRef(results: Control[], directDescendantsOnly?: boolean, predicate?: (control: Control) => boolean): void;
573
+ /**
574
+ * Will return all controls that have this control as ascendant
575
+ * @param directDescendantsOnly defines if true only direct descendants of 'this' will be considered, if false direct and also indirect (children of children, an so on in a recursive manner) descendants of 'this' will be considered
576
+ * @param predicate defines an optional predicate that will be called on every evaluated child, the predicate must return true for a given child to be part of the result, otherwise it will be ignored
577
+ * @return all child controls
578
+ */
579
+ getDescendants(directDescendantsOnly?: boolean, predicate?: (control: Control) => boolean): Control[];
580
+ /**
581
+ * Link current control with a target mesh
582
+ * @param mesh defines the mesh to link with
583
+ * @see https://doc.babylonjs.com/how_to/gui#tracking-positions
584
+ */
585
+ linkWithMesh(mesh: Nullable<TransformNode>): void;
586
+ /**
587
+ * Shorthand function to set the top, right, bottom, and left padding values on the control.
588
+ * @param { string | number} paddingTop - The value of the top padding.
589
+ * @param { string | number} paddingRight - The value of the right padding. If omitted, top is used.
590
+ * @param { string | number} paddingBottom - The value of the bottom padding. If omitted, top is used.
591
+ * @param { string | number} paddingLeft - The value of the left padding. If omitted, right is used.
592
+ * @see https://doc.babylonjs.com/how_to/gui#position-and-size
593
+ */
594
+ setPadding(paddingTop: string | number, paddingRight?: string | number, paddingBottom?: string | number, paddingLeft?: string | number): void;
595
+ /**
596
+ * Shorthand funtion to set the top, right, bottom, and left padding values in pixels on the control.
597
+ * @param { number} paddingTop - The value in pixels of the top padding.
598
+ * @param { number} paddingRight - The value in pixels of the right padding. If omitted, top is used.
599
+ * @param { number} paddingBottom - The value in pixels of the bottom padding. If omitted, top is used.
600
+ * @param { number} paddingLeft - The value in pixels of the left padding. If omitted, right is used.
601
+ * @see https://doc.babylonjs.com/how_to/gui#position-and-size
602
+ */
603
+ setPaddingInPixels(paddingTop: number, paddingRight?: number, paddingBottom?: number, paddingLeft?: number): void;
604
+ /**
605
+ * @param projectedPosition
606
+ * @hidden
607
+ */
608
+ _moveToProjectedPosition(projectedPosition: Vector3): void;
609
+ /**
610
+ * @param offset
611
+ * @hidden
612
+ */
613
+ _offsetLeft(offset: number): void;
614
+ /**
615
+ * @param offset
616
+ * @hidden
617
+ */
618
+ _offsetTop(offset: number): void;
619
+ /** @hidden */
620
+ _markMatrixAsDirty(): void;
621
+ /** @hidden */
622
+ _flagDescendantsAsMatrixDirty(): void;
623
+ /**
624
+ * @param rect
625
+ * @param context
626
+ * @hidden
627
+ */
628
+ _intersectsRect(rect: Measure, context?: ICanvasRenderingContext): boolean;
629
+ /** @hidden */
630
+ protected _computeAdditionnalOffsetX(): number;
631
+ /** @hidden */
632
+ protected _computeAdditionnalOffsetY(): number;
633
+ /** @hidden */
634
+ protected invalidateRect(): void;
635
+ /**
636
+ * @param force
637
+ * @hidden
638
+ */
639
+ _markAsDirty(force?: boolean): void;
640
+ /** @hidden */
641
+ _markAllAsDirty(): void;
642
+ /**
643
+ * @param host
644
+ * @hidden
645
+ */
646
+ _link(host: AdvancedDynamicTexture): void;
647
+ /**
648
+ * @param context
649
+ * @hidden
650
+ */
651
+ protected _transform(context?: ICanvasRenderingContext): void;
652
+ /**
653
+ * @param context
654
+ * @hidden
655
+ */
656
+ _renderHighlight(context: ICanvasRenderingContext): void;
657
+ /**
658
+ * @param context
659
+ * @hidden
660
+ */
661
+ _renderHighlightSpecific(context: ICanvasRenderingContext): void;
662
+ /**
663
+ * @param context
664
+ * @hidden
665
+ */
666
+ protected _applyStates(context: ICanvasRenderingContext): void;
667
+ /**
668
+ * @param parentMeasure
669
+ * @param context
670
+ * @hidden
671
+ */
672
+ _layout(parentMeasure: Measure, context: ICanvasRenderingContext): boolean;
673
+ /**
674
+ * @param parentMeasure
675
+ * @param context
676
+ * @hidden
677
+ */
678
+ protected _processMeasures(parentMeasure: Measure, context: ICanvasRenderingContext): void;
679
+ protected _evaluateClippingState(parentMeasure: Measure): void;
680
+ /** @hidden */
681
+ _measure(): void;
682
+ /**
683
+ * @param parentMeasure
684
+ * @param context
685
+ * @hidden
686
+ */
687
+ protected _computeAlignment(parentMeasure: Measure, context: ICanvasRenderingContext): void;
688
+ /**
689
+ * @param parentMeasure
690
+ * @param context
691
+ * @hidden
692
+ */
693
+ protected _preMeasure(parentMeasure: Measure, context: ICanvasRenderingContext): void;
694
+ /**
695
+ * @param parentMeasure
696
+ * @param context
697
+ * @hidden
698
+ */
699
+ protected _additionalProcessing(parentMeasure: Measure, context: ICanvasRenderingContext): void;
700
+ /**
701
+ * @param context
702
+ * @hidden
703
+ */
704
+ protected _clipForChildren(context: ICanvasRenderingContext): void;
705
+ private static _ClipMeasure;
706
+ private _tmpMeasureA;
707
+ private _clip;
708
+ /**
709
+ * @param context
710
+ * @param invalidatedRectangle
711
+ * @hidden
712
+ */
713
+ _render(context: ICanvasRenderingContext, invalidatedRectangle?: Nullable<Measure>): boolean;
714
+ /**
715
+ * @param context
716
+ * @param invalidatedRectangle
717
+ * @hidden
718
+ */
719
+ _draw(context: ICanvasRenderingContext, invalidatedRectangle?: Nullable<Measure>): void;
720
+ /**
721
+ * Tests if a given coordinates belong to the current control
722
+ * @param x defines x coordinate to test
723
+ * @param y defines y coordinate to test
724
+ * @returns true if the coordinates are inside the control
725
+ */
726
+ contains(x: number, y: number): boolean;
727
+ /**
728
+ * @param x
729
+ * @param y
730
+ * @param pi
731
+ * @param type
732
+ * @param pointerId
733
+ * @param buttonIndex
734
+ * @param deltaX
735
+ * @param deltaY
736
+ * @hidden
737
+ */
738
+ _processPicking(x: number, y: number, pi: Nullable<PointerInfoBase>, type: number, pointerId: number, buttonIndex: number, deltaX?: number, deltaY?: number): boolean;
739
+ /**
740
+ * @param target
741
+ * @param coordinates
742
+ * @param pointerId
743
+ * @param pi
744
+ * @hidden
745
+ */
746
+ _onPointerMove(target: Control, coordinates: Vector2, pointerId: number, pi: Nullable<PointerInfoBase>): void;
747
+ /**
748
+ * @param target
749
+ * @param pi
750
+ * @hidden
751
+ */
752
+ _onPointerEnter(target: Control, pi: Nullable<PointerInfoBase>): boolean;
753
+ /**
754
+ * @param target
755
+ * @param pi
756
+ * @param force
757
+ * @hidden
758
+ */
759
+ _onPointerOut(target: Control, pi: Nullable<PointerInfoBase>, force?: boolean): void;
760
+ /**
761
+ * @param target
762
+ * @param coordinates
763
+ * @param pointerId
764
+ * @param buttonIndex
765
+ * @param pi
766
+ * @hidden
767
+ */
768
+ _onPointerDown(target: Control, coordinates: Vector2, pointerId: number, buttonIndex: number, pi: Nullable<PointerInfoBase>): boolean;
769
+ /**
770
+ * @param target
771
+ * @param coordinates
772
+ * @param pointerId
773
+ * @param buttonIndex
774
+ * @param notifyClick
775
+ * @param pi
776
+ * @hidden
777
+ */
778
+ _onPointerUp(target: Control, coordinates: Vector2, pointerId: number, buttonIndex: number, notifyClick: boolean, pi?: Nullable<PointerInfoBase>): void;
779
+ /**
780
+ * @param pointerId
781
+ * @hidden
782
+ */
783
+ _forcePointerUp(pointerId?: Nullable<number>): void;
784
+ /**
785
+ * @param deltaX
786
+ * @param deltaY
787
+ * @hidden
788
+ */
789
+ _onWheelScroll(deltaX?: number, deltaY?: number): void;
790
+ /** @hidden */
791
+ _onCanvasBlur(): void;
792
+ /**
793
+ * @param type
794
+ * @param x
795
+ * @param y
796
+ * @param pi
797
+ * @param pointerId
798
+ * @param buttonIndex
799
+ * @param deltaX
800
+ * @param deltaY
801
+ * @hidden
802
+ */
803
+ _processObservables(type: number, x: number, y: number, pi: Nullable<PointerInfoBase>, pointerId: number, buttonIndex: number, deltaX?: number, deltaY?: number): boolean;
804
+ private _prepareFont;
805
+ /**
806
+ * Serializes the current control
807
+ * @param serializationObject defined the JSON serialized object
808
+ */
809
+ serialize(serializationObject: any): void;
810
+ /**
811
+ * @param serializedObject
812
+ * @param host
813
+ * @hidden
814
+ */
815
+ _parseFromContent(serializedObject: any, host: AdvancedDynamicTexture): void;
816
+ /** Releases associated resources */
817
+ dispose(): void;
818
+ private static _HORIZONTAL_ALIGNMENT_LEFT;
819
+ private static _HORIZONTAL_ALIGNMENT_RIGHT;
820
+ private static _HORIZONTAL_ALIGNMENT_CENTER;
821
+ private static _VERTICAL_ALIGNMENT_TOP;
822
+ private static _VERTICAL_ALIGNMENT_BOTTOM;
823
+ private static _VERTICAL_ALIGNMENT_CENTER;
824
+ /** HORIZONTAL_ALIGNMENT_LEFT */
825
+ static get HORIZONTAL_ALIGNMENT_LEFT(): number;
826
+ /** HORIZONTAL_ALIGNMENT_RIGHT */
827
+ static get HORIZONTAL_ALIGNMENT_RIGHT(): number;
828
+ /** HORIZONTAL_ALIGNMENT_CENTER */
829
+ static get HORIZONTAL_ALIGNMENT_CENTER(): number;
830
+ /** VERTICAL_ALIGNMENT_TOP */
831
+ static get VERTICAL_ALIGNMENT_TOP(): number;
832
+ /** VERTICAL_ALIGNMENT_BOTTOM */
833
+ static get VERTICAL_ALIGNMENT_BOTTOM(): number;
834
+ /** VERTICAL_ALIGNMENT_CENTER */
835
+ static get VERTICAL_ALIGNMENT_CENTER(): number;
836
+ private static _FontHeightSizes;
837
+ /**
838
+ * @param font
839
+ * @hidden
840
+ */
841
+ static _GetFontOffset(font: string): {
842
+ ascent: number;
843
+ height: number;
844
+ descent: number;
845
+ };
846
+ /**
847
+ * Creates a Control from parsed data
848
+ * @param serializedObject defines parsed data
849
+ * @param host defines the hosting AdvancedDynamicTexture
850
+ * @returns a new Control
851
+ */
852
+ static Parse(serializedObject: any, host: AdvancedDynamicTexture): Control;
853
+ static AddHeader: (control: Control, text: string, size: string | number, options: {
854
+ isHorizontal: boolean;
855
+ controlFirst: boolean;
856
+ }) => any;
857
+ /**
858
+ * @param x
859
+ * @param y
860
+ * @param width
861
+ * @param height
862
+ * @param context
863
+ * @hidden
864
+ */
865
+ protected static drawEllipse(x: number, y: number, width: number, height: number, context: ICanvasRenderingContext): void;
866
+ }