summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorhobbs <hobbs>2005-07-28 04:57:37 (GMT)
committerhobbs <hobbs>2005-07-28 04:57:37 (GMT)
commita8b4cdc0ae29558241512cba5e42dc3cfb5a9c59 (patch)
tree4870570f4a045ed0e9b5d90b6f2d1e2071b4ee8d /generic
parent3caf558162fc4f2bb92f2d65f72f9f6532f34298 (diff)
downloadtk-a8b4cdc0ae29558241512cba5e42dc3cfb5a9c59.zip
tk-a8b4cdc0ae29558241512cba5e42dc3cfb5a9c59.tar.gz
tk-a8b4cdc0ae29558241512cba5e42dc3cfb5a9c59.tar.bz2
* generic/tkFrame.c (DisplayFrame):
* generic/tkInt.decls: add TkpDrawFrame to allow for * generic/tkIntDecls.h: platform-specific drawing into the frame/ * generic/tkStubInit.c: toplevel area. Currently only differs on * generic/tkFrame.c: OS X (Aqua), which will draw a themed bg * win/tkWinDraw.c: if tk::mac::useThemedToplevel == 1. * unix/tkUnixDraw.c: Normal frames left alone until we can * mac/tkMacDraw.c: better factor out frame drawing to be * macosx/tkMacDraw.c: widget-specific.
Diffstat (limited to 'generic')
-rw-r--r--generic/tkFrame.c14
-rw-r--r--generic/tkInt.decls18
-rw-r--r--generic/tkIntDecls.h17
-rw-r--r--generic/tkStubInit.c5
4 files changed, 43 insertions, 11 deletions
diff --git a/generic/tkFrame.c b/generic/tkFrame.c
index 6be4c48..d80446c 100644
--- a/generic/tkFrame.c
+++ b/generic/tkFrame.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: tkFrame.c,v 1.15.2.1 2003/07/16 23:17:38 pspjuth Exp $
+ * RCS: @(#) $Id: tkFrame.c,v 1.15.2.2 2005/07/28 04:57:37 hobbs Exp $
*/
#include "default.h"
@@ -1410,7 +1410,7 @@ DisplayFrame(clientData)
if (hlWidth != 0) {
GC fgGC, bgGC;
-
+
bgGC = Tk_GCForColor(framePtr->highlightBgColorPtr,
Tk_WindowId(tkwin));
if (framePtr->flags & GOT_FOCUS) {
@@ -1432,14 +1432,12 @@ DisplayFrame(clientData)
if (framePtr->type != TYPE_LABELFRAME) {
/*
- * There is no label so there is just a simple rectangle to draw.
+ * Pass to platform specific draw function. In general, it just
+ * draws a simple rectangle, but it may "theme" the background.
*/
noLabel:
- Tk_Fill3DRectangle(tkwin, Tk_WindowId(tkwin),
- framePtr->border, hlWidth, hlWidth,
- Tk_Width(tkwin) - 2 * hlWidth,
- Tk_Height(tkwin) - 2 * hlWidth,
+ TkpDrawFrame(tkwin, framePtr->border, hlWidth,
framePtr->borderWidth, framePtr->relief);
} else {
Labelframe *labelframePtr = (Labelframe *) framePtr;
@@ -1458,7 +1456,7 @@ DisplayFrame(clientData)
pixmap = Tk_GetPixmap(framePtr->display, Tk_WindowId(tkwin),
Tk_Width(tkwin), Tk_Height(tkwin), Tk_Depth(tkwin));
-
+
/*
* Clear the pixmap.
*/
diff --git a/generic/tkInt.decls b/generic/tkInt.decls
index 08d0919..2410c92 100644
--- a/generic/tkInt.decls
+++ b/generic/tkInt.decls
@@ -9,7 +9,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.decls,v 1.33.2.3 2004/10/27 00:35:53 davygrvy Exp $
+# RCS: @(#) $Id: tkInt.decls,v 1.33.2.4 2005/07/28 04:57:38 hobbs Exp $
library tk
@@ -678,6 +678,22 @@ declare 149 generic {
Tk_OptionTable optionTable)
}
+# TIP#168 - 8.5+
+#declare 150 generic {
+# int TkMakeRawCurve (Tk_Canvas canvas,
+# double *pointPtr, int numPoints, int numSteps,
+# XPoint xPoints[], double dblPoints[])
+#}
+#declare 151 generic {
+# void TkMakeRawCurvePostscript (Tcl_Interp *interp,
+# Tk_Canvas canvas, double *pointPtr, int numPoints)
+#}
+
+declare 152 generic {
+ void TkpDrawFrame(Tk_Window tkwin, Tk_3DBorder border,
+ int highlightWidth, int borderWidth, int relief)
+}
+
##############################################################################
# Define the platform specific internal Tcl interface. These functions are
diff --git a/generic/tkIntDecls.h b/generic/tkIntDecls.h
index ac3093e..6635a35 100644
--- a/generic/tkIntDecls.h
+++ b/generic/tkIntDecls.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: tkIntDecls.h,v 1.22.2.1 2003/10/13 03:30:05 hobbs Exp $
+ * RCS: @(#) $Id: tkIntDecls.h,v 1.22.2.2 2005/07/28 04:57:38 hobbs Exp $
*/
#ifndef _TKINTDECLS
@@ -562,6 +562,12 @@ EXTERN Tk_Window TkToplevelWindowForCommand _ANSI_ARGS_((
/* 149 */
EXTERN CONST Tk_OptionSpec * TkGetOptionSpec _ANSI_ARGS_((CONST char * name,
Tk_OptionTable optionTable));
+/* Slot 150 is reserved */
+/* Slot 151 is reserved */
+/* 152 */
+EXTERN void TkpDrawFrame _ANSI_ARGS_((Tk_Window tkwin,
+ Tk_3DBorder border, int highlightWidth,
+ int borderWidth, int relief));
typedef struct TkIntStubs {
int magic;
@@ -838,6 +844,9 @@ typedef struct TkIntStubs {
void (*tkStylePkgFree) _ANSI_ARGS_((TkMainInfo * mainPtr)); /* 147 */
Tk_Window (*tkToplevelWindowForCommand) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * cmdName)); /* 148 */
CONST Tk_OptionSpec * (*tkGetOptionSpec) _ANSI_ARGS_((CONST char * name, Tk_OptionTable optionTable)); /* 149 */
+ void *reserved150;
+ void *reserved151;
+ void (*tkpDrawFrame) _ANSI_ARGS_((Tk_Window tkwin, Tk_3DBorder border, int highlightWidth, int borderWidth, int relief)); /* 152 */
} TkIntStubs;
#ifdef __cplusplus
@@ -1551,6 +1560,12 @@ extern TkIntStubs *tkIntStubsPtr;
#define TkGetOptionSpec \
(tkIntStubsPtr->tkGetOptionSpec) /* 149 */
#endif
+/* Slot 150 is reserved */
+/* Slot 151 is reserved */
+#ifndef TkpDrawFrame
+#define TkpDrawFrame \
+ (tkIntStubsPtr->tkpDrawFrame) /* 152 */
+#endif
#endif /* defined(USE_TK_STUBS) && !defined(USE_TK_STUB_PROCS) */
diff --git a/generic/tkStubInit.c b/generic/tkStubInit.c
index c69c88f..495a509 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.41.2.2 2004/09/23 00:56:14 mdejong Exp $
+ * RCS: @(#) $Id: tkStubInit.c,v 1.41.2.3 2005/07/28 04:57:38 hobbs Exp $
*/
#include "tkInt.h"
@@ -330,6 +330,9 @@ TkIntStubs tkIntStubs = {
TkStylePkgFree, /* 147 */
TkToplevelWindowForCommand, /* 148 */
TkGetOptionSpec, /* 149 */
+ NULL, /* 150 */
+ NULL, /* 151 */
+ TkpDrawFrame, /* 152 */
};
TkIntPlatStubs tkIntPlatStubs = {