Tk Source Code

Changes On Branch tip-443
Login
Bounty program for improvements to Tcl and certain Tcl packages.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Changes In Branch bug-5660d11c3f Excluding Merge-Ins

This is equivalent to a diff from d3a347d2 to 51693900

2016-07-31
14:06
End of fix for [5660d11c3f] - text tag -background option overrules -lmargincolor - DOcumentation update check-in: d97ca2db user: fvogel tags: core-8-6-branch
13:58
Added missing space Closed-Leaf check-in: 51693900 user: fvogel tags: tip-443, bug-5660d11c3f
2016-07-29
19:28
Clarified documentation about precedence of color specifications: -[lr]margincolor tag option > -background tag option > -background widget option check-in: 9dbcde85 user: fvogel tags: tip-443, bug-5660d11c3f
2016-07-26
14:00
[5660d11c3f] Fix new -lmargincolor check-in: 0a3246ac user: dgp tags: core-8-6-branch
09:36
merged core-8-6-branch check-in: 962d6e22 user: fvogel tags: tip-443, bug-5660d11c3f
2016-07-22
12:40
[450bb0ecad] Fix corruption [tk busy] creates on OSX. check-in: 56bccbf4 user: dgp tags: trunk
2016-07-21
20:09
merge 8.6 check-in: dcc49ecf user: dgp tags: core-8-6-6-rc
20:08
[450bb0ecad] Fix corruption [tk busy] creates on OSX. check-in: d3a347d2 user: dgp tags: core-8-6-branch
20:06
merge 8.6 Closed-Leaf check-in: 0cb77e7f user: dgp tags: bug-450bb0ecad
2016-07-19
23:48
Final tweak for OS X wm crash, thanks to Marc Culler check-in: 30856df3 user: kevin_walzer tags: core-8-6-branch

Changes to doc/text.n.

487
488
489
490
491
492
493
494
495

496
497
498
499
500
501
502
503
...
533
534
535
536
537
538
539
540
541

542
543
544
545
546
547
548
549
second and later display lines for a text line.
.TP
\fB\-lmargincolor \fIcolor\fR
.
\fIColor\fR specifies the background color to use in regions that do not
contain characters because they are indented by \fB\-lmargin1\fR or
\fB\-lmargin2\fR. It may have any of the forms accepted by
\fBTk_GetColor\fR.If \fIcolor\fR has not been specified, or if it is
specified as an empty string, then the color specified by the

\fB-background\fR widget option is used.
.TP
\fB\-offset \fIpixels\fR
.
\fIPixels\fR specifies an amount by which the text's baseline should be offset
vertically from the baseline of the overall line, in pixels. For example, a
positive offset can be used for superscripts and a negative offset can be used
for subscripts. \fIPixels\fR may have any of the standard forms for screen
................................................................................
margin for each line on the display is determined by the first non-elided
character of that display line.
.TP
\fB\-rmargincolor \fIcolor\fR
.
\fIColor\fR specifies the background color to use in regions that do not
contain characters because they are indented by \fB\-rmargin1\fR. It may
have any of the forms accepted by \fBTk_GetColor\fR.If \fIcolor\fR has not
been specified, or if it is specified as an empty string, then the color

specified by the \fB-background\fR widget option is used.
.TP
\fB\-selectbackground \fIcolor\fR
\fIColor\fR specifies the background color to use when displaying selected
items. It may have any of the forms accepted by \fBTk_GetColor\fR. If
\fIcolor\fR has not been specified, or if it is specified as an empty
string, then the color specified by the \fB\-background\fR tag option is
used.






|
|
>
|







 







|

>
|







487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
...
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
second and later display lines for a text line.
.TP
\fB\-lmargincolor \fIcolor\fR
.
\fIColor\fR specifies the background color to use in regions that do not
contain characters because they are indented by \fB\-lmargin1\fR or
\fB\-lmargin2\fR. It may have any of the forms accepted by
\fBTk_GetColor\fR. If \fIcolor\fR has not been specified, or if it is
specified as an empty string, then the color used is specified by the
\fB-background\fR tag option (or, if this is also unspecified, by the
\fB-background\fR widget option).
.TP
\fB\-offset \fIpixels\fR
.
\fIPixels\fR specifies an amount by which the text's baseline should be offset
vertically from the baseline of the overall line, in pixels. For example, a
positive offset can be used for superscripts and a negative offset can be used
for subscripts. \fIPixels\fR may have any of the standard forms for screen
................................................................................
margin for each line on the display is determined by the first non-elided
character of that display line.
.TP
\fB\-rmargincolor \fIcolor\fR
.
\fIColor\fR specifies the background color to use in regions that do not
contain characters because they are indented by \fB\-rmargin1\fR. It may
have any of the forms accepted by \fBTk_GetColor\fR. If \fIcolor\fR has not
been specified, or if it is specified as an empty string, then the color
used is specified by the \fB-background\fR tag option (or, if this is also
unspecified, by the \fB-background\fR widget option).
.TP
\fB\-selectbackground \fIcolor\fR
\fIColor\fR specifies the background color to use when displaying selected
items. It may have any of the forms accepted by \fBTk_GetColor\fR. If
\fIcolor\fR has not been specified, or if it is specified as an empty
string, then the color specified by the \fB\-background\fR tag option is
used.

Changes to generic/tkTextDisp.c.

2460
2461
2462
2463
2464
2465
2466






2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
     * widget.
     */

    Tk_Fill3DRectangle(textPtr->tkwin, pixmap, textPtr->border, 0, y,
	    Tk_Width(textPtr->tkwin), dlPtr->height, 0, TK_RELIEF_FLAT);

    /*






     * Second, draw the background color of the left and right margins.
     */
    if (dlPtr->lMarginColor != NULL) {
        Tk_Fill3DRectangle(textPtr->tkwin, pixmap, dlPtr->lMarginColor, 0, y,
                dlPtr->lMarginWidth + dInfoPtr->x - dInfoPtr->curXPixelOffset,
                dlPtr->height, 0, TK_RELIEF_FLAT);
    }
    if (dlPtr->rMarginColor != NULL) {
        Tk_Fill3DRectangle(textPtr->tkwin, pixmap, dlPtr->rMarginColor,
                dInfoPtr->maxX - dlPtr->rMarginWidth + dInfoPtr->curXPixelOffset,
                y, dlPtr->rMarginWidth, dlPtr->height, 0, TK_RELIEF_FLAT);
    }

    /*
     * Next, draw background information for the whole line.
     */

    DisplayLineBackground(textPtr, dlPtr, prevPtr, pixmap);

    /*
     * Make another pass through all of the chunks to redraw the insertion
     * cursor, if it is visible on this line. Must do it here rather than in
     * the foreground pass below because otherwise a wide insertion cursor
     * will obscure the character to its left.
     */







>
>
>
>
>
>
|












<
<
<
<
<
<







2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485






2486
2487
2488
2489
2490
2491
2492
     * widget.
     */

    Tk_Fill3DRectangle(textPtr->tkwin, pixmap, textPtr->border, 0, y,
	    Tk_Width(textPtr->tkwin), dlPtr->height, 0, TK_RELIEF_FLAT);

    /*
     * Second, draw background information for the whole line.
     */

    DisplayLineBackground(textPtr, dlPtr, prevPtr, pixmap);

    /*
     * Third, draw the background color of the left and right margins.
     */
    if (dlPtr->lMarginColor != NULL) {
        Tk_Fill3DRectangle(textPtr->tkwin, pixmap, dlPtr->lMarginColor, 0, y,
                dlPtr->lMarginWidth + dInfoPtr->x - dInfoPtr->curXPixelOffset,
                dlPtr->height, 0, TK_RELIEF_FLAT);
    }
    if (dlPtr->rMarginColor != NULL) {
        Tk_Fill3DRectangle(textPtr->tkwin, pixmap, dlPtr->rMarginColor,
                dInfoPtr->maxX - dlPtr->rMarginWidth + dInfoPtr->curXPixelOffset,
                y, dlPtr->rMarginWidth, dlPtr->height, 0, TK_RELIEF_FLAT);
    }







    /*
     * Make another pass through all of the chunks to redraw the insertion
     * cursor, if it is visible on this line. Must do it here rather than in
     * the foreground pass below because otherwise a wide insertion cursor
     * will obscure the character to its left.
     */