Lines Matching defs:text

97       ctx->text.time = event->xbutton.time;
101 ctx->text.time = event->xkey.time;
104 ctx->text.time = event->xmotion.time;
108 ctx->text.time = event->xcrossing.time;
121 ctx->text.ev_x = event->xbutton.x;
122 ctx->text.ev_y = event->xbutton.y;
128 XawTextSinkGetCursorBounds(ctx->text.sink, &cursor);
129 ctx->text.ev_x = cursor.x + cursor.width / 2;;
130 ctx->text.ev_y = cursor.y + cursor.height / 2;;
134 ctx->text.ev_x = event->xmotion.x;
135 ctx->text.ev_y = event->xmotion.y;
139 ctx->text.ev_x = event->xcrossing.x;
140 ctx->text.ev_y = event->xcrossing.y;
150 ctx->text.mult = 1;
194 XawTextBlock text;
215 /* Many programs, especially old terminal emulators, give us multibyte text
266 text.format = XawFmtWide;
268 text.format = XawFmt8Bit;
269 text.ptr = (char*)value;
270 text.firstPos = 0;
271 text.length = *length;
272 if (_XawTextReplace(ctx, ctx->text.insertPos, ctx->text.insertPos, &text)) {
276 ctx->text.insertPos = SrcScan(ctx->text.source, ctx->text.insertPos,
277 XawstPositions, XawsdRight, text.length, TRUE);
341 GetSelection(w, ((TextWidget)w)->text.time, params, *num_params);
360 ctx->text.insertPos = SrcScan(ctx->text.source, ctx->text.insertPos,
361 type, dir, ctx->text.mult, include);
464 ctx->text.mult++;
466 new = SrcScan(ctx->text.source, ctx->text.insertPos,
469 FindDist(ctx->text.sink, new, ctx->text.margin.left, ctx->text.insertPos,
472 new = SrcScan(ctx->text.source, ctx->text.insertPos, XawstEOL, dir,
473 ctx->text.mult, (dir == XawsdRight));
475 next_line = SrcScan(ctx->text.source, new, XawstEOL, XawsdRight, 1, FALSE);
477 FindPos(ctx->text.sink, new, ctx->text.margin.left, from_left, FALSE,
478 &(ctx->text.insertPos), &garbage, &garbage);
480 if (ctx->text.insertPos > next_line)
481 ctx->text.insertPos = next_line;
539 _XawTextVScroll(ctx, ctx->text.mult);
541 _XawTextVScroll(ctx, -ctx->text.mult);
574 int scroll_val = Max(1, ctx->text.lt.lines - 2);
581 ctx->text.insertPos = ctx->text.lt.top;
639 Widget src = ctx->text.source;
652 XmuConvertStandardSelection(w, ctx->text.time, selection,
684 for (salt = ctx->text.salt2; salt; salt = salt->next)
797 if (XmuConvertStandardSelection(w, ctx->text.time, selection, target, type,
816 for (salt = ctx->text.salt2; salt; salt = nextSalt)
853 ctx->text.salt2 = nextSalt;
867 XawTextBlock text;
900 salt->next = ctx->text.salt2;
901 ctx->text.salt2 = salt;
903 XtOwnSelection ((Widget) ctx, selection, ctx->text.time,
911 text.length = 0;
912 text.firstPos = 0;
914 text.format = _XawTextFormat(ctx);
915 text.ptr = ""; /* These two lines needed to make legal TextBlock */
917 if (_XawTextReplace(ctx, from, to, &text)) {
921 ctx->text.insertPos = from;
922 ctx->text.showposition = TRUE;
936 to = SrcScan(ctx->text.source, ctx->text.insertPos,
937 type, dir, ctx->text.mult, include);
945 if (to == ctx->text.insertPos)
946 to = SrcScan(ctx->text.source, ctx->text.insertPos,
947 type, dir, ctx->text.mult + 1, include);
951 to = ctx->text.insertPos;
954 from = ctx->text.insertPos;
1043 end_of_line = SrcScan(ctx->text.source, ctx->text.insertPos, XawstEOL,
1044 XawsdRight, ctx->text.mult, FALSE);
1045 if (end_of_line == ctx->text.insertPos)
1046 end_of_line = SrcScan(ctx->text.source, ctx->text.insertPos, XawstEOL,
1047 XawsdRight, ctx->text.mult, TRUE);
1049 _DeleteOrKill(ctx, ctx->text.insertPos, end_of_line, TRUE);
1072 _DeleteOrKill(ctx, ctx->text.s.left, ctx->text.s.right, kill);
1110 XawTextBlock text;
1112 text.format = _XawTextFormat(ctx);
1113 text.length = ctx->text.mult;
1114 text.firstPos = 0;
1116 if ( text.format == XawFmtWide ) {
1118 text.ptr = XtMalloc(sizeof(wchar_t) * ctx->text.mult);
1119 wptr = (wchar_t *)text.ptr;
1120 for (count = 0; count < ctx->text.mult; count++ )
1124 text.ptr = XtMalloc(sizeof(char) * ctx->text.mult);
1125 for (count = 0; count < ctx->text.mult; count++ )
1126 text.ptr[count] = XawLF;
1129 if (_XawTextReplace(ctx, ctx->text.insertPos, ctx->text.insertPos, &text)) {
1134 ctx->text.showposition = TRUE;
1136 XtFree( text.ptr );
1162 ctx->text.insertPos = SrcScan(ctx->text.source, ctx->text.insertPos,
1163 XawstPositions, XawsdRight, ctx->text.mult, TRUE);
1188 XawTextBlock text;
1195 pos1 = SrcScan(ctx->text.source, ctx->text.insertPos,
1198 line_to_ip = _XawTextGetText(ctx, pos1, ctx->text.insertPos);
1200 text.format = _XawTextFormat(ctx);
1201 text.firstPos = 0;
1203 if ( text.format == XawFmtWide ) {
1205 text.ptr = XtMalloc( ( 1 + wcslen((wchar_t*)line_to_ip) ) * sizeof(wchar_t) );
1207 ptr = (wchar_t*)text.ptr;
1211 length = wcslen((wchar_t*)text.ptr);
1215 text.length = wcslen((wchar_t*)text.ptr);
1219 text.ptr = XtMalloc( ( 1 + strlen( line_to_ip ) ) * sizeof( char ) );
1220 printf( "%p ", text.ptr );
1221 ptr = text.ptr;
1225 length = strlen(text.ptr);
1229 text.length = strlen(text.ptr);
1233 if (_XawTextReplace(ctx,ctx->text.insertPos, ctx->text.insertPos, &text)) {
1235 XtFree(text.ptr);
1239 XtFree(text.ptr);
1240 ctx->text.insertPos = SrcScan(ctx->text.source, ctx->text.insertPos,
1241 XawstPositions, XawsdRight, text.length, TRUE);
1263 l = SrcScan(ctx->text.source, ctx->text.insertPos,
1265 r = SrcScan(ctx->text.source, l, XawstWhiteSpace, XawsdRight, 1, FALSE);
1280 _XawTextSetSelection(ctx,zeroPosition,ctx->text.lastPos,params,*num_params);
1425 ctx->text.hasfocus = TRUE;
1441 ctx->text.hasfocus = FALSE;
1455 !ctx->text.hasfocus) {
1471 !ctx->text.hasfocus) {
1481 * Arguments: ctx - The text widget.
1491 XawTextBlock text;
1493 if ( !((ctx->text.auto_fill) && (ctx->text.mult == 1)) )
1496 for ( line_num = 0; line_num < ctx->text.lt.lines ; line_num++)
1497 if ( ctx->text.lt.info[line_num].position >= ctx->text.insertPos )
1503 x = ctx->text.margin.left;
1504 XawTextSinkFindPosition( ctx->text.sink,ctx->text.lt.info[line_num].position,
1507 if ( ret_pos >= ctx->text.insertPos )
1510 text.format = XawFmt8Bit;
1512 text.format = XawFmtWide;
1513 text.ptr = (char *)XtMalloc(sizeof(wchar_t) * 2);
1514 ((wchar_t*)text.ptr)[0] = _Xaw_atowc(XawLF);
1515 ((wchar_t*)text.ptr)[1] = 0;
1517 text.ptr = "\n";
1518 text.length = 1;
1519 text.firstPos = 0;
1521 if (_XawTextReplace(ctx, ret_pos - 1, ret_pos, &text))
1537 XawTextBlock text;
1539 if (XtIsSubclass (ctx->text.source, (WidgetClass) multiSrcObjectClass))
1540 text.length = _XawImWcLookupString (w, &event->xkey,
1543 text.length = XLookupString ((XKeyEvent*)event, strbuf, BUFSIZ, &keysym, &compose_status);
1545 if (text.length == 0)
1548 text.format = _XawTextFormat( ctx );
1549 if ( text.format == XawFmtWide ) {
1550 text.ptr = ptr = XtMalloc(sizeof(wchar_t) * text.length * ctx->text.mult );
1551 for (count = 0; count < ctx->text.mult; count++ ) {
1552 memcpy((char*) ptr, (char *)strbuf, sizeof(wchar_t) * text.length );
1553 ptr += sizeof(wchar_t) * text.length;
1557 text.ptr = ptr = XtMalloc( sizeof(char) * text.length * ctx->text.mult );
1558 for ( count = 0; count < ctx->text.mult; count++ ) {
1559 strncpy( ptr, strbuf, text.length );
1560 ptr += text.length;
1564 text.length = text.length * ctx->text.mult;
1565 text.firstPos = 0;
1569 error = _XawTextReplace(ctx, ctx->text.insertPos,ctx->text.insertPos, &text);
1572 ctx->text.insertPos = SrcScan(ctx->text.source, ctx->text.insertPos,
1573 XawstPositions, XawsdRight, text.length, TRUE);
1579 XtFree(text.ptr);
1688 XawTextBlock text;
1691 text.firstPos = 0;
1692 text.format = _XawTextFormat( ctx );
1697 text.ptr = IfHexConvertHexElseReturnParam( *params, &text.length );
1699 if ( text.length == 0 ) continue;
1704 text.ptr = (char*) _XawTextMBToWC( XtDisplay(w), text.ptr,
1705 &text.length );
1707 if ( text.ptr == NULL ) { /* conversion error */
1718 temp_len = text.length; /* _XawTextWCToMB's 3rd arg is in_out */
1719 if ( _XawTextWCToMB( XtDisplay(w), (wchar_t*)text.ptr, &temp_len ) == NULL ) {
1729 if ( _XawTextReplace( ctx, ctx->text.insertPos,
1730 ctx->text.insertPos, &text ) ) {
1737 ctx->text.insertPos = SrcScan( ctx->text.source, ctx->text.insertPos,
1738 XawstPositions, XawsdRight, text.length, TRUE );
1777 if ( ctx->text.display_caret == display_caret )
1781 ctx->text.display_caret = display_caret;
1791 * Many of the text widget actions will will perform n actions, where n is
1816 ctx->text.mult = 1;
1829 ctx->text.mult *= mult;
1846 Widget src = ctx->text.source;
1847 XawTextBlock text;
1853 text.firstPos = 0;
1854 text.format = _XawTextFormat(ctx);
1855 if ( text.format == XawFmt8Bit )
1856 text.ptr= " ";
1861 text.ptr = (char*) wc_two_spaces;
1894 text.length = 1;
1896 if (text.format == XawFmtWide) {
1898 text.length++;
1901 text.length++; /* Put in two spaces. */
1908 if (text.format == XawFmtWide) {
1919 to -= (i - text.length - 1);
1921 if (_XawTextReplace(ctx, endPos, startPos, &text) != XawEditDone)
1923 startPos -= i - text.length;
1940 XawTextBlock text;
1945 text.firstPos = 0;
1946 text.length = 1;
1947 text.format = _XawTextFormat( ctx );
1949 if ( text.format == XawFmt8Bit )
1950 text.ptr = "\n";
1954 text.ptr = (char*) wide_CR;
1960 XawTextSinkFindPosition( ctx->text.sink, startPos,
1961 (int) ctx->text.margin.left,
1967 eol = SrcScan(ctx->text.source, eol, XawstPositions, XawsdLeft, 1, TRUE);
1968 space= SrcScan(ctx->text.source, eol, XawstWhiteSpace,XawsdRight,1, TRUE);
1977 if (text.format == XawFmtWide) {
1985 endPos = SrcScan(ctx->text.source, endPos,
1989 if (_XawTextReplace(ctx, startPos, endPos, &text))
1992 startPos = SrcScan(ctx->text.source, startPos,
2015 if ( ctx->text.insertPos > SrcScan( ctx->text.source, 0,
2017 ctx->text.insertPos = to;
2020 _XawTextBuildLineTable(ctx, ctx->text.lt.top, TRUE);
2042 from = SrcScan( ctx->text.source, ctx->text.insertPos,
2044 to = SrcScan( ctx->text.source, from,
2069 XawTextBlock text;
2077 start = SrcScan( ctx->text.source, ctx->text.insertPos, XawstPositions,
2079 end = SrcScan( ctx->text.source, ctx->text.insertPos, XawstPositions,
2080 XawsdRight, ctx->text.mult, TRUE );
2084 if ( ( start == ctx->text.insertPos ) || ( end == ctx->text.insertPos ) ) {
2090 ctx->text.insertPos = end;
2092 text.firstPos = 0;
2093 text.format = _XawTextFormat(ctx);
2095 /* Retrieve text and swap the characters. */
2097 if ( text.format == XawFmtWide) {
2102 text.length = wcslen( wbuf );
2104 for ( i = 1; i < text.length; i++ )
2109 } else { /* thus text.format == XawFmt8Bit */
2112 text.length = strlen( buf );
2114 for ( i = 1; i < text.length; i++ )
2119 text.ptr = buf;
2121 /* Store new text in source. */
2123 if (_XawTextReplace (ctx, start, end, &text)) /* Unable to edit, complain. */
2249 /* Action to bind special translations for text Dialogs. */