Screen methods syntax: Difference between revisions
m (Automatically generated page update) |
(Automatically generated page update) |
||
Line 8: | Line 8: | ||
<span class="squareb">[</span><span class="literal" title="Boolean">Numeric=</span> <span class="term" title="Boolean">boolean</span><span class="squareb">]</span><span class="comma">,</span> <span class="squareb">[</span><span class="literal" title="Boolean">Modified=</span> <span class="term" title="Boolean">boolean</span><span class="squareb">]</span><span class="comma">,</span> - | <span class="squareb">[</span><span class="literal" title="Boolean">Numeric=</span> <span class="term" title="Boolean">boolean</span><span class="squareb">]</span><span class="comma">,</span> <span class="squareb">[</span><span class="literal" title="Boolean">Modified=</span> <span class="term" title="Boolean">boolean</span><span class="squareb">]</span><span class="comma">,</span> - | ||
<span class="squareb">[</span><span class="literal" title="Boolean">Invisible=</span> <span class="term" title="Boolean">boolean</span><span class="squareb">]</span><span class="comma">,</span> <span class="squareb">[</span><span class="literal" title="Boolean">Autoskip=</span> <span class="term" title="Boolean">boolean</span><span class="squareb">]</span><span class="comma">,</span> - | <span class="squareb">[</span><span class="literal" title="Boolean">Invisible=</span> <span class="term" title="Boolean">boolean</span><span class="squareb">]</span><span class="comma">,</span> <span class="squareb">[</span><span class="literal" title="Boolean">Autoskip=</span> <span class="term" title="Boolean">boolean</span><span class="squareb">]</span><span class="comma">,</span> - | ||
<span class="squareb">[</span><span class="literal" title="Number">Itemid=</span> <span class="term" title="Number">number</span><span class="squareb">]</span><span class="comma">,</span> <span class="squareb">[</span><span class="literal" title="String">Value=</span> <span class="term" title="String">string</span><span class="squareb">]</span><span class="literal">)</span><span class="squareb">]</span></p> | <span class="squareb">[</span><span class="literal" title="Number">Itemid=</span> <span class="term" title="Number">number</span><span class="squareb">]</span><span class="comma">,</span> <span class="squareb">[</span><span class="literal" title="Boolean">Strip=</span> <span class="term" title="Boolean">boolean</span><span class="squareb">]</span><span class="comma">,</span> - | ||
<span class="squareb">[</span><span class="literal" title="String">Value=</span> <span class="term" title="String">string</span><span class="squareb">]</span><span class="literal">)</span><span class="squareb">]</span></p> | |||
<p class="syntax" style="margin-bottom:0px; border-bottom:1px solid; border-left:1px solid; border-right:1px solid; border-top: none; margin-top:0px;"><span class="term">%number</span><span class="literal"> =</span> <span class="term">screen</span><span class="literal">:[[Columns (Screen function)|Columns]]</span></p> | <p class="syntax" style="margin-bottom:0px; border-bottom:1px solid; border-left:1px solid; border-right:1px solid; border-top: none; margin-top:0px;"><span class="term">%number</span><span class="literal"> =</span> <span class="term">screen</span><span class="literal">:[[Columns (Screen function)|Columns]]</span></p> | ||
<p class="syntax" style="margin-bottom:0px; border-bottom:1px solid; border-left:1px solid; border-right:1px solid; border-top: none; margin-top:0px;"><span class="term">%outScreen</span><span class="literal"> =</span> <span class="term">screen</span><span class="literal">:[[Copy (Screen function)|Copy]]</span></p> | <p class="syntax" style="margin-bottom:0px; border-bottom:1px solid; border-left:1px solid; border-right:1px solid; border-top: none; margin-top:0px;"><span class="term">%outScreen</span><span class="literal"> =</span> <span class="term">screen</span><span class="literal">:[[Copy (Screen function)|Copy]]</span></p> | ||
Line 28: | Line 29: | ||
<p class="syntax" style="margin-bottom:0px; border-bottom:1px solid; border-left:1px solid; border-right:1px solid; border-top: none; margin-top:0px;"><span class="term">%currentHighlight</span><span class="literal"> =</span> <span class="term">screen</span><span class="literal">:[[ProtectedHighlight (Screen property)|ProtectedHighlight]]</span> | <p class="syntax" style="margin-bottom:0px; border-bottom:1px solid; border-left:1px solid; border-right:1px solid; border-top: none; margin-top:0px;"><span class="term">%currentHighlight</span><span class="literal"> =</span> <span class="term">screen</span><span class="literal">:[[ProtectedHighlight (Screen property)|ProtectedHighlight]]</span> | ||
<span class="term">screen</span><span class="literal">:[[ProtectedHighlight (Screen property)|ProtectedHighlight]]</span> <span class="literal">= </span><span class="term">newHighlight</span></p> | <span class="term">screen</span><span class="literal">:[[ProtectedHighlight (Screen property)|ProtectedHighlight]]</span> <span class="literal">= </span><span class="term">newHighlight</span></p> | ||
<p class="syntax" style="margin-bottom:0px; border-bottom:1px solid; border-left:1px solid; border-right:1px solid; border-top: none; margin-top:0px;"><span class="squareb">[</span><span class="term">%key</span><span class="literal"> =</span><span class="squareb">]</span> <span class="term">screen</span><span class="literal">:[[Read (Screen function)|Read]]</span></p> | <p class="syntax" style="margin-bottom:0px; border-bottom:1px solid; border-left:1px solid; border-right:1px solid; border-top: none; margin-top:0px;"><span class="squareb">[</span><span class="term">%key</span><span class="literal"> =</span><span class="squareb">]</span> <span class="term">screen</span><span class="literal">:[[Read (Screen function)|Read]]</span> | ||
Throws [[ScreenReadError class|ScreenReadError]]</p> | |||
<p class="syntax" style="margin-bottom:0px; border-bottom:1px solid; border-left:1px solid; border-right:1px solid; border-top: none; margin-top:0px;"><span class="term">%number</span><span class="literal"> =</span> <span class="term">screen</span><span class="literal">:[[Rows (Screen function)|Rows]]</span></p> | <p class="syntax" style="margin-bottom:0px; border-bottom:1px solid; border-left:1px solid; border-right:1px solid; border-top: none; margin-top:0px;"><span class="term">%number</span><span class="literal"> =</span> <span class="term">screen</span><span class="literal">:[[Rows (Screen function)|Rows]]</span></p> | ||
<p class="syntax" style="margin-bottom:0px; border-bottom:1px solid; border-left:1px solid; border-right:1px solid; border-top: none; margin-top:0px;"><span class="term">%currentFieldColor</span><span class="literal"> =</span> <span class="term">screen</span><span class="literal">:[[UnprotectedColor (Screen property)|UnprotectedColor]]</span> | <p class="syntax" style="margin-bottom:0px; border-bottom:1px solid; border-left:1px solid; border-right:1px solid; border-top: none; margin-top:0px;"><span class="term">%currentFieldColor</span><span class="literal"> =</span> <span class="term">screen</span><span class="literal">:[[UnprotectedColor (Screen property)|UnprotectedColor]]</span> |
Latest revision as of 15:58, 23 August 2013
The syntax for each of the Screen class methods is shown below.
Square brackets indicate optional elements of the method invocation. See also the notation conventions for methods and the List of Screen methods.
%key = screen:ActionKey
[%sfield =] screen:AddField[( [Row= number], [Column= number], - [Width= number], [Color= fieldColor], - [Protected= boolean], [Highlight= highlight], - [Numeric= boolean], [Modified= boolean], - [Invisible= boolean], [Autoskip= boolean], - [Itemid= number], [Strip= boolean], - [Value= string])]
%number = screen:Columns
%outScreen = screen:Copy
%currentNumber = screen:CursorColumn screen:CursorColumn = newNumber
[%number =] screen:CursorItemId
%currentNumber = screen:CursorRow screen:CursorRow = newNumber
%outScreen = screen:DeepCopy
%currentActionKey = screen:MaxActionKey screen:MaxActionKey = newActionKey
%screen = [%(Screen):]New
%currentNumber = screen:NewFieldColumn screen:NewFieldColumn = newNumber
%currentNumber = screen:NewFieldRow screen:NewFieldRow = newNumber
%currentFieldColor = screen:ProtectedColor screen:ProtectedColor = newFieldColor
%currentHighlight = screen:ProtectedHighlight screen:ProtectedHighlight = newHighlight
[%key =] screen:Read Throws ScreenReadError
%number = screen:Rows
%currentFieldColor = screen:UnprotectedColor screen:UnprotectedColor = newFieldColor
%currentHighlight = screen:UnprotectedHighlight screen:UnprotectedHighlight = newHighlight