Lines Matching refs:text

59  * MultiSrc.c - MultiSrc object. (For use with the text widget).
248 * pos - position of the text to retreive.
249 * RETURNED text - text block that will contain returned text.
255 ReadText(w, pos, text, length)
258 XawTextBlock* text;
265 text->format = XawFmtWide;
266 text->firstPos = pos;
267 text->ptr = (char *)(piece->text + (pos - start));
269 text->length = (length > count) ? count : length;
270 return(pos + text->length);
274 * Description: Replaces a block of text with new text.
276 * startPos, endPos - ends of text that will be removed.
277 * text - new text to be inserted into buffer at startPos.
294 XawTextBlock text;
296 /* STEP 1: The user handed me a text block called `u_text' that may be
298 * `text' to hold FMTWIDE. So, this copies `u_text' to `text', and if
302 text.length = 0;
306 text.firstPos = u_text_p->firstPos;
307 text.length = u_text_p->length;
308 text.ptr = u_text_p->ptr;
309 /* text.format is unneeded */
315 text.firstPos = 0;
316 text.length = u_text_p->length; /* _XawTextMBToWC converts this to wchar len. */
318 text.ptr = (char*)_XawTextMBToWC( XtDisplay(XtParent(w)),
319 &(u_text_p->ptr[u_text_p->firstPos]), &(text.length) );
324 /*((wchar_t*)text.ptr)[ text.length ] = NULL;*/
354 MyWStrncpy(end_piece->text, (end_piece->text + endPos - end_first),
363 MyWStrncpy(start_piece->text + (startPos - start_first),
364 start_piece->text + (endPos - start_first),
369 start_piece->text[src->multi_src.length - (endPos - startPos)] = (wchar_t)0;
373 src->multi_src.length += text.length -(endPos - startPos);
374 /*((TextWidget)src->object.parent)->text.lastPos = src->multi_src.length;*/
380 if ( text.length != 0) {
384 length = text.length;
385 firstPos = text.firstPos;
399 /*((TextWidget)src->object.parent)->text.lastPos = src->multi_src.length;*/
402 start_piece->text[src->multi_src.length] = (wchar_t)0;
415 ptr = start_piece->text + (startPos - start_first);
418 wptr =(wchar_t *)text.ptr;
430 /* In other words, text is not the u_text that the user handed me but
433 XFree( text.ptr );
436 start_piece->text[start_piece->used] = (wchar_t)0;
446 * Description: Scans the text source for the number and type
507 ptr = (position - first) + piece->text;
548 if ( ptr < piece->text ) {
550 if (piece == NULL) /* Begining of text. */
552 ptr = piece->text + piece->used - 1;
554 else if ( ptr >= (piece->text + piece->used) ) {
556 if (piece == NULL) /* End of text. */
558 ptr = piece->text;
586 * Description: Searchs the text source for the text block passed
590 * text - the text block to search for.
595 Search(w, position, dir, text )
599 XawTextBlock* text;
627 I'm being passed a string claiming to be 8bit chars (ie, MB text.)
631 wtarget_len = text->length;
633 if ( text->format == XawFmtWide )
634 wtarget = &( ((wchar_t*)text->ptr) [text->firstPos] );
638 wtarget = _XawTextMBToWC( d, &text->ptr[ text->firstPos ], &wtarget_len );
651 ptr = (position - first) + piece->text;
657 if (count == (text->length - 1))
673 while ( ptr < piece->text ) {
675 if (piece == NULL) { /* Begining of text. */
679 ptr = piece->text + piece->used - 1;
682 while ( ptr >= (piece->text + piece->used) ) {
684 if (piece == NULL) { /* End of text. */
688 ptr = piece->text;
744 XawTextSetSource( XtParent(new), new, 0); /* Tell text widget
797 src->multi_src.first_piece->text;
1042 (void) wcsncpy( wc_string + first, piece->text, piece->used );
1111 /*((TextWidget)src->object.parent)->text.lastPos = src->multi_src.length;*/
1271 piece->text = (wchar_t*)src->multi_src.string;
1281 piece->text = (wchar_t*)XtMalloc(src->multi_src.piece_size * bytes);
1284 (void) wcsncpy(piece->text, ptr, piece->used);
1367 XtFree((char *)piece->text);
1414 new->text = (wchar_t*)XtMalloc(src->multi_src.piece_size * sizeof(wchar_t));
1415 (void) wcsncpy(new->text, piece->text + HALF_PIECE,