| Language Version : | ActionScript 3.0 |
| Runtime Versions : | Flash Player 10.1, AIR 1.5 |
Interface for IME (input method editor) clients. Components based on the flash.text.engine package must implement
this interface to support editing text inline using an IME. This interface is not used with TextField objects.
TextLayoutFramework (TLF) uses this interface to support inline IME, so clients using TLF do not need to implement this
interface.
To support inline IME, set the imeClient property of an ImeEvent.IME_START_COMPOSITION event to
an object which implements this interface.
compositionEndIndex:int [read-only]
| Language Version : | ActionScript 3.0 |
| Runtime Versions : | AIR 1.0, Flash Player 10.1 |
The zero-based character index value of the end of the current edit session text (i.e.
all text in the inline session that is still not yet confirmed to the document).
Implementation public function get compositionEndIndex():intcompositionStartIndex:int [read-only]
| Language Version : | ActionScript 3.0 |
| Runtime Versions : | AIR 1.0, Flash Player 10.1 |
The zero-based character index value of the start of the current edit session text (i.e.
all text in the inline session that is still not yet confirmed to the document).
Implementation public function get compositionStartIndex():intselectionActiveIndex:int [read-only]
| Language Version : | ActionScript 3.0 |
| Runtime Versions : | AIR 1.0, Flash Player 10.1 |
The zero-based character index value of the last character in the current selection.
Implementation public function get selectionActiveIndex():intselectionAnchorIndex:int [read-only]
| Language Version : | ActionScript 3.0 |
| Runtime Versions : | AIR 1.0, Flash Player 10.1 |
The zero-based character index value of the first character in the current selection.
Implementation public function get selectionAnchorIndex():intverticalTextLayout:Boolean [read-only]
| Language Version : | ActionScript 3.0 |
| Runtime Versions : | AIR 1.0, Flash Player 10.1 |
Indicates whether the text in the component is vertical or not. This will affect the positioning
of the candidate window (beside vertical text, below horizontal text).
Implementation public function get verticalTextLayout():Boolean public function confirmComposition(text:String = null, preserveSelection:Boolean = false):void| Language Version : | ActionScript 3.0 |
| Runtime Versions : | AIR 1.0, Flash Player 10.1 |
Use this callback to end the inline editing session and confirm the text.
Parameters
| text:String (default = null) — the final state of the text in the inline session (the text that got confirmed).
|
| |
| preserveSelection:Boolean (default = false) — when true, you should not reset the current selection to the end of the confirmed text.
|
public function getTextBounds(startIndex:int, endIndex:int):Rectangle| Language Version : | ActionScript 3.0 |
| Runtime Versions : | AIR 1.0, Flash Player 10.1 |
This callback is used by the IME to query the bounding box of the text being edited with the IME client.
Use this method to place the candidate window and set the mouse cursor in the IME client when the mouse is over the
text field or other component that supports IME.
Parameters
| startIndex:int — an integer that specifies the starting location of the range of text for which you need to measure the bounding box.
|
| |
| endIndex:int — Optional; an integer that specifies the ending location of the range of text for which you need to measure the bounding box.
|
Returns | Rectangle — the bounding box of the specified range of text, or null if either or both of the indexes are invalid.
The same value should be returned independant of whether startIndex is greater or less than endIndex.
|
public function getTextInRange(startIndex:int, endIndex:int):String| Language Version : | ActionScript 3.0 |
| Runtime Versions : | AIR 1.0, Flash Player 10.1 |
Gets the specified range of text from the component. This method is called during IME reconversion.
Parameters
| startIndex:int — an integer that specifies the starting location of the range of text to be retrieved.
|
| |
| endIndex:int — an integer that specifies the ending location of the range of text to be retrieved.
|
Returns | String — The requested text, or null if no text is available in the requested range
or if either or both of the indexes are invalid. The same value should be returned
independant of whether startIndex is greater or less than endIndex.
|
public function selectRange(anchorIndex:int, activeIndex:int):void| Language Version : | ActionScript 3.0 |
| Runtime Versions : | AIR 1.0, Flash Player 10.1 |
Sets the range of selected text in the component.
If either of the arguments is out of bounds the selection should not be changed.
Parameters
| anchorIndex:int — The zero-based index value of the character at the anchor end of the selection
|
| |
| activeIndex:int — The zero-based index value of the character at the active end of the selection.
|
public function updateComposition(text:String, attributes:Vector.<CompositionAttributeRange>, compositionStartIndex:int, compositionEndIndex:int):void| Language Version : | ActionScript 3.0 |
| Runtime Versions : | AIR 1.0, Flash Player 10.1 |
Callback for updating the contents of the inline editing session.
This gets called whenever the text being edited with the IME has changed
and its contents are used by the client to redraw the entire inline edit session.
Parameters
| text:String — contains the text of the inline edit session from the IME
|
| |
| attributes:Vector.<CompositionAttributeRange> — contains an array of composition clauses with adornment info
|
| |
| compositionStartIndex:int — start of the inline session relative to the start of the text object
|
| |
| compositionEndIndex:int — end of the inline session relative to the start of the text object
|
Event Object Type: flash.IMEEvent.IME_START_COMPOSITIONIME_START_COMPOSITION.type property = flash.events.IMEEvent.IME_START_COMPOSITION| Language Version : | ActionScript 3.0 |
| Runtime Versions : | Flash Player 10, AIR 1.5 |
Dispatched when the user begins to use an IME (input method editor).
Event Object Type: flash.TextEvent.TEXT_INPUTTEXT_INPUT.type property = flash.events.TextEvent.TEXT_INPUT| Language Version : | ActionScript 3.0 |
| Runtime Versions : | Flash Player 10, AIR 1.5 |
Dispatched when the user enters text. For IME (input method editor) clients, the receiver should
insert the string contained in the event object's text property at the current insertion point.
Mon Dec 24 2012, 01:18 PM +11:00