Package | flashx.textLayout.edit |
Class | public class SelectionState |
Inheritance | SelectionState TextRange Object |
Language Version: | ActionScript 3.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
A selection range has an anchor point, representing the point at which the selection of text began, and an active point, representing the point to which the selection is extended. The active point can be before or after the anchor point in the text. If a selection is modified (for example, by a user shift-clicking with the mouse), the active point changes while the anchor point always remains in the same position.
Related API Elements
flashx.textLayout.elements.TextFlow
flashx.textLayout.elements.TextRange
Property | Defined By | ||
---|---|---|---|
absoluteEnd : int End of the selection, as an absolute position in the TextFlow. | TextRange | ||
absoluteStart : int Start of the selection, as an absolute position in the TextFlow. | TextRange | ||
activePosition : int Active position of the selection, as an absolute position in the TextFlow. | TextRange | ||
anchorPosition : int Anchor position of the selection, as an absolute position in the TextFlow. | TextRange | ||
constructor : Object
A reference to the class object or constructor function for a given object instance. | Object | ||
pointFormat : flashx.textLayout.formats:ITextLayoutFormat
The format attributes applied to inserted text. | SelectionState | ||
prototype : Object [static]
A reference to the prototype object of a class or function object. | Object | ||
textFlow : flashx.textLayout.elements:TextFlow Returns the TextFlow associated with the selection. | TextRange |
Method | Defined By | ||
---|---|---|---|
SelectionState(root:flashx.textLayout.elements:TextFlow, anchorPosition:int, activePosition:int, format:flashx.textLayout.formats:ITextLayoutFormat = null)
Creates a SelectionState object. | SelectionState | ||
Indicates whether an object has a specified property defined. | Object | ||
Indicates whether an instance of the Object class is in the prototype chain of the object specified
as the parameter. | Object | ||
Indicates whether the specified property exists and is enumerable. | Object | ||
Sets the availability of a dynamic property for loop operations. | Object | ||
Returns the string representation of this object, formatted according to locale-specific conventions. | Object | ||
Returns the string representation of the specified object. | Object | ||
[override]
Updates the selection range with new anchor or active position values. | SelectionState | ||
Returns the primitive value of the specified object. | Object |
pointFormat | property |
pointFormat:flashx.textLayout.formats:ITextLayoutFormat
Language Version: | ActionScript 3.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
The format attributes applied to inserted text.
Note: The pointFormat
object does not include inherited styles. To
get all the applicable style definitions, use the getCommonCharacterFormat()
method of the ISelectionManager class.
Implementation
public function get pointFormat():flashx.textLayout.formats:ITextLayoutFormat
public function set pointFormat(value:flashx.textLayout.formats:ITextLayoutFormat):void
Related API Elements
SelectionState | () | Constructor |
public function SelectionState(root:flashx.textLayout.elements:TextFlow, anchorPosition:int, activePosition:int, format:flashx.textLayout.formats:ITextLayoutFormat = null)
Language Version: | ActionScript 3.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Creates a SelectionState object.
Note: Do not construct a SelectionState object in order to create a selection. To
create a selection in a text flow, call the setSelection()
method of the relevant
ISelectionManager instance (which is the SelectionManager or EditManager object assigned
to the interactionManager
property of the text flow).
root:flashx.textLayout.elements:TextFlow — The TextFlow associated with the selection.
| |
anchorPosition:int — The anchor index of the selection.
| |
activePosition:int — The active index of the selection.
| |
format:flashx.textLayout.formats:ITextLayoutFormat (default = null ) — The TextLayoutFormat to be applied on next character typed when a point selection
|
Related API Elements
updateRange | () | method |
override public function updateRange(newAnchorPosition:int, newActivePosition:int):Boolean
Updates the selection range with new anchor or active position values.
The pointFormat
styles are cleared if the selection is changed.
Parameters
newAnchorPosition:int — the anchor index of the selection.
| |
newActivePosition:int — the active index of the selection.
|
Boolean — true if selection is changed
|
Mon Nov 28 2011, 06:48 AM -08:00