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 122 123 124 125 126 127 128 129 130 131 132
|
/*************************************************************
*
* Rheostat.h.
* Public header file for Rheostat widget.
*
* Author: Joe English, joe@trystero.art.com
*
*************************************************************
*/
#ifndef RHEOSTAT_H
#define RHEOSTAT_H
extern WidgetClass rheostatWidgetClass;
typedef struct _RheostatClassRec *RheostatWidgetClass;
typedef struct _RheostatRec *RheostatWidget;
/*
* Resources:
* Angles are specified in degrees, going clockwise from straight down.
* 0 = down, 90 = left, 180 = up, 270 = right, 360 = down again.
*
* The Dial value is an integer, with minimumValue <= value <= maximumValue
*
* Setting minimumAngle=minimumValue=0 and maximumAngle=maximumValue=360
* will configure the Rheostat for specifying angles.
*
* If resizeArrow is True, then the arrow will be resized proportionally
* when the Rheostat is resized.
*
* If tickGravity is True, then clicking near a Rheostat tick will snap
* the indicator to that tick.
*
*/
#define XtNmaximumAngle "maximumAngle"
#define XtNminimumAngle "minimumAngle"
#define XtNmaximumValue "maximumValue"
#define XtNminimumValue "minimumValue"
#define XtNnumberIntervals "numberIntervals"
#define XtNresizeArrow "resizeArrow"
#define XtNtickGravity "tickGravity"
#ifndef _XtStringDefs_h_
#define XtNvalue "value"
#endif
/*
* Geometry-specifying resources (outside to inside):
*/
#define XtNouterMargin "outerMargin"
#define XtNtickLength "tickLength"
#define XtNdialThickness "dialThickness"
#define XtNinnerMargin "innerMargin"
#define XtNradius "radius"
/*
* Appearance resources:
*/
#define XtNdialColor "dialColor"
#define XtNtickColor "tickColor"
#define XtNarrowColor "arrowColor"
#define XtNtickThickness "tickThickness"
/*
* Arrow appearance:
*/
#define XtNarrowWidth "arrowWidth"
#define XtNinnerArrowLength "innerArrowLength"
#define XtNouterArrowLength "outerArrowLength"
#define XtNfillArrow "fillArrow"
#define XtNarrowThickness "arrowThickness"
/* if useShadowColors is True, then the Motif * topShadowColor and
* bottomShadowcolor resources will be used for dialColor and arrowColor.
* Only valid in Motif version of Rheostat.
*/
#define XtNuseShadowColors "useShadowColors"
/*
* Callbacks:
*/
#define XtNnotifyCallback "notify"
#define XtNsetCallback "set"
#define XtCNumberIntervals "NumberIntervals"
#define XtCGravity "Gravity"
#define XtCMinimum "Minimum"
#define XtCMaximum "Maximum"
/*
* Rheostat callback structure:
*/
typedef struct {
int reason; /* for Motif compatibility only */
XEvent *event; /* Ditto */
int value; /* current dial value */
} RheostatCallbackStruct;
/*
* Convenience callback function:
* 'closure' must be an 'int *', into which is stored the current dial value.
*/
extern void XfwfRheostatSetIntCallback(
#if NeedFunctionPrototypes
Widget, /* RheostatWidget */
XtPointer, /* int *closure */
XtPointer /* RheostatCallbackStruct *call_data */
#endif
);
extern void XfwfDrawArrow(
#if NeedFunctionPrototypes
Display *,
Drawable d,
GC gc,
int endx,
int endy, /* position of arrow tip */
int dx,
int dy, /* slope of arrow */
int outer_length, /* distance tip->base */
int inner_length, /* distance tip->inner */
int width, /* distance base->outer points */
int fill /* True=>fill arrow,False=>outline */
#endif
);
#endif /* RHEOSTAT_H */
|