Index: doc/panedwindow.n ================================================================== --- doc/panedwindow.n +++ doc/panedwindow.n @@ -27,10 +27,20 @@ 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, Index: generic/tkPanedWindow.c ================================================================== --- generic/tkPanedWindow.c +++ generic/tkPanedWindow.c @@ -145,10 +145,14 @@ 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; @@ -296,10 +300,19 @@ 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}, @@ -2767,12 +2780,14 @@ /* * Redraw the widget's background and border. */ - Tk_Fill3DRectangle(tkwin, pixmap, pwPtr->background, 0, 0, - Tk_Width(tkwin), Tk_Height(tkwin), 2, pwPtr->sashRelief); + 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. */ Index: macosx/tkMacOSXDefault.h ================================================================== --- macosx/tkMacOSXDefault.h +++ macosx/tkMacOSXDefault.h @@ -407,10 +407,11 @@ #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" Index: tests/panedwindow.test ================================================================== --- tests/panedwindow.test +++ tests/panedwindow.test @@ -27,28 +27,35 @@ 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 + 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 Index: unix/tkUnixDefault.h ================================================================== --- unix/tkUnixDefault.h +++ unix/tkUnixDefault.h @@ -365,10 +365,11 @@ #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" Index: win/tkWinDefault.h ================================================================== --- win/tkWinDefault.h +++ win/tkWinDefault.h @@ -368,10 +368,11 @@ #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"