home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / X / mit / doc / Xaw / StripChart < prev    next >
Encoding:
Text File  |  1991-07-29  |  4.6 KB  |  165 lines

  1. .NH 2
  2. StripChart Widget
  3. .XS
  4.     StripChart Widget
  5. .XE
  6. .IN "StripChart widget" "" "@DEF@"
  7. .Ds 0
  8. .TA 2.0i
  9. .ta 2.0i
  10. .sp
  11. Application Header file    <Xaw/StripChart.h>
  12. .IN "StripChart.h" ""
  13. Class Header file    <Xaw/StripCharP.h>
  14. .IN "StripCharP.h" ""
  15. Class        stripChartWidgetClass
  16. .IN "stripChartWidgetClass" "" 
  17. Class Name    StripChart
  18. .IN "StripChart widget" "class name"
  19. Superclass    Simple
  20. .sp
  21. .De
  22. .LP
  23. The StripChart widget is used to provide a real time graphical chart of 
  24. a single value.  This widget is used by \fBxload\fP to provide the
  25. load graph.  It will read data from an application, and update
  26. the chart at the \fBupdate\fP interval specified.
  27. .NH 3
  28. Resources
  29. .LP
  30. When creating a StripChart widget instance, the following resources are
  31. retrieved from the argument list or from the resource database:
  32. .LP
  33. .IN "StripChart widget" "resources"
  34. .ps 9
  35. .nr PS 9
  36. .vs 11
  37. .nr VS 11
  38. .TS H
  39. expand;
  40. lw(1i) lw(1i) lw(1i) lw(.5i) lw(2i).
  41. _
  42. .sp 3p
  43. .TB
  44. Name    Class    Type    Notes    Default Value
  45. .sp 3p
  46. _
  47. .TH
  48. .R
  49. .sp 3p
  50. accelerators    Accelerators    AcceleratorTable        NULL
  51. ancestorSensitive    AncestorSensitive    Boolean    D    True
  52. background    Background    Pixel        XtDefaultBackground
  53. backgroundPixmap    Pixmap    Pixmap        XtUnspecifiedPixmap
  54. borderColor    BorderColor    Pixel        XtDefaultForeground
  55. borderPixmap    Pixmap    Pixmap        XtUnspecifiedPixmap
  56. borderWidth    BorderWidth    Dimension        1
  57. colormap    Colormap    Colormap        Parent's Colormap
  58. cursor    Cursor    Cursor        None
  59. cursorName    Cursor    String        NULL
  60. depth    Depth    int    C    Parent's Depth
  61. destroyCallback    Callback    XtCallbackList        NULL
  62. foreground    Foreground    Pixel        XtDefaultForeground
  63. getValue    Callback    XtCallbackList        NULL
  64. height    Height    Dimension        120
  65. highlight    Foreground    Pixel        XtDefaultForeground
  66. insensitiveBorder    Insensitive    Pixmap        GreyPixmap
  67. jumpScroll    JumpScroll    int    A    half the width of the widget
  68. mappedWhenManaged    MappedWhenManaged    Boolean        True
  69. minScale    Scale    int        1
  70. pointerColor    Foreground    Pixel        XtDefaultForeground
  71. pointerColorBackground    Background    Pixel        XtDefaultBackground
  72. screen    Screen    Pointer    R    Parent's Screen
  73. sensitive    Sensitive    Boolean        True
  74. translations    Translations    TranslationTable        NULL
  75. update    Interval    int        10
  76. width    Width    Dimension        120
  77. x    Position    Position        0
  78. y    Position    Position        0
  79. .sp 3p
  80. _
  81. .TE
  82. .ps 11
  83. .nr PS 11
  84. .vs 13
  85. .nr VS 13
  86. .Ac
  87. .As
  88. .Bg
  89. .Gp
  90. .Bc
  91. .Bp
  92. .Bw
  93. .Cm
  94. .Cu
  95. .Pn
  96. .Dp
  97. .Dc
  98. .IP \fBforeground\fP 1.5i
  99. A pixel value which indexes the widget's colormap to derive the color
  100. that will be used to draw the graph.
  101. .IP \fBgetValue\fP 1.5i
  102. This is a list of functions to call every \fBupdate\fP seconds.  This
  103. function will get the value to be graphed by the StripChart widget.  The
  104. section \fBGetting the StripChart Value\fP will describe the calling
  105. interface in more detail.  This callback list should contain only one
  106. function.  If this callback list contains more than one function, the
  107. behavior is undefined.
  108. .Hw
  109. .IP \fBhighlight\fP 1.5i
  110. A pixel value which indexes the widget's colormap to derive the color
  111. that will be used to draw the scale lines on the graph.
  112. .Ib
  113. .IP \fBjumpScroll\fP 1.5i
  114. When the graph reaches the right edge of the window it must be
  115. scrolled to the left.  This resource specifies the number of pixels
  116. it will jump.  Smooth scrolling can be achieved by setting this resource
  117. to 1.
  118. .Mm
  119. .IP \fBminScale\fP 1.5i
  120. The minimum scale for the graph.  The number of divisions on the graph
  121. will always be greater than or equal to this value.
  122. .Pf
  123. .Pb
  124. .Sc
  125. .Se
  126. .Tr
  127. .IP \fBupdate\fP
  128. The number of seconds between graph updates.  Each update is
  129. represented on the graph as a 1 pixel wide line.  Every \fBupdate\fP seconds
  130. the \fBgetValue\fP procedure will be used to get a new graph point,
  131. and this point will be added to the right end of the StripChart.
  132. .Xy
  133. .NH 3
  134. Getting The StripChart Value
  135. .IN "StripChart widget" "getting the value"
  136. .LP
  137. The StripChart widget will call the application routine passed to it
  138. as the \fBgetValue\fP callback function every \fBupdate\fP seconds to
  139. obtain another point for the StripChart graph.  
  140. .LP
  141. The calling interface for the \fBgetValue\fP callback is:
  142. .IN "StripChart widget" "getValue callback" "@DEF@"
  143. .FD 0
  144. void (*\fIgetValueProc\fP)(\fIw\fP, \fIclient_data\fP, \fIvalue\fP)
  145. .br
  146.      Widget \fIw\fP;
  147. .br
  148.      XtPointer \fIclient_data\fP;
  149. .br
  150.      XtPointer \fIvalue\fP;    /* double * */
  151. .FN
  152. .IP \fIw\fP 1i
  153. Specifies the StripChart widget.
  154. .IP \fIclient_data\fP 1i
  155. Specifies the client data.
  156. .IP \fIvalue\fP 1i
  157. Returns a pointer to a double.  The application should set the address
  158. pointed to by this argument to a double containing the value to be
  159. graphed on the StripChart. 
  160. .LP
  161. This function is used by the StripChart to call an application routine.
  162. The routine will pass the value to be graphed back to the the StripChart
  163. in the \fBvalue\fP field of this routine.
  164.  
  165.