babylonjs-gui 5.11.0 → 5.13.0

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.
@@ -1298,7 +1298,7 @@ export class Control {
1298
1298
  * second dimension is computed as first dimension * fixedRatio
1299
1299
  */
1300
1300
  fixedRatio: number;
1301
- private _fixedRatioMasterIsWidth;
1301
+ protected _fixedRatioMasterIsWidth: boolean;
1302
1302
  /**
1303
1303
  * Gets or sets control width
1304
1304
  * @see https://doc.babylonjs.com/how_to/gui#position-and-size
@@ -2222,6 +2222,11 @@ export class Image extends Control {
2222
2222
  * Observable notified when _sourceLeft, _sourceTop, _sourceWidth and _sourceHeight are computed
2223
2223
  */
2224
2224
  onSVGAttributesComputedObservable: Observable<Image>;
2225
+ /**
2226
+ * Gets or sets the referrer policy to apply on the img element load request.
2227
+ * You should set referrerPolicy before set the source of the image if you want to ensure the header will be present on the xhr loading request
2228
+ */
2229
+ referrerPolicy: Nullable<ReferrerPolicy>;
2225
2230
  /**
2226
2231
  * Gets a boolean indicating that the content is loaded
2227
2232
  */
@@ -2398,6 +2403,7 @@ export * from "babylonjs-gui/2D/controls/focusableControl";
2398
2403
  export * from "babylonjs-gui/2D/controls/grid";
2399
2404
  export * from "babylonjs-gui/2D/controls/image";
2400
2405
  export * from "babylonjs-gui/2D/controls/inputText";
2406
+ export * from "babylonjs-gui/2D/controls/inputTextArea";
2401
2407
  export * from "babylonjs-gui/2D/controls/inputPassword";
2402
2408
  export * from "babylonjs-gui/2D/controls/line";
2403
2409
  export * from "babylonjs-gui/2D/controls/multiLine";
@@ -2433,11 +2439,14 @@ export class InputPassword extends InputText {
2433
2439
  }
2434
2440
  declare module "babylonjs-gui/2D/controls/inputText" {
2435
2441
  import { Nullable } from "babylonjs/types";
2442
+ import { Observer } from "babylonjs/Misc/observable";
2436
2443
  import { Observable } from "babylonjs/Misc/observable";
2437
2444
  import { Vector2 } from "babylonjs/Maths/math.vector";
2438
- import { PointerInfoBase } from "babylonjs/Events/pointerEvents";
2445
+ import { ClipboardInfo } from "babylonjs/Events/clipboardEvents";
2446
+ import { PointerInfo, PointerInfoBase } from "babylonjs/Events/pointerEvents";
2439
2447
  import { Control } from "babylonjs-gui/2D/controls/control";
2440
2448
  import { IFocusableControl } from "babylonjs-gui/2D/controls/focusableControl";
2449
+ import { ValueAndUnit } from "babylonjs-gui/2D/valueAndUnit";
2441
2450
  import { VirtualKeyboard } from "babylonjs-gui/2D/controls/virtualKeyboard";
2442
2451
  import { TextWrapper } from "babylonjs-gui/2D/controls/textWrapper";
2443
2452
  import { IKeyboardEvent } from "babylonjs/Events/deviceInputEvents";
@@ -2447,39 +2456,39 @@ import { ICanvasRenderingContext } from "babylonjs/Engines/ICanvas";
2447
2456
  */
2448
2457
  export class InputText extends Control implements IFocusableControl {
2449
2458
  name?: string | undefined;
2450
- private _textWrapper;
2451
- private _placeholderText;
2452
- private _background;
2453
- private _focusedBackground;
2454
- private _focusedColor;
2455
- private _placeholderColor;
2456
- private _thickness;
2457
- private _margin;
2458
- private _autoStretchWidth;
2459
- private _maxWidth;
2460
- private _isFocused;
2459
+ protected _textWrapper: TextWrapper;
2460
+ protected _placeholderText: string;
2461
+ protected _background: string;
2462
+ protected _focusedBackground: string;
2463
+ protected _focusedColor: string;
2464
+ protected _placeholderColor: string;
2465
+ protected _thickness: number;
2466
+ protected _margin: ValueAndUnit;
2467
+ protected _autoStretchWidth: boolean;
2468
+ protected _maxWidth: ValueAndUnit;
2469
+ protected _isFocused: boolean;
2461
2470
  /** the type of device that most recently focused the input: "mouse", "touch" or "pen" */
2462
- private _focusedBy;
2463
- private _blinkTimeout;
2464
- private _blinkIsEven;
2471
+ protected _focusedBy: string;
2472
+ protected _blinkTimeout: number;
2473
+ protected _blinkIsEven: boolean;
2465
2474
  private _cursorOffset;
2466
- private _scrollLeft;
2467
- private _textWidth;
2468
- private _clickedCoordinate;
2469
- private _deadKey;
2470
- private _addKey;
2471
- private _currentKey;
2472
- private _isTextHighlightOn;
2473
- private _textHighlightColor;
2474
- private _highligherOpacity;
2475
- private _highlightedText;
2475
+ protected _scrollLeft: Nullable<number>;
2476
+ protected _textWidth: number;
2477
+ protected _clickedCoordinate: Nullable<number>;
2478
+ protected _deadKey: boolean;
2479
+ protected _addKey: boolean;
2480
+ protected _currentKey: string;
2481
+ protected _isTextHighlightOn: boolean;
2482
+ protected _textHighlightColor: string;
2483
+ protected _highligherOpacity: number;
2484
+ protected _highlightedText: string;
2476
2485
  private _startHighlightIndex;
2477
2486
  private _endHighlightIndex;
2478
2487
  private _cursorIndex;
2479
- private _onFocusSelectAll;
2480
- private _isPointerDown;
2481
- private _onClipboardObserver;
2482
- private _onPointerDblTapObserver;
2488
+ protected _onFocusSelectAll: boolean;
2489
+ protected _isPointerDown: boolean;
2490
+ protected _onClipboardObserver: Nullable<Observer<ClipboardInfo>>;
2491
+ protected _onPointerDblTapObserver: Nullable<Observer<PointerInfo>>;
2483
2492
  /** @hidden */
2484
2493
  _connectedVirtualKeyboard: Nullable<VirtualKeyboard>;
2485
2494
  /** Gets or sets a string representing the message displayed on mobile when the control gets the focus */
@@ -2559,7 +2568,7 @@ export class InputText extends Control implements IFocusableControl {
2559
2568
  /** Gets or sets the text displayed in the control */
2560
2569
  get text(): string;
2561
2570
  set text(value: string);
2562
- private _textHasChanged;
2571
+ protected _textHasChanged(): void;
2563
2572
  /** Gets or sets control width */
2564
2573
  get width(): string | number;
2565
2574
  set width(value: string | number);
@@ -2598,14 +2607,14 @@ export class InputText extends Control implements IFocusableControl {
2598
2607
  * @param offset
2599
2608
  * @hidden
2600
2609
  */
2601
- private _updateValueFromCursorIndex;
2610
+ protected _updateValueFromCursorIndex(offset: number): void;
2602
2611
  /**
2603
2612
  * @param evt
2604
2613
  * @hidden
2605
2614
  */
2606
- private _processDblClick;
2615
+ protected _processDblClick(evt: PointerInfo): void;
2607
2616
  /** @hidden */
2608
- private _selectAllText;
2617
+ protected _selectAllText(): void;
2609
2618
  /**
2610
2619
  * Handles the keyboard event
2611
2620
  * @param evt Defines the KeyboardEvent
@@ -2615,17 +2624,17 @@ export class InputText extends Control implements IFocusableControl {
2615
2624
  * @param ev
2616
2625
  * @hidden
2617
2626
  */
2618
- private _onCopyText;
2627
+ protected _onCopyText(ev: ClipboardEvent): void;
2619
2628
  /**
2620
2629
  * @param ev
2621
2630
  * @hidden
2622
2631
  */
2623
- private _onCutText;
2632
+ protected _onCutText(ev: ClipboardEvent): void;
2624
2633
  /**
2625
2634
  * @param ev
2626
2635
  * @hidden
2627
2636
  */
2628
- private _onPasteText;
2637
+ protected _onPasteText(ev: ClipboardEvent): void;
2629
2638
  _draw(context: ICanvasRenderingContext): void;
2630
2639
  _onPointerDown(target: Control, coordinates: Vector2, pointerId: number, buttonIndex: number, pi: PointerInfoBase): boolean;
2631
2640
  _onPointerMove(target: Control, coordinates: Vector2, pointerId: number, pi: PointerInfoBase): void;
@@ -2634,6 +2643,169 @@ export class InputText extends Control implements IFocusableControl {
2634
2643
  dispose(): void;
2635
2644
  }
2636
2645
 
2646
+ }
2647
+ declare module "babylonjs-gui/2D/controls/inputTextArea" {
2648
+ import { Nullable } from "babylonjs/types";
2649
+ import { Observable } from "babylonjs/Misc/observable";
2650
+ import { Vector2 } from "babylonjs/Maths/math.vector";
2651
+ import { Control } from "babylonjs-gui/2D/controls/control";
2652
+ import { VirtualKeyboard } from "babylonjs-gui/2D/controls/virtualKeyboard";
2653
+ import { Measure } from "babylonjs-gui/2D/measure";
2654
+ import { InputText } from "babylonjs-gui/2D/controls/inputText";
2655
+ import { ICanvasRenderingContext } from "babylonjs/Engines/ICanvas";
2656
+ import { PointerInfo, PointerInfoBase } from "babylonjs/Events/pointerEvents";
2657
+ import { IKeyboardEvent } from "babylonjs/Events/deviceInputEvents";
2658
+ /**
2659
+ * Class used to create input text control
2660
+ */
2661
+ export class InputTextArea extends InputText {
2662
+ name?: string | undefined;
2663
+ private _textHorizontalAlignment;
2664
+ private _textVerticalAlignment;
2665
+ private _lines;
2666
+ private _lineSpacing;
2667
+ private _outlineWidth;
2668
+ private _outlineColor;
2669
+ private _maxHeight;
2670
+ private _clipTextTop;
2671
+ private _clipTextLeft;
2672
+ private _cursorInfo;
2673
+ private _highlightCursorInfo;
2674
+ /**
2675
+ * An event triggered after the text was broken up into lines
2676
+ */
2677
+ onLinesReadyObservable: Observable<InputTextArea>;
2678
+ /** @hidden */
2679
+ _connectedVirtualKeyboard: Nullable<VirtualKeyboard>;
2680
+ private _contextForBreakLines;
2681
+ private _clickedCoordinateX;
2682
+ private _clickedCoordinateY;
2683
+ private _availableWidth;
2684
+ private _availableHeight;
2685
+ private _scrollTop;
2686
+ private _autoStretchHeight;
2687
+ /**
2688
+ * Gets or sets outlineWidth of the text to display
2689
+ */
2690
+ get outlineWidth(): number;
2691
+ /**
2692
+ * Gets or sets outlineWidth of the text to display
2693
+ */
2694
+ set outlineWidth(value: number);
2695
+ /**
2696
+ * Gets or sets outlineColor of the text to display
2697
+ */
2698
+ get outlineColor(): string;
2699
+ /**
2700
+ * Gets or sets outlineColor of the text to display
2701
+ */
2702
+ set outlineColor(value: string);
2703
+ /** Gets or sets a boolean indicating if the control can auto stretch its height to adapt to the text */
2704
+ get autoStretchHeight(): boolean;
2705
+ set autoStretchHeight(value: boolean);
2706
+ set height(value: string | number);
2707
+ get maxHeight(): string | number;
2708
+ /** Gets the maximum width allowed by the control in pixels */
2709
+ get maxHeightInPixels(): number;
2710
+ set maxHeight(value: string | number);
2711
+ /**
2712
+ * Creates a new InputTextArea
2713
+ * @param name defines the control name
2714
+ * @param text defines the text of the control
2715
+ */
2716
+ constructor(name?: string | undefined, text?: string);
2717
+ protected _getTypeName(): string;
2718
+ /**
2719
+ * Handles the keyboard event
2720
+ * @param evt Defines the KeyboardEvent
2721
+ */
2722
+ processKeyboard(evt: IKeyboardEvent): void;
2723
+ /**
2724
+ * Process the last keyboard input
2725
+ *
2726
+ * @param code The ascii input number
2727
+ * @param key The key string representation
2728
+ * @param evt The keyboard event emits with input
2729
+ * @hidden
2730
+ */
2731
+ alternativeProcessKey(code: string, key?: string, evt?: IKeyboardEvent): void;
2732
+ protected _parseLineWordWrap(line: string | undefined, width: number, context: ICanvasRenderingContext): {
2733
+ text: string;
2734
+ width: number;
2735
+ lineEnding: string;
2736
+ }[];
2737
+ protected _breakLines(refWidth: number, context: ICanvasRenderingContext): object[];
2738
+ protected _parseLine(line: string | undefined, context: ICanvasRenderingContext): {
2739
+ text: string;
2740
+ width: number;
2741
+ lineEnding: string;
2742
+ };
2743
+ /**
2744
+ * Processing of child right before the parent measurement update
2745
+ *
2746
+ * @param parentMeasure The parent measure
2747
+ * @param context The rendering canvas
2748
+ * @hidden
2749
+ */
2750
+ protected _preMeasure(parentMeasure: Measure, context: ICanvasRenderingContext): void;
2751
+ /**
2752
+ * Processing of child after the parent measurement update
2753
+ *
2754
+ * @param parentMeasure The parent measure
2755
+ * @param context The rendering canvas
2756
+ * @hidden
2757
+ */
2758
+ protected _additionalProcessing(parentMeasure: Measure, context: ICanvasRenderingContext): void;
2759
+ private _drawText;
2760
+ /**
2761
+ * Copy the text in the clipboard
2762
+ *
2763
+ * @param ev The clipboard event
2764
+ * @hidden
2765
+ */
2766
+ protected _onCopyText(ev: ClipboardEvent): void;
2767
+ /**
2768
+ * Cut the text and copy it in the clipboard
2769
+ *
2770
+ * @param ev The clipboard event
2771
+ * @hidden
2772
+ */
2773
+ protected _onCutText(ev: ClipboardEvent): void;
2774
+ /**
2775
+ * Paste the copied text from the clipboard
2776
+ *
2777
+ * @param ev The clipboard event
2778
+ * @hidden
2779
+ */
2780
+ protected _onPasteText(ev: ClipboardEvent): void;
2781
+ _draw(context: ICanvasRenderingContext): void;
2782
+ private _resetBlinking;
2783
+ protected _applyStates(context: ICanvasRenderingContext): void;
2784
+ _onPointerDown(target: Control, coordinates: Vector2, pointerId: number, buttonIndex: number, pi: PointerInfoBase): boolean;
2785
+ _onPointerMove(target: Control, coordinates: Vector2, pointerId: number, pi: PointerInfoBase): void;
2786
+ /**
2787
+ * Apply the correct position of cursor according to current modification
2788
+ */
2789
+ private _updateCursorPosition;
2790
+ /**
2791
+ * Update all values of cursor information based on cursorIndex value
2792
+ *
2793
+ * @param offset The index to take care of
2794
+ * @hidden
2795
+ */
2796
+ protected _updateValueFromCursorIndex(offset: number): void;
2797
+ /**
2798
+ * Select the word immediatly under the cursor on double click
2799
+ *
2800
+ * @param _evt Pointer informations of double click
2801
+ * @hidden
2802
+ */
2803
+ protected _processDblClick(_evt: PointerInfo): void;
2804
+ /** @hidden */
2805
+ protected _selectAllText(): void;
2806
+ dipose(): void;
2807
+ }
2808
+
2637
2809
  }
2638
2810
  declare module "babylonjs-gui/2D/controls/line" {
2639
2811
  import { Vector3 } from "babylonjs/Maths/math.vector";
@@ -9032,7 +9204,7 @@ declare module BABYLON.GUI {
9032
9204
  * second dimension is computed as first dimension * fixedRatio
9033
9205
  */
9034
9206
  fixedRatio: number;
9035
- private _fixedRatioMasterIsWidth;
9207
+ protected _fixedRatioMasterIsWidth: boolean;
9036
9208
  /**
9037
9209
  * Gets or sets control width
9038
9210
  * @see https://doc.babylonjs.com/how_to/gui#position-and-size
@@ -9922,6 +10094,11 @@ declare module BABYLON.GUI {
9922
10094
  * BABYLON.Observable notified when _sourceLeft, _sourceTop, _sourceWidth and _sourceHeight are computed
9923
10095
  */
9924
10096
  onSVGAttributesComputedObservable: BABYLON.Observable<Image>;
10097
+ /**
10098
+ * Gets or sets the referrer policy to apply on the img element load request.
10099
+ * You should set referrerPolicy before set the source of the image if you want to ensure the header will be present on the xhr loading request
10100
+ */
10101
+ referrerPolicy: BABYLON.Nullable<ReferrerPolicy>;
9925
10102
  /**
9926
10103
  * Gets a boolean indicating that the content is loaded
9927
10104
  */
@@ -10102,39 +10279,39 @@ declare module BABYLON.GUI {
10102
10279
  */
10103
10280
  export class InputText extends Control implements IFocusableControl {
10104
10281
  name?: string | undefined;
10105
- private _textWrapper;
10106
- private _placeholderText;
10107
- private _background;
10108
- private _focusedBackground;
10109
- private _focusedColor;
10110
- private _placeholderColor;
10111
- private _thickness;
10112
- private _margin;
10113
- private _autoStretchWidth;
10114
- private _maxWidth;
10115
- private _isFocused;
10282
+ protected _textWrapper: TextWrapper;
10283
+ protected _placeholderText: string;
10284
+ protected _background: string;
10285
+ protected _focusedBackground: string;
10286
+ protected _focusedColor: string;
10287
+ protected _placeholderColor: string;
10288
+ protected _thickness: number;
10289
+ protected _margin: ValueAndUnit;
10290
+ protected _autoStretchWidth: boolean;
10291
+ protected _maxWidth: ValueAndUnit;
10292
+ protected _isFocused: boolean;
10116
10293
  /** the type of device that most recently focused the input: "mouse", "touch" or "pen" */
10117
- private _focusedBy;
10118
- private _blinkTimeout;
10119
- private _blinkIsEven;
10294
+ protected _focusedBy: string;
10295
+ protected _blinkTimeout: number;
10296
+ protected _blinkIsEven: boolean;
10120
10297
  private _cursorOffset;
10121
- private _scrollLeft;
10122
- private _textWidth;
10123
- private _clickedCoordinate;
10124
- private _deadKey;
10125
- private _addKey;
10126
- private _currentKey;
10127
- private _isTextHighlightOn;
10128
- private _textHighlightColor;
10129
- private _highligherOpacity;
10130
- private _highlightedText;
10298
+ protected _scrollLeft: BABYLON.Nullable<number>;
10299
+ protected _textWidth: number;
10300
+ protected _clickedCoordinate: BABYLON.Nullable<number>;
10301
+ protected _deadKey: boolean;
10302
+ protected _addKey: boolean;
10303
+ protected _currentKey: string;
10304
+ protected _isTextHighlightOn: boolean;
10305
+ protected _textHighlightColor: string;
10306
+ protected _highligherOpacity: number;
10307
+ protected _highlightedText: string;
10131
10308
  private _startHighlightIndex;
10132
10309
  private _endHighlightIndex;
10133
10310
  private _cursorIndex;
10134
- private _onFocusSelectAll;
10135
- private _isPointerDown;
10136
- private _onClipboardObserver;
10137
- private _onPointerDblTapObserver;
10311
+ protected _onFocusSelectAll: boolean;
10312
+ protected _isPointerDown: boolean;
10313
+ protected _onClipboardObserver: BABYLON.Nullable<BABYLON.Observer<BABYLON.ClipboardInfo>>;
10314
+ protected _onPointerDblTapObserver: BABYLON.Nullable<BABYLON.Observer<BABYLON.PointerInfo>>;
10138
10315
  /** @hidden */
10139
10316
  _connectedVirtualKeyboard: BABYLON.Nullable<VirtualKeyboard>;
10140
10317
  /** Gets or sets a string representing the message displayed on mobile when the control gets the focus */
@@ -10214,7 +10391,7 @@ declare module BABYLON.GUI {
10214
10391
  /** Gets or sets the text displayed in the control */
10215
10392
  get text(): string;
10216
10393
  set text(value: string);
10217
- private _textHasChanged;
10394
+ protected _textHasChanged(): void;
10218
10395
  /** Gets or sets control width */
10219
10396
  get width(): string | number;
10220
10397
  set width(value: string | number);
@@ -10253,14 +10430,14 @@ declare module BABYLON.GUI {
10253
10430
  * @param offset
10254
10431
  * @hidden
10255
10432
  */
10256
- private _updateValueFromCursorIndex;
10433
+ protected _updateValueFromCursorIndex(offset: number): void;
10257
10434
  /**
10258
10435
  * @param evt
10259
10436
  * @hidden
10260
10437
  */
10261
- private _processDblClick;
10438
+ protected _processDblClick(evt: BABYLON.PointerInfo): void;
10262
10439
  /** @hidden */
10263
- private _selectAllText;
10440
+ protected _selectAllText(): void;
10264
10441
  /**
10265
10442
  * Handles the keyboard event
10266
10443
  * @param evt Defines the KeyboardEvent
@@ -10270,17 +10447,17 @@ declare module BABYLON.GUI {
10270
10447
  * @param ev
10271
10448
  * @hidden
10272
10449
  */
10273
- private _onCopyText;
10450
+ protected _onCopyText(ev: ClipboardEvent): void;
10274
10451
  /**
10275
10452
  * @param ev
10276
10453
  * @hidden
10277
10454
  */
10278
- private _onCutText;
10455
+ protected _onCutText(ev: ClipboardEvent): void;
10279
10456
  /**
10280
10457
  * @param ev
10281
10458
  * @hidden
10282
10459
  */
10283
- private _onPasteText;
10460
+ protected _onPasteText(ev: ClipboardEvent): void;
10284
10461
  _draw(context: BABYLON.ICanvasRenderingContext): void;
10285
10462
  _onPointerDown(target: Control, coordinates: BABYLON.Vector2, pointerId: number, buttonIndex: number, pi: BABYLON.PointerInfoBase): boolean;
10286
10463
  _onPointerMove(target: Control, coordinates: BABYLON.Vector2, pointerId: number, pi: BABYLON.PointerInfoBase): void;
@@ -10290,6 +10467,158 @@ declare module BABYLON.GUI {
10290
10467
  }
10291
10468
 
10292
10469
 
10470
+ /**
10471
+ * Class used to create input text control
10472
+ */
10473
+ export class InputTextArea extends InputText {
10474
+ name?: string | undefined;
10475
+ private _textHorizontalAlignment;
10476
+ private _textVerticalAlignment;
10477
+ private _lines;
10478
+ private _lineSpacing;
10479
+ private _outlineWidth;
10480
+ private _outlineColor;
10481
+ private _maxHeight;
10482
+ private _clipTextTop;
10483
+ private _clipTextLeft;
10484
+ private _cursorInfo;
10485
+ private _highlightCursorInfo;
10486
+ /**
10487
+ * An event triggered after the text was broken up into lines
10488
+ */
10489
+ onLinesReadyObservable: BABYLON.Observable<InputTextArea>;
10490
+ /** @hidden */
10491
+ _connectedVirtualKeyboard: BABYLON.Nullable<VirtualKeyboard>;
10492
+ private _contextForBreakLines;
10493
+ private _clickedCoordinateX;
10494
+ private _clickedCoordinateY;
10495
+ private _availableWidth;
10496
+ private _availableHeight;
10497
+ private _scrollTop;
10498
+ private _autoStretchHeight;
10499
+ /**
10500
+ * Gets or sets outlineWidth of the text to display
10501
+ */
10502
+ get outlineWidth(): number;
10503
+ /**
10504
+ * Gets or sets outlineWidth of the text to display
10505
+ */
10506
+ set outlineWidth(value: number);
10507
+ /**
10508
+ * Gets or sets outlineColor of the text to display
10509
+ */
10510
+ get outlineColor(): string;
10511
+ /**
10512
+ * Gets or sets outlineColor of the text to display
10513
+ */
10514
+ set outlineColor(value: string);
10515
+ /** Gets or sets a boolean indicating if the control can auto stretch its height to adapt to the text */
10516
+ get autoStretchHeight(): boolean;
10517
+ set autoStretchHeight(value: boolean);
10518
+ set height(value: string | number);
10519
+ get maxHeight(): string | number;
10520
+ /** Gets the maximum width allowed by the control in pixels */
10521
+ get maxHeightInPixels(): number;
10522
+ set maxHeight(value: string | number);
10523
+ /**
10524
+ * Creates a new InputTextArea
10525
+ * @param name defines the control name
10526
+ * @param text defines the text of the control
10527
+ */
10528
+ constructor(name?: string | undefined, text?: string);
10529
+ protected _getTypeName(): string;
10530
+ /**
10531
+ * Handles the keyboard event
10532
+ * @param evt Defines the KeyboardEvent
10533
+ */
10534
+ processKeyboard(evt: BABYLON.IKeyboardEvent): void;
10535
+ /**
10536
+ * Process the last keyboard input
10537
+ *
10538
+ * @param code The ascii input number
10539
+ * @param key The key string representation
10540
+ * @param evt The keyboard event emits with input
10541
+ * @hidden
10542
+ */
10543
+ alternativeProcessKey(code: string, key?: string, evt?: BABYLON.IKeyboardEvent): void;
10544
+ protected _parseLineWordWrap(line: string | undefined, width: number, context: BABYLON.ICanvasRenderingContext): {
10545
+ text: string;
10546
+ width: number;
10547
+ lineEnding: string;
10548
+ }[];
10549
+ protected _breakLines(refWidth: number, context: BABYLON.ICanvasRenderingContext): object[];
10550
+ protected _parseLine(line: string | undefined, context: BABYLON.ICanvasRenderingContext): {
10551
+ text: string;
10552
+ width: number;
10553
+ lineEnding: string;
10554
+ };
10555
+ /**
10556
+ * Processing of child right before the parent measurement update
10557
+ *
10558
+ * @param parentMeasure The parent measure
10559
+ * @param context The rendering canvas
10560
+ * @hidden
10561
+ */
10562
+ protected _preMeasure(parentMeasure: Measure, context: BABYLON.ICanvasRenderingContext): void;
10563
+ /**
10564
+ * Processing of child after the parent measurement update
10565
+ *
10566
+ * @param parentMeasure The parent measure
10567
+ * @param context The rendering canvas
10568
+ * @hidden
10569
+ */
10570
+ protected _additionalProcessing(parentMeasure: Measure, context: BABYLON.ICanvasRenderingContext): void;
10571
+ private _drawText;
10572
+ /**
10573
+ * Copy the text in the clipboard
10574
+ *
10575
+ * @param ev The clipboard event
10576
+ * @hidden
10577
+ */
10578
+ protected _onCopyText(ev: ClipboardEvent): void;
10579
+ /**
10580
+ * Cut the text and copy it in the clipboard
10581
+ *
10582
+ * @param ev The clipboard event
10583
+ * @hidden
10584
+ */
10585
+ protected _onCutText(ev: ClipboardEvent): void;
10586
+ /**
10587
+ * Paste the copied text from the clipboard
10588
+ *
10589
+ * @param ev The clipboard event
10590
+ * @hidden
10591
+ */
10592
+ protected _onPasteText(ev: ClipboardEvent): void;
10593
+ _draw(context: BABYLON.ICanvasRenderingContext): void;
10594
+ private _resetBlinking;
10595
+ protected _applyStates(context: BABYLON.ICanvasRenderingContext): void;
10596
+ _onPointerDown(target: Control, coordinates: BABYLON.Vector2, pointerId: number, buttonIndex: number, pi: BABYLON.PointerInfoBase): boolean;
10597
+ _onPointerMove(target: Control, coordinates: BABYLON.Vector2, pointerId: number, pi: BABYLON.PointerInfoBase): void;
10598
+ /**
10599
+ * Apply the correct position of cursor according to current modification
10600
+ */
10601
+ private _updateCursorPosition;
10602
+ /**
10603
+ * Update all values of cursor information based on cursorIndex value
10604
+ *
10605
+ * @param offset The index to take care of
10606
+ * @hidden
10607
+ */
10608
+ protected _updateValueFromCursorIndex(offset: number): void;
10609
+ /**
10610
+ * Select the word immediatly under the cursor on double click
10611
+ *
10612
+ * @param _evt Pointer informations of double click
10613
+ * @hidden
10614
+ */
10615
+ protected _processDblClick(_evt: BABYLON.PointerInfo): void;
10616
+ /** @hidden */
10617
+ protected _selectAllText(): void;
10618
+ dipose(): void;
10619
+ }
10620
+
10621
+
10293
10622
  /** Class used to render 2D lines */
10294
10623
  export class Line extends Control {
10295
10624
  name?: string | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "babylonjs-gui",
3
- "version": "5.11.0",
3
+ "version": "5.13.0",
4
4
  "main": "babylon.gui.js",
5
5
  "types": "babylon.gui.module.d.ts",
6
6
  "files": [
@@ -14,17 +14,17 @@
14
14
  "clean": "rimraf dist && rimraf babylon*.*"
15
15
  },
16
16
  "dependencies": {
17
- "babylonjs": "^5.11.0"
17
+ "babylonjs": "^5.13.0"
18
18
  },
19
19
  "devDependencies": {
20
20
  "@dev/build-tools": "1.0.0",
21
21
  "@lts/gui": "1.0.0",
22
22
  "rimraf": "^3.0.2",
23
- "source-map-loader": "^3.0.0",
23
+ "source-map-loader": "^4.0.0",
24
24
  "ts-loader": "^9.2.6",
25
25
  "typescript": "^4.4.4",
26
- "webpack": "^5.59.1",
27
- "webpack-cli": "^4.9.1",
26
+ "webpack": "^5.73.0",
27
+ "webpack-cli": "^4.10.0",
28
28
  "webpack-merge": "^5.8.0"
29
29
  },
30
30
  "keywords": [
@@ -1,14 +0,0 @@
1
- /*! *****************************************************************************
2
- Copyright (c) Microsoft Corporation.
3
-
4
- Permission to use, copy, modify, and/or distribute this software for any
5
- purpose with or without fee is hereby granted.
6
-
7
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
8
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
9
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
10
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
11
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
12
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
13
- PERFORMANCE OF THIS SOFTWARE.
14
- ***************************************************************************** */