Warning, file /include/Xm/SpinBP.h was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028 #ifndef _XmSpinBP_h
0029 #define _XmSpinBP_h
0030
0031 #include <Xm/LabelP.h>
0032 #include <Xm/ManagerP.h>
0033 #include <Xm/SpinB.h>
0034
0035 #ifdef __cplusplus
0036 extern "C" {
0037 #endif
0038
0039
0040
0041 typedef struct _XmSpinBoxConstraint
0042 {
0043 XmStringTable values;
0044 int position;
0045 int num_values;
0046
0047 int minimum_value;
0048 int maximum_value;
0049 int increment_value;
0050 short decimal_points;
0051
0052 unsigned char sb_child_type;
0053 unsigned char arrow_sensitivity;
0054 Boolean wrap;
0055 unsigned char position_type;
0056
0057 } XmSpinBoxConstraintPart, *XmSpinBoxConstraint;
0058
0059 typedef struct _XmSpinBoxConstraintRec
0060 {
0061 XmManagerConstraintPart manager;
0062 XmSpinBoxConstraintPart spinBox;
0063 } XmSpinBoxConstraintRec, *XmSpinBoxConstraintPtr;
0064
0065 typedef Widget (*XmGetCallbackWidgetProc)(Widget);
0066
0067
0068 typedef struct _XmSpinBoxClassPart
0069 {
0070 XmGetCallbackWidgetProc get_callback_widget;
0071 XtPointer extension;
0072 } XmSpinBoxClassPart;
0073
0074
0075
0076
0077 typedef struct _XmSpinBoxClassRec
0078 {
0079 CoreClassPart core_class;
0080 CompositeClassPart composite_class;
0081 ConstraintClassPart constraint_class;
0082 XmManagerClassPart manager_class;
0083 XmSpinBoxClassPart spinBox_class;
0084 } XmSpinBoxClassRec;
0085
0086 externalref XmSpinBoxClassRec xmSpinBoxClassRec;
0087
0088
0089
0090 typedef struct _XmSpinBoxPart
0091 {
0092 Dimension arrow_size;
0093 Dimension margin_width;
0094 Dimension margin_height;
0095 Dimension spacing;
0096 unsigned int initial_delay;
0097 unsigned int repeat_delay;
0098 XtCallbackList modify_verify_cb;
0099 XtCallbackList value_changed_cb;
0100 XRectangle up_arrow_rect;
0101 XRectangle down_arrow_rect;
0102 Widget textw;
0103 int boundary;
0104 int last_hit;
0105 int make_change;
0106 Dimension ideal_height;
0107 Dimension ideal_width;
0108 GC arrow_gc;
0109 GC insensitive_gc;
0110 Mask dim_mask;
0111 XtIntervalId spin_timer;
0112 Boolean up_arrow_pressed;
0113 Boolean down_arrow_pressed;
0114 unsigned char arrow_layout;
0115 unsigned char default_arrow_sensitivity;
0116 Dimension detail_shadow_thickness;
0117 unsigned char arrow_orientation;
0118 } XmSpinBoxPart;
0119
0120
0121
0122
0123 typedef struct _XmSpinBoxRec
0124 {
0125 CorePart core;
0126 CompositePart composite;
0127 ConstraintPart constraint;
0128 XmManagerPart manager;
0129 XmSpinBoxPart spinBox;
0130 } XmSpinBoxRec;
0131
0132
0133 #define XmRPositionValue "PositionValue"
0134
0135 #define SB_GetConstraintRec(w) \
0136 ((XmSpinBoxConstraint)(&((XmSpinBoxConstraintPtr) (w)->core.constraints)->spinBox))
0137
0138 #define SB_WithChild(w) \
0139 (((XmSpinBoxRec *) (w))->spinBox.textw != NULL)
0140
0141 #define SB_ChildCount(w) \
0142 (((XmSpinBoxRec *) (w))->composite.num_children)
0143
0144 #define SB_GetArrowOrientation(w) \
0145 (((XmSpinBoxRec *) (w))->spinBox.arrow_orientation)
0146
0147 #define SB_ChildIsNumeric(wc) \
0148 (((XmSpinBoxConstraint) (wc))->sb_child_type == (unsigned char) XmNUMERIC)
0149
0150 #define SB_ChildPositionTypeIsValue(wc) \
0151 (((XmSpinBoxConstraint) (wc))->position_type == \
0152 (unsigned char) XmPOSITION_VALUE)
0153
0154 #define SB_ChildMaximumPositionValue(wc) \
0155 ( ( ((wc) == (XmSpinBoxConstraint) NULL) ? \
0156 0 : \
0157 ( (SB_ChildIsNumeric(wc)) ? \
0158 (wc)->maximum_value : \
0159 ( ((wc)->num_values > 0) ? \
0160 ((wc)->num_values - 1) : \
0161 0 \
0162 ) \
0163 ) \
0164 ) \
0165 )
0166
0167 #define SB_ChildMinimumPositionValue(wc) \
0168 ( ( ((wc) == (XmSpinBoxConstraint) NULL) ? \
0169 0 : \
0170 ( (SB_ChildIsNumeric(wc)) ? \
0171 (wc)->minimum_value : \
0172 0 \
0173 ) \
0174 ) \
0175 )
0176
0177 #ifdef __cplusplus
0178 }
0179 #endif
0180
0181 #endif
0182
0183
0184
0185