Lines Matching refs:strip_chart

55         offset(strip_chart.update), XtRImmediate, (caddr_t) 10},
57 offset(strip_chart.min_scale), XtRImmediate, (caddr_t) 1},
59 offset(strip_chart.fgpixel), XtRString, XtDefaultForeground},
61 offset(strip_chart.hipixel), XtRString, XtDefaultForeground},
63 offset(strip_chart.get_value), XtRImmediate, (caddr_t) NULL},
65 offset(strip_chart.jump_val), XtRImmediate, (caddr_t) DEFAULT_JUMP},
140 myXGCV.foreground = w->strip_chart.fgpixel;
141 w->strip_chart.fgGC = XtGetGC((Widget) w, GCForeground, &myXGCV);
145 myXGCV.foreground = w->strip_chart.hipixel;
146 w->strip_chart.hiGC = XtGetGC((Widget) w, GCForeground, &myXGCV);
163 XtReleaseGC((Widget) w, w->strip_chart.fgGC);
166 XtReleaseGC((Widget) w, w->strip_chart.hiGC);
175 if (w->strip_chart.update > 0)
176 w->strip_chart.interval_id = XtAppAddTimeOut(
178 w->strip_chart.update * MS_PER_SEC,
182 w->strip_chart.interval_id = NULL;
186 w->strip_chart.scale = w->strip_chart.min_scale;
187 w->strip_chart.interval = 0;
188 w->strip_chart.max_value = 0.0;
189 w->strip_chart.points = NULL;
198 if (w->strip_chart.interval_id != NULL)
199 XtRemoveTimeOut (w->strip_chart.interval_id);
233 if (w->strip_chart.update > 0)
234 w->strip_chart.interval_id =
236 w->strip_chart.update * MS_PER_SEC,
239 if (w->strip_chart.interval >= w->core.width)
244 if (w->strip_chart.get_value == NULL)
250 * Keep w->strip_chart.max_value up to date, and if this data
254 if (value > w->strip_chart.max_value) {
255 w->strip_chart.max_value = value;
256 if (w->strip_chart.max_value > w->strip_chart.scale) {
258 w->strip_chart.interval = repaint_window(w, 0, (int) w->core.width);
262 w->strip_chart.valuedata[w->strip_chart.interval] = value;
265 w->strip_chart.scale);
267 XFillRectangle(XtDisplay(w), XtWindow(w), w->strip_chart.fgGC,
268 w->strip_chart.interval, y,
274 if (w->strip_chart.points != NULL) {
275 w->strip_chart.points[0].x = w->strip_chart.interval;
276 XDrawPoints(XtDisplay(w), XtWindow(w), w->strip_chart.hiGC,
277 w->strip_chart.points, w->strip_chart.scale - 1,
283 w->strip_chart.interval++; /* Next point */
292 * changed, then w->strip_chart.max_value is updated to reflect the
302 register int next = w->strip_chart.interval;
303 int scale = w->strip_chart.scale;
308 if (w->strip_chart.interval != 0 || scale <= (int)w->strip_chart.max_value)
309 scale = ((int) (w->strip_chart.max_value)) + 1;
310 if (scale < w->strip_chart.min_scale)
311 scale = w->strip_chart.min_scale;
313 if (scale != w->strip_chart.scale) {
314 w->strip_chart.scale = scale;
337 int height = (int) (w->strip_chart.valuedata[i] *
338 w->core.height) / w->strip_chart.scale;
340 XFillRectangle(dpy, win, w->strip_chart.fgGC,
346 for (i = 1; i < w->strip_chart.scale; i++) {
347 j = i * (w->core.height / w->strip_chart.scale);
348 XDrawLine(dpy, win, w->strip_chart.hiGC, left, j, scalewidth, j);
368 register int next = w->strip_chart.interval;
372 if (w->strip_chart.jump_val == DEFAULT_JUMP)
375 j = w->core.width - w->strip_chart.jump_val;
379 bcopy((char *)(w->strip_chart.valuedata + next - j),
380 (char *)(w->strip_chart.valuedata), j * sizeof(double));
381 next = w->strip_chart.interval = j;
385 * w->strip_chart.max_value.
388 old_max = w->strip_chart.max_value;
389 w->strip_chart.max_value = 0.0;
391 if (w->strip_chart.valuedata[i] > w->strip_chart.max_value)
392 w->strip_chart.max_value = w->strip_chart.valuedata[i];
397 if ( ((int) old_max) != ( (int) w->strip_chart.max_value) ) {
404 w->strip_chart.hiGC, (int) w->core.width - j, 0,
415 for (i = 1; i < w->strip_chart.scale; i++) {
416 j = i * (w->core.height / w->strip_chart.scale);
418 w->strip_chart.hiGC, left, j, (int)w->core.width, j);
432 if (w->strip_chart.update != old->strip_chart.update) {
433 XtRemoveTimeOut (old->strip_chart.interval_id);
434 w->strip_chart.interval_id =
436 w->strip_chart.update * MS_PER_SEC,
440 if ( w->strip_chart.min_scale > (int) ((w->strip_chart.max_value) + 1) )
443 if ( w->strip_chart.fgpixel != old->strip_chart.fgpixel )
446 if ( w->strip_chart.hipixel != old->strip_chart.hipixel )
472 if (w->strip_chart.scale <= 1) { /* no scale lines. */
473 XtFree ((char *) w->strip_chart.points);
474 w->strip_chart.points = NULL;
478 size = sizeof(XPoint) * (w->strip_chart.scale - 1);
480 points = (XPoint *) XtRealloc( (XtPointer) w->strip_chart.points, size);
481 w->strip_chart.points = points;
485 for (i = 1; i < w->strip_chart.scale; i++) {
487 points[i - 1].y = HEIGHT / w->strip_chart.scale;