File indexing completed on 2025-01-18 10:15:26
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023 #ifndef _XmLabelP_h_
0024 #define _XmLabelP_h_
0025
0026 #include <Xm/Label.h>
0027 #include <Xm/PrimitiveP.h>
0028 #include <Xm/XmP.h>
0029
0030
0031 #ifdef __cplusplus
0032 extern "C" {
0033 #endif
0034
0035
0036
0037 typedef struct _XmLabelClassPart
0038 {
0039 XtWidgetProc setOverrideCallback;
0040 XmMenuProc menuProcs;
0041 String translations;
0042 XtPointer extension;
0043 } XmLabelClassPart;
0044
0045 typedef struct _XmLabelClassRec
0046 {
0047 CoreClassPart core_class;
0048 XmPrimitiveClassPart primitive_class;
0049 XmLabelClassPart label_class;
0050 } XmLabelClassRec;
0051
0052 externalref XmLabelClassRec xmLabelClassRec;
0053
0054
0055
0056
0057 #define XmInheritSetOverrideCallback ((XtWidgetProc) _XtInherit)
0058 #define XmInheritResize ((XtWidgetProc) _XtInherit)
0059 #define XmInheritRealize ((XtRealizeProc) _XtInherit)
0060
0061
0062
0063 # define LABEL_ACC_PAD 15
0064
0065
0066
0067 typedef struct _XmLabelPart
0068 {
0069 _XmString _label;
0070 _XmString _acc_text;
0071 KeySym mnemonic;
0072 XmStringCharSet mnemonicCharset;
0073 char *accelerator;
0074 unsigned char label_type;
0075 unsigned char alignment;
0076 unsigned char string_direction;
0077 XmFontList font;
0078
0079 Dimension margin_height;
0080 Dimension margin_width;
0081
0082 Dimension margin_left;
0083 Dimension margin_right;
0084 Dimension margin_top;
0085 Dimension margin_bottom;
0086
0087 Boolean recompute_size;
0088
0089 Pixmap pixmap;
0090 Pixmap pixmap_insen;
0091
0092
0093
0094 GC normal_GC;
0095 GC insensitive_GC;
0096 XRectangle TextRect;
0097 XRectangle acc_TextRect;
0098
0099
0100 Boolean skipCallback;
0101 unsigned char menu_type;
0102 Boolean computing_size;
0103
0104 Dimension acc_left_delta;
0105 Dimension acc_right_delta;
0106
0107 Dimension * baselines;
0108
0109 Boolean check_set_render_table;
0110
0111 XmPixmapPlacement pixmap_placement;
0112 Dimension pixmap_text_padding;
0113
0114 XRectangle PixmapRect;
0115 XRectangle StringRect;
0116 #ifdef FIX_1381
0117 GC shadow_GC;
0118 #endif
0119 } XmLabelPart;
0120
0121
0122 typedef struct _XmLabelRec
0123 {
0124 CorePart core;
0125 XmPrimitivePart primitive;
0126 XmLabelPart label;
0127 } XmLabelRec;
0128
0129
0130
0131
0132 #define Lab_MarginWidth(w) (((XmLabelWidget)(w)) ->label.margin_width)
0133 #define Lab_MarginHeight(w) (((XmLabelWidget)(w)) ->label.margin_height)
0134 #define Lab_MarginTop(w) (((XmLabelWidget)(w)) ->label.margin_top)
0135 #define Lab_MarginBottom(w) (((XmLabelWidget)(w)) ->label.margin_bottom)
0136 #define Lab_MarginRight(w) (((XmLabelWidget)(w)) ->label.margin_right)
0137 #define Lab_MarginLeft(w) (((XmLabelWidget)(w)) ->label.margin_left)
0138 #define Lab_TextRect_x(w) (((XmLabelWidget)(w)) ->label.TextRect.x)
0139 #define Lab_TextRect_y(w) (((XmLabelWidget)(w)) ->label.TextRect.y)
0140 #define Lab_TextRect_width(w) (((XmLabelWidget)(w)) ->label.TextRect.width)
0141 #define Lab_TextRect_height(w) (((XmLabelWidget)(w)) ->label.TextRect.height)
0142
0143 #define Lab_IsText(w) (((XmLabelWidget)(w)) ->label.label_type == XmSTRING)
0144 #define Lab_IsPixmap(w) (((XmLabelWidget)(w)) ->label.label_type == XmPIXMAP)
0145 #define Lab_IsPixmapAndText(w) (((XmLabelWidget)(w)) ->label.label_type == \
0146 XmPIXMAP_AND_STRING)
0147
0148 #define Lab_Font(w) (((XmLabelWidget)(w)) ->label.font)
0149
0150 #define Lab_Mnemonic(w) (((XmLabelWidget)(w)) ->label.mnemonic)
0151 #define Lab_Accelerator(w) (((XmLabelWidget)(w)) ->label.accelerator)
0152 #define Lab_AcceleratorText(w) (((XmLabelWidget)(w)) ->label.acc_text)
0153 #define Lab_MenuType(w) (((XmLabelWidget)(w))->label.menu_type)
0154 #define Lab_Shadow(w) (((XmLabelWidget)(w))->primitive.shadow_thickness)
0155 #define Lab_Highlight(w) (((XmLabelWidget)(w))->primitive.highlight_thickness)
0156 #define Lab_Baseline(w) \
0157 (_XmStringBaseline (((XmLabelWidget)(w))->label.font, \
0158 ((XmLabelWidget)(w))->label._label))
0159
0160 #define Lab_ComputingSize(w) (((XmLabelWidget)(w))->label.computing_size)
0161 #define Lab_IsMenupane(w) ((Lab_MenuType(w) == XmMENU_POPUP) || \
0162 (Lab_MenuType(w) == XmMENU_PULLDOWN))
0163
0164
0165 #ifdef __cplusplus
0166 }
0167 #endif
0168
0169 #endif
0170