Packageflashx.textLayout.compose
Classpublic class BaseCompose
InheritanceBaseCompose Inheritance Object

Common composer base class



Public Properties
 PropertyDefined By
  globalSWFContext : ISWFContext
[static] [read-only]
BaseCompose
  parcelList : ParcelList
[read-only] List of areas we're composing into, matches the container's bounding box
BaseCompose
  startController : ContainerController
[read-only] Starting controller for skipping ahead
BaseCompose
  swfContext : ISWFContext
[read-only]
BaseCompose
Protected Properties
 PropertyDefined By
  _accumulatedMinimumStart : Number
Minimum starting coord for parcel bounds
BaseCompose
  _atColumnStart : Boolean
Are we at the top of the column?
BaseCompose
  _blockProgression : String
BlockProgression - vertical horizontal etc.
BaseCompose
  _contentCommittedExtent : Number
Commited extent any lines needing additional alignment must update this number
BaseCompose
  _contentCommittedHeight : Number
Committed logical height from floats
BaseCompose
  _contentLogicalExtent : Number
Maximum horizontal extension from left/right edge of the parcel.
BaseCompose
  _controllerVisibleBoundsHeightTW : int
BaseCompose
  _controllerVisibleBoundsWidthTW : int
BaseCompose
  _controllerVisibleBoundsXTW : int
Visible area of the current controller.
BaseCompose
  _controllerVisibleBoundsYTW : int
BaseCompose
  _curElement : FlowLeafElement
Element of current location
BaseCompose
  _curElementOffset : int
Offset from element start to current location
BaseCompose
  _curElementStart : int
Absolute start position of _curElement
BaseCompose
  _curInteractiveObjects : Dictionary = null
For interactive objects
BaseCompose
  _curLine : TextFlowLine
BaseCompose
  _curLineStart : int
Absolute start position of the current line
BaseCompose
  _curParaElement : ParagraphElement
ParagraphElement that contains the current location
BaseCompose
  _curParaFormat : ITextLayoutFormat
BaseCompose
  _curParaStart : int
Absolute start position of _curParaElement
BaseCompose
  _curParcel : Parcel
Parcel we are composing - used for keeping track of when it changes b/c parcelList.parcel may have advanced
BaseCompose
  _curParcelStart : int
Start position of _curParcel
BaseCompose
  _floatSlug : Slug
[static]
BaseCompose
  _flowComposer : IFlowComposer
flowComposer of current compose
BaseCompose
  _forceILGs : Boolean
BaseCompose
  _lastGoodStart : int
BaseCompose
  _lastLineDescent : Number
effective descent of the last line.
BaseCompose
  _lastLineLeading : Number
leading factor calculated for the line composed last.
BaseCompose
  _lastLineLeadingModel : String
leading model for the last line's para
BaseCompose
  _linePass : int
BaseCompose
  _lineSlug : Slug
BaseCompose
  _listItemElement : ListItemElement
BaseCompose
  _measuring : Boolean
Are we measuring
BaseCompose
  _paragraphContainsVisibleLines : Boolean
BaseCompose
  _paragraphSpaceCarried : Number
Amount of spaceAfter added to the previous line (used in calculating effective paragraphSpaceBefore/paragraphSpaceAfter
BaseCompose
  _parcelBottom : Number
Maximum bottom edge coordinate across all the parcels in a controller
BaseCompose
  _parcelLeft : Number
Minimum left edge coordinate across all the parcels in a controller
BaseCompose
  _parcelList : ParcelList
BaseCompose
  _parcelLogicalTop : Number
Minimum starting coord for parcel bounds
BaseCompose
  _parcelRight : Number
Maximum right edge coordinate across all the parcels in a controller
BaseCompose
  _parcelTop : Number
Minimum top edge across all the parcels in a controller
BaseCompose
  _previousLine : TextLine
BaseCompose
  _pushInFloats : Array
BaseCompose
  releaseLineCreationData : Boolean
[read-only] Release line creation data during this compose
BaseCompose
  _rootElement : ContainerFormattedElement
rootElement of current compose
BaseCompose
  _savedLineSlug : Slug
[static]
BaseCompose
  _startComposePosition : int
Beginning composition position.
BaseCompose
  _startController : ContainerController
First damaged controller to begin composing
BaseCompose
  _stopComposePos : int
position to stop composing at
BaseCompose
  _textFlow : TextFlow
owning textFlow of current compose
BaseCompose
  _textIndent : Number
Current textIndent amount, 0 if line is not the first
BaseCompose
  _verticalSpaceCarried : Number
Amount of vertical space added to the previous element (used in calculating vertical space collapse)
BaseCompose
  _workingContentExtent : Number
BaseCompose
  _workingContentHeight : Number
BaseCompose
  _workingContentLogicalExtent : Number
Maximum horizontal extension for the current line from left/right edge of the parcel.
BaseCompose
  _workingParcelIndex : int
BaseCompose
  _workingParcelLogicalTop : Number
logical top of the parcel, for the line in progress
BaseCompose
  _workingTotalDepth : Number
BaseCompose
Public Methods
 MethodDefined By
  
composeTextFlow(textFlow:TextFlow, composeToPosition:int, controllerEndIndex:int):int
Compose the flow into the text container.
BaseCompose
Protected Methods
 MethodDefined By
  
Go to next container
BaseCompose
  
BaseCompose
  
applyVerticalAlignmentToColumn(controller:ContainerController, vjType:String, lines:Array, beginIndex:int, numLines:int, beginFloatIndex:int, endFloatIndex:int):void
apply vj and adjust the parcel bounds
BaseCompose
  
calculateLeadingParameters(curElement:FlowLeafElement, curElementStart:int, numberLine:TextLine = null):Number
BaseCompose
  
BaseCompose
  
composeFloat(elem:InlineGraphicElement, afterLine:Boolean):Boolean
BaseCompose
  
composeInlineGraphicElement(inlineGraphic:InlineGraphicElement, textLine:TextLine):Boolean
BaseCompose
  
composeInternal(composeRoot:FlowGroupElement, absStart:int):void
BaseCompose
  
composeNextLine():TextLine
BaseCompose
  
Compose the lines in the paragraph.
BaseCompose
  
createParcelList():ParcelList
BaseCompose
  
doVerticalAlignment(canVerticalAlign:Boolean, nextParcel:Parcel):void
BaseCompose
  
endLine(textLine:TextLine):void
Called when we are finished composing a line, and it is committed.
BaseCompose
  
Called when we are finished composing a line, and it is committed.
BaseCompose
  
BaseCompose
  
finishComposeLine(curTextLine:TextLine, numberLine:TextLine):void
BaseCompose
  
BaseCompose
  
finishParcel(controller:ContainerController, nextParcel:Parcel):Boolean
BaseCompose
  
fitLineToParcel(textLine:TextLine, isNewLine:Boolean, numberLine:TextLine):Boolean
BaseCompose
  
BaseCompose
  
initializeForComposer(composer:IFlowComposer, composeToPosition:int, controllerStartIndex:int, controllerEndIndex:int):void
Initialize for a composition that will compose up through the controllerEndIndex, or all the way to the end of the flow
BaseCompose
  
isLineVisible(textLine:TextLine):Boolean
BaseCompose
  
parcelHasChanged(newParcel:Parcel):void
This is called when the parcel has changed
BaseCompose
  
popInsideListItemMargins(numberLine:TextLine):void
BaseCompose
  
preProcessILGs(startPos:int):Boolean
BaseCompose
  
processFloatsAtLineEnd(textLine:TextLine):Boolean
BaseCompose
  
BaseCompose
  
processInlinesAtLineEnd(textLine:TextLine):void
BaseCompose
  
pushInsideListItemMargins(numberLine:TextLine):void
BaseCompose
  
releaseParcelList(list:ParcelList):void
BaseCompose
  
resetLine(textLine:TextLine):void
BaseCompose
  
startLine():void
Called when we are about to compose a line.
BaseCompose
Property Detail
_accumulatedMinimumStartproperty
protected var _accumulatedMinimumStart:Number

Minimum starting coord for parcel bounds

_atColumnStartproperty 
protected var _atColumnStart:Boolean

Are we at the top of the column?

_blockProgressionproperty 
protected var _blockProgression:String

BlockProgression - vertical horizontal etc.

See also

text.formats.BlockProgression
_contentCommittedExtentproperty 
protected var _contentCommittedExtent:Number

Commited extent any lines needing additional alignment must update this number

_contentCommittedHeightproperty 
protected var _contentCommittedHeight:Number

Committed logical height from floats

_contentLogicalExtentproperty 
protected var _contentLogicalExtent:Number

Maximum horizontal extension from left/right edge of the parcel. Alignment width for the parcel when measuring.

_controllerVisibleBoundsHeightTWproperty 
protected var _controllerVisibleBoundsHeightTW:int

_controllerVisibleBoundsWidthTWproperty 
protected var _controllerVisibleBoundsWidthTW:int

_controllerVisibleBoundsXTWproperty 
protected var _controllerVisibleBoundsXTW:int

Visible area of the current controller. Used to determine which lines are going to be in view.

_controllerVisibleBoundsYTWproperty 
protected var _controllerVisibleBoundsYTW:int

_curElementproperty 
protected var _curElement:FlowLeafElement

Element of current location

_curElementOffsetproperty 
protected var _curElementOffset:int

Offset from element start to current location

_curElementStartproperty 
protected var _curElementStart:int

Absolute start position of _curElement

_curInteractiveObjectsproperty 
protected var _curInteractiveObjects:Dictionary = null

For interactive objects

_curLineproperty 
protected var _curLine:TextFlowLine

_curLineStartproperty 
protected var _curLineStart:int

Absolute start position of the current line

_curParaElementproperty 
protected var _curParaElement:ParagraphElement

ParagraphElement that contains the current location

_curParaFormatproperty 
protected var _curParaFormat:ITextLayoutFormat

_curParaStartproperty 
protected var _curParaStart:int

Absolute start position of _curParaElement

_curParcelproperty 
protected var _curParcel:Parcel

Parcel we are composing - used for keeping track of when it changes b/c parcelList.parcel may have advanced

_curParcelStartproperty 
protected var _curParcelStart:int

Start position of _curParcel

_floatSlugproperty 
protected static var _floatSlug:Slug

_flowComposerproperty 
protected var _flowComposer:IFlowComposer

flowComposer of current compose

_forceILGsproperty 
protected var _forceILGs:Boolean

_lastGoodStartproperty 
protected var _lastGoodStart:int

_lastLineDescentproperty 
protected var _lastLineDescent:Number

effective descent of the last line. This is the distance between a line's Roman baseline and its Descent baseline (for leading models other than LeadingModel.BOX) or the bottom of its CSS line box (for LeadingModel.BOX)

_lastLineLeadingproperty 
protected var _lastLineLeading:Number

leading factor calculated for the line composed last. The factor has different meanings for different leading models.

_lastLineLeadingModelproperty 
protected var _lastLineLeadingModel:String

leading model for the last line's para

_linePassproperty 
protected var _linePass:int

_lineSlugproperty 
protected var _lineSlug:Slug

_listItemElementproperty 
protected var _listItemElement:ListItemElement

_measuringproperty 
protected var _measuring:Boolean

Are we measuring

_paragraphContainsVisibleLinesproperty 
protected var _paragraphContainsVisibleLines:Boolean

_paragraphSpaceCarriedproperty 
protected var _paragraphSpaceCarried:Number

Amount of spaceAfter added to the previous line (used in calculating effective paragraphSpaceBefore/paragraphSpaceAfter

_parcelBottomproperty 
protected var _parcelBottom:Number

Maximum bottom edge coordinate across all the parcels in a controller

_parcelLeftproperty 
protected var _parcelLeft:Number

Minimum left edge coordinate across all the parcels in a controller

_parcelListproperty 
protected var _parcelList:ParcelList

_parcelLogicalTopproperty 
protected var _parcelLogicalTop:Number

Minimum starting coord for parcel bounds

_parcelRightproperty 
protected var _parcelRight:Number

Maximum right edge coordinate across all the parcels in a controller

_parcelTopproperty 
protected var _parcelTop:Number

Minimum top edge across all the parcels in a controller

_previousLineproperty 
protected var _previousLine:TextLine

_pushInFloatsproperty 
protected var _pushInFloats:Array

_rootElementproperty 
protected var _rootElement:ContainerFormattedElement

rootElement of current compose

_savedLineSlugproperty 
protected static var _savedLineSlug:Slug

_startComposePositionproperty 
protected var _startComposePosition:int

Beginning composition position. Note this gets cleared once its been passed

_startControllerproperty 
protected var _startController:ContainerController

First damaged controller to begin composing

_stopComposePosproperty 
protected var _stopComposePos:int

position to stop composing at

_textFlowproperty 
protected var _textFlow:TextFlow

owning textFlow of current compose

_textIndentproperty 
protected var _textIndent:Number

Current textIndent amount, 0 if line is not the first

_verticalSpaceCarriedproperty 
protected var _verticalSpaceCarried:Number

Amount of vertical space added to the previous element (used in calculating vertical space collapse)

_workingContentExtentproperty 
protected var _workingContentExtent:Number

_workingContentHeightproperty 
protected var _workingContentHeight:Number

_workingContentLogicalExtentproperty 
protected var _workingContentLogicalExtent:Number

Maximum horizontal extension for the current line from left/right edge of the parcel.

_workingParcelIndexproperty 
protected var _workingParcelIndex:int

_workingParcelLogicalTopproperty 
protected var _workingParcelLogicalTop:Number

logical top of the parcel, for the line in progress

_workingTotalDepthproperty 
protected var _workingTotalDepth:Number

globalSWFContextproperty 
globalSWFContext:ISWFContext  [read-only]


Implementation
    public static function get globalSWFContext():ISWFContext
parcelListproperty 
parcelList:ParcelList  [read-only]

List of areas we're composing into, matches the container's bounding box


Implementation
    public function get parcelList():ParcelList
releaseLineCreationDataproperty 
releaseLineCreationData:Boolean  [read-only]

Release line creation data during this compose


Implementation
    protected function get releaseLineCreationData():Boolean
startControllerproperty 
startController:ContainerController  [read-only]

Starting controller for skipping ahead


Implementation
    public function get startController():ContainerController
swfContextproperty 
swfContext:ISWFContext  [read-only]


Implementation
    public function get swfContext():ISWFContext
Method Detail
advanceToNextContainer()method
protected function advanceToNextContainer():void

Go to next container

advanceToNextParcel()method 
protected function advanceToNextParcel():void

applyVerticalAlignmentToColumn()method 
protected function applyVerticalAlignmentToColumn(controller:ContainerController, vjType:String, lines:Array, beginIndex:int, numLines:int, beginFloatIndex:int, endFloatIndex:int):void

apply vj and adjust the parcel bounds

Parameters

controller:ContainerController
 
vjType:String
 
lines:Array
 
beginIndex:int
 
numLines:int
 
beginFloatIndex:int
 
endFloatIndex:int

calculateLeadingParameters()method 
protected function calculateLeadingParameters(curElement:FlowLeafElement, curElementStart:int, numberLine:TextLine = null):Number

Parameters

curElement:FlowLeafElement
 
curElementStart:int
 
numberLine:TextLine (default = null)

Returns
Number
commitLastLineState()method 
protected function commitLastLineState(curLine:TextFlowLine):void

Parameters

curLine:TextFlowLine

composeFloat()method 
protected function composeFloat(elem:InlineGraphicElement, afterLine:Boolean):Boolean

Parameters

elem:InlineGraphicElement
 
afterLine:Boolean

Returns
Boolean
composeInlineGraphicElement()method 
protected function composeInlineGraphicElement(inlineGraphic:InlineGraphicElement, textLine:TextLine):Boolean

Parameters

inlineGraphic:InlineGraphicElement
 
textLine:TextLine

Returns
Boolean
composeInternal()method 
protected function composeInternal(composeRoot:FlowGroupElement, absStart:int):void

Parameters

composeRoot:FlowGroupElement
 
absStart:int

composeNextLine()method 
protected function composeNextLine():TextLine

Returns
TextLine
composeParagraphElementIntoLines()method 
protected function composeParagraphElementIntoLines():Boolean

Compose the lines in the paragraph. Updates the _paragraphContainsVisibleLines flag if the paragraph contains at least one visible line. Returns true if composition should continue, false if all space is used and composition should stop.

Returns
Boolean
composeTextFlow()method 
public function composeTextFlow(textFlow:TextFlow, composeToPosition:int, controllerEndIndex:int):int

Compose the flow into the text container. Starts at the root element, and composes elements until either there are no more elements, or the text container is full. It will compose only the lines which are marked invalid, so that existing lines that are unchanged are not recomposed.

Parameters

textFlow:TextFlow
 
composeToPosition:int
 
controllerEndIndex:int

Returns
int
createParcelList()method 
protected function createParcelList():ParcelList

Returns
ParcelList
doVerticalAlignment()method 
protected function doVerticalAlignment(canVerticalAlign:Boolean, nextParcel:Parcel):void

Parameters

canVerticalAlign:Boolean
 
nextParcel:Parcel

endLine()method 
protected function endLine(textLine:TextLine):void

Called when we are finished composing a line, and it is committed. Handler for derived classes to override default behavior.

Parameters

textLine:TextLine

endTableBlock()method 
protected function endTableBlock(block:TextFlowTableBlock):void

Called when we are finished composing a line, and it is committed. Handler for derived classes to override default behavior.

Parameters

block:TextFlowTableBlock

finalParcelAdjustment()method 
protected function finalParcelAdjustment(controller:ContainerController):void

Parameters

controller:ContainerController

finishComposeLine()method 
protected function finishComposeLine(curTextLine:TextLine, numberLine:TextLine):void

Parameters

curTextLine:TextLine
 
numberLine:TextLine

finishController()method 
protected function finishController(controller:ContainerController):void

Parameters

controller:ContainerController

finishParcel()method 
protected function finishParcel(controller:ContainerController, nextParcel:Parcel):Boolean

Parameters

controller:ContainerController
 
nextParcel:Parcel

Returns
Boolean
fitLineToParcel()method 
protected function fitLineToParcel(textLine:TextLine, isNewLine:Boolean, numberLine:TextLine):Boolean

Parameters

textLine:TextLine
 
isNewLine:Boolean
 
numberLine:TextLine

Returns
Boolean
getFirstIndentCharPos()method 
protected function getFirstIndentCharPos(paragraph:ParagraphElement):int

Parameters

paragraph:ParagraphElement

Returns
int
initializeForComposer()method 
protected function initializeForComposer(composer:IFlowComposer, composeToPosition:int, controllerStartIndex:int, controllerEndIndex:int):void

Initialize for a composition that will compose up through the controllerEndIndex, or all the way to the end of the flow

Parameters

composer:IFlowComposer
 
composeToPosition:int — -1 means not specified. 0 means request to compose nothing, >0 specifies a position to force compose to
 
controllerStartIndex:int — index of the first controller to compose for, derived class allows -1 for default
 
controllerEndIndex:int — index of the last controller to compose for, or -1 to compose through all controllers

isLineVisible()method 
protected function isLineVisible(textLine:TextLine):Boolean

Parameters

textLine:TextLine

Returns
Boolean
parcelHasChanged()method 
protected function parcelHasChanged(newParcel:Parcel):void

This is called when the parcel has changed

Parameters

newParcel:Parcel — - the parcel we had before (you can get the new parcel from the parcel list)

popInsideListItemMargins()method 
protected function popInsideListItemMargins(numberLine:TextLine):void

Parameters

numberLine:TextLine

preProcessILGs()method 
protected function preProcessILGs(startPos:int):Boolean

Parameters

startPos:int

Returns
Boolean
processFloatsAtLineEnd()method 
protected function processFloatsAtLineEnd(textLine:TextLine):Boolean

Parameters

textLine:TextLine

Returns
Boolean
processFloatsAtLineStart()method 
protected function processFloatsAtLineStart():void

processInlinesAtLineEnd()method 
protected function processInlinesAtLineEnd(textLine:TextLine):void

Parameters

textLine:TextLine

pushInsideListItemMargins()method 
protected function pushInsideListItemMargins(numberLine:TextLine):void

Parameters

numberLine:TextLine

releaseParcelList()method 
protected function releaseParcelList(list:ParcelList):void

Parameters

list:ParcelList

resetLine()method 
protected function resetLine(textLine:TextLine):void

Parameters

textLine:TextLine

startLine()method 
protected function startLine():void

Called when we are about to compose a line. Handler for derived classes to override default behavior.