Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ StripChart(3X) — DeltaWindows 1.3.3 Release 4 Version 4.3

Media Vault

Software Library

Restoration Projects

Artifacts Sought

 

NAME

StripChart widget − widget to display a real-time graphic chart. 

SYNOPSIS

Public Headers:<X11/StringDefs.h> <X11/Xaw/StripChart.h>

Private Header:<X11/Xaw/StripCharP.h>

Class Name:StripChart

Class Pointer:stripChartWidgetClass

Instantiation:widget = XtCreateWidget(name, stripChartWidgetClass, ...) 

CLASS HIERARCHY

Core → Simple → StripChart

DESCRIPTION

The StripChart widget is used to provide a real-time graphic chart of a single value.  This widget is used by xload to provide the load graph.  It will read data from an application, and update the chart at the XtNupdate interval specified. 

RESOURCES

When creating a StripChart widget instance, the following resources are retrieved from the argument list or from the resource database:

Name (XtN...) Class Type Default Description









XtNaccelerators AcceleratorTable NULL List of event-to-action bindings to be executed by this widget, even though the event occurred in another widget. 


XtNancestor−
  Sensitive
Boolean True (D) Sensitivity state of the ancestors of this widget:  a widget is insensitive if either it or any of its ancestors is insensitive. 


XtNbackground Pixel XtDefault−
  Background
Window background color.


XtNbackground−
  Pixmap
Pixmap XtUnspecified−
  Pixmap
Window background pixmap.


XtNborderColor Pixel XtDefault−
  Foreground
Window border color.


XtNborderPixmap Pixmap XtUnspecified−
  Pixmap
Window border pixmap.


XtNborderWidth Dimension 1 Border width in pixels.


XtNcolormap Colormap Parent’s colormap. Colormap that this widget will use. 


XtNcursor Cursor None. Pointer cursor.


XtNdepth int Parent’s depth. (C) Depth of this widget’s window. 


XtNdestroy−
  Callback
XtCallbackList NULL Callbacks for XtDestroyWidget(). 


XtNforeground Pixel XtDefault−
  Foreground
Foreground color.


XtNgetValue Callback NULL See below.


XtNheight Dimension Font height + 2 ∗
XtNinternalHeight
Height of widget.


XtNhighlight Pixel XtDefault−
  Foreground
See below.


XtNinsensitive−
  Border
Pixmap Gray pixmap. Border when not sensitive.


XtNjumpScroll int Half the width of the widget. (A) See below.


XtNmappedWhen−
  Managed
Boolean TRUE Whether XtMapWidget() is automatic. 


XtNminScale int 1 See below.


XtNscreen Screen Parent’s screen. (R) Screen on which this widget is displayed. 


XtNsensitive Boolean TRUE Whether widget receives input. 


XtNtranslations Translation−
  Table
See below. Event-to-action translations.


XtNupdate int 10 See below.


XtNwidth Dimension 0 The height and width of this widget in pixels. 


XtNx Position 0 x-coordinate in pixels.


XtNy Position 0 y-coordinate in pixels.









The new resources (not inherited from superclasses) associated with the StripChart widget are:

XtNgetValueThis is a list of functions to call every XtNupdate seconds.  This function will get the value to be graphed by the StripChart widget.  The section below, Getting the StripChart Value, describes the calling interface in more detail.  This callback list should contain only one function.  If this callback list contains more than one function, the behavior is undefined. 

XtNhighlight
A pixel value which indexes the widget’s colormap to derive the color that will be used to draw the scale lines on the graph.

XtNjumpScroll
When the graph reaches the right edge of the window it must be scrolled to the left.  This resource specifies the number of pixels it will jump.  Smooth scrolling can be achieved by setting this resource to 1.

XtNminScaleThe minimum scale for the graph.  The number of divisions on the graph will always be greater than or equal to this value. 

XtNupdateThe number of seconds between graph updates.  Each update is represented on the graph as a 1 pixel wide line.  Every XtNupdate seconds the getValue procedure will be used to get a new graph point, and this point will be added to the right end of the StripChart. 

GETTING THE STRIPCHART VALUE

The StripChart widget will call the application routine passed to it as the XtNgetValue callback function every XtNupdate seconds to obtain another point for the StripChart graph.  The calling interface for the XtNgetValue callback is: void (∗getValueProc)(w, client_data, value)
     Widget w;
     XtPointer client_data;
     XtPointer value;    /∗ double ∗ ∗/

wSpecifies the StripChart widget. 

client_data
Specifies the client data.

valueReturns a pointer to a double.  The application should set the address pointed to by this argument to a double containing the value to be graphed on the StripChart. 

This function is used by the StripChart to call an application routine.  The routine will pass the value to be graphed back to the StripChart in the value field of this routine. 

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026