1/* 2 * Copyright (c) 2021-2023 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16/** 17 * @file 18 * @kit ArkUI 19 */ 20 21/** 22 * Text overflow options. 23 * 24 * Anonymous Object Rectification. 25 * @interface TextOverflowOptions 26 * @syscap SystemCapability.ArkUI.ArkUI.Full 27 * @crossplatform 28 * @form 29 * @atomicservice 30 * @since 18 31 */ 32declare interface TextOverflowOptions { 33 /** 34 * Text overflow option. 35 * 36 * @type { TextOverflow } 37 * @syscap SystemCapability.ArkUI.ArkUI.Full 38 * @since 7 39 */ 40 /** 41 * Text overflow option. 42 * 43 * @type { TextOverflow } 44 * @syscap SystemCapability.ArkUI.ArkUI.Full 45 * @form 46 * @since 9 47 */ 48 /** 49 * Text overflow option. 50 * 51 * @type { TextOverflow } 52 * @syscap SystemCapability.ArkUI.ArkUI.Full 53 * @crossplatform 54 * @form 55 * @since 10 56 */ 57 /** 58 * Text overflow option. 59 * 60 * @type { TextOverflow } 61 * @syscap SystemCapability.ArkUI.ArkUI.Full 62 * @crossplatform 63 * @form 64 * @atomicservice 65 * @since 11 66 */ 67 /** 68 * Text overflow option. 69 * 70 * Anonymous Object Rectification. 71 * @type { TextOverflow } 72 * @syscap SystemCapability.ArkUI.ArkUI.Full 73 * @crossplatform 74 * @form 75 * @atomicservice 76 * @since 18 77 */ 78 overflow: TextOverflow; 79} 80 81/** 82 * Provides an interface for writing texts. 83 * 84 * @interface TextInterface 85 * @syscap SystemCapability.ArkUI.ArkUI.Full 86 * @since 7 87 */ 88/** 89 * Provides an interface for writing texts. 90 * 91 * @interface TextInterface 92 * @syscap SystemCapability.ArkUI.ArkUI.Full 93 * @form 94 * @since 9 95 */ 96/** 97 * Provides an interface for writing texts. 98 * 99 * @interface TextInterface 100 * @syscap SystemCapability.ArkUI.ArkUI.Full 101 * @crossplatform 102 * @form 103 * @since 10 104 */ 105/** 106 * Provides an interface for writing texts. 107 * 108 * @interface TextInterface 109 * @syscap SystemCapability.ArkUI.ArkUI.Full 110 * @crossplatform 111 * @form 112 * @atomicservice 113 * @since 11 114 */ 115interface TextInterface { 116 /** 117 * Called when writing text. 118 * 119 * @param { string | Resource } content 120 * @returns { TextAttribute } 121 * @syscap SystemCapability.ArkUI.ArkUI.Full 122 * @since 7 123 */ 124 /** 125 * Called when writing text. 126 * 127 * @param { string | Resource } content 128 * @returns { TextAttribute } 129 * @syscap SystemCapability.ArkUI.ArkUI.Full 130 * @form 131 * @since 9 132 */ 133 /** 134 * Called when writing text. 135 * 136 * @param { string | Resource } content 137 * @returns { TextAttribute } 138 * @syscap SystemCapability.ArkUI.ArkUI.Full 139 * @crossplatform 140 * @form 141 * @since 10 142 */ 143 /** 144 * Called when writing text. 145 * 146 * @param { string | Resource } content 147 * @param { TextOptions } value 148 * @returns { TextAttribute } 149 * @syscap SystemCapability.ArkUI.ArkUI.Full 150 * @crossplatform 151 * @form 152 * @atomicservice 153 * @since 11 154 */ 155 (content?: string | Resource, value?: TextOptions): TextAttribute; 156 } 157 158/** 159 * @extends CommonMethod<TextAttribute> 160 * @syscap SystemCapability.ArkUI.ArkUI.Full 161 * @since 7 162 */ 163/** 164 * @extends CommonMethod<TextAttribute> 165 * @syscap SystemCapability.ArkUI.ArkUI.Full 166 * @form 167 * @since 9 168 */ 169/** 170 * @extends CommonMethod<TextAttribute> 171 * @syscap SystemCapability.ArkUI.ArkUI.Full 172 * @crossplatform 173 * @form 174 * @since 10 175 */ 176/** 177 * @extends CommonMethod<TextAttribute> 178 * @syscap SystemCapability.ArkUI.ArkUI.Full 179 * @crossplatform 180 * @form 181 * @atomicservice 182 * @since 11 183 */ 184declare class TextAttribute extends CommonMethod<TextAttribute> { 185 /** 186 * Called when the font is set. 187 * 188 * @param { Font } value - the text font size and weight and family and style. 189 * @returns { TextAttribute } The attribute of the text. 190 * @syscap SystemCapability.ArkUI.ArkUI.Full 191 * @since 10 192 */ 193 /** 194 * Called when the font is set. 195 * 196 * @param { Font } value - the text font size and weight and family and style. 197 * @returns { TextAttribute } The attribute of the text. 198 * @syscap SystemCapability.ArkUI.ArkUI.Full 199 * @crossplatform 200 * @atomicservice 201 * @since 11 202 */ 203 font(value: Font): TextAttribute; 204 205 /** 206 * Called when the font is set. 207 * 208 * @param { Font } fontValue - the text font size and weight and family and style. 209 * @param { FontSettingOptions } options - font setting options. 210 * @returns { TextAttribute } The attribute of the text. 211 * @syscap SystemCapability.ArkUI.ArkUI.Full 212 * @crossplatform 213 * @form 214 * @atomicservice 215 * @since 12 216 */ 217 font(fontValue: Font, options?: FontSettingOptions): TextAttribute; 218 219 /** 220 * Called when the font color is set. 221 * 222 * @param { ResourceColor } value 223 * @returns { TextAttribute } 224 * @syscap SystemCapability.ArkUI.ArkUI.Full 225 * @since 7 226 */ 227 /** 228 * Called when the font color is set. 229 * 230 * @param { ResourceColor } value 231 * @returns { TextAttribute } 232 * @syscap SystemCapability.ArkUI.ArkUI.Full 233 * @form 234 * @since 9 235 */ 236 /** 237 * Called when the font color is set. 238 * 239 * @param { ResourceColor } value 240 * @returns { TextAttribute } 241 * @syscap SystemCapability.ArkUI.ArkUI.Full 242 * @crossplatform 243 * @form 244 * @since 10 245 */ 246 /** 247 * Called when the font color is set. 248 * 249 * @param { ResourceColor } value 250 * @returns { TextAttribute } 251 * @syscap SystemCapability.ArkUI.ArkUI.Full 252 * @crossplatform 253 * @form 254 * @atomicservice 255 * @since 11 256 */ 257 fontColor(value: ResourceColor): TextAttribute; 258 259 /** 260 * Called when the font size is set. 261 * 262 * @param { number | string | Resource } value 263 * @returns { TextAttribute } 264 * @syscap SystemCapability.ArkUI.ArkUI.Full 265 * @since 7 266 */ 267 /** 268 * Called when the font size is set. 269 * 270 * @param { number | string | Resource } value 271 * @returns { TextAttribute } 272 * @syscap SystemCapability.ArkUI.ArkUI.Full 273 * @form 274 * @since 9 275 */ 276 /** 277 * Called when the font size is set. 278 * 279 * @param { number | string | Resource } value 280 * @returns { TextAttribute } 281 * @syscap SystemCapability.ArkUI.ArkUI.Full 282 * @crossplatform 283 * @form 284 * @since 10 285 */ 286 /** 287 * Called when the font size is set. 288 * 289 * @param { number | string | Resource } value 290 * @returns { TextAttribute } 291 * @syscap SystemCapability.ArkUI.ArkUI.Full 292 * @crossplatform 293 * @form 294 * @atomicservice 295 * @since 11 296 */ 297 fontSize(value: number | string | Resource): TextAttribute; 298 299 /** 300 * Called when the minimum font size of the font is set. 301 * 302 * @param { number | string | Resource } value 303 * @returns { TextAttribute } 304 * @syscap SystemCapability.ArkUI.ArkUI.Full 305 * @since 7 306 */ 307 /** 308 * Called when the minimum font size of the font is set. 309 * 310 * @param { number | string | Resource } value 311 * @returns { TextAttribute } 312 * @syscap SystemCapability.ArkUI.ArkUI.Full 313 * @form 314 * @since 9 315 */ 316 /** 317 * Called when the minimum font size of the font is set. 318 * 319 * @param { number | string | Resource } value 320 * @returns { TextAttribute } 321 * @syscap SystemCapability.ArkUI.ArkUI.Full 322 * @crossplatform 323 * @form 324 * @since 10 325 */ 326 /** 327 * Called when the minimum font size of the font is set. 328 * 329 * @param { number | string | Resource } value 330 * @returns { TextAttribute } 331 * @syscap SystemCapability.ArkUI.ArkUI.Full 332 * @crossplatform 333 * @form 334 * @atomicservice 335 * @since 11 336 */ 337 minFontSize(value: number | string | Resource): TextAttribute; 338 339 /** 340 * Called when the maximum font size of the font is set. 341 * 342 * @param { number | string | Resource } value 343 * @returns { TextAttribute } 344 * @syscap SystemCapability.ArkUI.ArkUI.Full 345 * @since 7 346 */ 347 /** 348 * Called when the maximum font size of the font is set. 349 * 350 * @param { number | string | Resource } value 351 * @returns { TextAttribute } 352 * @syscap SystemCapability.ArkUI.ArkUI.Full 353 * @form 354 * @since 9 355 */ 356 /** 357 * Called when the maximum font size of the font is set. 358 * 359 * @param { number | string | Resource } value 360 * @returns { TextAttribute } 361 * @syscap SystemCapability.ArkUI.ArkUI.Full 362 * @crossplatform 363 * @form 364 * @since 10 365 */ 366 /** 367 * Called when the maximum font size of the font is set. 368 * 369 * @param { number | string | Resource } value 370 * @returns { TextAttribute } 371 * @syscap SystemCapability.ArkUI.ArkUI.Full 372 * @crossplatform 373 * @form 374 * @atomicservice 375 * @since 11 376 */ 377 maxFontSize(value: number | string | Resource): TextAttribute; 378 379 /** 380 * Called when the minimum font scale of the font is set. 381 * 382 * @param { number | Resource } scale 383 * @returns { TextAttribute } 384 * @syscap SystemCapability.ArkUI.ArkUI.Full 385 * @atomicservice 386 * @since 12 387 */ 388 minFontScale(scale: number | Resource): TextAttribute; 389 390 /** 391 * Called when the maximum font scale of the font is set. 392 * 393 * @param { number | Resource } scale 394 * @returns { TextAttribute } 395 * @syscap SystemCapability.ArkUI.ArkUI.Full 396 * @atomicservice 397 * @since 12 398 */ 399 maxFontScale(scale: number | Resource): TextAttribute; 400 401 /** 402 * Called when the font style of a font is set. 403 * 404 * @param { FontStyle } value 405 * @returns { TextAttribute } 406 * @syscap SystemCapability.ArkUI.ArkUI.Full 407 * @since 7 408 */ 409 /** 410 * Called when the font style of a font is set. 411 * 412 * @param { FontStyle } value 413 * @returns { TextAttribute } 414 * @syscap SystemCapability.ArkUI.ArkUI.Full 415 * @form 416 * @since 9 417 */ 418 /** 419 * Called when the font style of a font is set. 420 * 421 * @param { FontStyle } value 422 * @returns { TextAttribute } 423 * @syscap SystemCapability.ArkUI.ArkUI.Full 424 * @crossplatform 425 * @form 426 * @since 10 427 */ 428 /** 429 * Called when the font style of a font is set. 430 * 431 * @param { FontStyle } value 432 * @returns { TextAttribute } 433 * @syscap SystemCapability.ArkUI.ArkUI.Full 434 * @crossplatform 435 * @form 436 * @atomicservice 437 * @since 11 438 */ 439 fontStyle(value: FontStyle): TextAttribute; 440 441 /** 442 * Called when the font weight is set. 443 * 444 * @param { number | FontWeight | string } value 445 * @returns { TextAttribute } 446 * @syscap SystemCapability.ArkUI.ArkUI.Full 447 * @since 7 448 */ 449 /** 450 * Called when the font weight is set. 451 * 452 * @param { number | FontWeight | string } value 453 * @returns { TextAttribute } 454 * @syscap SystemCapability.ArkUI.ArkUI.Full 455 * @form 456 * @since 9 457 */ 458 /** 459 * Called when the font weight is set. 460 * 461 * @param { number | FontWeight | string } value 462 * @returns { TextAttribute } 463 * @syscap SystemCapability.ArkUI.ArkUI.Full 464 * @crossplatform 465 * @form 466 * @since 10 467 */ 468 /** 469 * Called when the font weight is set. 470 * 471 * @param { number | FontWeight | string } value 472 * @returns { TextAttribute } 473 * @syscap SystemCapability.ArkUI.ArkUI.Full 474 * @crossplatform 475 * @form 476 * @atomicservice 477 * @since 11 478 */ 479 fontWeight(value: number | FontWeight | string): TextAttribute; 480 481 /** 482 * Called when the font weight is set. 483 * 484 * @param { number | FontWeight | string } weight 485 * @param { FontSettingOptions } options - font setting options. 486 * @returns { TextAttribute } 487 * @syscap SystemCapability.ArkUI.ArkUI.Full 488 * @crossplatform 489 * @form 490 * @atomicservice 491 * @since 12 492 */ 493 fontWeight(weight: number | FontWeight | string, options?: FontSettingOptions): TextAttribute; 494 495 /** 496 * Set font line spacing. 497 * 498 * @param { LengthMetrics } value 499 * @returns { TextAttribute } 500 * @syscap SystemCapability.ArkUI.ArkUI.Full 501 * @crossplatform 502 * @atomicservice 503 * @since 12 504 */ 505 lineSpacing(value: LengthMetrics): TextAttribute; 506 507 /** 508 * Called when the horizontal center mode of the font is set. 509 * 510 * @param { TextAlign } value 511 * @returns { TextAttribute } 512 * @syscap SystemCapability.ArkUI.ArkUI.Full 513 * @since 7 514 */ 515 /** 516 * Called when the horizontal center mode of the font is set. 517 * 518 * @param { TextAlign } value 519 * @returns { TextAttribute } 520 * @syscap SystemCapability.ArkUI.ArkUI.Full 521 * @form 522 * @since 9 523 */ 524 /** 525 * Called when the horizontal center mode of the font is set. 526 * 527 * @param { TextAlign } value 528 * @returns { TextAttribute } 529 * @syscap SystemCapability.ArkUI.ArkUI.Full 530 * @crossplatform 531 * @form 532 * @since 10 533 */ 534 /** 535 * Called when the horizontal center mode of the font is set. 536 * 537 * @param { TextAlign } value 538 * @returns { TextAttribute } 539 * @syscap SystemCapability.ArkUI.ArkUI.Full 540 * @crossplatform 541 * @form 542 * @atomicservice 543 * @since 11 544 */ 545 textAlign(value: TextAlign): TextAttribute; 546 547 /** 548 * Called when the vertical center mode of the font is set. 549 * 550 * @param { number | string | Resource } value 551 * @returns { TextAttribute } 552 * @syscap SystemCapability.ArkUI.ArkUI.Full 553 * @since 7 554 */ 555 /** 556 * Called when the vertical center mode of the font is set. 557 * 558 * @param { number | string | Resource } value 559 * @returns { TextAttribute } 560 * @syscap SystemCapability.ArkUI.ArkUI.Full 561 * @form 562 * @since 9 563 */ 564 /** 565 * Called when the vertical center mode of the font is set. 566 * 567 * @param { number | string | Resource } value 568 * @returns { TextAttribute } 569 * @syscap SystemCapability.ArkUI.ArkUI.Full 570 * @crossplatform 571 * @form 572 * @since 10 573 */ 574 /** 575 * Called when the vertical center mode of the font is set. 576 * 577 * @param { number | string | Resource } value 578 * @returns { TextAttribute } 579 * @syscap SystemCapability.ArkUI.ArkUI.Full 580 * @crossplatform 581 * @form 582 * @atomicservice 583 * @since 11 584 */ 585 lineHeight(value: number | string | Resource): TextAttribute; 586 587 /** 588 * Called when the overflow mode of the font is set. 589 * 590 * @param { object } value 591 * @returns { TextAttribute } 592 * @syscap SystemCapability.ArkUI.ArkUI.Full 593 * @since 7 594 */ 595 /** 596 * Called when the overflow mode of the font is set. 597 * 598 * @param { object } value 599 * @returns { TextAttribute } 600 * @syscap SystemCapability.ArkUI.ArkUI.Full 601 * @form 602 * @since 9 603 */ 604 /** 605 * Called when the overflow mode of the font is set. 606 * 607 * @param { object } value 608 * @returns { TextAttribute } 609 * @syscap SystemCapability.ArkUI.ArkUI.Full 610 * @crossplatform 611 * @form 612 * @since 10 613 */ 614 /** 615 * Called when the overflow mode of the font is set. 616 * 617 * @param { object } value 618 * @returns { TextAttribute } 619 * @syscap SystemCapability.ArkUI.ArkUI.Full 620 * @crossplatform 621 * @form 622 * @atomicservice 623 * @since 11 624 */ 625 /** 626 * Called when the overflow mode of the font is set. 627 * 628 * Anonymous Object Rectification. 629 * @param { TextOverflowOptions } options - Text overflow options. 630 * @returns { TextAttribute } 631 * @syscap SystemCapability.ArkUI.ArkUI.Full 632 * @crossplatform 633 * @form 634 * @atomicservice 635 * @since 18 636 */ 637 textOverflow(options: TextOverflowOptions): TextAttribute; 638 639 /** 640 * Called when the font list of text is set. 641 * 642 * @param { string | Resource } value 643 * @returns { TextAttribute } 644 * @syscap SystemCapability.ArkUI.ArkUI.Full 645 * @since 7 646 */ 647 /** 648 * Called when the font list of text is set. 649 * 650 * @param { string | Resource } value 651 * @returns { TextAttribute } 652 * @syscap SystemCapability.ArkUI.ArkUI.Full 653 * @form 654 * @since 9 655 */ 656 /** 657 * Called when the font list of text is set. 658 * 659 * @param { string | Resource } value 660 * @returns { TextAttribute } 661 * @syscap SystemCapability.ArkUI.ArkUI.Full 662 * @crossplatform 663 * @form 664 * @since 10 665 */ 666 /** 667 * Called when the font list of text is set. 668 * 669 * @param { string | Resource } value 670 * @returns { TextAttribute } 671 * @syscap SystemCapability.ArkUI.ArkUI.Full 672 * @crossplatform 673 * @form 674 * @atomicservice 675 * @since 11 676 */ 677 fontFamily(value: string | Resource): TextAttribute; 678 679 /** 680 * Called when the maximum number of lines of text is set. 681 * 682 * @param { number } value 683 * @returns { TextAttribute } 684 * @syscap SystemCapability.ArkUI.ArkUI.Full 685 * @since 7 686 */ 687 /** 688 * Called when the maximum number of lines of text is set. 689 * 690 * @param { number } value 691 * @returns { TextAttribute } 692 * @syscap SystemCapability.ArkUI.ArkUI.Full 693 * @form 694 * @since 9 695 */ 696 /** 697 * Called when the maximum number of lines of text is set. 698 * 699 * @param { number } value 700 * @returns { TextAttribute } 701 * @syscap SystemCapability.ArkUI.ArkUI.Full 702 * @crossplatform 703 * @form 704 * @since 10 705 */ 706 /** 707 * Called when the maximum number of lines of text is set. 708 * 709 * @param { number } value 710 * @returns { TextAttribute } 711 * @syscap SystemCapability.ArkUI.ArkUI.Full 712 * @crossplatform 713 * @form 714 * @atomicservice 715 * @since 11 716 */ 717 maxLines(value: number): TextAttribute; 718 719 /** 720 * Called when the text decoration of the text is set. 721 * 722 * @param { object } value 723 * @returns { TextAttribute } 724 * @syscap SystemCapability.ArkUI.ArkUI.Full 725 * @since 7 726 */ 727 /** 728 * Called when the text decoration of the text is set. 729 * 730 * @param { object } value 731 * @returns { TextAttribute } 732 * @syscap SystemCapability.ArkUI.ArkUI.Full 733 * @form 734 * @since 9 735 */ 736 /** 737 * Called when the text decoration of the text is set. 738 * 739 * @param { object } value 740 * @returns { TextAttribute } 741 * @syscap SystemCapability.ArkUI.ArkUI.Full 742 * @crossplatform 743 * @form 744 * @since 10 745 */ 746 /** 747 * Called when the text decoration of the text is set. 748 * 749 * @param { object } value 750 * @returns { TextAttribute } 751 * @syscap SystemCapability.ArkUI.ArkUI.Full 752 * @crossplatform 753 * @form 754 * @atomicservice 755 * @since 11 756 */ 757 /** 758 * Called when the text decoration of the text is set. 759 * 760 * @param { DecorationStyleInterface } value 761 * @returns { TextAttribute } 762 * @syscap SystemCapability.ArkUI.ArkUI.Full 763 * @crossplatform 764 * @form 765 * @atomicservice 766 * @since 12 767 */ 768 decoration(value: DecorationStyleInterface): TextAttribute; 769 770 /** 771 * Called when the distance between text fonts is set. 772 * 773 * @param { number | string } value 774 * @returns { TextAttribute } 775 * @syscap SystemCapability.ArkUI.ArkUI.Full 776 * @since 7 777 */ 778 /** 779 * Called when the distance between text fonts is set. 780 * 781 * @param { number | string } value 782 * @returns { TextAttribute } 783 * @syscap SystemCapability.ArkUI.ArkUI.Full 784 * @form 785 * @since 9 786 */ 787 /** 788 * Called when the distance between text fonts is set. 789 * 790 * @param { number | string } value 791 * @returns { TextAttribute } 792 * @syscap SystemCapability.ArkUI.ArkUI.Full 793 * @crossplatform 794 * @form 795 * @since 10 796 */ 797 /** 798 * Called when the distance between text fonts is set. 799 * 800 * @param { number | string } value 801 * @returns { TextAttribute } 802 * @syscap SystemCapability.ArkUI.ArkUI.Full 803 * @crossplatform 804 * @form 805 * @atomicservice 806 * @since 11 807 */ 808 letterSpacing(value: number | string): TextAttribute; 809 810 /** 811 * Called when the type of letter in the text font is set. 812 * 813 * @param { TextCase } value 814 * @returns { TextAttribute } 815 * @syscap SystemCapability.ArkUI.ArkUI.Full 816 * @since 7 817 */ 818 /** 819 * Called when the type of letter in the text font is set. 820 * 821 * @param { TextCase } value 822 * @returns { TextAttribute } 823 * @syscap SystemCapability.ArkUI.ArkUI.Full 824 * @form 825 * @since 9 826 */ 827 /** 828 * Called when the type of letter in the text font is set. 829 * 830 * @param { TextCase } value 831 * @returns { TextAttribute } 832 * @syscap SystemCapability.ArkUI.ArkUI.Full 833 * @crossplatform 834 * @form 835 * @since 10 836 */ 837 /** 838 * Called when the type of letter in the text font is set. 839 * 840 * @param { TextCase } value 841 * @returns { TextAttribute } 842 * @syscap SystemCapability.ArkUI.ArkUI.Full 843 * @crossplatform 844 * @form 845 * @atomicservice 846 * @since 11 847 */ 848 textCase(value: TextCase): TextAttribute; 849 850 /** 851 * Called when the baseline offset is set. 852 * 853 * @param { number | string } value 854 * @returns { TextAttribute } 855 * @syscap SystemCapability.ArkUI.ArkUI.Full 856 * @since 7 857 */ 858 /** 859 * Called when the baseline offset is set. 860 * 861 * @param { number | string } value 862 * @returns { TextAttribute } 863 * @syscap SystemCapability.ArkUI.ArkUI.Full 864 * @form 865 * @since 9 866 */ 867 /** 868 * Called when the baseline offset is set. 869 * 870 * @param { number | string } value 871 * @returns { TextAttribute } 872 * @syscap SystemCapability.ArkUI.ArkUI.Full 873 * @crossplatform 874 * @form 875 * @since 10 876 */ 877 /** 878 * Called when the baseline offset is set. 879 * 880 * @param { number | string } value 881 * @returns { TextAttribute } 882 * @syscap SystemCapability.ArkUI.ArkUI.Full 883 * @crossplatform 884 * @form 885 * @atomicservice 886 * @since 11 887 */ 888 baselineOffset(value: number | string): TextAttribute; 889 890 /** 891 * Allow replication. 892 * 893 * @param { CopyOptions } value 894 * @returns { TextAttribute } 895 * @syscap SystemCapability.ArkUI.ArkUI.Full 896 * @form 897 * @since 9 898 */ 899 /** 900 * Allow replication. 901 * 902 * @param { CopyOptions } value 903 * @returns { TextAttribute } 904 * @syscap SystemCapability.ArkUI.ArkUI.Full 905 * @crossplatform 906 * @form 907 * @since 10 908 */ 909 /** 910 * Allow replication. 911 * 912 * @param { CopyOptions } value 913 * @returns { TextAttribute } 914 * @syscap SystemCapability.ArkUI.ArkUI.Full 915 * @crossplatform 916 * @form 917 * @atomicservice 918 * @since 11 919 */ 920 copyOption(value: CopyOptions): TextAttribute; 921 922 /** 923 * Enable the selectable area can be dragged. 924 * 925 * @param { boolean } value 926 * @returns { TextAttribute } 927 * @syscap SystemCapability.ArkUI.ArkUI.Full 928 * @since 9 929 */ 930 /** 931 * Enable the selectable area can be dragged. 932 * 933 * @param { boolean } value 934 * @returns { TextAttribute } 935 * @syscap SystemCapability.ArkUI.ArkUI.Full 936 * @atomicservice 937 * @since 11 938 */ 939 /** 940 * Enable the selectable area can be dragged. 941 * 942 * @param { boolean } value 943 * @returns { TextAttribute } 944 * @syscap SystemCapability.ArkUI.ArkUI.Full 945 * @crossplatform 946 * @atomicservice 947 * @since 18 948 */ 949 draggable(value: boolean): TextAttribute; 950 951 /** 952 * Called when the text shadow is set. 953 * 954 * @param { ShadowOptions } value - The shadow options. 955 * @returns { TextAttribute } 956 * @syscap SystemCapability.ArkUI.ArkUI.Full 957 * @crossplatform 958 * @form 959 * @since 10 960 */ 961 /** 962 * Called when the text shadow is set. 963 * 964 * @param { ShadowOptions | Array<ShadowOptions> } value - The shadow options. 965 * @returns { TextAttribute } 966 * @syscap SystemCapability.ArkUI.ArkUI.Full 967 * @crossplatform 968 * @form 969 * @atomicservice 970 * @since 11 971 */ 972 textShadow(value: ShadowOptions | Array<ShadowOptions>): TextAttribute; 973 974 /** 975 * Called when the height adaptive policy is set. 976 * 977 * @param { TextHeightAdaptivePolicy } value - The height adaptive policy. 978 * @returns { TextAttribute } 979 * @syscap SystemCapability.ArkUI.ArkUI.Full 980 * @crossplatform 981 * @since 10 982 */ 983 /** 984 * Called when the height adaptive policy is set. 985 * 986 * @param { TextHeightAdaptivePolicy } value - The height adaptive policy. 987 * @returns { TextAttribute } 988 * @syscap SystemCapability.ArkUI.ArkUI.Full 989 * @crossplatform 990 * @atomicservice 991 * @since 11 992 */ 993 heightAdaptivePolicy(value: TextHeightAdaptivePolicy): TextAttribute; 994 995 /** 996 * Specify the indentation of the first line in a text-block. 997 * 998 * @param { Length } value - The length of text indent. 999 * @returns { TextAttribute } The attribute of the text. 1000 * @syscap SystemCapability.ArkUI.ArkUI.Full 1001 * @crossplatform 1002 * @since 10 1003 */ 1004 /** 1005 * Specify the indentation of the first line in a text-block. 1006 * 1007 * @param { Length } value - The length of text indent. 1008 * @returns { TextAttribute } The attribute of the text. 1009 * @syscap SystemCapability.ArkUI.ArkUI.Full 1010 * @crossplatform 1011 * @atomicservice 1012 * @since 11 1013 */ 1014 textIndent(value: Length): TextAttribute; 1015 1016 /** 1017 * Set the word break type. 1018 * 1019 * @param { WordBreak } value - The word break type. 1020 * @returns { TextAttribute } The attribute of the text. 1021 * @syscap SystemCapability.ArkUI.ArkUI.Full 1022 * @crossplatform 1023 * @atomicservice 1024 * @since 11 1025 */ 1026 wordBreak(value: WordBreak): TextAttribute; 1027 1028 /** 1029 * Set the text line break strategy type. 1030 * 1031 * @param { LineBreakStrategy } strategy - The text line break strategy type. 1032 * @returns { TextAttribute } The attribute of the text. 1033 * @syscap SystemCapability.ArkUI.ArkUI.Full 1034 * @crossplatform 1035 * @atomicservice 1036 * @since 12 1037 */ 1038 lineBreakStrategy(strategy: LineBreakStrategy): TextAttribute; 1039 1040 /** 1041 * Called when using the Clipboard menu 1042 * 1043 * @param { function } callback - callback of the listened event. 1044 * @returns { TextAttribute } The attribute of the text. 1045 * @syscap SystemCapability.ArkUI.ArkUI.Full 1046 * @crossplatform 1047 * @atomicservice 1048 * @since 11 1049 */ 1050 onCopy(callback: (value: string) => void): TextAttribute; 1051 1052 /** 1053 * Text selection is achieved by specifying the start and end positions of the text. 1054 * 1055 * @param { number } selectionStart - The start position of the selected text. 1056 * @param { number } selectionEnd - The end position of the selected text. 1057 * @returns { TextAttribute } The attribute of the text. 1058 * @syscap SystemCapability.ArkUI.ArkUI.Full 1059 * @crossplatform 1060 * @atomicservice 1061 * @since 11 1062 */ 1063 selection(selectionStart: number, selectionEnd: number): TextAttribute; 1064 1065 /** 1066 * Set the caret color for the selected text. 1067 * 1068 * @param { ResourceColor } color - The color of the selected text caret. 1069 * @returns { TextAttribute } 1070 * @syscap SystemCapability.ArkUI.ArkUI.Full 1071 * @crossplatform 1072 * @atomicservice 1073 * @since 14 1074 */ 1075 caretColor(color: ResourceColor): TextAttribute; 1076 1077 /** 1078 * Set the selected background color of the text. 1079 * 1080 * @param { ResourceColor } color - The color of the selected text background. 1081 * @returns { TextAttribute } 1082 * @syscap SystemCapability.ArkUI.ArkUI.Full 1083 * @crossplatform 1084 * @atomicservice 1085 * @since 14 1086 */ 1087 selectedBackgroundColor(color: ResourceColor): TextAttribute; 1088 1089 /** 1090 * Set the ellipsis mode. 1091 * 1092 * @param { EllipsisMode } value - The ellipsis mode. 1093 * @returns { TextAttribute } The attribute of the text. 1094 * @syscap SystemCapability.ArkUI.ArkUI.Full 1095 * @crossplatform 1096 * @since 11 1097 */ 1098 /** 1099 * Set the ellipsis mode. 1100 * 1101 * @param { EllipsisMode } value - The ellipsis mode. 1102 * @returns { TextAttribute } The attribute of the text. 1103 * @syscap SystemCapability.ArkUI.ArkUI.Full 1104 * @crossplatform 1105 * @atomicservice 1106 * @since 12 1107 */ 1108 ellipsisMode(value: EllipsisMode): TextAttribute; 1109 1110 /** 1111 * Enable data detector. 1112 * 1113 * @param { boolean } enable - Enable data detector. 1114 * @returns { TextAttribute } The attribute of the text. 1115 * @syscap SystemCapability.ArkUI.ArkUI.Full 1116 * @since 11 1117 */ 1118 /** 1119 * Enable data detector. 1120 * 1121 * @param { boolean } enable - Enable data detector. 1122 * @returns { TextAttribute } The attribute of the text. 1123 * @syscap SystemCapability.ArkUI.ArkUI.Full 1124 * @atomicservice 1125 * @since 12 1126 */ 1127 enableDataDetector(enable: boolean): TextAttribute; 1128 1129 /** 1130 * Data detector with config. 1131 * 1132 * @param { TextDataDetectorConfig } config - The config of text data detector. 1133 * @returns { TextAttribute } The attribute of the text. 1134 * @syscap SystemCapability.ArkUI.ArkUI.Full 1135 * @since 11 1136 */ 1137 /** 1138 * Data detector with config. 1139 * 1140 * @param { TextDataDetectorConfig } config - The config of text data detector. 1141 * @returns { TextAttribute } The attribute of the text. 1142 * @syscap SystemCapability.ArkUI.ArkUI.Full 1143 * @atomicservice 1144 * @since 12 1145 */ 1146 dataDetectorConfig(config: TextDataDetectorConfig): TextAttribute; 1147 1148 /** 1149 * Bind to the selection menu. 1150 * 1151 * @param { TextSpanType } spanType - Indicates the type of selection menu. 1152 * @param { CustomBuilder } content - Indicates the content of selection menu. 1153 * @param { TextResponseType } responseType - Indicates response type of selection menu. 1154 * @param { SelectionMenuOptions } [options] - Indicates the options of selection menu. 1155 * @returns { TextAttribute } 1156 * @syscap SystemCapability.ArkUI.ArkUI.Full 1157 * @crossplatform 1158 * @since 11 1159 */ 1160 /** 1161 * Bind to the selection menu. 1162 * 1163 * @param { TextSpanType } spanType - Indicates the type of selection menu. 1164 * @param { CustomBuilder } content - Indicates the content of selection menu. 1165 * @param { TextResponseType } responseType - Indicates response type of selection menu. 1166 * @param { SelectionMenuOptions } [options] - Indicates the options of selection menu. 1167 * @returns { TextAttribute } 1168 * @syscap SystemCapability.ArkUI.ArkUI.Full 1169 * @crossplatform 1170 * @atomicservice 1171 * @since 12 1172 */ 1173 bindSelectionMenu(spanType: TextSpanType, content: CustomBuilder, responseType: TextResponseType, 1174 options?: SelectionMenuOptions): TextAttribute; 1175 1176 /** 1177 * Called when the text selection changes. 1178 * 1179 * @param { function } callback - callback of the listened event. 1180 * @returns { TextAttribute } returns the instance of the TextAttribute. 1181 * @syscap SystemCapability.ArkUI.ArkUI.Full 1182 * @crossplatform 1183 * @since 11 1184 */ 1185 /** 1186 * Called when the text selection changes. 1187 * 1188 * @param { function } callback - callback of the listened event. 1189 * @returns { TextAttribute } returns the instance of the TextAttribute. 1190 * @syscap SystemCapability.ArkUI.ArkUI.Full 1191 * @crossplatform 1192 * @atomicservice 1193 * @since 12 1194 */ 1195 onTextSelectionChange(callback: (selectionStart: number, selectionEnd: number) => void): TextAttribute; 1196 1197 /** 1198 * Set font feature. 1199 * 1200 * @param { string } value - The fontFeature. 1201 * normal | <feature-tag-value>, 1202 * where <feature-tag-value> = <string> [ <integer> | on | off ], like: "ss01" 0 1203 * the values of <feature-tag-value> reference to doc of text component 1204 * number of <feature-tag-value> can be single or multiple, and separated by comma ','. 1205 * @returns { TextAttribute } 1206 * @syscap SystemCapability.ArkUI.ArkUI.Full 1207 * @crossplatform 1208 * @form 1209 * @atomicservice 1210 * @since 12 1211 */ 1212 fontFeature(value: string): TextAttribute; 1213 1214 /** 1215 * Set the marquee options. 1216 * 1217 * @param { Optional<TextMarqueeOptions> } options 1218 * @returns { TextAttribute } 1219 * @syscap SystemCapability.ArkUI.ArkUI.Full 1220 * @crossplatform 1221 * @atomicservice 1222 * @since 18 1223 */ 1224 marqueeOptions(options: Optional<TextMarqueeOptions>): TextAttribute; 1225 1226 /** 1227 * Called when the text marquee state changes. 1228 * 1229 * @param { Callback<MarqueeState> } callback - callback of the marquee state change event. 1230 * @returns { TextAttribute } returns the instance of the TextAttribute. 1231 * @syscap SystemCapability.ArkUI.ArkUI.Full 1232 * @crossplatform 1233 * @atomicservice 1234 * @since 18 1235 */ 1236 onMarqueeStateChange(callback: Callback<MarqueeState>): TextAttribute; 1237 1238 /** 1239 * Whether to support sensitive privacy information 1240 * 1241 * @param { boolean } supported - Whether to support sensitive privacy information. 1242 * @returns { TextAttribute } 1243 * @syscap SystemCapability.ArkUI.ArkUI.Full 1244 * @form 1245 * @atomicservice 1246 * @since 12 1247 */ 1248 privacySensitive(supported: boolean): TextAttribute; 1249 1250 /** 1251 * set text selectable and focusable 1252 * 1253 * @param { TextSelectableMode } mode 1254 * @returns { TextAttribute } 1255 * @syscap SystemCapability.ArkUI.ArkUI.Full 1256 * @crossplatform 1257 * @atomicservice 1258 * @since 12 1259 */ 1260 textSelectable(mode: TextSelectableMode): TextAttribute; 1261 1262 /** 1263 * Set the custom text menu. 1264 * 1265 * @param { EditMenuOptions } editMenu - Customize text menu options. 1266 * @returns { TextAttribute } 1267 * @syscap SystemCapability.ArkUI.ArkUI.Full 1268 * @crossplatform 1269 * @atomicservice 1270 * @since 12 1271 */ 1272 editMenuOptions(editMenu: EditMenuOptions): TextAttribute; 1273 1274 /** 1275 * Set the text with half leading. 1276 * 1277 * @param { boolean } halfLeading 1278 * @returns { TextAttribute } 1279 * @syscap SystemCapability.ArkUI.ArkUI.Full 1280 * @crossplatform 1281 * @atomicservice 1282 * @since 12 1283 */ 1284 halfLeading(halfLeading: boolean): TextAttribute; 1285 1286 /** 1287 * Enable or disable haptic feedback. 1288 * 1289 * @param { boolean } isEnabled - Default value is true, set false to disable haptic feedback. 1290 * @returns { TextAttribute } returns the instance of the TextAttribute. 1291 * @syscap SystemCapability.ArkUI.ArkUI.Full 1292 * @crossplatform 1293 * @atomicservice 1294 * @since 13 1295 */ 1296 enableHapticFeedback(isEnabled: boolean): TextAttribute; 1297} 1298 1299/** 1300 * Defines Text Component instance. 1301 * 1302 * @syscap SystemCapability.ArkUI.ArkUI.Full 1303 * @since 7 1304 */ 1305/** 1306 * Defines Text Component instance. 1307 * 1308 * @syscap SystemCapability.ArkUI.ArkUI.Full 1309 * @form 1310 * @since 9 1311 */ 1312/** 1313 * Defines Text Component instance. 1314 * 1315 * @syscap SystemCapability.ArkUI.ArkUI.Full 1316 * @crossplatform 1317 * @form 1318 * @since 10 1319 */ 1320/** 1321 * Defines Text Component instance. 1322 * 1323 * @syscap SystemCapability.ArkUI.ArkUI.Full 1324 * @crossplatform 1325 * @form 1326 * @atomicservice 1327 * @since 11 1328 */ 1329declare const TextInstance: TextAttribute; 1330 1331/** 1332 * Defines Text Component. 1333 * 1334 * @syscap SystemCapability.ArkUI.ArkUI.Full 1335 * @since 7 1336 */ 1337/** 1338 * Defines Text Component. 1339 * 1340 * @syscap SystemCapability.ArkUI.ArkUI.Full 1341 * @form 1342 * @since 9 1343 */ 1344/** 1345 * Defines Text Component. 1346 * 1347 * @syscap SystemCapability.ArkUI.ArkUI.Full 1348 * @crossplatform 1349 * @form 1350 * @since 10 1351 */ 1352/** 1353 * Defines Text Component. 1354 * 1355 * @syscap SystemCapability.ArkUI.ArkUI.Full 1356 * @crossplatform 1357 * @form 1358 * @atomicservice 1359 * @since 11 1360 */ 1361declare const Text: TextInterface; 1362 1363/** 1364 * Defines span type. 1365 * 1366 * @enum { number } 1367 * @syscap SystemCapability.ArkUI.ArkUI.Full 1368 * @crossplatform 1369 * @since 11 1370 */ 1371/** 1372 * Defines span type. 1373 * 1374 * @enum { number } 1375 * @syscap SystemCapability.ArkUI.ArkUI.Full 1376 * @crossplatform 1377 * @atomicservice 1378 * @since 12 1379 */ 1380declare enum TextSpanType { 1381 /** 1382 * Only contains text. 1383 * 1384 * @syscap SystemCapability.ArkUI.ArkUI.Full 1385 * @crossplatform 1386 * @since 11 1387 */ 1388 /** 1389 * Only contains text. 1390 * 1391 * @syscap SystemCapability.ArkUI.ArkUI.Full 1392 * @crossplatform 1393 * @atomicservice 1394 * @since 12 1395 */ 1396 TEXT = 0, 1397 1398 /** 1399 * Only contains image. 1400 * 1401 * @syscap SystemCapability.ArkUI.ArkUI.Full 1402 * @crossplatform 1403 * @since 11 1404 */ 1405 /** 1406 * Only contains image. 1407 * 1408 * @syscap SystemCapability.ArkUI.ArkUI.Full 1409 * @crossplatform 1410 * @atomicservice 1411 * @since 12 1412 */ 1413 IMAGE = 1, 1414 1415 /** 1416 * Contains both text and image. 1417 * 1418 * @syscap SystemCapability.ArkUI.ArkUI.Full 1419 * @crossplatform 1420 * @since 11 1421 */ 1422 /** 1423 * Contains both text and image. 1424 * 1425 * @syscap SystemCapability.ArkUI.ArkUI.Full 1426 * @crossplatform 1427 * @atomicservice 1428 * @since 12 1429 */ 1430 MIXED = 2, 1431 1432 /** 1433 * When no other types are explicitly specified, this type will be matched. 1434 * 1435 * @syscap SystemCapability.ArkUI.ArkUI.Full 1436 * @crossplatform 1437 * @atomicservice 1438 * @since 15 1439 */ 1440 DEFAULT = 3, 1441} 1442 1443/** 1444 * ResponseType for contextMenu 1445 * 1446 * @enum { number } 1447 * @syscap SystemCapability.ArkUI.ArkUI.Full 1448 * @crossplatform 1449 * @since 11 1450 */ 1451/** 1452 * ResponseType for contextMenu 1453 * 1454 * @enum { number } 1455 * @syscap SystemCapability.ArkUI.ArkUI.Full 1456 * @crossplatform 1457 * @atomicservice 1458 * @since 12 1459 */ 1460declare enum TextResponseType { 1461 /** 1462 * Right click. 1463 * 1464 * @syscap SystemCapability.ArkUI.ArkUI.Full 1465 * @crossplatform 1466 * @since 11 1467 */ 1468 /** 1469 * Right click. 1470 * 1471 * @syscap SystemCapability.ArkUI.ArkUI.Full 1472 * @crossplatform 1473 * @atomicservice 1474 * @since 12 1475 */ 1476 RIGHT_CLICK = 0, 1477 1478 /** 1479 * Long press. 1480 * 1481 * @syscap SystemCapability.ArkUI.ArkUI.Full 1482 * @crossplatform 1483 * @since 11 1484 */ 1485 /** 1486 * Long press. 1487 * 1488 * @syscap SystemCapability.ArkUI.ArkUI.Full 1489 * @crossplatform 1490 * @atomicservice 1491 * @since 12 1492 */ 1493 LONG_PRESS = 1, 1494 1495 /** 1496 * Selected by mouse. 1497 * 1498 * @syscap SystemCapability.ArkUI.ArkUI.Full 1499 * @crossplatform 1500 * @since 11 1501 */ 1502 /** 1503 * Selected by mouse. 1504 * 1505 * @syscap SystemCapability.ArkUI.ArkUI.Full 1506 * @crossplatform 1507 * @atomicservice 1508 * @since 12 1509 */ 1510 SELECT = 2, 1511 1512 /** 1513 * When no other types are explicitly specified, this type will be matched. 1514 * 1515 * @syscap SystemCapability.ArkUI.ArkUI.Full 1516 * @crossplatform 1517 * @atomicservice 1518 * @since 15 1519 */ 1520 DEFAULT = 3, 1521} 1522 1523/** 1524 * Defines marquee state. 1525 * 1526 * @enum { number } 1527 * @syscap SystemCapability.ArkUI.ArkUI.Full 1528 * @crossplatform 1529 * @atomicservice 1530 * @since 18 1531 */ 1532declare enum MarqueeState { 1533 /** 1534 * The marquee started. 1535 * 1536 * @syscap SystemCapability.ArkUI.ArkUI.Full 1537 * @crossplatform 1538 * @atomicservice 1539 * @since 18 1540 */ 1541 START = 0, 1542 1543 /** 1544 * The marquee a round finished and start next round. 1545 * 1546 * @syscap SystemCapability.ArkUI.ArkUI.Full 1547 * @crossplatform 1548 * @atomicservice 1549 * @since 18 1550 */ 1551 BOUNCE = 1, 1552 1553 /** 1554 * The marquee all finished. 1555 * 1556 * @syscap SystemCapability.ArkUI.ArkUI.Full 1557 * @crossplatform 1558 * @atomicservice 1559 * @since 18 1560 */ 1561 FINISH = 2, 1562} 1563 1564/** 1565 * Defines marquee start policy. 1566 * 1567 * @enum { number } 1568 * @syscap SystemCapability.ArkUI.ArkUI.Full 1569 * @crossplatform 1570 * @atomicservice 1571 * @since 18 1572 */ 1573declare enum MarqueeStartPolicy { 1574 /** 1575 * Start marquee in any case. This is the default policy. 1576 * 1577 * @syscap SystemCapability.ArkUI.ArkUI.Full 1578 * @crossplatform 1579 * @atomicservice 1580 * @since 18 1581 */ 1582 DEFAULT = 0, 1583 1584 /** 1585 * Start marquee only when get focus. 1586 * 1587 * @syscap SystemCapability.ArkUI.ArkUI.Full 1588 * @crossplatform 1589 * @atomicservice 1590 * @since 18 1591 */ 1592 ON_FOCUS = 1, 1593} 1594 1595/** 1596 * Defines the options of Text. 1597 * 1598 * @interface TextOptions 1599 * @syscap SystemCapability.ArkUI.ArkUI.Full 1600 * @crossplatform 1601 * @since 11 1602 */ 1603/** 1604 * Defines the options of Text. 1605 * 1606 * @interface TextOptions 1607 * @syscap SystemCapability.ArkUI.ArkUI.Full 1608 * @crossplatform 1609 * @atomicservice 1610 * @since 12 1611 */ 1612declare interface TextOptions { 1613 /** 1614 * Text controller. 1615 * 1616 * @type { TextController } 1617 * @syscap SystemCapability.ArkUI.ArkUI.Full 1618 * @crossplatform 1619 * @since 11 1620 */ 1621 /** 1622 * Text controller. 1623 * 1624 * @type { TextController } 1625 * @syscap SystemCapability.ArkUI.ArkUI.Full 1626 * @crossplatform 1627 * @atomicservice 1628 * @since 12 1629 */ 1630 controller: TextController; 1631} 1632 1633/** 1634 * Defines the marquee options. 1635 * 1636 * @interface TextMarqueeOptions 1637 * @syscap SystemCapability.ArkUI.ArkUI.Full 1638 * @crossplatform 1639 * @atomicservice 1640 * @since 18 1641 */ 1642declare interface TextMarqueeOptions { 1643 /** 1644 * Is need start marquee. 1645 * 1646 * @type { boolean } 1647 * @syscap SystemCapability.ArkUI.ArkUI.Full 1648 * @crossplatform 1649 * @atomicservice 1650 * @since 18 1651 */ 1652 start: boolean; 1653 1654 /** 1655 * The step size of the marquee. 1656 * 1657 * @type { ?number } 1658 * @syscap SystemCapability.ArkUI.ArkUI.Full 1659 * @crossplatform 1660 * @atomicservice 1661 * @since 18 1662 */ 1663 step?: number; 1664 1665 /** 1666 * The rounds of the marquee. 1667 * 1668 * @type { ?number } 1669 * @syscap SystemCapability.ArkUI.ArkUI.Full 1670 * @crossplatform 1671 * @atomicservice 1672 * @since 18 1673 */ 1674 loop?: number; 1675 1676 /** 1677 * The running direction of the marquee. 1678 * 1679 * @type { ?boolean } 1680 * @syscap SystemCapability.ArkUI.ArkUI.Full 1681 * @crossplatform 1682 * @atomicservice 1683 * @since 18 1684 */ 1685 fromStart?: boolean; 1686 1687 /** 1688 * The waiting time between each round of the marquee. 1689 * 1690 * @type { ?number } 1691 * @syscap SystemCapability.ArkUI.ArkUI.Full 1692 * @crossplatform 1693 * @atomicservice 1694 * @since 18 1695 */ 1696 delay?: number; 1697 1698 /** 1699 * Set whether the text is faded out. 1700 * 1701 * @type { ?boolean } 1702 * @syscap SystemCapability.ArkUI.ArkUI.Full 1703 * @crossplatform 1704 * @atomicservice 1705 * @since 18 1706 */ 1707 fadeout?: boolean; 1708 1709 /** 1710 * The start policy for marquee. 1711 * 1712 * @type { ?MarqueeStartPolicy } 1713 * @syscap SystemCapability.ArkUI.ArkUI.Full 1714 * @crossplatform 1715 * @atomicservice 1716 * @since 18 1717 */ 1718 marqueeStartPolicy?: MarqueeStartPolicy; 1719} 1720 1721/** 1722 * Defines the controller of Text. 1723 * 1724 * @syscap SystemCapability.ArkUI.ArkUI.Full 1725 * @crossplatform 1726 * @since 11 1727 */ 1728/** 1729 * Defines the controller of Text. 1730 * 1731 * @syscap SystemCapability.ArkUI.ArkUI.Full 1732 * @crossplatform 1733 * @atomicservice 1734 * @since 12 1735 */ 1736declare class TextController { 1737 /** 1738 * Close the select menu when menu is on. 1739 * 1740 * @syscap SystemCapability.ArkUI.ArkUI.Full 1741 * @crossplatform 1742 * @since 11 1743 */ 1744 /** 1745 * Close the select menu when menu is on. 1746 * 1747 * @syscap SystemCapability.ArkUI.ArkUI.Full 1748 * @crossplatform 1749 * @atomicservice 1750 * @since 12 1751 */ 1752 closeSelectionMenu(): void; 1753 1754 /** 1755 * Update the styles of StyledString by setStyledString. 1756 * 1757 * @param { StyledString } value 1758 * @syscap SystemCapability.ArkUI.ArkUI.Full 1759 * @crossplatform 1760 * @atomicservice 1761 * @since 12 1762 */ 1763 setStyledString(value: StyledString): void; 1764 1765 /** 1766 * Get LayoutManager. 1767 * 1768 * @returns { LayoutManager } - Return the LayoutManager. 1769 * @syscap SystemCapability.ArkUI.ArkUI.Full 1770 * @crossplatform 1771 * @atomicservice 1772 * @since 12 1773 */ 1774 getLayoutManager(): LayoutManager; 1775} 1776