Lines Matching refs:text

83 static char* TEXT_NAME     = "text";
147 * Description: Action routine that can be bound to the text widget
149 * Arguments: w - the text widget.
175 XtGetValues(ctx->text.source, args, ONE);
187 if (!ctx->text.file_insert) {
188 ctx->text.file_insert = CreateDialog(w, ptr, "insertFile",
190 XtRealizeWidget(ctx->text.file_insert);
191 SetWMProtocolTranslations(ctx->text.file_insert);
194 CenterWidgetOnPoint(ctx->text.file_insert, event);
195 XtPopup(ctx->text.file_insert, XtGrabNone);
201 * closure - a pointer to the main text widget that
216 XtPopdown( ctx->text.file_insert );
217 (void) SetResourceByName( ctx->text.file_insert, LABEL_NAME,
222 * Description: Actually insert the file named in the text widget
225 * closure - a pointer to the text widget to insert the
242 if ( (temp_widget = XtNameToWidget(ctx->text.file_insert, buf)) == NULL ) {
244 "*** Error: Could not get text widget from file insert popup");
254 (void)SetResourceByName(ctx->text.file_insert,
260 * Description: Inserts a file into the text widget.
261 * Arguments: tw - The text widget to insert this file into.
273 XawTextBlock text;
285 text.firstPos = 0;
286 text.length = (ftell(file))/sizeof(unsigned char);
287 text.ptr = XtMalloc((text.length + 1) * sizeof(unsigned char));
288 text.format = XawFmt8Bit;
291 if (fread(text.ptr, sizeof(unsigned char), text.length, file) != (size_t)text.length)
295 /* DELETE if (text.format == XawFmtWide) {
298 wstr = _XawTextMBToWC(XtDisplay(tw), text.ptr, &(text.length));
299 wstr[text.length] = NULL;
300 XtFree(text.ptr);
301 text.ptr = (char *)wstr;
303 (text.ptr)[text.length] = '\0';
306 if (XawTextReplace(tw, pos, pos, &text) != XawEditDone) {
307 XtFree(text.ptr);
311 pos += text.length;
312 XtFree(text.ptr);
323 * tw - the main text widget.
334 Widget label, text, cancel, insert;
354 text = XtCreateManagedWidget(TEXT_NAME, asciiTextWidgetClass, form,
359 XtSetArg(args[num_args], XtNfromVert, text); num_args++;
367 XtSetArg(args[num_args], XtNfromVert, text); num_args++;
377 XtSetKeyboardFocus(form, text);
384 XtOverrideTranslations(text, trans);
424 if (DoSearch(tw->text.search) && popdown)
425 PopdownSearch(w, (XtPointer) tw->text.search, (XtPointer)NULL);
445 PopdownSearch(w, (XtPointer) tw->text.search, (XtPointer)NULL);
488 * Description: Action routine that can be bound to the text widget
490 * Arguments: w - the text widget.
523 if (ctx->text.source->Search == NULL) {
564 if (ctx->text.search== NULL) {
565 ctx->text.search = XtNew(struct SearchAndReplace);
566 ctx->text.search->search_popup = CreateDialog(w, ptr, "search",
568 XtRealizeWidget(ctx->text.search->search_popup);
569 SetWMProtocolTranslations(ctx->text.search->search_popup);
572 XtVaSetValues(ctx->text.search->search_text, XtNstring, ptr, NULL);
576 XtGetValues(ctx->text.source, args, ONE);
578 InitializeSearchWidget(ctx->text.search, dir, (edit_mode == XawtextEdit));
580 CenterWidgetOnPoint(ctx->text.search->search_popup, event);
581 XtPopup(ctx->text.search->search_popup, XtGrabNone);
621 * tw - the main text widget.
634 struct SearchAndReplace * search = ((TextWidget) tw)->text.search;
773 * Initialize the text entry fields.
814 XawTextBlock text;
818 text.ptr = GetStringRaw(search->search_text);
819 if ((text.format = _XawTextFormat(ctx)) == XawFmtWide)
820 text.length = wcslen((wchar_t*)text.ptr);
822 text.length = strlen(text.ptr);
823 text.firstPos = 0;
828 pos = XawTextSearch( tw, dir, &text);
853 XawTextSetInsertionPoint( tw, pos + text.length);
857 XawTextSetSelection( tw, pos, pos + text.length);
892 if (Replace( ctx->text.search, TRUE, popdown) && popdown)
893 PopdownSearch(w, (XtPointer) ctx->text.search, (XtPointer)NULL);
898 * in the search dialog's text widget
899 * with the one in the replace dialog's text widget.
918 * in the search dialog's text widget
919 * with the one in the replace dialog's text widget.
938 * replacing strings in the main text widget.
1107 search = ((TextWidget) XtParent(XtParent(XtParent(w))))->text.search;
1134 * Description: Sets the current text field.
1135 * Arguments: new, old - new and old text fields.
1226 * Arguments: text - the text widget whose string we will get.
1234 GetString(text)
1235 Widget text;
1241 XtGetValues( text, args, ONE );
1253 last = XawTextSourceScan(ctx->text.source, 0, XawstAll, XawsdRight,
1254 ctx->text.mult, TRUE);
1320 * Arguments: parent - the parent of the dialog - the main text widget.
1331 * ptr - the initial string for the dialog's text widget.
1332 * parent - the parent of the dialog - the main text widget.