Lines Matching refs:lt
76 ((ctx)->text.lt.info[(num)].position != 0) )
119 offset(text.lt.top), XtRImmediate, (caddr_t)0},
487 ctx->text.lt.lines = 0;
488 ctx->text.lt.info = NULL;
578 _XawTextBuildLineTable(ctx, ctx->text.lt.top, TRUE);
633 if (ctx->text.lt.lines < 1) return;
636 if (line < ctx->text.lt.lines)
637 y += (ctx->text.lt.info[line + 1].y - ctx->text.lt.info[line].y) + 1;
639 y += (ctx->text.lt.info[line].y - ctx->text.lt.info[line - 1].y) + 1;
751 if (ctx->text.lt.lines == 0) return 0;
753 for (line = 0; line < ctx->text.lt.lines - 1; line++) {
754 if (y <= ctx->text.lt.info[line + 1].y)
757 position = ctx->text.lt.info[line].position;
763 if (position >= ctx->text.lt.info[line + 1].position)
764 position = SrcScan(ctx->text.source, ctx->text.lt.info[line + 1].position,
784 for (line = 0; line < ctx->text.lt.lines; line++)
785 if (position < ctx->text.lt.info[line + 1].position)
813 *y = ctx->text.lt.info[*line].y;
815 linePos = ctx->text.lt.info[*line].position;
847 if ( (lines != ctx->text.lt.lines) || (ctx->text.lt.info == NULL) ) {
848 ctx->text.lt.info = (XawTextLineTableEntry *) XtRealloc((char *) ctx->text.
849 lt.info, size);
850 ctx->text.lt.lines = lines;
854 if ( force_rebuild || (position != ctx->text.lt.top) ) {
855 bzero((char *) ctx->text.lt.info, size);
856 (void) _BuildLineTable(ctx, ctx->text.lt.top = position, zeroPosition, 0);
870 XawTextLineTableEntry * lt = ctx->text.lt.info + line;
883 y = ( (line == 0) ? ctx->text.margin.top : lt->y );
886 lt->y = y;
887 lt->position = position;
892 lt->textWidth = realW;
903 ++lt;
905 if ( (line > ctx->text.lt.lines) ||
906 ((lt->position == (position = endPos)) && (position > min_pos)) )
913 * a) Both have position > text.lastPos and lt->textWidth = 0.
926 if (line++ < ctx->text.lt.lines) { /* make sure not to run of the end. */
927 (++lt)->y = (count == 0) ? y : ctx->core.height;
928 lt->textWidth = 0;
929 lt->position = ctx->text.lastPos + 100;
932 if (line < ctx->text.lt.lines) /* Clear out rest of table. */
933 bzero( (char *) (lt + 1),
934 (ctx->text.lt.lines - line) * sizeof(XawTextLineTableEntry) );
936 ctx->text.lt.info[ctx->text.lt.lines].position = lt->position;
956 XawTextLineTablePtr lt = &(ctx->text.lt);
958 for (i = 0, widest = 1 ; i < lt->lines ; i++)
959 if (widest < lt->info[i].textWidth)
960 widest = lt->info[i].textWidth;
974 if ( (ctx->text.lastPos > 0) && (ctx->text.lt.lines > 0)) {
975 first = ctx->text.lt.top;
977 last = ctx->text.lt.info[ctx->text.lt.lines].position;
978 if ( ctx->text.lt.info[ctx->text.lt.lines].position <= ctx->text.lastPos)
1045 _XawTextBuildLineTable (ctx, ctx->text.lt.top, TRUE);
1063 XawTextLineTable * lt = &(ctx->text.lt);
1065 if (abs(n) > ctx->text.lt.lines)
1066 n = (n > 0) ? ctx->text.lt.lines : -ctx->text.lt.lines;
1072 top = Min(lt->info[n].position, ctx->text.lastPos);
1076 y = IsValidLine(ctx, n) ? lt->info[n].y : ctx->core.height;
1089 if (n < lt->lines) n++; /* update descenders at bottom */
1090 _XawTextNeedsUpdating(ctx, lt->info[lt->lines - n].position,
1100 target = lt->top;
1105 y = IsValidLine(ctx, n) ? lt->info[n].y : ctx->core.height;
1106 updateTo = IsValidLine(ctx, n) ? lt->info[n].position : ctx->text.lastPos;
1107 if (IsValidLine(ctx, lt->lines - n))
1108 height = lt->info[lt->lines-n].y - ctx->text.margin.top;
1124 _XawTextNeedsUpdating(ctx, lt->info[0].position, updateTo);
1127 else if (lt->top != target)
1251 XawTextLineTableEntry * lt = ctx->text.lt.info + line;
1253 if ( ((lt->textWidth + ctx->text.margin.left) < left) ||
1258 XawTextSinkFindPosition(ctx->text.sink, lt->position,
1262 if (right >= (Position) lt->textWidth - ctx->text.margin.left)
1264 (ctx->text.lt.info[line + 1].position <= ctx->text.lastPos) )
1265 pos2 = SrcScan( ctx->text.source, (lt + 1)->position, XawstPositions,
1279 if (t_pos < (lt + 1)->position)
1304 lines = (int) (lines * (int) ctx->text.lt.lines) / height;
1331 XawTextLineTable * lt = &(ctx->text.lt);
1334 old_top = lt->top;
1335 if ( (lt->lines > 0) && (IsValidLine(ctx, lt->lines - 1)) )
1336 old_bot = lt->info[lt->lines - 1].position;
1344 for (;(line < lt->lines) && (position > lt->info[line].position) ; line++);
1350 new_bot = IsValidLine(ctx, lt->lines-1) ? lt->info[lt->lines-1].position
1353 if ((old_top >= lt->top) && (old_top <= new_bot)) {
1355 for (;(line < lt->lines) && (old_top > lt->info[line].position); line++);
1648 updateFrom = Max(updateFrom, ctx->text.lt.top);
1659 if (ctx->text.lt.top >= ctx->text.lastPos) {
1690 for (lineP = ctx->text.lt.info + i; i <= ctx->text.lt.lines; i++, lineP++)
1702 ctx->text.lt.info[line1].position, pos1, line1);
1730 pos1 = (pos1 < ctx->text.lt.top) ? ctx->text.lt.top : pos1;
1736 (i < ctx->text.lt.lines) ; i++) {
1739 if ( (endPos = ctx->text.lt.info[i + 1].position) > pos2 ) {
1748 height = ctx->text.lt.info[i + 1].y - ctx->text.lt.info[i].y;
1770 (Position) (ctx->text.lt.info[i].textWidth +
1796 y = ctx->text.lt.info[i + 1].y;
1986 int scroll_by = insert_line - ctx->text.lt.lines/2;
2003 _XawTextBuildLineTable(ctx, ctx->text.lt.top, FALSE);
2024 XawTextLineTableEntry *lt;
2026 for (lt = ctx->text.lt.info;
2027 IsValidLine(ctx, line) && (line < ctx->text.lt.lines) ; line++, lt++)
2028 AssignMax(rbox.width, lt->textWidth + ctx->text.margin.left);
2045 line = ctx->text.lt.lines;
2047 if ( (line + 1) == ctx->text.lt.lines ) return;
2059 _XawTextBuildLineTable(ctx, ctx->text.lt.top, TRUE);
2199 XawTextLineTableEntry *info = ctx->text.lt.info;
2203 for (line = 0;( (line < ctx->text.lt.lines) &&
2320 if ( (!XtIsRealized((Widget)ctx)) || (ctx->text.lt.lines <= 0) )
2324 lines = ctx->text.lt.lines;
2326 max_pos = ctx->text.lt.info[lines].position;
2350 if ( (ctx->text.insertPos >= ctx->text.lt.top) &&
2354 first = ctx->text.lt.top;
2356 second = ctx->text.lt.info[1].position;
2369 while (ctx->text.insertPos >= ctx->text.lt.info[lines].position) {
2370 if (ctx->text.lt.info[lines].position > ctx->text.lastPos)
2372 _XawTextBuildLineTable(ctx, ctx->text.lt.info[1].position, FALSE);
2374 if (ctx->text.lt.top == second) {
2377 } else if (ctx->text.lt.info[1].position == first) {
2382 if (ctx->text.lt.top != first)
2436 _XawTextBuildLineTable(ctx, ctx->text.lt.top, TRUE);
2503 XawTextSetSource( (Widget) newtw, newtw->text.source, newtw->text.lt.top);
2510 oldtw->text.lt.top != newtw->text.lt.top ||
2516 _XawTextBuildLineTable(newtw, newtw->text.lt.top, TRUE);
2611 ctx->text.lt.top = startPos;
2616 _XawTextBuildLineTable(ctx, ctx->text.lt.top, TRUE);
2659 return( ((TextWidget) w)->text.lt.top );
2775 _XawTextBuildLineTable(ctx, ctx->text.lt.top, TRUE);
2799 ctx->text.lt.top = FindGoodPosition(ctx, ctx->text.lt.top);
2804 _XawTextBuildLineTable(ctx, ctx->text.lt.top, TRUE);