2021-07-03 05:07:57 +01:00
<!DOCTYPE HTML>
< html >
< head >
< meta http-equiv = "Content-Type" content = "text/html;charset=US-ASCII" >
2021-07-11 22:47:19 +01:00
< meta name = "generator" content = "ZealOS V0.07" >
2021-07-03 05:07:57 +01:00
< style type = "text/css" >
body {background-color:#000000;}
.cF0{color:#ffffff;background-color:#000000;}
.cF1{color:#3465a4;background-color:#000000;}
.cF2{color:#4e9a06;background-color:#000000;}
.cF3{color:#06989a;background-color:#000000;}
.cF4{color:#a24444;background-color:#000000;}
.cF5{color:#75507b;background-color:#000000;}
.cF6{color:#ce982f;background-color:#000000;}
.cF7{color:#bcc0b9;background-color:#000000;}
.cF8{color:#555753;background-color:#000000;}
.cF9{color:#729fcf;background-color:#000000;}
.cFA{color:#82bc49;background-color:#000000;}
.cFB{color:#34e2e2;background-color:#000000;}
.cFC{color:#ac3535;background-color:#000000;}
.cFD{color:#ad7fa8;background-color:#000000;}
.cFE{color:#fce94f;background-color:#000000;}
.cFF{color:#000000;background-color:#000000;}
< / style >
< / head >
< body >
2021-07-05 01:12:38 +01:00
< pre style = "font-family:monospace;font-size:12pt" >
2021-07-03 05:07:57 +01:00
< a name = "l1" > < / a > < span class = cF0 > #< / span > < span class = cF1 > help_index< / span > < span class = cF0 > < / span > < span class = cF6 > " Task/Settings" < / span > < span class = cF0 >
< a name = "l2" > < / a >
< a name = "l3" > < / a > < / span > < span class = cF1 > public< / span > < span class = cF0 > < / span > < span class = cF9 > CTaskSettings< / span > < span class = cF0 > *< / span > < span class = cF5 > SettingsPush< / span > < span class = cF0 > (< / span > < span class = cF9 > CTask< / span > < span class = cF0 > *task = < / span > < span class = cF3 > NULL< / span > < span class = cF0 > , < / span > < span class = cF9 > I64< / span > < span class = cF0 > flags = < / span > < span class = cFE > 0< / span > < span class = cF0 > )
< a name = "l4" > < / a > {< / span > < span class = cF2 > //Typically, called at start of an application.< / span > < span class = cF0 >
< a name = "l5" > < / a > < / span > < span class = cF2 > //It saves many settings so they can be restored< / span > < span class = cF0 >
2021-07-05 01:57:09 +01:00
< a name = "l6" > < / a > < / span > < span class = cF2 > //at the end of the application with < / span > < a href = "https://tomawezome.github.io/ZealOS/System/TaskSettings.CC.html#l97" > < span class = cF4 > SettingsPop< / span > < / a > < span class = cF2 > ().< / span > < span class = cF0 >
2021-07-03 05:07:57 +01:00
< a name = "l7" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l8" > < / a > < / span > < span class = cF9 > CTaskSettings< / span > < span class = cF0 > *tmpse;
< a name = "l9" > < / a > < / span > < span class = cF9 > CDoc< / span > < span class = cF0 > *doc;
2021-07-03 05:07:57 +01:00
< a name = "l10" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l11" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (!task)
< a name = "l12" > < / a > task = < / span > < span class = cF5 > Fs< / span > < span class = cF0 > ;
< a name = "l13" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (!< / span > < span class = cF5 > TaskValidate< / span > < span class = cF7 > (< / span > < span class = cF0 > task< / span > < span class = cF7 > )< / span > < span class = cF0 > )
< a name = "l14" > < / a > < / span > < span class = cF1 > return< / span > < span class = cF0 > < / span > < span class = cF3 > NULL< / span > < span class = cF0 > ;
< a name = "l15" > < / a > tmpse = < / span > < span class = cF5 > CAlloc< / span > < span class = cF0 > (< / span > < span class = cF1 > sizeof< / span > < span class = cF7 > (< / span > < span class = cF9 > CTaskSettings< / span > < span class = cF7 > )< / span > < span class = cF0 > , task);
< a name = "l16" > < / a > tmpse-> cur_dir = < / span > < span class = cF5 > DirCur< / span > < span class = cF0 > (task, task);
< a name = "l17" > < / a > tmpse-> draw_it = task-> draw_it;
< a name = "l18" > < / a > < / span > < span class = cF5 > GrPaletteGet< / span > < span class = cF0 > (tmpse-> palette);
< a name = "l19" > < / a > tmpse-> task_end_cb = task-> task_end_cb;
2021-07-03 05:07:57 +01:00
< a name = "l20" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l21" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (!< / span > < span class = cF7 > (< / span > < span class = cF0 > flags & < / span > < span class = cF3 > TSF_SAME_SONG< / span > < span class = cF7 > )< / span > < span class = cF0 > )
< a name = "l22" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l23" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (tmpse-> song_task = task-> song_task)
< a name = "l24" > < / a > {
< a name = "l25" > < / a > < / span > < span class = cF5 > Suspend< / span > < span class = cF0 > (task-> song_task);
< a name = "l26" > < / a > < / span > < span class = cF5 > Sound< / span > < span class = cF0 > ;
< a name = "l27" > < / a > }
< a name = "l28" > < / a > task-> song_task = < / span > < span class = cF3 > NULL< / span > < span class = cF0 > ;
< a name = "l29" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
2021-07-03 05:07:57 +01:00
< a name = "l30" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l31" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (tmpse-> animate_task = task-> animate_task)
< a name = "l32" > < / a > < / span > < span class = cF5 > Suspend< / span > < span class = cF0 > (task-> animate_task);
< a name = "l33" > < / a > task-> animate_task = < / span > < span class = cF3 > NULL< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l34" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l35" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (doc = < / span > < span class = cF5 > DocPut< / span > < span class = cF7 > (< / span > < span class = cF0 > task< / span > < span class = cF7 > )< / span > < span class = cF0 > )
< a name = "l36" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l37" > < / a > tmpse-> hide_cursor = !< / span > < span class = cF5 > Bt< / span > < span class = cF0 > (& doc-> flags, < / span > < span class = cF3 > DOCf_HIDE_CURSOR< / span > < span class = cF0 > );
< a name = "l38" > < / a > tmpse-> highlight_cursor = !< / span > < span class = cF5 > Bt< / span > < span class = cF0 > (& doc-> flags, < / span > < span class = cF3 > DOCf_DONT_HIGHLIGHT_CURSOR< / span > < span class = cF0 > );
< a name = "l39" > < / a > tmpse-> scroll = !< / span > < span class = cF5 > Bt< / span > < span class = cF0 > (& doc-> flags, < / span > < span class = cF3 > DOCf_NO_SCROLL_BARS< / span > < span class = cF0 > );
< a name = "l40" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
2021-07-03 05:07:57 +01:00
< a name = "l41" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l42" > < / a > tmpse-> left = task-> win_left;
< a name = "l43" > < / a > tmpse-> right = task-> win_right;
< a name = "l44" > < / a > tmpse-> top = task-> win_top;
< a name = "l45" > < / a > tmpse-> bottom = task-> win_bottom;
2021-07-03 05:07:57 +01:00
< a name = "l46" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l47" > < / a > tmpse-> scroll_x = task-> scroll_x;
< a name = "l48" > < / a > tmpse-> scroll_y = task-> scroll_y;
< a name = "l49" > < / a > tmpse-> scroll_z = task-> scroll_z;
2021-07-03 05:07:57 +01:00
< a name = "l50" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l51" > < / a > tmpse-> win_inhibit = task-> win_inhibit;
< a name = "l52" > < / a > tmpse-> text_attr = task-> text_attr;
< a name = "l53" > < / a > < / span > < span class = cF5 > StrCopy< / span > < span class = cF0 > (tmpse-> task_title, task-> task_title);
< a name = "l54" > < / a > tmpse-> title_src = task-> title_src;
< a name = "l55" > < / a > tmpse-> border_attr = task-> border_attr;
< a name = "l56" > < / a > tmpse-> border_src = task-> border_src;
< a name = "l57" > < / a > tmpse-> border = !< / span > < span class = cF5 > Bt< / span > < span class = cF0 > (& task-> display_flags, < / span > < span class = cF3 > DISPLAYf_NO_BORDER< / span > < span class = cF0 > );
< 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 = cFB > ac< / span > < span class = cF0 > .task< / span > < span class = cF7 > )< / span > < span class = cF0 > )
< a name = "l59" > < / a > tmpse-> autocomplete = < / span > < span class = cF3 > TRUE< / span > < span class = cF0 > ;
< a name = "l60" > < / a > < / span > < span class = cF1 > else< / span > < span class = cF0 >
< a name = "l61" > < / a > tmpse-> autocomplete = < / span > < span class = cF3 > FALSE< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l62" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l63" > < / a > tmpse-> next = task-> next_settings;
< a name = "l64" > < / a > task-> next_settings = tmpse;
2021-07-03 05:07:57 +01:00
< a name = "l65" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l66" > < / a > < / span > < span class = cF1 > return< / span > < span class = cF0 > tmpse;
2021-07-03 05:07:57 +01:00
< a name = "l67" > < / a > }
< a name = "l68" > < / a >
< a name = "l69" > < / a > < / span > < span class = cF1 > U0< / span > < span class = cF0 > < / span > < span class = cF5 > SettingsPop2< / span > < span class = cF0 > (< / span > < span class = cF9 > CTask< / span > < span class = cF0 > *task, < / span > < span class = cF9 > CTaskSettings< / span > < span class = cF0 > *tmpse)
< a name = "l70" > < / a > {
2021-07-04 23:11:34 +01:00
< a name = "l71" > < / a > < / span > < span class = cF9 > CDoc< / span > < span class = cF0 > *doc;
2021-07-03 05:07:57 +01:00
< a name = "l72" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l73" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (doc = < / span > < span class = cF5 > DocPut< / span > < span class = cF7 > (< / span > < span class = cF0 > task< / span > < span class = cF7 > )< / span > < span class = cF0 > )
< a name = "l74" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l75" > < / a > < / span > < span class = cF5 > LBEqual< / span > < span class = cF0 > (& doc-> flags, < / span > < span class = cF3 > DOCf_HIDE_CURSOR< / span > < span class = cF0 > , !tmpse-> hide_cursor);
< a name = "l76" > < / a > < / span > < span class = cF5 > LBEqual< / span > < span class = cF0 > (& doc-> flags, < / span > < span class = cF3 > DOCf_DONT_HIGHLIGHT_CURSOR< / span > < span class = cF0 > , !tmpse-> highlight_cursor);
< a name = "l77" > < / a > < / span > < span class = cF5 > LBEqual< / span > < span class = cF0 > (& doc-> flags, < / span > < span class = cF3 > DOCf_NO_SCROLL_BARS< / span > < span class = cF0 > , !tmpse-> scroll);
< a name = "l78" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
2021-07-03 05:07:57 +01:00
< a name = "l79" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l80" > < / a > < / span > < span class = cF5 > WinBorder< / span > < span class = cF0 > (tmpse-> border, task);
< a name = "l81" > < / a > < / span > < span class = cF5 > WinHorz< / span > < span class = cF0 > (tmpse-> left, tmpse-> right, task);
< a name = "l82" > < / a > < / span > < span class = cF5 > WinVert< / span > < span class = cF0 > (tmpse-> top, tmpse-> bottom, task);
< a name = "l83" > < / a > task-> scroll_x = tmpse-> scroll_x;
< a name = "l84" > < / a > task-> scroll_y = tmpse-> scroll_y;
< a name = "l85" > < / a > task-> scroll_z = tmpse-> scroll_z;
< a name = "l86" > < / a > task-> win_inhibit = tmpse-> win_inhibit;
< a name = "l87" > < / a > task-> text_attr = tmpse-> text_attr;
< a name = "l88" > < / a > task-> border_attr = tmpse-> border_attr;
< a name = "l89" > < / a > task-> border_src = tmpse-> border_src;
< a name = "l90" > < / a > task-> title_src = tmpse-> title_src;
< a name = "l91" > < / a > < / span > < span class = cF5 > StrCopy< / span > < span class = cF0 > (task-> task_title, tmpse-> task_title);
< a name = "l92" > < / a > < / span > < span class = cF5 > AutoComplete< / span > < span class = cF0 > (tmpse-> autocomplete);
< a name = "l93" > < / a > < / span > < span class = cF5 > GrPaletteSet< / span > < span class = cF0 > (tmpse-> palette);
< a name = "l94" > < / a > < / span > < span class = cF5 > Sound< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l95" > < / a > }
< a name = "l96" > < / a >
< a name = "l97" > < / a > < / span > < span class = cF1 > public< / span > < span class = cF0 > < / span > < span class = cF1 > U0< / span > < span class = cF0 > < / span > < span class = cF5 > SettingsPop< / span > < span class = cF0 > (< / span > < span class = cF9 > CTask< / span > < span class = cF0 > *task=< / span > < span class = cF3 > NULL< / span > < span class = cF0 > ,< / span > < span class = cF9 > I64< / span > < span class = cF0 > flags=< / span > < span class = cFE > 0< / span > < span class = cF0 > )
< a name = "l98" > < / a > {< / span > < span class = cF2 > //Typically, called at end of an application.< / span > < span class = cF0 >
2021-07-04 23:11:34 +01:00
< a name = "l99" > < / a > < / span > < span class = cF9 > CTaskSettings< / span > < span class = cF0 > *tmpse;
2021-07-03 05:07:57 +01:00
< a name = "l100" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l101" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (!task)
< a name = "l102" > < / a > task = < / span > < span class = cF5 > Fs< / span > < span class = cF0 > ;
< a name = "l103" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (!< / span > < span class = cF5 > TaskValidate< / span > < span class = cF7 > (< / span > < span class = cF0 > task< / span > < span class = cF7 > )< / span > < span class = cF0 > )
< a name = "l104" > < / a > < / span > < span class = cF1 > return< / span > < span class = cF0 > ;
< a name = "l105" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (tmpse = task-> next_settings)
< a name = "l106" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l107" > < / a > task-> next_settings = tmpse-> next;
< a name = "l108" > < / a > < / span > < span class = cF5 > Cd< / span > < span class = cF0 > (tmpse-> cur_dir);
< a name = "l109" > < / a > < / span > < span class = cF5 > Free< / span > < span class = cF0 > (tmpse-> cur_dir);
< a name = "l110" > < / a > task-> draw_it = tmpse-> draw_it;
< a name = "l111" > < / a > task-> task_end_cb = tmpse-> task_end_cb;
2021-07-03 05:07:57 +01:00
< a name = "l112" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l113" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (task-> animate_task)
< a name = "l114" > < / a > < / span > < span class = cF5 > Kill< / span > < span class = cF0 > (task-> animate_task);
< a name = "l115" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (task-> animate_task = tmpse-> animate_task)
< a name = "l116" > < / a > < / span > < span class = cF5 > Suspend< / span > < span class = cF0 > (task-> animate_task,< / span > < span class = cF3 > FALSE< / span > < span class = cF0 > );
2021-07-03 05:07:57 +01:00
< a name = "l117" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l118" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (!< / span > < span class = cF7 > (< / span > < span class = cF0 > flags & < / span > < span class = cF3 > TSF_SAME_SONG< / span > < span class = cF7 > )< / span > < span class = cF0 > )
< a name = "l119" > < / a > {
< a name = "l120" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (task-> song_task)
< a name = "l121" > < / a > < / span > < span class = cF5 > Kill< / span > < span class = cF0 > (task-> song_task);
< a name = "l122" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (task-> song_task = tmpse-> song_task)
< a name = "l123" > < / a > < / span > < span class = cF5 > Suspend< / span > < span class = cF0 > (task-> song_task,< / span > < span class = cF3 > FALSE< / span > < span class = cF0 > );
< a name = "l124" > < / a > }
2021-07-03 05:07:57 +01:00
< a name = "l125" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l126" > < / a > < / span > < span class = cF5 > SettingsPop2< / span > < span class = cF0 > (task, tmpse); < / span > < span class = cF2 > //Do it to get ress fast< / span > < span class = cF0 >
< a name = "l127" > < / a > < / span > < span class = cF5 > Refresh< / span > < span class = cF0 > (, < / span > < span class = cF3 > TRUE< / span > < span class = cF0 > );
< a name = "l128" > < / a > < / span > < span class = cF5 > SettingsPop2< / span > < span class = cF0 > (task, tmpse); < / span > < span class = cF2 > //Redo in case was lost by old update< / span > < span class = cF0 >
2021-07-03 05:07:57 +01:00
< a name = "l129" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l130" > < / a > < / span > < span class = cF5 > Free< / span > < span class = cF0 > (tmpse);
< a name = "l131" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
2021-07-03 05:07:57 +01:00
< a name = "l132" > < / a > }
< / span > < / pre > < / body >
< / html >