Lines Matching defs:line

662  * is displayed at the beginning of the next line.
671 int line;
675 if ( LineAndXYForPosition(ctx, ctx->text.insertPos, &line, &x, &y) ) {
676 if (line < ctx->text.lt.lines)
677 y += (ctx->text.lt.info[line + 1].y - ctx->text.lt.info[line].y) + 1;
679 y += (ctx->text.lt.info[line].y - ctx->text.lt.info[line - 1].y) + 1;
822 * NOTE: it is illegal to call this routine unless there is a valid line table!
825 /*** figure out what line it is on ***/
832 int fromx, line, width, height;
837 for (line = 0; line < ctx->text.lt.lines - 1; line++) {
838 if (y <= ctx->text.lt.info[line + 1].y)
841 position = ctx->text.lt.info[line].position;
848 if (position >= ctx->text.lt.info[line + 1].position)
849 position = SrcScan(ctx->text.source, ctx->text.lt.info[line + 1].position,
855 * This routine maps a source position in to the corresponding line number
858 * NOTE: It is illegal to call this routine unless there is a valid line table!
866 int line;
868 for (line = 0; line < ctx->text.lt.lines; line++)
869 if (position < ctx->text.lt.info[line + 1].position)
871 return(line);
875 * This routine maps a source position into the corresponding line number
878 * NOTE: It is illegal to call this routine unless there is a valid line table!
882 LineAndXYForPosition (ctx, pos, line, x, y)
885 int *line;
892 *line = 0;
896 *line = LineForPosition(ctx, pos);
897 *y = ctx->text.lt.info[*line].y;
899 linePos = ctx->text.lt.info[*line].position;
908 * This routine builds a line table. It does this by starting at the
910 * of each line to be displayed. It also determines and saves in the
911 * linetable all the required metrics for displaying a given line (e.g.
912 * x offset, y offset, line length, etc.).
952 * This assumes that the line table does not change size.
956 _BuildLineTable(ctx, position, min_pos, line)
959 int line;
961 XawTextLineTableEntry * lt = ctx->text.lt.info + line;
974 y = ( (line == 0) ? ctx->text.margin.top : lt->y );
996 ++line;
997 if ( (line > ctx->text.lt.lines) ||
1018 if (line++ < ctx->text.lt.lines) { /* make sure not to run of the end. */
1024 if (line < ctx->text.lt.lines) /* Clear out rest of table. */
1026 (ctx->text.lt.lines - line) * sizeof(XawTextLineTableEntry) );
1034 * Description: Returns the width (in pixels) of the widest line that
1037 * Returns: the width of the widest line.
1039 * NOTE: This function requires a valid line table.
1076 int line;
1085 line = LineForPosition(ctx, last_pos);
1087 if ( (y < ctx->text.lt.info[line + 1].y) || ((last - first) < 1.0) )
1303 * Redraw the line overflow marks.
1358 * Description: Updates some text in a given line.
1360 * line - the line number (in the line table) of this line.
1367 UpdateTextInLine(ctx, line, left, right)
1369 int line;
1374 XawTextLineTableEntry * lt = ctx->text.lt.info + line;
1386 if ( (IsValidLine(ctx, line + 1)) &&
1387 (ctx->text.lt.info[line + 1].position <= ctx->text.lastPos) )
1439 * the start of the line containing the position.
1441 * BUG/deficiency: The normalize to line portion of this routine will
1466 int line = 0;
1467 for (;(line < lt->lines) && (position > lt->info[line].position) ; line++);
1468 _XawTextVScroll(ctx, line);
1477 int line = 0;
1478 for (;(line < lt->lines) && (old_top > lt->info[line].position); line++);
1480 _XawTextVScroll(ctx, -line);
1944 * NOTE: It is illegal to call this routine unless there is a valid line table!
2014 * fixup all current line table entries to reflect edit.
2026 * Now process the line table and fixup in case edits caused
2027 * changes in line breaks. If we are breaking on word boundaries,
2047 * is a valid line table!
2057 int height, line, i, lastPos = ctx->text.lastPos;
2063 if ( (pos1 >= pos2) || !LineAndXYForPosition(ctx, pos1, &line, &x, &y) )
2064 return; /* line not visible, or pos1 >= pos2. */
2066 for ( startPos = pos1, i = line; IsValidLine(ctx, i) &&
2109 * as clearing an extra line, so we do this, and are done.
2137 * It supports multi-click entity cycling (char, word, line, file) and mouse
2257 * the "current" mode (i.e. char word, line, etc.). It worries about
2410 int line = 0, old_height;
2418 IsValidLine(ctx, line) && (line < ctx->text.lt.lines);
2419 line++, lt++) {
2437 line = LineForPosition(ctx, ctx->text.lastPos);
2439 line = ctx->text.lt.lines;
2441 if ( (line + 1) == ctx->text.lt.lines ) return;
2445 rbox.height = XawTextSinkMaxHeight(ctx->text.sink, line + 1) + VMargins(ctx);
2600 int line, x = rect->x, y = rect->y;
2603 for (line = 0;( (line < ctx->text.lt.lines) &&
2604 IsValidLine(ctx, line) && (info->y < bottom)); line++, info++)
2606 UpdateTextInLine(ctx, line, x, right);
3150 int line;
3151 LineAndXYForPosition( (TextWidget)w, pos, &line, x, y );