Tk Source Code

Changes On Branch tip-437
Login

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

Changes In Branch tip-437 Excluding Merge-Ins

This is equivalent to a diff from f66f1a52 to f5abbd08

2015-10-08
12:14
TIP #437: Tk panedwindow options for proxy window check-in: 1c625965 user: jan.nijtmans tags: core-8-5-branch
2015-10-05
09:40
Use "cygpath -m" in stead of "cygpath -w", so paths (even windows ones) always have forward slashes. Suggested by pooryorick for TEA, but a good idea anyway check-in: 122e922e user: jan.nijtmans tags: core-8-5-branch
2015-10-03
19:32
Fixed bug [1669632fff] case (i) - autoseparator was missing on <Control-1> check-in: f2d25ac4 user: fvogel tags: bug-1669632fff
2015-09-30
14:46
merge core-8-5-branch. This is the TIP #437 implementation being voted on. Closed-Leaf check-in: f5abbd08 user: jan.nijtmans tags: tip-437
11:17
Don't limit Universal runtime support to VisualStudio version 14 only, future versions will probably have it as well. check-in: 471142ac user: jan.nijtmans tags: trunk
11:16
Don't limit Universal runtime support to VisualStudio version 14 only, future versions will probably have it as well. check-in: f66f1a52 user: jan.nijtmans tags: core-8-5-branch
10:51
Hm, better keep the TIP as it is, not making it more difficult than it already is. check-in: a6be18ea user: jan.nijtmans tags: tip-437
2015-09-29
19:10
Fixed bug [1501749fff] - Crash on embedded window deletion bound to <Map> event check-in: 60ca451d user: fvogel tags: core-8-5-branch

Changes to doc/panedwindow.n.
25
26
27
28
29
30
31










32
33
34
35
36
37
38
.OP \-handlesize handleSize HandleSize
Specifies the side length of a sash handle.  Handles are always
drawn as squares.  May be any value accepted by \fBTk_GetPixels\fR.
.OP \-height height Height
Specifies a desired height for the overall panedwindow widget. May be any
value accepted by \fBTk_GetPixels\fR. If an empty string, the widget will be
made high enough to allow all contained widgets to have their natural height.










.OP \-opaqueresize opaqueResize OpaqueResize
Specifies whether panes should be resized as a sash is moved (true),
or if resizing should be deferred until the sash is placed (false).
.OP \-sashcursor sashCursor SashCursor
Mouse cursor to use when over a sash.  If null,
\fBsb_h_double_arrow\fR will be used for horizontal panedwindows, and
\fBsb_v_double_arrow\fR will be used for vertical panedwindows.







>
>
>
>
>
>
>
>
>
>







25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
.OP \-handlesize handleSize HandleSize
Specifies the side length of a sash handle.  Handles are always
drawn as squares.  May be any value accepted by \fBTk_GetPixels\fR.
.OP \-height height Height
Specifies a desired height for the overall panedwindow widget. May be any
value accepted by \fBTk_GetPixels\fR. If an empty string, the widget will be
made high enough to allow all contained widgets to have their natural height.
.OP \-proxybackground proxyBackground ProxyBackground
Background color to use when drawing the proxy. If an empty string, the
value of the \fB-background\fR option will be used.
.OP \-proxyborderwidth proxyBorderWidth ProxyBorderWidth
Specifies the borderwidth of the proxy. May be any value accepted by
\fBTk_GetPixels\fR.
.OP \-proxyrelief proxyRelief ProxyRelief
Relief to use when drawing the proxy. May be any of the standard Tk
relief values. If an empty string, the value of the \fB-sashrelief\fR
option will be used.
.OP \-opaqueresize opaqueResize OpaqueResize
Specifies whether panes should be resized as a sash is moved (true),
or if resizing should be deferred until the sash is placed (false).
.OP \-sashcursor sashCursor SashCursor
Mouse cursor to use when over a sash.  If null,
\fBsb_h_double_arrow\fR will be used for horizontal panedwindows, and
\fBsb_v_double_arrow\fR will be used for vertical panedwindows.
Changes to generic/tkPanedWindow.c.
143
144
145
146
147
148
149




150
151
152
153
154
155
156
				 * are square), in pixels. */
    int handlePad;		/* Distance from border to draw handle. */
    Tcl_Obj *handleSizePtr;	/* Tcl_Obj rep for handle size. */
    Tk_Cursor sashCursor;	/* Cursor used when mouse is above a sash. */
    GC gc;			/* Graphics context for copying from
				 * off-screen pixmap onto screen. */
    int proxyx, proxyy;		/* Proxy x,y coordinates. */




    Slave **slaves;		/* Pointer to array of Slaves. */
    int numSlaves;		/* Number of slaves. */
    int sizeofSlaves;		/* Number of elements in the slaves array. */
    int flags;			/* Flags for widget; see below. */
} PanedWindow;

/*







>
>
>
>







143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
				 * are square), in pixels. */
    int handlePad;		/* Distance from border to draw handle. */
    Tcl_Obj *handleSizePtr;	/* Tcl_Obj rep for handle size. */
    Tk_Cursor sashCursor;	/* Cursor used when mouse is above a sash. */
    GC gc;			/* Graphics context for copying from
				 * off-screen pixmap onto screen. */
    int proxyx, proxyy;		/* Proxy x,y coordinates. */
    Tk_3DBorder proxyBackground;/* Background color used to draw proxy. If NULL, use background. */
    Tcl_Obj *proxyBorderWidthPtr; /* Tcl_Obj rep for proxyBorderWidth */
    int proxyBorderWidth;	/* Borderwidth used to draw proxy. */
    int proxyRelief;		/* Relief used to draw proxy, if TK_RELIEF_NULL then use relief. */
    Slave **slaves;		/* Pointer to array of Slaves. */
    int numSlaves;		/* Number of slaves. */
    int sizeofSlaves;		/* Number of elements in the slaves array. */
    int flags;			/* Flags for widget; see below. */
} PanedWindow;

/*
294
295
296
297
298
299
300









301
302
303
304
305
306
307
	 Tk_Offset(PanedWindow, height), TK_OPTION_NULL_OK, 0, GEOMETRY},
    {TK_OPTION_BOOLEAN, "-opaqueresize", "opaqueResize", "OpaqueResize",
	 DEF_PANEDWINDOW_OPAQUERESIZE, -1,
	 Tk_Offset(PanedWindow, resizeOpaque), 0, 0, 0},
    {TK_OPTION_STRING_TABLE, "-orient", "orient", "Orient",
	 DEF_PANEDWINDOW_ORIENT, -1, Tk_Offset(PanedWindow, orient),
	 0, (ClientData) orientStrings, GEOMETRY},









    {TK_OPTION_RELIEF, "-relief", "relief", "Relief",
	 DEF_PANEDWINDOW_RELIEF, -1, Tk_Offset(PanedWindow, relief), 0, 0, 0},
    {TK_OPTION_CURSOR, "-sashcursor", "sashCursor", "Cursor",
	 DEF_PANEDWINDOW_SASHCURSOR, -1, Tk_Offset(PanedWindow, sashCursor),
	 TK_OPTION_NULL_OK, 0, 0},
    {TK_OPTION_PIXELS, "-sashpad", "sashPad", "SashPad",
	 DEF_PANEDWINDOW_SASHPAD, -1, Tk_Offset(PanedWindow, sashPad),







>
>
>
>
>
>
>
>
>







298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
	 Tk_Offset(PanedWindow, height), TK_OPTION_NULL_OK, 0, GEOMETRY},
    {TK_OPTION_BOOLEAN, "-opaqueresize", "opaqueResize", "OpaqueResize",
	 DEF_PANEDWINDOW_OPAQUERESIZE, -1,
	 Tk_Offset(PanedWindow, resizeOpaque), 0, 0, 0},
    {TK_OPTION_STRING_TABLE, "-orient", "orient", "Orient",
	 DEF_PANEDWINDOW_ORIENT, -1, Tk_Offset(PanedWindow, orient),
	 0, (ClientData) orientStrings, GEOMETRY},
    {TK_OPTION_BORDER, "-proxybackground", "proxyBackground", "ProxyBackground",
	 0, -1, Tk_Offset(PanedWindow, proxyBackground), TK_OPTION_NULL_OK,
	 (ClientData) DEF_PANEDWINDOW_BG_MONO},
    {TK_OPTION_PIXELS, "-proxyborderwidth", "proxyBorderWidth", "ProxyBorderWidth",
	 DEF_PANEDWINDOW_PROXYBORDER, Tk_Offset(PanedWindow, proxyBorderWidthPtr),
	 Tk_Offset(PanedWindow, proxyBorderWidth), 0, 0, GEOMETRY},
    {TK_OPTION_RELIEF, "-proxyrelief", "proxyRelief", "Relief",
	 0, -1, Tk_Offset(PanedWindow, proxyRelief),
	 TK_OPTION_NULL_OK, 0, 0},
    {TK_OPTION_RELIEF, "-relief", "relief", "Relief",
	 DEF_PANEDWINDOW_RELIEF, -1, Tk_Offset(PanedWindow, relief), 0, 0, 0},
    {TK_OPTION_CURSOR, "-sashcursor", "sashCursor", "Cursor",
	 DEF_PANEDWINDOW_SASHCURSOR, -1, Tk_Offset(PanedWindow, sashCursor),
	 TK_OPTION_NULL_OK, 0, 0},
    {TK_OPTION_PIXELS, "-sashpad", "sashPad", "SashPad",
	 DEF_PANEDWINDOW_SASHPAD, -1, Tk_Offset(PanedWindow, sashPad),
2765
2766
2767
2768
2769
2770
2771
2772

2773

2774
2775
2776
2777
2778
2779
2780
    pixmap = Tk_WindowId(tkwin);
#endif /* TK_NO_DOUBLE_BUFFERING */

    /*
     * Redraw the widget's background and border.
     */

    Tk_Fill3DRectangle(tkwin, pixmap, pwPtr->background, 0, 0,

	    Tk_Width(tkwin), Tk_Height(tkwin), 2, pwPtr->sashRelief);


#ifndef TK_NO_DOUBLE_BUFFERING
    /*
     * Copy the pixmap to the display.
     */

    XCopyArea(Tk_Display(tkwin), pixmap, Tk_WindowId(tkwin), pwPtr->gc, 0, 0,







|
>
|
>







2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
    pixmap = Tk_WindowId(tkwin);
#endif /* TK_NO_DOUBLE_BUFFERING */

    /*
     * Redraw the widget's background and border.
     */

    Tk_Fill3DRectangle(tkwin, pixmap,
	    pwPtr->proxyBackground ? pwPtr->proxyBackground : pwPtr->background,
	    0, 0, Tk_Width(tkwin), Tk_Height(tkwin), pwPtr->proxyBorderWidth,
	    (pwPtr->proxyRelief != TK_RELIEF_NULL) ? pwPtr->proxyRelief : pwPtr->sashRelief);

#ifndef TK_NO_DOUBLE_BUFFERING
    /*
     * Copy the pixmap to the display.
     */

    XCopyArea(Tk_Display(tkwin), pixmap, Tk_WindowId(tkwin), pwPtr->gc, 0, 0,
Changes to macosx/tkMacOSXDefault.h.
405
406
407
408
409
410
411

412
413
414
415
416
417
418
#define DEF_PANEDWINDOW_BORDERWIDTH	"1"
#define DEF_PANEDWINDOW_CURSOR		""
#define DEF_PANEDWINDOW_HANDLEPAD	"8"
#define DEF_PANEDWINDOW_HANDLESIZE	"8"
#define DEF_PANEDWINDOW_HEIGHT		""
#define DEF_PANEDWINDOW_OPAQUERESIZE	"1"
#define DEF_PANEDWINDOW_ORIENT		"horizontal"

#define DEF_PANEDWINDOW_RELIEF		"flat"
#define DEF_PANEDWINDOW_SASHCURSOR	""
#define DEF_PANEDWINDOW_SASHPAD		"0"
#define DEF_PANEDWINDOW_SASHRELIEF	"flat"
#define DEF_PANEDWINDOW_SASHWIDTH	"3"
#define DEF_PANEDWINDOW_SHOWHANDLE	"0"
#define DEF_PANEDWINDOW_WIDTH		""







>







405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
#define DEF_PANEDWINDOW_BORDERWIDTH	"1"
#define DEF_PANEDWINDOW_CURSOR		""
#define DEF_PANEDWINDOW_HANDLEPAD	"8"
#define DEF_PANEDWINDOW_HANDLESIZE	"8"
#define DEF_PANEDWINDOW_HEIGHT		""
#define DEF_PANEDWINDOW_OPAQUERESIZE	"1"
#define DEF_PANEDWINDOW_ORIENT		"horizontal"
#define DEF_PANEDWINDOW_PROXYBORDER	"2"
#define DEF_PANEDWINDOW_RELIEF		"flat"
#define DEF_PANEDWINDOW_SASHCURSOR	""
#define DEF_PANEDWINDOW_SASHPAD		"0"
#define DEF_PANEDWINDOW_SASHRELIEF	"flat"
#define DEF_PANEDWINDOW_SASHWIDTH	"3"
#define DEF_PANEDWINDOW_SHOWHANDLE	"0"
#define DEF_PANEDWINDOW_WIDTH		""
Changes to tests/panedwindow.test.
25
26
27
28
29
30
31
32







33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
	arrow arrow badValue {bad cursor spec "badValue"}}
    panedwindow-1.6 {-handlesize
	20 20 badValue {bad screen distance "badValue"}}
    panedwindow-1.7 {-height
	20 20 badValue {bad screen distance "badValue"}}
    panedwindow-1.8 {-opaqueresize
	true 1 foo {expected boolean value but got "foo"}}
    panedwindow-1.9 {-orient







	horizontal horizontal
	badValue {bad orient "badValue": must be horizontal or vertical}}
    panedwindow-1.10 {-relief
	groove groove
	1.5 {bad relief "1.5": must be flat, groove, raised, ridge, solid, or sunken}}
    panedwindow-1.11 {-sashcursor
	arrow arrow badValue {bad cursor spec "badValue"}}
    panedwindow-1.12 {-sashpad
	1.3 1 badValue {bad screen distance "badValue"}}
    panedwindow-1.13 {-sashrelief
	groove groove
	1.5 {bad relief "1.5": must be flat, groove, raised, ridge, solid, or sunken}}
    panedwindow-1.14 {-sashwidth
	10 10 badValue {bad screen distance "badValue"}}
    panedwindow-1.15 {-showhandle
	true 1 foo {expected boolean value but got "foo"}}
    panedwindow-1.16 {-width
	402 402 badValue {bad screen distance "badValue"}}
} {
    lassign $testData optionName goodIn goodOut badIn badOut
    test ${testName}(good) "configuration options: $optionName" {
	.p configure $optionName $goodIn
	list [lindex [.p configure $optionName] 4] [.p cget $optionName]
    } [list $goodOut $goodOut]







|
>
>
>
>
>
>
>


|


|

|

|


|

|

|







25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
	arrow arrow badValue {bad cursor spec "badValue"}}
    panedwindow-1.6 {-handlesize
	20 20 badValue {bad screen distance "badValue"}}
    panedwindow-1.7 {-height
	20 20 badValue {bad screen distance "badValue"}}
    panedwindow-1.8 {-opaqueresize
	true 1 foo {expected boolean value but got "foo"}}
    panedwindow-1.9 {-proxybackground
	"#f0a0a0" "#f0a0a0" non-existent {unknown color name "non-existent"}}
    panedwindow-1.10 {-proxyborderwidth
	1.3 1.3 badValue {bad screen distance "badValue"}}
    panedwindow-1.11 {-proxyrelief
	groove groove
	1.5 {bad relief "1.5": must be flat, groove, raised, ridge, solid, or sunken}}
    panedwindow-1.12 {-orient
	horizontal horizontal
	badValue {bad orient "badValue": must be horizontal or vertical}}
    panedwindow-1.13 {-relief
	groove groove
	1.5 {bad relief "1.5": must be flat, groove, raised, ridge, solid, or sunken}}
    panedwindow-1.14 {-sashcursor
	arrow arrow badValue {bad cursor spec "badValue"}}
    panedwindow-1.15 {-sashpad
	1.3 1 badValue {bad screen distance "badValue"}}
    panedwindow-1.16 {-sashrelief
	groove groove
	1.5 {bad relief "1.5": must be flat, groove, raised, ridge, solid, or sunken}}
    panedwindow-1.17 {-sashwidth
	10 10 badValue {bad screen distance "badValue"}}
    panedwindow-1.18 {-showhandle
	true 1 foo {expected boolean value but got "foo"}}
    panedwindow-1.19 {-width
	402 402 badValue {bad screen distance "badValue"}}
} {
    lassign $testData optionName goodIn goodOut badIn badOut
    test ${testName}(good) "configuration options: $optionName" {
	.p configure $optionName $goodIn
	list [lindex [.p configure $optionName] 4] [.p cget $optionName]
    } [list $goodOut $goodOut]
Changes to unix/tkUnixDefault.h.
363
364
365
366
367
368
369

370
371
372
373
374
375
376
#define DEF_PANEDWINDOW_BORDERWIDTH	"1"
#define DEF_PANEDWINDOW_CURSOR		""
#define DEF_PANEDWINDOW_HANDLEPAD	"8"
#define DEF_PANEDWINDOW_HANDLESIZE	"8"
#define DEF_PANEDWINDOW_HEIGHT		""
#define DEF_PANEDWINDOW_OPAQUERESIZE	"1"
#define DEF_PANEDWINDOW_ORIENT		"horizontal"

#define DEF_PANEDWINDOW_RELIEF		"flat"
#define DEF_PANEDWINDOW_SASHCURSOR	""
#define DEF_PANEDWINDOW_SASHPAD		"0"
#define DEF_PANEDWINDOW_SASHRELIEF	"flat"
#define DEF_PANEDWINDOW_SASHWIDTH	"3"
#define DEF_PANEDWINDOW_SHOWHANDLE	"0"
#define DEF_PANEDWINDOW_WIDTH		""







>







363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
#define DEF_PANEDWINDOW_BORDERWIDTH	"1"
#define DEF_PANEDWINDOW_CURSOR		""
#define DEF_PANEDWINDOW_HANDLEPAD	"8"
#define DEF_PANEDWINDOW_HANDLESIZE	"8"
#define DEF_PANEDWINDOW_HEIGHT		""
#define DEF_PANEDWINDOW_OPAQUERESIZE	"1"
#define DEF_PANEDWINDOW_ORIENT		"horizontal"
#define DEF_PANEDWINDOW_PROXYBORDER	"2"
#define DEF_PANEDWINDOW_RELIEF		"flat"
#define DEF_PANEDWINDOW_SASHCURSOR	""
#define DEF_PANEDWINDOW_SASHPAD		"0"
#define DEF_PANEDWINDOW_SASHRELIEF	"flat"
#define DEF_PANEDWINDOW_SASHWIDTH	"3"
#define DEF_PANEDWINDOW_SHOWHANDLE	"0"
#define DEF_PANEDWINDOW_WIDTH		""
Changes to win/tkWinDefault.h.
366
367
368
369
370
371
372

373
374
375
376
377
378
379
#define DEF_PANEDWINDOW_BORDERWIDTH	"1"
#define DEF_PANEDWINDOW_CURSOR		""
#define DEF_PANEDWINDOW_HANDLEPAD	"8"
#define DEF_PANEDWINDOW_HANDLESIZE	"8"
#define DEF_PANEDWINDOW_HEIGHT		""
#define DEF_PANEDWINDOW_OPAQUERESIZE	"1"
#define DEF_PANEDWINDOW_ORIENT		"horizontal"

#define DEF_PANEDWINDOW_RELIEF		"flat"
#define DEF_PANEDWINDOW_SASHCURSOR	""
#define DEF_PANEDWINDOW_SASHPAD		"0"
#define DEF_PANEDWINDOW_SASHRELIEF	"flat"
#define DEF_PANEDWINDOW_SASHWIDTH	"3"
#define DEF_PANEDWINDOW_SHOWHANDLE	"0"
#define DEF_PANEDWINDOW_WIDTH		""







>







366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
#define DEF_PANEDWINDOW_BORDERWIDTH	"1"
#define DEF_PANEDWINDOW_CURSOR		""
#define DEF_PANEDWINDOW_HANDLEPAD	"8"
#define DEF_PANEDWINDOW_HANDLESIZE	"8"
#define DEF_PANEDWINDOW_HEIGHT		""
#define DEF_PANEDWINDOW_OPAQUERESIZE	"1"
#define DEF_PANEDWINDOW_ORIENT		"horizontal"
#define DEF_PANEDWINDOW_PROXYBORDER	"2"
#define DEF_PANEDWINDOW_RELIEF		"flat"
#define DEF_PANEDWINDOW_SASHCURSOR	""
#define DEF_PANEDWINDOW_SASHPAD		"0"
#define DEF_PANEDWINDOW_SASHRELIEF	"flat"
#define DEF_PANEDWINDOW_SASHWIDTH	"3"
#define DEF_PANEDWINDOW_SHOWHANDLE	"0"
#define DEF_PANEDWINDOW_WIDTH		""