ZealOS/docs/Misc/Tour/Tour.IN.html
2021-08-13 13:30:44 -04:00

169 lines
16 KiB
HTML
Executable file

<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=US-ASCII">
<meta name="generator" content="ZealOS V0.15">
<style type="text/css">
body {background-color:#fef1f0;}
.cF0{color:#000000;background-color:#fef1f0;}
.cF1{color:#0148a4;background-color:#fef1f0;}
.cF2{color:#3b7901;background-color:#fef1f0;}
.cF3{color:#057c7e;background-color:#fef1f0;}
.cF4{color:#bb2020;background-color:#fef1f0;}
.cF5{color:#9e42ae;background-color:#fef1f0;}
.cF6{color:#b57901;background-color:#fef1f0;}
.cF7{color:#b2b6af;background-color:#fef1f0;}
.cF8{color:#555753;background-color:#fef1f0;}
.cF9{color:#678fbb;background-color:#fef1f0;}
.cFA{color:#82bc49;background-color:#fef1f0;}
.cFB{color:#0097a2;background-color:#fef1f0;}
.cFC{color:#e26a6a;background-color:#fef1f0;}
.cFD{color:#c671bc;background-color:#fef1f0;}
.cFE{color:#c7ab00;background-color:#fef1f0;}
.cFF{color:#fef1f0;background-color:#fef1f0;}
</style>
</head>
<body>
<pre style="font-family:monospace;font-size:12pt">
<a name="l1"></a><span class=cF9>CTask</span><span class=cF0> *tour_put, *tour_task;
<a name="l2"></a></span><span class=cF1>Bool</span><span class=cF0> tour_okay_pressed;
<a name="l3"></a>
<a name="l4"></a></span><span class=cF1>U0</span><span class=cF0> TourPutTask()
<a name="l5"></a>{
<a name="l6"></a> </span><span class=cF9>CDoc</span><span class=cF0> *doc;
<a name="l7"></a> </span><span class=cF9>I64</span><span class=cF0> ch;
<a name="l8"></a>
<a name="l9"></a> </span><span class=cF5>DocTermNew</span><span class=cF0>;
<a name="l10"></a> </span><span class=cF5>WinHorz</span><span class=cF0>(</span><span class=cF3>TEXT_COLS</span><span class=cF0> / </span><span class=cFE>2</span><span class=cF0>, </span><span class=cF3>TEXT_COLS</span><span class=cF0> - </span><span class=cFE>2</span><span class=cF0>);
<a name="l11"></a> </span><span class=cF5>WinVert</span><span class=cF0>(</span><span class=cF3>TEXT_ROWS</span><span class=cF0> / </span><span class=cFE>2</span><span class=cF0> + </span><span class=cFE>5</span><span class=cF0>, </span><span class=cF3>TEXT_ROWS</span><span class=cF0> - </span><span class=cFE>7</span><span class=cF0>);
<a name="l12"></a> </span><span class=cF5>LBts</span><span class=cF0>(&amp;</span><span class=cF5>Fs</span><span class=cF0>-&gt;display_flags, </span><span class=cF3>DISPLAYf_WIN_ON_TOP</span><span class=cF0>);
<a name="l13"></a> </span><span class=cF5>WinToTop</span><span class=cF0>;
<a name="l14"></a> </span><span class=cF5>Fs</span><span class=cF0>-&gt;border_src = </span><span class=cF3>BDS_CONST</span><span class=cF0>;
<a name="l15"></a> </span><span class=cF5>Fs</span><span class=cF0>-&gt;border_attr = </span><span class=cF3>LTGRAY</span><span class=cF0> &lt;&lt; </span><span class=cFE>4</span><span class=cF0> + </span><span class=cF5>DriveTextAttrGet</span><span class=cF0>(</span><span class=cF6>':'</span><span class=cF0>) &amp; </span><span class=cFE>15</span><span class=cF0>;
<a name="l16"></a> </span><span class=cF5>Fs</span><span class=cF0>-&gt;text_attr = </span><span class=cF3>LTGRAY</span><span class=cF0> &lt;&lt; </span><span class=cFE>4</span><span class=cF0> + </span><span class=cF3>BLUE</span><span class=cF0>;
<a name="l17"></a> </span><span class=cF5>Fs</span><span class=cF0>-&gt;win_inhibit = </span><span class=cF3>WIG_NO_FOCUS_TASK_DEFAULT</span><span class=cF0>;
<a name="l18"></a> doc = </span><span class=cF5>DocPut</span><span class=cF0>;
<a name="l19"></a> doc-&gt;flags |= </span><span class=cF3>DOCF_FORM</span><span class=cF0>;
<a name="l20"></a> </span><span class=cF5>DocCursor</span><span class=cF0>(</span><span class=cF3>FALSE</span><span class=cF0>, doc);
<a name="l21"></a> </span><span class=cF6>&quot;$WW+H,1$&quot;</span><span class=cF0>;
<a name="l22"></a> </span><span class=cF1>while</span><span class=cF0> (</span><span class=cF3>TRUE</span><span class=cF0>)
<a name="l23"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l24"></a> </span><span class=cF5>Refresh</span><span class=cF0>;
<a name="l25"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>MessageScan</span><span class=cF7>(</span><span class=cF0>&amp;ch,, </span><span class=cFE>1</span><span class=cF0> &lt;&lt; </span><span class=cF3>MESSAGE_KEY_DOWN</span><span class=cF7>)</span><span class=cF0> &amp;&amp; </span><span class=cF7>(</span><span class=cF0>ch == </span><span class=cF3>CH_ESC</span><span class=cF0> || ch == </span><span class=cF3>CH_SHIFT_ESC</span><span class=cF7>)</span><span class=cF0>)
<a name="l26"></a> {
<a name="l27"></a> </span><span class=cF5>Kill</span><span class=cF0>(tour_task-&gt;parent_task, </span><span class=cF3>FALSE</span><span class=cF0>);
<a name="l28"></a> </span><span class=cF1>break</span><span class=cF0>;
<a name="l29"></a> }
<a name="l30"></a> </span><span class=cF5>DocLock</span><span class=cF0>(doc);
<a name="l31"></a> </span><span class=cF1>if</span><span class=cF0> (ch == </span><span class=cF3>CH_SPACE</span><span class=cF0> &amp;&amp; doc-&gt;cur_entry != doc) {
<a name="l32"></a> </span><span class=cF1>if</span><span class=cF0> (doc-&gt;cur_entry-&gt;de_flags &amp; </span><span class=cF3>DOCEF_LINK</span><span class=cF0>)
<a name="l33"></a> </span><span class=cF6>''</span><span class=cF0> </span><span class=cF3>CH_SPACE</span><span class=cF0>;
<a name="l34"></a> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF1>if</span><span class=cF0> (doc-&gt;cur_entry-&gt;type_u8 == </span><span class=cF3>DOCT_BTTN</span><span class=cF0>)
<a name="l35"></a> tour_okay_pressed = </span><span class=cF3>TRUE</span><span class=cF0>;
<a name="l36"></a> }
<a name="l37"></a> </span><span class=cF5>DocUnlock</span><span class=cF0>(doc);
<a name="l38"></a> </span><span class=cF1>if</span><span class=cF0> (tour_okay_pressed)
<a name="l39"></a> {
<a name="l40"></a> </span><span class=cF5>Fs</span><span class=cF0>-&gt;win_inhibit = </span><span class=cF3>WIG_NO_FOCUS_TASK_DEFAULT</span><span class=cF0>;
<a name="l41"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cFB>sys_focus_task</span><span class=cF0> == </span><span class=cF5>Fs</span><span class=cF0>)
<a name="l42"></a> </span><span class=cF5>WinRefocus</span><span class=cF0>;
<a name="l43"></a> }
<a name="l44"></a> </span><span class=cF1>else</span><span class=cF0>
<a name="l45"></a> {
<a name="l46"></a> </span><span class=cF5>Fs</span><span class=cF0>-&gt;win_inhibit = </span><span class=cFE>0</span><span class=cF0>;
<a name="l47"></a> </span><span class=cF5>WinFocus</span><span class=cF0>;
<a name="l48"></a> }
<a name="l49"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l50"></a> tour_put = </span><span class=cF3>NULL</span><span class=cF0>;
<a name="l51"></a>}
<a name="l52"></a>
<a name="l53"></a></span><span class=cF1>U0</span><span class=cF0> TourPut(</span><span class=cF1>U8</span><span class=cF0> *st,</span><span class=cF1>Bool</span><span class=cF0> wait_okay=</span><span class=cF3>FALSE</span><span class=cF0>)
<a name="l54"></a>{
<a name="l55"></a> </span><span class=cF9>CDoc</span><span class=cF0> *doc;
<a name="l56"></a> </span><span class=cF9>CTask</span><span class=cF0> *old_focus_task;
<a name="l57"></a>
<a name="l58"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>TaskValidate</span><span class=cF7>(</span><span class=cF0>tour_put</span><span class=cF7>)</span><span class=cF0>)
<a name="l59"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l60"></a> doc = </span><span class=cF5>DocPut</span><span class=cF0>(tour_put);
<a name="l61"></a> </span><span class=cF5>DocClear</span><span class=cF0>(doc);
<a name="l62"></a> </span><span class=cF5>DocPrint</span><span class=cF0>(doc, </span><span class=cF6>&quot;%s&quot;</span><span class=cF0>, st);
<a name="l63"></a> </span><span class=cF1>if</span><span class=cF0> (!wait_okay)
<a name="l64"></a> tour_okay_pressed = </span><span class=cF3>TRUE</span><span class=cF0>;
<a name="l65"></a> </span><span class=cF1>else</span><span class=cF0>
<a name="l66"></a> {
<a name="l67"></a> </span><span class=cF5>DocPrint</span><span class=cF0>(doc, </span><span class=cF6>&quot;\n\n$CM-RE+CX,LE=-2$$BT,\&quot;Okay\&quot;,LM=\&quot;b\&quot;$\n\n&quot;</span><span class=cF0>);
<a name="l68"></a> </span><span class=cF5>DocFormBwd</span><span class=cF0>(doc);
<a name="l69"></a> old_focus_task = </span><span class=cFB>sys_focus_task</span><span class=cF0>;
<a name="l70"></a> tour_okay_pressed = </span><span class=cF3>FALSE</span><span class=cF0>;
<a name="l71"></a> </span><span class=cF1>do</span><span class=cF0> </span><span class=cF5>Refresh</span><span class=cF0>;
<a name="l72"></a> </span><span class=cF1>while</span><span class=cF0> (!tour_okay_pressed);
<a name="l73"></a> </span><span class=cF5>WinFocus</span><span class=cF0>(old_focus_task);
<a name="l74"></a> </span><span class=cF5>DocClear</span><span class=cF0>(doc);
<a name="l75"></a> }
<a name="l76"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l77"></a> </span><span class=cF1>else</span><span class=cF0>
<a name="l78"></a> </span><span class=cF5>Kill</span><span class=cF0>(tour_task,, </span><span class=cF3>TRUE</span><span class=cF0>);
<a name="l79"></a>}
<a name="l80"></a>
<a name="l81"></a></span><span class=cF1>public</span><span class=cF0> </span><span class=cF9>I64</span><span class=cF0> PopUpTourPart()
<a name="l82"></a>{
<a name="l83"></a> </span><span class=cF9>I64</span><span class=cF0> i;
<a name="l84"></a> </span><span class=cF9>CDoc</span><span class=cF0> *doc = </span><span class=cF5>DocNew</span><span class=cF0>;
<a name="l85"></a>
<a name="l86"></a> </span><span class=cF5>DocPrint</span><span class=cF0>(doc, </span><span class=cF6>&quot;$PURPLE$ZealOS Tours$FG$\n\n&quot;</span><span class=cF0>
<a name="l87"></a> </span><span class=cF6>&quot;$CM+LX,4,4$$BT,\&quot;Part 1: The help system\&quot;,LE=1$&quot;</span><span class=cF0>
<a name="l88"></a> </span><span class=cF6>&quot;$CM+LX,4,4$$BT,\&quot;Part 2: The basics\&quot;,LE=2$&quot;</span><span class=cF0>
<a name="l89"></a> </span><span class=cF6>&quot;$CM+LX,4,4$$BT,\&quot;Part 3: Editing and running programs\&quot;,LE=3$&quot;</span><span class=cF0>
<a name="l90"></a> </span><span class=cF6>&quot;$CM+LX,4,4$$BT,\&quot;Part 4: Adding macros to PersonalMenu\&quot;,LE=4$&quot;</span><span class=cF0>
<a name="l91"></a> </span><span class=cF6>&quot;$CM+LX,4,4$$BT,\&quot;Part 5: Choose filename, choose dir\&quot;,LE=5$&quot;</span><span class=cF0>
<a name="l92"></a> </span><span class=cF6>&quot;$CM+LX,4,4$$BT,\&quot;Part 6: AutoComplete\&quot;,LE=6$&quot;</span><span class=cF0>
<a name="l93"></a> </span><span class=cF6>&quot;$CM+LX,4,4$$BT,\&quot;Part 7: Search (Find)\&quot;,LE=7$&quot;</span><span class=cF0>
<a name="l94"></a> </span><span class=cF6>&quot;$CM+LX,4,4$$BT,\&quot;Part 8: ZealOS file masks\&quot;,LE=8$&quot;</span><span class=cF0>
<a name="l95"></a> </span><span class=cF6>&quot;$CM+LX,4,4$$BT,\&quot;Part 9: Editor filter\&quot;,LE=9$&quot;</span><span class=cF0>
<a name="l96"></a> </span><span class=cF6>&quot;$CM+LX,4,4$$BT,\&quot;Part 10: Debugging\&quot;,LE=10$&quot;</span><span class=cF0>
<a name="l97"></a> </span><span class=cF6>&quot;$CM+LX,4,4$$BT,\&quot;Part 11: Wow!!\&quot;,LE=11$&quot;</span><span class=cF0>
<a name="l98"></a> </span><span class=cF6>&quot;$CM+LX,4,4$$BT,\&quot;Part 12: Test Suite\&quot;,LE=12$&quot;</span><span class=cF0>
<a name="l99"></a> </span><span class=cF6>&quot;$CM+LX,4,4$$BT,\&quot;Done\&quot;,LE=DOCM_CANCEL$\n&quot;</span><span class=cF0>);
<a name="l100"></a> doc-&gt;flags |= </span><span class=cF3>DOCF_FORM</span><span class=cF0>;
<a name="l101"></a> i = </span><span class=cF5>PopUpPrint</span><span class=cF0>(</span><span class=cF6>&quot;WinMax;DocMenu(0x%X,0);&quot;</span><span class=cF0>, doc);
<a name="l102"></a> </span><span class=cF5>DocDel</span><span class=cF0>(doc);
<a name="l103"></a>
<a name="l104"></a> </span><span class=cF1>return</span><span class=cF0> i;
<a name="l105"></a>}
<a name="l106"></a>
<a name="l107"></a></span><span class=cF1>U0</span><span class=cF0> TourMenu()
<a name="l108"></a>{
<a name="l109"></a> </span><span class=cF1>U8</span><span class=cF0> buf[</span><span class=cF3>STR_LEN</span><span class=cF0>];
<a name="l110"></a> </span><span class=cF9>I64</span><span class=cF0> i;
<a name="l111"></a>
<a name="l112"></a> tour_task = </span><span class=cF5>Fs</span><span class=cF0>;
<a name="l113"></a> tour_okay_pressed = </span><span class=cF3>TRUE</span><span class=cF0>;
<a name="l114"></a> tour_put = </span><span class=cF5>Spawn</span><span class=cF0>(&amp;TourPutTask, </span><span class=cF3>NULL</span><span class=cF0>, </span><span class=cF6>&quot;TourPut&quot;</span><span class=cF0>,, </span><span class=cF5>Fs</span><span class=cF0>);
<a name="l115"></a> </span><span class=cF5>TaskWait</span><span class=cF0>(tour_put);
<a name="l116"></a> </span><span class=cF1>while</span><span class=cF0> (</span><span class=cF3>TRUE</span><span class=cF0>)
<a name="l117"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l118"></a> </span><span class=cF5>Cd</span><span class=cF0>(</span><span class=cF3>__DIR__</span><span class=cF0>);
<a name="l119"></a> </span><span class=cF5>AutoComplete</span><span class=cF0>;
<a name="l120"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>LBtr</span><span class=cF7>(</span><span class=cF0>&amp;tour_put-&gt;display_flags, </span><span class=cF3>DISPLAYf_SHOW</span><span class=cF7>)</span><span class=cF0>)
<a name="l121"></a> </span><span class=cF5>WinZBufUpdate</span><span class=cF0>;
<a name="l122"></a> i = PopUpTourPart;
<a name="l123"></a> </span><span class=cF1>if</span><span class=cF0> (i &gt; </span><span class=cFE>0</span><span class=cF0>)
<a name="l124"></a> {
<a name="l125"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF5>LBts</span><span class=cF7>(</span><span class=cF0>&amp;tour_put-&gt;display_flags, </span><span class=cF3>DISPLAYf_SHOW</span><span class=cF7>)</span><span class=cF0>)
<a name="l126"></a> </span><span class=cF5>WinZBufUpdate</span><span class=cF0>;
<a name="l127"></a> </span><span class=cF5>StrPrint</span><span class=cF0>(buf, </span><span class=cF6>&quot;Tour%X.IN&quot;</span><span class=cF0>, i);
<a name="l128"></a> </span><span class=cF5>ExeFile</span><span class=cF0>(buf);
<a name="l129"></a> }
<a name="l130"></a> </span><span class=cF1>else</span><span class=cF0>
<a name="l131"></a> </span><span class=cF1>break</span><span class=cF0>;
<a name="l132"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l133"></a> </span><span class=cF5>Kill</span><span class=cF0>(tour_put);
<a name="l134"></a>}
<a name="l135"></a>
<a name="l136"></a></span><span class=cF6>&quot;DocClear;WinMax;\n&quot;</span><span class=cF0>;
<a name="l137"></a></span><span class=cF5>Refresh</span><span class=cF0>(</span><span class=cFE>2</span><span class=cF0>);
<a name="l138"></a>TourMenu;
<a name="l139"></a></span><span class=cF5>Message</span><span class=cF0>(</span><span class=cF3>MESSAGE_KEY_DOWN</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, </span><span class=cF3>SC_CURSOR_DOWN</span><span class=cF0> | </span><span class=cF3>SCF_CTRL</span><span class=cF0>);
<a name="l140"></a></span><span class=cF6>&quot;Cd;Dir;\n&quot;</span><span class=cF0>;
</span></pre></body>
</html>