Lines Matching defs:dInfoPtr

25  * dInfoPtr->styleTable.
65 * in dInfoPtr->styleTable point to structures of this type.
368 register TextDInfo *dInfoPtr;
371 dInfoPtr = (TextDInfo *) ckalloc(sizeof(TextDInfo));
372 Tcl_InitHashTable(&dInfoPtr->styleTable, sizeof(StyleValues)/sizeof(int));
373 dInfoPtr->dLinePtr = NULL;
374 dInfoPtr->copyGC = None;
376 dInfoPtr->scrollGC = Tk_GetGC(textPtr->tkwin, GCGraphicsExposures,
378 dInfoPtr->topOfEof = 0;
379 dInfoPtr->newCharOffset = 0;
380 dInfoPtr->curPixelOffset = 0;
381 dInfoPtr->maxLength = 0;
382 dInfoPtr->xScrollFirst = -1;
383 dInfoPtr->xScrollLast = -1;
384 dInfoPtr->yScrollFirst = -1;
385 dInfoPtr->yScrollLast = -1;
386 dInfoPtr->scanMarkChar = 0;
387 dInfoPtr->scanMarkX = 0;
388 dInfoPtr->scanTotalScroll = 0;
389 dInfoPtr->scanMarkY = 0;
390 dInfoPtr->dLinesInvalidated = 0;
391 dInfoPtr->flags = DINFO_OUT_OF_DATE;
392 textPtr->dInfoPtr = dInfoPtr;
417 register TextDInfo *dInfoPtr = textPtr->dInfoPtr;
426 FreeDLines(textPtr, dInfoPtr->dLinePtr, (DLine *) NULL, 1);
427 Tcl_DeleteHashTable(&dInfoPtr->styleTable);
428 if (dInfoPtr->copyGC != None) {
429 Tk_FreeGC(textPtr->display, dInfoPtr->copyGC);
431 Tk_FreeGC(textPtr->display, dInfoPtr->scrollGC);
432 if (dInfoPtr->flags & REDRAW_PENDING) {
435 ckfree((char *) dInfoPtr);
614 hPtr = Tcl_CreateHashEntry(&textPtr->dInfoPtr->styleTable,
650 Tcl_GetHashKey(&textPtr->dInfoPtr->styleTable, hPtr);
839 maxX = textPtr->dInfoPtr->maxX - textPtr->dInfoPtr->x
1010 maxX = textPtr->dInfoPtr->maxX - textPtr->dInfoPtr->x - rMargin;
1101 register TextDInfo *dInfoPtr = textPtr->dInfoPtr;
1107 if (!(dInfoPtr->flags & DINFO_OUT_OF_DATE)) {
1110 dInfoPtr->flags &= ~DINFO_OUT_OF_DATE;
1117 dlPtr = FindDLine(dInfoPtr->dLinePtr, &index);
1118 if ((dlPtr != NULL) && (dlPtr != dInfoPtr->dLinePtr)) {
1119 FreeDLines(textPtr, dInfoPtr->dLinePtr, dlPtr, 1);
1131 dlPtr = dInfoPtr->dLinePtr;
1133 y = dInfoPtr->y;
1134 maxY = dInfoPtr->maxY;
1186 dInfoPtr->dLinePtr = newPtr;
1227 dInfoPtr->dLinePtr = newPtr;
1302 lineNum = TkBTreeLineIndex(dInfoPtr->dLinePtr->index.linePtr);
1303 charsToCount = dInfoPtr->dLinePtr->index.charIndex;
1333 dlPtr->nextPtr = dInfoPtr->dLinePtr;
1334 dInfoPtr->dLinePtr = dlPtr;
1354 textPtr->topIndex = dInfoPtr->dLinePtr->index;
1355 y = dInfoPtr->y;
1356 for (dlPtr = dInfoPtr->dLinePtr; dlPtr != NULL;
1358 if (y > dInfoPtr->maxY) {
1378 dlPtr = dInfoPtr->dLinePtr;
1383 if ((dlPtr->flags & TOP_LINE) && (dlPtr != dInfoPtr->dLinePtr)
1403 dInfoPtr->dLinePtr->flags |= TOP_LINE;
1423 dInfoPtr->maxLength = 0;
1424 for (dlPtr = dInfoPtr->dLinePtr; dlPtr != NULL;
1426 if (dlPtr->length > dInfoPtr->maxLength) {
1427 dInfoPtr->maxLength = dlPtr->length;
1430 maxOffset = (dInfoPtr->maxLength - (dInfoPtr->maxX - dInfoPtr->x)
1432 if (dInfoPtr->newCharOffset > maxOffset) {
1433 dInfoPtr->newCharOffset = maxOffset;
1435 if (dInfoPtr->newCharOffset < 0) {
1436 dInfoPtr->newCharOffset = 0;
1438 pixelOffset = dInfoPtr->newCharOffset * textPtr->charWidth;
1439 if (pixelOffset != dInfoPtr->curPixelOffset) {
1440 dInfoPtr->curPixelOffset = pixelOffset;
1441 for (dlPtr = dInfoPtr->dLinePtr; dlPtr != NULL;
1476 * textPtr->dInfoPtr->dLinePtr and
1484 if (textPtr->dInfoPtr->dLinePtr == firstPtr) {
1485 textPtr->dInfoPtr->dLinePtr = lastPtr;
1488 for (prevPtr = textPtr->dInfoPtr->dLinePtr;
1509 textPtr->dInfoPtr->dLinesInvalidated = 1;
1543 TextDInfo *dInfoPtr = textPtr->dInfoPtr;
1573 x = chunkPtr->x + dInfoPtr->x - dInfoPtr->curPixelOffset;
1601 x = chunkPtr->x + dInfoPtr->x - dInfoPtr->curPixelOffset;
1602 if ((x + chunkPtr->width <= 0) || (x >= dInfoPtr->maxX)) {
1624 if (dInfoPtr->dLinesInvalidated) {
1639 if ((height + dlPtr->y) > dInfoPtr->maxY) {
1640 height = dInfoPtr->maxY - dlPtr->y;
1642 XCopyArea(display, pixmap, Tk_WindowId(textPtr->tkwin), dInfoPtr->copyGC,
1643 dInfoPtr->x, 0, (unsigned) (dInfoPtr->maxX - dInfoPtr->x),
1644 (unsigned) height, dInfoPtr->x, dlPtr->y);
1682 TextDInfo *dInfoPtr = textPtr->dInfoPtr;
1716 minX = dInfoPtr->curPixelOffset;
1717 xOffset = dInfoPtr->x - minX;
1718 maxX = minX + dInfoPtr->maxX - dInfoPtr->x;
2002 TextDInfo *dInfoPtr = textPtr->dInfoPtr;
2038 if (!Tk_IsMapped(textPtr->tkwin) || (dInfoPtr->maxX <= dInfoPtr->x)
2039 || (dInfoPtr->maxY <= dInfoPtr->y)) {
2041 dInfoPtr->flags &= ~REDRAW_PENDING;
2067 while (dInfoPtr->flags & REPICK_NEEDED) {
2069 dInfoPtr->flags &= ~REPICK_NEEDED;
2083 dInfoPtr->dLinesInvalidated = 0;
2090 for (dlPtr = dInfoPtr->dLinePtr; dlPtr != NULL; dlPtr = dlPtr->nextPtr) {
2096 || ((dlPtr->oldY + dlPtr->height) > dInfoPtr->maxY)) {
2113 || ((dlPtr2->oldY + dlPtr2->height) > dInfoPtr->maxY)) {
2124 if ((y + height) > dInfoPtr->maxY) {
2125 height = dInfoPtr->maxY -y;
2163 if (TkScrollWindow(textPtr->tkwin, dInfoPtr->scrollGC,
2164 dInfoPtr->x - textPtr->padX, oldY,
2165 (dInfoPtr->maxX - (dInfoPtr->x - textPtr->padX)), height,
2184 dInfoPtr->flags &= ~REDRAW_PENDING;
2190 if (dInfoPtr->flags & REDRAW_BORDERS) {
2249 dInfoPtr->flags &= ~REDRAW_BORDERS;
2260 for (dlPtr = dInfoPtr->dLinePtr; dlPtr != NULL;
2267 if (maxHeight > dInfoPtr->maxY) {
2268 maxHeight = dInfoPtr->maxY;
2274 for (prevPtr = NULL, dlPtr = textPtr->dInfoPtr->dLinePtr;
2275 (dlPtr != NULL) && (dlPtr->y < dInfoPtr->maxY);
2286 if (dInfoPtr->dLinesInvalidated) {
2304 if (dInfoPtr->topOfEof > dInfoPtr->maxY) {
2305 dInfoPtr->topOfEof = dInfoPtr->maxY;
2307 if (bottomY < dInfoPtr->topOfEof) {
2324 textPtr->border, dInfoPtr->x - textPtr->padX, bottomY,
2325 dInfoPtr->maxX - (dInfoPtr->x - textPtr->padX),
2326 dInfoPtr->topOfEof-bottomY, 0, TK_RELIEF_FLAT);
2328 dInfoPtr->topOfEof = bottomY;
2390 TextDInfo *dInfoPtr = textPtr->dInfoPtr;
2392 dInfoPtr->flags |= REPICK_NEEDED;
2393 if (!(dInfoPtr->flags & REDRAW_PENDING)) {
2394 dInfoPtr->flags |= REDRAW_PENDING;
2427 TextDInfo *dInfoPtr = textPtr->dInfoPtr;
2439 if (!(dInfoPtr->flags & REDRAW_PENDING)) {
2440 dInfoPtr->flags |= REDRAW_PENDING;
2469 TextDInfo *dInfoPtr = textPtr->dInfoPtr;
2480 for (dlPtr = dInfoPtr->dLinePtr; dlPtr != NULL;
2487 if (dInfoPtr->topOfEof < maxY) {
2488 dInfoPtr->topOfEof = maxY;
2500 dInfoPtr->flags |= REDRAW_BORDERS;
2535 TextDInfo *dInfoPtr = textPtr->dInfoPtr;
2555 if (!(dInfoPtr->flags & REDRAW_PENDING)) {
2558 dInfoPtr->flags |= REDRAW_PENDING|DINFO_OUT_OF_DATE|REPICK_NEEDED;
2572 firstPtr = FindDLine(dInfoPtr->dLinePtr, &rounded);
2576 lastPtr = FindDLine(dInfoPtr->dLinePtr, index2Ptr);
2626 TextDInfo *dInfoPtr = textPtr->dInfoPtr;
2635 dlPtr = dInfoPtr->dLinePtr;
2679 if (!(dInfoPtr->flags & REDRAW_PENDING)) {
2682 dInfoPtr->flags |= REDRAW_PENDING|DINFO_OUT_OF_DATE|REPICK_NEEDED;
2775 TextDInfo *dInfoPtr = textPtr->dInfoPtr;
2784 if (!(dInfoPtr->flags & REDRAW_PENDING)) {
2787 dInfoPtr->flags |= REDRAW_PENDING|REDRAW_BORDERS|DINFO_OUT_OF_DATE
2797 if (dInfoPtr->copyGC != None) {
2798 Tk_FreeGC(textPtr->display, dInfoPtr->copyGC);
2800 dInfoPtr->copyGC = new;
2806 FreeDLines(textPtr, dInfoPtr->dLinePtr, (DLine *) NULL, 1);
2807 dInfoPtr->dLinePtr = NULL;
2818 dInfoPtr->x = textPtr->highlightWidth + textPtr->borderWidth
2820 dInfoPtr->y = textPtr->highlightWidth + textPtr->borderWidth
2822 dInfoPtr->maxX = Tk_Width(textPtr->tkwin) - textPtr->highlightWidth
2824 if (dInfoPtr->maxX <= dInfoPtr->x) {
2825 dInfoPtr->maxX = dInfoPtr->x + 1;
2827 dInfoPtr->maxY = Tk_Height(textPtr->tkwin) - textPtr->highlightWidth
2829 if (dInfoPtr->maxY <= dInfoPtr->y) {
2830 dInfoPtr->maxY = dInfoPtr->y + 1;
2832 dInfoPtr->topOfEof = dInfoPtr->maxY;
2849 dInfoPtr->xScrollFirst = dInfoPtr->xScrollLast = -1;
2850 dInfoPtr->yScrollFirst = dInfoPtr->yScrollLast = -1;
2883 TextDInfo *dInfoPtr = textPtr->dInfoPtr;
2922 if (dInfoPtr->flags & DINFO_OUT_OF_DATE) {
2925 dlPtr = FindDLine(dInfoPtr->dLinePtr, indexPtr);
2927 if ((dlPtr->y + dlPtr->height) > dInfoPtr->maxY) {
2949 bottomY = (dInfoPtr->y + dInfoPtr->maxY + lineHeight)/2;
2950 close = (dInfoPtr->maxY - dInfoPtr->y)/3;
2975 if (FindDLine(dInfoPtr->dLinePtr, &tmpIndex) != NULL) {
2976 bottomY = dInfoPtr->maxY - dInfoPtr->y;
2991 if (!(dInfoPtr->flags & REDRAW_PENDING)) {
2994 dInfoPtr->flags |= REDRAW_PENDING|DINFO_OUT_OF_DATE|REPICK_NEEDED;
3130 TextDInfo *dInfoPtr = textPtr->dInfoPtr;
3164 if (dInfoPtr->flags & DINFO_OUT_OF_DATE) {
3167 lineWidth = dInfoPtr->maxX - dInfoPtr->x;
3168 if (dInfoPtr->maxLength < lineWidth) {
3176 dlPtr = FindDLine(dInfoPtr->dLinePtr, &index);
3194 delta = x - dInfoPtr->curPixelOffset;
3198 dInfoPtr->newCharOffset = (x - lineWidth/2)/textPtr->charWidth;
3200 dInfoPtr->newCharOffset -= ((-delta) + textPtr->charWidth - 1)
3207 dInfoPtr->newCharOffset = (x - lineWidth/2)/textPtr->charWidth;
3209 dInfoPtr->newCharOffset += (delta + textPtr->charWidth - 1)
3216 dInfoPtr->flags |= DINFO_OUT_OF_DATE;
3217 if (!(dInfoPtr->flags & REDRAW_PENDING)) {
3218 dInfoPtr->flags |= REDRAW_PENDING;
3252 TextDInfo *dInfoPtr = textPtr->dInfoPtr;
3256 if (dInfoPtr->flags & DINFO_OUT_OF_DATE) {
3265 newOffset = dInfoPtr->newCharOffset;
3277 newOffset = ((fraction * dInfoPtr->maxLength) / textPtr->charWidth)
3281 charsPerPage = ((dInfoPtr->maxX - dInfoPtr->x) / textPtr->charWidth)
3293 dInfoPtr->newCharOffset = newOffset;
3294 dInfoPtr->flags |= DINFO_OUT_OF_DATE;
3295 if (!(dInfoPtr->flags & REDRAW_PENDING)) {
3296 dInfoPtr->flags |= REDRAW_PENDING;
3333 TextDInfo *dInfoPtr = textPtr->dInfoPtr;
3407 if (!(dInfoPtr->flags & REDRAW_PENDING)) {
3410 dInfoPtr->flags |= REDRAW_PENDING|DINFO_OUT_OF_DATE|REPICK_NEEDED;
3441 TextDInfo *dInfoPtr = textPtr->dInfoPtr;
3450 if (dInfoPtr->flags & DINFO_OUT_OF_DATE) {
3531 pixels = (dInfoPtr->maxY - 2*lineHeight - dInfoPtr->y)*(-count)
3550 pixels = (dInfoPtr->maxY - 2*lineHeight - dInfoPtr->y)*count;
3566 if (!(dInfoPtr->flags & REDRAW_PENDING)) {
3569 dInfoPtr->flags |= REDRAW_PENDING|DINFO_OUT_OF_DATE|REPICK_NEEDED;
3607 TextDInfo *dInfoPtr = textPtr->dInfoPtr;
3638 newChar = dInfoPtr->scanMarkChar + (10*(dInfoPtr->scanMarkX - x))
3640 maxChar = 1 + (dInfoPtr->maxLength - (dInfoPtr->maxX - dInfoPtr->x)
3643 dInfoPtr->scanMarkChar = newChar = 0;
3644 dInfoPtr->scanMarkX = x;
3646 dInfoPtr->scanMarkChar = newChar = maxChar;
3647 dInfoPtr->scanMarkX = x;
3649 dInfoPtr->newCharOffset = newChar;
3651 totalScroll = (10*(dInfoPtr->scanMarkY - y))
3653 if (totalScroll != dInfoPtr->scanTotalScroll) {
3655 ScrollByLines(textPtr, totalScroll-dInfoPtr->scanTotalScroll);
3656 dInfoPtr->scanTotalScroll = totalScroll;
3659 dInfoPtr->scanTotalScroll = 0;
3660 dInfoPtr->scanMarkY = y;
3664 dInfoPtr->scanMarkChar = dInfoPtr->newCharOffset;
3665 dInfoPtr->scanMarkX = x;
3666 dInfoPtr->scanTotalScroll = 0;
3667 dInfoPtr->scanMarkY = y;
3673 dInfoPtr->flags |= DINFO_OUT_OF_DATE;
3674 if (!(dInfoPtr->flags & REDRAW_PENDING)) {
3675 dInfoPtr->flags |= REDRAW_PENDING;
3716 TextDInfo *dInfoPtr = textPtr->dInfoPtr;
3721 if (dInfoPtr->maxLength > 0) {
3722 first = ((double) dInfoPtr->curPixelOffset)
3723 / dInfoPtr->maxLength;
3724 last = first + ((double) (dInfoPtr->maxX - dInfoPtr->x))
3725 / dInfoPtr->maxLength;
3737 if ((first == dInfoPtr->xScrollFirst) && (last == dInfoPtr->xScrollLast)) {
3740 dInfoPtr->xScrollFirst = first;
3741 dInfoPtr->xScrollLast = last;
3787 TextDInfo *dInfoPtr = textPtr->dInfoPtr;
3793 dlPtr = dInfoPtr->dLinePtr;
3800 if ((dlPtr->y + dlPtr->height) > dInfoPtr->maxY) {
3822 if ((first == dInfoPtr->yScrollFirst) && (last == dInfoPtr->yScrollLast)) {
3825 dInfoPtr->yScrollFirst = first;
3826 dInfoPtr->yScrollLast = last;
3938 TextDInfo *dInfoPtr = textPtr->dInfoPtr;
3947 if (dInfoPtr->flags & DINFO_OUT_OF_DATE) {
3957 if (y < dInfoPtr->y) {
3958 y = dInfoPtr->y;
3959 x = dInfoPtr->x;
3961 if (x >= dInfoPtr->maxX) {
3962 x = dInfoPtr->maxX - 1;
3964 if (x < dInfoPtr->x) {
3965 x = dInfoPtr->x;
3972 for (dlPtr = dInfoPtr->dLinePtr; y >= (dlPtr->y + dlPtr->height);
3980 x = dInfoPtr->maxX - 1;
3993 x = x - dInfoPtr->x + dInfoPtr->curPixelOffset;
4044 TextDInfo *dInfoPtr = textPtr->dInfoPtr;
4053 if (dInfoPtr->flags & DINFO_OUT_OF_DATE) {
4061 dlPtr = FindDLine(dInfoPtr->dLinePtr, indexPtr);
4094 *xPtr = *xPtr + dInfoPtr->x - dInfoPtr->curPixelOffset;
4101 if (*xPtr > dInfoPtr->maxX) {
4102 *xPtr = dInfoPtr->maxX;
4104 *widthPtr = dInfoPtr->maxX - *xPtr;
4106 if ((*xPtr + *widthPtr) <= dInfoPtr->x) {
4109 if ((*xPtr + *widthPtr) > dInfoPtr->maxX) {
4110 *widthPtr = dInfoPtr->maxX - *xPtr;
4115 if ((*yPtr + *heightPtr) > dInfoPtr->maxY) {
4116 *heightPtr = dInfoPtr->maxY - *yPtr;
4156 TextDInfo *dInfoPtr = textPtr->dInfoPtr;
4163 if (dInfoPtr->flags & DINFO_OUT_OF_DATE) {
4171 dlPtr = FindDLine(dInfoPtr->dLinePtr, indexPtr);
4176 *xPtr = dInfoPtr->x - dInfoPtr->curPixelOffset + dlPtr->chunkPtr->x;
4179 if ((dlPtr->y + dlPtr->height) > dInfoPtr->maxY) {
4180 *heightPtr = dInfoPtr->maxY - dlPtr->y;