Hdial(3)

NAME

Hdial - Hdial Widget (Half Dial Widget)

DESCRIPTION

#include "Hdial.h"

The dial widget is an X toolkit compatible widget that displays a semi-circle dial, an arrow pointer, and a label indicating it's current value.

WIDGET CLASS

hdialWidgetClass

RESOURCES

XtNforeground
    foreground pixel of the widget, default is XtDefaultForeground.

XtNlabelForeground
    foreground pixel of the label, default is XtDefaultForeground.

XtNminimum
    minimum value of dial (int), default is 0.

XtNmaximum
    maximum value of dial (int), default is 65535.

XtNvalue
    value of dial (int), default is 0.

XtNfont
    font of label (XFontStruct), default is XtDefaultFont.

XtNmargin
    minimum margin around widget (int), default is 5.

XtNincrementCallback
    increment callback, default is NULL.

XtNdecrementCallback
    decrement callback, default is NULL.

XtNvalueChangeCallback
    value change callback, default is NULL.

ACTIONS

increment()
    will receive a key/button event to increment the value of the dial, can send an integer as an incrmental value.

decrement()
    will receive a key/button event to decrement the value of the dial, can send an integer as a decremental value.

set()
    will receive a key/button event to set the dial arm to the current pointer position.

drag()
    will receive a motion event to set the dial arm to the current pointer position.

DEFAULT TRANSLATIONS

<key>+: increment(1)
Shift<key>+: increment(100)
<key>-: decrement(1)
Shift<key>-: decrement(100)
<Btn1Down>: set()
<Btn1Motion>: set() drag()

CALLBACK STRUCTURE

typedef struct _HdialCallbackStruct
{
  int reason;
  XEvent *event;
  int value;
} HdialCallbackStruct, *HdialCallbackPtr;

REASONS

HDIAL_INCREMENT
HDIAL_DECREMENT
HDIAL_SET

AUTHOR

John L. Cwikla, 1992
Materials Research Laboratory Center for Computation
University of Illinois, Champaign