summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorpspjuth <peter.spjuth@gmail.com>2001-09-26 20:25:17 (GMT)
committerpspjuth <peter.spjuth@gmail.com>2001-09-26 20:25:17 (GMT)
commit05383a493ead1b30256c79a19782ecdbfa74522a (patch)
tree227a6b7c0cc2662c72aab1116b7d9835ea732809 /generic
parentac859f541ab22b0778aa06864848fdf336bb49cf (diff)
downloadtk-05383a493ead1b30256c79a19782ecdbfa74522a.zip
tk-05383a493ead1b30256c79a19782ecdbfa74522a.tar.gz
tk-05383a493ead1b30256c79a19782ecdbfa74522a.tar.bz2
Geometry manager changes to support TIP#18.
Diffstat (limited to 'generic')
-rw-r--r--generic/tk.decls13
-rw-r--r--generic/tk.h22
-rw-r--r--generic/tkDecls.h18
-rw-r--r--generic/tkGeometry.c115
-rw-r--r--generic/tkGrid.c31
-rw-r--r--generic/tkInt.h20
-rw-r--r--generic/tkPack.c28
-rw-r--r--generic/tkPlace.c22
-rw-r--r--generic/tkStubInit.c4
-rw-r--r--generic/tkUtil.c10
-rw-r--r--generic/tkWindow.c9
11 files changed, 241 insertions, 51 deletions
diff --git a/generic/tk.decls b/generic/tk.decls
index d9b4a32..3d99766 100644
--- a/generic/tk.decls
+++ b/generic/tk.decls
@@ -11,7 +11,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: tk.decls,v 1.14 2000/11/22 01:49:37 ericm Exp $
+# RCS: @(#) $Id: tk.decls,v 1.15 2001/09/26 20:25:17 pspjuth Exp $
library tk
@@ -1147,6 +1147,17 @@ declare 242 generic {
Tk_ClassProcs *procs, ClientData instanceData)
}
+# New in 8.4a4
+#
+declare 243 generic {
+ void Tk_SetInternalBorderEx (Tk_Window tkwin, int left, int right, \
+ int top, int bottom)
+}
+declare 244 generic {
+ void Tk_SetMinimumRequestSize (Tk_Window tkwin, \
+ int minWidth, int minHeight)
+}
+
# Define the platform specific public Tk interface. These functions are
# only available on the designated platform.
diff --git a/generic/tk.h b/generic/tk.h
index 0751507..9903342 100644
--- a/generic/tk.h
+++ b/generic/tk.h
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tk.h,v 1.56 2001/08/08 18:41:10 dgp Exp $
+ * RCS: @(#) $Id: tk.h,v 1.57 2001/09/26 20:25:17 pspjuth Exp $
*/
#ifndef _TK
@@ -717,8 +717,19 @@ typedef XActivateDeactivateEvent XDeactivateEvent;
(((Tk_FakeWin *) (tkwin))->flags & TK_TOP_LEVEL)
#define Tk_ReqWidth(tkwin) (((Tk_FakeWin *) (tkwin))->reqWidth)
#define Tk_ReqHeight(tkwin) (((Tk_FakeWin *) (tkwin))->reqHeight)
+/* Tk_InternalBorderWidth is deprecated */
#define Tk_InternalBorderWidth(tkwin) \
- (((Tk_FakeWin *) (tkwin))->internalBorderWidth)
+ (((Tk_FakeWin *) (tkwin))->internalBorderLeft)
+#define Tk_InternalBorderLeft(tkwin) \
+ (((Tk_FakeWin *) (tkwin))->internalBorderLeft)
+#define Tk_InternalBorderRight(tkwin) \
+ (((Tk_FakeWin *) (tkwin))->internalBorderRight)
+#define Tk_InternalBorderTop(tkwin) \
+ (((Tk_FakeWin *) (tkwin))->internalBorderTop)
+#define Tk_InternalBorderBottom(tkwin) \
+ (((Tk_FakeWin *) (tkwin))->internalBorderBottom)
+#define Tk_MinReqWidth(tkwin) (((Tk_FakeWin *) (tkwin))->minReqWidth)
+#define Tk_MinReqHeight(tkwin) (((Tk_FakeWin *) (tkwin))->minReqHeight)
#define Tk_Parent(tkwin) (((Tk_FakeWin *) (tkwin))->parentPtr)
#define Tk_Colormap(tkwin) (((Tk_FakeWin *) (tkwin))->atts.colormap)
@@ -764,11 +775,16 @@ typedef struct Tk_FakeWin {
char *dummy14; /* geomMgrPtr */
ClientData dummy15; /* geomData */
int reqWidth, reqHeight;
- int internalBorderWidth;
+ int internalBorderLeft;
char *dummy16; /* wmInfoPtr */
char *dummy17; /* classProcPtr */
ClientData dummy18; /* instanceData */
char *dummy19; /* privatePtr */
+ int internalBorderRight;
+ int internalBorderTop;
+ int internalBorderBottom;
+ int minReqWidth;
+ int minReqHeight;
} Tk_FakeWin;
/*
diff --git a/generic/tkDecls.h b/generic/tkDecls.h
index e4753e1..a60433b 100644
--- a/generic/tkDecls.h
+++ b/generic/tkDecls.h
@@ -8,7 +8,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkDecls.h,v 1.14 2000/11/22 01:49:37 ericm Exp $
+ * RCS: @(#) $Id: tkDecls.h,v 1.15 2001/09/26 20:25:17 pspjuth Exp $
*/
#ifndef _TKDECLS
@@ -834,6 +834,12 @@ EXTERN Tk_Window Tk_CreateAnonymousWindow _ANSI_ARGS_((
EXTERN void Tk_SetClassProcs _ANSI_ARGS_((Tk_Window tkwin,
Tk_ClassProcs * procs,
ClientData instanceData));
+/* 243 */
+EXTERN void Tk_SetInternalBorderEx _ANSI_ARGS_((Tk_Window tkwin,
+ int left, int right, int top, int bottom));
+/* 244 */
+EXTERN void Tk_SetMinimumRequestSize _ANSI_ARGS_((
+ Tk_Window tkwin, int minWidth, int minHeight));
typedef struct TkStubHooks {
struct TkPlatStubs *tkPlatStubs;
@@ -1089,6 +1095,8 @@ typedef struct TkStubs {
void (*tk_DeleteClientMessageHandler) _ANSI_ARGS_((Tk_ClientMessageProc * proc)); /* 240 */
Tk_Window (*tk_CreateAnonymousWindow) _ANSI_ARGS_((Tcl_Interp * interp, Tk_Window parent, char * screenName)); /* 241 */
void (*tk_SetClassProcs) _ANSI_ARGS_((Tk_Window tkwin, Tk_ClassProcs * procs, ClientData instanceData)); /* 242 */
+ void (*tk_SetInternalBorderEx) _ANSI_ARGS_((Tk_Window tkwin, int left, int right, int top, int bottom)); /* 243 */
+ void (*tk_SetMinimumRequestSize) _ANSI_ARGS_((Tk_Window tkwin, int minWidth, int minHeight)); /* 244 */
} TkStubs;
#ifdef __cplusplus
@@ -2071,6 +2079,14 @@ extern TkStubs *tkStubsPtr;
#define Tk_SetClassProcs \
(tkStubsPtr->tk_SetClassProcs) /* 242 */
#endif
+#ifndef Tk_SetInternalBorderEx
+#define Tk_SetInternalBorderEx \
+ (tkStubsPtr->tk_SetInternalBorderEx) /* 243 */
+#endif
+#ifndef Tk_SetMinimumRequestSize
+#define Tk_SetMinimumRequestSize \
+ (tkStubsPtr->tk_SetMinimumRequestSize) /* 244 */
+#endif
#endif /* defined(USE_TK_STUBS) && !defined(USE_TK_STUB_PROCS) */
diff --git a/generic/tkGeometry.c b/generic/tkGeometry.c
index dd8de2e..f2b1ffa 100644
--- a/generic/tkGeometry.c
+++ b/generic/tkGeometry.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkGeometry.c,v 1.4 2000/10/05 00:50:00 ericm Exp $
+ * RCS: @(#) $Id: tkGeometry.c,v 1.5 2001/09/26 20:25:17 pspjuth Exp $
*/
#include "tkPort.h"
@@ -165,6 +165,79 @@ Tk_GeometryRequest(tkwin, reqWidth, reqHeight)
/*
*----------------------------------------------------------------------
*
+ * Tk_SetInternalBorderEx --
+ *
+ * Notify relevant geometry managers that a window has an internal
+ * border of a given width and that child windows should not be
+ * placed on that border.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * The border widths are recorded for the window, and all geometry
+ * managers of all children are notified so that can re-layout, if
+ * necessary.
+ *
+ *----------------------------------------------------------------------
+ */
+
+void
+Tk_SetInternalBorderEx(tkwin, left, right, top, bottom)
+ Tk_Window tkwin; /* Window that will have internal border. */
+ int left, right; /* Width of internal border, in pixels. */
+ int top, bottom;
+{
+ register TkWindow *winPtr = (TkWindow *) tkwin;
+ register int changed = 0;
+
+ if (left < 0) {
+ left = 0;
+ }
+ if (left != winPtr->internalBorderLeft) {
+ winPtr->internalBorderLeft = left;
+ changed = 1;
+ }
+
+ if (right < 0) {
+ right = 0;
+ }
+ if (right != winPtr->internalBorderRight) {
+ winPtr->internalBorderRight = right;
+ changed = 1;
+ }
+
+ if (top < 0) {
+ top = 0;
+ }
+ if (top != winPtr->internalBorderTop) {
+ winPtr->internalBorderTop = top;
+ changed = 1;
+ }
+
+ if (bottom < 0) {
+ bottom = 0;
+ }
+ if (bottom != winPtr->internalBorderBottom) {
+ winPtr->internalBorderBottom = bottom;
+ changed = 1;
+ }
+
+ /*
+ * All the slaves for which this is the master window must now be
+ * repositioned to take account of the new internal border width.
+ * To signal all the geometry managers to do this, just resize the
+ * window to its current size. The ConfigureNotify event will
+ * cause geometry managers to recompute everything.
+ */
+
+ if (changed) {
+ Tk_ResizeWindow(tkwin, Tk_Width(tkwin), Tk_Height(tkwin));
+ }
+}
+/*
+ *----------------------------------------------------------------------
+ *
* Tk_SetInternalBorder --
*
* Notify relevant geometry managers that a window has an internal
@@ -187,19 +260,45 @@ Tk_SetInternalBorder(tkwin, width)
Tk_Window tkwin; /* Window that will have internal border. */
int width; /* Width of internal border, in pixels. */
{
+ Tk_SetInternalBorderEx(tkwin, width, width, width, width);
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * Tk_SetMinimumRequestSize --
+ *
+ * Notify relevant geometry managers that a window has a minimum
+ * request size.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * The minimum request size is recorded for the window, and
+ * a new size is requested for the window, if necessary.
+ *
+ *----------------------------------------------------------------------
+ */
+
+void
+Tk_SetMinimumRequestSize(tkwin, minWidth, minHeight)
+ Tk_Window tkwin; /* Window that will have internal border. */
+ int minWidth, minHeight; /* Minimum requested size, in pixels. */
+{
register TkWindow *winPtr = (TkWindow *) tkwin;
- if (width == winPtr->internalBorderWidth) {
+ if ((winPtr->minReqWidth == minWidth) &&
+ (winPtr->minReqHeight == minHeight)) {
return;
}
- if (width < 0) {
- width = 0;
- }
- winPtr->internalBorderWidth = width;
+
+ winPtr->minReqWidth = minWidth;
+ winPtr->minReqHeight = minHeight;
/*
- * All the slaves for which this is the master window must now be
- * repositioned to take account of the new internal border width.
+ * The changed min size may cause geometry managers to get a
+ * different result, so make them recompute.
* To signal all the geometry managers to do this, just resize the
* window to its current size. The ConfigureNotify event will
* cause geometry managers to recompute everything.
diff --git a/generic/tkGrid.c b/generic/tkGrid.c
index 28c872e..6737e0a 100644
--- a/generic/tkGrid.c
+++ b/generic/tkGrid.c
@@ -8,7 +8,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkGrid.c,v 1.15 2001/09/17 23:16:26 dgp Exp $
+ * RCS: @(#) $Id: tkGrid.c,v 1.16 2001/09/26 20:25:17 pspjuth Exp $
*/
#include "tkInt.h"
@@ -1487,13 +1487,22 @@ ArrangeGrid(clientData)
SetGridSize(masterPtr);
width = ResolveConstraints(masterPtr, COLUMN, 0);
height = ResolveConstraints(masterPtr, ROW, 0);
- width += 2*Tk_InternalBorderWidth(masterPtr->tkwin);
- height += 2*Tk_InternalBorderWidth(masterPtr->tkwin);
+ width += Tk_InternalBorderLeft(masterPtr->tkwin) +
+ Tk_InternalBorderRight(masterPtr->tkwin);
+ height += Tk_InternalBorderTop(masterPtr->tkwin) +
+ Tk_InternalBorderBottom(masterPtr->tkwin);
+
+ if (width < Tk_MinReqWidth(masterPtr->tkwin)) {
+ width = Tk_MinReqWidth(masterPtr->tkwin);
+ }
+ if (height < Tk_MinReqHeight(masterPtr->tkwin)) {
+ height = Tk_MinReqHeight(masterPtr->tkwin);
+ }
if (((width != Tk_ReqWidth(masterPtr->tkwin))
- || (height != Tk_ReqHeight(masterPtr->tkwin)))
- && !(masterPtr->flags & DONT_PROPAGATE)) {
- Tk_GeometryRequest(masterPtr->tkwin, width, height);
+ || (height != Tk_ReqHeight(masterPtr->tkwin)))
+ && !(masterPtr->flags & DONT_PROPAGATE)) {
+ Tk_GeometryRequest(masterPtr->tkwin, width, height);
if (width>1 && height>1) {
masterPtr->flags |= REQUESTED_RELAYOUT;
Tcl_DoWhenIdle(ArrangeGrid, (ClientData) masterPtr);
@@ -1512,15 +1521,17 @@ ArrangeGrid(clientData)
*/
realWidth = Tk_Width(masterPtr->tkwin) -
- 2*Tk_InternalBorderWidth(masterPtr->tkwin);
+ Tk_InternalBorderLeft(masterPtr->tkwin) -
+ Tk_InternalBorderRight(masterPtr->tkwin);
realHeight = Tk_Height(masterPtr->tkwin) -
- 2*Tk_InternalBorderWidth(masterPtr->tkwin);
+ Tk_InternalBorderTop(masterPtr->tkwin) -
+ Tk_InternalBorderBottom(masterPtr->tkwin);
slotPtr->startX = AdjustOffsets(realWidth,
MAX(slotPtr->columnEnd,slotPtr->columnMax), slotPtr->columnPtr);
slotPtr->startY = AdjustOffsets(realHeight,
MAX(slotPtr->rowEnd,slotPtr->rowMax), slotPtr->rowPtr);
- slotPtr->startX += Tk_InternalBorderWidth(masterPtr->tkwin);
- slotPtr->startY += Tk_InternalBorderWidth(masterPtr->tkwin);
+ slotPtr->startX += Tk_InternalBorderLeft(masterPtr->tkwin);
+ slotPtr->startY += Tk_InternalBorderTop(masterPtr->tkwin);
/*
* Now adjust the actual size of the slave to its cavity by
diff --git a/generic/tkInt.h b/generic/tkInt.h
index 0142200..ce68146 100644
--- a/generic/tkInt.h
+++ b/generic/tkInt.h
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: $Id: tkInt.h,v 1.38 2001/08/21 20:21:36 pspjuth Exp $
+ * RCS: $Id: tkInt.h,v 1.39 2001/09/26 20:25:17 pspjuth Exp $
*/
#ifndef _TKINT
@@ -743,10 +743,12 @@ typedef struct TkWindow {
* Tk_GeometryRequest, or 0's if
* Tk_GeometryRequest hasn't been
* called. */
- int internalBorderWidth; /* Width of internal border of window
+ int internalBorderLeft; /* Width of internal border of window
* (0 means no internal border). Geometry
* managers should not normally place children
- * on top of the border. */
+ * on top of the border.
+ * Fields for the other three sides are found
+ * below. */
/*
* Information maintained by tkWm.c for window manager communication.
@@ -770,6 +772,18 @@ typedef struct TkWindow {
*/
struct TkWindowPrivate *privatePtr;
+
+ /*
+ * More information used by tkGeometry.c for geometry management.
+ */
+
+ /* The remaining fields of internal border. */
+ int internalBorderRight;
+ int internalBorderTop;
+ int internalBorderBottom;
+
+ int minReqWidth; /* Minimum requested width. */
+ int minReqHeight; /* Minimum requested height. */
} TkWindow;
/*
diff --git a/generic/tkPack.c b/generic/tkPack.c
index 5ec3496..106b547 100644
--- a/generic/tkPack.c
+++ b/generic/tkPack.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkPack.c,v 1.12 2001/09/23 11:30:44 pspjuth Exp $
+ * RCS: @(#) $Id: tkPack.c,v 1.13 2001/09/26 20:25:17 pspjuth Exp $
*/
#include "tkPort.h"
@@ -556,8 +556,6 @@ ArrangePacking(clientData)
* allocated to the current window. */
int x, y, width, height; /* These variables are used to hold the
* actual geometry of the current window. */
- int intBWidth; /* Width of internal border in parent window,
- * if any. */
int abort; /* May get set to non-zero to abort this
* repacking operation. */
int borderX, borderY;
@@ -609,8 +607,10 @@ ArrangePacking(clientData)
* maxHeight - Same as maxWidth, except keeps height info.
*/
- intBWidth = Tk_InternalBorderWidth(masterPtr->tkwin);
- width = height = maxWidth = maxHeight = 2*intBWidth;
+ width = maxWidth = Tk_InternalBorderLeft(masterPtr->tkwin) +
+ Tk_InternalBorderRight(masterPtr->tkwin);
+ height = maxHeight = Tk_InternalBorderTop(masterPtr->tkwin) +
+ Tk_InternalBorderBottom(masterPtr->tkwin);
for (slavePtr = masterPtr->slavePtr; slavePtr != NULL;
slavePtr = slavePtr->nextPtr) {
if ((slavePtr->side == TOP) || (slavePtr->side == BOTTOM)) {
@@ -638,6 +638,13 @@ ArrangePacking(clientData)
maxHeight = height;
}
+ if (maxWidth < Tk_MinReqWidth(masterPtr->tkwin)) {
+ maxWidth = Tk_MinReqWidth(masterPtr->tkwin);
+ }
+ if (maxHeight < Tk_MinReqHeight(masterPtr->tkwin)) {
+ maxHeight = Tk_MinReqHeight(masterPtr->tkwin);
+ }
+
/*
* If the total amount of space needed in the parent window has
* changed, and if we're propagating geometry information, then
@@ -666,9 +673,14 @@ ArrangePacking(clientData)
* frame, depending on anchor.
*/
- cavityX = cavityY = x = y = intBWidth;
- cavityWidth = Tk_Width(masterPtr->tkwin) - 2*intBWidth;
- cavityHeight = Tk_Height(masterPtr->tkwin) - 2*intBWidth;
+ cavityX = x = Tk_InternalBorderLeft(masterPtr->tkwin);
+ cavityY = y = Tk_InternalBorderTop(masterPtr->tkwin);
+ cavityWidth = Tk_Width(masterPtr->tkwin) -
+ Tk_InternalBorderLeft(masterPtr->tkwin) -
+ Tk_InternalBorderRight(masterPtr->tkwin);
+ cavityHeight = Tk_Height(masterPtr->tkwin) -
+ Tk_InternalBorderTop(masterPtr->tkwin) -
+ Tk_InternalBorderBottom(masterPtr->tkwin);
for (slavePtr = masterPtr->slavePtr; slavePtr != NULL;
slavePtr = slavePtr->nextPtr) {
if ((slavePtr->side == TOP) || (slavePtr->side == BOTTOM)) {
diff --git a/generic/tkPlace.c b/generic/tkPlace.c
index 23cd783..746581a 100644
--- a/generic/tkPlace.c
+++ b/generic/tkPlace.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkPlace.c,v 1.9 2001/08/29 23:22:24 hobbs Exp $
+ * RCS: @(#) $Id: tkPlace.c,v 1.10 2001/09/26 20:25:17 pspjuth Exp $
*/
#include "tkPort.h"
@@ -810,7 +810,7 @@ RecomputePlacement(clientData)
register Master *masterPtr = (Master *) clientData;
register Slave *slavePtr;
int x, y, width, height, tmp;
- int masterWidth, masterHeight, masterBW;
+ int masterWidth, masterHeight, masterX, masterY;
double x1, y1, x2, y2;
masterPtr->flags &= ~PARENT_RECONFIG_PENDING;
@@ -827,25 +827,29 @@ RecomputePlacement(clientData)
* account desired border mode.
*/
- masterBW = 0;
+ masterX = masterY = 0;
masterWidth = Tk_Width(masterPtr->tkwin);
masterHeight = Tk_Height(masterPtr->tkwin);
if (slavePtr->borderMode == BM_INSIDE) {
- masterBW = Tk_InternalBorderWidth(masterPtr->tkwin);
+ masterX = Tk_InternalBorderLeft(masterPtr->tkwin);
+ masterY = Tk_InternalBorderTop(masterPtr->tkwin);
+ masterWidth -= masterX + Tk_InternalBorderRight(masterPtr->tkwin);
+ masterHeight -= masterY +
+ Tk_InternalBorderBottom(masterPtr->tkwin);
} else if (slavePtr->borderMode == BM_OUTSIDE) {
- masterBW = -Tk_Changes(masterPtr->tkwin)->border_width;
+ masterX = masterY = -Tk_Changes(masterPtr->tkwin)->border_width;
+ masterWidth -= 2 * masterX;
+ masterHeight -= 2 * masterY;
}
- masterWidth -= 2*masterBW;
- masterHeight -= 2*masterBW;
/*
* Step 2: compute size of slave (outside dimensions including
* border) and location of anchor point within master.
*/
- x1 = slavePtr->x + masterBW + (slavePtr->relX*masterWidth);
+ x1 = slavePtr->x + masterX + (slavePtr->relX*masterWidth);
x = (int) (x1 + ((x1 > 0) ? 0.5 : -0.5));
- y1 = slavePtr->y + masterBW + (slavePtr->relY*masterHeight);
+ y1 = slavePtr->y + masterY + (slavePtr->relY*masterHeight);
y = (int) (y1 + ((y1 > 0) ? 0.5 : -0.5));
if (slavePtr->flags & (CHILD_WIDTH|CHILD_REL_WIDTH)) {
width = 0;
diff --git a/generic/tkStubInit.c b/generic/tkStubInit.c
index bbf3506..9710089 100644
--- a/generic/tkStubInit.c
+++ b/generic/tkStubInit.c
@@ -8,7 +8,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkStubInit.c,v 1.27 2001/09/25 16:25:20 dgp Exp $
+ * RCS: @(#) $Id: tkStubInit.c,v 1.28 2001/09/26 20:25:17 pspjuth Exp $
*/
#include "tkInt.h"
@@ -955,6 +955,8 @@ TkStubs tkStubs = {
Tk_DeleteClientMessageHandler, /* 240 */
Tk_CreateAnonymousWindow, /* 241 */
Tk_SetClassProcs, /* 242 */
+ Tk_SetInternalBorderEx, /* 243 */
+ Tk_SetMinimumRequestSize, /* 244 */
};
/* !END!: Do not edit above this line. */
diff --git a/generic/tkUtil.c b/generic/tkUtil.c
index 80f9919..8cde5a9 100644
--- a/generic/tkUtil.c
+++ b/generic/tkUtil.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkUtil.c,v 1.10 2001/08/15 15:44:36 dkf Exp $
+ * RCS: @(#) $Id: tkUtil.c,v 1.11 2001/09/26 20:25:17 pspjuth Exp $
*/
#include "tkInt.h"
@@ -794,7 +794,7 @@ TkComputeAnchor(anchor, tkwin, padX, padY, innerWidth, innerHeight, xPtr, yPtr)
case TK_ANCHOR_NW:
case TK_ANCHOR_W:
case TK_ANCHOR_SW:
- *xPtr = Tk_InternalBorderWidth(tkwin) + padX;
+ *xPtr = Tk_InternalBorderLeft(tkwin) + padX;
break;
case TK_ANCHOR_N:
@@ -804,7 +804,7 @@ TkComputeAnchor(anchor, tkwin, padX, padY, innerWidth, innerHeight, xPtr, yPtr)
break;
default:
- *xPtr = Tk_Width(tkwin) - (Tk_InternalBorderWidth(tkwin) + padX)
+ *xPtr = Tk_Width(tkwin) - (Tk_InternalBorderRight(tkwin) + padX)
- innerWidth;
break;
}
@@ -813,7 +813,7 @@ TkComputeAnchor(anchor, tkwin, padX, padY, innerWidth, innerHeight, xPtr, yPtr)
case TK_ANCHOR_NW:
case TK_ANCHOR_N:
case TK_ANCHOR_NE:
- *yPtr = Tk_InternalBorderWidth(tkwin) + padY;
+ *yPtr = Tk_InternalBorderTop(tkwin) + padY;
break;
case TK_ANCHOR_W:
@@ -823,7 +823,7 @@ TkComputeAnchor(anchor, tkwin, padX, padY, innerWidth, innerHeight, xPtr, yPtr)
break;
default:
- *yPtr = Tk_Height(tkwin) - Tk_InternalBorderWidth(tkwin) - padY
+ *yPtr = Tk_Height(tkwin) - Tk_InternalBorderBottom(tkwin) - padY
- innerHeight;
break;
}
diff --git a/generic/tkWindow.c b/generic/tkWindow.c
index 4316f31..c4d7ab4 100644
--- a/generic/tkWindow.c
+++ b/generic/tkWindow.c
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkWindow.c,v 1.37 2001/09/21 22:08:19 hobbs Exp $
+ * RCS: @(#) $Id: tkWindow.c,v 1.38 2001/09/26 20:25:17 pspjuth Exp $
*/
#include "tkPort.h"
@@ -649,11 +649,16 @@ TkAllocWindow(dispPtr, screenNum, parentPtr)
winPtr->geomMgrPtr = NULL;
winPtr->geomData = NULL;
winPtr->reqWidth = winPtr->reqHeight = 1;
- winPtr->internalBorderWidth = 0;
+ winPtr->internalBorderLeft = 0;
winPtr->wmInfoPtr = NULL;
winPtr->classProcsPtr = NULL;
winPtr->instanceData = NULL;
winPtr->privatePtr = NULL;
+ winPtr->internalBorderRight = 0;
+ winPtr->internalBorderTop = 0;
+ winPtr->internalBorderBottom = 0;
+ winPtr->minReqWidth = 0;
+ winPtr->minReqHeight = 0;
return winPtr;
}