File indexing completed on 2025-01-18 10:15:29
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023 #ifndef _XmTextP_h
0024 #define _XmTextP_h
0025
0026 #include <Xm/PrimitiveP.h>
0027 #include <Xm/TextOutP.h>
0028 #include <Xm/TextInP.h>
0029 #include <Xm/TransferT.h>
0030
0031 typedef struct _InputRec *Input;
0032 typedef struct _OutputRec *Output;
0033
0034 #ifdef __cplusplus
0035 extern "C" {
0036 #endif
0037
0038 #define NODELTA LONG_MAX
0039
0040 #define TEXTWIDGETCLASS "Text"
0041
0042 #define GetSrc(widget) (((XmTextWidget) (widget))->text.source)
0043
0044 typedef struct {
0045 XtPointer extension;
0046 } XmTextClassPart;
0047
0048 typedef struct _XmTextClassRec {
0049 CoreClassPart core_class;
0050 XmPrimitiveClassPart primitive_class;
0051 XmTextClassPart text_class;
0052 } XmTextClassRec;
0053
0054 externalref XmTextClassRec xmTextClassRec;
0055
0056 typedef struct {
0057 XmTextPosition start;
0058 Boolean changed;
0059 XmTextPosition changed_position;
0060
0061 Boolean past_end;
0062
0063 LineTableExtra extra;
0064 } LineRec, *Line;
0065
0066 typedef struct _XmTextLineTableRec{
0067 unsigned int start_pos:31;
0068 unsigned int virt_line:1;
0069 } XmTextLineTableRec, *XmTextLineTable;
0070
0071 typedef struct {
0072 XmTextPosition from, to;
0073 } RangeRec;
0074
0075 typedef struct {
0076 Cardinal number;
0077 Cardinal maximum;
0078 RangeRec *range;
0079 } Ranges;
0080
0081
0082
0083
0084 typedef struct _OnTheSpotDataTW {
0085 XmTextPosition start;
0086 XmTextPosition end;
0087 XmTextPosition cursor;
0088 XmTextPosition over_len;
0089 XmTextPosition over_maxlen;
0090 char *over_str;
0091 int under_preedit;
0092 Boolean under_verify_preedit;
0093 Boolean verify_commit;
0094 int pad;
0095 } OnTheSpotDataRecTW, *OnTheSpotDataTW;
0096
0097 #define PreStartTW(tw) ((tw)->text.onthespot->start)
0098 #define PreEndTW(tw) ((tw)->text.onthespot->end)
0099 #define PreCursorTW(tw) ((tw)->text.onthespot->cursor)
0100 #define PreOverLen(tw) ((tw)->text.onthespot->over_len)
0101 #define PreOverMaxLen(tw) ((tw)->text.onthespot->over_maxlen)
0102 #define PreOverStr(tw) ((tw)->text.onthespot->over_str)
0103 #define PreUnder(tw) ((tw)->text.onthespot->under_preedit)
0104 #define UnderVerifyPreedit(tw) ((tw)->text.onthespot->under_verify_preedit)
0105 #define VerifyCommitNeeded(tw) ((tw)->text.onthespot->verify_commit)
0106
0107
0108
0109
0110
0111
0112 typedef struct _XmTextPart {
0113 XmTextSource source;
0114 XtCallbackList activate_callback;
0115 XtCallbackList focus_callback;
0116 XtCallbackList losing_focus_callback;
0117 XtCallbackList value_changed_callback;
0118 XtCallbackList modify_verify_callback;
0119 XtCallbackList wcs_modify_verify_callback;
0120
0121 XtCallbackList motion_verify_callback;
0122
0123 XtCallbackList gain_primary_callback;
0124
0125 XtCallbackList lose_primary_callback;
0126
0127 char *value;
0128 wchar_t *wc_value;
0129 Dimension margin_height;
0130 Dimension margin_width;
0131 Position cursor_position_x;
0132 OutputCreateProc output_create;
0133 InputCreateProc input_create;
0134
0135
0136
0137 XmTextPosition top_character;
0138 XmTextPosition bottom_position;
0139 XmTextPosition cursor_position;
0140 int max_length;
0141 int edit_mode;
0142
0143 Boolean auto_show_cursor_position;
0144
0145
0146 Boolean editable;
0147 Boolean verify_bell;
0148
0149
0150 Boolean add_mode;
0151 Boolean traversed;
0152
0153 Boolean in_redisplay;
0154 Boolean needs_redisplay;
0155 Boolean in_refigure_lines;
0156 Boolean needs_refigure_lines;
0157 Boolean in_setvalues;
0158
0159 Boolean in_resize;
0160
0161 Boolean in_expose;
0162
0163 Boolean highlight_changed;
0164 Boolean pendingoff;
0165
0166 char char_size;
0167
0168 OnOrOff on_or_off;
0169
0170 Output output;
0171 Input input;
0172
0173 XmTextPosition first_position;
0174 XmTextPosition last_position;
0175 XmTextPosition forget_past;
0176 XmTextPosition force_display;
0177 XmTextPosition new_top;
0178 XmTextPosition last_top_char;
0179 XmTextPosition dest_position;
0180 int disable_depth;
0181
0182 int pending_scroll;
0183 int total_lines;
0184 int top_line;
0185 int vsbar_scrolling;
0186
0187 Cardinal number_lines;
0188 Cardinal maximum_lines;
0189 Line line;
0190
0191 Ranges repaint;
0192 _XmHighlightData highlight;
0193 _XmHighlightData old_highlight;
0194 Widget inner_widget;
0195
0196
0197 XmTextLineTable line_table;
0198 unsigned int table_size;
0199 unsigned int table_index;
0200
0201 XtCallbackList destination_callback;
0202 int hsbar_scrolling;
0203
0204 OnTheSpotDataTW onthespot;
0205
0206 XtTranslations tm_table;
0207 } XmTextPart;
0208
0209 typedef struct _XmTextRec {
0210 CorePart core;
0211 XmPrimitivePart primitive;
0212 XmTextPart text;
0213 } XmTextRec;
0214
0215
0216 #ifdef __cplusplus
0217 }
0218 #endif
0219
0220 #endif
0221