Package | flashx.textLayout.compose |
Class | public class FlowComposerBase |
Inheritance | FlowComposerBase Object |
Implements | ITextLineCreator |
Subclasses | StandardFlowComposer |
Language Version: | ActionScript 3.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
FlowComposerBase is a utility class that implements methods and properties that are common to several types of flow composer. Application code would not typically instantiate or use this class (unless extending it to create a custom flow composer).
See also
Property | Defined By | ||
---|---|---|---|
constructor : Object
A reference to the class object or constructor function for a given object instance. | Object | ||
damageAbsoluteStart : int [read-only]
The absolute position immediately preceding the first element in the text
flow that requires composition and updating. | FlowComposerBase | ||
numLines : int [read-only]
The total number of lines in the flow. | FlowComposerBase | ||
prototype : Object [static]
A reference to the prototype object of a class or function object. | Object | ||
textFlow : flashx.textLayout.elements:TextFlow [read-only]
The TextFlow object to which this flow composer is attached. | FlowComposerBase | ||
textLineCreator : flashx.textLayout.compose:ITextLineCreator
The ITextLineCreator instance used to create lines of text. | FlowComposerBase |
Method | Defined By | ||
---|---|---|---|
Constructor. | FlowComposerBase | ||
createTextLine(textBlock:flash.text.engine:TextBlock, previousLine:flash.text.engine:TextLine = null, width:Number = 1000000, lineOffset:Number = 0.0, fitSomething:Boolean = false):flash.text.engine:TextLine
Called by the Text Layout Framework when a text line is created. | FlowComposerBase | ||
Mark lines as damaged and needing a recompose. | FlowComposerBase | ||
findLineAtPosition(absolutePosition:int, preferPrevious:Boolean = false):flashx.textLayout.compose:TextFlowLine
Returns the TextFlowLine object containing the content at the specified position. | FlowComposerBase | ||
Returns the sequential line number of the TextFlowLine object that contains the content at the specified position. | FlowComposerBase | ||
Returns the line with the specified line number. | FlowComposerBase | ||
Indicates whether an object has a specified property defined. | Object | ||
Indicates whether any TextFlowLine objects between the beginning of the flow and the line containing the content at
the specified position are marked as damaged. | FlowComposerBase | ||
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 | ||
recreateTextLine(textBlock:flash.text.engine:TextBlock, textLine:flash.text.engine:TextLine, previousLine:flash.text.engine:TextLine = null, width:Number = 1000000, lineOffset:Number = 0.0, fitSomething:Boolean = false):flash.text.engine:TextLine
Called by the Text Layout Framework when a text line is recreated. | FlowComposerBase | ||
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 | ||
Update the lengths in the lines to maintain mapping to the TextFlow. | FlowComposerBase | ||
Returns the primitive value of the specified object. | Object |
damageAbsoluteStart | property |
damageAbsoluteStart:int
[read-only] Language Version: | ActionScript 3.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
The absolute position immediately preceding the first element in the text flow that requires composition and updating.
public function get damageAbsoluteStart():int
numLines | property |
numLines:int
[read-only] Language Version: | ActionScript 3.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
The total number of lines in the flow.
public function get numLines():int
textFlow | property |
textFlow:flashx.textLayout.elements:TextFlow
[read-only] Language Version: | ActionScript 3.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
The TextFlow object to which this flow composer is attached.
public function get textFlow():flashx.textLayout.elements:TextFlow
See also
textLineCreator | property |
textLineCreator:flashx.textLayout.compose:ITextLineCreator
Language Version: | ActionScript 3.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
The ITextLineCreator instance used to create lines of text.
By default, the ITextLineCreator implementation is this FlowComposerBase object. Applications can provide a custom implementation to use fonts embedded in a different SWF file or to cache and reuse text lines.
public function get textLineCreator():flashx.textLayout.compose:ITextLineCreator
public function set textLineCreator(value:flashx.textLayout.compose:ITextLineCreator):void
See also
FlowComposerBase | () | Constructor |
public function FlowComposerBase()
Language Version: | ActionScript 3.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Constructor.
createTextLine | () | method |
public function createTextLine(textBlock:flash.text.engine:TextBlock, previousLine:flash.text.engine:TextLine = null, width:Number = 1000000, lineOffset:Number = 0.0, fitSomething:Boolean = false):flash.text.engine:TextLine
Language Version: | ActionScript 3.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Called by the Text Layout Framework when a text line is created.
This method is part of the default ITextLineCreator implementation.
Application code does not typically call this function. To provide custom functionality,
implement the ITextLineCreator interface and assign an instance of your implementation to
the textLineCreator
property.
Parameters
textBlock:flash.text.engine:TextBlock | |
previousLine:flash.text.engine:TextLine (default = null )
| |
width:Number (default = 1000000 )
| |
lineOffset:Number (default = 0.0 )
| |
fitSomething:Boolean (default = false )
|
flash.text.engine:TextLine |
See also
damage | () | method |
public function damage(startPosition:int, damageLength:int, damageType:String):void
Language Version: | ActionScript 3.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Mark lines as damaged and needing a recompose.
Parameters
startPosition:int — beginning of range to damage
| |
damageLength:int — number of characters to damage
| |
damageType:String — type of damage. One of flashx.textLayout.compose.FlowDamageType
|
findLineAtPosition | () | method |
public function findLineAtPosition(absolutePosition:int, preferPrevious:Boolean = false):flashx.textLayout.compose:TextFlowLine
Language Version: | ActionScript 3.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Returns the TextFlowLine object containing the content at the specified position.
A position can be considered to be the division between two characters or other elements of a text flow. If
the value in absolutePosition
is a position between the last element of one
line and the first element of the next, then the preceding line is returned if
the preferPrevious
parameter is set to true
and the later line is returned if
the preferPrevious
parameter is set to false
.
Parameters
absolutePosition:int — The position of the content for which you want the TextFlowLine object.
| |
preferPrevious:Boolean (default = false ) — Specifies which line to return when the position is between the last element of
one line and the first element of the next.
|
flashx.textLayout.compose:TextFlowLine — the TextFlowLine containing the content at the specified position, or null if not found.
|
findLineIndexAtPosition | () | method |
public function findLineIndexAtPosition(absolutePosition:int, preferPrevious:Boolean = false):int
Language Version: | ActionScript 3.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Returns the sequential line number of the TextFlowLine object that contains the content at the specified position.
The number of the first line is 0 and the number of the last line is equal to the number of lines minus one.
If the position specified in absolutePosition
is past the end of the text flow, this method must return
the number that will be assigned to the next new line added to the text flow (which is equal to the number of current lines).
A position can be considered to be the division between two characters or other elements of a text flow. If
the value in absolutePosition
is a position between the last line of one
container and the first line of the next, then the preceding container is returned if
the preferPrevious
parameter is set to true
and the later container is returned if
the preferPrevious
parameter is set to false
.
Parameters
absolutePosition:int — The position of the content for which you want the text line.
| |
preferPrevious:Boolean (default = false ) — Specifies which container index to return when the position is between the last line in
one container and the first line in the next.
|
int — the index of the text line at the specified position. If not found, treats as past the end and returns the
number of lines.
|
getLineAt | () | method |
public function getLineAt(index:int):flashx.textLayout.compose:TextFlowLine
Language Version: | ActionScript 3.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Returns the line with the specified line number.
The list of lines is numbered from zero to the number of lines minus one. If the value in index
is outside the bounds of the list of lines, then this function returns null
.
Parameters
index:int — The line number of the TextFlowLine object to return.
|
flashx.textLayout.compose:TextFlowLine — the TextFlowLine with the specified line number, or null , if not found.
|
isDamaged | () | method |
public function isDamaged(absolutePosition:int):Boolean
Language Version: | ActionScript 3.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Indicates whether any TextFlowLine objects between the beginning of the flow and the line containing the content at the specified position are marked as damaged.
Parameters
absolutePosition:int — the last position in the area of interest
|
Boolean — true if any of the TextFlowLine objects from the start of the flow up to the line containing the content at
absolutePosition are marked as damaged.
|
recreateTextLine | () | method |
public function recreateTextLine(textBlock:flash.text.engine:TextBlock, textLine:flash.text.engine:TextLine, previousLine:flash.text.engine:TextLine = null, width:Number = 1000000, lineOffset:Number = 0.0, fitSomething:Boolean = false):flash.text.engine:TextLine
Language Version: | ActionScript 3.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Called by the Text Layout Framework when a text line is recreated.
This method is part of the default ITextLineCreator implementation.
Application code does not typically call this function. To provide custom functionality,
implement the ITextLineCreator interface and assign an instance of your implementation to
the textLineCreator
property.
Parameters
textBlock:flash.text.engine:TextBlock | |
textLine:flash.text.engine:TextLine | |
previousLine:flash.text.engine:TextLine (default = null )
| |
width:Number (default = 1000000 )
| |
lineOffset:Number (default = 0.0 )
| |
fitSomething:Boolean (default = false )
|
flash.text.engine:TextLine |
See also
updateLengths | () | method |
public function updateLengths(startPosition:int, deltaLength:int):void
Language Version: | ActionScript 3.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Update the lengths in the lines to maintain mapping to the TextFlow.
Parameters
startPosition:int — beginning of change in length
| |
deltaLength:int — change in number of characters.
|