annotate lwlib/xlwgauge.h @ 5482:384423af8fb5 first-gplv3 r21-5-31

Update CHANGES-beta.
author Stephen J. Turnbull <stephen@xemacs.org>
date Sat, 30 Apr 2011 12:50:14 +0900
parents 308d34e9f07d
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
424
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
1 /* Gauge Widget for XEmacs.
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
2 Copyright (C) 1999 Edward A. Falk
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
3
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
4 This file is part of XEmacs.
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
5
5402
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 3968
diff changeset
6 XEmacs is free software: you can redistribute it and/or modify it
424
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
7 under the terms of the GNU General Public License as published by the
5402
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 3968
diff changeset
8 Free Software Foundation, either version 3 of the License, or (at your
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 3968
diff changeset
9 option) any later version.
424
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
10
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
11 XEmacs is distributed in the hope that it will be useful, but WITHOUT
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
12 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
14 for more details.
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
15
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
16 You should have received a copy of the GNU General Public License
5402
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 3968
diff changeset
17 along with XEmacs. If not, see <http://www.gnu.org/licenses/>. */
424
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
18
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
19 /* Synched up with: Gauge.h 1.1 */
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
20
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
21 /*
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
22 * Gauge.h - Gauge widget
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
23 *
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
24 * Author: Edward A. Falk
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
25 * falk@falconer.vip.best.com
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
26 *
424
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
27 * Date: July 8, 1997
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
28 */
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
29
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
30 #ifndef _XawGauge_h
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
31 #define _XawGauge_h
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
32
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
33 /***********************************************************************
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
34 *
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
35 * Gauge Widget
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
36 *
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
37 * The Gauge widget looks something like a thermometer. Application
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
38 * defines the values at the ends of the range and the current value
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
39 * and Gauge draws accordingly. Gauge does not accept input.
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
40 *
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
41 ***********************************************************************/
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
42
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
43 #include ATHENA_Label_h_
424
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
44
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
45 /* Resources:
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
46
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
47 Name Class RepType Default Value
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
48 ---- ----- ------- -------------
3968
16b17fd1dc93 [xemacs-hg @ 2007-05-20 15:56:30 by stephent]
stephent
parents: 442
diff changeset
49 value Value Int 0
16b17fd1dc93 [xemacs-hg @ 2007-05-20 15:56:30 by stephent]
stephent
parents: 442
diff changeset
50 minValue Int Cardinal 0
16b17fd1dc93 [xemacs-hg @ 2007-05-20 15:56:30 by stephent]
stephent
parents: 442
diff changeset
51 maxValue Int Cardinal 100
424
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
52 ntics NTics Cardinal 0 +
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
53 nlabels NLabels Cardinal 0 ++
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
54 labels Labels String * NULL +++
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
55 orientation Orientation XtOrientation horizontal
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
56 autoScaleUp AutoScaleUp Boolean FALSE ++++
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
57 autoScaleDown AutoScaleDown Boolean FALSE ++++
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
58 getValue Callback XtCallbackList NULL +++++
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
59 update Interval int 0 (seconds) = disabled
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
60
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
61 encoding Encoding unsigned char XawTextEncoding8bit
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
62 font Font XFontStruct* XtDefaultFont
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
63 foreground Foreground Pixel XtDefaultForeground
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
64 internalHeight Height Dimension 2
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
65 internalWidth Width Dimension 4
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
66 resize Resize Boolean True
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
67 background Background Pixel XtDefaultBackground
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
68 bitmap Pixmap Pixmap None
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
69 border BorderColor Pixel XtDefaultForeground
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
70 borderWidth BorderWidth Dimension 1
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
71 cursor Cursor Cursor None
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
72 cursorName Cursor String NULL
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
73 destroyCallback Callback XtCallbackList NULL
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
74 height Height Dimension varies
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
75 insensitiveBorder Insensitive Pixmap Gray
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
76 mappedWhenManaged MappedWhenManaged Boolean True
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
77 pointerColor Foreground Pixel XtDefaultForeground
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
78 pointerColorBackground Background Pixel XtDefaultBackground
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
79 sensitive Sensitive Boolean True
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
80 width Width Dimension text width
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
81 x Position Position 0
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
82 y Position Position 0
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
83
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
84 + Ntics sets the number of tic marks next to the gauge. If 0, no
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
85 tic marks will be drawn.
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
86 ++ Nlabels sets the number of labels next to the gauge.
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
87 +++ Labels is an array of nul-terminated strings to be used as labels.
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
88 If this field is NULL but nlabels is > 0, then numeric labels will be
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
89 provided. NOTE: the labels are not copied to any internal memory; they
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
90 must be stored in static memory provided by the application.
424
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
91 ++++ AutoScale allows the gauge to set its own value limits. Default is
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
92 False unless upper & lower limits are both 0.
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
93
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
94 +++++ The GetValue() callback proc is called with these arguments:
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
95 static void
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
96 myGetValue(gauge, client, rval)
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
97 Widget gauge ;
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
98 XtPointer client ;
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
99 XtPointer rval ;
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
100 {
3968
16b17fd1dc93 [xemacs-hg @ 2007-05-20 15:56:30 by stephent]
stephent
parents: 442
diff changeset
101 *(int *)rval = value ;
424
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
102 }
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
103
424
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
104 */
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
105
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
106 /*
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
107 * Resource names not provided in StringDefs.h
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
108 */
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
109
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
110 #ifndef XtNvalue
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
111 #define XtNvalue "value"
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
112 #define XtCValue "Value"
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
113 #endif
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
114
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
115 #ifndef XtNorientation
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
116 #define XtNorientation "orientation"
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
117 #define XtCOrientation "Orientation"
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
118 #endif
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
119
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
120 #define XtNntics "ntics"
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
121 #define XtCNTics "NTics"
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
122
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
123 #ifndef XtNnlabels
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
124 #define XtNnlabels "nlabels"
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
125 #define XtCNLabels "NLabels"
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
126 #endif
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
127 #ifndef XtNlabels
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
128 #define XtNlabels "labels"
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
129 #define XtCLabels "Labels"
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
130 #endif
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
131
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
132 #ifndef XtNminValue
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
133 #define XtNminValue "minValue"
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
134 #define XtCMinValue "MinValue"
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
135 #endif
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
136 #ifndef XtNmaxValue
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
137 #define XtNmaxValue "maxValue"
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
138 #define XtCMaxValue "MaxValue"
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
139 #endif
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
140
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
141 #ifndef XtNautoScaleUp
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
142 #define XtNautoScaleUp "autoScaleUp"
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
143 #define XtCAutoScaleUp "AutoScaleUp"
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
144 #define XtNautoScaleDown "autoScaleDown"
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
145 #define XtCAutoScaleDown "AutoScaleDown"
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
146 #endif
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
147
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
148 #ifndef XtNupdate
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
149 #define XtNupdate "update"
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
150 #endif
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
151
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
152 #ifndef XtNgetValue
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
153 #define XtNgetValue "getValue"
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
154 #endif
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
155
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
156
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
157 /* Class record constants */
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
158
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
159 extern WidgetClass gaugeWidgetClass;
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
160
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
161 typedef struct _GaugeClassRec *GaugeWidgetClass;
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
162 typedef struct _GaugeRec *GaugeWidget;
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
163
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
164
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
165 _XFUNCPROTOBEGIN
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
166
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
167 extern void XawGaugeSetValue(
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
168 #if NeedFunctionPrototypes
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
169 Widget gauge,
3968
16b17fd1dc93 [xemacs-hg @ 2007-05-20 15:56:30 by stephent]
stephent
parents: 442
diff changeset
170 int value
424
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
171 #endif
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
172 );
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
173
3968
16b17fd1dc93 [xemacs-hg @ 2007-05-20 15:56:30 by stephent]
stephent
parents: 442
diff changeset
174 extern int XawGaugeGetValue(
424
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
175 #if NeedFunctionPrototypes
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
176 Widget gauge
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
177 #endif
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
178 );
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
179
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
180 _XFUNCPROTOEND
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
181
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents:
diff changeset
182 #endif /* _XawGauge_h */