Skip to content

Commit 1577c06

Browse files
scroll regions
1 parent 5eaf2ee commit 1577c06

73 files changed

Lines changed: 1021 additions & 723 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docpages/basic-language-reference/keywords/00_INDEX.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ The following parameter types are used throughout this documentation:
119119
* \subpage RESTORE
120120
* \subpage RETURN
121121
* \subpage RMDIR
122+
* \subpage SCROLLREGION
122123
* \subpage SETTIMEZONE
123124
* \subpage SETVARI
124125
* \subpage SETVARR
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
\page SCROLLREGION SCROLLREGION Keyword
2+
3+
```basic
4+
SCROLLREGION integer-expression, integer-expression
5+
```
6+
7+
Marks a horizontal band of the screen, measured in **text rows**, as scrollable with terminal text regardless of if it contains graphics, or text.
8+
Both `top` and `bottom` values are inclusive.
9+
10+
Any graphics drawn in this region will be shifted up together with the text when the screen scrolls.
11+
The region remains active until it has completely scrolled off the display, even if the program that created it has finished.
12+
13+
---
14+
15+
##### Example: Keep a logo and system info scrolling with text
16+
17+
```basic
18+
SPRITELOAD owl,"/images/owl.png"
19+
20+
PRINT " "
21+
PRINT " "
22+
PRINT " "
23+
24+
CURSOR 0, CURRENTY - 3
25+
STARTY = CURRENTY
26+
27+
PLOT owl, 32, STARTY*8
28+
PRINT "Retro Rocket 1.0"
29+
PRINT "CPU: "; CPUGETBRAND$(1)
30+
PRINT "Memory: "; MEMUSED/1024/1024; " MiB"
31+
32+
ENDY = CURRENTY
33+
SCROLLREGION STARTY, ENDY
34+
```
35+
36+
This loads and plots an image, prints a few lines of system information, and then marks the whole block as a scroll region so it moves in sync with the text output.
37+
38+
---
39+
40+
##### Notes
41+
42+
* Coordinates are in **text rows**, not pixels. `(0,0)` is the top-left cell.
43+
* Regions always cover the **full screen width**.
44+
* Multiple regions may be active at the same time.
45+
* Regions are automatically removed once they are entirely outside the visible screen.
46+
* Because of the way the terminal is optimised, **printing blank lines inside a scroll region will appear as vertical bars across images**. When mixing text and graphics in a scroll region, only draw the text you actually want visible.
47+
48+
**See also:**
49+
\ref SPRITELOAD "SPRITELOAD", \ref PLOT "PLOT", \ref PRINT "PRINT"

docs/SCROLLREGION.html

Lines changed: 151 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2+
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
3+
<head>
4+
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5+
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
6+
<meta name="generator" content="Doxygen 1.14.0"/>
7+
<meta name="viewport" content="width=device-width, initial-scale=1"/>
8+
<title>Retro Rocket OS: SCROLLREGION Keyword</title>
9+
<link href="tabs.css" rel="stylesheet" type="text/css"/>
10+
<script type="text/javascript" src="jquery.js"></script>
11+
<script type="text/javascript" src="dynsections.js"></script>
12+
<script type="text/javascript" src="clipboard.js"></script>
13+
<link href="navtree.css" rel="stylesheet" type="text/css"/>
14+
<script type="text/javascript" src="navtreedata.js"></script>
15+
<script type="text/javascript" src="navtree.js"></script>
16+
<script type="text/javascript" src="cookie.js"></script>
17+
<link href="search/search.css" rel="stylesheet" type="text/css"/>
18+
<script type="text/javascript" src="search/searchdata.js"></script>
19+
<script type="text/javascript" src="search/search.js"></script>
20+
<link href="doxygen.css" rel="stylesheet" type="text/css" />
21+
<link href="doxygen-awesome.css" rel="stylesheet" type="text/css"/>
22+
<link href="style.css" rel="stylesheet" type="text/css"/>
23+
</head>
24+
<body>
25+
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
26+
<div id="titlearea">
27+
<table cellspacing="0" cellpadding="0">
28+
<tbody>
29+
<tr id="projectrow">
30+
<td id="projectlogo"><img alt="Logo" src="rr.png"/></td>
31+
<td id="projectalign">
32+
<div id="projectname">Retro Rocket OS
33+
</div>
34+
<div id="projectbrief">BASIC-Powered Operating System</div>
35+
</td>
36+
</tr>
37+
</tbody>
38+
</table>
39+
</div>
40+
<!-- end header part -->
41+
<!-- Generated by Doxygen 1.14.0 -->
42+
<script type="text/javascript">
43+
var searchBox = new SearchBox("searchBox", "search/",'.html');
44+
</script>
45+
<script type="text/javascript">
46+
$(function() { codefold.init(); });
47+
</script>
48+
<script type="text/javascript" src="menudata.js"></script>
49+
<script type="text/javascript" src="menu.js"></script>
50+
<script type="text/javascript">
51+
$(function() {
52+
initMenu('',true,false,'search.php','Search',true);
53+
$(function() { init_search(); });
54+
});
55+
</script>
56+
<div id="main-nav"></div>
57+
</div><!-- top -->
58+
<div id="side-nav" class="ui-resizable side-nav-resizable">
59+
<div id="nav-tree">
60+
<div id="nav-tree-contents">
61+
<div id="nav-sync" class="sync"></div>
62+
</div>
63+
</div>
64+
<div id="splitbar" style="-moz-user-select:none;"
65+
class="ui-resizable-handle">
66+
</div>
67+
</div>
68+
<script type="text/javascript">
69+
$(function(){initNavTree('SCROLLREGION.html','',''); });
70+
</script>
71+
<div id="container">
72+
<div id="doc-content">
73+
<!-- window showing the filter options -->
74+
<div id="MSearchSelectWindow"
75+
onmouseover="return searchBox.OnSearchSelectShow()"
76+
onmouseout="return searchBox.OnSearchSelectHide()"
77+
onkeydown="return searchBox.OnSearchSelectKey(event)">
78+
</div>
79+
80+
<!-- iframe showing the search results (closed by default) -->
81+
<div id="MSearchResultsWindow">
82+
<div id="MSearchResults">
83+
<div class="SRPage">
84+
<div id="SRIndex">
85+
<div id="SRResults"></div>
86+
<div class="SRStatus" id="Loading">Loading...</div>
87+
<div class="SRStatus" id="Searching">Searching...</div>
88+
<div class="SRStatus" id="NoMatches">No Matches</div>
89+
</div>
90+
</div>
91+
</div>
92+
</div>
93+
94+
<div><div class="header">
95+
<div class="headertitle"><div class="title">SCROLLREGION Keyword </div></div>
96+
</div><!--header-->
97+
<div class="contents">
98+
<div class="textblock"><div class="fragment"><div class="line">SCROLLREGION integer-expression, integer-expression</div>
99+
</div><!-- fragment --><p>Marks a horizontal band of the screen, measured in <b>text rows</b>, as scrollable with terminal text regardless of if it contains graphics, or text. Both <span class="tt">top</span> and <span class="tt">bottom</span> values are inclusive.</p>
100+
<p>Any graphics drawn in this region will be shifted up together with the text when the screen scrolls. The region remains active until it has completely scrolled off the display, even if the program that created it has finished.</p>
101+
<hr />
102+
<h5 class="doxsection"><a class="anchor" id="example-keep-a-logo-and-system-info-scrolling-with-text"></a>
103+
Example: Keep a logo and system info scrolling with text</h5>
104+
<div class="fragment"><div class="line">SPRITELOAD owl,&quot;/images/owl.png&quot;</div>
105+
<div class="line"> </div>
106+
<div class="line">PRINT &quot; &quot;</div>
107+
<div class="line">PRINT &quot; &quot;</div>
108+
<div class="line">PRINT &quot; &quot;</div>
109+
<div class="line"> </div>
110+
<div class="line">CURSOR 0, CURRENTY - 3</div>
111+
<div class="line">STARTY = CURRENTY</div>
112+
<div class="line"> </div>
113+
<div class="line">PLOT owl, 32, STARTY*8</div>
114+
<div class="line">PRINT &quot;Retro Rocket 1.0&quot;</div>
115+
<div class="line">PRINT &quot;CPU: &quot;; CPUGETBRAND$(1)</div>
116+
<div class="line">PRINT &quot;Memory: &quot;; MEMUSED/1024/1024; &quot; MiB&quot;</div>
117+
<div class="line"> </div>
118+
<div class="line">ENDY = CURRENTY</div>
119+
<div class="line">SCROLLREGION STARTY, ENDY</div>
120+
</div><!-- fragment --><p>This loads and plots an image, prints a few lines of system information, and then marks the whole block as a scroll region so it moves in sync with the text output.</p>
121+
<hr />
122+
<h5 class="doxsection"><a class="anchor" id="notes-165"></a>
123+
Notes</h5>
124+
<ul>
125+
<li>Coordinates are in <b>text rows</b>, not pixels. <span class="tt">(0,0)</span> is the top-left cell.</li>
126+
<li>Regions always cover the <b>full screen width</b>.</li>
127+
<li>Multiple regions may be active at the same time.</li>
128+
<li>Regions are automatically removed once they are entirely outside the visible screen.</li>
129+
<li>Because of the way the terminal is optimised, <b>printing blank lines inside a scroll region will appear as vertical bars across images</b>. When mixing text and graphics in a scroll region, only draw the text you actually want visible.</li>
130+
</ul>
131+
<p><b>See also:</b> <a class="el" href="SPRITELOAD.html">SPRITELOAD</a>, <a class="el" href="PLOT.html">PLOT</a>, <a class="el" href="PRINT.html">PRINT</a> </p>
132+
</div></div><!-- contents -->
133+
</div><!-- PageDoc -->
134+
</div><!-- doc-content -->
135+
<div id="page-nav" class="page-nav-panel">
136+
<div id="page-nav-resize-handle"></div>
137+
<div id="page-nav-tree">
138+
<div id="page-nav-contents">
139+
</div><!-- page-nav-contents -->
140+
</div><!-- page-nav-tree -->
141+
</div><!-- page-nav -->
142+
</div><!-- container -->
143+
<!-- start footer part -->
144+
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
145+
<ul>
146+
<li class="navelem"><a href="index.html">Retro Rocket OS</a></li><li class="navelem"><a href="basic-ref.html">BASIC Language Reference</a></li><li class="navelem"><a href="keywords.html">Keywords</a></li>
147+
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.14.0 </li>
148+
</ul>
149+
</div>
150+
</body>
151+
</html>

docs/SLEEP.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ <h4 class="doxsection"><a class="anchor" id="example-12"></a>
110110
<div class="fragment"><div class="line">START</div>
111111
<div class="line">AFTER 2 SECONDS</div>
112112
</div><!-- fragment --><hr />
113-
<h4 class="doxsection"><a class="anchor" id="notes-165"></a>
113+
<h4 class="doxsection"><a class="anchor" id="notes-166"></a>
114114
Notes</h4>
115115
<ul>
116116
<li>Only whole milliseconds are supported. <span class="tt">SLEEP 2.5</span> is treated as <span class="tt">SLEEP 2</span>.</li>

docs/SOCKBINREAD.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ <h3 class="doxsection"><a class="anchor" id="examples-162"></a>
110110
<div class="line">REM ... process buffer ...</div>
111111
<div class="line">MEMRELEASE buf</div>
112112
</div><!-- fragment --><hr />
113-
<h3 class="doxsection"><a class="anchor" id="notes-166"></a>
113+
<h3 class="doxsection"><a class="anchor" id="notes-167"></a>
114114
Notes</h3>
115115
<ul>
116116
<li>Reads up to the specified number of bytes into the buffer.</li>

docs/SOCKBINWRITE.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ <h3 class="doxsection"><a class="anchor" id="examples-163"></a>
115115
<div class="line"> </div>
116116
<div class="line">MEMRELEASE buf</div>
117117
</div><!-- fragment --><hr />
118-
<h3 class="doxsection"><a class="anchor" id="notes-167"></a>
118+
<h3 class="doxsection"><a class="anchor" id="notes-168"></a>
119119
Notes</h3>
120120
<ul>
121121
<li>Intended for sending file contents or other raw buffers.</li>

docs/SOCKFLUSH.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ <h3 class="doxsection"><a class="anchor" id="examples-164"></a>
127127
<div class="line">SOCKFLUSH s</div>
128128
<div class="line">SOCKCLOSE s</div>
129129
</div><!-- fragment --><hr />
130-
<h3 class="doxsection"><a class="anchor" id="notes-168"></a>
130+
<h3 class="doxsection"><a class="anchor" id="notes-169"></a>
131131
Notes</h3>
132132
<ul>
133133
<li>If the socket has no pending data, <span class="tt">SOCKFLUSH</span> returns immediately.</li>

docs/SOCKREAD.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ <h3 class="doxsection"><a class="anchor" id="examples-165"></a>
143143
<div class="line"> ON ERROR PROCnet_err</div>
144144
<div class="line">ENDPROC</div>
145145
</div><!-- fragment --><hr />
146-
<h3 class="doxsection"><a class="anchor" id="notes-169"></a>
146+
<h3 class="doxsection"><a class="anchor" id="notes-170"></a>
147147
Notes</h3>
148148
<ul>
149149
<li>Treat the socket as a <b>byte stream</b>; if you need to read multiple fields on one line, call <span class="tt">SOCKREAD</span> multiple times or define a simple protocol (for example, one value per line).</li>

docs/SOCKWRITE.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ <h3 class="doxsection"><a class="anchor" id="examples-166"></a>
144144
<div class="line"> PRINT &quot;Write failed: &quot;; ERR$</div>
145145
<div class="line">ENDPROC</div>
146146
</div><!-- fragment --><hr />
147-
<h3 class="doxsection"><a class="anchor" id="notes-170"></a>
147+
<h3 class="doxsection"><a class="anchor" id="notes-171"></a>
148148
Notes</h3>
149149
<ul>
150150
<li>Do <b>not</b> pass a literal or expression as the handle; use an integer <b>variable</b> that contains the handle.</li>

docs/SPRITEFREE.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ <h3 class="doxsection"><a class="anchor" id="examples-167"></a>
140140
<div class="line"> ON ERROR PROCerr</div>
141141
<div class="line">ENDPROC</div>
142142
</div><!-- fragment --><hr />
143-
<h3 class="doxsection"><a class="anchor" id="notes-171"></a>
143+
<h3 class="doxsection"><a class="anchor" id="notes-172"></a>
144144
Notes</h3>
145145
<ul>
146146
<li><span class="tt">integer-expression</span> can be a variable, array element, or any expression that evaluates to a valid sprite handle.</li>

0 commit comments

Comments
 (0)