blob: edf901f77ebce9426368b9175217a096e65fcd28 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><!-- saved from url=(0014)about:internet --><html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><link rel="stylesheet" href="../../../style.css" type="text/css" media="screen"><link rel="stylesheet" href="../../../print.css" type="text/css" media="print"><link rel="stylesheet" href="../../../override.css" type="text/css"><meta name="keywords" content="ISWFContext,flashx.textLayout.compose.ISWFContext,addCell,addController,addController,addControllerAt,addControllerAt,addLineForReuse,advanceToNextContainer,advanceToNextParcel,applyVerticalAlignmentToColumn,calculateLeadingParameters,callInContext,clear,clearCells,commitLastLineState,compose,compose,composeFloat,composeInlineGraphicElement,composeInternal,composeNextLine,composeParagraphElementIntoLines,composeTextFlow,composeToController,composeToController,composeToPosition,composeToPosition,createParcelList,damage,damage,doVerticalAlignment,drawBackground,endLine,endTableBlock,finalParcelAdjustment,findControllerIndexAtPosition,findControllerIndexAtPosition,findLineAtPosition,findLineAtPosition,findLineIndexAtPosition,findLineIndexAtPosition,finishComposeLine,finishController,finishParcel,fitLineToParcel,getAbsoluteStart,getBounds,getCellsInRange,getControllerAt,getControllerAt,getControllerIndex,getControllerIndex,getFirstIndentCharPos,getLineAt,getLineAt,getLineForReuse,getTableCells,getTextLine,hiliteBlockSelection,initialize,initializeForComposer,interactionManagerChanged,interactionManagerChanged,isDamaged,isDamaged,isLineVisible,oldTestLineVisible,parcelHasChanged,popInsideListItemMargins,preCompose,preProcessILGs,processFloatsAtLineEnd,processFloatsAtLineStart,processInlinesAtLineEnd,pushInsideListItemMargins,releaseParcelList,removeAllControllers,removeAllControllers,removeController,removeController,removeControllerAt,removeControllerAt,resetLine,setController,setFocus,setFocus,setRootElement,setRootElement,startLine,updateAllControllers,updateAllControllers,updateCompositionShapes,updateLengths,updateLengths,updateToController,updateToController"><title>flashx.textLayout.compose.ISWFContext</title></head><body><script language="javascript" type="text/javascript" src="../../../asdoc.js"></script><script language="javascript" type="text/javascript" src="../../../help.js"></script><script language="javascript" type="text/javascript" src="../../../cookies.js"></script><script language="javascript" type="text/javascript"><!--
asdocTitle = 'ISWFContext - ApacheFlex API Reference';
var baseRef = '../../../';
window.onload = configPage;
--></script>
<script type="text/javascript">
scrollToNameAnchor();
</script><table class="titleTable" cellpadding="0" cellspacing="0" id="titleTable" style="display:none"><tr><td class="titleTableTitle" align="left">Apache Flex 4.14.1 API Reference </td><td class="titleTableTopNav" align="right"><a href="../../../package-summary.html" onclick="loadClassListFrame('../../../all-classes.html')">All Packages</a>&nbsp;|&nbsp;<a href="../../../class-summary.html" onclick="loadClassListFrame('../../../all-classes.html')">All Classes</a>&nbsp;|&nbsp;<a href="../../../all-index-A.html" onclick="loadClassListFrame('../../../index-list.html')">Index</a>&nbsp;|&nbsp;<a id="framesLink1" href="../../../index.html?flashx/textLayout/compose/ISWFContext.html&amp;flashx/textLayout/compose/class-list.html">Frames</a><a id="noFramesLink1" style="display:none" href="" onclick="parent.location=document.location"> No Frames </a></td><td class="titleTableLogo" align="right" rowspan="3"><img src="../../../images/logo.jpg" class="logoImage" alt="AdobeLogo" title="AdobeLogo"></td></tr><tr class="titleTableRow2"><td class="titleTableSubTitle" id="subTitle" align="left">ISWFContext</td><td class="titleTableSubNav" id="subNav" align="right"><a href="#methodSummary">Methods</a></td></tr><tr class="titleTableRow3"><td colspan="3">&nbsp;</td></tr></table><script language="javascript" type="text/javascript" xml:space="preserve">
<!--
if (!isEclipse() || window.name != ECLIPSE_FRAME_NAME) {titleBar_setSubTitle("ISWFContext"); titleBar_setSubNav(false,false,false,false,false,false,false,false,true,false,false ,false,false,false,false,false);}
-->
</script><div xmlns:fn="http://www.w3.org/2005/xpath-functions" class="MainContent"><table class="classHeaderTable" cellpadding="0" cellspacing="0"><tr><td class="classHeaderTableLabel">Package</td><td><a href="package-detail.html" onclick="javascript:loadClassListFrame('class-list.html')">flashx.textLayout.compose</a></td></tr><tr><td class="classHeaderTableLabel">Interface</td><td class="classSignature">public interface ISWFContext</td></tr><tr><td class="classHeaderTableLabel">Implementors</td><td> <a href="../../../flashx/textLayout/container/TextContainerManager.html">TextContainerManager</a></td></tr></table><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version :&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions :&nbsp;</b></td><td>Flash Player 10, AIR 1.5</td></tr></table><p></p><p></p><p></p><p></p>
The ISWFContext interface allows a SWF file to share its context with other SWF files that load it.
An application that loads a SWF file of type ISWFContext can call methods in the context of the loaded SWF file.
The main usage is for calling the FTE TextLine creation methods.
<p>There are two reasons for an application to use
this interface to control TextLine creation: </p>
<ul>
<li>
<b>Reuse an embedded font: </b> if an application wants to use a font embedded in a loaded SWF file,
the application can access the font if a TextLine
is created in the context of the loaded SWF file.</li>
<li>
<b>Reuse existing TextLine instances</b>: reusing existing TextLine instances can result in faster recompose times.
TLF reuses existing TextLine instances internally. TLF reuses
a TextLine by calling <code>TextBlock.recreateTextLine()</code>
instead of <code>TextBlock.createTextLine()</code> when TLF recognizes that a TextLine is extant.</li>
</ul>
<p>Your application may have additional TextLine instances that can be reused.
To manually reuse existing TextLine instances:</p>
<ol>
<li>trap calls to <code>TextBlock.createTextLine()</code>, then</li>
<li>call <code>TextBlock.recreateTextLine()</code> with the extant TextLine instance instead
of <code>TextBlock.createTextLine()</code>.</li>
</ol>
<p>Please note, however, that the <code>TextBlock.recreateTextLine()</code> is available
only in Flash Player 10.1 and later.</p>
<p></p><p><span class="classHeaderTableLabel">See also</span></p><div class="seeAlso">flash.text.engine.TextBlock.createTextLine()<br/>flash.text.engine.TextBlock.recreateTextLine()</div><br/><hr></div><a name="methodSummary"></a><div class="summarySection"><div class="summaryTableTitle">Public Methods </div><table cellspacing="0" cellpadding="3" class="summaryTable " id="summaryTableMethod"><tr><th>&nbsp;</th><th colspan="2">Method</th><th class="summaryTableOwnerCol">Defined By</th></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#callInContext()" class="signatureLink">callInContext</a>(fn:Function, thisArg:Object, argArray:Array, returns:Boolean = true):*</div><div class="summaryTableDescription">
A way to call a method in a client controlled context.</div></td><td class="summaryTableOwnerCol">ISWFContext</td></tr></table></div><script language="javascript" type="text/javascript"><!--
showHideInherited();
--></script><div class="MainContent"><a name="methodDetail"></a><div class="detailSectionHeader">Method Detail</div><a name="callInContext()"></a><a name="callInContext(Function,Object,Array,Boolean)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">callInContext</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td></tr></table><div class="detailBody"><code> public function callInContext(fn:Function, thisArg:Object, argArray:Array, returns:Boolean = true):*</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version :&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions :&nbsp;</b></td><td>Flash Player 10, AIR 1.5</td></tr></table><p></p><p></p><p>
A way to call a method in a client controlled context.
</p><p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">fn</span>:Function</code> &mdash; The function or method to call
</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">thisArg</span>:Object</code> &mdash; The this pointer for the function
</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">argArray</span>:Array</code> &mdash; The arguments for the function
</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">returns</span>:Boolean</code> (default = <code>true</code>)<code></code> &mdash; If true, the function returns a value
</td></tr></table></p><p></p><span class="label">Returns</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code>*</code> &mdash; Whatever the function returns, if anything.
</td></tr></table><p><span class="label">See also</span></p><div class="seeAlso">Function.apply()</div></div><br/><br/><hr><br/><p></p><center class="copyright"><footer>The Apache Software Foundation</footer><br/>Wed Mar 25 2015, 07:57 PM +01:00 </center></div></body></html><!--The Apache Software Foundation<br/>Wed Mar 25 2015, 07:57 PM +01:00 -->