@awayjs/scene 0.13.324 → 0.13.326
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc +100 -100
- package/README.md +61 -61
- package/bundle/awayjs-scene.umd.js +1 -1
- package/bundle/awayjs-scene.umd.js.map +1 -1
- package/copyVersionToIndex.js +23 -23
- package/dist/index.d.ts +76 -76
- package/dist/index.js +67 -67
- package/dist/lib/Scene.d.ts +85 -85
- package/dist/lib/Scene.js +285 -285
- package/dist/lib/Settings.d.ts +16 -16
- package/dist/lib/Settings.js +60 -60
- package/dist/lib/adapters/IDisplayObjectAdapter.d.ts +13 -13
- package/dist/lib/adapters/IDisplayObjectAdapter.js +1 -1
- package/dist/lib/adapters/IFilter.d.ts +24 -24
- package/dist/lib/adapters/IFilter.js +1 -1
- package/dist/lib/adapters/IMovieClipAdapter.d.ts +15 -15
- package/dist/lib/adapters/IMovieClipAdapter.js +1 -1
- package/dist/lib/adapters/ITextfieldAdapter.d.ts +4 -4
- package/dist/lib/adapters/ITextfieldAdapter.js +1 -1
- package/dist/lib/base/IBitmapDrawable.d.ts +11 -11
- package/dist/lib/base/IBitmapDrawable.js +1 -1
- package/dist/lib/base/IFrameLabel.d.ts +4 -4
- package/dist/lib/base/IFrameLabel.js +1 -1
- package/dist/lib/base/IFrameScript.d.ts +5 -5
- package/dist/lib/base/IFrameScript.js +1 -1
- package/dist/lib/base/MouseButtons.d.ts +26 -26
- package/dist/lib/base/MouseButtons.js +1 -1
- package/dist/lib/base/Timeline.d.ts +147 -147
- package/dist/lib/base/Timeline.js +525 -525
- package/dist/lib/base/TimelineActionType.d.ts +18 -18
- package/dist/lib/base/TimelineActionType.js +1 -1
- package/dist/lib/controllers/ControllerBase.d.ts +14 -14
- package/dist/lib/controllers/ControllerBase.js +60 -60
- package/dist/lib/controllers/FirstPersonController.d.ts +78 -78
- package/dist/lib/controllers/FirstPersonController.js +228 -228
- package/dist/lib/controllers/FollowController.d.ts +12 -12
- package/dist/lib/controllers/FollowController.js +27 -27
- package/dist/lib/controllers/HoverController.d.ts +105 -105
- package/dist/lib/controllers/HoverController.js +302 -302
- package/dist/lib/controllers/LookAtController.d.ts +14 -14
- package/dist/lib/controllers/LookAtController.js +68 -68
- package/dist/lib/controllers/SpringController.d.ts +38 -38
- package/dist/lib/controllers/SpringController.js +59 -59
- package/dist/lib/display/Billboard.d.ts +132 -132
- package/dist/lib/display/Billboard.js +397 -397
- package/dist/lib/display/Camera.d.ts +31 -31
- package/dist/lib/display/Camera.js +72 -72
- package/dist/lib/display/DisplayObject.d.ts +921 -921
- package/dist/lib/display/DisplayObject.js +1595 -1595
- package/dist/lib/display/DisplayObjectContainer.d.ts +325 -325
- package/dist/lib/display/DisplayObjectContainer.js +486 -486
- package/dist/lib/display/LineSegment.d.ts +69 -69
- package/dist/lib/display/LineSegment.js +203 -203
- package/dist/lib/display/LoaderContainer.d.ts +504 -504
- package/dist/lib/display/LoaderContainer.js +603 -603
- package/dist/lib/display/MorphSprite.d.ts +20 -20
- package/dist/lib/display/MorphSprite.js +246 -246
- package/dist/lib/display/MovieClip.d.ts +149 -149
- package/dist/lib/display/MovieClip.js +733 -733
- package/dist/lib/display/SimpleButton.d.ts +158 -158
- package/dist/lib/display/SimpleButton.js +228 -228
- package/dist/lib/display/Skybox.d.ts +144 -144
- package/dist/lib/display/Skybox.js +288 -288
- package/dist/lib/display/Sprite.d.ts +65 -65
- package/dist/lib/display/Sprite.js +134 -134
- package/dist/lib/display/TextField.d.ts +1104 -1104
- package/dist/lib/display/TextField.d.ts.map +1 -1
- package/dist/lib/display/TextField.js +3019 -3018
- package/dist/lib/display/TextSprite.d.ts +16 -16
- package/dist/lib/display/TextSprite.js +36 -36
- package/dist/lib/elements/SkyboxElements.d.ts +29 -29
- package/dist/lib/elements/SkyboxElements.js +127 -127
- package/dist/lib/errors/CastError.d.ts +4 -4
- package/dist/lib/errors/CastError.js +10 -10
- package/dist/lib/events/CameraEvent.d.ts +16 -16
- package/dist/lib/events/CameraEvent.js +30 -30
- package/dist/lib/events/FocusEvent.d.ts +42 -42
- package/dist/lib/events/FocusEvent.js +43 -43
- package/dist/lib/events/KeyboardEvent.d.ts +21 -21
- package/dist/lib/events/KeyboardEvent.js +43 -43
- package/dist/lib/events/MouseEvent.d.ts +91 -91
- package/dist/lib/events/MouseEvent.js +122 -122
- package/dist/lib/events/PointerEvent.d.ts +93 -93
- package/dist/lib/events/PointerEvent.js +73 -73
- package/dist/lib/events/ResizeEvent.d.ts +15 -15
- package/dist/lib/events/ResizeEvent.js +38 -38
- package/dist/lib/events/TextfieldEvent.d.ts +19 -19
- package/dist/lib/events/TextfieldEvent.js +28 -28
- package/dist/lib/events/TouchEvent.d.ts +54 -54
- package/dist/lib/events/TouchEvent.js +89 -89
- package/dist/lib/factories/DefaultSceneGraphFactory.d.ts +27 -27
- package/dist/lib/factories/DefaultSceneGraphFactory.js +55 -55
- package/dist/lib/factories/ISceneGraphFactory.d.ts +20 -20
- package/dist/lib/factories/ISceneGraphFactory.js +1 -1
- package/dist/lib/image/SceneImage2D.d.ts +220 -220
- package/dist/lib/image/SceneImage2D.js +610 -610
- package/dist/lib/managers/DefaultFontManager.d.ts +14 -14
- package/dist/lib/managers/DefaultFontManager.js +101 -101
- package/dist/lib/managers/DeviceFontManager.d.ts +8 -8
- package/dist/lib/managers/DeviceFontManager.js +44 -44
- package/dist/lib/managers/FrameScriptManager.d.ts +37 -37
- package/dist/lib/managers/FrameScriptManager.js +386 -386
- package/dist/lib/managers/IInputRecorder.d.ts +3 -3
- package/dist/lib/managers/IInputRecorder.js +1 -1
- package/dist/lib/managers/MouseManager.d.ts +74 -74
- package/dist/lib/managers/MouseManager.js +803 -803
- package/dist/lib/prefabs/PrefabBase.d.ts +19 -19
- package/dist/lib/prefabs/PrefabBase.js +42 -42
- package/dist/lib/prefabs/PrimitiveCapsulePrefab.d.ts +56 -56
- package/dist/lib/prefabs/PrimitiveCapsulePrefab.js +269 -269
- package/dist/lib/prefabs/PrimitiveConePrefab.d.ts +21 -21
- package/dist/lib/prefabs/PrimitiveConePrefab.js +43 -43
- package/dist/lib/prefabs/PrimitiveCubePrefab.d.ts +74 -74
- package/dist/lib/prefabs/PrimitiveCubePrefab.js +545 -545
- package/dist/lib/prefabs/PrimitiveCylinderPrefab.d.ts +79 -79
- package/dist/lib/prefabs/PrimitiveCylinderPrefab.js +584 -584
- package/dist/lib/prefabs/PrimitivePlanePrefab.d.ts +65 -65
- package/dist/lib/prefabs/PrimitivePlanePrefab.js +300 -300
- package/dist/lib/prefabs/PrimitivePolygonPrefab.d.ts +29 -29
- package/dist/lib/prefabs/PrimitivePolygonPrefab.js +64 -64
- package/dist/lib/prefabs/PrimitivePrefabBase.d.ts +67 -67
- package/dist/lib/prefabs/PrimitivePrefabBase.js +158 -158
- package/dist/lib/prefabs/PrimitiveSpherePrefab.d.ts +48 -48
- package/dist/lib/prefabs/PrimitiveSpherePrefab.js +294 -294
- package/dist/lib/prefabs/PrimitiveTorusPrefab.d.ts +55 -55
- package/dist/lib/prefabs/PrimitiveTorusPrefab.js +260 -260
- package/dist/lib/text/AntiAliasType.d.ts +24 -24
- package/dist/lib/text/AntiAliasType.js +28 -28
- package/dist/lib/text/BitmapFontChar.d.ts +39 -39
- package/dist/lib/text/BitmapFontChar.js +42 -42
- package/dist/lib/text/BitmapFontTable.d.ts +73 -73
- package/dist/lib/text/BitmapFontTable.js +183 -183
- package/dist/lib/text/FNTGenerator.d.ts +10 -10
- package/dist/lib/text/FNTGenerator.js +74 -74
- package/dist/lib/text/FNTGeneratorCanvas.d.ts +22 -22
- package/dist/lib/text/FNTGeneratorCanvas.js +211 -211
- package/dist/lib/text/FNTGeneratrorBase.d.ts +7 -7
- package/dist/lib/text/FNTGeneratrorBase.js +7 -7
- package/dist/lib/text/Font.d.ts +38 -38
- package/dist/lib/text/Font.js +109 -109
- package/dist/lib/text/FontLookUpMode.d.ts +5 -5
- package/dist/lib/text/FontLookUpMode.js +7 -7
- package/dist/lib/text/FontStyleName.d.ts +6 -6
- package/dist/lib/text/FontStyleName.js +7 -7
- package/dist/lib/text/GridFitType.d.ts +31 -31
- package/dist/lib/text/GridFitType.js +35 -35
- package/dist/lib/text/HTMLTextProcessor.d.ts +8 -8
- package/dist/lib/text/HTMLTextProcessor.js +426 -426
- package/dist/lib/text/IFontTable.d.ts +16 -16
- package/dist/lib/text/IFontTable.js +1 -1
- package/dist/lib/text/TesselatedFontChar.d.ts +58 -58
- package/dist/lib/text/TesselatedFontChar.js +66 -66
- package/dist/lib/text/TesselatedFontTable.d.ts +88 -88
- package/dist/lib/text/TesselatedFontTable.js +963 -963
- package/dist/lib/text/TextFieldAutoSize.d.ts +28 -28
- package/dist/lib/text/TextFieldAutoSize.js +32 -32
- package/dist/lib/text/TextFieldType.d.ts +20 -20
- package/dist/lib/text/TextFieldType.js +24 -24
- package/dist/lib/text/TextFormat.d.ts +273 -273
- package/dist/lib/text/TextFormat.js +449 -449
- package/dist/lib/text/TextFormatAlign.d.ts +26 -26
- package/dist/lib/text/TextFormatAlign.js +30 -30
- package/dist/lib/text/TextInteractionMode.d.ts +21 -21
- package/dist/lib/text/TextInteractionMode.js +25 -25
- package/dist/lib/text/TextLineMetrics.d.ts +61 -61
- package/dist/lib/text/TextLineMetrics.js +42 -42
- package/dist/lib/text/TextShape.d.ts +22 -22
- package/dist/lib/text/TextShape.js +75 -75
- package/dist/lib/tools/Merge.d.ts +81 -81
- package/dist/lib/tools/Merge.js +266 -266
- package/dist/lib/utils/Cast.d.ts +20 -20
- package/dist/lib/utils/Cast.js +271 -271
- package/index.ts +92 -92
- package/lib/Scene.ts +339 -339
- package/lib/Settings.ts +83 -83
- package/lib/adapters/IDisplayObjectAdapter.ts +23 -23
- package/lib/adapters/IFilter.ts +25 -25
- package/lib/adapters/IMovieClipAdapter.ts +26 -26
- package/lib/adapters/ITextfieldAdapter.ts +6 -6
- package/lib/base/IBitmapDrawable.ts +13 -13
- package/lib/base/IFrameLabel.ts +3 -3
- package/lib/base/IFrameScript.ts +4 -4
- package/lib/base/MouseButtons.ts +31 -31
- package/lib/base/Timeline.ts +715 -715
- package/lib/base/TimelineActionType.ts +18 -18
- package/lib/controllers/ControllerBase.ts +66 -66
- package/lib/controllers/FirstPersonController.ts +241 -241
- package/lib/controllers/FollowController.ts +22 -22
- package/lib/controllers/HoverController.ts +304 -304
- package/lib/controllers/LookAtController.ts +75 -75
- package/lib/controllers/SpringController.ts +91 -91
- package/lib/display/Billboard.ts +468 -468
- package/lib/display/Camera.ts +75 -75
- package/lib/display/DisplayObject.ts +1829 -1829
- package/lib/display/DisplayObjectContainer.ts +546 -546
- package/lib/display/LineSegment.ts +229 -229
- package/lib/display/LoaderContainer.ts +651 -651
- package/lib/display/MorphSprite.ts +339 -339
- package/lib/display/MovieClip.ts +870 -870
- package/lib/display/SimpleButton.ts +224 -224
- package/lib/display/Skybox.ts +352 -352
- package/lib/display/Sprite.ts +154 -154
- package/lib/display/TextField.ts +3876 -3875
- package/lib/display/TextSprite.ts +34 -34
- package/lib/elements/SkyboxElements.ts +141 -141
- package/lib/errors/CastError.ts +6 -6
- package/lib/events/CameraEvent.ts +29 -29
- package/lib/events/FocusEvent.ts +69 -69
- package/lib/events/KeyboardEvent.ts +40 -40
- package/lib/events/MouseEvent.ts +144 -144
- package/lib/events/PointerEvent.ts +145 -145
- package/lib/events/ResizeEvent.ts +31 -31
- package/lib/events/TextfieldEvent.ts +28 -28
- package/lib/events/TouchEvent.ts +103 -103
- package/lib/factories/DefaultSceneGraphFactory.ts +58 -58
- package/lib/factories/ISceneGraphFactory.ts +28 -28
- package/lib/image/SceneImage2D.ts +912 -912
- package/lib/managers/DefaultFontManager.ts +124 -124
- package/lib/managers/DeviceFontManager.ts +55 -55
- package/lib/managers/FrameScriptManager.ts +440 -440
- package/lib/managers/IInputRecorder.ts +2 -2
- package/lib/managers/MouseManager.ts +942 -942
- package/lib/prefabs/PrefabBase.ts +47 -47
- package/lib/prefabs/PrimitiveCapsulePrefab.ts +286 -286
- package/lib/prefabs/PrimitiveConePrefab.ts +37 -37
- package/lib/prefabs/PrimitiveCubePrefab.ts +630 -630
- package/lib/prefabs/PrimitiveCylinderPrefab.ts +657 -657
- package/lib/prefabs/PrimitivePlanePrefab.ts +352 -352
- package/lib/prefabs/PrimitivePolygonPrefab.ts +53 -53
- package/lib/prefabs/PrimitivePrefabBase.ts +177 -177
- package/lib/prefabs/PrimitiveSpherePrefab.ts +336 -336
- package/lib/prefabs/PrimitiveTorusPrefab.ts +282 -282
- package/lib/text/AntiAliasType.ts +24 -24
- package/lib/text/BitmapFontChar.ts +53 -53
- package/lib/text/BitmapFontTable.ts +213 -213
- package/lib/text/FNTGenerator.ts +100 -100
- package/lib/text/FNTGeneratorCanvas.ts +292 -292
- package/lib/text/FNTGeneratrorBase.ts +10 -10
- package/lib/text/Font.ts +114 -114
- package/lib/text/FontLookUpMode.ts +5 -5
- package/lib/text/FontStyleName.ts +6 -6
- package/lib/text/GridFitType.ts +32 -32
- package/lib/text/HTMLTextProcessor.ts +421 -421
- package/lib/text/IFontTable.ts +17 -17
- package/lib/text/TesselatedFontChar.ts +80 -80
- package/lib/text/TesselatedFontTable.ts +1181 -1181
- package/lib/text/TextFieldAutoSize.ts +30 -30
- package/lib/text/TextFieldType.ts +21 -21
- package/lib/text/TextFormat.ts +603 -603
- package/lib/text/TextFormatAlign.ts +28 -28
- package/lib/text/TextInteractionMode.ts +21 -21
- package/lib/text/TextLineMetrics.ts +74 -74
- package/lib/text/TextShape.ts +91 -91
- package/lib/tools/Merge.ts +311 -311
- package/lib/utils/Cast.ts +304 -304
- package/package.json +74 -74
- package/rollup.config.js +33 -33
- package/scripts/build.sh +2 -2
- package/scripts/gendocs.sh +14 -14
- package/scripts/genexamples.sh +14 -14
- package/scripts/genfull.sh +14 -14
- package/system.config.js +51 -51
- package/tsconfig.json +18 -18
|
@@ -1,1105 +1,1105 @@
|
|
|
1
|
-
import { Rectangle, Vector3D } from '@awayjs/core';
|
|
2
|
-
import { IEntity } from '@awayjs/view';
|
|
3
|
-
import { Shape } from '@awayjs/graphics';
|
|
4
|
-
import { AntiAliasType } from '../text/AntiAliasType';
|
|
5
|
-
import { GridFitType } from '../text/GridFitType';
|
|
6
|
-
import { TextFieldType } from '../text/TextFieldType';
|
|
7
|
-
import { TextFormat } from '../text/TextFormat';
|
|
8
|
-
import { TextInteractionMode } from '../text/TextInteractionMode';
|
|
9
|
-
import { TextLineMetrics } from '../text/TextLineMetrics';
|
|
10
|
-
import { DisplayObject } from './DisplayObject';
|
|
11
|
-
import { DisplayObjectContainer } from './DisplayObjectContainer';
|
|
12
|
-
import { TextShape } from '../text/TextShape';
|
|
13
|
-
import { MouseEvent } from '../events/MouseEvent';
|
|
14
|
-
interface IWord {
|
|
15
|
-
start: number;
|
|
16
|
-
x: number;
|
|
17
|
-
y: number;
|
|
18
|
-
width: number;
|
|
19
|
-
len: number;
|
|
20
|
-
}
|
|
21
|
-
declare class WordStore {
|
|
22
|
-
store: Array<IWord>;
|
|
23
|
-
index: number;
|
|
24
|
-
constructor(size?: number);
|
|
25
|
-
put(start: number, x: number, y: number, width: number, len: number): IWord;
|
|
26
|
-
get last(): IWord;
|
|
27
|
-
get length(): number;
|
|
28
|
-
set length(v: number);
|
|
29
|
-
get(index: number): IWord;
|
|
30
|
-
free(): void;
|
|
31
|
-
dispose(): void;
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* The TextField class is used to create display objects for text display and
|
|
35
|
-
* input. <ph outputclass="flexonly">You can use the TextField class to
|
|
36
|
-
* perform low-level text rendering. However, in Flex, you typically use the
|
|
37
|
-
* Label, Text, TextArea, and TextInput controls to process text. <ph
|
|
38
|
-
* outputclass="flashonly">You can give a text field an instance name in the
|
|
39
|
-
* Property inspector and use the methods and properties of the TextField
|
|
40
|
-
* class to manipulate it with ActionScript. TextField instance names are
|
|
41
|
-
* displayed in the Movie Explorer and in the Insert Target Path dialog box in
|
|
42
|
-
* the Actions panel.
|
|
43
|
-
*
|
|
44
|
-
* <p>To create a text field dynamically, use the <code>TextField()</code>
|
|
45
|
-
* constructor.</p>
|
|
46
|
-
*
|
|
47
|
-
* <p>The methods of the TextField class let you set, select, and manipulate
|
|
48
|
-
* text in a dynamic or input text field that you create during authoring or
|
|
49
|
-
* at runtime. </p>
|
|
50
|
-
*
|
|
51
|
-
* <p>ActionScript provides several ways to format your text at runtime. The
|
|
52
|
-
* TextFormat class lets you set character and paragraph formatting for
|
|
53
|
-
* TextField objects. You can apply Cascading Style Sheets(CSS) styles to
|
|
54
|
-
* text fields by using the <code>TextField.styleSheet</code> property and the
|
|
55
|
-
* StyleSheet class. You can use CSS to style built-in HTML tags, define new
|
|
56
|
-
* formatting tags, or apply styles. You can assign HTML formatted text, which
|
|
57
|
-
* optionally uses CSS styles, directly to a text field. HTML text that you
|
|
58
|
-
* assign to a text field can contain embedded media(movie clips, SWF files,
|
|
59
|
-
* GIF files, PNG files, and JPEG files). The text wraps around the embedded
|
|
60
|
-
* media in the same way that a web browser wraps text around media embedded
|
|
61
|
-
* in an HTML document. </p>
|
|
62
|
-
*
|
|
63
|
-
* <p>Flash Player supports a subset of HTML tags that you can use to format
|
|
64
|
-
* text. See the list of supported HTML tags in the description of the
|
|
65
|
-
* <code>htmlText</code> property.</p>
|
|
66
|
-
*
|
|
67
|
-
* @event change Dispatched after a control value is
|
|
68
|
-
* modified, unlike the
|
|
69
|
-
* <code>textInput</code> event, which is
|
|
70
|
-
* dispatched before the value is modified.
|
|
71
|
-
* Unlike the W3C DOM Event Model version of
|
|
72
|
-
* the <code>change</code> event, which
|
|
73
|
-
* dispatches the event only after the
|
|
74
|
-
* control loses focus, the ActionScript 3.0
|
|
75
|
-
* version of the <code>change</code> event
|
|
76
|
-
* is dispatched any time the control
|
|
77
|
-
* changes. For example, if a user types text
|
|
78
|
-
* into a text field, a <code>change</code>
|
|
79
|
-
* event is dispatched after every keystroke.
|
|
80
|
-
* @event link Dispatched when a user clicks a hyperlink
|
|
81
|
-
* in an HTML-enabled text field, where the
|
|
82
|
-
* URL begins with "event:". The remainder of
|
|
83
|
-
* the URL after "event:" is placed in the
|
|
84
|
-
* text property of the LINK event.
|
|
85
|
-
*
|
|
86
|
-
* <p><b>Note:</b> The default behavior,
|
|
87
|
-
* adding the text to the text field, occurs
|
|
88
|
-
* only when Flash Player generates the
|
|
89
|
-
* event, which in this case happens when a
|
|
90
|
-
* user attempts to input text. You cannot
|
|
91
|
-
* put text into a text field by sending it
|
|
92
|
-
* <code>textInput</code> events.</p>
|
|
93
|
-
* @event scroll Dispatched by a TextField object
|
|
94
|
-
* <i>after</i> the user scrolls.
|
|
95
|
-
* @event textInput Flash Player dispatches the
|
|
96
|
-
* <code>textInput</code> event when a user
|
|
97
|
-
* enters one or more characters of text.
|
|
98
|
-
* Various text input methods can generate
|
|
99
|
-
* this event, including standard keyboards,
|
|
100
|
-
* input method editors(IMEs), voice or
|
|
101
|
-
* speech recognition systems, and even the
|
|
102
|
-
* act of pasting plain text with no
|
|
103
|
-
* formatting or style information.
|
|
104
|
-
* @event textInteractionModeChange Flash Player dispatches the
|
|
105
|
-
* <code>textInteractionModeChange</code>
|
|
106
|
-
* event when a user changes the interaction
|
|
107
|
-
* mode of a text field. for example on
|
|
108
|
-
* Android, one can toggle from NORMAL mode
|
|
109
|
-
* to SELECTION mode using context menu
|
|
110
|
-
* options
|
|
111
|
-
*/
|
|
112
|
-
export declare class TextField extends DisplayObjectContainer {
|
|
113
|
-
private _onClipboardPasteDelegate;
|
|
114
|
-
private static _textFields;
|
|
115
|
-
static assetType: string;
|
|
116
|
-
static getNewTextField(): TextField;
|
|
117
|
-
static clearPool(): void;
|
|
118
|
-
private static _onChangedEvent;
|
|
119
|
-
textOffsetX: number;
|
|
120
|
-
textOffsetY: number;
|
|
121
|
-
private _width;
|
|
122
|
-
private _height;
|
|
123
|
-
private _graphics;
|
|
124
|
-
private _bottomScrollV;
|
|
125
|
-
private _caretIndex;
|
|
126
|
-
private _maxScrollH;
|
|
127
|
-
private _maxScrollV;
|
|
128
|
-
private _numLines;
|
|
129
|
-
private _selectionBeginIndex;
|
|
130
|
-
private _selectionEndIndex;
|
|
131
|
-
private _biggestLine;
|
|
132
|
-
/**
|
|
133
|
-
* Renderable text, used for computing a glyphs
|
|
134
|
-
* @private
|
|
135
|
-
*/
|
|
136
|
-
private _iText;
|
|
137
|
-
/**
|
|
138
|
-
* Place where is diff is begun to end
|
|
139
|
-
* @private
|
|
140
|
-
*/
|
|
141
|
-
private _iTextDiffStart;
|
|
142
|
-
/**
|
|
143
|
-
* Original text passed to field
|
|
144
|
-
* @private
|
|
145
|
-
*/
|
|
146
|
-
private _text;
|
|
147
|
-
private _iTextWoLineBreaks;
|
|
148
|
-
private _textInteractionMode;
|
|
149
|
-
private _textWidth;
|
|
150
|
-
private _textHeight;
|
|
151
|
-
private _firstCharInParagraph;
|
|
152
|
-
private _imageReference;
|
|
153
|
-
private _paragraphLength;
|
|
154
|
-
_newTextFormat: TextFormat;
|
|
155
|
-
_textFormats: TextFormat[];
|
|
156
|
-
_textFormatsIdx: number[];
|
|
157
|
-
textShapes: StringMap<TextShape>;
|
|
158
|
-
private inMaskMode;
|
|
159
|
-
private maskChild;
|
|
160
|
-
private textChild;
|
|
161
|
-
private targetGraphics;
|
|
162
|
-
private cursorShape;
|
|
163
|
-
private bgShapeSelect;
|
|
164
|
-
private cursorIntervalID;
|
|
165
|
-
cursorBlinking: boolean;
|
|
166
|
-
showSelection: boolean;
|
|
167
|
-
private _textDirty;
|
|
168
|
-
private _positionsDirty;
|
|
169
|
-
private _glyphsDirty;
|
|
170
|
-
private _shapesDirty;
|
|
171
|
-
private _textShapesDirty;
|
|
172
|
-
private _newFormatDirty;
|
|
173
|
-
chars_codes: number[];
|
|
174
|
-
chars_width: number[];
|
|
175
|
-
tf_per_char: TextFormat[];
|
|
176
|
-
words: WordStore;
|
|
177
|
-
_lastWordsCount: number;
|
|
178
|
-
private _textRuns_formats;
|
|
179
|
-
private _textRuns_words;
|
|
180
|
-
private _paragraph_textRuns_indices;
|
|
181
|
-
private _maxWidthLine;
|
|
182
|
-
private _labelData;
|
|
183
|
-
html: boolean;
|
|
184
|
-
private lines_wordStartIndices;
|
|
185
|
-
private lines_wordEndIndices;
|
|
186
|
-
private lines_start_y;
|
|
187
|
-
private lines_start_x;
|
|
188
|
-
private lines_charIdx_start;
|
|
189
|
-
private lines_charIdx_end;
|
|
190
|
-
private lines_width;
|
|
191
|
-
private lines_height;
|
|
192
|
-
private lines_numSpacesPerline;
|
|
193
|
-
private char_positions_x;
|
|
194
|
-
private char_positions_y;
|
|
195
|
-
sourceTextField: TextField;
|
|
196
|
-
private _maskWidth;
|
|
197
|
-
private _maskHeight;
|
|
198
|
-
private _maskTextOffsetX;
|
|
199
|
-
private _maskTextOffsetY;
|
|
200
|
-
bgShape: Shape;
|
|
201
|
-
isStatic: boolean;
|
|
202
|
-
updateMaskMode(): void;
|
|
203
|
-
getMouseCursor(): string;
|
|
204
|
-
get isInFocus(): boolean;
|
|
205
|
-
set isInFocus(value: boolean);
|
|
206
|
-
setFocus(value: boolean, fromMouseDown?: boolean, sendSoftKeyEvent?: boolean): void;
|
|
207
|
-
private enableInput;
|
|
208
|
-
findCharIdxForMouse(event: MouseEvent): number;
|
|
209
|
-
private startSelectionByMouseDelegate;
|
|
210
|
-
private startSelectionByMouse;
|
|
211
|
-
private stopSelectionByMouseDelegate;
|
|
212
|
-
private stopSelectionByMouse;
|
|
213
|
-
private updateSelectionByMouseDelegate;
|
|
214
|
-
private updateSelectionByMouse;
|
|
215
|
-
private drawSelectionGraphics;
|
|
216
|
-
private scrollToCursor;
|
|
217
|
-
private drawCursor;
|
|
218
|
-
private drawSelectedBG;
|
|
219
|
-
drawBG(): void;
|
|
220
|
-
drawBorder(): void;
|
|
221
|
-
getTextShapeForIdentifierAndFormat(id: string, format: TextFormat): TextShape;
|
|
222
|
-
/**
|
|
223
|
-
* When set to <code>true</code> and the text field is not in focus, Flash
|
|
224
|
-
* Player highlights the selection in the text field in gray. When set to
|
|
225
|
-
* <code>false</code> and the text field is not in focus, Flash Player does
|
|
226
|
-
* not highlight the selection in the text field.
|
|
227
|
-
*
|
|
228
|
-
* @default false
|
|
229
|
-
*/
|
|
230
|
-
alwaysShowSelection: boolean;
|
|
231
|
-
/**
|
|
232
|
-
* The type of anti-aliasing used for this text field. Use
|
|
233
|
-
* <code>flash.text.AntiAliasType</code> constants for this property. You can
|
|
234
|
-
* control this setting only if the font is embedded(with the
|
|
235
|
-
* <code>embedFonts</code> property set to <code>true</code>). The default
|
|
236
|
-
* setting is <code>flash.text.AntiAliasType.NORMAL</code>.
|
|
237
|
-
*
|
|
238
|
-
* <p>To set values for this property, use the following string values:</p>
|
|
239
|
-
*/
|
|
240
|
-
antiAliasType: AntiAliasType;
|
|
241
|
-
/**
|
|
242
|
-
* Controls automatic sizing and alignment of text fields. Acceptable values
|
|
243
|
-
* for the <code>TextFieldAutoSize</code> constants:
|
|
244
|
-
* <code>TextFieldAutoSize.NONE</code>(the default),
|
|
245
|
-
* <code>TextFieldAutoSize.LEFT</code>, <code>TextFieldAutoSize.RIGHT</code>,
|
|
246
|
-
* and <code>TextFieldAutoSize.CENTER</code>.
|
|
247
|
-
*
|
|
248
|
-
* <p>If <code>autoSize</code> is set to <code>TextFieldAutoSize.NONE</code>
|
|
249
|
-
* (the default) no resizing occurs.</p>
|
|
250
|
-
*
|
|
251
|
-
* <p>If <code>autoSize</code> is set to <code>TextFieldAutoSize.LEFT</code>,
|
|
252
|
-
* the text is treated as left-justified text, meaning that the left margin
|
|
253
|
-
* of the text field remains fixed and any resizing of a single line of the
|
|
254
|
-
* text field is on the right margin. If the text includes a line break(for
|
|
255
|
-
* example, <code>"\n"</code> or <code>"\r"</code>), the bottom is also
|
|
256
|
-
* resized to fit the next line of text. If <code>wordWrap</code> is also set
|
|
257
|
-
* to <code>true</code>, only the bottom of the text field is resized and the
|
|
258
|
-
* right side remains fixed.</p>
|
|
259
|
-
*
|
|
260
|
-
* <p>If <code>autoSize</code> is set to
|
|
261
|
-
* <code>TextFieldAutoSize.RIGHT</code>, the text is treated as
|
|
262
|
-
* right-justified text, meaning that the right margin of the text field
|
|
263
|
-
* remains fixed and any resizing of a single line of the text field is on
|
|
264
|
-
* the left margin. If the text includes a line break(for example,
|
|
265
|
-
* <code>"\n" or "\r")</code>, the bottom is also resized to fit the next
|
|
266
|
-
* line of text. If <code>wordWrap</code> is also set to <code>true</code>,
|
|
267
|
-
* only the bottom of the text field is resized and the left side remains
|
|
268
|
-
* fixed.</p>
|
|
269
|
-
*
|
|
270
|
-
* <p>If <code>autoSize</code> is set to
|
|
271
|
-
* <code>TextFieldAutoSize.CENTER</code>, the text is treated as
|
|
272
|
-
* center-justified text, meaning that any resizing of a single line of the
|
|
273
|
-
* text field is equally distributed to both the right and left margins. If
|
|
274
|
-
* the text includes a line break(for example, <code>"\n"</code> or
|
|
275
|
-
* <code>"\r"</code>), the bottom is also resized to fit the next line of
|
|
276
|
-
* text. If <code>wordWrap</code> is also set to <code>true</code>, only the
|
|
277
|
-
* bottom of the text field is resized and the left and right sides remain
|
|
278
|
-
* fixed.</p>
|
|
279
|
-
*
|
|
280
|
-
* @throws ArgumentError The <code>autoSize</code> specified is not a member
|
|
281
|
-
* of flash.text.TextFieldAutoSize.
|
|
282
|
-
*/
|
|
283
|
-
private _autoSize;
|
|
284
|
-
get autoSize(): string;
|
|
285
|
-
set autoSize(value: string);
|
|
286
|
-
private _internalScale;
|
|
287
|
-
get internalScale(): Vector3D;
|
|
288
|
-
/**
|
|
289
|
-
*
|
|
290
|
-
* @returns {string}
|
|
291
|
-
*/
|
|
292
|
-
get assetType(): string;
|
|
293
|
-
/**
|
|
294
|
-
* Specifies whether the text field has a background fill. If
|
|
295
|
-
* <code>true</code>, the text field has a background fill. If
|
|
296
|
-
* <code>false</code>, the text field has no background fill. Use the
|
|
297
|
-
* <code>backgroundColor</code> property to set the background color of a
|
|
298
|
-
* text field.
|
|
299
|
-
*
|
|
300
|
-
* @default false
|
|
301
|
-
*/
|
|
302
|
-
private _background;
|
|
303
|
-
get background(): boolean;
|
|
304
|
-
set background(value: boolean);
|
|
305
|
-
/**
|
|
306
|
-
* The color of the text field background. The default value is
|
|
307
|
-
* <code>0xFFFFFF</code>(white). This property can be retrieved or set, even
|
|
308
|
-
* if there currently is no background, but the color is visible only if the
|
|
309
|
-
* text field has the <code>background</code> property set to
|
|
310
|
-
* <code>true</code>.
|
|
311
|
-
*/
|
|
312
|
-
private _backgroundColor;
|
|
313
|
-
get backgroundColor(): number;
|
|
314
|
-
set backgroundColor(value: number);
|
|
315
|
-
/**
|
|
316
|
-
* Specifies whether the text field has a border. If <code>true</code>, the
|
|
317
|
-
* text field has a border. If <code>false</code>, the text field has no
|
|
318
|
-
* border. Use the <code>borderColor</code> property to set the border color.
|
|
319
|
-
*
|
|
320
|
-
* @default false
|
|
321
|
-
*/
|
|
322
|
-
private _border;
|
|
323
|
-
get border(): boolean;
|
|
324
|
-
set border(value: boolean);
|
|
325
|
-
/**
|
|
326
|
-
* The color of the text field border. The default value is
|
|
327
|
-
* <code>0x000000</code>(black). This property can be retrieved or set, even
|
|
328
|
-
* if there currently is no border, but the color is visible only if the text
|
|
329
|
-
* field has the <code>border</code> property set to <code>true</code>.
|
|
330
|
-
*/
|
|
331
|
-
private _borderColor;
|
|
332
|
-
get borderColor(): number;
|
|
333
|
-
set borderColor(value: number);
|
|
334
|
-
/**
|
|
335
|
-
* An integer(1-based index) that indicates the bottommost line that is
|
|
336
|
-
* currently visible in the specified text field. Think of the text field as
|
|
337
|
-
* a window onto a block of text. The <code>scrollV</code> property is the
|
|
338
|
-
* 1-based index of the topmost visible line in the window.
|
|
339
|
-
*
|
|
340
|
-
* <p>All the text between the lines indicated by <code>scrollV</code> and
|
|
341
|
-
* <code>bottomScrollV</code> is currently visible in the text field.</p>
|
|
342
|
-
*/
|
|
343
|
-
get bottomScrollV(): number;
|
|
344
|
-
set bottomScrollV(value: number);
|
|
345
|
-
/**
|
|
346
|
-
* The index of the insertion point(caret) position. If no insertion point
|
|
347
|
-
* is displayed, the value is the position the insertion point would be if
|
|
348
|
-
* you restored focus to the field(typically where the insertion point last
|
|
349
|
-
* was, or 0 if the field has not had focus).
|
|
350
|
-
*
|
|
351
|
-
* <p>Selection span indexes are zero-based(for example, the first position
|
|
352
|
-
* is 0, the second position is 1, and so on).</p>
|
|
353
|
-
*/
|
|
354
|
-
get caretIndex(): number;
|
|
355
|
-
/**
|
|
356
|
-
* A Boolean value that specifies whether extra white space(spaces, line
|
|
357
|
-
* breaks, and so on) in a text field with HTML text is removed. The default
|
|
358
|
-
* value is <code>false</code>. The <code>condenseWhite</code> property only
|
|
359
|
-
* affects text set with the <code>htmlText</code> property, not the
|
|
360
|
-
* <code>text</code> property. If you set text with the <code>text</code>
|
|
361
|
-
* property, <code>condenseWhite</code> is ignored.
|
|
362
|
-
*
|
|
363
|
-
* <p>If <code>condenseWhite</code> is set to <code>true</code>, use standard
|
|
364
|
-
* HTML commands such as <code><BR></code> and <code><P></code> to place line
|
|
365
|
-
* breaks in the text field.</p>
|
|
366
|
-
*
|
|
367
|
-
* <p>Set the <code>condenseWhite</code> property before setting the
|
|
368
|
-
* <code>htmlText</code> property.</p>
|
|
369
|
-
*/
|
|
370
|
-
condenseWhite: boolean;
|
|
371
|
-
/**
|
|
372
|
-
* Specifies the format applied to newly inserted text, such as text entered
|
|
373
|
-
* by a user or text inserted with the <code>replaceSelectedText()</code>
|
|
374
|
-
* method.
|
|
375
|
-
*
|
|
376
|
-
* <p><b>Note:</b> When selecting characters to be replaced with
|
|
377
|
-
* <code>setSelection()</code> and <code>replaceSelectedText()</code>, the
|
|
378
|
-
* <code>defaultTextFormat</code> will be applied only if the text has been
|
|
379
|
-
* selected up to and including the last character. Here is an example:</p>
|
|
380
|
-
* <pre xml:space="preserve"> public my_txt:TextField new TextField();
|
|
381
|
-
* my_txt.text = "Flash Macintosh version"; public my_fmt:TextFormat = new
|
|
382
|
-
* TextFormat(); my_fmt.color = 0xFF0000; my_txt.defaultTextFormat = my_fmt;
|
|
383
|
-
* my_txt.setSelection(6,15); // partial text selected - defaultTextFormat
|
|
384
|
-
* not applied my_txt.setSelection(6,23); // text selected to end -
|
|
385
|
-
* defaultTextFormat applied my_txt.replaceSelectedText("Windows version");
|
|
386
|
-
* </pre>
|
|
387
|
-
*
|
|
388
|
-
* <p>When you access the <code>defaultTextFormat</code> property, the
|
|
389
|
-
* returned TextFormat object has all of its properties defined. No property
|
|
390
|
-
* is <code>null</code>.</p>
|
|
391
|
-
*
|
|
392
|
-
* <p><b>Note:</b> You can't set this property if a style sheet is applied to
|
|
393
|
-
* the text field.</p>
|
|
394
|
-
*
|
|
395
|
-
* @throws Error This method cannot be used on a text field with a style
|
|
396
|
-
* sheet.
|
|
397
|
-
*/
|
|
398
|
-
/**
|
|
399
|
-
* Specifies whether the text field is a password text field. If the value of
|
|
400
|
-
* this property is <code>true</code>, the text field is treated as a
|
|
401
|
-
* password text field and hides the input characters using asterisks instead
|
|
402
|
-
* of the actual characters. If <code>false</code>, the text field is not
|
|
403
|
-
* treated as a password text field. When password mode is enabled, the Cut
|
|
404
|
-
* and Copy commands and their corresponding keyboard shortcuts will not
|
|
405
|
-
* function. This security mechanism prevents an unscrupulous user from using
|
|
406
|
-
* the shortcuts to discover a password on an unattended computer.
|
|
407
|
-
*
|
|
408
|
-
* @default false
|
|
409
|
-
*/
|
|
410
|
-
displayAsPassword: boolean;
|
|
411
|
-
/**
|
|
412
|
-
* Specifies whether to render by using embedded font outlines. If
|
|
413
|
-
* <code>false</code>, Flash Player renders the text field by using device
|
|
414
|
-
* fonts.
|
|
415
|
-
*
|
|
416
|
-
* <p>If you set the <code>embedFonts</code> property to <code>true</code>
|
|
417
|
-
* for a text field, you must specify a font for that text by using the
|
|
418
|
-
* <code>font</code> property of a TextFormat object applied to the text
|
|
419
|
-
* field. If the specified font is not embedded in the SWF file, the text is
|
|
420
|
-
* not displayed.</p>
|
|
421
|
-
*
|
|
422
|
-
* @default false
|
|
423
|
-
*/
|
|
424
|
-
embedFonts: boolean;
|
|
425
|
-
/**
|
|
426
|
-
* The type of grid fitting used for this text field. This property applies
|
|
427
|
-
* only if the <code>flash.text.AntiAliasType</code> property of the text
|
|
428
|
-
* field is set to <code>flash.text.AntiAliasType.ADVANCED</code>.
|
|
429
|
-
*
|
|
430
|
-
* <p>The type of grid fitting used determines whether Flash Player forces
|
|
431
|
-
* strong horizontal and vertical lines to fit to a pixel or subpixel grid,
|
|
432
|
-
* or not at all.</p>
|
|
433
|
-
*
|
|
434
|
-
* <p>For the <code>flash.text.GridFitType</code> property, you can use the
|
|
435
|
-
* following string values:</p>
|
|
436
|
-
*
|
|
437
|
-
* @default pixel
|
|
438
|
-
*/
|
|
439
|
-
gridFitType: GridFitType;
|
|
440
|
-
/**
|
|
441
|
-
*
|
|
442
|
-
*/
|
|
443
|
-
get height(): number;
|
|
444
|
-
set height(val: number);
|
|
445
|
-
/**
|
|
446
|
-
* Contains the HTML representation of the text field contents.
|
|
447
|
-
*
|
|
448
|
-
* <p>Flash Player supports the following HTML tags:</p>
|
|
449
|
-
*
|
|
450
|
-
* <p>Flash Player and AIR also support explicit character codes, such as
|
|
451
|
-
* &(ASCII ampersand) and €(Unicode € symbol). </p>
|
|
452
|
-
*/
|
|
453
|
-
private _htmlText;
|
|
454
|
-
get htmlText(): string;
|
|
455
|
-
set htmlText(value: string);
|
|
456
|
-
/**
|
|
457
|
-
* The number of characters in a text field. A character such as tab
|
|
458
|
-
* (<code>\t</code>) counts as one character.
|
|
459
|
-
*/
|
|
460
|
-
get length(): number;
|
|
461
|
-
/**
|
|
462
|
-
* The maximum number of characters that the text field can contain, as
|
|
463
|
-
* entered by a user. A script can insert more text than
|
|
464
|
-
* <code>maxChars</code> allows; the <code>maxChars</code> property indicates
|
|
465
|
-
* only how much text a user can enter. If the value of this property is
|
|
466
|
-
* <code>0</code>, a user can enter an unlimited amount of text.
|
|
467
|
-
*
|
|
468
|
-
* @default 0
|
|
469
|
-
*/
|
|
470
|
-
maxChars: number;
|
|
471
|
-
/**
|
|
472
|
-
* The maximum value of <code>scrollH</code>.
|
|
473
|
-
*/
|
|
474
|
-
get maxScrollH(): number;
|
|
475
|
-
/**
|
|
476
|
-
* The maximum value of <code>scrollV</code>.
|
|
477
|
-
*/
|
|
478
|
-
get maxScrollV(): number;
|
|
479
|
-
/**
|
|
480
|
-
* A Boolean value that indicates whether Flash Player automatically scrolls
|
|
481
|
-
* multiline text fields when the user clicks a text field and rolls the
|
|
482
|
-
* mouse wheel. By default, this value is <code>true</code>. This property is
|
|
483
|
-
* useful if you want to prevent mouse wheel scrolling of text fields, or
|
|
484
|
-
* implement your own text field scrolling.
|
|
485
|
-
*/
|
|
486
|
-
mouseWheelEnabled: boolean;
|
|
487
|
-
/**
|
|
488
|
-
* Indicates whether field is a multiline text field. If the value is
|
|
489
|
-
* <code>true</code>, the text field is multiline; if the value is
|
|
490
|
-
* <code>false</code>, the text field is a single-line text field. In a field
|
|
491
|
-
* of type <code>TextFieldType.INPUT</code>, the <code>multiline</code> value
|
|
492
|
-
* determines whether the <code>Enter</code> key creates a new line(a value
|
|
493
|
-
* of <code>false</code>, and the <code>Enter</code> key is ignored). If you
|
|
494
|
-
* paste text into a <code>TextField</code> with a <code>multiline</code>
|
|
495
|
-
* value of <code>false</code>, newlines are stripped out of the text.
|
|
496
|
-
*
|
|
497
|
-
* @default false
|
|
498
|
-
*/
|
|
499
|
-
multiline: boolean;
|
|
500
|
-
/**
|
|
501
|
-
* Defines the number of text lines in a multiline text field. If
|
|
502
|
-
* <code>wordWrap</code> property is set to <code>true</code>, the number of
|
|
503
|
-
* lines increases when text wraps.
|
|
504
|
-
*/
|
|
505
|
-
get numLines(): number;
|
|
506
|
-
/**
|
|
507
|
-
* Indicates the set of characters that a user can enter into the text field.
|
|
508
|
-
* If the value of the <code>restrict</code> property is <code>null</code>,
|
|
509
|
-
* you can enter any character. If the value of the <code>restrict</code>
|
|
510
|
-
* property is an empty string, you cannot enter any character. If the value
|
|
511
|
-
* of the <code>restrict</code> property is a string of characters, you can
|
|
512
|
-
* enter only characters in the string into the text field. The string is
|
|
513
|
-
* scanned from left to right. You can specify a range by using the hyphen
|
|
514
|
-
* (-) character. Only user interaction is restricted; a script can put any
|
|
515
|
-
* text into the text field. <ph outputclass="flashonly">This property does
|
|
516
|
-
* not synchronize with the Embed font options in the Property inspector.
|
|
517
|
-
*
|
|
518
|
-
* <p>If the string begins with a caret(^) character, all characters are
|
|
519
|
-
* initially accepted and succeeding characters in the string are excluded
|
|
520
|
-
* from the set of accepted characters. If the string does not begin with a
|
|
521
|
-
* caret(^) character, no characters are initially accepted and succeeding
|
|
522
|
-
* characters in the string are included in the set of accepted
|
|
523
|
-
* characters.</p>
|
|
524
|
-
*
|
|
525
|
-
* <p>The following example allows only uppercase characters, spaces, and
|
|
526
|
-
* numbers to be entered into a text field:</p>
|
|
527
|
-
* <pre xml:space="preserve"> my_txt.restrict = "A-Z 0-9"; </pre>
|
|
528
|
-
*
|
|
529
|
-
* <p>The following example includes all characters, but excludes lowercase
|
|
530
|
-
* letters:</p>
|
|
531
|
-
* <pre xml:space="preserve"> my_txt.restrict = "^a-z"; </pre>
|
|
532
|
-
*
|
|
533
|
-
* <p>You can use a backslash to enter a ^ or - verbatim. The accepted
|
|
534
|
-
* backslash sequences are \-, \^ or \\. The backslash must be an actual
|
|
535
|
-
* character in the string, so when specified in ActionScript, a double
|
|
536
|
-
* backslash must be used. For example, the following code includes only the
|
|
537
|
-
* dash(-) and caret(^):</p>
|
|
538
|
-
* <pre xml:space="preserve"> my_txt.restrict = "\\-\\^"; </pre>
|
|
539
|
-
*
|
|
540
|
-
* <p>The ^ can be used anywhere in the string to toggle between including
|
|
541
|
-
* characters and excluding characters. The following code includes only
|
|
542
|
-
* uppercase letters, but excludes the uppercase letter Q:</p>
|
|
543
|
-
* <pre xml:space="preserve"> my_txt.restrict = "A-Z^Q"; </pre>
|
|
544
|
-
*
|
|
545
|
-
* <p>You can use the <code>\u</code> escape sequence to construct
|
|
546
|
-
* <code>restrict</code> strings. The following code includes only the
|
|
547
|
-
* characters from ASCII 32(space) to ASCII 126(tilde).</p>
|
|
548
|
-
* <pre xml:space="preserve"> my_txt.restrict = "\u0020-\u007E"; </pre>
|
|
549
|
-
*
|
|
550
|
-
* @default null
|
|
551
|
-
*/
|
|
552
|
-
_restrict: string;
|
|
553
|
-
_restrictRegex: RegExp;
|
|
554
|
-
get restrict(): string;
|
|
555
|
-
set restrict(value: string);
|
|
556
|
-
/**
|
|
557
|
-
* The current horizontal scrolling position. If the <code>scrollH</code>
|
|
558
|
-
* property is 0, the text is not horizontally scrolled. This property value
|
|
559
|
-
* is an integer that represents the horizontal position in pixels.
|
|
560
|
-
*
|
|
561
|
-
* <p>The units of horizontal scrolling are pixels, whereas the units of
|
|
562
|
-
* vertical scrolling are lines. Horizontal scrolling is measured in pixels
|
|
563
|
-
* because most fonts you typically use are proportionally spaced; that is,
|
|
564
|
-
* the characters can have different widths. Flash Player performs vertical
|
|
565
|
-
* scrolling by line because users usually want to see a complete line of
|
|
566
|
-
* text rather than a partial line. Even if a line uses multiple fonts, the
|
|
567
|
-
* height of the line adjusts to fit the largest font in use.</p>
|
|
568
|
-
*
|
|
569
|
-
* <p><b>Note: </b>The <code>scrollH</code> property is zero-based, not
|
|
570
|
-
* 1-based like the <code>scrollV</code> vertical scrolling property.</p>
|
|
571
|
-
*/
|
|
572
|
-
private _scrollH;
|
|
573
|
-
get scrollH(): number;
|
|
574
|
-
set scrollH(value: number);
|
|
575
|
-
/**
|
|
576
|
-
* The vertical position of text in a text field. The <code>scrollV</code>
|
|
577
|
-
* property is useful for directing users to a specific paragraph in a long
|
|
578
|
-
* passage, or creating scrolling text fields.
|
|
579
|
-
*
|
|
580
|
-
* <p>The units of vertical scrolling are lines, whereas the units of
|
|
581
|
-
* horizontal scrolling are pixels. If the first line displayed is the first
|
|
582
|
-
* line in the text field, scrollV is set to 1(not 0). Horizontal scrolling
|
|
583
|
-
* is measured in pixels because most fonts are proportionally spaced; that
|
|
584
|
-
* is, the characters can have different widths. Flash performs vertical
|
|
585
|
-
* scrolling by line because users usually want to see a complete line of
|
|
586
|
-
* text rather than a partial line. Even if there are multiple fonts on a
|
|
587
|
-
* line, the height of the line adjusts to fit the largest font in use.</p>
|
|
588
|
-
*/
|
|
589
|
-
_scrollV: number;
|
|
590
|
-
get scrollV(): number;
|
|
591
|
-
set scrollV(value: number);
|
|
592
|
-
/**
|
|
593
|
-
* A Boolean value that indicates whether the text field is selectable. The
|
|
594
|
-
* value <code>true</code> indicates that the text is selectable. The
|
|
595
|
-
* <code>selectable</code> property controls whether a text field is
|
|
596
|
-
* selectable, not whether a text field is editable. A dynamic text field can
|
|
597
|
-
* be selectable even if it is not editable. If a dynamic text field is not
|
|
598
|
-
* selectable, the user cannot select its text.
|
|
599
|
-
*
|
|
600
|
-
* <p>If <code>selectable</code> is set to <code>false</code>, the text in
|
|
601
|
-
* the text field does not respond to selection commands from the mouse or
|
|
602
|
-
* keyboard, and the text cannot be copied with the Copy command. If
|
|
603
|
-
* <code>selectable</code> is set to <code>true</code>, the text in the text
|
|
604
|
-
* field can be selected with the mouse or keyboard, and the text can be
|
|
605
|
-
* copied with the Copy command. You can select text this way even if the
|
|
606
|
-
* text field is a dynamic text field instead of an input text field. </p>
|
|
607
|
-
*
|
|
608
|
-
* @default true
|
|
609
|
-
*/
|
|
610
|
-
private _selectable;
|
|
611
|
-
get selectable(): boolean;
|
|
612
|
-
set selectable(value: boolean);
|
|
613
|
-
/**
|
|
614
|
-
* The zero-based character index value of the first character in the current
|
|
615
|
-
* selection. For example, the first character is 0, the second character is
|
|
616
|
-
* 1, and so on. If no text is selected, this property is the value of
|
|
617
|
-
* <code>caretIndex</code>.
|
|
618
|
-
*/
|
|
619
|
-
get selectionBeginIndex(): number;
|
|
620
|
-
/**
|
|
621
|
-
* The zero-based character index value of the last character in the current
|
|
622
|
-
* selection. For example, the first character is 0, the second character is
|
|
623
|
-
* 1, and so on. If no text is selected, this property is the value of
|
|
624
|
-
* <code>caretIndex</code>.
|
|
625
|
-
*/
|
|
626
|
-
get selectionEndIndex(): number;
|
|
627
|
-
/**
|
|
628
|
-
* The sharpness of the glyph edges in this text field. This property applies
|
|
629
|
-
* only if the <code>flash.text.AntiAliasType</code> property of the text
|
|
630
|
-
* field is set to <code>flash.text.AntiAliasType.ADVANCED</code>. The range
|
|
631
|
-
* for <code>sharpness</code> is a number from -400 to 400. If you attempt to
|
|
632
|
-
* set <code>sharpness</code> to a value outside that range, Flash sets the
|
|
633
|
-
* property to the nearest value in the range(either -400 or 400).
|
|
634
|
-
*
|
|
635
|
-
* @default 0
|
|
636
|
-
*/
|
|
637
|
-
sharpness: number;
|
|
638
|
-
/**
|
|
639
|
-
* Attaches a style sheet to the text field. For information on creating
|
|
640
|
-
* style sheets, see the StyleSheet class and the <i>ActionScript 3.0
|
|
641
|
-
* Developer's Guide</i>.
|
|
642
|
-
*
|
|
643
|
-
* <p>You can change the style sheet associated with a text field at any
|
|
644
|
-
* time. If you change the style sheet in use, the text field is redrawn with
|
|
645
|
-
* the new style sheet. You can set the style sheet to <code>null</code> or
|
|
646
|
-
* <code>undefined</code> to remove the style sheet. If the style sheet in
|
|
647
|
-
* use is removed, the text field is redrawn without a style sheet. </p>
|
|
648
|
-
*
|
|
649
|
-
* <p><b>Note:</b> If the style sheet is removed, the contents of both
|
|
650
|
-
* <code>TextField.text</code> and <code> TextField.htmlText</code> change to
|
|
651
|
-
* incorporate the formatting previously applied by the style sheet. To
|
|
652
|
-
* preserve the original <code>TextField.htmlText</code> contents without the
|
|
653
|
-
* formatting, save the value in a variable before removing the style
|
|
654
|
-
* sheet.</p>
|
|
655
|
-
*/
|
|
656
|
-
styleSheet: StyleSheet;
|
|
657
|
-
/**
|
|
658
|
-
* A string that is the current text in the text field. Lines are separated
|
|
659
|
-
* by the carriage return character(<code>'\r'</code>, ASCII 13). This
|
|
660
|
-
* property contains unformatted text in the text field, without HTML tags.
|
|
661
|
-
*
|
|
662
|
-
* <p>To get the text in HTML form, use the <code>htmlText</code>
|
|
663
|
-
* property.</p>
|
|
664
|
-
*/
|
|
665
|
-
get text(): string;
|
|
666
|
-
set text(value: string);
|
|
667
|
-
setLabelData(labelData: any): void;
|
|
668
|
-
get newTextFormat(): TextFormat;
|
|
669
|
-
set newTextFormat(value: TextFormat);
|
|
670
|
-
/**
|
|
671
|
-
* Indicates the horizontal scale(percentage) of the object as applied from
|
|
672
|
-
* the registration point. The default registration point is(0,0). 1.0
|
|
673
|
-
* equals 100% scale.
|
|
674
|
-
*
|
|
675
|
-
* <p>Scaling the local coordinate system changes the <code>x</code> and
|
|
676
|
-
* <code>y</code> property values, which are defined in whole pixels. </p>
|
|
677
|
-
*/
|
|
678
|
-
get scaleX(): number;
|
|
679
|
-
set scaleX(val: number);
|
|
680
|
-
/**
|
|
681
|
-
* Indicates the vertical scale(percentage) of an object as applied from the
|
|
682
|
-
* registration point of the object. The default registration point is(0,0).
|
|
683
|
-
* 1.0 is 100% scale.
|
|
684
|
-
*
|
|
685
|
-
* <p>Scaling the local coordinate system changes the <code>x</code> and
|
|
686
|
-
* <code>y</code> property values, which are defined in whole pixels. </p>
|
|
687
|
-
*/
|
|
688
|
-
get scaleY(): number;
|
|
689
|
-
set scaleY(val: number);
|
|
690
|
-
/**
|
|
691
|
-
* The color of the text in a text field, in hexadecimal format. The
|
|
692
|
-
* hexadecimal color system uses six digits to represent color values. Each
|
|
693
|
-
* digit has 16 possible values or characters. The characters range from 0-9
|
|
694
|
-
* and then A-F. For example, black is <code>0x000000</code>; white is
|
|
695
|
-
* <code>0xFFFFFF</code>.
|
|
696
|
-
*
|
|
697
|
-
* @default 0(0x000000)
|
|
698
|
-
*/
|
|
699
|
-
_textColor: number;
|
|
700
|
-
get textColor(): number;
|
|
701
|
-
set textColor(value: number);
|
|
702
|
-
private getTextColorForTextFormat;
|
|
703
|
-
/**
|
|
704
|
-
* The interaction mode property, Default value is
|
|
705
|
-
* TextInteractionMode.NORMAL. On mobile platforms, the normal mode implies
|
|
706
|
-
* that the text can be scrolled but not selected. One can switch to the
|
|
707
|
-
* selectable mode through the in-built context menu on the text field. On
|
|
708
|
-
* Desktop, the normal mode implies that the text is in scrollable as well as
|
|
709
|
-
* selection mode.
|
|
710
|
-
*/
|
|
711
|
-
get textInteractionMode(): TextInteractionMode;
|
|
712
|
-
/**
|
|
713
|
-
* The width of the text in pixels.
|
|
714
|
-
*/
|
|
715
|
-
get textWidth(): number;
|
|
716
|
-
/**
|
|
717
|
-
* The width of the text in pixels.
|
|
718
|
-
*/
|
|
719
|
-
get textHeight(): number;
|
|
720
|
-
/**
|
|
721
|
-
* The thickness of the glyph edges in this text field. This property applies
|
|
722
|
-
* only when <code>AntiAliasType</code> is set to
|
|
723
|
-
* <code>AntiAliasType.ADVANCED</code>.
|
|
724
|
-
*
|
|
725
|
-
* <p>The range for <code>thickness</code> is a number from -200 to 200. If
|
|
726
|
-
* you attempt to set <code>thickness</code> to a value outside that range,
|
|
727
|
-
* the property is set to the nearest value in the range(either -200 or
|
|
728
|
-
* 200).</p>
|
|
729
|
-
*
|
|
730
|
-
* @default 0
|
|
731
|
-
*/
|
|
732
|
-
thickness: number;
|
|
733
|
-
/**
|
|
734
|
-
* The type of the text field. Either one of the following TextFieldType
|
|
735
|
-
* constants: <code>TextFieldType.DYNAMIC</code>, which specifies a dynamic
|
|
736
|
-
* text field, which a user cannot edit, or <code>TextFieldType.INPUT</code>,
|
|
737
|
-
* which specifies an input text field, which a user can edit.
|
|
738
|
-
*
|
|
739
|
-
* @default dynamic
|
|
740
|
-
* @throws ArgumentError The <code>type</code> specified is not a member of
|
|
741
|
-
* flash.text.TextFieldType.
|
|
742
|
-
*/
|
|
743
|
-
_type: TextFieldType;
|
|
744
|
-
get type(): TextFieldType;
|
|
745
|
-
set type(value: TextFieldType);
|
|
746
|
-
/**
|
|
747
|
-
* Specifies whether to copy and paste the text formatting along with the
|
|
748
|
-
* text. When set to <code>true</code>, Flash Player copies and pastes
|
|
749
|
-
* formatting(such as alignment, bold, and italics) when you copy and paste
|
|
750
|
-
* between text fields. Both the origin and destination text fields for the
|
|
751
|
-
* copy and paste procedure must have <code>useRichTextClipboard</code> set
|
|
752
|
-
* to <code>true</code>. The default value is <code>false</code>.
|
|
753
|
-
*/
|
|
754
|
-
useRichTextClipboard: boolean;
|
|
755
|
-
/**
|
|
756
|
-
* A Boolean value that indicates whether the text field has word wrap. If
|
|
757
|
-
* the value of <code>wordWrap</code> is <code>true</code>, the text field
|
|
758
|
-
* has word wrap; if the value is <code>false</code>, the text field does not
|
|
759
|
-
* have word wrap. The default value is <code>false</code>.
|
|
760
|
-
*/
|
|
761
|
-
_wordWrap: boolean;
|
|
762
|
-
get x(): number;
|
|
763
|
-
set x(val: number);
|
|
764
|
-
/**
|
|
765
|
-
*
|
|
766
|
-
*/
|
|
767
|
-
get width(): number;
|
|
768
|
-
set width(val: number);
|
|
769
|
-
set wordWrap(val: boolean);
|
|
770
|
-
/**
|
|
771
|
-
* The width of the text in pixels.
|
|
772
|
-
*/
|
|
773
|
-
get wordWrap(): boolean;
|
|
774
|
-
/**
|
|
775
|
-
* Creates a new TextField instance. After you create the TextField instance,
|
|
776
|
-
* call the <code>addChild()</code> or <code>addChildAt()</code> method of
|
|
777
|
-
* the parent DisplayObjectContainer object to add the TextField instance to
|
|
778
|
-
* the display list.
|
|
779
|
-
*
|
|
780
|
-
* <p>The default size for a text field is 100 x 100 pixels.</p>
|
|
781
|
-
*/
|
|
782
|
-
constructor();
|
|
783
|
-
advanceFrame(): void;
|
|
784
|
-
getEntity(): IEntity;
|
|
785
|
-
clear(): void;
|
|
786
|
-
/**
|
|
787
|
-
* @inheritDoc
|
|
788
|
-
*/
|
|
789
|
-
dispose(): void;
|
|
790
|
-
/**
|
|
791
|
-
* @inheritDoc
|
|
792
|
-
*/
|
|
793
|
-
disposeValues(): void;
|
|
794
|
-
/**
|
|
795
|
-
* Reconstructs the Graphics for this Text-field.
|
|
796
|
-
*/
|
|
797
|
-
reConstruct(buildGraphics?: boolean): void;
|
|
798
|
-
reset(): void;
|
|
799
|
-
private onClipboardPaste;
|
|
800
|
-
private _resetParagraph;
|
|
801
|
-
private buildParagraphs;
|
|
802
|
-
private adjustPositionForAutoSize;
|
|
803
|
-
private getWordPositions;
|
|
804
|
-
staticMatrix: any;
|
|
805
|
-
private buildGlyphsForLabelData;
|
|
806
|
-
private buildGlyphs;
|
|
807
|
-
private buildShapes;
|
|
808
|
-
/**
|
|
809
|
-
* Appends the string specified by the <code>newText</code> parameter to the
|
|
810
|
-
* end of the text of the text field. This method is more efficient than an
|
|
811
|
-
* addition assignment(<code>+=</code>) on a <code>text</code> property
|
|
812
|
-
* (such as <code>someTextField.text += moreText</code>), particularly for a
|
|
813
|
-
* text field that contains a significant amount of content.
|
|
814
|
-
*
|
|
815
|
-
* @param newText The string to append to the existing text.
|
|
816
|
-
*/
|
|
817
|
-
appendText(newText: string): void;
|
|
818
|
-
/**
|
|
819
|
-
* *tells the Textfield that a paragraph is defined completly.
|
|
820
|
-
* e.g. the textfield will start a new line for future added text.
|
|
821
|
-
*/
|
|
822
|
-
closeParagraph(): void;
|
|
823
|
-
/**
|
|
824
|
-
* Returns a rectangle that is the bounding box of the character.
|
|
825
|
-
*
|
|
826
|
-
* @param charIndex The zero-based index value for the character(for
|
|
827
|
-
* example, the first position is 0, the second position is
|
|
828
|
-
* 1, and so on).
|
|
829
|
-
* @return A rectangle with <code>x</code> and <code>y</code> minimum and
|
|
830
|
-
* maximum values defining the bounding box of the character.
|
|
831
|
-
*/
|
|
832
|
-
getCharBoundaries(charIndex: number): Rectangle;
|
|
833
|
-
/**
|
|
834
|
-
* Returns the zero-based index value of the character at the point specified
|
|
835
|
-
* by the <code>x</code> and <code>y</code> parameters.
|
|
836
|
-
*
|
|
837
|
-
* @param x The <i>x</i> coordinate of the character.
|
|
838
|
-
* @param y The <i>y</i> coordinate of the character.
|
|
839
|
-
* @return The zero-based index value of the character(for example, the
|
|
840
|
-
* first position is 0, the second position is 1, and so on). Returns
|
|
841
|
-
* -1 if the point is not over any character.
|
|
842
|
-
*/
|
|
843
|
-
getCharIndexAtPoint(x: number, y: number, lineIdx?: number): number;
|
|
844
|
-
/**
|
|
845
|
-
* Given a character index, returns the index of the first character in the
|
|
846
|
-
* same paragraph.
|
|
847
|
-
*
|
|
848
|
-
* @param charIndex The zero-based index value of the character(for example,
|
|
849
|
-
* the first character is 0, the second character is 1, and
|
|
850
|
-
* so on).
|
|
851
|
-
* @return The zero-based index value of the first character in the same
|
|
852
|
-
* paragraph.
|
|
853
|
-
* @throws RangeError The character index specified is out of range.
|
|
854
|
-
*/
|
|
855
|
-
getFirstCharInParagraph(charIndex: number): number;
|
|
856
|
-
/**
|
|
857
|
-
* Returns a DisplayObject reference for the given <code>id</code>, for an
|
|
858
|
-
* image or SWF file that has been added to an HTML-formatted text field by
|
|
859
|
-
* using an <code><img></code> tag. The <code><img></code> tag is in the
|
|
860
|
-
* following format:
|
|
861
|
-
*
|
|
862
|
-
* <p><pre xml:space="preserve"><code> <img src = 'filename.jpg' id =
|
|
863
|
-
* 'instanceName' ></code></pre></p>
|
|
864
|
-
*
|
|
865
|
-
* @param id The <code>id</code> to match(in the <code>id</code> attribute
|
|
866
|
-
* of the <code><img></code> tag).
|
|
867
|
-
* @return The display object corresponding to the image or SWF file with the
|
|
868
|
-
* matching <code>id</code> attribute in the <code><img></code> tag
|
|
869
|
-
* of the text field. For media loaded from an external source, this
|
|
870
|
-
* object is a Loader object, and, once loaded, the media object is a
|
|
871
|
-
* child of that Loader object. For media embedded in the SWF file,
|
|
872
|
-
* it is the loaded object. If no <code><img></code> tag with the
|
|
873
|
-
* matching <code>id</code> exists, the method returns
|
|
874
|
-
* <code>null</code>.
|
|
875
|
-
*/
|
|
876
|
-
getImageReference(id: string): DisplayObject;
|
|
877
|
-
/**
|
|
878
|
-
* Returns the zero-based index value of the line at the point specified by
|
|
879
|
-
* the <code>x</code> and <code>y</code> parameters.
|
|
880
|
-
*
|
|
881
|
-
* @param x The <i>x</i> coordinate of the line.
|
|
882
|
-
* @param y The <i>y</i> coordinate of the line.
|
|
883
|
-
* @return The zero-based index value of the line(for example, the first
|
|
884
|
-
* line is 0, the second line is 1, and so on). Returns -1 if the
|
|
885
|
-
* point is not over any line.
|
|
886
|
-
*/
|
|
887
|
-
getLineIndexAtPoint(x: number, y: number): number;
|
|
888
|
-
/**
|
|
889
|
-
* Returns the zero-based index value of the line containing the character
|
|
890
|
-
* specified by the <code>charIndex</code> parameter.
|
|
891
|
-
*
|
|
892
|
-
* @param charIndex The zero-based index value of the character(for example,
|
|
893
|
-
* the first character is 0, the second character is 1, and
|
|
894
|
-
* so on).
|
|
895
|
-
* @return The zero-based index value of the line.
|
|
896
|
-
* @throws RangeError The character index specified is out of range.
|
|
897
|
-
*/
|
|
898
|
-
getLineIndexOfChar(charIndex: number): number;
|
|
899
|
-
/**
|
|
900
|
-
* Returns the number of characters in a specific text line.
|
|
901
|
-
*
|
|
902
|
-
* @param lineIndex The line number for which you want the length.
|
|
903
|
-
* @return The number of characters in the line.
|
|
904
|
-
* @throws RangeError The line number specified is out of range.
|
|
905
|
-
*/
|
|
906
|
-
getLineLength(lineIndex: number): number;
|
|
907
|
-
/**
|
|
908
|
-
* Returns metrics information about a given text line.
|
|
909
|
-
*
|
|
910
|
-
* @param lineIndex The line number for which you want metrics information.
|
|
911
|
-
* @return A TextLineMetrics object.
|
|
912
|
-
* @throws RangeError The line number specified is out of range.
|
|
913
|
-
*/
|
|
914
|
-
getLineMetrics(lineIndex: number): TextLineMetrics;
|
|
915
|
-
/**
|
|
916
|
-
* Returns the character index of the first character in the line that the
|
|
917
|
-
* <code>lineIndex</code> parameter specifies.
|
|
918
|
-
*
|
|
919
|
-
* @param lineIndex The zero-based index value of the line(for example, the
|
|
920
|
-
* first line is 0, the second line is 1, and so on).
|
|
921
|
-
* @return The zero-based index value of the first character in the line.
|
|
922
|
-
* @throws RangeError The line number specified is out of range.
|
|
923
|
-
*/
|
|
924
|
-
getLineOffset(lineIndex: number): number;
|
|
925
|
-
/**
|
|
926
|
-
* Returns the text of the line specified by the <code>lineIndex</code>
|
|
927
|
-
* parameter.
|
|
928
|
-
*
|
|
929
|
-
* @param lineIndex The zero-based index value of the line(for example, the
|
|
930
|
-
* first line is 0, the second line is 1, and so on).
|
|
931
|
-
* @return The text string contained in the specified line.
|
|
932
|
-
* @throws RangeError The line number specified is out of range.
|
|
933
|
-
*/
|
|
934
|
-
getLineText(lineIndex: number): string;
|
|
935
|
-
/**
|
|
936
|
-
* Given a character index, returns the length of the paragraph containing
|
|
937
|
-
* the given character. The length is relative to the first character in the
|
|
938
|
-
* paragraph(as returned by <code>getFirstCharInParagraph()</code>), not to
|
|
939
|
-
* the character index passed in.
|
|
940
|
-
*
|
|
941
|
-
* @param charIndex The zero-based index value of the character(for example,
|
|
942
|
-
* the first character is 0, the second character is 1, and
|
|
943
|
-
* so on).
|
|
944
|
-
* @return Returns the number of characters in the paragraph.
|
|
945
|
-
* @throws RangeError The character index specified is out of range.
|
|
946
|
-
*/
|
|
947
|
-
getParagraphLength(charIndex: number): number;
|
|
948
|
-
/**
|
|
949
|
-
* Returns a TextFormat object that contains formatting information for the
|
|
950
|
-
* range of text that the <code>beginIndex</code> and <code>endIndex</code>
|
|
951
|
-
* parameters specify. Only properties that are common to the entire text
|
|
952
|
-
* specified are set in the resulting TextFormat object. Any property that is
|
|
953
|
-
* <i>mixed</i>, meaning that it has different values at different points in
|
|
954
|
-
* the text, has a value of <code>null</code>.
|
|
955
|
-
*
|
|
956
|
-
* <p>If you do not specify values for these parameters, this method is
|
|
957
|
-
* applied to all the text in the text field. </p>
|
|
958
|
-
*
|
|
959
|
-
* <p>The following table describes three possible usages:</p>
|
|
960
|
-
*
|
|
961
|
-
* @return The TextFormat object that represents the formatting properties
|
|
962
|
-
* for the specified text.
|
|
963
|
-
* @throws RangeError The <code>beginIndex</code> or <code>endIndex</code>
|
|
964
|
-
* specified is out of range.
|
|
965
|
-
*/
|
|
966
|
-
getTextFormat(beginIndex?: number, endIndex?: number): TextFormat;
|
|
967
|
-
/**
|
|
968
|
-
* Replaces the current selection with the contents of the <code>value</code>
|
|
969
|
-
* parameter. The text is inserted at the position of the current selection,
|
|
970
|
-
* using the current default character format and default paragraph format.
|
|
971
|
-
* The text is not treated as HTML.
|
|
972
|
-
*
|
|
973
|
-
* <p>You can use the <code>replaceSelectedText()</code> method to insert and
|
|
974
|
-
* delete text without disrupting the character and paragraph formatting of
|
|
975
|
-
* the rest of the text.</p>
|
|
976
|
-
*
|
|
977
|
-
* <p><b>Note:</b> This method does not work if a style sheet is applied to
|
|
978
|
-
* the text field.</p>
|
|
979
|
-
*
|
|
980
|
-
* @param value The string to replace the currently selected text.
|
|
981
|
-
* @throws Error This method cannot be used on a text field with a style
|
|
982
|
-
* sheet.
|
|
983
|
-
*/
|
|
984
|
-
replaceSelectedText(value: string): void;
|
|
985
|
-
/**
|
|
986
|
-
* Replaces the range of characters that the <code>beginIndex</code> and
|
|
987
|
-
* <code>endIndex</code> parameters specify with the contents of the
|
|
988
|
-
* <code>newText</code> parameter. As designed, the text from
|
|
989
|
-
* <code>beginIndex</code> to <code>endIndex-1</code> is replaced.
|
|
990
|
-
*
|
|
991
|
-
* <p><b>Note:</b> This method does not work if a style sheet is applied to
|
|
992
|
-
* the text field.</p>
|
|
993
|
-
*
|
|
994
|
-
* @param beginIndex The zero-based index value for the start position of the
|
|
995
|
-
* replacement range.
|
|
996
|
-
* @param endIndex The zero-based index position of the first character
|
|
997
|
-
* after the desired text span.
|
|
998
|
-
* @param newText The text to use to replace the specified range of
|
|
999
|
-
* characters.
|
|
1000
|
-
* @throws Error This method cannot be used on a text field with a style
|
|
1001
|
-
* sheet.
|
|
1002
|
-
*/
|
|
1003
|
-
replaceText(beginIndex: number, endIndex: number, newText: string): void;
|
|
1004
|
-
/**
|
|
1005
|
-
* Sets as selected the text designated by the index values of the first and
|
|
1006
|
-
* last characters, which are specified with the <code>beginIndex</code> and
|
|
1007
|
-
* <code>endIndex</code> parameters. If the two parameter values are the
|
|
1008
|
-
* same, this method sets the insertion point, as if you set the
|
|
1009
|
-
* <code>caretIndex</code> property.
|
|
1010
|
-
*
|
|
1011
|
-
* @param beginIndex The zero-based index value of the first character in the
|
|
1012
|
-
* selection(for example, the first character is 0, the
|
|
1013
|
-
* second character is 1, and so on).
|
|
1014
|
-
* @param endIndex The zero-based index value of the last character in the
|
|
1015
|
-
* selection.
|
|
1016
|
-
*/
|
|
1017
|
-
setSelection(beginIndex: number, endIndex: number): void;
|
|
1018
|
-
/**
|
|
1019
|
-
* Applies the text formatting that the <code>format</code> parameter
|
|
1020
|
-
* specifies to the specified text in a text field. The value of
|
|
1021
|
-
* <code>format</code> must be a TextFormat object that specifies the desired
|
|
1022
|
-
* text formatting changes. Only the non-null properties of
|
|
1023
|
-
* <code>format</code> are applied to the text field. Any property of
|
|
1024
|
-
* <code>format</code> that is set to <code>null</code> is not applied. By
|
|
1025
|
-
* default, all of the properties of a newly created TextFormat object are
|
|
1026
|
-
* set to <code>null</code>.
|
|
1027
|
-
*
|
|
1028
|
-
* <p><b>Note:</b> This method does not work if a style sheet is applied to
|
|
1029
|
-
* the text field.</p>
|
|
1030
|
-
*
|
|
1031
|
-
* <p>The <code>setTextFormat()</code> method changes the text formatting
|
|
1032
|
-
* applied to a range of characters or to the entire body of text in a text
|
|
1033
|
-
* field. To apply the properties of format to all text in the text field, do
|
|
1034
|
-
* not specify values for <code>beginIndex</code> and <code>endIndex</code>.
|
|
1035
|
-
* To apply the properties of the format to a range of text, specify values
|
|
1036
|
-
* for the <code>beginIndex</code> and the <code>endIndex</code> parameters.
|
|
1037
|
-
* You can use the <code>length</code> property to determine the index
|
|
1038
|
-
* values.</p>
|
|
1039
|
-
*
|
|
1040
|
-
* <p>The two types of formatting information in a TextFormat object are
|
|
1041
|
-
* character level formatting and paragraph level formatting. Each character
|
|
1042
|
-
* in a text field can have its own character formatting settings, such as
|
|
1043
|
-
* font name, font size, bold, and italic.</p>
|
|
1044
|
-
*
|
|
1045
|
-
* <p>For paragraphs, the first character of the paragraph is examined for
|
|
1046
|
-
* the paragraph formatting settings for the entire paragraph. Examples of
|
|
1047
|
-
* paragraph formatting settings are left margin, right margin, and
|
|
1048
|
-
* indentation.</p>
|
|
1049
|
-
*
|
|
1050
|
-
* <p>Any text inserted manually by the user, or replaced by the
|
|
1051
|
-
* <code>replaceSelectedText()</code> method, receives the default text field
|
|
1052
|
-
* formatting for new text, and not the formatting specified for the text
|
|
1053
|
-
* insertion point. To set the default formatting for new text, use
|
|
1054
|
-
* <code>defaultTextFormat</code>.</p>
|
|
1055
|
-
*
|
|
1056
|
-
* @param format A TextFormat object that contains character and paragraph
|
|
1057
|
-
* formatting information.
|
|
1058
|
-
* @throws Error This method cannot be used on a text field with a style
|
|
1059
|
-
* sheet.
|
|
1060
|
-
* @throws RangeError The <code>beginIndex</code> or <code>endIndex</code>
|
|
1061
|
-
* specified is out of range.
|
|
1062
|
-
*/
|
|
1063
|
-
setTextFormat(format: TextFormat, beginIndex?: number, endIndex?: number): void;
|
|
1064
|
-
/**
|
|
1065
|
-
* Returns true if an embedded font is available with the specified
|
|
1066
|
-
* <code>fontName</code> and <code>fontStyle</code> where
|
|
1067
|
-
* <code>Font.fontType</code> is <code>flash.text.FontType.EMBEDDED</code>.
|
|
1068
|
-
* Starting with Flash Player 10, two kinds of embedded fonts can appear in a
|
|
1069
|
-
* SWF file. Normal embedded fonts are only used with TextField objects. CFF
|
|
1070
|
-
* embedded fonts are only used with the flash.text.engine classes. The two
|
|
1071
|
-
* types are distinguished by the <code>fontType</code> property of the
|
|
1072
|
-
* <code>Font</code> class, as returned by the <code>enumerateFonts()</code>
|
|
1073
|
-
* function.
|
|
1074
|
-
*
|
|
1075
|
-
* <p>TextField cannot use a font of type <code>EMBEDDED_CFF</code>. If
|
|
1076
|
-
* <code>embedFonts</code> is set to <code>true</code> and the only font
|
|
1077
|
-
* available at run time with the specified name and style is of type
|
|
1078
|
-
* <code>EMBEDDED_CFF</code>, Flash Player fails to render the text, as if no
|
|
1079
|
-
* embedded font were available with the specified name and style.</p>
|
|
1080
|
-
*
|
|
1081
|
-
* <p>If both <code>EMBEDDED</code> and <code>EMBEDDED_CFF</code> fonts are
|
|
1082
|
-
* available with the same name and style, the <code>EMBEDDED</code> font is
|
|
1083
|
-
* selected and text renders with the <code>EMBEDDED</code> font.</p>
|
|
1084
|
-
*
|
|
1085
|
-
* @param fontName The name of the embedded font to check.
|
|
1086
|
-
* @param fontStyle Specifies the font style to check. Use
|
|
1087
|
-
* <code>flash.text.FontStyle</code>
|
|
1088
|
-
* @return <code>true</code> if a compatible embedded font is available,
|
|
1089
|
-
* otherwise <code>false</code>.
|
|
1090
|
-
* @throws ArgumentError The <code>fontStyle</code> specified is not a member
|
|
1091
|
-
* of <code>flash.text.FontStyle</code>.
|
|
1092
|
-
*/
|
|
1093
|
-
static isFontCompatible(fontName: string, fontStyle: string): boolean;
|
|
1094
|
-
onKeyDelegate: (e: any) => void;
|
|
1095
|
-
onKey(e: any): void;
|
|
1096
|
-
addCharCode(charCode: number): void;
|
|
1097
|
-
private deleteSelectedText;
|
|
1098
|
-
addChar(char: string, isShift?: boolean, isCTRL?: boolean, isAlt?: boolean): void;
|
|
1099
|
-
private _insertNewText;
|
|
1100
|
-
clone(): TextField;
|
|
1101
|
-
copyTo(newInstance: TextField): void;
|
|
1102
|
-
private _clearTextShapes;
|
|
1103
|
-
}
|
|
1104
|
-
export {};
|
|
1
|
+
import { Rectangle, Vector3D } from '@awayjs/core';
|
|
2
|
+
import { IEntity } from '@awayjs/view';
|
|
3
|
+
import { Shape } from '@awayjs/graphics';
|
|
4
|
+
import { AntiAliasType } from '../text/AntiAliasType';
|
|
5
|
+
import { GridFitType } from '../text/GridFitType';
|
|
6
|
+
import { TextFieldType } from '../text/TextFieldType';
|
|
7
|
+
import { TextFormat } from '../text/TextFormat';
|
|
8
|
+
import { TextInteractionMode } from '../text/TextInteractionMode';
|
|
9
|
+
import { TextLineMetrics } from '../text/TextLineMetrics';
|
|
10
|
+
import { DisplayObject } from './DisplayObject';
|
|
11
|
+
import { DisplayObjectContainer } from './DisplayObjectContainer';
|
|
12
|
+
import { TextShape } from '../text/TextShape';
|
|
13
|
+
import { MouseEvent } from '../events/MouseEvent';
|
|
14
|
+
interface IWord {
|
|
15
|
+
start: number;
|
|
16
|
+
x: number;
|
|
17
|
+
y: number;
|
|
18
|
+
width: number;
|
|
19
|
+
len: number;
|
|
20
|
+
}
|
|
21
|
+
declare class WordStore {
|
|
22
|
+
store: Array<IWord>;
|
|
23
|
+
index: number;
|
|
24
|
+
constructor(size?: number);
|
|
25
|
+
put(start: number, x: number, y: number, width: number, len: number): IWord;
|
|
26
|
+
get last(): IWord;
|
|
27
|
+
get length(): number;
|
|
28
|
+
set length(v: number);
|
|
29
|
+
get(index: number): IWord;
|
|
30
|
+
free(): void;
|
|
31
|
+
dispose(): void;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* The TextField class is used to create display objects for text display and
|
|
35
|
+
* input. <ph outputclass="flexonly">You can use the TextField class to
|
|
36
|
+
* perform low-level text rendering. However, in Flex, you typically use the
|
|
37
|
+
* Label, Text, TextArea, and TextInput controls to process text. <ph
|
|
38
|
+
* outputclass="flashonly">You can give a text field an instance name in the
|
|
39
|
+
* Property inspector and use the methods and properties of the TextField
|
|
40
|
+
* class to manipulate it with ActionScript. TextField instance names are
|
|
41
|
+
* displayed in the Movie Explorer and in the Insert Target Path dialog box in
|
|
42
|
+
* the Actions panel.
|
|
43
|
+
*
|
|
44
|
+
* <p>To create a text field dynamically, use the <code>TextField()</code>
|
|
45
|
+
* constructor.</p>
|
|
46
|
+
*
|
|
47
|
+
* <p>The methods of the TextField class let you set, select, and manipulate
|
|
48
|
+
* text in a dynamic or input text field that you create during authoring or
|
|
49
|
+
* at runtime. </p>
|
|
50
|
+
*
|
|
51
|
+
* <p>ActionScript provides several ways to format your text at runtime. The
|
|
52
|
+
* TextFormat class lets you set character and paragraph formatting for
|
|
53
|
+
* TextField objects. You can apply Cascading Style Sheets(CSS) styles to
|
|
54
|
+
* text fields by using the <code>TextField.styleSheet</code> property and the
|
|
55
|
+
* StyleSheet class. You can use CSS to style built-in HTML tags, define new
|
|
56
|
+
* formatting tags, or apply styles. You can assign HTML formatted text, which
|
|
57
|
+
* optionally uses CSS styles, directly to a text field. HTML text that you
|
|
58
|
+
* assign to a text field can contain embedded media(movie clips, SWF files,
|
|
59
|
+
* GIF files, PNG files, and JPEG files). The text wraps around the embedded
|
|
60
|
+
* media in the same way that a web browser wraps text around media embedded
|
|
61
|
+
* in an HTML document. </p>
|
|
62
|
+
*
|
|
63
|
+
* <p>Flash Player supports a subset of HTML tags that you can use to format
|
|
64
|
+
* text. See the list of supported HTML tags in the description of the
|
|
65
|
+
* <code>htmlText</code> property.</p>
|
|
66
|
+
*
|
|
67
|
+
* @event change Dispatched after a control value is
|
|
68
|
+
* modified, unlike the
|
|
69
|
+
* <code>textInput</code> event, which is
|
|
70
|
+
* dispatched before the value is modified.
|
|
71
|
+
* Unlike the W3C DOM Event Model version of
|
|
72
|
+
* the <code>change</code> event, which
|
|
73
|
+
* dispatches the event only after the
|
|
74
|
+
* control loses focus, the ActionScript 3.0
|
|
75
|
+
* version of the <code>change</code> event
|
|
76
|
+
* is dispatched any time the control
|
|
77
|
+
* changes. For example, if a user types text
|
|
78
|
+
* into a text field, a <code>change</code>
|
|
79
|
+
* event is dispatched after every keystroke.
|
|
80
|
+
* @event link Dispatched when a user clicks a hyperlink
|
|
81
|
+
* in an HTML-enabled text field, where the
|
|
82
|
+
* URL begins with "event:". The remainder of
|
|
83
|
+
* the URL after "event:" is placed in the
|
|
84
|
+
* text property of the LINK event.
|
|
85
|
+
*
|
|
86
|
+
* <p><b>Note:</b> The default behavior,
|
|
87
|
+
* adding the text to the text field, occurs
|
|
88
|
+
* only when Flash Player generates the
|
|
89
|
+
* event, which in this case happens when a
|
|
90
|
+
* user attempts to input text. You cannot
|
|
91
|
+
* put text into a text field by sending it
|
|
92
|
+
* <code>textInput</code> events.</p>
|
|
93
|
+
* @event scroll Dispatched by a TextField object
|
|
94
|
+
* <i>after</i> the user scrolls.
|
|
95
|
+
* @event textInput Flash Player dispatches the
|
|
96
|
+
* <code>textInput</code> event when a user
|
|
97
|
+
* enters one or more characters of text.
|
|
98
|
+
* Various text input methods can generate
|
|
99
|
+
* this event, including standard keyboards,
|
|
100
|
+
* input method editors(IMEs), voice or
|
|
101
|
+
* speech recognition systems, and even the
|
|
102
|
+
* act of pasting plain text with no
|
|
103
|
+
* formatting or style information.
|
|
104
|
+
* @event textInteractionModeChange Flash Player dispatches the
|
|
105
|
+
* <code>textInteractionModeChange</code>
|
|
106
|
+
* event when a user changes the interaction
|
|
107
|
+
* mode of a text field. for example on
|
|
108
|
+
* Android, one can toggle from NORMAL mode
|
|
109
|
+
* to SELECTION mode using context menu
|
|
110
|
+
* options
|
|
111
|
+
*/
|
|
112
|
+
export declare class TextField extends DisplayObjectContainer {
|
|
113
|
+
private _onClipboardPasteDelegate;
|
|
114
|
+
private static _textFields;
|
|
115
|
+
static assetType: string;
|
|
116
|
+
static getNewTextField(): TextField;
|
|
117
|
+
static clearPool(): void;
|
|
118
|
+
private static _onChangedEvent;
|
|
119
|
+
textOffsetX: number;
|
|
120
|
+
textOffsetY: number;
|
|
121
|
+
private _width;
|
|
122
|
+
private _height;
|
|
123
|
+
private _graphics;
|
|
124
|
+
private _bottomScrollV;
|
|
125
|
+
private _caretIndex;
|
|
126
|
+
private _maxScrollH;
|
|
127
|
+
private _maxScrollV;
|
|
128
|
+
private _numLines;
|
|
129
|
+
private _selectionBeginIndex;
|
|
130
|
+
private _selectionEndIndex;
|
|
131
|
+
private _biggestLine;
|
|
132
|
+
/**
|
|
133
|
+
* Renderable text, used for computing a glyphs
|
|
134
|
+
* @private
|
|
135
|
+
*/
|
|
136
|
+
private _iText;
|
|
137
|
+
/**
|
|
138
|
+
* Place where is diff is begun to end
|
|
139
|
+
* @private
|
|
140
|
+
*/
|
|
141
|
+
private _iTextDiffStart;
|
|
142
|
+
/**
|
|
143
|
+
* Original text passed to field
|
|
144
|
+
* @private
|
|
145
|
+
*/
|
|
146
|
+
private _text;
|
|
147
|
+
private _iTextWoLineBreaks;
|
|
148
|
+
private _textInteractionMode;
|
|
149
|
+
private _textWidth;
|
|
150
|
+
private _textHeight;
|
|
151
|
+
private _firstCharInParagraph;
|
|
152
|
+
private _imageReference;
|
|
153
|
+
private _paragraphLength;
|
|
154
|
+
_newTextFormat: TextFormat;
|
|
155
|
+
_textFormats: TextFormat[];
|
|
156
|
+
_textFormatsIdx: number[];
|
|
157
|
+
textShapes: StringMap<TextShape>;
|
|
158
|
+
private inMaskMode;
|
|
159
|
+
private maskChild;
|
|
160
|
+
private textChild;
|
|
161
|
+
private targetGraphics;
|
|
162
|
+
private cursorShape;
|
|
163
|
+
private bgShapeSelect;
|
|
164
|
+
private cursorIntervalID;
|
|
165
|
+
cursorBlinking: boolean;
|
|
166
|
+
showSelection: boolean;
|
|
167
|
+
private _textDirty;
|
|
168
|
+
private _positionsDirty;
|
|
169
|
+
private _glyphsDirty;
|
|
170
|
+
private _shapesDirty;
|
|
171
|
+
private _textShapesDirty;
|
|
172
|
+
private _newFormatDirty;
|
|
173
|
+
chars_codes: number[];
|
|
174
|
+
chars_width: number[];
|
|
175
|
+
tf_per_char: TextFormat[];
|
|
176
|
+
words: WordStore;
|
|
177
|
+
_lastWordsCount: number;
|
|
178
|
+
private _textRuns_formats;
|
|
179
|
+
private _textRuns_words;
|
|
180
|
+
private _paragraph_textRuns_indices;
|
|
181
|
+
private _maxWidthLine;
|
|
182
|
+
private _labelData;
|
|
183
|
+
html: boolean;
|
|
184
|
+
private lines_wordStartIndices;
|
|
185
|
+
private lines_wordEndIndices;
|
|
186
|
+
private lines_start_y;
|
|
187
|
+
private lines_start_x;
|
|
188
|
+
private lines_charIdx_start;
|
|
189
|
+
private lines_charIdx_end;
|
|
190
|
+
private lines_width;
|
|
191
|
+
private lines_height;
|
|
192
|
+
private lines_numSpacesPerline;
|
|
193
|
+
private char_positions_x;
|
|
194
|
+
private char_positions_y;
|
|
195
|
+
sourceTextField: TextField;
|
|
196
|
+
private _maskWidth;
|
|
197
|
+
private _maskHeight;
|
|
198
|
+
private _maskTextOffsetX;
|
|
199
|
+
private _maskTextOffsetY;
|
|
200
|
+
bgShape: Shape;
|
|
201
|
+
isStatic: boolean;
|
|
202
|
+
updateMaskMode(): void;
|
|
203
|
+
getMouseCursor(): string;
|
|
204
|
+
get isInFocus(): boolean;
|
|
205
|
+
set isInFocus(value: boolean);
|
|
206
|
+
setFocus(value: boolean, fromMouseDown?: boolean, sendSoftKeyEvent?: boolean): void;
|
|
207
|
+
private enableInput;
|
|
208
|
+
findCharIdxForMouse(event: MouseEvent): number;
|
|
209
|
+
private startSelectionByMouseDelegate;
|
|
210
|
+
private startSelectionByMouse;
|
|
211
|
+
private stopSelectionByMouseDelegate;
|
|
212
|
+
private stopSelectionByMouse;
|
|
213
|
+
private updateSelectionByMouseDelegate;
|
|
214
|
+
private updateSelectionByMouse;
|
|
215
|
+
private drawSelectionGraphics;
|
|
216
|
+
private scrollToCursor;
|
|
217
|
+
private drawCursor;
|
|
218
|
+
private drawSelectedBG;
|
|
219
|
+
drawBG(): void;
|
|
220
|
+
drawBorder(): void;
|
|
221
|
+
getTextShapeForIdentifierAndFormat(id: string, format: TextFormat): TextShape;
|
|
222
|
+
/**
|
|
223
|
+
* When set to <code>true</code> and the text field is not in focus, Flash
|
|
224
|
+
* Player highlights the selection in the text field in gray. When set to
|
|
225
|
+
* <code>false</code> and the text field is not in focus, Flash Player does
|
|
226
|
+
* not highlight the selection in the text field.
|
|
227
|
+
*
|
|
228
|
+
* @default false
|
|
229
|
+
*/
|
|
230
|
+
alwaysShowSelection: boolean;
|
|
231
|
+
/**
|
|
232
|
+
* The type of anti-aliasing used for this text field. Use
|
|
233
|
+
* <code>flash.text.AntiAliasType</code> constants for this property. You can
|
|
234
|
+
* control this setting only if the font is embedded(with the
|
|
235
|
+
* <code>embedFonts</code> property set to <code>true</code>). The default
|
|
236
|
+
* setting is <code>flash.text.AntiAliasType.NORMAL</code>.
|
|
237
|
+
*
|
|
238
|
+
* <p>To set values for this property, use the following string values:</p>
|
|
239
|
+
*/
|
|
240
|
+
antiAliasType: AntiAliasType;
|
|
241
|
+
/**
|
|
242
|
+
* Controls automatic sizing and alignment of text fields. Acceptable values
|
|
243
|
+
* for the <code>TextFieldAutoSize</code> constants:
|
|
244
|
+
* <code>TextFieldAutoSize.NONE</code>(the default),
|
|
245
|
+
* <code>TextFieldAutoSize.LEFT</code>, <code>TextFieldAutoSize.RIGHT</code>,
|
|
246
|
+
* and <code>TextFieldAutoSize.CENTER</code>.
|
|
247
|
+
*
|
|
248
|
+
* <p>If <code>autoSize</code> is set to <code>TextFieldAutoSize.NONE</code>
|
|
249
|
+
* (the default) no resizing occurs.</p>
|
|
250
|
+
*
|
|
251
|
+
* <p>If <code>autoSize</code> is set to <code>TextFieldAutoSize.LEFT</code>,
|
|
252
|
+
* the text is treated as left-justified text, meaning that the left margin
|
|
253
|
+
* of the text field remains fixed and any resizing of a single line of the
|
|
254
|
+
* text field is on the right margin. If the text includes a line break(for
|
|
255
|
+
* example, <code>"\n"</code> or <code>"\r"</code>), the bottom is also
|
|
256
|
+
* resized to fit the next line of text. If <code>wordWrap</code> is also set
|
|
257
|
+
* to <code>true</code>, only the bottom of the text field is resized and the
|
|
258
|
+
* right side remains fixed.</p>
|
|
259
|
+
*
|
|
260
|
+
* <p>If <code>autoSize</code> is set to
|
|
261
|
+
* <code>TextFieldAutoSize.RIGHT</code>, the text is treated as
|
|
262
|
+
* right-justified text, meaning that the right margin of the text field
|
|
263
|
+
* remains fixed and any resizing of a single line of the text field is on
|
|
264
|
+
* the left margin. If the text includes a line break(for example,
|
|
265
|
+
* <code>"\n" or "\r")</code>, the bottom is also resized to fit the next
|
|
266
|
+
* line of text. If <code>wordWrap</code> is also set to <code>true</code>,
|
|
267
|
+
* only the bottom of the text field is resized and the left side remains
|
|
268
|
+
* fixed.</p>
|
|
269
|
+
*
|
|
270
|
+
* <p>If <code>autoSize</code> is set to
|
|
271
|
+
* <code>TextFieldAutoSize.CENTER</code>, the text is treated as
|
|
272
|
+
* center-justified text, meaning that any resizing of a single line of the
|
|
273
|
+
* text field is equally distributed to both the right and left margins. If
|
|
274
|
+
* the text includes a line break(for example, <code>"\n"</code> or
|
|
275
|
+
* <code>"\r"</code>), the bottom is also resized to fit the next line of
|
|
276
|
+
* text. If <code>wordWrap</code> is also set to <code>true</code>, only the
|
|
277
|
+
* bottom of the text field is resized and the left and right sides remain
|
|
278
|
+
* fixed.</p>
|
|
279
|
+
*
|
|
280
|
+
* @throws ArgumentError The <code>autoSize</code> specified is not a member
|
|
281
|
+
* of flash.text.TextFieldAutoSize.
|
|
282
|
+
*/
|
|
283
|
+
private _autoSize;
|
|
284
|
+
get autoSize(): string;
|
|
285
|
+
set autoSize(value: string);
|
|
286
|
+
private _internalScale;
|
|
287
|
+
get internalScale(): Vector3D;
|
|
288
|
+
/**
|
|
289
|
+
*
|
|
290
|
+
* @returns {string}
|
|
291
|
+
*/
|
|
292
|
+
get assetType(): string;
|
|
293
|
+
/**
|
|
294
|
+
* Specifies whether the text field has a background fill. If
|
|
295
|
+
* <code>true</code>, the text field has a background fill. If
|
|
296
|
+
* <code>false</code>, the text field has no background fill. Use the
|
|
297
|
+
* <code>backgroundColor</code> property to set the background color of a
|
|
298
|
+
* text field.
|
|
299
|
+
*
|
|
300
|
+
* @default false
|
|
301
|
+
*/
|
|
302
|
+
private _background;
|
|
303
|
+
get background(): boolean;
|
|
304
|
+
set background(value: boolean);
|
|
305
|
+
/**
|
|
306
|
+
* The color of the text field background. The default value is
|
|
307
|
+
* <code>0xFFFFFF</code>(white). This property can be retrieved or set, even
|
|
308
|
+
* if there currently is no background, but the color is visible only if the
|
|
309
|
+
* text field has the <code>background</code> property set to
|
|
310
|
+
* <code>true</code>.
|
|
311
|
+
*/
|
|
312
|
+
private _backgroundColor;
|
|
313
|
+
get backgroundColor(): number;
|
|
314
|
+
set backgroundColor(value: number);
|
|
315
|
+
/**
|
|
316
|
+
* Specifies whether the text field has a border. If <code>true</code>, the
|
|
317
|
+
* text field has a border. If <code>false</code>, the text field has no
|
|
318
|
+
* border. Use the <code>borderColor</code> property to set the border color.
|
|
319
|
+
*
|
|
320
|
+
* @default false
|
|
321
|
+
*/
|
|
322
|
+
private _border;
|
|
323
|
+
get border(): boolean;
|
|
324
|
+
set border(value: boolean);
|
|
325
|
+
/**
|
|
326
|
+
* The color of the text field border. The default value is
|
|
327
|
+
* <code>0x000000</code>(black). This property can be retrieved or set, even
|
|
328
|
+
* if there currently is no border, but the color is visible only if the text
|
|
329
|
+
* field has the <code>border</code> property set to <code>true</code>.
|
|
330
|
+
*/
|
|
331
|
+
private _borderColor;
|
|
332
|
+
get borderColor(): number;
|
|
333
|
+
set borderColor(value: number);
|
|
334
|
+
/**
|
|
335
|
+
* An integer(1-based index) that indicates the bottommost line that is
|
|
336
|
+
* currently visible in the specified text field. Think of the text field as
|
|
337
|
+
* a window onto a block of text. The <code>scrollV</code> property is the
|
|
338
|
+
* 1-based index of the topmost visible line in the window.
|
|
339
|
+
*
|
|
340
|
+
* <p>All the text between the lines indicated by <code>scrollV</code> and
|
|
341
|
+
* <code>bottomScrollV</code> is currently visible in the text field.</p>
|
|
342
|
+
*/
|
|
343
|
+
get bottomScrollV(): number;
|
|
344
|
+
set bottomScrollV(value: number);
|
|
345
|
+
/**
|
|
346
|
+
* The index of the insertion point(caret) position. If no insertion point
|
|
347
|
+
* is displayed, the value is the position the insertion point would be if
|
|
348
|
+
* you restored focus to the field(typically where the insertion point last
|
|
349
|
+
* was, or 0 if the field has not had focus).
|
|
350
|
+
*
|
|
351
|
+
* <p>Selection span indexes are zero-based(for example, the first position
|
|
352
|
+
* is 0, the second position is 1, and so on).</p>
|
|
353
|
+
*/
|
|
354
|
+
get caretIndex(): number;
|
|
355
|
+
/**
|
|
356
|
+
* A Boolean value that specifies whether extra white space(spaces, line
|
|
357
|
+
* breaks, and so on) in a text field with HTML text is removed. The default
|
|
358
|
+
* value is <code>false</code>. The <code>condenseWhite</code> property only
|
|
359
|
+
* affects text set with the <code>htmlText</code> property, not the
|
|
360
|
+
* <code>text</code> property. If you set text with the <code>text</code>
|
|
361
|
+
* property, <code>condenseWhite</code> is ignored.
|
|
362
|
+
*
|
|
363
|
+
* <p>If <code>condenseWhite</code> is set to <code>true</code>, use standard
|
|
364
|
+
* HTML commands such as <code><BR></code> and <code><P></code> to place line
|
|
365
|
+
* breaks in the text field.</p>
|
|
366
|
+
*
|
|
367
|
+
* <p>Set the <code>condenseWhite</code> property before setting the
|
|
368
|
+
* <code>htmlText</code> property.</p>
|
|
369
|
+
*/
|
|
370
|
+
condenseWhite: boolean;
|
|
371
|
+
/**
|
|
372
|
+
* Specifies the format applied to newly inserted text, such as text entered
|
|
373
|
+
* by a user or text inserted with the <code>replaceSelectedText()</code>
|
|
374
|
+
* method.
|
|
375
|
+
*
|
|
376
|
+
* <p><b>Note:</b> When selecting characters to be replaced with
|
|
377
|
+
* <code>setSelection()</code> and <code>replaceSelectedText()</code>, the
|
|
378
|
+
* <code>defaultTextFormat</code> will be applied only if the text has been
|
|
379
|
+
* selected up to and including the last character. Here is an example:</p>
|
|
380
|
+
* <pre xml:space="preserve"> public my_txt:TextField new TextField();
|
|
381
|
+
* my_txt.text = "Flash Macintosh version"; public my_fmt:TextFormat = new
|
|
382
|
+
* TextFormat(); my_fmt.color = 0xFF0000; my_txt.defaultTextFormat = my_fmt;
|
|
383
|
+
* my_txt.setSelection(6,15); // partial text selected - defaultTextFormat
|
|
384
|
+
* not applied my_txt.setSelection(6,23); // text selected to end -
|
|
385
|
+
* defaultTextFormat applied my_txt.replaceSelectedText("Windows version");
|
|
386
|
+
* </pre>
|
|
387
|
+
*
|
|
388
|
+
* <p>When you access the <code>defaultTextFormat</code> property, the
|
|
389
|
+
* returned TextFormat object has all of its properties defined. No property
|
|
390
|
+
* is <code>null</code>.</p>
|
|
391
|
+
*
|
|
392
|
+
* <p><b>Note:</b> You can't set this property if a style sheet is applied to
|
|
393
|
+
* the text field.</p>
|
|
394
|
+
*
|
|
395
|
+
* @throws Error This method cannot be used on a text field with a style
|
|
396
|
+
* sheet.
|
|
397
|
+
*/
|
|
398
|
+
/**
|
|
399
|
+
* Specifies whether the text field is a password text field. If the value of
|
|
400
|
+
* this property is <code>true</code>, the text field is treated as a
|
|
401
|
+
* password text field and hides the input characters using asterisks instead
|
|
402
|
+
* of the actual characters. If <code>false</code>, the text field is not
|
|
403
|
+
* treated as a password text field. When password mode is enabled, the Cut
|
|
404
|
+
* and Copy commands and their corresponding keyboard shortcuts will not
|
|
405
|
+
* function. This security mechanism prevents an unscrupulous user from using
|
|
406
|
+
* the shortcuts to discover a password on an unattended computer.
|
|
407
|
+
*
|
|
408
|
+
* @default false
|
|
409
|
+
*/
|
|
410
|
+
displayAsPassword: boolean;
|
|
411
|
+
/**
|
|
412
|
+
* Specifies whether to render by using embedded font outlines. If
|
|
413
|
+
* <code>false</code>, Flash Player renders the text field by using device
|
|
414
|
+
* fonts.
|
|
415
|
+
*
|
|
416
|
+
* <p>If you set the <code>embedFonts</code> property to <code>true</code>
|
|
417
|
+
* for a text field, you must specify a font for that text by using the
|
|
418
|
+
* <code>font</code> property of a TextFormat object applied to the text
|
|
419
|
+
* field. If the specified font is not embedded in the SWF file, the text is
|
|
420
|
+
* not displayed.</p>
|
|
421
|
+
*
|
|
422
|
+
* @default false
|
|
423
|
+
*/
|
|
424
|
+
embedFonts: boolean;
|
|
425
|
+
/**
|
|
426
|
+
* The type of grid fitting used for this text field. This property applies
|
|
427
|
+
* only if the <code>flash.text.AntiAliasType</code> property of the text
|
|
428
|
+
* field is set to <code>flash.text.AntiAliasType.ADVANCED</code>.
|
|
429
|
+
*
|
|
430
|
+
* <p>The type of grid fitting used determines whether Flash Player forces
|
|
431
|
+
* strong horizontal and vertical lines to fit to a pixel or subpixel grid,
|
|
432
|
+
* or not at all.</p>
|
|
433
|
+
*
|
|
434
|
+
* <p>For the <code>flash.text.GridFitType</code> property, you can use the
|
|
435
|
+
* following string values:</p>
|
|
436
|
+
*
|
|
437
|
+
* @default pixel
|
|
438
|
+
*/
|
|
439
|
+
gridFitType: GridFitType;
|
|
440
|
+
/**
|
|
441
|
+
*
|
|
442
|
+
*/
|
|
443
|
+
get height(): number;
|
|
444
|
+
set height(val: number);
|
|
445
|
+
/**
|
|
446
|
+
* Contains the HTML representation of the text field contents.
|
|
447
|
+
*
|
|
448
|
+
* <p>Flash Player supports the following HTML tags:</p>
|
|
449
|
+
*
|
|
450
|
+
* <p>Flash Player and AIR also support explicit character codes, such as
|
|
451
|
+
* &(ASCII ampersand) and €(Unicode € symbol). </p>
|
|
452
|
+
*/
|
|
453
|
+
private _htmlText;
|
|
454
|
+
get htmlText(): string;
|
|
455
|
+
set htmlText(value: string);
|
|
456
|
+
/**
|
|
457
|
+
* The number of characters in a text field. A character such as tab
|
|
458
|
+
* (<code>\t</code>) counts as one character.
|
|
459
|
+
*/
|
|
460
|
+
get length(): number;
|
|
461
|
+
/**
|
|
462
|
+
* The maximum number of characters that the text field can contain, as
|
|
463
|
+
* entered by a user. A script can insert more text than
|
|
464
|
+
* <code>maxChars</code> allows; the <code>maxChars</code> property indicates
|
|
465
|
+
* only how much text a user can enter. If the value of this property is
|
|
466
|
+
* <code>0</code>, a user can enter an unlimited amount of text.
|
|
467
|
+
*
|
|
468
|
+
* @default 0
|
|
469
|
+
*/
|
|
470
|
+
maxChars: number;
|
|
471
|
+
/**
|
|
472
|
+
* The maximum value of <code>scrollH</code>.
|
|
473
|
+
*/
|
|
474
|
+
get maxScrollH(): number;
|
|
475
|
+
/**
|
|
476
|
+
* The maximum value of <code>scrollV</code>.
|
|
477
|
+
*/
|
|
478
|
+
get maxScrollV(): number;
|
|
479
|
+
/**
|
|
480
|
+
* A Boolean value that indicates whether Flash Player automatically scrolls
|
|
481
|
+
* multiline text fields when the user clicks a text field and rolls the
|
|
482
|
+
* mouse wheel. By default, this value is <code>true</code>. This property is
|
|
483
|
+
* useful if you want to prevent mouse wheel scrolling of text fields, or
|
|
484
|
+
* implement your own text field scrolling.
|
|
485
|
+
*/
|
|
486
|
+
mouseWheelEnabled: boolean;
|
|
487
|
+
/**
|
|
488
|
+
* Indicates whether field is a multiline text field. If the value is
|
|
489
|
+
* <code>true</code>, the text field is multiline; if the value is
|
|
490
|
+
* <code>false</code>, the text field is a single-line text field. In a field
|
|
491
|
+
* of type <code>TextFieldType.INPUT</code>, the <code>multiline</code> value
|
|
492
|
+
* determines whether the <code>Enter</code> key creates a new line(a value
|
|
493
|
+
* of <code>false</code>, and the <code>Enter</code> key is ignored). If you
|
|
494
|
+
* paste text into a <code>TextField</code> with a <code>multiline</code>
|
|
495
|
+
* value of <code>false</code>, newlines are stripped out of the text.
|
|
496
|
+
*
|
|
497
|
+
* @default false
|
|
498
|
+
*/
|
|
499
|
+
multiline: boolean;
|
|
500
|
+
/**
|
|
501
|
+
* Defines the number of text lines in a multiline text field. If
|
|
502
|
+
* <code>wordWrap</code> property is set to <code>true</code>, the number of
|
|
503
|
+
* lines increases when text wraps.
|
|
504
|
+
*/
|
|
505
|
+
get numLines(): number;
|
|
506
|
+
/**
|
|
507
|
+
* Indicates the set of characters that a user can enter into the text field.
|
|
508
|
+
* If the value of the <code>restrict</code> property is <code>null</code>,
|
|
509
|
+
* you can enter any character. If the value of the <code>restrict</code>
|
|
510
|
+
* property is an empty string, you cannot enter any character. If the value
|
|
511
|
+
* of the <code>restrict</code> property is a string of characters, you can
|
|
512
|
+
* enter only characters in the string into the text field. The string is
|
|
513
|
+
* scanned from left to right. You can specify a range by using the hyphen
|
|
514
|
+
* (-) character. Only user interaction is restricted; a script can put any
|
|
515
|
+
* text into the text field. <ph outputclass="flashonly">This property does
|
|
516
|
+
* not synchronize with the Embed font options in the Property inspector.
|
|
517
|
+
*
|
|
518
|
+
* <p>If the string begins with a caret(^) character, all characters are
|
|
519
|
+
* initially accepted and succeeding characters in the string are excluded
|
|
520
|
+
* from the set of accepted characters. If the string does not begin with a
|
|
521
|
+
* caret(^) character, no characters are initially accepted and succeeding
|
|
522
|
+
* characters in the string are included in the set of accepted
|
|
523
|
+
* characters.</p>
|
|
524
|
+
*
|
|
525
|
+
* <p>The following example allows only uppercase characters, spaces, and
|
|
526
|
+
* numbers to be entered into a text field:</p>
|
|
527
|
+
* <pre xml:space="preserve"> my_txt.restrict = "A-Z 0-9"; </pre>
|
|
528
|
+
*
|
|
529
|
+
* <p>The following example includes all characters, but excludes lowercase
|
|
530
|
+
* letters:</p>
|
|
531
|
+
* <pre xml:space="preserve"> my_txt.restrict = "^a-z"; </pre>
|
|
532
|
+
*
|
|
533
|
+
* <p>You can use a backslash to enter a ^ or - verbatim. The accepted
|
|
534
|
+
* backslash sequences are \-, \^ or \\. The backslash must be an actual
|
|
535
|
+
* character in the string, so when specified in ActionScript, a double
|
|
536
|
+
* backslash must be used. For example, the following code includes only the
|
|
537
|
+
* dash(-) and caret(^):</p>
|
|
538
|
+
* <pre xml:space="preserve"> my_txt.restrict = "\\-\\^"; </pre>
|
|
539
|
+
*
|
|
540
|
+
* <p>The ^ can be used anywhere in the string to toggle between including
|
|
541
|
+
* characters and excluding characters. The following code includes only
|
|
542
|
+
* uppercase letters, but excludes the uppercase letter Q:</p>
|
|
543
|
+
* <pre xml:space="preserve"> my_txt.restrict = "A-Z^Q"; </pre>
|
|
544
|
+
*
|
|
545
|
+
* <p>You can use the <code>\u</code> escape sequence to construct
|
|
546
|
+
* <code>restrict</code> strings. The following code includes only the
|
|
547
|
+
* characters from ASCII 32(space) to ASCII 126(tilde).</p>
|
|
548
|
+
* <pre xml:space="preserve"> my_txt.restrict = "\u0020-\u007E"; </pre>
|
|
549
|
+
*
|
|
550
|
+
* @default null
|
|
551
|
+
*/
|
|
552
|
+
_restrict: string;
|
|
553
|
+
_restrictRegex: RegExp;
|
|
554
|
+
get restrict(): string;
|
|
555
|
+
set restrict(value: string);
|
|
556
|
+
/**
|
|
557
|
+
* The current horizontal scrolling position. If the <code>scrollH</code>
|
|
558
|
+
* property is 0, the text is not horizontally scrolled. This property value
|
|
559
|
+
* is an integer that represents the horizontal position in pixels.
|
|
560
|
+
*
|
|
561
|
+
* <p>The units of horizontal scrolling are pixels, whereas the units of
|
|
562
|
+
* vertical scrolling are lines. Horizontal scrolling is measured in pixels
|
|
563
|
+
* because most fonts you typically use are proportionally spaced; that is,
|
|
564
|
+
* the characters can have different widths. Flash Player performs vertical
|
|
565
|
+
* scrolling by line because users usually want to see a complete line of
|
|
566
|
+
* text rather than a partial line. Even if a line uses multiple fonts, the
|
|
567
|
+
* height of the line adjusts to fit the largest font in use.</p>
|
|
568
|
+
*
|
|
569
|
+
* <p><b>Note: </b>The <code>scrollH</code> property is zero-based, not
|
|
570
|
+
* 1-based like the <code>scrollV</code> vertical scrolling property.</p>
|
|
571
|
+
*/
|
|
572
|
+
private _scrollH;
|
|
573
|
+
get scrollH(): number;
|
|
574
|
+
set scrollH(value: number);
|
|
575
|
+
/**
|
|
576
|
+
* The vertical position of text in a text field. The <code>scrollV</code>
|
|
577
|
+
* property is useful for directing users to a specific paragraph in a long
|
|
578
|
+
* passage, or creating scrolling text fields.
|
|
579
|
+
*
|
|
580
|
+
* <p>The units of vertical scrolling are lines, whereas the units of
|
|
581
|
+
* horizontal scrolling are pixels. If the first line displayed is the first
|
|
582
|
+
* line in the text field, scrollV is set to 1(not 0). Horizontal scrolling
|
|
583
|
+
* is measured in pixels because most fonts are proportionally spaced; that
|
|
584
|
+
* is, the characters can have different widths. Flash performs vertical
|
|
585
|
+
* scrolling by line because users usually want to see a complete line of
|
|
586
|
+
* text rather than a partial line. Even if there are multiple fonts on a
|
|
587
|
+
* line, the height of the line adjusts to fit the largest font in use.</p>
|
|
588
|
+
*/
|
|
589
|
+
_scrollV: number;
|
|
590
|
+
get scrollV(): number;
|
|
591
|
+
set scrollV(value: number);
|
|
592
|
+
/**
|
|
593
|
+
* A Boolean value that indicates whether the text field is selectable. The
|
|
594
|
+
* value <code>true</code> indicates that the text is selectable. The
|
|
595
|
+
* <code>selectable</code> property controls whether a text field is
|
|
596
|
+
* selectable, not whether a text field is editable. A dynamic text field can
|
|
597
|
+
* be selectable even if it is not editable. If a dynamic text field is not
|
|
598
|
+
* selectable, the user cannot select its text.
|
|
599
|
+
*
|
|
600
|
+
* <p>If <code>selectable</code> is set to <code>false</code>, the text in
|
|
601
|
+
* the text field does not respond to selection commands from the mouse or
|
|
602
|
+
* keyboard, and the text cannot be copied with the Copy command. If
|
|
603
|
+
* <code>selectable</code> is set to <code>true</code>, the text in the text
|
|
604
|
+
* field can be selected with the mouse or keyboard, and the text can be
|
|
605
|
+
* copied with the Copy command. You can select text this way even if the
|
|
606
|
+
* text field is a dynamic text field instead of an input text field. </p>
|
|
607
|
+
*
|
|
608
|
+
* @default true
|
|
609
|
+
*/
|
|
610
|
+
private _selectable;
|
|
611
|
+
get selectable(): boolean;
|
|
612
|
+
set selectable(value: boolean);
|
|
613
|
+
/**
|
|
614
|
+
* The zero-based character index value of the first character in the current
|
|
615
|
+
* selection. For example, the first character is 0, the second character is
|
|
616
|
+
* 1, and so on. If no text is selected, this property is the value of
|
|
617
|
+
* <code>caretIndex</code>.
|
|
618
|
+
*/
|
|
619
|
+
get selectionBeginIndex(): number;
|
|
620
|
+
/**
|
|
621
|
+
* The zero-based character index value of the last character in the current
|
|
622
|
+
* selection. For example, the first character is 0, the second character is
|
|
623
|
+
* 1, and so on. If no text is selected, this property is the value of
|
|
624
|
+
* <code>caretIndex</code>.
|
|
625
|
+
*/
|
|
626
|
+
get selectionEndIndex(): number;
|
|
627
|
+
/**
|
|
628
|
+
* The sharpness of the glyph edges in this text field. This property applies
|
|
629
|
+
* only if the <code>flash.text.AntiAliasType</code> property of the text
|
|
630
|
+
* field is set to <code>flash.text.AntiAliasType.ADVANCED</code>. The range
|
|
631
|
+
* for <code>sharpness</code> is a number from -400 to 400. If you attempt to
|
|
632
|
+
* set <code>sharpness</code> to a value outside that range, Flash sets the
|
|
633
|
+
* property to the nearest value in the range(either -400 or 400).
|
|
634
|
+
*
|
|
635
|
+
* @default 0
|
|
636
|
+
*/
|
|
637
|
+
sharpness: number;
|
|
638
|
+
/**
|
|
639
|
+
* Attaches a style sheet to the text field. For information on creating
|
|
640
|
+
* style sheets, see the StyleSheet class and the <i>ActionScript 3.0
|
|
641
|
+
* Developer's Guide</i>.
|
|
642
|
+
*
|
|
643
|
+
* <p>You can change the style sheet associated with a text field at any
|
|
644
|
+
* time. If you change the style sheet in use, the text field is redrawn with
|
|
645
|
+
* the new style sheet. You can set the style sheet to <code>null</code> or
|
|
646
|
+
* <code>undefined</code> to remove the style sheet. If the style sheet in
|
|
647
|
+
* use is removed, the text field is redrawn without a style sheet. </p>
|
|
648
|
+
*
|
|
649
|
+
* <p><b>Note:</b> If the style sheet is removed, the contents of both
|
|
650
|
+
* <code>TextField.text</code> and <code> TextField.htmlText</code> change to
|
|
651
|
+
* incorporate the formatting previously applied by the style sheet. To
|
|
652
|
+
* preserve the original <code>TextField.htmlText</code> contents without the
|
|
653
|
+
* formatting, save the value in a variable before removing the style
|
|
654
|
+
* sheet.</p>
|
|
655
|
+
*/
|
|
656
|
+
styleSheet: StyleSheet;
|
|
657
|
+
/**
|
|
658
|
+
* A string that is the current text in the text field. Lines are separated
|
|
659
|
+
* by the carriage return character(<code>'\r'</code>, ASCII 13). This
|
|
660
|
+
* property contains unformatted text in the text field, without HTML tags.
|
|
661
|
+
*
|
|
662
|
+
* <p>To get the text in HTML form, use the <code>htmlText</code>
|
|
663
|
+
* property.</p>
|
|
664
|
+
*/
|
|
665
|
+
get text(): string;
|
|
666
|
+
set text(value: string);
|
|
667
|
+
setLabelData(labelData: any): void;
|
|
668
|
+
get newTextFormat(): TextFormat;
|
|
669
|
+
set newTextFormat(value: TextFormat);
|
|
670
|
+
/**
|
|
671
|
+
* Indicates the horizontal scale(percentage) of the object as applied from
|
|
672
|
+
* the registration point. The default registration point is(0,0). 1.0
|
|
673
|
+
* equals 100% scale.
|
|
674
|
+
*
|
|
675
|
+
* <p>Scaling the local coordinate system changes the <code>x</code> and
|
|
676
|
+
* <code>y</code> property values, which are defined in whole pixels. </p>
|
|
677
|
+
*/
|
|
678
|
+
get scaleX(): number;
|
|
679
|
+
set scaleX(val: number);
|
|
680
|
+
/**
|
|
681
|
+
* Indicates the vertical scale(percentage) of an object as applied from the
|
|
682
|
+
* registration point of the object. The default registration point is(0,0).
|
|
683
|
+
* 1.0 is 100% scale.
|
|
684
|
+
*
|
|
685
|
+
* <p>Scaling the local coordinate system changes the <code>x</code> and
|
|
686
|
+
* <code>y</code> property values, which are defined in whole pixels. </p>
|
|
687
|
+
*/
|
|
688
|
+
get scaleY(): number;
|
|
689
|
+
set scaleY(val: number);
|
|
690
|
+
/**
|
|
691
|
+
* The color of the text in a text field, in hexadecimal format. The
|
|
692
|
+
* hexadecimal color system uses six digits to represent color values. Each
|
|
693
|
+
* digit has 16 possible values or characters. The characters range from 0-9
|
|
694
|
+
* and then A-F. For example, black is <code>0x000000</code>; white is
|
|
695
|
+
* <code>0xFFFFFF</code>.
|
|
696
|
+
*
|
|
697
|
+
* @default 0(0x000000)
|
|
698
|
+
*/
|
|
699
|
+
_textColor: number;
|
|
700
|
+
get textColor(): number;
|
|
701
|
+
set textColor(value: number);
|
|
702
|
+
private getTextColorForTextFormat;
|
|
703
|
+
/**
|
|
704
|
+
* The interaction mode property, Default value is
|
|
705
|
+
* TextInteractionMode.NORMAL. On mobile platforms, the normal mode implies
|
|
706
|
+
* that the text can be scrolled but not selected. One can switch to the
|
|
707
|
+
* selectable mode through the in-built context menu on the text field. On
|
|
708
|
+
* Desktop, the normal mode implies that the text is in scrollable as well as
|
|
709
|
+
* selection mode.
|
|
710
|
+
*/
|
|
711
|
+
get textInteractionMode(): TextInteractionMode;
|
|
712
|
+
/**
|
|
713
|
+
* The width of the text in pixels.
|
|
714
|
+
*/
|
|
715
|
+
get textWidth(): number;
|
|
716
|
+
/**
|
|
717
|
+
* The width of the text in pixels.
|
|
718
|
+
*/
|
|
719
|
+
get textHeight(): number;
|
|
720
|
+
/**
|
|
721
|
+
* The thickness of the glyph edges in this text field. This property applies
|
|
722
|
+
* only when <code>AntiAliasType</code> is set to
|
|
723
|
+
* <code>AntiAliasType.ADVANCED</code>.
|
|
724
|
+
*
|
|
725
|
+
* <p>The range for <code>thickness</code> is a number from -200 to 200. If
|
|
726
|
+
* you attempt to set <code>thickness</code> to a value outside that range,
|
|
727
|
+
* the property is set to the nearest value in the range(either -200 or
|
|
728
|
+
* 200).</p>
|
|
729
|
+
*
|
|
730
|
+
* @default 0
|
|
731
|
+
*/
|
|
732
|
+
thickness: number;
|
|
733
|
+
/**
|
|
734
|
+
* The type of the text field. Either one of the following TextFieldType
|
|
735
|
+
* constants: <code>TextFieldType.DYNAMIC</code>, which specifies a dynamic
|
|
736
|
+
* text field, which a user cannot edit, or <code>TextFieldType.INPUT</code>,
|
|
737
|
+
* which specifies an input text field, which a user can edit.
|
|
738
|
+
*
|
|
739
|
+
* @default dynamic
|
|
740
|
+
* @throws ArgumentError The <code>type</code> specified is not a member of
|
|
741
|
+
* flash.text.TextFieldType.
|
|
742
|
+
*/
|
|
743
|
+
_type: TextFieldType;
|
|
744
|
+
get type(): TextFieldType;
|
|
745
|
+
set type(value: TextFieldType);
|
|
746
|
+
/**
|
|
747
|
+
* Specifies whether to copy and paste the text formatting along with the
|
|
748
|
+
* text. When set to <code>true</code>, Flash Player copies and pastes
|
|
749
|
+
* formatting(such as alignment, bold, and italics) when you copy and paste
|
|
750
|
+
* between text fields. Both the origin and destination text fields for the
|
|
751
|
+
* copy and paste procedure must have <code>useRichTextClipboard</code> set
|
|
752
|
+
* to <code>true</code>. The default value is <code>false</code>.
|
|
753
|
+
*/
|
|
754
|
+
useRichTextClipboard: boolean;
|
|
755
|
+
/**
|
|
756
|
+
* A Boolean value that indicates whether the text field has word wrap. If
|
|
757
|
+
* the value of <code>wordWrap</code> is <code>true</code>, the text field
|
|
758
|
+
* has word wrap; if the value is <code>false</code>, the text field does not
|
|
759
|
+
* have word wrap. The default value is <code>false</code>.
|
|
760
|
+
*/
|
|
761
|
+
_wordWrap: boolean;
|
|
762
|
+
get x(): number;
|
|
763
|
+
set x(val: number);
|
|
764
|
+
/**
|
|
765
|
+
*
|
|
766
|
+
*/
|
|
767
|
+
get width(): number;
|
|
768
|
+
set width(val: number);
|
|
769
|
+
set wordWrap(val: boolean);
|
|
770
|
+
/**
|
|
771
|
+
* The width of the text in pixels.
|
|
772
|
+
*/
|
|
773
|
+
get wordWrap(): boolean;
|
|
774
|
+
/**
|
|
775
|
+
* Creates a new TextField instance. After you create the TextField instance,
|
|
776
|
+
* call the <code>addChild()</code> or <code>addChildAt()</code> method of
|
|
777
|
+
* the parent DisplayObjectContainer object to add the TextField instance to
|
|
778
|
+
* the display list.
|
|
779
|
+
*
|
|
780
|
+
* <p>The default size for a text field is 100 x 100 pixels.</p>
|
|
781
|
+
*/
|
|
782
|
+
constructor();
|
|
783
|
+
advanceFrame(): void;
|
|
784
|
+
getEntity(): IEntity;
|
|
785
|
+
clear(): void;
|
|
786
|
+
/**
|
|
787
|
+
* @inheritDoc
|
|
788
|
+
*/
|
|
789
|
+
dispose(): void;
|
|
790
|
+
/**
|
|
791
|
+
* @inheritDoc
|
|
792
|
+
*/
|
|
793
|
+
disposeValues(): void;
|
|
794
|
+
/**
|
|
795
|
+
* Reconstructs the Graphics for this Text-field.
|
|
796
|
+
*/
|
|
797
|
+
reConstruct(buildGraphics?: boolean): void;
|
|
798
|
+
reset(): void;
|
|
799
|
+
private onClipboardPaste;
|
|
800
|
+
private _resetParagraph;
|
|
801
|
+
private buildParagraphs;
|
|
802
|
+
private adjustPositionForAutoSize;
|
|
803
|
+
private getWordPositions;
|
|
804
|
+
staticMatrix: any;
|
|
805
|
+
private buildGlyphsForLabelData;
|
|
806
|
+
private buildGlyphs;
|
|
807
|
+
private buildShapes;
|
|
808
|
+
/**
|
|
809
|
+
* Appends the string specified by the <code>newText</code> parameter to the
|
|
810
|
+
* end of the text of the text field. This method is more efficient than an
|
|
811
|
+
* addition assignment(<code>+=</code>) on a <code>text</code> property
|
|
812
|
+
* (such as <code>someTextField.text += moreText</code>), particularly for a
|
|
813
|
+
* text field that contains a significant amount of content.
|
|
814
|
+
*
|
|
815
|
+
* @param newText The string to append to the existing text.
|
|
816
|
+
*/
|
|
817
|
+
appendText(newText: string): void;
|
|
818
|
+
/**
|
|
819
|
+
* *tells the Textfield that a paragraph is defined completly.
|
|
820
|
+
* e.g. the textfield will start a new line for future added text.
|
|
821
|
+
*/
|
|
822
|
+
closeParagraph(): void;
|
|
823
|
+
/**
|
|
824
|
+
* Returns a rectangle that is the bounding box of the character.
|
|
825
|
+
*
|
|
826
|
+
* @param charIndex The zero-based index value for the character(for
|
|
827
|
+
* example, the first position is 0, the second position is
|
|
828
|
+
* 1, and so on).
|
|
829
|
+
* @return A rectangle with <code>x</code> and <code>y</code> minimum and
|
|
830
|
+
* maximum values defining the bounding box of the character.
|
|
831
|
+
*/
|
|
832
|
+
getCharBoundaries(charIndex: number): Rectangle;
|
|
833
|
+
/**
|
|
834
|
+
* Returns the zero-based index value of the character at the point specified
|
|
835
|
+
* by the <code>x</code> and <code>y</code> parameters.
|
|
836
|
+
*
|
|
837
|
+
* @param x The <i>x</i> coordinate of the character.
|
|
838
|
+
* @param y The <i>y</i> coordinate of the character.
|
|
839
|
+
* @return The zero-based index value of the character(for example, the
|
|
840
|
+
* first position is 0, the second position is 1, and so on). Returns
|
|
841
|
+
* -1 if the point is not over any character.
|
|
842
|
+
*/
|
|
843
|
+
getCharIndexAtPoint(x: number, y: number, lineIdx?: number): number;
|
|
844
|
+
/**
|
|
845
|
+
* Given a character index, returns the index of the first character in the
|
|
846
|
+
* same paragraph.
|
|
847
|
+
*
|
|
848
|
+
* @param charIndex The zero-based index value of the character(for example,
|
|
849
|
+
* the first character is 0, the second character is 1, and
|
|
850
|
+
* so on).
|
|
851
|
+
* @return The zero-based index value of the first character in the same
|
|
852
|
+
* paragraph.
|
|
853
|
+
* @throws RangeError The character index specified is out of range.
|
|
854
|
+
*/
|
|
855
|
+
getFirstCharInParagraph(charIndex: number): number;
|
|
856
|
+
/**
|
|
857
|
+
* Returns a DisplayObject reference for the given <code>id</code>, for an
|
|
858
|
+
* image or SWF file that has been added to an HTML-formatted text field by
|
|
859
|
+
* using an <code><img></code> tag. The <code><img></code> tag is in the
|
|
860
|
+
* following format:
|
|
861
|
+
*
|
|
862
|
+
* <p><pre xml:space="preserve"><code> <img src = 'filename.jpg' id =
|
|
863
|
+
* 'instanceName' ></code></pre></p>
|
|
864
|
+
*
|
|
865
|
+
* @param id The <code>id</code> to match(in the <code>id</code> attribute
|
|
866
|
+
* of the <code><img></code> tag).
|
|
867
|
+
* @return The display object corresponding to the image or SWF file with the
|
|
868
|
+
* matching <code>id</code> attribute in the <code><img></code> tag
|
|
869
|
+
* of the text field. For media loaded from an external source, this
|
|
870
|
+
* object is a Loader object, and, once loaded, the media object is a
|
|
871
|
+
* child of that Loader object. For media embedded in the SWF file,
|
|
872
|
+
* it is the loaded object. If no <code><img></code> tag with the
|
|
873
|
+
* matching <code>id</code> exists, the method returns
|
|
874
|
+
* <code>null</code>.
|
|
875
|
+
*/
|
|
876
|
+
getImageReference(id: string): DisplayObject;
|
|
877
|
+
/**
|
|
878
|
+
* Returns the zero-based index value of the line at the point specified by
|
|
879
|
+
* the <code>x</code> and <code>y</code> parameters.
|
|
880
|
+
*
|
|
881
|
+
* @param x The <i>x</i> coordinate of the line.
|
|
882
|
+
* @param y The <i>y</i> coordinate of the line.
|
|
883
|
+
* @return The zero-based index value of the line(for example, the first
|
|
884
|
+
* line is 0, the second line is 1, and so on). Returns -1 if the
|
|
885
|
+
* point is not over any line.
|
|
886
|
+
*/
|
|
887
|
+
getLineIndexAtPoint(x: number, y: number): number;
|
|
888
|
+
/**
|
|
889
|
+
* Returns the zero-based index value of the line containing the character
|
|
890
|
+
* specified by the <code>charIndex</code> parameter.
|
|
891
|
+
*
|
|
892
|
+
* @param charIndex The zero-based index value of the character(for example,
|
|
893
|
+
* the first character is 0, the second character is 1, and
|
|
894
|
+
* so on).
|
|
895
|
+
* @return The zero-based index value of the line.
|
|
896
|
+
* @throws RangeError The character index specified is out of range.
|
|
897
|
+
*/
|
|
898
|
+
getLineIndexOfChar(charIndex: number): number;
|
|
899
|
+
/**
|
|
900
|
+
* Returns the number of characters in a specific text line.
|
|
901
|
+
*
|
|
902
|
+
* @param lineIndex The line number for which you want the length.
|
|
903
|
+
* @return The number of characters in the line.
|
|
904
|
+
* @throws RangeError The line number specified is out of range.
|
|
905
|
+
*/
|
|
906
|
+
getLineLength(lineIndex: number): number;
|
|
907
|
+
/**
|
|
908
|
+
* Returns metrics information about a given text line.
|
|
909
|
+
*
|
|
910
|
+
* @param lineIndex The line number for which you want metrics information.
|
|
911
|
+
* @return A TextLineMetrics object.
|
|
912
|
+
* @throws RangeError The line number specified is out of range.
|
|
913
|
+
*/
|
|
914
|
+
getLineMetrics(lineIndex: number): TextLineMetrics;
|
|
915
|
+
/**
|
|
916
|
+
* Returns the character index of the first character in the line that the
|
|
917
|
+
* <code>lineIndex</code> parameter specifies.
|
|
918
|
+
*
|
|
919
|
+
* @param lineIndex The zero-based index value of the line(for example, the
|
|
920
|
+
* first line is 0, the second line is 1, and so on).
|
|
921
|
+
* @return The zero-based index value of the first character in the line.
|
|
922
|
+
* @throws RangeError The line number specified is out of range.
|
|
923
|
+
*/
|
|
924
|
+
getLineOffset(lineIndex: number): number;
|
|
925
|
+
/**
|
|
926
|
+
* Returns the text of the line specified by the <code>lineIndex</code>
|
|
927
|
+
* parameter.
|
|
928
|
+
*
|
|
929
|
+
* @param lineIndex The zero-based index value of the line(for example, the
|
|
930
|
+
* first line is 0, the second line is 1, and so on).
|
|
931
|
+
* @return The text string contained in the specified line.
|
|
932
|
+
* @throws RangeError The line number specified is out of range.
|
|
933
|
+
*/
|
|
934
|
+
getLineText(lineIndex: number): string;
|
|
935
|
+
/**
|
|
936
|
+
* Given a character index, returns the length of the paragraph containing
|
|
937
|
+
* the given character. The length is relative to the first character in the
|
|
938
|
+
* paragraph(as returned by <code>getFirstCharInParagraph()</code>), not to
|
|
939
|
+
* the character index passed in.
|
|
940
|
+
*
|
|
941
|
+
* @param charIndex The zero-based index value of the character(for example,
|
|
942
|
+
* the first character is 0, the second character is 1, and
|
|
943
|
+
* so on).
|
|
944
|
+
* @return Returns the number of characters in the paragraph.
|
|
945
|
+
* @throws RangeError The character index specified is out of range.
|
|
946
|
+
*/
|
|
947
|
+
getParagraphLength(charIndex: number): number;
|
|
948
|
+
/**
|
|
949
|
+
* Returns a TextFormat object that contains formatting information for the
|
|
950
|
+
* range of text that the <code>beginIndex</code> and <code>endIndex</code>
|
|
951
|
+
* parameters specify. Only properties that are common to the entire text
|
|
952
|
+
* specified are set in the resulting TextFormat object. Any property that is
|
|
953
|
+
* <i>mixed</i>, meaning that it has different values at different points in
|
|
954
|
+
* the text, has a value of <code>null</code>.
|
|
955
|
+
*
|
|
956
|
+
* <p>If you do not specify values for these parameters, this method is
|
|
957
|
+
* applied to all the text in the text field. </p>
|
|
958
|
+
*
|
|
959
|
+
* <p>The following table describes three possible usages:</p>
|
|
960
|
+
*
|
|
961
|
+
* @return The TextFormat object that represents the formatting properties
|
|
962
|
+
* for the specified text.
|
|
963
|
+
* @throws RangeError The <code>beginIndex</code> or <code>endIndex</code>
|
|
964
|
+
* specified is out of range.
|
|
965
|
+
*/
|
|
966
|
+
getTextFormat(beginIndex?: number, endIndex?: number): TextFormat;
|
|
967
|
+
/**
|
|
968
|
+
* Replaces the current selection with the contents of the <code>value</code>
|
|
969
|
+
* parameter. The text is inserted at the position of the current selection,
|
|
970
|
+
* using the current default character format and default paragraph format.
|
|
971
|
+
* The text is not treated as HTML.
|
|
972
|
+
*
|
|
973
|
+
* <p>You can use the <code>replaceSelectedText()</code> method to insert and
|
|
974
|
+
* delete text without disrupting the character and paragraph formatting of
|
|
975
|
+
* the rest of the text.</p>
|
|
976
|
+
*
|
|
977
|
+
* <p><b>Note:</b> This method does not work if a style sheet is applied to
|
|
978
|
+
* the text field.</p>
|
|
979
|
+
*
|
|
980
|
+
* @param value The string to replace the currently selected text.
|
|
981
|
+
* @throws Error This method cannot be used on a text field with a style
|
|
982
|
+
* sheet.
|
|
983
|
+
*/
|
|
984
|
+
replaceSelectedText(value: string): void;
|
|
985
|
+
/**
|
|
986
|
+
* Replaces the range of characters that the <code>beginIndex</code> and
|
|
987
|
+
* <code>endIndex</code> parameters specify with the contents of the
|
|
988
|
+
* <code>newText</code> parameter. As designed, the text from
|
|
989
|
+
* <code>beginIndex</code> to <code>endIndex-1</code> is replaced.
|
|
990
|
+
*
|
|
991
|
+
* <p><b>Note:</b> This method does not work if a style sheet is applied to
|
|
992
|
+
* the text field.</p>
|
|
993
|
+
*
|
|
994
|
+
* @param beginIndex The zero-based index value for the start position of the
|
|
995
|
+
* replacement range.
|
|
996
|
+
* @param endIndex The zero-based index position of the first character
|
|
997
|
+
* after the desired text span.
|
|
998
|
+
* @param newText The text to use to replace the specified range of
|
|
999
|
+
* characters.
|
|
1000
|
+
* @throws Error This method cannot be used on a text field with a style
|
|
1001
|
+
* sheet.
|
|
1002
|
+
*/
|
|
1003
|
+
replaceText(beginIndex: number, endIndex: number, newText: string): void;
|
|
1004
|
+
/**
|
|
1005
|
+
* Sets as selected the text designated by the index values of the first and
|
|
1006
|
+
* last characters, which are specified with the <code>beginIndex</code> and
|
|
1007
|
+
* <code>endIndex</code> parameters. If the two parameter values are the
|
|
1008
|
+
* same, this method sets the insertion point, as if you set the
|
|
1009
|
+
* <code>caretIndex</code> property.
|
|
1010
|
+
*
|
|
1011
|
+
* @param beginIndex The zero-based index value of the first character in the
|
|
1012
|
+
* selection(for example, the first character is 0, the
|
|
1013
|
+
* second character is 1, and so on).
|
|
1014
|
+
* @param endIndex The zero-based index value of the last character in the
|
|
1015
|
+
* selection.
|
|
1016
|
+
*/
|
|
1017
|
+
setSelection(beginIndex: number, endIndex: number): void;
|
|
1018
|
+
/**
|
|
1019
|
+
* Applies the text formatting that the <code>format</code> parameter
|
|
1020
|
+
* specifies to the specified text in a text field. The value of
|
|
1021
|
+
* <code>format</code> must be a TextFormat object that specifies the desired
|
|
1022
|
+
* text formatting changes. Only the non-null properties of
|
|
1023
|
+
* <code>format</code> are applied to the text field. Any property of
|
|
1024
|
+
* <code>format</code> that is set to <code>null</code> is not applied. By
|
|
1025
|
+
* default, all of the properties of a newly created TextFormat object are
|
|
1026
|
+
* set to <code>null</code>.
|
|
1027
|
+
*
|
|
1028
|
+
* <p><b>Note:</b> This method does not work if a style sheet is applied to
|
|
1029
|
+
* the text field.</p>
|
|
1030
|
+
*
|
|
1031
|
+
* <p>The <code>setTextFormat()</code> method changes the text formatting
|
|
1032
|
+
* applied to a range of characters or to the entire body of text in a text
|
|
1033
|
+
* field. To apply the properties of format to all text in the text field, do
|
|
1034
|
+
* not specify values for <code>beginIndex</code> and <code>endIndex</code>.
|
|
1035
|
+
* To apply the properties of the format to a range of text, specify values
|
|
1036
|
+
* for the <code>beginIndex</code> and the <code>endIndex</code> parameters.
|
|
1037
|
+
* You can use the <code>length</code> property to determine the index
|
|
1038
|
+
* values.</p>
|
|
1039
|
+
*
|
|
1040
|
+
* <p>The two types of formatting information in a TextFormat object are
|
|
1041
|
+
* character level formatting and paragraph level formatting. Each character
|
|
1042
|
+
* in a text field can have its own character formatting settings, such as
|
|
1043
|
+
* font name, font size, bold, and italic.</p>
|
|
1044
|
+
*
|
|
1045
|
+
* <p>For paragraphs, the first character of the paragraph is examined for
|
|
1046
|
+
* the paragraph formatting settings for the entire paragraph. Examples of
|
|
1047
|
+
* paragraph formatting settings are left margin, right margin, and
|
|
1048
|
+
* indentation.</p>
|
|
1049
|
+
*
|
|
1050
|
+
* <p>Any text inserted manually by the user, or replaced by the
|
|
1051
|
+
* <code>replaceSelectedText()</code> method, receives the default text field
|
|
1052
|
+
* formatting for new text, and not the formatting specified for the text
|
|
1053
|
+
* insertion point. To set the default formatting for new text, use
|
|
1054
|
+
* <code>defaultTextFormat</code>.</p>
|
|
1055
|
+
*
|
|
1056
|
+
* @param format A TextFormat object that contains character and paragraph
|
|
1057
|
+
* formatting information.
|
|
1058
|
+
* @throws Error This method cannot be used on a text field with a style
|
|
1059
|
+
* sheet.
|
|
1060
|
+
* @throws RangeError The <code>beginIndex</code> or <code>endIndex</code>
|
|
1061
|
+
* specified is out of range.
|
|
1062
|
+
*/
|
|
1063
|
+
setTextFormat(format: TextFormat, beginIndex?: number, endIndex?: number): void;
|
|
1064
|
+
/**
|
|
1065
|
+
* Returns true if an embedded font is available with the specified
|
|
1066
|
+
* <code>fontName</code> and <code>fontStyle</code> where
|
|
1067
|
+
* <code>Font.fontType</code> is <code>flash.text.FontType.EMBEDDED</code>.
|
|
1068
|
+
* Starting with Flash Player 10, two kinds of embedded fonts can appear in a
|
|
1069
|
+
* SWF file. Normal embedded fonts are only used with TextField objects. CFF
|
|
1070
|
+
* embedded fonts are only used with the flash.text.engine classes. The two
|
|
1071
|
+
* types are distinguished by the <code>fontType</code> property of the
|
|
1072
|
+
* <code>Font</code> class, as returned by the <code>enumerateFonts()</code>
|
|
1073
|
+
* function.
|
|
1074
|
+
*
|
|
1075
|
+
* <p>TextField cannot use a font of type <code>EMBEDDED_CFF</code>. If
|
|
1076
|
+
* <code>embedFonts</code> is set to <code>true</code> and the only font
|
|
1077
|
+
* available at run time with the specified name and style is of type
|
|
1078
|
+
* <code>EMBEDDED_CFF</code>, Flash Player fails to render the text, as if no
|
|
1079
|
+
* embedded font were available with the specified name and style.</p>
|
|
1080
|
+
*
|
|
1081
|
+
* <p>If both <code>EMBEDDED</code> and <code>EMBEDDED_CFF</code> fonts are
|
|
1082
|
+
* available with the same name and style, the <code>EMBEDDED</code> font is
|
|
1083
|
+
* selected and text renders with the <code>EMBEDDED</code> font.</p>
|
|
1084
|
+
*
|
|
1085
|
+
* @param fontName The name of the embedded font to check.
|
|
1086
|
+
* @param fontStyle Specifies the font style to check. Use
|
|
1087
|
+
* <code>flash.text.FontStyle</code>
|
|
1088
|
+
* @return <code>true</code> if a compatible embedded font is available,
|
|
1089
|
+
* otherwise <code>false</code>.
|
|
1090
|
+
* @throws ArgumentError The <code>fontStyle</code> specified is not a member
|
|
1091
|
+
* of <code>flash.text.FontStyle</code>.
|
|
1092
|
+
*/
|
|
1093
|
+
static isFontCompatible(fontName: string, fontStyle: string): boolean;
|
|
1094
|
+
onKeyDelegate: (e: any) => void;
|
|
1095
|
+
onKey(e: any): void;
|
|
1096
|
+
addCharCode(charCode: number): void;
|
|
1097
|
+
private deleteSelectedText;
|
|
1098
|
+
addChar(char: string, isShift?: boolean, isCTRL?: boolean, isAlt?: boolean): void;
|
|
1099
|
+
private _insertNewText;
|
|
1100
|
+
clone(): TextField;
|
|
1101
|
+
copyTo(newInstance: TextField): void;
|
|
1102
|
+
private _clearTextShapes;
|
|
1103
|
+
}
|
|
1104
|
+
export {};
|
|
1105
1105
|
//# sourceMappingURL=TextField.d.ts.map
|