Screen methods syntax: Difference between revisions
m (Automatically generated page update) |
m (Automatically generated page update) |
||
Line 2: | Line 2: | ||
replaced, so any manual edits will be lost. You've been warned. --> | replaced, so any manual edits will be lost. You've been warned. --> | ||
{{Template:Syntax list header|class=Screen}} | {{Template:Syntax list header|class=Screen}} | ||
<p class="syntax" style="margin-bottom:0px; border-bottom:1px solid; border-left:1px solid; border-right:1px solid; border-top:1px solid;"><span class="term">%key</span><span class="literal">=</span> <span class="term">screen</span><span class="literal">:[[ActionKey (Screen function)|ActionKey]]</span></p> | <p class="syntax" style="margin-bottom:0px; border-bottom:1px solid; border-left:1px solid; border-right:1px solid; border-top:1px solid;"><span class="term">%key</span><span class="literal"> =</span> <span class="term">screen</span><span class="literal">:[[ActionKey (Screen function)|ActionKey]]</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">%sfield</span><span class="literal">=</span><span class="squareb">]</span> <span class="term">screen</span><span class="literal">:[[AddField (Screen function)|AddField]]</span><span class="squareb">[</span><span class="literal">(</span> <span class="squareb">[</span><span class="literal" title="Number">Row=</span> <span class="term" title="Number">number</span><span class="squareb">]</span><span class="comma">,</span> <span class="squareb">[</span><span class="literal" title="Number">Column=</span> <span class="term" title="Number">number</span><span class="squareb">]</span><span class="comma">,</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="squareb">[</span><span class="term">%sfield</span><span class="literal"> =</span><span class="squareb">]</span> <span class="term">screen</span><span class="literal">:[[AddField (Screen function)|AddField]]</span><span class="squareb">[</span><span class="literal">(</span> <span class="squareb">[</span><span class="literal" title="Number">Row=</span> <span class="term" title="Number">number</span><span class="squareb">]</span><span class="comma">,</span> <span class="squareb">[</span><span class="literal" title="Number">Column=</span> <span class="term" title="Number">number</span><span class="squareb">]</span><span class="comma">,</span> - | ||
<span class="squareb">[</span><span class="literal" title="Number">Width=</span> <span class="term" title="Number">number</span><span class="squareb">]</span><span class="comma">,</span> <span class="squareb">[</span><span class="literal" title="FieldColor">Color=</span> <span class="term" title="FieldColor">fieldColor</span><span class="squareb">]</span><span class="comma">,</span> - | |||
<span class="squareb">[</span><span class="literal" title="Boolean">Protected=</span> <span class="term" title="Boolean">boolean</span><span class="squareb">]</span><span class="comma">,</span> <span class="squareb">[</span><span class="literal" title="Highlight">Highlight=</span> <span class="term" title="Highlight">highlight</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="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> | |||
<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> | ||
<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">% | <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">%currentNum</span><span class="literal"> =</span> <span class="term">screen</span><span class="literal">:[[CursorColumn (Screen property)|CursorColumn]]</span> | ||
< | <span class="term">screen</span><span class="literal">:[[CursorColumn (Screen property)|CursorColumn]]</span> <span class="literal">= </span><span class="term">newNum</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">%num</span><span class="literal"> =</span><span class="squareb">]</span> <span class="term">screen</span><span class="literal">:[[CursorItemId (Screen function)|CursorItemId]]</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">% | <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">%currentNum</span><span class="literal"> =</span> <span class="term">screen</span><span class="literal">:[[CursorRow (Screen property)|CursorRow]]</span> | ||
< | <span class="term">screen</span><span class="literal">:[[CursorRow (Screen property)|CursorRow]]</span> <span class="literal">= </span><span class="term">newNum</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">% | <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">:[[DeepCopy (Screen function)|DeepCopy]]</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">% | <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">%currentActionKey</span><span class="literal"> =</span> <span class="term">screen</span><span class="literal">:[[MaxActionKey (Screen property)|MaxActionKey]]</span> | ||
< | <span class="term">screen</span><span class="literal">:[[MaxActionKey (Screen property)|MaxActionKey]]</span> <span class="literal">= </span><span class="term">newActionKey</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">% | <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">%screen</span><span class="literal"> =</span> <span class="literal">%(Screen):[[New (Screen constructor)|New]]</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">% | <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">%currentNum</span><span class="literal"> =</span> <span class="term">screen</span><span class="literal">:[[NewFieldColumn (Screen property)|NewFieldColumn]]</span> | ||
< | <span class="term">screen</span><span class="literal">:[[NewFieldColumn (Screen property)|NewFieldColumn]]</span> <span class="literal">= </span><span class="term">newNum</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">%currentNum</span><span class="literal"> =</span> <span class="term">screen</span><span class="literal">:[[NewFieldRow (Screen property)|NewFieldRow]]</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">% | <span class="term">screen</span><span class="literal">:[[NewFieldRow (Screen property)|NewFieldRow]]</span> <span class="literal">= </span><span class="term">newNum</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">:[[ProtectedColor (Screen property)|ProtectedColor]]</span> | ||
<span class="term">screen</span><span class="literal">:[[ProtectedColor (Screen property)|ProtectedColor]]</span> <span class="literal">= </span><span class="term">newFieldColor</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">%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> | |||
<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><span class="squareb">[</span><span class="literal">(</span> <span class="squareb">[</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">:[[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> | |||
<span class="term">screen</span><span class="literal">:[[UnprotectedColor (Screen property)|UnprotectedColor]]</span> <span class="literal">= </span><span class="term">newFieldColor</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">%currentHighlight</span><span class="literal"> =</span> <span class="term">screen</span><span class="literal">:[[UnprotectedHighlight (Screen property)|UnprotectedHighlight]]</span> | |||
<span class="term">screen</span><span class="literal">:[[UnprotectedHighlight (Screen property)|UnprotectedHighlight]]</span> <span class="literal">= </span><span class="term">newHighlight</span></p> |
Revision as of 15:44, 16 February 2011
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], [Value= string])]
%number = screen:Columns
%outscreen = screen:Copy
%currentNum = screen:CursorColumn screen:CursorColumn = newNum
[%num =] screen:CursorItemId
%currentNum = screen:CursorRow screen:CursorRow = newNum
%outscreen = screen:DeepCopy
%currentActionKey = screen:MaxActionKey screen:MaxActionKey = newActionKey
%screen = %(Screen):New
%currentNum = screen:NewFieldColumn screen:NewFieldColumn = newNum
%currentNum = screen:NewFieldRow screen:NewFieldRow = newNum
%currentFieldColor = screen:ProtectedColor screen:ProtectedColor = newFieldColor
%currentHighlight = screen:ProtectedHighlight screen:ProtectedHighlight = newHighlight
[%key =] screen:Read[( [string])]
%number = screen:Rows
%currentFieldColor = screen:UnprotectedColor screen:UnprotectedColor = newFieldColor
%currentHighlight = screen:UnprotectedHighlight screen:UnprotectedHighlight = newHighlight