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 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160
|
/*
*
* Spinbox.h - XmpSpinbox Public header
*
*/
#ifndef _XmpSpinbox_h
#define _XmpSpinbox_h
#include <Xm/Xm.h>
#ifdef __cplusplus
extern "C" {
#endif
#ifndef XmpIsSpinbox
#define XmpIsSpinbox(w) XtIsSubclass(w, xmpSpinboxWidgetClass)
#endif
/**
*** RESOURCES
**/
#define XmNdouble "double"
#define XmRDouble "Double"
#define XmNlong "long"
#define XmRLong "Long"
#define XmNspinboxDelay "spinboxDelay"
#define XmCSpinboxDelay "SpinboxDelay"
#define XmNspinboxCycle "spinboxCycle"
#define XmCSpinboxCycle "SpinboxCycle"
#define XmNincrementLarge "incrementLarge"
#define XmCIncrementLarge "IncrementLarge"
#define XmNupdateText "updateText"
#define XmCUpdateText "UpdateText"
#ifndef XmNarrowOrientation
#define XmNarrowOrientation "arrowOrientation"
#endif
#ifndef XmCArrowOrientation
#define XmCArrowOrientation "ArrowOrientation"
#endif
#ifndef XmRArrowOrientation
#define XmRArrowOrientation "ArrowOrientation"
#endif
#define XmNspinboxType "spinboxType"
#define XmCSpinboxType "SpinboxType"
#define XmRSpinboxType "SpinboxType"
enum {
XmSPINBOX_NUMBER,
XmSPINBOX_CLOCK_HM,
XmSPINBOX_CLOCK_HMS,
XmSPINBOX_CLOCK_DHMS,
XmSPINBOX_BEACONCODE,
XmSPINBOX_DOLLARS,
XmSPINBOX_STRINGS,
XmSPINBOX_USER_DEFINED
};
#define XmNspinboxStyle "spinboxStyle"
#define XmCSpinboxStyle "SpinboxStyle"
#define XmRSpinboxStyle "SpinboxStyle"
enum {
XmSPINBOX_STACKED,
XmSPINBOX_STACKED_LEFT,
XmSPINBOX_STACKED_RIGHT,
XmSPINBOX_LEFT,
XmSPINBOX_RIGHT,
XmSPINBOX_SEPARATE
};
#define SPINBOX_BUTTON_SIZE_RATIO_DECIMAL_PLACES 2
#define XmNbuttonSizeRatio "buttonSizeRatio"
#define XmCButtonSizeRatio "ButtonSizeRatio"
#define XmNbuttonSizeFixed "buttonSizeFixed"
#define XmCButtonSizeFixed "ButtonSizeFixed"
#define XmNshowValueProc "showValueProc"
#define XmCShowValueProc "ShowValueProc"
#define XmRShowValueProc "ShowValueProc"
#define XmNshowValueData "showValueData"
#define XmCShowValueData "ShowValueData"
#define XmNgetValueData "getValueData"
#define XmCGetValueData "GetValueData"
#define XmNgetValueProc "getValueProc"
#define XmCGetValueProc "GetValueProc"
#define XmRGetValueProc "GetValueProc"
#define XmNitemsAreSorted "itemsAreSorted"
#define XmCItemsAreSorted "ItemsAreSorted"
#define XmNspinboxUseClosestValue "spinboxUseClosestValue"
#define XmCSpinboxUseClosestValue "SpinboxUseClosestValue"
#define XmNspinboxAutoCorrect "spinboxAutoCorrect"
#define XmCSpinboxAutoCorrect "SpinboxAutoCorrect"
externalref WidgetClass xmpSpinboxWidgetClass;
typedef struct _XmpSpinboxClassRec *XmpSpinboxWidgetClass;
typedef struct _XmpSpinboxRec *XmpSpinboxWidget;
typedef struct {
const char *str;
size_t str_len;
int reason;
long value;
} XmpSpinboxCallbackStruct;
typedef void (SpinboxShowValueProc) (
Widget spinbox,
XtPointer client_data,
long num,
char *buffer,
size_t buflen_max );
typedef Boolean (SpinboxGetValueProc) (
Widget spinbox,
XtPointer client_data,
const char *buffer,
size_t buflen,
long *num );
/**
*** Convenience functions
**/
extern Widget XmpCreateSpinbox (
Widget parent,
char *name,
Arg *args,
Cardinal arg_qty );
extern void XmpSpinboxSetValue (
Widget spinbox,
long value,
Boolean notify);
extern long XmpSpinboxGetValue (
Widget spinbox );
#ifdef __cplusplus
}
#endif
#endif /* _XmpSpinbox_h */
|