Index: Makefile.in =================================================================== RCS file: /cvsroot/tktreectrl/tktreectrl/Makefile.in,v retrieving revision 1.1.1.1 diff -u -p -u -p -r1.1.1.1 Makefile.in --- Makefile.in 17 Dec 2002 05:04:20 -0000 1.1.1.1 +++ Makefile.in 24 Feb 2004 07:06:23 -0000 @@ -168,7 +168,7 @@ TCLSH_PROG = @TCLSH_PROG@ TCLSH = $(TCLSH_ENV) $(TCLSH_PROG) SHARED_BUILD = @SHARED_BUILD@ -INCLUDES = @TCL_INCLUDES@ @TK_INCLUDES@ +INCLUDES = @TCL_INCLUDES@ @TK_INCLUDES@ @TK_XINCLUDES@ EXTRA_CFLAGS = $(MEM_DEBUG_FLAGS) @EXTRA_CFLAGS@ @@ -250,7 +250,8 @@ install-doc-x: doc done install-doc: - @echo "No docs to install" + mkdir -p $(DESTDIR)$(pkglibdir)/htmldoc + cp $(srcdir)/doc/*.html $(DESTDIR)$(pkglibdir)/htmldoc test: binaries libraries $(TCLSH) `@CYGPATH@ $(srcdir)/tests/all.tcl` $(TESTFLAGS) Index: license.terms =================================================================== RCS file: license.terms diff -N license.terms --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ license.terms 26 Dec 2003 01:17:12 -0000 @@ -0,0 +1,38 @@ +This software is copyrighted by Christian Krone and other parties. The +following terms apply to all files associated with the software unless +explicitly disclaimed in individual files. + +The authors hereby grant permission to use, copy, modify, distribute, +and license this software and its documentation for any purpose, provided +that existing copyright notices are retained in all copies and that this +notice is included verbatim in any distributions. No written agreement, +license, or royalty fee is required for any of the authorized uses. +Modifications to this software may be copyrighted by their authors +and need not follow the licensing terms described here, provided that +the new terms are clearly indicated on the first page of each file where +they apply. + +IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY +FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES +ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY +DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE +IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE +NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR +MODIFICATIONS. + +GOVERNMENT USE: If you are acquiring this software on behalf of the +U.S. government, the Government shall have only "Restricted Rights" +in the software and related documentation as defined in the Federal +Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2). If you +are acquiring the software on behalf of the Department of Defense, the +software shall be classified as "Commercial Computer Software" and the +Government shall have only "Restricted Rights" as defined in Clause +252.227-7013 (c) (1) of DFARs. Notwithstanding the foregoing, the +authors grant the U.S. Government and others acting in its behalf +permission to use and distribute the software in accordance with the +terms specified in this license. Index: generic/tkTreeCtrl.c =================================================================== RCS file: /cvsroot/tktreectrl/tktreectrl/generic/tkTreeCtrl.c,v retrieving revision 1.18 diff -u -p -u -p -r1.18 tkTreeCtrl.c --- generic/tkTreeCtrl.c 10 Feb 2004 07:40:57 -0000 1.18 +++ generic/tkTreeCtrl.c 24 Feb 2004 07:06:24 -0000 @@ -2734,8 +2734,7 @@ int ImageTintCmd(ClientData clientData, return TCL_OK; } -#ifndef WIN32 -#ifndef TARGET_OS_MAC +#if !defined(WIN32) && !defined(MAC_TCL) && !defined(MAC_OSX_TK) int LoupeCmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { @@ -2873,8 +2872,7 @@ int LoupeCmd(ClientData clientData, Tcl_ return TCL_OK; } -#endif /* not TARGET_OS_MAC */ -#endif /* not WIN32 */ +#endif /* not WIN32 && not MAC_TCL && not MAC_OSX_TK */ DLLEXPORT int Treectrl_Init(Tcl_Interp *interp) { @@ -2897,11 +2895,9 @@ DLLEXPORT int Treectrl_Init(Tcl_Interp * /* Hack for colorizing a image (like Win98 explorer) */ Tcl_CreateObjCommand(interp, "imagetint", ImageTintCmd, NULL, NULL); -#ifndef WIN32 -#ifndef TARGET_OS_MAC +#if !defined(WIN32) && !defined(MAC_TCL) && !defined(MAC_OSX_TK) /* Screen magnifier to check those dotted lines */ Tcl_CreateObjCommand(interp, "loupe", LoupeCmd, NULL, NULL); -#endif #endif Tcl_CreateObjCommand(interp, "treectrl", TreeObjCmd, NULL, NULL); return Tcl_PkgProvide(interp, "treectrl", "1.0"); Index: generic/tkTreeDisplay.c =================================================================== RCS file: /cvsroot/tktreectrl/tktreectrl/generic/tkTreeDisplay.c,v retrieving revision 1.9 diff -u -p -u -p -r1.9 tkTreeDisplay.c --- generic/tkTreeDisplay.c 5 Jan 2003 22:55:32 -0000 1.9 +++ generic/tkTreeDisplay.c 24 Feb 2004 07:06:24 -0000 @@ -2517,13 +2517,17 @@ void TreeColumnProxy_Draw(TreeCtrl *tree unsigned long gcMask; GC gc; +#if defined(MAC_TCL) || defined(MAC_OSX_TK) + gcValues.function = GXxor; +#else gcValues.function = GXinvert; +#endif gcValues.graphics_exposures = False; gcMask = GCFunction | GCGraphicsExposures; gc = Tk_GetGC(tree->tkwin, gcMask, &gcValues); - /* GXinvert doesn't work with XFillRectangle() on Win32 */ -#ifdef WIN32 + /* GXinvert doesn't work with XFillRectangle() on Win32 & Mac*/ +#if defined(WIN32) || defined(MAC_TCL) || defined(MAC_OSX_TK) XDrawLine(tree->display, Tk_WindowId(tree->tkwin), gc, tree->columnProxy.sx, tree->inset, Index: generic/tkTreeItem.c =================================================================== RCS file: /cvsroot/tktreectrl/tktreectrl/generic/tkTreeItem.c,v retrieving revision 1.16 diff -u -p -u -p -r1.16 tkTreeItem.c --- generic/tkTreeItem.c 29 Mar 2003 00:28:33 -0000 1.16 +++ generic/tkTreeItem.c 24 Feb 2004 07:06:24 -0000 @@ -1641,6 +1641,12 @@ void TreeItem_DrawButton(TreeCtrl *tree, Pixmap bitmap = None; int imgW, imgH; int buttonLeft, buttonTop, w1; + int offset = 0; + +#if defined(MAC_TCL) || defined(MAC_OSX_TK) + /* QuickDraw on Mac is offset by one pixel in both x and y. */ + offset = 1; +#endif if (!self->hasButton) return; @@ -1716,8 +1722,8 @@ void TreeItem_DrawButton(TreeCtrl *tree, XDrawRectangle(tree->display, drawable, tree->buttonGC, buttonLeft + w1, buttonTop + w1, - tree->buttonSize - tree->buttonThickness, - tree->buttonSize - tree->buttonThickness); + tree->buttonSize - tree->buttonThickness + offset, + tree->buttonSize - tree->buttonThickness + offset); /* Horizontal '-' */ XFillRectangle(tree->display, drawable, tree->buttonGC, Index: generic/tkTreeUtils.c =================================================================== RCS file: /cvsroot/tktreectrl/tktreectrl/generic/tkTreeUtils.c,v retrieving revision 1.6 diff -u -p -u -p -r1.6 tkTreeUtils.c --- generic/tkTreeUtils.c 5 Jan 2003 22:59:12 -0000 1.6 +++ generic/tkTreeUtils.c 24 Feb 2004 07:06:24 -0000 @@ -260,7 +260,11 @@ void DrawActiveOutline(TreeCtrl *tree, D sw = !(wx & 1) == !((wy + height - 1) & 1); se = !((wx + width - 1) & 1) == !((wy + height - 1) & 1); +#if defined(MAC_TCL) || defined(MAC_OSX_TK) + gcValues.function = GXxor; +#else gcValues.function = GXinvert; +#endif gcMask = GCFunction; gc = Tk_GetGC(tree->tkwin, gcMask, &gcValues); @@ -349,7 +353,11 @@ void DotRect_Setup(TreeCtrl *tree, Drawa gcValues.line_width = 1; gcValues.dash_offset = 0; gcValues.dashes = 1; +#if defined(MAC_TCL) || defined(MAC_OSX_TK) + gcValues.function = GXxor; +#else gcValues.function = GXinvert; +#endif mask = GCLineWidth | GCLineStyle | GCDashList | GCDashOffset | GCFunction; dotState->gc = Tk_GetGC(tree->tkwin, mask, &gcValues); @@ -442,8 +450,6 @@ void Tk_FillRegion(Display *display, Dra FillRgn(dc, (HRGN) rgn, brush); DeleteObject(brush); TkWinReleaseDrawableDC(drawable, dc, &dcState); -#elif defined(TARGET_OS_MAC) -#error "Mac developer: implement Tk_FillRegion please!" #else XRectangle box; Index: tests/all.tcl =================================================================== RCS file: /cvsroot/tktreectrl/tktreectrl/tests/all.tcl,v retrieving revision 1.2 diff -u -p -u -p -r1.2 all.tcl --- tests/all.tcl 30 Dec 2002 21:43:48 -0000 1.2 +++ tests/all.tcl 24 Feb 2004 07:06:24 -0000 @@ -59,7 +59,8 @@ proc package_require {treectrl} { load treectrl.shlb } macosx { - load build/treectrl.dylib + #load build/treectrl.dylib + package require treectrl } unix { load [glob libtreectrl*[info sharedlibextension]]