1XmText(3)                       LessTif Manuals                      XmText(3)
2
3
4

NAME

6       XmText - Motif-compatible text-editing widget
7

SYNOPSIS

9       #include <Xm/Text.h>
10
11       XmText
12
13       XmCreateText
14

DESCRIPTION

16       XmText
17

X RESOURCES

19       Name                         Class                       Type                  Default      Access
20       ───────────────────────────────────────────────────────────────────────────────────────────────────
21       XmNsource                    XmCSource                   Pointer               NULL         CSG
22       XmNactivateCallback          XmCCallback                 Callback              NULL         CSG
23       XmNfocusCallback             XmCCallback                 Callback              NULL         CSG
24       XmNlosingFocusCallback       XmCCallback                 Callback              NULL         CSG
25       XmNvalueChangedCallback      XmCCallback                 Callback              NULL         CSG
26       XmNmodifyVerifyCallback      XmCCallback                 Callback              NULL         CSG
27       XmNmodifyVerifyCallbackWcs   XmCCallback                 Callback              NULL         CSG
28       XmNmotionVerifyCallback      XmCCallback                 Callback              NULL         CSG
29       XmNgainPrimaryCallback       XmCCallback                 Callback              NULL         CSG
30       XmNlosePrimaryCallback       XmCCallback                 Callback              NULL         CSG
31       XmNvalue                     XmCValue                    String                             CSG
32       XmNvalueWcs                  XmCValueWcs                 ValueWcs              (null)       CSG
33       XmNmaxLength                 XmCMaxLength                Int                   2147483647   CSG
34       XmNmarginHeight              XmCMarginHeight             VerticalDimension     NULL         CSG
35       XmNmarginWidth               XmCMarginWidth              HorizontalDimension   NULL         CSG
36       XmNoutputCreate              XmCOutputCreate             Function              NULL         CSG
37       XmNinputCreate               XmCInputCreate              Function              NULL         CSG
38       XmNtopCharacter              XmCTopCharacter             TextPosition          NULL         CSG
39       XmNcursorPosition            XmCCursorPosition           TextPosition          NULL         CSG
40       XmNeditMode                  XmCEditMode                 EditMode              NULL         CSG
41       XmNautoShowCursorPosition    XmCAutoShowCursorPosition   Boolean               NULL         CSG
42       XmNeditable                  XmCEditable                 Boolean               NULL         CSG
43       XmNverifyBell                XmCVerifyBell               Boolean               NULL         CSG
44       XmNshadowThickness           XmCShadowThickness          HorizontalDimension   NULL         CSG
45       XmNhighlightThickness        XmCHighlightThickness       HorizontalDimension   NULL         CSG
46       XmNnavigationType            XmCNavigationType           NavigationType        NULL         CSG
47
48       XmNsource
49
50       XmNactivateCallback
51
52       XmNfocusCallback
53
54       XmNlosingFocusCallback
55
56       XmNvalueChangedCallback
57
58       XmNmodifyVerifyCallback
59
60       XmNmodifyVerifyCallbackWcs
61
62       XmNmotionVerifyCallback
63
64       XmNgainPrimaryCallback
65
66       XmNlosePrimaryCallback
67
68       XmNvalue
69
70       XmNvalueWcs
71
72       XmNmaxLength
73
74       XmNmarginHeight
75
76       XmNmarginWidth
77
78       XmNoutputCreate
79
80       XmNinputCreate
81
82       XmNtopCharacter
83
84       XmNcursorPosition
85
86       XmNeditMode
87
88       XmNautoShowCursorPosition
89
90       XmNeditable
91
92       XmNverifyBell
93
94       XmNshadowThickness
95
96       XmNhighlightThickness
97
98       XmNnavigationType
99

CLASS HIERARCHY

101       Object(3) Rect(3) UnNamedObj(3) Core(3) XmPrimitive(3) XmText(3)
102

CALLBACKS

104       The  XmText  widget defines a large number of callback lists : XmNacti‐
105       vateCallback,   XmNfocusCallback,    XmNlosingFocusCallback,    XmNval‐
106       ueChangedCallback, XmNmodifyVerifyCallback, XmNmodifyVerifyCallbackWcs,
107       XmNmotionVerifyCallback,  XmNgainPrimaryCallback,   XmNlosePrimaryCall‐
108       back.  The XmNactivateCallback can only be called if the XmNeditMode is
109       XmSINGLE_LINE_EDIT.
110         typedef struct {
111             int  reason;
112             XEvent *event;
113             Boolean doit;
114             XmTextPosition currInsert, newInsert;
115             XmTextPosition startPos, endPos;
116             XmTextBlock text;
117         } XmTextVerifyCallbackStruct, *XmTextVerifyPtr;
118
119         typedef struct {
120             char *ptr;
121             int length;
122             XmTextFormat format;
123         } XmTextBlockRec, *XmTextBlock;
124
125         typedef struct {
126             wchar_t *wcsptr;
127             int length;
128         } XmTextBlockRecWcs, *XmTextBlockWcs;
129
130         typedef struct {
131             int  reason;
132             XEvent *event;
133             Boolean doit;
134             XmTextPosition currInsert, newInsert;
135             XmTextPosition startPos, endPos;
136             XmTextBlockWcs text;
137         } XmTextVerifyCallbackStructWcs, *XmTextVerifyPtrWcs;
138

ACTIONS

140       activate()
141       backward-character()
142       backward-paragraph()
143       backward-word()
144       beep()
145       beginning-of-file()
146       beginning-of-line()
147       clear-selection()
148       copy-clipboard()
149       copy-primary()
150       copy-to()
151       cut-clipboard()
152       cut-primary()
153       delete-next-character()
154       delete-previous-character()
155       delete-next-word()
156       delete-previous-word()
157       delete-selection()
158       delete-to-end-of-line()
159       delete-to-start-of-line()
160       delete-all()
161       do-quick-action()
162       end-of-file()
163       end-of-line()
164       extend-adjust()
165       extend-end()
166       extend-start()
167       forward-character()
168       forward-paragraph()
169       forward-word()
170       focus-in()
171       focus-out()
172       grab-focus()
173       Help()
174       insert-string()
175       key-select()
176       kill-next-character()
177       kill-next-word()
178       kill-previous-character()
179       kill-previous-word()
180       kill-selection()
181       kill-to-end-of-line()
182       kill-to-start-of-line()
183       move-destination()
184       move-to()
185       newline()
186       newline-and-backup()
187       newline-and-indent()
188       next-line()
189       next-page()
190       next-tab-group()
191       page-left()
192       page-right()
193       paste-clipboard()
194       prev-tab-group()
195       previous-line()
196       previous-page()
197       process-bdrag()
198
199       process-cancel()
200       process-down()
201       process-up()
202       process-home()
203       process-return()
204       process-shift_down()
205       process-shift-up()
206       process-tab()
207       quick-copy-set()
208       quick-cut-set()
209       redraw-display()
210       scroll-one-line-down()
211       scroll-one-line-up()
212       secondary-adjust()
213       secondary-notify()
214       secondary-start()
215       select-adjust()
216       select-all()
217       select-end()
218       select-start()
219       self-insert()
220       set-anchor()
221       set-insertion-point()
222       set-selection-hint()
223       toggle-add-mode()
224       traverse-home()
225       traverse-next()
226       traverse-prev()
227       unkill()
228

CONVENIENCE FUNCTIONS

230       XmTextClearSelection(Widget w,Time time)
231
232       Clears the primary selection from the Text Widget.
233
234       Boolean XmTextCopy(Widget w,Time time)
235
236       Copies the primary selection from the Text Widget to the Clipboard.
237
238       Boolean XmTextCut(Widget w,Time time)
239
240       Copies the primary selection from the Text Widget to the Clipboard  and
241       deletes it from the Text Widget.
242
243       int XmTextGetBaseline(Widget w)
244
245       Gets the X position of the first baseline in the Text Widget.
246
247       Boolean XmTextGetEditable(Widget w)
248
249       Determine the Editable permission state.
250
251       XmTextPosition XmTextGetInsertionPositiom(Widget w)
252
253       Determine the insertion position of the cursor.
254
255       XmTextPosition XmTextGetLastPosition(Widget w)
256
257       Determine the position of the last character in the Text Widget.
258
259       int XmTextGetMaxLength(Widget w)
260
261       Determine the maximum allowable text string length.
262
263       char *XmTextGetSelection(Widget w)
264
265       Gets the string that is in the primary selection.
266
267       Boolean        XmTextGetSelectionPosition(Widget       w,XmTextPosition
268       *left,XmTextPosition *right)
269
270       Accesses the position of the Lest and Right  position  of  the  primary
271       position.
272
273       XmTextSource XmTextGetSource(Widget w)
274
275       obtain the source of the Text Widget.
276
277       char *XmTextGetString(Widget w)
278
279       Obtain the text from the Text Widget.
280
281       XmTextPosition XmTextGetTopCharacter(Widget w)
282
283       Determine the position of the top of the text in the Text Widget.
284
285       void XmTextInsert(Widget w,XmTextPosition pos ,char *value)
286
287       Insert a string into the text string at a position determined by pos.
288
289       Boolean XmTextPaste(Widget w)
290
291       Insert the clipboard selection into the Text Widget.
292
293       Boolean XmTextPosToXY(Widget w,XmTextPosition pos, Position *x,Position
294       *y)
295
296       Converts a TextPosition into a x,y position.
297
298       Boolean XmTextRemove(Widget w)
299
300       Deletes the primary selection.
301
302       void  XmTextReplace(Widget  w,XmTextPosition  a,XmTextPosition   b,char
303       *value)
304
305       Replace the text from a to b with that given in value.
306
307       void XmTextScroll(Widget w,int num_of_lines)
308
309       Scroll the TextWidget num_of_lines.
310
311       void XmTextSetAddMode(Widget w,Boolean state)
312
313       Sets the Add Mode state of the Text Widget.
314
315       void XmTextSetEditable(Widget w,Boolean state)
316
317       Sets the Editable state of the Text Widget.
318
319       void   XmTextSetHighlight(Widget  w,XmTextPosition  left,XmTextPosition
320       right, XmHighLightMode mode)
321
322       Highlights the text between the two positions.
323
324       void XmTextSetInsertionPosition(Widget w,XmTextPosition pos)
325
326       Set the position of the insertion cursor.
327
328       void XmTextSetMaxLength(Widget w,int max_length)
329
330       Set the maximum length of the text string of the text widget.
331
332       void  XmTextSetSelection(Widget  w,XmTextPosition  first,XmTextPosition
333       last,Time time)
334
335       Set the primary selection of of the text widget.
336
337       void    XmTextSetSource(Widget   w,XmTextSource   source,XmTextPosition
338       top_char,XmTextPosition cursor_pos)
339
340       Set the text source for the text widget.
341
342       void XmTextSetString(Widget w,char *value)
343
344       Set the String value.
345
346       void XmTextSetTopCharacter(Widget w,XmTextPosition top_character)
347
348       Sets the position of the first character displayed.
349
350       void XmTextShowPosition(Widget w,XmTextPosition)
351
352       Show the text at a given position.
353
354       XmTextPosition XmTextXYToPos(Widget w,Position x,Position y)
355
356       Converts an X,Y position into an XmTextPosition.
357

SEE ALSO

359LessTif Project                   April 1998                         XmText(3)
Impressum