\name {stockq} \children {stockq.graph stockq.txt stockq.socket} \class {vpane} \script { switch (arg[0]) { case "graph": return send(nthChild(0), arg[0], arg[1]); break; case "txt": return send(nthChild(1), arg[0], arg[1]); break; } usual(); } \width {400} \height {400} \border {3} \ \name {stockq.graph} \parent {stockq} \class {field} \script { switch (arg[0]) { case "graph": y = arg[1] / 100.0 * hh; drawLine(1, y, 1, hh); copyArea(0, 0, ww, hh, 1, 0); return; break; case "config": usual(); clearWindow(); ww = get("width"); hh = get("height"); return; break; } usual(); } \BGColor {blue} \FGColor {white} \gapH {4} \gapV {4} \ \name {stockq.txt} \parent {stockq} \children {stockq.txt.tf stockq.txt.sb} \class {hpane} \script { switch (arg[0]) { case "txt": send(nthChild(0), arg[0], arg[1]); return; break; } usual(); } \gapH {4} \gapV {4} \ \name {stockq.txt.tf} \parent {stockq.txt} \class {txtEdit} \shownDepend {stockq.txt.sb} \script { switch (arg[0]) { case "txt": /* t = concat(t, arg[1], "\n"); set("content", t); render(); */ if (configed) { insert(arg[1]); insert('\n'); } return; break; case "config": configed = 1; break; } usual(); } \ \name {stockq.txt.sb} \parent {stockq.txt} \class {slider} \shownNotify {stockq.txt.tf} \maxWidth {20} \ \name {stockq.socket} \parent {stockq} \class {socket} \host {pebble.berkeley.ora.com} \port {7777} \script { /* sym share price */ switch (arg[0]) { case "input": data = input(); send(parent(), "graph", int(nthWord(data, 3))); send(parent(), "txt", data); return; break; case "init": usual(); set("outDelimStr", "\r\n"); set("inDelimStr1", '\n'); startClient(); return; break; } usual(); } \maxHeight {1} \