forked from epics-extensions/StripTool
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jlLegend.h
121 lines (93 loc) · 3.38 KB
/
jlLegend.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
/*************************************************************************\
* Copyright (c) 1994-2004 The University of Chicago, as Operator of Argonne
* National Laboratory.
* Copyright (c) 1997-2003 Southeastern Universities Research Association,
* as Operator of Thomas Jefferson National Accelerator Facility.
* Copyright (c) 1997-2002 Deutches Elektronen-Synchrotron in der Helmholtz-
* Gemelnschaft (DESY).
* This file is distributed subject to a Software License Agreement found
* in the file LICENSE that is included with this distribution.
\*************************************************************************/
#ifndef _jlLegend
#define _jlLegend
#include <Xm/Xm.h>
/* LegendItem
*
* A legend entry handle.
*/
typedef void * LegendItem;
/* ====== New resource names ======
*/
#define XjNusePixmap "usePixmap"
#define XjNchooseCallback "chooseCallback"
/* ====== New resource classes ======
*/
#define XjCUsePixmap "UsePixmap"
#define XjCChooseCallback "ChooseCallback"
/* ====== New resource types ======
*/
/* ====== Callback stuff ======
*/
typedef struct _XjLegendCallbackStruct
{
int reason;
XEvent *event;
LegendItem item;
} XjLegendCallbackStruct;
/* ====== Class record constants ======
*/
extern WidgetClass legendWidgetClass;
typedef struct _LegendClassRec * LegendWidgetClass;
typedef struct _LegendRec * LegendWidget;
/* ====== some useful public functions ====== */
/* XjLegendNewItem
*
* Create a new item with the specified info. Returns (LegendItem)0
* on failure.
*/
LegendItem XjLegendNewItem (Widget,
char *, /* name */
char *, /* units */
char *, /* range */
char *, /* comment */
Pixel); /* color */
/* XjLegendDeleteItem
*
* Removes the specified entry from the legend.
*/
void XjLegendDeleteItem (Widget, LegendItem);
/* XjLegendUpdateItem
*
* Updates the legend entry for the given legend item with
* the specified parameters.
*/
void XjLegendUpdateItem (Widget,
LegendItem,
char *,
char *,
char *,
char *,
Pixel);
/* XjLegendResize
*
* Attempts to resize the widget to its desired dimensions.
* If successful, it will be redrawn.
*/
void XjLegendResize (Widget w);
/* XjLegendUpdate
*
* Causes the widget to be re-calculated and re-rendered.
*/
void XjLegendUpdate (Widget w);
void
/* Should put description here */
XjLegendValueUpdateItem (Widget w,
LegendItem the_item,
char *nameStart,
char *units,
char *range,
char *comment,
Pixel color);
/* Should put description here */
void LegendRefresh(LegendWidget cw);
#endif /* #ifndef _jlLegend */