2021-07-03 05:07:57 +01:00
<!DOCTYPE HTML>
< html >
< head >
< meta http-equiv = "Content-Type" content = "text/html;charset=US-ASCII" >
2021-08-17 07:47:37 +01:00
< meta name = "generator" content = "ZealOS V1.00" >
2021-07-03 05:07:57 +01:00
< style type = "text/css" >
2021-07-29 03:20:15 +01:00
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;}
2021-07-03 05:07:57 +01:00
< / 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 = cF1 > class< / span > < span class = cF0 > < / span > < span class = cF9 > CTemplateCSSlider< / span > < span class = cF0 >
< a name = "l2" > < / a > {
2021-07-04 23:11:34 +01:00
< a name = "l3" > < / a > < / span > < span class = cF9 > CTemplateCSSlider< / span > < span class = cF0 > *next, *last;
< a name = "l4" > < / a > < / span > < span class = cF1 > U8< / span > < span class = cF0 > *name;
< a name = "l5" > < / a > < / span > < span class = cF9 > I64< / span > < span class = cF0 > num;
2021-07-03 05:07:57 +01:00
< a name = "l6" > < / a > };
< a name = "l7" > < / a >
< a name = "l8" > < / a > < / span > < span class = cF1 > class< / span > < span class = cF0 > < / span > < span class = cF9 > CTemplateCS< / span > < span class = cF0 >
< a name = "l9" > < / a > {
2021-07-04 23:11:34 +01:00
< a name = "l10" > < / a > < / span > < span class = cF9 > CTemplateCSSlider< / span > < span class = cF0 > *next_slider, *last_slider;
< a name = "l11" > < / a > < / span > < span class = cF9 > I64< / span > < span class = cF0 > num_sliders, range, spacing, border;
< a name = "l12" > < / a > < / span > < span class = cF1 > U8< / span > < span class = cF0 > *global_name;
2021-07-03 05:07:57 +01:00
< a name = "l13" > < / a > };
< a name = "l14" > < / a >
< a name = "l15" > < / a > < / span > < span class = cF9 > CTemplateCS< / span > < span class = cF0 > *< / span > < span class = cF5 > CtrlSliderGet< / span > < span class = cF0 > ()
< a name = "l16" > < / a > {
2021-07-04 23:11:34 +01:00
< a name = "l17" > < / a > < / span > < span class = cF9 > CTemplateCSSlider< / span > < span class = cF0 > *tmps;
< a name = "l18" > < / a > < / span > < span class = cF1 > U8< / span > < span class = cF0 > *st, prompt[< / span > < span class = cF3 > STR_LEN< / span > < span class = cF0 > ];
< a name = "l19" > < / a > < / span > < span class = cF9 > CTemplateCS< / span > < span class = cF0 > *res = < / span > < span class = cF5 > CAlloc< / span > < span class = cF0 > (< / span > < span class = cF1 > sizeof< / span > < span class = cF7 > (< / span > < span class = cF9 > CTemplateCS< / span > < span class = cF7 > )< / span > < span class = cF0 > );
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 = cF6 > " $PURPLE$Ctrl Slider$FG$\n\n" < / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l22" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l23" > < / a > res-> global_name = < / span > < span class = cF5 > StrGet< / span > < span class = cF0 > (< / span > < span class = cF6 > " Global Struct Name (ENTER for No Global):" < / span > < span class = cF0 > );
< a name = "l24" > < / a > res-> range = < / span > < span class = cF5 > I64Get< / span > < span class = cF0 > (< / span > < span class = cF6 > " Range < / span > < span class = cF0 > < / span > < span class = cF6 > (%4d):" < / span > < span class = cF0 > , < / span > < span class = cFE > 30< / span > < span class = cF0 > );
< a name = "l25" > < / a > res-> spacing = < / span > < span class = cF5 > I64Get< / span > < span class = cF0 > (< / span > < span class = cF6 > " Spacing (%4d):" < / span > < span class = cF0 > , < / span > < span class = cFE > 20< / span > < span class = cF0 > );
< a name = "l26" > < / a > res-> border = < / span > < span class = cF5 > I64Get< / span > < span class = cF0 > (< / span > < span class = cF6 > " Border (%4d):" < / span > < span class = cF0 > , < / span > < span class = cFE > 2< / span > < span class = cF0 > );
2021-07-03 05:07:57 +01:00
< a name = "l27" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l28" > < / a > res-> next_slider = res-> last_slider = & res-> next_slider;
2021-07-03 05:07:57 +01:00
< a name = "l29" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l30" > < / a > < / span > < span class = cF1 > while< / span > < span class = cF0 > (< / span > < span class = cF3 > TRUE< / span > < span class = cF0 > )
< a name = "l31" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l32" > < / a > < / span > < span class = cF5 > StrPrint< / span > < span class = cF0 > (prompt, < / span > < span class = cF6 > " Slider #%d Name:" < / span > < span class = cF0 > , res-> num_sliders + < / span > < span class = cFE > 1< / span > < span class = cF0 > );
< a name = "l33" > < / a > st = < / span > < span class = cF5 > StrGet< / span > < span class = cF0 > (prompt);
< a name = "l34" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (!*st)
< a name = "l35" > < / a > {
< a name = "l36" > < / a > < / span > < span class = cF5 > Free< / span > < span class = cF0 > (st);
< a name = "l37" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
< a name = "l38" > < / a > }
< a name = "l39" > < / a > tmps = < / span > < span class = cF5 > CAlloc< / span > < span class = cF0 > (< / span > < span class = cF1 > sizeof< / span > < span class = cF7 > (< / span > < span class = cF9 > CTemplateCSSlider< / span > < span class = cF7 > )< / span > < span class = cF0 > );
< a name = "l40" > < / a > tmps-> name = st;
< a name = "l41" > < / a > < / span > < span class = cF5 > QueueInsert< / span > < span class = cF0 > (tmps, res-> last_slider);
< a name = "l42" > < / a > tmps-> num = res-> num_sliders++;
< a name = "l43" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l44" > < / a > < / span > < span class = cF1 > return< / span > < span class = cF0 > res;
2021-07-03 05:07:57 +01:00
< a name = "l45" > < / a > }
< a name = "l46" > < / a >
< a name = "l47" > < / a > < / span > < span class = cF1 > U0< / span > < span class = cF0 > < / span > < span class = cF5 > TemplateCtrlSlider< / span > < span class = cF0 > (< / span > < span class = cF9 > CDoc< / span > < span class = cF0 > *doc)
< a name = "l48" > < / a > {
2021-07-04 23:11:34 +01:00
< a name = "l49" > < / a > < / span > < span class = cF9 > CTask< / span > < span class = cF0 > *task;
< a name = "l50" > < / a > < / span > < span class = cF9 > CTemplateCS< / span > < span class = cF0 > *m = < / span > < span class = cF3 > NULL< / span > < span class = cF0 > ;
< a name = "l51" > < / a > < / span > < span class = cF9 > CTemplateCSSlider< / span > < span class = cF0 > *tmps;
< a name = "l52" > < / a > < / span > < span class = cF9 > I64< / span > < span class = cF0 > i;
2021-07-03 05:07:57 +01:00
< a name = "l53" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l54" > < / a > < / span > < span class = cF5 > DocUnlock< / span > < span class = cF0 > (doc);
< a name = "l55" > < / a > < / span > < span class = cF5 > DocRecalc< / span > < span class = cF0 > (doc);
< a name = "l56" > < / a > < / span > < span class = cF5 > DocCaptureUndo< / span > < span class = cF0 > (doc, < / span > < span class = cF3 > TRUE< / span > < span class = cF0 > );
2021-07-03 05:07:57 +01:00
< a name = "l57" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l58" > < / a > task = < / span > < span class = cF5 > User< / span > < span class = cF0 > (< / span > < span class = cF6 > " CTemplateCS **_m = 0x%X; *_m = CtrlSliderGet;\n" < / span > < span class = cF0 > , & m);
< a name = "l59" > < / a > < / span > < span class = cF1 > while< / span > < span class = cF0 > (!m)
< a name = "l60" > < / a > < / span > < span class = cF5 > Yield< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l61" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l62" > < / a > < / span > < span class = cF5 > DocPrint< / span > < span class = cF0 > (doc,
2021-07-03 05:07:57 +01:00
< a name = "l63" > < / a > < / span > < span class = cF6 > " #define SLIDER_RANGE\t%d< / span > < span class = cF0 >
< a name = "l64" > < / a > < / span > < span class = cF6 > #define SLIDER_SPACING\t%d< / span > < span class = cF0 >
< a name = "l65" > < / a > < / span > < span class = cF6 > #define SLIDER_BORDER\t%d< / span > < span class = cF0 >
< a name = "l66" > < / a >
< a name = "l67" > < / a > < / span > < span class = cF6 > class CSliderState< / span > < span class = cF0 >
< a name = "l68" > < / a > < / span > < span class = cF6 > {< / span > < span class = cF0 >
< a name = "l69" > < / a > < / span > < span class = cF6 > " < / span > < span class = cF0 > , m-> range, m-> spacing, m-> border);
< a name = "l70" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l71" > < / a > tmps = m-> next_slider;
< a name = "l72" > < / a > < / span > < span class = cF1 > while< / span > < span class = cF0 > (tmps != & m-> next_slider)
< a name = "l73" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l74" > < / a > < / span > < span class = cF5 > DocPrint< / span > < span class = cF0 > (doc, < / span > < span class = cF6 > " < / span > < span class = cF0 > < / span > < span class = cF6 > I64 %s;\n" < / span > < span class = cF0 > , tmps-> name);
< a name = "l75" > < / a > tmps = tmps-> next;
< a name = "l76" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l77" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (*m-> global_name)
< a name = "l78" > < / a > < / span > < span class = cF5 > DocPrint< / span > < span class = cF0 > (doc, < / span > < span class = cF6 > " } %s;\n" < / span > < span class = cF0 > , m-> global_name);
< a name = "l79" > < / a > < / span > < span class = cF1 > else< / span > < span class = cF0 >
< a name = "l80" > < / a > < / span > < span class = cF5 > DocPrint< / span > < span class = cF0 > (doc, < / span > < span class = cF6 > " };\n" < / span > < span class = cF0 > );
2021-07-03 05:07:57 +01:00
< a name = "l81" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l82" > < / a > < / span > < span class = cF5 > DocPrint< / span > < span class = cF0 > (doc,
2021-07-03 05:07:57 +01:00
< a name = "l83" > < / a > < / span > < span class = cF6 > " < / span > < span class = cF0 >
< a name = "l84" > < / a > < / span > < span class = cF6 > U0 DrawCtrlSlider(CDC *dc, CCtrl *c)< / span > < span class = cF0 >
< a name = "l85" > < / a > < / span > < span class = cF6 > {< / span > < span class = cF0 >
2021-07-04 23:11:34 +01:00
< a name = "l86" > < / a > < / span > < span class = cF6 > CSliderState *s = c-> state;< / span > < span class = cF0 >
2021-07-03 05:07:57 +01:00
< a name = "l87" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l88" > < / a > < / span > < span class = cF6 > dc-> color = LTRED;< / span > < span class = cF0 >
< a name = "l89" > < / a > < / span > < span class = cF6 > GrRect(dc, c-> left, c-> top, %d * SLIDER_SPACING + %d, SLIDER_SPACING * 2 + SLIDER_RANGE);< / span > < span class = cF0 >
< a name = "l90" > < / a > < / span > < span class = cF6 > dc-> color = BLUE;< / span > < span class = cF0 >
< a name = "l91" > < / a > < / span > < span class = cF6 > GrRect(dc, c-> left + SLIDER_BORDER, c-> top + SLIDER_BORDER,< / span > < span class = cF0 >
< a name = "l92" > < / a > < / span > < span class = cF6 > %d * SLIDER_SPACING + %d - 2 * SLIDER_BORDER,< / span > < span class = cF0 >
< a name = "l93" > < / a > < / span > < span class = cF6 > SLIDER_SPACING * 2 + SLIDER_RANGE - 2 * SLIDER_BORDER);< / span > < span class = cF0 >
< a name = "l94" > < / a > < / span > < span class = cF6 > dc-> color = BLACK;< / span > < span class = cF0 >
2021-07-03 05:07:57 +01:00
< a name = "l95" > < / a > < / span > < span class = cF6 > " < / span > < span class = cF0 > , m-> num_sliders + < / span > < span class = cFE > 1< / span > < span class = cF0 > , m-> num_sliders, m-> num_sliders + < / span > < span class = cFE > 1< / span > < span class = cF0 > , m-> num_sliders);
< a name = "l96" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l97" > < / a > < / span > < span class = cF1 > for< / span > < span class = cF0 > (i = < / span > < span class = cFE > 0< / span > < span class = cF0 > ; i < m-> num_sliders; i++)
< a name = "l98" > < / a > < / span > < span class = cF5 > DocPrint< / span > < span class = cF0 > (doc,
< a name = "l99" > < / a > < / span > < span class = cF6 > " < / span > < span class = cF0 > < / span > < span class = cF6 > GrLine(dc, c-> left + %d * SLIDER_SPACING + %d, c-> top + SLIDER_SPACING,< / span > < span class = cF0 >
< a name = "l100" > < / a > < / span > < span class = cF6 > c-> left + %d * SLIDER_SPACING + %d, c-> top + SLIDER_SPACING + SLIDER_RANGE - 1);< / span > < span class = cF0 >
2021-07-03 05:07:57 +01:00
< a name = "l101" > < / a > < / span > < span class = cF6 > " < / span > < span class = cF0 > , i + < / span > < span class = cFE > 1< / span > < span class = cF0 > , i, i + < / span > < span class = cFE > 1< / span > < span class = cF0 > , i);
< a name = "l102" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l103" > < / a > < / span > < span class = cF5 > DocPrint< / span > < span class = cF0 > (doc, < / span > < span class = cF6 > " < / span > < span class = cF0 > < / span > < span class = cF6 > dc-> color = LTRED;\n" < / span > < span class = cF0 > );
2021-07-03 05:07:57 +01:00
< a name = "l104" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l105" > < / a > tmps = m-> next_slider;
< a name = "l106" > < / a > < / span > < span class = cF1 > while< / span > < span class = cF0 > (tmps != & m-> next_slider)
< a name = "l107" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l108" > < / a > < / span > < span class = cF5 > DocPrint< / span > < span class = cF0 > (doc,
< a name = "l109" > < / a > < / span > < span class = cF6 > " < / span > < span class = cF0 > < / span > < span class = cF6 > GrPrint(dc, c-> left + %d * SLIDER_SPACING + %d - FONT_WIDTH / 2,< / span > < span class = cF0 >
< a name = "l110" > < / a > < / span > < span class = cF6 > c-> top + SLIDER_SPACING + SLIDER_RANGE + 3,< / span > < span class = cF0 >
< a name = "l111" > < / a > < / span > < span class = cF6 > \" %%d\" , s-> %s * 10 / SLIDER_RANGE);\n" < / span > < span class = cF0 > , tmps-> num + < / span > < span class = cFE > 1< / span > < span class = cF0 > , tmps-> num, tmps-> name);
< a name = "l112" > < / a > tmps = tmps-> next;
< a name = "l113" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
2021-07-03 05:07:57 +01:00
< a name = "l114" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l115" > < / a > tmps = m-> next_slider;
< a name = "l116" > < / a > < / span > < span class = cF1 > while< / span > < span class = cF0 > (tmps != & m-> next_slider)
< a name = "l117" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l118" > < / a > < / span > < span class = cF5 > DocPrint< / span > < span class = cF0 > (doc,
< a name = "l119" > < / a > < / span > < span class = cF6 > " < / span > < span class = cF0 > < / span > < span class = cF6 > GrRect(dc, c-> left + %d * SLIDER_SPACING + %d - 3, " < / span > < span class = cF0 >
< a name = "l120" > < / a > < / span > < span class = cF6 > " c-> top + SLIDER_SPACING + SLIDER_RANGE - 1 - s-> %s - 2, 7, 5);\n" < / span > < span class = cF0 > ,
< a name = "l121" > < / a > tmps-> num + < / span > < span class = cFE > 1< / span > < span class = cF0 > , tmps-> num, tmps-> name);
< a name = "l122" > < / a > tmps = tmps-> next;
< a name = "l123" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l124" > < / a > < / span > < span class = cF5 > DocPrint< / span > < span class = cF0 > (doc, < / span > < span class = cF6 > " < / span > < span class = cF0 > < / span > < span class = cF6 > dc-> color = YELLOW;\n" < / span > < span class = cF0 > );
2021-07-03 05:07:57 +01:00
< a name = "l125" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l126" > < / a > tmps = m-> next_slider;
< a name = "l127" > < / a > < / span > < span class = cF1 > while< / span > < span class = cF0 > (tmps != & m-> next_slider)
< a name = "l128" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l129" > < / a > < / span > < span class = cF5 > DocPrint< / span > < span class = cF0 > (doc, < / span > < span class = cF6 > " < / span > < span class = cF0 > < / span > < span class = cF6 > GrRect(dc, c-> left + %d * SLIDER_SPACING + %d - 2, " < / span > < span class = cF0 >
< a name = "l130" > < / a > < / span > < span class = cF6 > " c-> top + SLIDER_SPACING + SLIDER_RANGE - 1 - s-> %s - 1, 5, 3);\n" < / span > < span class = cF0 > ,
< a name = "l131" > < / a > tmps-> num + < / span > < span class = cFE > 1< / span > < span class = cF0 > , tmps-> num, tmps-> name);
< a name = "l132" > < / a > tmps = tmps-> next;
< a name = "l133" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l134" > < / a > < / span > < span class = cF5 > DocPrint< / span > < span class = cF0 > (doc,
2021-07-03 05:07:57 +01:00
< a name = "l135" > < / a > < / span > < span class = cF6 > " }< / span > < span class = cF0 >
< a name = "l136" > < / a >
< a name = "l137" > < / a > < / span > < span class = cF6 > U0 UpdateDerivedCtrlSlider(CCtrl *c)< / span > < span class = cF0 >
< a name = "l138" > < / a > < / span > < span class = cF6 > {< / span > < span class = cF0 >
2021-07-04 23:11:34 +01:00
< a name = "l139" > < / a > < / span > < span class = cF6 > CSliderState *s = c-> state;< / span > < span class = cF0 >
2021-07-03 05:07:57 +01:00
< a name = "l140" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l141" > < / a > < / span > < span class = cF6 > c-> left = c-> win_task-> pix_width / 2 - (SLIDER_SPACING * 3 + 2) / 2;< / span > < span class = cF0 >
< a name = "l142" > < / a > < / span > < span class = cF6 > c-> right = c-> left + %d * SLIDER_SPACING + %d;< / span > < span class = cF0 >
< a name = "l143" > < / a > < / span > < span class = cF6 > c-> top = c-> win_task-> pix_height / 2 - (SLIDER_SPACING * 2 + SLIDER_RANGE) / 2;< / span > < span class = cF0 >
< a name = "l144" > < / a > < / span > < span class = cF6 > c-> bottom = c-> top + SLIDER_SPACING * 2 + SLIDER_RANGE;< / span > < span class = cF0 >
2021-07-03 05:07:57 +01:00
< a name = "l145" > < / a > < / span > < span class = cF6 > " < / span > < span class = cF0 > , m-> num_sliders + < / span > < span class = cFE > 1< / span > < span class = cF0 > , m-> num_sliders);
< a name = "l146" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l147" > < / a > tmps = m-> next_slider;
< a name = "l148" > < / a > < / span > < span class = cF1 > while< / span > < span class = cF0 > (tmps != & m-> next_slider)
< a name = "l149" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l150" > < / a > < / span > < span class = cF5 > DocPrint< / span > < span class = cF0 > (doc, < / span > < span class = cF6 > " < / span > < span class = cF0 > < / span > < span class = cF6 > s-> %s = ClampI64(s-> %s, 0, SLIDER_RANGE - 1);\n" < / span > < span class = cF0 > , tmps-> name, tmps-> name);
< a name = "l151" > < / a > tmps = tmps-> next;
< a name = "l152" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l153" > < / a > < / span > < span class = cF5 > DocPrint< / span > < span class = cF0 > (doc,
2021-07-03 05:07:57 +01:00
< a name = "l154" > < / a > < / span > < span class = cF6 > " }< / span > < span class = cF0 >
< a name = "l155" > < / a >
< a name = "l156" > < / a > < / span > < span class = cF6 > U0 LeftClickSlider(CCtrl *c, I64 x, I64 y, Bool down)< / span > < span class = cF0 >
< a name = "l157" > < / a > < / span > < span class = cF6 > {< / span > < span class = cF0 >
2021-07-04 23:11:34 +01:00
< a name = "l158" > < / a > < / span > < span class = cF6 > no_warn down;< / span > < span class = cF0 >
< a name = "l159" > < / a > < / span > < span class = cF6 > CSliderState *s = c-> state;< / span > < span class = cF0 >
2021-07-03 05:07:57 +01:00
< a name = "l160" > < / a > < / span > < span class = cF6 > " < / span > < span class = cF0 > );
< a name = "l161" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l162" > < / a > tmps = m-> next_slider;
< a name = "l163" > < / a > < / span > < span class = cF1 > while< / span > < span class = cF0 > (tmps != & m-> next_slider)
< a name = "l164" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l165" > < / a > < / span > < span class = cF5 > DocPrint< / span > < span class = cF0 > (doc, < / span > < span class = cF6 > " < / span > < span class = cF0 > < / span > < span class = cF6 > " < / span > < span class = cF0 > );
< a name = "l166" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (tmps != m-> next_slider)
< a name = "l167" > < / a > < / span > < span class = cF5 > DocPrint< / span > < span class = cF0 > (doc, < / span > < span class = cF6 > " else " < / span > < span class = cF0 > );
< a name = "l168" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (tmps-> next == & m-> next_slider)
< a name = "l169" > < / a > < / span > < span class = cF5 > DocPrint< / span > < span class = cF0 > (doc, < / span > < span class = cF6 > " \n" < / span > < span class = cF0 > );
< a name = "l170" > < / a > < / span > < span class = cF1 > else< / span > < span class = cF0 >
< a name = "l171" > < / a > < / span > < span class = cF5 > DocPrint< / span > < span class = cF0 > (doc, < / span > < span class = cF6 > " if (x < c-> left + %d * SLIDER_SPACING + %d + SLIDER_SPACING / 2)\n" < / span > < span class = cF0 > , tmps-> num + < / span > < span class = cFE > 1< / span > < span class = cF0 > , tmps-> num);
< a name = "l172" > < / a > < / span > < span class = cF5 > DocPrint< / span > < span class = cF0 > (doc, < / span > < span class = cF6 > " < / span > < span class = cF0 > < / span > < span class = cF6 > s-> %s = SLIDER_RANGE - 1 - (y - (c-> top + SLIDER_SPACING));\n" < / span > < span class = cF0 > , tmps-> name);
< a name = "l173" > < / a > tmps = tmps-> next;
< a name = "l174" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
2021-07-03 05:07:57 +01:00
< a name = "l175" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l176" > < / a > < / span > < span class = cF5 > DocPrint< / span > < span class = cF0 > (doc,
< a name = "l177" > < / a > < / span > < span class = cF6 > " < / span > < span class = cF0 > < / span > < span class = cF6 > if (c-> update_derived_vals)< / span > < span class = cF0 >
< a name = "l178" > < / a > < / span > < span class = cF6 > (*c-> update_derived_vals)(c);< / span > < span class = cF0 >
2021-07-03 05:07:57 +01:00
< a name = "l179" > < / a > < / span > < span class = cF6 > }< / span > < span class = cF0 >
< a name = "l180" > < / a >
< a name = "l181" > < / a > < / span > < span class = cF6 > CCtrl *SliderNew()< / span > < span class = cF0 >
< a name = "l182" > < / a > < / span > < span class = cF6 > {< / span > < span class = cF0 >
2021-07-04 23:11:34 +01:00
< a name = "l183" > < / a > < / span > < span class = cF6 > CCtrl *c = CAlloc(sizeof(CCtrl));< / span > < span class = cF0 >
2021-07-03 05:07:57 +01:00
< a name = "l184" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l185" > < / a > < / span > < span class = cF6 > c-> win_task = Fs;< / span > < span class = cF0 >
< a name = "l186" > < / a > < / span > < span class = cF6 > c-> flags = CTRLF_SHOW | CTRLF_CAPTURE_LEFT_MS;< / span > < span class = cF0 >
< a name = "l187" > < / a > < / span > < span class = cF6 > c-> type = CTRLT_GENERIC;< / span > < span class = cF0 >
2021-07-03 05:07:57 +01:00
< a name = "l188" > < / a > < / span > < span class = cF6 > " < / span > < span class = cF0 > );
2021-07-04 23:11:34 +01:00
< a name = "l189" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (*m-> global_name)
< a name = "l190" > < / a > < / span > < span class = cF5 > DocPrint< / span > < span class = cF0 > (doc,< / span > < span class = cF6 > " < / span > < span class = cF0 > < / span > < span class = cF6 > c-> state = & %s;\n" < / span > < span class = cF0 >
< a name = "l191" > < / a > < / span > < span class = cF6 > " < / span > < span class = cF0 > < / span > < span class = cF6 > MemSet(& %s, 0, sizeof(CSliderState));\n" < / span > < span class = cF0 > , m-> global_name, m-> global_name);
< a name = "l192" > < / a > < / span > < span class = cF1 > else< / span > < span class = cF0 >
< a name = "l193" > < / a > < / span > < span class = cF5 > DocPrint< / span > < span class = cF0 > (doc, < / span > < span class = cF6 > " < / span > < span class = cF0 > < / span > < span class = cF6 > c-> state = CAlloc(sizeof(CSliderState));\n" < / span > < span class = cF0 > );
< a name = "l194" > < / a > < / span > < span class = cF5 > DocPrint< / span > < span class = cF0 > (doc,
< a name = "l195" > < / a > < / span > < span class = cF6 > " < / span > < span class = cF0 > < / span > < span class = cF6 > c-> draw_it = & DrawCtrlSlider;< / span > < span class = cF0 >
< a name = "l196" > < / a > < / span > < span class = cF6 > c-> left_click = & LeftClickSlider;< / span > < span class = cF0 >
< a name = "l197" > < / a > < / span > < span class = cF6 > c-> update_derived_vals = & UpdateDerivedCtrlSlider;< / span > < span class = cF0 >
< a name = "l198" > < / a > < / span > < span class = cF6 > QueueInsert(c, Fs-> last_ctrl);< / span > < span class = cF0 >
< a name = "l199" > < / a > < / span > < span class = cF6 > TaskDerivedValsUpdate;< / span > < span class = cF0 >
2021-07-03 05:07:57 +01:00
< a name = "l200" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l201" > < / a > < / span > < span class = cF6 > return c;< / span > < span class = cF0 >
2021-07-03 05:07:57 +01:00
< a name = "l202" > < / a > < / span > < span class = cF6 > }< / span > < span class = cF0 >
< a name = "l203" > < / a >
< a name = "l204" > < / a > < / span > < span class = cF6 > U0 SliderDel(CCtrl *c)< / span > < span class = cF0 >
< a name = "l205" > < / a > < / span > < span class = cF6 > {< / span > < span class = cF0 >
2021-07-04 23:11:34 +01:00
< a name = "l206" > < / a > < / span > < span class = cF6 > QueueRemove(c);< / span > < span class = cF0 >
2021-07-03 05:07:57 +01:00
< a name = "l207" > < / a > < / span > < span class = cF6 > " < / span > < span class = cF0 > );
2021-07-04 23:11:34 +01:00
< a name = "l208" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (!*m-> global_name)
< a name = "l209" > < / a > < / span > < span class = cF5 > DocPrint< / span > < span class = cF0 > (doc, < / span > < span class = cF6 > " < / span > < span class = cF0 > < / span > < span class = cF6 > Free(c-> state);\n" < / span > < span class = cF0 > );
< a name = "l210" > < / a > < / span > < span class = cF5 > DocPrint< / span > < span class = cF0 > (doc,
< a name = "l211" > < / a > < / span > < span class = cF6 > " < / span > < span class = cF0 > < / span > < span class = cF6 > Free(c);< / span > < span class = cF0 >
2021-07-03 05:07:57 +01:00
< a name = "l212" > < / a > < / span > < span class = cF6 > }< / span > < span class = cF0 >
< a name = "l213" > < / a > < / span > < span class = cF6 > " < / span > < span class = cF0 > );
< a name = "l214" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l215" > < / a > < / span > < span class = cF5 > Kill< / span > < span class = cF0 > (task); < / span > < span class = cF2 > //This frees memory.< / span > < span class = cF0 >
2021-07-03 05:07:57 +01:00
< a name = "l216" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l217" > < / a > < / span > < span class = cF5 > RegOneTimePopUp< / span > < span class = cF0 > (< / span > < span class = cF3 > ARf_MANAGE_SLIDER< / span > < span class = cF0 > ,
< a name = "l218" > < / a > < / span > < span class = cF6 > " Modify the code to your heart's content.\n" < / span > < span class = cF0 >
< a name = "l219" > < / a > < / span > < span class = cF6 > " The code is no longer managed.\n" < / span > < span class = cF0 > );
2021-07-03 05:07:57 +01:00
< a name = "l220" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l221" > < / a > < / span > < span class = cF5 > DocLock< / span > < span class = cF0 > (doc);
2021-07-03 05:07:57 +01:00
< a name = "l222" > < / a > }
< / span > < / pre > < / body >
< / html >