From 25353f117ffef51923ad5428f8f38f3e12f15882 Mon Sep 17 00:00:00 2001 From: "fvogelnew1@free.fr" Date: Tue, 14 Jul 2015 20:14:02 +0000 Subject: Bug [1247115fff] - Added -proxyrelief option --- doc/panedwindow.n | 3 +++ generic/tkPanedWindow.c | 6 +++++- macosx/tkMacOSXDefault.h | 1 + tests/panedwindow.test | 19 +++++++++++-------- unix/tkUnixDefault.h | 1 + win/tkWinDefault.h | 1 + 6 files changed, 22 insertions(+), 9 deletions(-) diff --git a/doc/panedwindow.n b/doc/panedwindow.n index 53a7238..838587e 100644 --- a/doc/panedwindow.n +++ b/doc/panedwindow.n @@ -29,6 +29,9 @@ drawn as squares. May be any value accepted by \fBTk_GetPixels\fR. 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 \-proxyrelief proxyRelief ProxyRelief +Relief to use when drawing the proxy. May be any of the standard Tk +relief values. .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). diff --git a/generic/tkPanedWindow.c b/generic/tkPanedWindow.c index 6a3766b..c7d5339 100644 --- a/generic/tkPanedWindow.c +++ b/generic/tkPanedWindow.c @@ -147,6 +147,7 @@ typedef struct PanedWindow { GC gc; /* Graphics context for copying from * off-screen pixmap onto screen. */ int proxyx, proxyy; /* Proxy x,y coordinates. */ + int proxyRelief; /* Relief used to draw proxy. */ Slave **slaves; /* Pointer to array of Slaves. */ int numSlaves; /* Number of slaves. */ int sizeofSlaves; /* Number of elements in the slaves array. */ @@ -298,6 +299,9 @@ static const Tk_OptionSpec optionSpecs[] = { {TK_OPTION_STRING_TABLE, "-orient", "orient", "Orient", DEF_PANEDWINDOW_ORIENT, -1, Tk_Offset(PanedWindow, orient), 0, (ClientData) orientStrings, GEOMETRY}, + {TK_OPTION_RELIEF, "-proxyrelief", "proxyRelief", "Relief", + DEF_PANEDWINDOW_PROXYRELIEF, -1, Tk_Offset(PanedWindow, proxyRelief), + 0, 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", @@ -2770,7 +2774,7 @@ DisplayProxyWindow( */ Tk_Fill3DRectangle(tkwin, pixmap, pwPtr->background, 0, 0, - Tk_Width(tkwin), Tk_Height(tkwin), 2, pwPtr->sashRelief); + Tk_Width(tkwin), Tk_Height(tkwin), 2, pwPtr->proxyRelief); #ifndef TK_NO_DOUBLE_BUFFERING /* diff --git a/macosx/tkMacOSXDefault.h b/macosx/tkMacOSXDefault.h index 0380de9..ad92dc6 100644 --- a/macosx/tkMacOSXDefault.h +++ b/macosx/tkMacOSXDefault.h @@ -409,6 +409,7 @@ #define DEF_PANEDWINDOW_HEIGHT "" #define DEF_PANEDWINDOW_OPAQUERESIZE "1" #define DEF_PANEDWINDOW_ORIENT "horizontal" +#define DEF_PANEDWINDOW_PROXYRELIEF "flat" #define DEF_PANEDWINDOW_RELIEF "flat" #define DEF_PANEDWINDOW_SASHCURSOR "" #define DEF_PANEDWINDOW_SASHPAD "0" diff --git a/tests/panedwindow.test b/tests/panedwindow.test index 724b40d..f66b35e 100644 --- a/tests/panedwindow.test +++ b/tests/panedwindow.test @@ -29,24 +29,27 @@ foreach {testName testData} { 20 20 badValue {bad screen distance "badValue"}} panedwindow-1.8 {-opaqueresize true 1 foo {expected boolean value but got "foo"}} - panedwindow-1.9 {-orient + panedwindow-1.9 {-proxyrelief + groove groove + 1.5 {bad relief "1.5": must be flat, groove, raised, ridge, solid, or sunken}} + panedwindow-1.10 {-orient horizontal horizontal badValue {bad orient "badValue": must be horizontal or vertical}} - panedwindow-1.10 {-relief + panedwindow-1.11 {-relief groove groove 1.5 {bad relief "1.5": must be flat, groove, raised, ridge, solid, or sunken}} - panedwindow-1.11 {-sashcursor + panedwindow-1.12 {-sashcursor arrow arrow badValue {bad cursor spec "badValue"}} - panedwindow-1.12 {-sashpad + panedwindow-1.13 {-sashpad 1.3 1 badValue {bad screen distance "badValue"}} - panedwindow-1.13 {-sashrelief + panedwindow-1.14 {-sashrelief groove groove 1.5 {bad relief "1.5": must be flat, groove, raised, ridge, solid, or sunken}} - panedwindow-1.14 {-sashwidth + panedwindow-1.15 {-sashwidth 10 10 badValue {bad screen distance "badValue"}} - panedwindow-1.15 {-showhandle + panedwindow-1.16 {-showhandle true 1 foo {expected boolean value but got "foo"}} - panedwindow-1.16 {-width + panedwindow-1.17 {-width 402 402 badValue {bad screen distance "badValue"}} } { lassign $testData optionName goodIn goodOut badIn badOut diff --git a/unix/tkUnixDefault.h b/unix/tkUnixDefault.h index 4eb8778..78b10f5 100644 --- a/unix/tkUnixDefault.h +++ b/unix/tkUnixDefault.h @@ -367,6 +367,7 @@ #define DEF_PANEDWINDOW_HEIGHT "" #define DEF_PANEDWINDOW_OPAQUERESIZE "1" #define DEF_PANEDWINDOW_ORIENT "horizontal" +#define DEF_PANEDWINDOW_PROXYRELIEF "flat" #define DEF_PANEDWINDOW_RELIEF "flat" #define DEF_PANEDWINDOW_SASHCURSOR "" #define DEF_PANEDWINDOW_SASHPAD "0" diff --git a/win/tkWinDefault.h b/win/tkWinDefault.h index a1a76c7..19cbf31 100644 --- a/win/tkWinDefault.h +++ b/win/tkWinDefault.h @@ -370,6 +370,7 @@ #define DEF_PANEDWINDOW_HEIGHT "" #define DEF_PANEDWINDOW_OPAQUERESIZE "1" #define DEF_PANEDWINDOW_ORIENT "horizontal" +#define DEF_PANEDWINDOW_PROXYRELIEF "flat" #define DEF_PANEDWINDOW_RELIEF "flat" #define DEF_PANEDWINDOW_SASHCURSOR "" #define DEF_PANEDWINDOW_SASHPAD "0" -- cgit v0.12