1 /* Gauge Widget for SXEmacs.
2 Copyright (C) 1999 Edward A. Falk
4 This file is part of SXEmacs.
6 SXEmacs is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
11 SXEmacs is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>. */
19 /* Synched up with: Gauge.h 1.1 */
22 * Gauge.h - Gauge widget
24 * Author: Edward A. Falk
25 * falk@falconer.vip.best.com
33 /***********************************************************************
37 * The Gauge widget looks something like a thermometer. Application
38 * defines the values at the ends of the range and the current value
39 * and Gauge draws accordingly. Gauge does not accept input.
41 ***********************************************************************/
43 #include ATHENA_Label_h_
47 Name Class RepType Default Value
48 ---- ----- ------- -------------
49 value Value Cardinal 0
50 minValue MinValue Cardinal 0
51 maxValue MaxValue Cardinal 100
52 ntics NTics Cardinal 0 +
53 nlabels NLabels Cardinal 0 ++
54 labels Labels String * NULL +++
55 orientation Orientation XtOrientation horizontal
56 autoScaleUp AutoScaleUp Boolean FALSE ++++
57 autoScaleDown AutoScaleDown Boolean FALSE ++++
58 getValue Callback XtCallbackList NULL +++++
59 update Interval int 0 (seconds) = disabled
61 encoding Encoding unsigned char XawTextEncoding8bit
62 font Font XFontStruct* XtDefaultFont
63 foreground Foreground Pixel XtDefaultForeground
64 internalHeight Height Dimension 2
65 internalWidth Width Dimension 4
66 resize Resize Boolean True
67 background Background Pixel XtDefaultBackground
68 bitmap Pixmap Pixmap None
69 border BorderColor Pixel XtDefaultForeground
70 borderWidth BorderWidth Dimension 1
71 cursor Cursor Cursor None
72 cursorName Cursor String NULL
73 destroyCallback Callback XtCallbackList NULL
74 height Height Dimension varies
75 insensitiveBorder Insensitive Pixmap Gray
76 mappedWhenManaged MappedWhenManaged Boolean True
77 pointerColor Foreground Pixel XtDefaultForeground
78 pointerColorBackground Background Pixel XtDefaultBackground
79 sensitive Sensitive Boolean True
80 width Width Dimension text width
84 + Ntics sets the number of tic marks next to the gauge. If 0, no
85 tic marks will be drawn.
86 ++ Nlabels sets the number of labels next to the gauge.
87 +++ Labels is an array of nul-terminated strings to be used as labels.
88 If this field is NULL but nlabels is > 0, then numeric labels will be
89 provided. NOTE: the labels are not copied to any internal memory; they
90 must be stored in static memory provided by the application.
91 ++++ AutoScale allows the gauge to set its own value limits. Default is
92 False unless upper & lower limits are both 0.
94 +++++ The GetValue() callback proc is called with these arguments:
96 myGetValue(gauge, client, rval)
101 *(Cardinal *)rval = value ;
107 * Resource names not provided in StringDefs.h
111 #define XtNvalue "value"
112 #define XtCValue "Value"
115 #ifndef XtNorientation
116 #define XtNorientation "orientation"
117 #define XtCOrientation "Orientation"
120 #define XtNntics "ntics"
121 #define XtCNTics "NTics"
124 #define XtNnlabels "nlabels"
125 #define XtCNLabels "NLabels"
128 #define XtNlabels "labels"
129 #define XtCLabels "Labels"
133 #define XtNminValue "minValue"
134 #define XtCMinValue "MinValue"
137 #define XtNmaxValue "maxValue"
138 #define XtCMaxValue "MaxValue"
141 #ifndef XtNautoScaleUp
142 #define XtNautoScaleUp "autoScaleUp"
143 #define XtCAutoScaleUp "AutoScaleUp"
144 #define XtNautoScaleDown "autoScaleDown"
145 #define XtCAutoScaleDown "AutoScaleDown"
149 #define XtNupdate "update"
153 #define XtNgetValue "getValue"
156 /* Class record constants */
158 extern WidgetClass gaugeWidgetClass;
160 typedef struct _GaugeClassRec *GaugeWidgetClass;
161 typedef struct _GaugeRec *GaugeWidget;
163 _XFUNCPROTOBEGIN extern void XawGaugeSetValue(
164 #if NeedFunctionPrototypes
170 extern Cardinal XawGaugeGetValue(
171 #if NeedFunctionPrototypes
177 #endif /* _XawGauge_h */