diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2016-08-12 18:00:47 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2016-08-12 18:00:47 -0700 |
commit | e07cbe5edfef74005a56205586202e9a224f0500 (patch) | |
tree | 28f15db3a56d77e1716fcc7e82f451f097d0ee1a /html/080display.cc.html | |
parent | 32983f88e46082ebdbf3357ea488beda9497ce38 (diff) | |
download | mu-e07cbe5edfef74005a56205586202e9a224f0500.tar.gz |
3174
Diffstat (limited to 'html/080display.cc.html')
-rw-r--r-- | html/080display.cc.html | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/html/080display.cc.html b/html/080display.cc.html index d85a3f5b..fc7d0e22 100644 --- a/html/080display.cc.html +++ b/html/080display.cc.html @@ -31,7 +31,9 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color </head> <body> <pre id='vimCodeElement'> -<span class="Comment">//: Take charge of the text-mode display and console.</span> +<span class="Comment">//: Take raw control of the text-mode display and console, putting it in</span> +<span class="Comment">//: 'console' mode rather than the usual automatically-scrolling 'typewriter'</span> +<span class="Comment">//: mode.</span> <span class="SalientComment">//:: Display management</span> @@ -55,9 +57,9 @@ put<span class="Delimiter">(</span>Recipe_ordinal<span class="Delimiter">,</span <span class="Normal">int</span> height = tb_height<span class="Delimiter">();</span> <span class="Normal">if</span> <span class="Delimiter">(</span>width > <span class="Constant">222</span> || height > <span class="Constant">222</span><span class="Delimiter">)</span> tb_shutdown<span class="Delimiter">();</span> <span class="Normal">if</span> <span class="Delimiter">(</span>width > <span class="Constant">222</span><span class="Delimiter">)</span> - raise << <span class="Constant">"sorry, mu doesn't support windows wider than 222 characters. Please resize your window.</span><span class="cSpecial">\n</span><span class="Constant">"</span> << end<span class="Delimiter">();</span> + raise << <span class="Constant">"sorry, mu doesn't support windows wider than 222 characters in console mode. Please resize your window.</span><span class="cSpecial">\n</span><span class="Constant">"</span> << end<span class="Delimiter">();</span> <span class="Normal">if</span> <span class="Delimiter">(</span>height > <span class="Constant">222</span><span class="Delimiter">)</span> - raise << <span class="Constant">"sorry, mu doesn't support windows taller than 222 characters. Please resize your window.</span><span class="cSpecial">\n</span><span class="Constant">"</span> << end<span class="Delimiter">();</span> + raise << <span class="Constant">"sorry, mu doesn't support windows taller than 222 characters in console mode. Please resize your window.</span><span class="cSpecial">\n</span><span class="Constant">"</span> << end<span class="Delimiter">();</span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span class="Delimiter">}</span> @@ -317,6 +319,20 @@ put<span class="Delimiter">(</span>Recipe_ordinal<span class="Delimiter">,</span <span class="Identifier">break</span><span class="Delimiter">;</span> <span class="Delimiter">}</span> +<span class="Comment">//: as a convenience, make $print mostly work in console mode</span> +<span class="Delimiter">:(before "End $print 10/newline Special-cases")</span> +<span class="Normal">else</span> <span class="Normal">if</span> <span class="Delimiter">(</span>tb_is_active<span class="Delimiter">())</span> <span class="Delimiter">{</span> + move_cursor_to_start_of_next_line_on_display<span class="Delimiter">();</span> +<span class="Delimiter">}</span> +<span class="Delimiter">:(code)</span> +<span class="Normal">void</span> move_cursor_to_start_of_next_line_on_display<span class="Delimiter">()</span> <span class="Delimiter">{</span> + <span class="Normal">if</span> <span class="Delimiter">(</span>Display_row < tb_height<span class="Delimiter">()</span>-<span class="Constant">1</span><span class="Delimiter">)</span> Display_row++<span class="Delimiter">;</span> + <span class="Normal">else</span> Display_row = <span class="Constant">0</span><span class="Delimiter">;</span> + Display_column = <span class="Constant">0</span><span class="Delimiter">;</span> + tb_set_cursor<span class="Delimiter">(</span>Display_column<span class="Delimiter">,</span> Display_row<span class="Delimiter">);</span> + <span class="Normal">if</span> <span class="Delimiter">(</span>Autodisplay<span class="Delimiter">)</span> tb_present<span class="Delimiter">();</span> +<span class="Delimiter">}</span> + <span class="Delimiter">:(before "End Primitive Recipe Declarations")</span> DISPLAY_WIDTH<span class="Delimiter">,</span> <span class="Delimiter">:(before "End Primitive Recipe Numbers")</span> |