Lines Matching refs:text

73 #define TEXT_NAME     ("text")
130 * Description: Action routine that can be bound to the text widget
132 * Arguments: w - the text widget.
159 XtGetValues(ctx->text.source, args, ONE);
171 if (!ctx->text.file_insert) {
172 ctx->text.file_insert = CreateDialog(w, ptr, "insertFile",
174 XtRealizeWidget(ctx->text.file_insert);
177 CenterWidgetOnPoint(ctx->text.file_insert, event);
178 XtPopup(ctx->text.file_insert, XtGrabNone);
184 * closure - a pointer to the main text widget that
199 XtPopdown( ctx->text.file_insert );
200 (void) SetResourceByName( ctx->text.file_insert, LABEL_NAME,
205 * Description: Actually insert the file named in the text widget
208 * closure - a pointer to the text widget to insert the
226 if ( (temp_widget = XtNameToWidget(ctx->text.file_insert, buf)) == NULL ) {
228 "*** Error: Could not get text widget from file insert popup");
241 (void)SetResourceByName(ctx->text.file_insert,
247 * Description: Inserts a file into the text widget.
248 * Arguments: tw - The text widget to insert this file into.
259 XawTextBlock text;
268 text.firstPos = 0;
269 text.format = FMT8BIT;
271 while ((text.length = read(fid, buf, BUFSIZ)) > 0) {
272 text.ptr = buf;
273 if (XawTextReplace(tw, pos, pos, &text) != XawEditDone) {
278 text.length = 0;
279 (void) XawTextReplace(tw, start_pos, pos, &text);
283 pos += text.length;
294 * tw - the main text widget.
305 Widget label, text, cancel, insert;
325 text = XtCreateManagedWidget(TEXT_NAME, asciiTextWidgetClass, form,
330 XtSetArg(args[num_args], XtNfromVert, text); num_args++;
338 XtSetArg(args[num_args], XtNfromVert, text); num_args++;
349 XtSetKeyboardFocus(form, text);
356 XtOverrideTranslations(text, trans);
396 if (DoSearch(tw->text.search) && popdown)
397 PopdownSearch(w, (caddr_t) tw->text.search, NULL);
417 PopdownSearch(w, (caddr_t) tw->text.search, NULL);
460 * Description: Action routine that can be bound to the text widget
462 * Arguments: w - the text widget.
496 if (ctx->text.source->Search == NULL) {
529 if (ctx->text.search== NULL) {
530 ctx->text.search = XtNew(struct SearchAndReplace);
531 ctx->text.search->search_popup = CreateDialog(w, ptr, "search",
533 XtRealizeWidget(ctx->text.search->search_popup);
537 XtGetValues(ctx->text.source, args, ONE);
539 InitializeSearchWidget(ctx->text.search, dir, (edit_mode == XawtextEdit));
541 CenterWidgetOnPoint(ctx->text.search->search_popup, event);
542 XtPopup(ctx->text.search->search_popup, XtGrabNone);
582 * tw - the main text widget.
595 struct SearchAndReplace * search = ((TextWidget) tw)->text.search;
738 * Initialize the text entry fields.
780 XawTextBlock text;
782 text.ptr = GetString(search->search_text);
783 text.length = strlen(text.ptr);
784 text.firstPos = 0;
785 text.format = FMT8BIT;
790 pos = XawTextSearch( tw, dir, &text);
793 sprintf( msg, "Could not find string '%s'.", text.ptr);
796 XawTextSetInsertionPoint( tw, pos + text.length);
800 XawTextSetSelection( tw, pos, pos + text.length);
840 if (Replace( ctx->text.search, TRUE, popdown) && popdown)
841 PopdownSearch(w, (caddr_t) ctx->text.search, (caddr_t)NULL);
846 * in the search dialog's text widget
847 * with the one in the replace dialog's text widget.
866 * in the search dialog's text widget
867 * with the one in the replace dialog's text widget.
886 * replacing strings in the main text widget.
1028 search = ((TextWidget) XtParent(XtParent(XtParent(w))))->text.search;
1055 * Description: Sets the current text field.
1056 * Arguments: new, old - new and old text fields.
1138 * Arguments: text - the text widget whose string we will get.
1143 GetString(text)
1144 Widget text;
1150 XtGetValues( text, args, ONE );
1216 * Arguments: parent - the parent of the dialog - the main text widget.
1227 * ptr - the initial string for the dialog's text widget.
1228 * parent - the parent of the dialog - the main text widget.