Lines Matching refs:line

622  * is displayed at the beginning of the next line.
631 int line;
635 if ( LineAndXYForPosition(ctx, ctx->text.insertPos, &line, &x, &y) ) {
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;
738 * NOTE: it is illegal to call this routine unless there is a valid line table!
741 /*** figure out what line it is on ***/
748 int fromx, line, width, height;
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,
771 * This routine maps a source position in to the corresponding line number
774 * NOTE: It is illegal to call this routine unless there is a valid line table!
782 int line;
784 for (line = 0; line < ctx->text.lt.lines; line++)
785 if (position < ctx->text.lt.info[line + 1].position)
787 return(line);
791 * This routine maps a source position into the corresponding line number
794 * NOTE: It is illegal to call this routine unless there is a valid line table!
798 LineAndXYForPosition (ctx, pos, line, x, y)
801 int *line;
808 *line = 0;
812 *line = LineForPosition(ctx, pos);
813 *y = ctx->text.lt.info[*line].y;
815 linePos = ctx->text.lt.info[*line].position;
824 * This routine builds a line table. It does this by starting at the
826 * of each line to be displayed. It also determines and saves in the
827 * linetable all the required metrics for displaying a given line (e.g.
828 * x offset, y offset, line length, etc.).
861 * This assumes that the line table does not change size.
865 _BuildLineTable(ctx, position, min_pos, line)
868 int line;
870 XawTextLineTableEntry * lt = ctx->text.lt.info + line;
883 y = ( (line == 0) ? ctx->text.margin.top : lt->y );
904 ++line;
905 if ( (line > ctx->text.lt.lines) ||
926 if (line++ < ctx->text.lt.lines) { /* make sure not to run of the end. */
932 if (line < ctx->text.lt.lines) /* Clear out rest of table. */
934 (ctx->text.lt.lines - line) * sizeof(XawTextLineTableEntry) );
942 * Description: Returns the width (in pixels) of the widest line that
945 * Returns: the width of the widest line.
947 * NOTE: This function requires a valid line table.
1182 * Redraw the line overflow marks.
1235 * Description: Updates some text in a given line.
1237 * line - the line number (in the line table) of this line.
1244 UpdateTextInLine(ctx, line, left, right)
1246 int line;
1251 XawTextLineTableEntry * lt = ctx->text.lt.info + line;
1263 if ( (IsValidLine(ctx, line + 1)) &&
1264 (ctx->text.lt.info[line + 1].position <= ctx->text.lastPos) )
1316 * the start of the line containing the position.
1318 * BUG/deficiency: The normalize to line portion of this routine will
1343 int line = 0;
1344 for (;(line < lt->lines) && (position > lt->info[line].position) ; line++);
1345 _XawTextVScroll(ctx, line);
1354 int line = 0;
1355 for (;(line < lt->lines) && (old_top > lt->info[line].position); line++);
1357 _XawTextVScroll(ctx, -line);
1611 * NOTE: It is illegal to call this routine unless there is a valid line table!
1683 * fixup all current line table entries to reflect edit.
1695 * Now process the line table and fixup in case edits caused
1696 * changes in line breaks. If we are breaking on word boundaries,
1716 * is a valid line table!
1726 int height, line, i, lastPos = ctx->text.lastPos;
1732 if ( (pos1 >= pos2) || !LineAndXYForPosition(ctx, pos1, &line, &x, &y) )
1733 return; /* line not visible, or pos1 >= pos2. */
1735 for ( startPos = pos1, i = line; IsValidLine(ctx, i) &&
1778 * as clearing an extra line, so we do this, and are done.
1805 * It supports multi-click entity cycling (char, word, line, file) and mouse
1898 * the "current" mode (i.e. char word, line, etc.). It worries about
2019 int line = 0, old_height;
2027 IsValidLine(ctx, line) && (line < ctx->text.lt.lines) ; line++, lt++)
2043 line = LineForPosition(ctx, ctx->text.lastPos);
2045 line = ctx->text.lt.lines;
2047 if ( (line + 1) == ctx->text.lt.lines ) return;
2051 rbox.height = XawTextSinkMaxHeight(ctx->text.sink, line + 1) + VMargins(ctx);
2200 int line, x = rect->x, y = rect->y;
2203 for (line = 0;( (line < ctx->text.lt.lines) &&
2204 IsValidLine(ctx, line) && (info->y < bottom)); line++, info++)
2206 UpdateTextInLine(ctx, line, x, right);