diff -r -c -P -x CVS ../tk8.0.5/README.TkStep ./README.TkStep *** ../tk8.0.5/README.TkStep Thu Jan 1 09:00:00 1970 --- ./README.TkStep Tue Aug 17 18:54:35 1999 *************** *** 0 **** --- 1,45 ---- + This is the first complete version of TkStep 8.0 + ------------------------------------------------ + + All functional modifications Copyright (c) 1997 by Oliver Graf + + features [configure option]: + - transparent XPM [--enable-xpm] + - transparent TIFF (only full transparency) [--enable-tiff] + - OffiX Drag'n'Drop [--enable-dnd] + - rounded rectangle canvas items [--enable-step] + + included demos: + - droptest + - dragtest (watch stdout) + - imagedrop + + + + For occasional updates to TkSTEP 8.0 you can visit the following locations: + + http://rhein-zeitung.de/~ograf/wm/TkStep.html + http://touchwood.ee.uts.edu.au/TkSTEP/TkSTEP.html + + + NO WARRANTY + + BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY + FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN + OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES + PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED + OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS + TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE + PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, + REPAIR OR CORRECTION. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING + WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR + REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, + INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING + OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED + TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY + YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER + PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE + POSSIBILITY OF SUCH DAMAGES. diff -r -c -P -x CVS ../tk8.0.5/generic/tk.h ./generic/tk.h *** ../tk8.0.5/generic/tk.h Tue Aug 17 18:48:55 1999 --- ./generic/tk.h Tue Aug 17 18:54:35 1999 *************** *** 14,19 **** --- 14,24 ---- * * RCS: @(#) $Id: tk.h,v 1.19 1999/02/04 21:03:27 stanton Exp $ */ + /* + * TkSTEP modifications Copyright (c) 1996 Alfredo K. Kojima + * - surgery performed and implanted into Tk8.0 by Steve Murray + * DND modifications for DND 1.0 and tk8.0 Copyright (c) 1997 Oliver Graf + */ #ifndef _TK #define _TK *************** *** 264,269 **** --- 269,275 ---- */ #define TK_CONFIG_ARGV_ONLY 1 + #define TK_CONFIG_CHECK_MY_FLAG 0x80 /* * Possible flag values for Tk_ConfigInfo structures. Any bits at *************** *** 277,282 **** --- 283,289 ---- #define TK_CONFIG_NULL_OK 4 #define TK_CONFIG_DONT_SET_DEFAULT 8 #define TK_CONFIG_OPTION_SPECIFIED 0x10 + #define TK_CONFIG_DONT_CHANGE_DEFAULT 0x80 #define TK_CONFIG_USER_BIT 0x100 /* *************** *** 316,321 **** --- 323,329 ---- #define TK_3D_FLAT_GC 1 #define TK_3D_LIGHT_GC 2 #define TK_3D_DARK_GC 3 + #define TK_3D_DARK2_GC 4 /* * Special EnterNotify/LeaveNotify "mode" for use in events *************** *** 414,419 **** --- 422,447 ---- #define TK_SCROLL_UNITS 3 #define TK_SCROLL_ERROR 4 + #ifdef ENABLE_DND + + /* + * Drag and drop data types + */ + #define DndNotDnd -1 + #define DndUnknown 0 + #define DndRawData 1 + #define DndFile 2 + #define DndFiles 3 + #define DndText 4 + #define DndDir 5 + #define DndLink 6 + #define DndExe 7 + #define DndURL 8 + #define DndMIME 9 + #define DndEND 10 + + #endif + /* *--------------------------------------------------------------------------- * *************** *** 1640,1645 **** --- 1668,1689 ---- Tcl_Interp *interp, int argc, char **argv)); EXTERN int Tk_DestroyCmd _ANSI_ARGS_((ClientData clientData, Tcl_Interp *interp, int argc, char **argv)); + #ifdef ENABLE_DND + EXTERN int Tk_DndHandleDragCmd _ANSI_ARGS_((ClientData clientData, + Tcl_Interp *interp, int argc, char **argv)); + EXTERN int Tk_DndSetDataCmd _ANSI_ARGS_((ClientData clientData, + Tcl_Interp *interp, int argc, char **argv)); + EXTERN char * Tk_DndGetData _ANSI_ARGS_((Tk_Window tkwin, + XEvent *eventPtr)); + EXTERN unsigned long Tk_DndGetDataSize _ANSI_ARGS_((Tk_Window tkwin, + XEvent *eventPtr)); + EXTERN int Tk_DndGetDataType _ANSI_ARGS_((Tk_Window tkwin, + XEvent *eventPtr)); + EXTERN int Tk_DndGetButtonInfo _ANSI_ARGS_((Tk_Window tkwin, + XEvent *eventPtr)); + EXTERN int Tk_DndGetRootPos _ANSI_ARGS_((Tk_Window tkwin, + XEvent *eventPtr, int *x, int *y)); + #endif EXTERN int Tk_EntryCmd _ANSI_ARGS_((ClientData clientData, Tcl_Interp *interp, int argc, char **argv)); EXTERN int Tk_EventCmd _ANSI_ARGS_((ClientData clientData, diff -r -c -P -x CVS ../tk8.0.5/generic/tk3d.c ./generic/tk3d.c *** ../tk8.0.5/generic/tk3d.c Tue Sep 15 03:23:02 1998 --- ./generic/tk3d.c Tue Aug 17 18:54:35 1999 *************** *** 12,17 **** --- 12,22 ---- * * RCS: @(#) $Id: tk3d.c,v 1.2 1998/09/14 18:23:02 stanton Exp $ */ + /* + * TkSTEP modifications Copyright (c) Alfredo K. Kojima + * - surgery performed and implanted into Tk8.0 by Steve Murray + */ + #include *************** *** 120,125 **** --- 125,131 ---- borderPtr->shadow = None; borderPtr->bgGC = None; borderPtr->darkGC = None; + borderPtr->dark2GC = None; borderPtr->lightGC = None; borderPtr->hashPtr = hashPtr; Tcl_SetHashValue(hashPtr, borderPtr); *************** *** 267,274 **** return borderPtr->bgGC; } else if (which == TK_3D_LIGHT_GC) { return borderPtr->lightGC; ! } else if (which == TK_3D_DARK_GC){ return borderPtr->darkGC; } panic("bogus \"which\" value in Tk_3DBorderGC"); --- 273,282 ---- return borderPtr->bgGC; } else if (which == TK_3D_LIGHT_GC) { return borderPtr->lightGC; ! } else if (which == TK_3D_DARK_GC) { return borderPtr->darkGC; + } else if (which == TK_3D_DARK2_GC) { + return borderPtr->dark2GC; } panic("bogus \"which\" value in Tk_3DBorderGC"); *************** *** 330,335 **** --- 338,346 ---- if (borderPtr->lightGC != None) { Tk_FreeGC(display, borderPtr->lightGC); } + if (borderPtr->dark2GC != None) { + Tk_FreeGC(display, borderPtr->dark2GC); + } Tcl_DeleteHashEntry(borderPtr->hashPtr); ckfree((char *) borderPtr); } *************** *** 645,651 **** if (lightOnLeft ^ (leftRelief == TK_RELIEF_RAISED)) { gc = borderPtr->lightGC; } else { ! gc = borderPtr->darkGC; } XFillPolygon(display, drawable, gc, poly, 4, Convex, CoordModeOrigin); --- 656,662 ---- if (lightOnLeft ^ (leftRelief == TK_RELIEF_RAISED)) { gc = borderPtr->lightGC; } else { ! gc = borderPtr->dark2GC; } XFillPolygon(display, drawable, gc, poly, 4, Convex, CoordModeOrigin); diff -r -c -P -x CVS ../tk8.0.5/generic/tk3d.h ./generic/tk3d.h *** ../tk8.0.5/generic/tk3d.h Tue Sep 15 03:23:03 1998 --- ./generic/tk3d.h Tue Aug 17 18:54:35 1999 *************** *** 11,16 **** --- 11,21 ---- * * RCS: @(#) $Id: tk3d.h,v 1.4 1998/09/14 18:23:03 stanton Exp $ */ + /* + * TkSTEP modifications Copyright (c) Alfredo K. Kojima + * - surgery performed and implanted into Tk8.0 by Steve Murray + */ + #ifndef _TK3D #define _TK3D *************** *** 61,66 **** --- 66,73 ---- GC lightGC; /* Used to draw lighter parts of * the border. None means the shadow colors * haven't been allocated yet. */ + GC dark2GC; /* Used to draw the even darker parts of the + * shadows (black). */ Tcl_HashEntry *hashPtr; /* Entry in borderTable (needed in * order to delete structure). */ } TkBorder; diff -r -c -P -x CVS ../tk8.0.5/generic/tkBind.c ./generic/tkBind.c *** ../tk8.0.5/generic/tkBind.c Tue Aug 17 18:48:55 1999 --- ./generic/tkBind.c Tue Aug 17 18:54:35 1999 *************** *** 8,13 **** --- 8,16 ---- * Copyright (c) 1994-1996 Sun Microsystems, Inc. * Copyright (c) 1998 by Scriptics Corporation. * + * Modifications for tk8.0 Copyright (c) 1997 Oliver Graf + * Drag and Drop portions Copyright (c) 1996 Alfredo K. Kojima + * * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * *************** *** 292,297 **** --- 295,301 ---- * be allocated to hold numOwned. */ } PhysicalsOwned; + /* * One of the following structures exists for each interpreter. This * structure keeps track of the current display and screen in the *************** *** 391,397 **** typedef struct { char *name; /* Name of modifier. */ ! int mask; /* Button/modifier mask value, * such as Button1Mask. */ int flags; /* Various flags; see below for * definitions. */ } ModInfo; --- 395,402 ---- typedef struct { char *name; /* Name of modifier. */ ! int mask; /* Button/modifier mask value, ! * such as Button1Mask. */ int flags; /* Various flags; see below for * definitions. */ } ModInfo; *************** *** 504,509 **** --- 509,519 ---- {"Activate", ActivateNotify, ActivateMask}, {"Deactivate", DeactivateNotify, ActivateMask}, {"MouseWheel", MouseWheelEvent, MouseWheelMask}, + #ifdef ENABLE_DND + {"Drag", TK_DRAG_NOTIFY, + ButtonPressMask|PointerMotionMask|ButtonReleaseMask}, + {"Drop", ClientMessage, 0}, + #endif {(char *) NULL, 0, 0} }; static Tcl_HashTable eventTable; *************** *** 666,671 **** --- 676,682 ---- char **eventStringPtr, Pattern *patPtr, unsigned long *eventMaskPtr)); + /* * The following define is used as a short circuit for the callback * procedure to evaluate a TclBinding. The actual evaluation of the *************** *** 1171,1176 **** --- 1182,1188 ---- return TCL_OK; } + /* *-------------------------------------------------------------- * *************** *** 1391,1396 **** --- 1403,1411 ---- { BindingTable *bindPtr; TkDisplay *dispPtr; + #ifdef ENABLE_DND + TkMainInfo *mainPtr = ((TkWindow *) tkwin)->mainPtr; + #endif BindInfo *bindInfoPtr; TkDisplay *oldDispPtr; ScreenInfo *screenPtr; *************** *** 1413,1422 **** * application. */ ! if (winPtr->pathName == NULL) { return; } /* * Ignore the event completely if it is an Enter, Leave, FocusIn, * or FocusOut event with detail NotifyInferior. The reason for --- 1428,1468 ---- * application. */ ! if (winPtr->pathName == NULL ! #ifdef ENABLE_DND ! && eventPtr->type != ClientMessage ! #endif ! ) { return; } + #ifdef ENABLE_DND + if (eventPtr->type == EnterNotify) { + mainPtr->dndInfo.Target = eventPtr->xany.window; + } else if (eventPtr->type == LeaveNotify) { + mainPtr->dndInfo.Target = None; + } else if (eventPtr->type == ButtonPress) { + /* Set start drag flag */ + mainPtr->dndInfo.Dragging = 1; + mainPtr->dndInfo.StartEvent = *((XButtonEvent *)eventPtr); + } else if (eventPtr->type == MotionNotify) { + /* if drag started then check if user dragged */ + if (mainPtr->dndInfo.Dragging == 1) { + if(abs(mainPtr->dndInfo.StartEvent.x_root - eventPtr->xmotion.x_root) > + mainPtr->dndInfo.DragPrecision || + abs(mainPtr->dndInfo.StartEvent.y_root - eventPtr->xmotion.y_root) > + mainPtr->dndInfo.DragPrecision) { + mainPtr->dndInfo.Dragging = 2; + mainPtr->dndInfo.BState = eventPtr->xbutton.state; + /* event is a drag */ + eventPtr->type = TK_DRAG_NOTIFY; + } + } + } else if (eventPtr->type == ButtonRelease) { + /* drag finished */ + mainPtr->dndInfo.Dragging = 0; + } + #endif /* * Ignore the event completely if it is an Enter, Leave, FocusIn, * or FocusOut event with detail NotifyInferior. The reason for *************** *** 1516,1521 **** --- 1562,1588 ---- } else if (flags & VIRTUAL) { detail.name = ((XVirtualEvent *) ringPtr)->name; } + #ifdef ENABLE_DND + else if (ringPtr->type == ClientMessage) { + TkWindow *tkwin = (TkWindow *)Tk_MainWindow(bindPtr->interp); + + if (ringPtr->xclient.message_type == + tkwin->mainPtr->dndInfo.DndProtocol) { + /* dispatch event to the target window */ + tkwin->mainPtr->dndInfo.RootFlag = 0; + if (tkwin->mainPtr->dndInfo.RootFlag) { + /* exec root event handler */ + } + if (ringPtr->xclient.window == tkwin->mainPtr->dndInfo.Target) { + detail.button = TK_DROP_NOTIFY; + } else { + ringPtr->xclient.window = tkwin->mainPtr->dndInfo.Target; + XSendEvent(tkwin->display, tkwin->mainPtr->dndInfo.Target, + True, NoEventMask, ringPtr); + } + } + } + #endif bindPtr->detailRing[bindPtr->curEvent] = detail; /* *************** *** 1923,1931 **** * Iterate over all the patterns in a sequence to be * sure that they all match. */ - eventPtr = &bindPtr->eventRing[bindPtr->curEvent]; detailPtr = &bindPtr->detailRing[bindPtr->curEvent]; window = eventPtr->xany.window; patPtr = psPtr->pats; patCount = psPtr->numPats; --- 1990,1998 ---- * Iterate over all the patterns in a sequence to be * sure that they all match. */ eventPtr = &bindPtr->eventRing[bindPtr->curEvent]; detailPtr = &bindPtr->detailRing[bindPtr->curEvent]; + window = eventPtr->xany.window; patPtr = psPtr->pats; patCount = psPtr->numPats; *************** *** 1953,1958 **** --- 2020,2026 ---- * generate conflicts with button events. */ + if ((patPtr->eventType == KeyPress) || (patPtr->eventType == KeyRelease)) { if ((eventPtr->xany.type == ButtonPress) *************** *** 2286,2291 **** --- 2354,2384 ---- string = numStorage; goto doString; case 'b': + #ifdef ENABLE_DND + if (eventPtr->type == ClientMessage) { + TkWindow *tkwin; + + tkwin = (TkWindow *)Tk_IdToWindow(eventPtr->xany.display, + eventPtr->xany.window); + + if (eventPtr->xclient.message_type == + tkwin->mainPtr->dndInfo.DndProtocol) { + number = Tk_DndGetButtonInfo((Tk_Window)tkwin, eventPtr); + if (number&Button1Mask) + number=Button1; + else if (number&Button2Mask) + number=Button2; + else if (number&Button3Mask) + number=Button3; + else if (number&Button4Mask) + number=Button4; + else if (number&Button5Mask) + number=Button5; + else + number=0; + } + } else + #endif /* ENABLE_DND */ number = eventPtr->xbutton.button; goto doNumber; case 'c': *************** *** 2339,2344 **** --- 2432,2450 ---- string = TkFindStateString(circPlace, eventPtr->xcirculate.place); goto doString; case 's': + #ifdef ENABLE_DND + if (eventPtr->type == ClientMessage) { + TkWindow *tkwin; + + tkwin = (TkWindow *)Tk_IdToWindow(eventPtr->xany.display, + eventPtr->xany.window); + + if (eventPtr->xclient.message_type == + tkwin->mainPtr->dndInfo.DndProtocol) { + number = Tk_DndGetButtonInfo((Tk_Window)tkwin, eventPtr); + } + } else + #endif /* ENABLE_DND */ if (flags & (KEY_BUTTON_MOTION_VIRTUAL)) { number = eventPtr->xkey.state; } else if (flags & CROSSING) { *************** *** 2369,2374 **** --- 2475,2495 ---- } goto doNumber; case 'x': + #ifdef ENABLE_DND + if (eventPtr->type==ClientMessage) { + Tk_Window tkwin; + int x, y /*, dx, dy*/ ; /* removes compiler warning */ + tkwin = Tk_IdToWindow(eventPtr->xany.display, + eventPtr->xany.window); + if (eventPtr->xclient.message_type == + ((TkWindow *)tkwin)->mainPtr->dndInfo.DndProtocol) { + int dx, dy; + Tk_GetRootCoords(tkwin, &x, &y); + Tk_DndGetRootPos(tkwin, eventPtr, &dx, &dy); + number=dx-x; + } + } else + #endif /* ENABLE_DND */ if (flags & (KEY_BUTTON_MOTION_VIRTUAL)) { number = eventPtr->xkey.x; } else if (flags & CROSSING) { *************** *** 2382,2387 **** --- 2503,2523 ---- } goto doNumber; case 'y': + #ifdef ENABLE_DND + if (eventPtr->type==ClientMessage) { + Tk_Window tkwin; + int x, y /*, dx, dy */ ; /* removes compiler warning */ + tkwin = Tk_IdToWindow(eventPtr->xany.display, + eventPtr->xany.window); + if (eventPtr->xclient.message_type == + ((TkWindow *)tkwin)->mainPtr->dndInfo.DndProtocol) { + int dx, dy; + Tk_GetRootCoords(tkwin, &x, &y); + Tk_DndGetRootPos(tkwin, eventPtr, &dx, &dy); + number=dy-y; + } + } else + #endif /* ENABLE_DND */ if (flags & (KEY_BUTTON_MOTION_VIRTUAL)) { number = eventPtr->xkey.y; } else if (flags & EXPOSE) { *************** *** 2454,2469 **** --- 2590,2626 ---- case 'B': number = eventPtr->xcreatewindow.border_width; goto doNumber; + case 'D': + #ifdef ENABLE_DND + if (eventPtr->type == ClientMessage) { + Tk_Window tkwin; + + tkwin = Tk_IdToWindow(eventPtr->xany.display, + eventPtr->xany.window); + + if (eventPtr->xclient.message_type == + ((TkWindow *)tkwin)->mainPtr->dndInfo.DndProtocol) { + string = Tk_DndGetData(tkwin, eventPtr); + if (string == NULL) { + string = "??"; + } + } + goto doString; + } else { + #endif /* * This is used only by the MouseWheel event. */ number = eventPtr->xkey.keycode; goto doNumber; + } + case 'E': number = (int) eventPtr->xany.send_event; goto doNumber; + case 'K': if (flags & KEY) { char *name; *************** *** 2477,2482 **** --- 2634,2687 ---- case 'N': number = (int) keySym; goto doNumber; + #ifdef ENABLE_DND + case 'P': + if (eventPtr->type == ClientMessage) { + TkWindow *tkwin; + + tkwin = (TkWindow *)Tk_IdToWindow(eventPtr->xany.display, + eventPtr->xany.window); + + if (eventPtr->xclient.message_type == + tkwin->mainPtr->dndInfo.DndProtocol) + { + number=Tk_DndGetDataType((Tk_Window)tkwin, eventPtr); + switch (number) + { + case DndRawData: + string = "RawData"; + break; + case DndFile: + string = "File"; + break; + case DndFiles: + string = "Files"; + break; + case DndText: + string = "Text"; + break; + case DndDir: + string = "Dir"; + break; + case DndLink: + string = "Link"; + break; + case DndExe: + string = "Exe"; + break; + case DndURL: + string = "URL"; + break; + case DndMIME: + string = "MIME"; + break; + default: + goto doNumber; + } + } + } + goto doString; + #endif case 'R': TkpPrintWindowId(numStorage, eventPtr->xkey.root); string = numStorage; *************** *** 2510,2515 **** --- 2715,2729 ---- eventPtr->xany.window); if (tkwin != NULL) { Tk_GetVRootGeometry(tkwin, &x, &y, &width, &height); + #ifdef ENABLE_DND + if (eventPtr->type == ClientMessage && + eventPtr->xclient.message_type == + ((TkWindow *)tkwin)->mainPtr->dndInfo.DndProtocol) { + int dx, dy; + Tk_DndGetRootPos(tkwin, eventPtr, &dx, &dy); + number=dx-x; + } else + #endif /* ENABLE_DND */ number -= x; } goto doNumber; *************** *** 2524,2533 **** --- 2738,2770 ---- eventPtr->xany.window); if (tkwin != NULL) { Tk_GetVRootGeometry(tkwin, &x, &y, &width, &height); + #ifdef ENABLE_DND + if (eventPtr->type == ClientMessage && + eventPtr->xclient.message_type == + ((TkWindow *)tkwin)->mainPtr->dndInfo.DndProtocol) { + int dx, dy; + Tk_DndGetRootPos(tkwin, eventPtr, &dx, &dy); + number=dy-y; + } else + #endif /* ENABLE_DND */ number -= y; } goto doNumber; } + #ifdef ENABLE_DND + case 'Z': if (eventPtr->type == ClientMessage) { + TkWindow *tkwin; + + tkwin = (TkWindow *)Tk_IdToWindow(eventPtr->xany.display, + eventPtr->xany.window); + + if (eventPtr->xclient.message_type == + tkwin->mainPtr->dndInfo.DndProtocol) { + number = Tk_DndGetDataSize((Tk_Window)tkwin, eventPtr); + } + } + goto doNumber; + #endif default: numStorage[0] = before[1]; numStorage[1] = '\0'; *************** *** 4035,4040 **** --- 4272,4291 ---- patPtr->eventType = eiPtr->type; eventFlags = flagArray[eiPtr->type]; eventMask = eiPtr->eventMask; + #ifdef ENABLE_DND + if (patPtr->eventType == ClientMessage) { + if (strcmp(field, "Drop") == 0) { + patPtr->detail.button = TK_DROP_NOTIFY; + /* + * A little kludge to make the maskless ClientMessage + * event not be taken as an error in Tk_CreateBinding + * I hope it doesn't break something else. + */ + eventMask |= ButtonReleaseMask; + eventFlags |= ButtonReleaseMask; + } + } + #endif while ((*p == '-') || isspace(UCHAR(*p))) { p++; } diff -r -c -P -x CVS ../tk8.0.5/generic/tkButton.c ./generic/tkButton.c *** ../tk8.0.5/generic/tkButton.c Tue Aug 17 18:48:55 1999 --- ./generic/tkButton.c Tue Aug 17 18:54:35 1999 *************** *** 14,19 **** --- 14,23 ---- * * RCS: @(#) $Id: tkButton.c,v 1.2 1998/09/14 18:23:04 stanton Exp $ */ + /* + * TkSTEP modifications Copyright (c) Alfredo K. Kojima + * - surgery performed and implanted into Tk8.0 by Steve Murray + */ #include "tkButton.h" #include "default.h" *************** *** 119,124 **** --- 123,133 ---- {TK_CONFIG_BOOLEAN, "-indicatoron", "indicatorOn", "IndicatorOn", DEF_BUTTON_INDICATOR, Tk_Offset(TkButton, indicatorOn), CHECK_BUTTON_MASK|RADIO_BUTTON_MASK}, + #ifdef ENABLE_STEP + {TK_CONFIG_BOOLEAN, "-indicatoron", "indicatorOn", "IndicatorOn", + DEF_BUTTON_RTRNINDICATOR, Tk_Offset(TkButton, indicatorOn), + BUTTON_MASK}, + #endif {TK_CONFIG_JUSTIFY, "-justify", "justify", "Justify", DEF_BUTTON_JUSTIFY, Tk_Offset(TkButton, justify), ALL_MASK}, {TK_CONFIG_STRING, "-offvalue", "offValue", "Value", *************** *** 739,748 **** return TCL_ERROR; } if (butPtr->highlightWidth < 0) { butPtr->highlightWidth = 0; } - if (butPtr->padX < 0) { butPtr->padX = 0; } --- 748,785 ---- return TCL_ERROR; } + #ifdef ENABLE_STEP + /* If a push-button is made "-default active", then put a return arrow + * on it - this seems to supercede the "-indicatoron 1" configuration + * option from previous versions. To provide compatability (I hope), + * "-indicatoron 1" has been retained, but internally mapped to + * "-default active", "-indicatoron 0" has been mapped to "-default + * normal", and in addition, "-default disabled" has been permitted to + * appear as "-default normal". */ + + if (butPtr->type == TYPE_BUTTON) { + + if (!butPtr->indicatorOn) { + butPtr->flags &= ~INDICATORON; + } else { + butPtr->flags |= INDICATORON; + goto nextoption; /* I HATED doing that, but it's late now ! */ + } + + if (butPtr->defaultState != tkActiveUid) { + butPtr->flags &= ~INDICATORON; + } else { + butPtr->flags |= INDICATORON; + } + } + + nextoption: + + #endif + if (butPtr->highlightWidth < 0) { butPtr->highlightWidth = 0; } if (butPtr->padX < 0) { butPtr->padX = 0; } diff -r -c -P -x CVS ../tk8.0.5/generic/tkButton.h ./generic/tkButton.h *** ../tk8.0.5/generic/tkButton.h Tue Aug 17 18:48:55 1999 --- ./generic/tkButton.h Tue Aug 17 18:54:35 1999 *************** *** 11,16 **** --- 11,20 ---- * * RCS: @(#) $Id: tkButton.h,v 1.4 1998/09/14 18:23:04 stanton Exp $ */ + /* + * TkSTEP modifications Copyright (c) Alfredo K. Kojima + * - surgery performed and implanted into Tk8.0 by Steve Murray + */ #ifndef _TKBUTTON #define _TKBUTTON *************** *** 213,218 **** --- 217,223 ---- #define REDRAW_PENDING 1 #define SELECTED 2 #define GOT_FOCUS 4 + #define INDICATORON 8 /* * Mask values used to selectively enable entries in the *************** *** 225,230 **** --- 230,243 ---- #define RADIO_BUTTON_MASK TK_CONFIG_USER_BIT << 3 #define ALL_MASK (LABEL_MASK | BUTTON_MASK \ | CHECK_BUTTON_MASK | RADIO_BUTTON_MASK) + + #define CHECK_WIDTH 10 + #define CHECK_HEIGHT 10 + + #ifdef ENABLE_STEP + #define RETURN_WIDTH 15 + #define RETURN_HEIGHT 10 + #endif /* * Declaration of variables shared between the files in the button module. diff -r -c -P -x CVS ../tk8.0.5/generic/tkConfig.c ./generic/tkConfig.c *** ../tk8.0.5/generic/tkConfig.c Tue Aug 17 18:48:55 1999 --- ./generic/tkConfig.c Tue Aug 17 18:54:35 1999 *************** *** 137,142 **** --- 137,148 ---- "\" missing", (char *) NULL); return TCL_ERROR; } + + if ((flags & TK_CONFIG_CHECK_MY_FLAG) && + (specPtr->specFlags & TK_CONFIG_DONT_CHANGE_DEFAULT)) { + continue; + } + if (DoConfig(interp, tkwin, specPtr, argv[1], 0, widgRec) != TCL_OK) { char msg[100]; *************** *** 167,173 **** continue; } value = NULL; ! if (specPtr->dbName != NULL) { value = Tk_GetOption(tkwin, specPtr->dbName, specPtr->dbClass); } if (value != NULL) { --- 173,180 ---- continue; } value = NULL; ! if ((specPtr->dbName != NULL) && !((flags & TK_CONFIG_CHECK_MY_FLAG) ! && (specPtr->specFlags & TK_CONFIG_DONT_CHANGE_DEFAULT))) { value = Tk_GetOption(tkwin, specPtr->dbName, specPtr->dbClass); } if (value != NULL) { diff -r -c -P -x CVS ../tk8.0.5/generic/tkEntry.c ./generic/tkEntry.c *** ../tk8.0.5/generic/tkEntry.c Tue Aug 17 18:48:55 1999 --- ./generic/tkEntry.c Tue Aug 17 23:10:41 1999 *************** *** 13,18 **** --- 13,24 ---- * * RCS: @(#) $Id: tkEntry.c,v 1.11 1999/03/11 17:38:00 m-hirano Exp $ */ + /* + * TkSTEP modifications Copyright (c) Alfredo K. Kojima + * - further modifications, surgery performed and implanted + * into Tk8.0 by Steve Murray + */ + #ifdef KANJI #define TK_KANJI_OK *************** *** 77,83 **** */ Tk_3DBorder normalBorder; /* Used for drawing border around whole ! * window, plus used for background. */ int borderWidth; /* Width of 3-D border around window. */ Tk_Cursor cursor; /* Current cursor for window, or None. */ int exportSelection; /* Non-zero means tie internal entry selection --- 83,89 ---- */ Tk_3DBorder normalBorder; /* Used for drawing border around whole ! * window, no more used for background. */ int borderWidth; /* Width of 3-D border around window. */ Tk_Cursor cursor; /* Current cursor for window, or None. */ int exportSelection; /* Non-zero means tie internal entry selection *************** *** 197,202 **** --- 203,221 ---- #define XPAD 1 #define YPAD 1 + #define MAX_INTENSITY 65535 + + /* + * If you want to make Tk ignore attribute settings that may be violating + * NeXTSTEP (tm) styles, leave DISABLE_FORCE_STEP undef'ed, otherwise define + * it somewhere. + */ + #ifndef DISABLE_FORCE_STEP + #define DISABLE_CHANGE TK_CONFIG_DONT_CHANGE_DEFAULT + #else + #define DISABLE_CHANGE 0 + #endif + /* * Information used for argv parsing. */ *************** *** 204,219 **** static Tk_ConfigSpec configSpecs[] = { {TK_CONFIG_BORDER, "-background", "background", "Background", DEF_ENTRY_BG_COLOR, Tk_Offset(Entry, normalBorder), ! TK_CONFIG_COLOR_ONLY}, {TK_CONFIG_BORDER, "-background", "background", "Background", DEF_ENTRY_BG_MONO, Tk_Offset(Entry, normalBorder), ! TK_CONFIG_MONO_ONLY}, {TK_CONFIG_SYNONYM, "-bd", "borderWidth", (char *) NULL, (char *) NULL, 0, 0}, {TK_CONFIG_SYNONYM, "-bg", "background", (char *) NULL, (char *) NULL, 0, 0}, {TK_CONFIG_PIXELS, "-borderwidth", "borderWidth", "BorderWidth", ! DEF_ENTRY_BORDER_WIDTH, Tk_Offset(Entry, borderWidth), 0}, {TK_CONFIG_ACTIVE_CURSOR, "-cursor", "cursor", "Cursor", DEF_ENTRY_CURSOR, Tk_Offset(Entry, cursor), TK_CONFIG_NULL_OK}, {TK_CONFIG_BOOLEAN, "-exportselection", "exportSelection", --- 223,238 ---- static Tk_ConfigSpec configSpecs[] = { {TK_CONFIG_BORDER, "-background", "background", "Background", DEF_ENTRY_BG_COLOR, Tk_Offset(Entry, normalBorder), ! TK_CONFIG_COLOR_ONLY | DISABLE_CHANGE}, {TK_CONFIG_BORDER, "-background", "background", "Background", DEF_ENTRY_BG_MONO, Tk_Offset(Entry, normalBorder), ! TK_CONFIG_MONO_ONLY | DISABLE_CHANGE}, {TK_CONFIG_SYNONYM, "-bd", "borderWidth", (char *) NULL, (char *) NULL, 0, 0}, {TK_CONFIG_SYNONYM, "-bg", "background", (char *) NULL, (char *) NULL, 0, 0}, {TK_CONFIG_PIXELS, "-borderwidth", "borderWidth", "BorderWidth", ! DEF_ENTRY_BORDER_WIDTH, Tk_Offset(Entry, borderWidth), DISABLE_CHANGE}, {TK_CONFIG_ACTIVE_CURSOR, "-cursor", "cursor", "Cursor", DEF_ENTRY_CURSOR, Tk_Offset(Entry, cursor), TK_CONFIG_NULL_OK}, {TK_CONFIG_BOOLEAN, "-exportselection", "exportSelection", *************** *** 224,246 **** {TK_CONFIG_FONT, "-font", "font", "Font", DEF_ENTRY_FONT, Tk_Offset(Entry, tkfont), 0}, {TK_CONFIG_COLOR, "-foreground", "foreground", "Foreground", ! DEF_ENTRY_FG, Tk_Offset(Entry, fgColorPtr), 0}, {TK_CONFIG_COLOR, "-highlightbackground", "highlightBackground", "HighlightBackground", DEF_ENTRY_HIGHLIGHT_BG, ! Tk_Offset(Entry, highlightBgColorPtr), 0}, {TK_CONFIG_COLOR, "-highlightcolor", "highlightColor", "HighlightColor", ! DEF_ENTRY_HIGHLIGHT, Tk_Offset(Entry, highlightColorPtr), 0}, {TK_CONFIG_PIXELS, "-highlightthickness", "highlightThickness", "HighlightThickness", ! DEF_ENTRY_HIGHLIGHT_WIDTH, Tk_Offset(Entry, highlightWidth), 0}, {TK_CONFIG_BORDER, "-insertbackground", "insertBackground", "Foreground", ! DEF_ENTRY_INSERT_BG, Tk_Offset(Entry, insertBorder), 0}, {TK_CONFIG_PIXELS, "-insertborderwidth", "insertBorderWidth", "BorderWidth", DEF_ENTRY_INSERT_BD_COLOR, Tk_Offset(Entry, insertBorderWidth), ! TK_CONFIG_COLOR_ONLY}, {TK_CONFIG_PIXELS, "-insertborderwidth", "insertBorderWidth", "BorderWidth", DEF_ENTRY_INSERT_BD_MONO, Tk_Offset(Entry, insertBorderWidth), ! TK_CONFIG_MONO_ONLY}, {TK_CONFIG_INT, "-insertofftime", "insertOffTime", "OffTime", DEF_ENTRY_INSERT_OFF_TIME, Tk_Offset(Entry, insertOffTime), 0}, {TK_CONFIG_INT, "-insertontime", "insertOnTime", "OnTime", --- 243,268 ---- {TK_CONFIG_FONT, "-font", "font", "Font", DEF_ENTRY_FONT, Tk_Offset(Entry, tkfont), 0}, {TK_CONFIG_COLOR, "-foreground", "foreground", "Foreground", ! DEF_ENTRY_FG, Tk_Offset(Entry, fgColorPtr), DISABLE_CHANGE}, {TK_CONFIG_COLOR, "-highlightbackground", "highlightBackground", "HighlightBackground", DEF_ENTRY_HIGHLIGHT_BG, ! Tk_Offset(Entry, highlightBgColorPtr), DISABLE_CHANGE}, {TK_CONFIG_COLOR, "-highlightcolor", "highlightColor", "HighlightColor", ! DEF_ENTRY_HIGHLIGHT, Tk_Offset(Entry, highlightColorPtr), ! DISABLE_CHANGE}, {TK_CONFIG_PIXELS, "-highlightthickness", "highlightThickness", "HighlightThickness", ! DEF_ENTRY_HIGHLIGHT_WIDTH, Tk_Offset(Entry, highlightWidth), ! DISABLE_CHANGE}, {TK_CONFIG_BORDER, "-insertbackground", "insertBackground", "Foreground", ! DEF_ENTRY_INSERT_BG, Tk_Offset(Entry, insertBorder), ! DISABLE_CHANGE}, {TK_CONFIG_PIXELS, "-insertborderwidth", "insertBorderWidth", "BorderWidth", DEF_ENTRY_INSERT_BD_COLOR, Tk_Offset(Entry, insertBorderWidth), ! TK_CONFIG_COLOR_ONLY | DISABLE_CHANGE}, {TK_CONFIG_PIXELS, "-insertborderwidth", "insertBorderWidth", "BorderWidth", DEF_ENTRY_INSERT_BD_MONO, Tk_Offset(Entry, insertBorderWidth), ! TK_CONFIG_MONO_ONLY | DISABLE_CHANGE}, {TK_CONFIG_INT, "-insertofftime", "insertOffTime", "OffTime", DEF_ENTRY_INSERT_OFF_TIME, Tk_Offset(Entry, insertOffTime), 0}, {TK_CONFIG_INT, "-insertontime", "insertOnTime", "OnTime", *************** *** 250,274 **** {TK_CONFIG_JUSTIFY, "-justify", "justify", "Justify", DEF_ENTRY_JUSTIFY, Tk_Offset(Entry, justify), 0}, {TK_CONFIG_RELIEF, "-relief", "relief", "Relief", ! DEF_ENTRY_RELIEF, Tk_Offset(Entry, relief), 0}, {TK_CONFIG_BORDER, "-selectbackground", "selectBackground", "Foreground", DEF_ENTRY_SELECT_COLOR, Tk_Offset(Entry, selBorder), ! TK_CONFIG_COLOR_ONLY}, {TK_CONFIG_BORDER, "-selectbackground", "selectBackground", "Foreground", DEF_ENTRY_SELECT_MONO, Tk_Offset(Entry, selBorder), ! TK_CONFIG_MONO_ONLY}, {TK_CONFIG_PIXELS, "-selectborderwidth", "selectBorderWidth", "BorderWidth", DEF_ENTRY_SELECT_BD_COLOR, Tk_Offset(Entry, selBorderWidth), ! TK_CONFIG_COLOR_ONLY}, {TK_CONFIG_PIXELS, "-selectborderwidth", "selectBorderWidth", "BorderWidth", DEF_ENTRY_SELECT_BD_MONO, Tk_Offset(Entry, selBorderWidth), ! TK_CONFIG_MONO_ONLY}, {TK_CONFIG_COLOR, "-selectforeground", "selectForeground", "Background", DEF_ENTRY_SELECT_FG_COLOR, Tk_Offset(Entry, selFgColorPtr), ! TK_CONFIG_COLOR_ONLY}, {TK_CONFIG_COLOR, "-selectforeground", "selectForeground", "Background", DEF_ENTRY_SELECT_FG_MONO, Tk_Offset(Entry, selFgColorPtr), ! TK_CONFIG_MONO_ONLY}, #ifdef TK_KANJI_OK {TK_CONFIG_WSTRING, "-show", "show", "Show", DEF_ENTRY_SHOW, Tk_Offset(Entry, showChar), TK_CONFIG_NULL_OK}, --- 272,296 ---- {TK_CONFIG_JUSTIFY, "-justify", "justify", "Justify", DEF_ENTRY_JUSTIFY, Tk_Offset(Entry, justify), 0}, {TK_CONFIG_RELIEF, "-relief", "relief", "Relief", ! DEF_ENTRY_RELIEF, Tk_Offset(Entry, relief), DISABLE_CHANGE}, {TK_CONFIG_BORDER, "-selectbackground", "selectBackground", "Foreground", DEF_ENTRY_SELECT_COLOR, Tk_Offset(Entry, selBorder), ! TK_CONFIG_COLOR_ONLY | DISABLE_CHANGE}, {TK_CONFIG_BORDER, "-selectbackground", "selectBackground", "Foreground", DEF_ENTRY_SELECT_MONO, Tk_Offset(Entry, selBorder), ! TK_CONFIG_MONO_ONLY | DISABLE_CHANGE}, {TK_CONFIG_PIXELS, "-selectborderwidth", "selectBorderWidth", "BorderWidth", DEF_ENTRY_SELECT_BD_COLOR, Tk_Offset(Entry, selBorderWidth), ! TK_CONFIG_COLOR_ONLY | DISABLE_CHANGE}, {TK_CONFIG_PIXELS, "-selectborderwidth", "selectBorderWidth", "BorderWidth", DEF_ENTRY_SELECT_BD_MONO, Tk_Offset(Entry, selBorderWidth), ! TK_CONFIG_MONO_ONLY | DISABLE_CHANGE}, {TK_CONFIG_COLOR, "-selectforeground", "selectForeground", "Background", DEF_ENTRY_SELECT_FG_COLOR, Tk_Offset(Entry, selFgColorPtr), ! TK_CONFIG_COLOR_ONLY | DISABLE_CHANGE}, {TK_CONFIG_COLOR, "-selectforeground", "selectForeground", "Background", DEF_ENTRY_SELECT_FG_MONO, Tk_Offset(Entry, selFgColorPtr), ! TK_CONFIG_MONO_ONLY | DISABLE_CHANGE}, #ifdef TK_KANJI_OK {TK_CONFIG_WSTRING, "-show", "show", "Show", DEF_ENTRY_SHOW, Tk_Offset(Entry, showChar), TK_CONFIG_NULL_OK}, *************** *** 431,437 **** entryPtr->selectAnchor = 0; entryPtr->scanMarkX = 0; entryPtr->scanMarkIndex = 0; - entryPtr->normalBorder = NULL; entryPtr->borderWidth = 0; entryPtr->cursor = None; --- 453,458 ---- *************** *** 960,966 **** int flags; /* Flags to pass to Tk_ConfigureWidget. */ { int oldExport; ! /* * Eliminate any existing trace on a variable monitored by the entry. */ --- 981,987 ---- int flags; /* Flags to pass to Tk_ConfigureWidget. */ { int oldExport; ! /* * Eliminate any existing trace on a variable monitored by the entry. */ *************** *** 972,977 **** --- 993,1001 ---- } oldExport = entryPtr->exportSelection; + if (Tk_StrictMotif(entryPtr->tkwin)) { + flags |= TK_CONFIG_CHECK_MY_FLAG; + } if (Tk_ConfigureWidget(interp, entryPtr->tkwin, configSpecs, argc, argv, (char *) entryPtr, flags) != TCL_OK) { return TCL_ERROR; *************** *** 1205,1212 **** --- 1229,1240 ---- * insertion cursor background. */ + /* This uses the 'normalBorder' parameter (set via -bg option) to set + * the colour of the trough of the entry widget - NOT the 3D border. + */ Tk_Fill3DRectangle(tkwin, pixmap, entryPtr->normalBorder, 0, 0, Tk_Width(tkwin), Tk_Height(tkwin), 0, TK_RELIEF_FLAT); + if (showSelection && (entryPtr->selectLast > entryPtr->leftIndex)) { if (entryPtr->selectFirst <= entryPtr->leftIndex) { selStartX = entryPtr->leftX; *************** *** 1296,1301 **** --- 1324,1342 ---- * any text that extends past the viewable part of the window. */ + /* For TkSTEP, we (probably) want the 3D border to always be the default + * grey colour i.e. NORMAL_BG in ../unix/tkUnixDefault.h + */ + #ifdef ENABLE_STEP + if (entryPtr->relief != TK_RELIEF_FLAT) { + Tk_Draw3DRectangle(tkwin, pixmap, + Tk_Get3DBorder(entryPtr->interp, tkwin, NORMAL_BG), + entryPtr->highlightWidth, entryPtr->highlightWidth, + Tk_Width(tkwin) - 2*entryPtr->highlightWidth, + Tk_Height(tkwin) - 2*entryPtr->highlightWidth, + entryPtr->borderWidth, entryPtr->relief); + } + #else if (entryPtr->relief != TK_RELIEF_FLAT) { Tk_Draw3DRectangle(tkwin, pixmap, entryPtr->normalBorder, entryPtr->highlightWidth, entryPtr->highlightWidth, *************** *** 1303,1308 **** --- 1344,1351 ---- Tk_Height(tkwin) - 2*entryPtr->highlightWidth, entryPtr->borderWidth, entryPtr->relief); } + #endif + if (entryPtr->highlightWidth != 0) { GC gc; diff -r -c -P -x CVS ../tk8.0.5/generic/tkEvent.c ./generic/tkEvent.c *** ../tk8.0.5/generic/tkEvent.c Tue Aug 17 18:48:55 1999 --- ./generic/tkEvent.c Tue Aug 17 18:54:35 1999 *************** *** 8,13 **** --- 8,15 ---- * Copyright (c) 1994-1995 Sun Microsystems, Inc. * Copyright (c) 1998 by Scriptics Corporation. * + * Drag and Drop portions Copyright (c) 1996 Alfredo K. Kojima + * * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * *************** *** 476,481 **** --- 478,484 ---- return; } + /* * Events selected by StructureNotify require special handling. * They look the same as those selected by SubstructureNotify. *************** *** 530,551 **** * widget writers do not have to worry about protecting the * interpreter in their own code. */ ! interp = winPtr->mainPtr->interp; Tcl_Preserve((ClientData) interp); ! /* * Call focus-related code to look at FocusIn, FocusOut, Enter, * and Leave events; depending on its return value, ignore the * event. */ ! ! if ((mask & (FocusChangeMask|EnterWindowMask|LeaveWindowMask)) ! && !TkFocusFilterEvent(winPtr, eventPtr)) { ! Tcl_Release((ClientData) interp); ! return; } ! /* * Redirect KeyPress and KeyRelease events to the focus window, * or ignore them entirely if there is no focus window. We also --- 533,554 ---- * widget writers do not have to worry about protecting the * interpreter in their own code. */ ! interp = winPtr->mainPtr->interp; Tcl_Preserve((ClientData) interp); ! /* * Call focus-related code to look at FocusIn, FocusOut, Enter, * and Leave events; depending on its return value, ignore the * event. */ ! ! if (mask & (FocusChangeMask|EnterWindowMask|LeaveWindowMask) ! && !TkFocusFilterEvent(winPtr, eventPtr)) { ! Tcl_Release((ClientData) interp); ! return; } ! /* * Redirect KeyPress and KeyRelease events to the focus window, * or ignore them entirely if there is no focus window. We also *************** *** 645,661 **** ip.nextHandler = NULL; ip.nextPtr = pendingPtr; pendingPtr = &ip; if (mask == 0) { if ((eventPtr->type == SelectionClear) || (eventPtr->type == SelectionRequest) || (eventPtr->type == SelectionNotify)) { TkSelEventProc((Tk_Window) winPtr, eventPtr); ! } else if ((eventPtr->type == ClientMessage) ! && (eventPtr->xclient.message_type == ! Tk_InternAtom((Tk_Window) winPtr, "WM_PROTOCOLS"))) { ! TkWmProtocolEventProc(winPtr, eventPtr); } } else { for (handlerPtr = winPtr->handlerList; handlerPtr != NULL; ) { if ((handlerPtr->mask & mask) != 0) { ip.nextHandler = handlerPtr->nextPtr; --- 648,675 ---- ip.nextHandler = NULL; ip.nextPtr = pendingPtr; pendingPtr = &ip; + if (mask == 0) { if ((eventPtr->type == SelectionClear) || (eventPtr->type == SelectionRequest) || (eventPtr->type == SelectionNotify)) { TkSelEventProc((Tk_Window) winPtr, eventPtr); ! } else if (eventPtr->type == ClientMessage) { ! if (eventPtr->xclient.message_type == ! Tk_InternAtom((Tk_Window) winPtr, "WM_PROTOCOLS")) { ! TkWmProtocolEventProc(winPtr, eventPtr); ! } ! #ifdef ENABLE_DND ! else if (eventPtr->xclient.message_type == ! winPtr->mainPtr->dndInfo.DndProtocol) { ! goto normalEvent; ! } ! #endif } } else { + #ifdef ENABLE_DND + normalEvent: + #endif for (handlerPtr = winPtr->handlerList; handlerPtr != NULL; ) { if ((handlerPtr->mask & mask) != 0) { ip.nextHandler = handlerPtr->nextPtr; diff -r -c -P -x CVS ../tk8.0.5/generic/tkFrame.c ./generic/tkFrame.c *** ../tk8.0.5/generic/tkFrame.c Tue Sep 15 03:23:10 1998 --- ./generic/tkFrame.c Wed Aug 18 00:11:12 1999 *************** *** 14,19 **** --- 14,27 ---- * * RCS: @(#) $Id: tkFrame.c,v 1.2 1998/09/14 18:23:10 stanton Exp $ */ + /* + * TkSTEP modifications Copyright (c) Alfredo K. Kojima + * - surgery performed and implanted into Tk8.0 by Steve Murray + */ + + #ifdef KANJI + #define TK_KANJI_OK + #endif /* KANJI */ #include "default.h" #include "tkPort.h" *************** *** 82,87 **** --- 90,112 ---- * windows this is NULL. */ int flags; /* Various flags; see below for * definitions. */ + #ifdef ENABLE_STEP + Tk_Font tkfont; /* Information about text font, or NULL. */ + #ifdef TK_KANJI_OK + wchar *text; /* Optional text to display on frame. */ + #else + char *text; /* Optional text to display on frame. */ + #endif /* TK_KANJI_OK */ + Tk_Justify justify; /* Position of the text (left, center, right).*/ + XColor *normalFg; /* Foreground color in normal mode. */ + GC textGC; /* GC for drawing text. */ + GC backGC; /* GC for background. */ + int numChars; /* Number of characters in text. */ + Tk_FontMetrics fm; /* Collection of font dimensions. */ + int textWidth; /* String width in pixels. */ + int textY; /* vertical position of text relative to + * window's top. */ + #endif } Frame; /* *************** *** 148,153 **** --- 173,195 ---- {TK_CONFIG_STRING, "-screen", "screen", "Screen", DEF_TOPLEVEL_SCREEN, Tk_Offset(Frame, screenName), TOPLEVEL|TK_CONFIG_NULL_OK}, + #ifdef ENABLE_STEP + {TK_CONFIG_SYNONYM, "-fg", "foreground", (char *) NULL, + (char *) NULL, 0, FRAME}, + {TK_CONFIG_FONT, "-font", "font", "Font", + DEF_FRAME_FONT, Tk_Offset(Frame, tkfont),FRAME}, + {TK_CONFIG_COLOR, "-foreground", "foreground", "Foreground", + DEF_FRAME_FG, Tk_Offset(Frame, normalFg), FRAME}, + #ifdef TK_KANJI_OK + {TK_CONFIG_WSTRING, "-text", "text", "Text", + DEF_FRAME_TEXT, Tk_Offset(Frame, text), FRAME}, + #else + {TK_CONFIG_STRING, "-text", "text", "Text", + DEF_FRAME_TEXT, Tk_Offset(Frame, text), FRAME}, + #endif /* TK_KANJI_OK */ + {TK_CONFIG_JUSTIFY, "-justify", "justify", "Justify", + DEF_FRAME_JUSTIFY, Tk_Offset(Frame, justify), FRAME}, + #endif {TK_CONFIG_STRING, "-takefocus", "takeFocus", "TakeFocus", DEF_FRAME_TAKE_FOCUS, Tk_Offset(Frame, takeFocus), BOTH|TK_CONFIG_NULL_OK}, *************** *** 305,311 **** /* * Create the window, and deal with the special options -use, * -classname, -colormap, -screenname, and -visual. These options ! * must be handle before calling ConfigureFrame below, and they must * also be processed in a particular order, for the following * reasons: * 1. Must set the window's class before calling ConfigureFrame, --- 347,353 ---- /* * Create the window, and deal with the special options -use, * -classname, -colormap, -screenname, and -visual. These options ! * must be handled before calling ConfigureFrame below, and they must * also be processed in a particular order, for the following * reasons: * 1. Must set the window's class before calling ConfigureFrame, *************** *** 415,420 **** --- 457,471 ---- framePtr->useThis = NULL; framePtr->flags = 0; framePtr->menuName = NULL; + #ifdef ENABLE_STEP + framePtr->text = NULL; + framePtr->tkfont = NULL; + framePtr->justify = TK_JUSTIFY_CENTER; + framePtr->normalFg = NULL; + framePtr->textGC = None; + framePtr->backGC = None; + framePtr->numChars = 0; + #endif /* * Store backreference to frame widget in window structure. *************** *** 578,583 **** --- 629,640 ---- { register Frame *framePtr = (Frame *) memPtr; + #ifdef ENABLE_STEP + if (framePtr->textGC != None) { + Tk_FreeGC(framePtr->display, framePtr->textGC); + } + #endif + Tk_FreeOptions(configSpecs, (char *) framePtr, framePtr->display, framePtr->mask); if (framePtr->colormap != None) { *************** *** 616,621 **** --- 673,682 ---- char **argv; /* Arguments. */ int flags; /* Flags to pass to Tk_ConfigureWidget. */ { + #ifdef ENABLE_STEP + XGCValues gcValues; + GC newGC; + #endif char *oldMenuName; /* *************** *** 651,656 **** --- 712,740 ---- if (framePtr->highlightWidth < 0) { framePtr->highlightWidth = 0; } + #ifdef ENABLE_STEP + if (framePtr->mask & FRAME) { + gcValues.font = Tk_FontId(framePtr->tkfont); + gcValues.foreground = framePtr->normalFg->pixel; + gcValues.background = Tk_3DBorderColor(framePtr->border)->pixel; + newGC = Tk_GetGC(framePtr->tkwin, + GCForeground|GCBackground|GCFont, &gcValues); + if (framePtr->textGC != None) { + Tk_FreeGC(framePtr->display, framePtr->textGC); + } + framePtr->textGC = newGC; + + framePtr->backGC = Tk_3DBorderGC(framePtr->tkwin, framePtr->border, + TK_3D_FLAT_GC); + Tk_GetFontMetrics(framePtr->tkfont, &(framePtr->fm)); + #ifdef TK_KANJI_OK + framePtr->numChars = Tcl_WStrlen(framePtr->text); + #else + framePtr->numChars = strlen(framePtr->text); + #endif /* TK_KANJI_OK */ + framePtr->textY = framePtr->highlightWidth; + } + #endif Tk_SetInternalBorder(framePtr->tkwin, framePtr->borderWidth + framePtr->highlightWidth); if ((framePtr->width > 0) || (framePtr->height > 0)) { *************** *** 703,714 **** --- 787,815 ---- } if (framePtr->border != NULL) { + #ifdef ENABLE_STEP + int dy; + + dy = (framePtr->numChars>0) ? (framePtr->fm.linespace - + framePtr->borderWidth)/2:0; + if ((framePtr->mask & FRAME) && framePtr->numChars > 0) + XFillRectangle(framePtr->display, Tk_WindowId(tkwin), + framePtr->backGC, 0, 0, (unsigned)Tk_Width(tkwin), + (unsigned)(framePtr->fm.linespace+framePtr->highlightWidth)); + Tk_Fill3DRectangle(tkwin, Tk_WindowId(tkwin), + framePtr->border, framePtr->highlightWidth, + framePtr->highlightWidth+dy, + Tk_Width(tkwin) - 2*framePtr->highlightWidth, + Tk_Height(tkwin) - 2*framePtr->highlightWidth-dy, + framePtr->borderWidth, framePtr->relief); + #else Tk_Fill3DRectangle(tkwin, Tk_WindowId(tkwin), framePtr->border, framePtr->highlightWidth, framePtr->highlightWidth, Tk_Width(tkwin) - 2*framePtr->highlightWidth, Tk_Height(tkwin) - 2*framePtr->highlightWidth, framePtr->borderWidth, framePtr->relief); + #endif } if (framePtr->highlightWidth != 0) { if (framePtr->flags & GOT_FOCUS) { *************** *** 721,726 **** --- 822,855 ---- Tk_DrawFocusHighlight(tkwin, gc, framePtr->highlightWidth, Tk_WindowId(tkwin)); } + #ifdef ENABLE_STEP + if ((framePtr->mask & FRAME) && framePtr->numChars > 0) { + int x, frameWidth, bx; + + frameWidth = Tk_Width(tkwin)-2*framePtr->highlightWidth - + 2*framePtr->borderWidth; + Tk_MeasureChars(framePtr->tkfont, framePtr->text, + framePtr->numChars, 0, + TK_PARTIAL_OK|TK_AT_LEAST_ONE, &(framePtr->textWidth)); + x = framePtr->borderWidth + framePtr->highlightWidth; + + if (framePtr->justify == TK_JUSTIFY_LEFT) { + bx = x; + } else if (framePtr->justify == TK_JUSTIFY_CENTER) { + bx = (frameWidth - framePtr->textWidth - x)/2; + } else { + bx = frameWidth - framePtr->textWidth - framePtr->borderWidth; + } + XFillRectangle(framePtr->display, Tk_WindowId(tkwin), + framePtr->backGC, + bx, framePtr->textY, + (unsigned)(framePtr->textWidth+2*x), + (unsigned)framePtr->fm.linespace); + Tk_DrawChars(framePtr->display, Tk_WindowId(tkwin), framePtr->textGC, + framePtr->tkfont, framePtr->text, framePtr->numChars, + bx+x, framePtr->textY + framePtr->fm.ascent); + } + #endif } /* diff -r -c -P -x CVS ../tk8.0.5/generic/tkImgTIFF.c ./generic/tkImgTIFF.c *** ../tk8.0.5/generic/tkImgTIFF.c Thu Jan 1 09:00:00 1970 --- ./generic/tkImgTIFF.c Tue Aug 17 18:54:35 1999 *************** *** 0 **** --- 1,256 ---- + /* + * tkImgTIFF.c -- + * + * A photo image file handler for XPM files. + * + * This needs libtiff 3.4beta 036 (any other version _may_ work) + * + * Copyright (c) 1997 by Oliver Graf + * + * Copyright (c) 1994 The Regents of the University of California. + * Copyright (c) 1994-1996 Sun Microsystems, Inc. + * + * See the file "license.terms" for information on usage and redistribution + * of this file, and for a DISCLAIMER OF ALL WARRANTIES. + * + * Adapted from tkImgXPM.c and tkImgGIF.c + * + * Reed Wade (wade@cs.utk.edu), University of Tennessee + * + * Copyright (c) 1995-1996 Sun Microsystems, Inc. + * + */ + + #ifdef ENABLE_TIFF + + #include "tkInt.h" + #include "tkPort.h" + #include + + /* + * The type record for TIFF images: + */ + static int ImgTIFFFileMatch _ANSI_ARGS_((Tcl_Channel chan, char *fileName, + char *formatString, + int *widthPtr, int *heightPtr)); + + static int ImgTIFFFileRead _ANSI_ARGS_((Tcl_Interp *interp, + Tcl_Channel chan, char *fileName, + char *formatString, + Tk_PhotoHandle imageHandle, + int destX, int destY, + int width, int height, + int srcX, int srcY)); + + + Tk_PhotoImageFormat tkImgFmtTIFF = { + "TIFF", /* name */ + ImgTIFFFileMatch, /* fileMatchProc */ + NULL, /* stringMatchProc */ + ImgTIFFFileRead, /* fileReadProc */ + NULL, /* stringReadProc */ + NULL, /* fileWriteProc */ + NULL, /* stringWriteProc */ + }; + + + /* + *---------------------------------------------------------------------- + * + * ImgTIFFFileMatch -- + * + * This procedure is invoked by the photo image type to see if + * a file contains image data in TIFF format. + * + * Results: + * The return value is 1 if the first characters in file f look + * like TIFF data, and 0 otherwise. + * + * Side effects: + * None + * + *---------------------------------------------------------------------- + */ + + static int + ImgTIFFFileMatch(chan, fileName, formatString, widthPtr, heightPtr) + Tcl_Channel chan; /* The image file, open for reading. */ + char *fileName; /* The name of the image file. */ + char *formatString; /* User-specified format string, or NULL. */ + int *widthPtr, *heightPtr; /* The dimensions of the image are + * returned here if the file is a valid + * TIFF file. */ + { + FILE *mf; + uint16 magic; + TIFF *tif; + + mf=fopen(fileName,"r"); + if (mf==NULL) return 0; + if (fread(&magic,sizeof(uint16),1,mf)!=1) + { + fclose(mf); + return 0; + } + fclose(mf); + if (magic!=0x4d4d && magic!=0x4949) return 0; + + tif=TIFFOpen(fileName,"r"); + if (tif==NULL) + { + return 0; + } + + TIFFGetField(tif,TIFFTAG_IMAGEWIDTH,widthPtr); + TIFFGetField(tif,TIFFTAG_IMAGELENGTH,heightPtr); + + TIFFClose(tif); + + return 1; + } + + + /* + *---------------------------------------------------------------------- + * + * ImgTIFFFileRead -- + * + * This procedure is called by the photo image type to read + * TIFF format data from a file and write it into a given + * photo image. + * + * Results: + * A standard TCL completion code. If TCL_ERROR is returned + * then an error message is left in interp->result. + * + * Side effects: + * New data is added to the image given by imageHandle. + * + *---------------------------------------------------------------------- + */ + + static int + ImgTIFFFileRead(interp, chan, fileName, formatString, imageHandle, destX, destY, + width, height, srcX, srcY) + Tcl_Interp *interp; /* Interpreter to use for reporting errors. */ + Tcl_Channel chan; /* The image file, open for reading. */ + char *fileName; /* The name of the image file. */ + char *formatString; /* User-specified format string, or NULL. */ + Tk_PhotoHandle imageHandle; /* The photo image to write into. */ + int destX, destY; /* Coordinates of top-left pixel in + * photo image to be written to. */ + int width, height; /* Dimensions of block of photo image to + * be written to. */ + int srcX, srcY; /* Coordinates of top-left pixel to be used + * in image being read. */ + { + int fileWidth, fileHeight; + int nBytes, x, y; + Tk_PhotoImageBlock block, run; + /* int transparent = -1; *//* removes compiler warning */ + TIFF *tif; + unsigned char mapper[4]={0,1,2,3}; + + tif=TIFFOpen(fileName,"r"); + if (tif==NULL) + { + return TCL_ERROR; + } + + TIFFGetField(tif,TIFFTAG_IMAGEWIDTH,&fileWidth); + TIFFGetField(tif,TIFFTAG_IMAGELENGTH,&fileHeight); + + if ((fileWidth <= 0) || (fileHeight <= 0)) + { + Tcl_AppendResult(interp, "TIFF image file \"", fileName, + "\" has dimension(s) <= 0", (char *) NULL); + TIFFClose(tif); + return TCL_ERROR; + } + + if ((srcX + width) > fileWidth) + { + width = fileWidth - srcX; + } + if ((srcY + height) > fileHeight) + { + height = fileHeight - srcY; + } + if ((width <= 0) || (height <= 0) + || (srcX >= fileWidth) || (srcY >= fileHeight)) + { + TIFFClose(tif); + return TCL_OK; + } + + Tk_PhotoExpand(imageHandle, destX + width, destY + height); + + block.width = fileWidth; + block.height = fileHeight; + block.pixelSize = sizeof(uint32); + block.pitch = sizeof(uint32) * fileWidth; + block.offset[0] = TIFFGetR(*((uint32 *)mapper)); + block.offset[1] = TIFFGetG(*((uint32 *)mapper)); + block.offset[2] = TIFFGetB(*((uint32 *)mapper)); + nBytes = fileHeight * block.pitch; + block.pixelPtr = (unsigned char *) ckalloc((unsigned) nBytes); + + if (TIFFReadRGBAImage(tif,(unsigned)fileWidth, (unsigned)fileHeight, + (uint32 *)block.pixelPtr,0)==0) + { + goto error; + } + + /* Clear current contents */ + Tk_PhotoBlank(imageHandle); + + /* Setup run descriptor */ + run.height = 1; + run.pitch = block.pitch; + run.pixelSize = block.pixelSize; + run.offset[0] = TIFFGetR(*((uint32 *)mapper)); + run.offset[1] = TIFFGetG(*((uint32 *)mapper)); + run.offset[2] = TIFFGetB(*((uint32 *)mapper)); + + /* Copy opaque runs to photo image */ + for (y = 0; y < block.height; y++) { + char* p = block.pixelPtr + y*block.pitch; + char* s = p; + int w = 0; + for (x = 0; x < block.width; x++) { + if (p[TIFFGetA(*((uint32 *)mapper))]) { + /* opaque: add pixel to current run */ + if (w == 0) + s = p; + w = w + 1; + } else if (s) { + /* copy run to photo image */ + if (w > 0) { + run.width = w; + run.pixelPtr = s; + Tk_PhotoPutBlock(imageHandle, &run, x-w, block.height-y-1, run.width, 1); + } + w = 0; + } + p += block.pixelSize; + } + if (w > 0) { + /* copy final run, if any */ + run.width = w; + run.pixelPtr = s; + Tk_PhotoPutBlock(imageHandle, &run, x-w, block.height-y-1, run.width, 1); + } + } + + ckfree((char *) block.pixelPtr); + TIFFClose(tif); + return TCL_OK; + + error: + ckfree((char *) block.pixelPtr); + TIFFClose(tif); + return TCL_ERROR; + + } + + #endif diff -r -c -P -x CVS ../tk8.0.5/generic/tkImgXPM.c ./generic/tkImgXPM.c *** ../tk8.0.5/generic/tkImgXPM.c Thu Jan 1 09:00:00 1970 --- ./generic/tkImgXPM.c Tue Aug 17 18:54:35 1999 *************** *** 0 **** --- 1,545 ---- + /* + * tkImgXPM.c -- + * + * A photo image file handler for XPM files. + * + * This needs libXpm 4.7 (ideally 4.9) + * + * Copyright (c) 1997 by Oliver Graf + * + * adapted to tcl8.0 Tcl_Channels + * + * Copyright (c) 1997 by Oliver Graf + * + * Fixed read from data bug (use FromBuffer instead of FromData) + * + * Modified for transparency + * -- adapted from tkImaging.c fromthe python Imaging library + * + * Original hack copyright (c) 1996 by Alfredo Kengi Kojima + * + * Adapted from tkImgBmap.c + * + * Copyright (c) 1994 The Regents of the University of California. + * Copyright (c) 1994-1996 Sun Microsystems, Inc. + * + * See the file "license.terms" for information on usage and redistribution + * of this file, and for a DISCLAIMER OF ALL WARRANTIES. + * + * and tkImgGIF.c + * + * Reed Wade (wade@cs.utk.edu), University of Tennessee + * + * Copyright (c) 1995-1996 Sun Microsystems, Inc. + * + */ + + #ifdef ENABLE_XPM + + #include "tkInt.h" + #include "tkPort.h" + #include + + /* + * The type record for XPM images: + */ + static int ImgXPMStringMatch _ANSI_ARGS_((char *string, + char *formatString, int *widthPtr, int *heightPtr)); + + static int ImgXPMStringRead _ANSI_ARGS_((Tcl_Interp *interp, + char *string, char *formatString, + Tk_PhotoHandle imageHandle, + int destX, int destY, int width, int height, + int srcX, int srcY)); + + static int ImgXPMFileMatch _ANSI_ARGS_((Tcl_Channel chan, char *fileName, + char *formatString, int *widthPtr, int *heightPtr)); + + static int ImgXPMFileRead _ANSI_ARGS_((Tcl_Interp *interp, + Tcl_Channel chan, char *fileName, char *formatString, + Tk_PhotoHandle imageHandle, int destX, int destY, + int width, int height, int srcX, int srcY)); + + + Tk_PhotoImageFormat tkImgFmtXPM = { + "XPM", /* name */ + ImgXPMFileMatch, /* fileMatchProc */ + ImgXPMStringMatch, /* stringMatchProc */ + ImgXPMFileRead, /* fileReadProc */ + ImgXPMStringRead, /* stringReadProc */ + NULL, /* fileWriteProc */ + NULL, /* stringWriteProc */ + }; + + #define CM_RED 0 + #define CM_GREEN 1 + #define CM_BLUE 2 + #define CM_COLSIZE 3 + + /* + * Prototypes for procedures used only locally in this file: + */ + + static unsigned char * MakeColortable _ANSI_ARGS_((Tcl_Interp *interp, + XpmImage image, + int *transparent)); + static int ReadImage _ANSI_ARGS_((Tcl_Interp *interp, + char *imagePtr, XpmImage image, int len, int height, + unsigned char *cmap, + int transparent)); + + /* + *---------------------------------------------------------------------- + * + * ImgXPMFileMatch -- + * + * This procedure is invoked by the photo image type to see if + * a file contains image data in XPM format. + * + * Results: + * The return value is 1 if the first characters in channel look + * like XPM data, and 0 otherwise. + * The XPM file must contain the keyword XPM in the first line + * + * Side effects: + * None + * + *---------------------------------------------------------------------- + */ + + static int + ImgXPMFileMatch(chan, fileName, formatString, widthPtr, heightPtr) + Tcl_Channel chan; /* The image channel, open for reading. */ + char *fileName; /* The name of the image file. */ + char *formatString; /* User-specified format string, or NULL. */ + int *widthPtr, *heightPtr; /* The dimensions of the image are + * returned here if the file is a valid + * XPM file. */ + { + XpmImage image; + + if (XpmReadFileToXpmImage(fileName, &image, (XpmInfo*)NULL)!=XpmSuccess) { + return 0; + } + *widthPtr = image.width; + *heightPtr = image.height; + XpmFreeXpmImage(&image); + return 1; + } + + /* + *---------------------------------------------------------------------- + * + * ImgXPMFileRead -- + * + * This procedure is called by the photo image type to read + * XPM format data from a channel and write it into a given + * photo image. + * + * Results: + * A standard TCL completion code. If TCL_ERROR is returned + * then an error message is left in interp->result. + * + * Side effects: + * New data is added to the image given by imageHandle. + * + *---------------------------------------------------------------------- + */ + + static int + ImgXPMFileRead(interp, chan, fileName, formatString, imageHandle, destX, destY, + width, height, srcX, srcY) + Tcl_Interp *interp; /* Interpreter to use for reporting errors. */ + Tcl_Channel chan; /* The image channel, open for reading. */ + char *fileName; /* The name of the image file. */ + char *formatString; /* User-specified format string, or NULL. */ + Tk_PhotoHandle imageHandle; /* The photo image to write into. */ + int destX, destY; /* Coordinates of top-left pixel in + * photo image to be written to. */ + int width, height; /* Dimensions of block of photo image to + * be written to. */ + int srcX, srcY; /* Coordinates of top-left pixel to be used + * in image being read. */ + { + int fileWidth, fileHeight; + int nBytes; + Tk_PhotoImageBlock block; + unsigned char *colorMap; + int transparent = -1; + XpmImage image; + + if (XpmReadFileToXpmImage(fileName, &image, (XpmInfo *)NULL)!=XpmSuccess) { + Tcl_AppendResult(interp, "error reading XPM file \"", fileName, + "\"", (char *) NULL); + return TCL_ERROR; + } + fileWidth = image.width; + fileHeight = image.height; + if ((fileWidth <= 0) || (fileHeight <= 0)) { + Tcl_AppendResult(interp, "XPM image file \"", fileName, + "\" has dimension(s) <= 0", (char *) NULL); + XpmFreeXpmImage(&image); + return TCL_ERROR; + } + + if ((srcX + width) > fileWidth) { + width = fileWidth - srcX; + } + if ((srcY + height) > fileHeight) { + height = fileHeight - srcY; + } + if ((width <= 0) || (height <= 0) + || (srcX >= fileWidth) || (srcY >= fileHeight)) { + XpmFreeXpmImage(&image); + return TCL_OK; + } + + colorMap=MakeColortable(interp, image, &transparent); + if (colorMap==NULL) + goto error; + Tk_PhotoExpand(imageHandle, destX + width, destY + height); + + block.width = fileWidth; + block.height = fileHeight; + block.pixelSize = 4; + block.pitch = 4 * fileWidth; + block.offset[0] = 0; + block.offset[1] = 1; + block.offset[2] = 2; + nBytes = fileHeight * block.pitch; + block.pixelPtr = (unsigned char *) ckalloc((unsigned) nBytes); + + if (ReadImage(interp, (char *) block.pixelPtr, image, fileWidth, + fileHeight, colorMap, transparent) != TCL_OK) { + goto error; + } + + if (transparent!=-1) + { + int x, y; + Tk_PhotoImageBlock run; + + /* Clear current contents */ + Tk_PhotoBlank(imageHandle); + + /* Setup run descriptor */ + run.height = 1; + run.pitch = block.pitch; + run.pixelSize = block.pixelSize; + run.offset[0] = 0; + run.offset[1] = 1; + run.offset[2] = 2; + + /* Copy opaque runs to photo image */ + for (y = 0; y < block.height; y++) { + char* p = block.pixelPtr + y*block.pitch; + char* s = p; + int w = 0; + for (x = 0; x < block.width; x++) { + if (p[3]) { + /* opaque: add pixel to current run */ + if (w == 0) + s = p; + w = w + 1; + } else if (s) { + /* copy run to photo image */ + if (w > 0) { + run.width = w; + run.pixelPtr = s; + Tk_PhotoPutBlock(imageHandle, &run, x-w, y, run.width, 1); + } + w = 0; + } + p += block.pixelSize; + } + if (w > 0) { + /* copy final run, if any */ + run.width = w; + run.pixelPtr = s; + Tk_PhotoPutBlock(imageHandle, &run, x-w, y, run.width, 1); + } + } + } + else + Tk_PhotoPutBlock(imageHandle, &block, destX, destY, fileWidth, fileHeight); + + ckfree((char *) block.pixelPtr); + XpmFreeXpmImage(&image); + if (colorMap) ckfree(colorMap); + return TCL_OK; + + error: + ckfree((char *) block.pixelPtr); + XpmFreeXpmImage(&image); + if (colorMap) ckfree(colorMap); + return TCL_ERROR; + + } + + + /* + *---------------------------------------------------------------------- + * + * ImgXPMStringMatch -- + * + * This procedure is invoked by the photo image type to see if + * a string contains image data in XPM format. + * + * Results: + * The return value is 1 if the first characters in the string look + * like XPM data, and 0 otherwise. + * + * Side effects: + * None + * + *---------------------------------------------------------------------- + */ + static int + ImgXPMStringMatch (string, formatString, widthPtr, heightPtr) + char *string; + char *formatString; + int *widthPtr; + int *heightPtr; + { + XpmImage image; + + if (XpmCreateXpmImageFromBuffer(string, &image, (XpmInfo *)NULL) + !=XpmSuccess) { + return 0; + } + *widthPtr = image.width; + *heightPtr = image.height; + XpmFreeXpmImage(&image); + return 1; + } + + /* + *---------------------------------------------------------------------- + * + * ImgXPMStringRead -- + * + * This procedure is called by the photo image type to read + * XPM format data from a string and write it into a given + * photo image. + * + * Results: + * A standard TCL completion code. If TCL_ERROR is returned + * then an error message is left in interp->result. + * + * Side effects: + * New data is added to the image given by imageHandle. + * + *---------------------------------------------------------------------- + */ + static int + ImgXPMStringRead (interp, string, formatString, imageHandle, destX, destY, + width, height, srcX, srcY) + Tcl_Interp *interp; + char *string; + char *formatString; + Tk_PhotoHandle imageHandle; + int destX, destY, width, height, srcX, srcY; + { + int nBytes; + Tk_PhotoImageBlock block; + unsigned char *colorMap; + int transparent = -1; + XpmImage image; + + + if (XpmCreateXpmImageFromBuffer(string, &image, (XpmInfo *)NULL) + !=XpmSuccess) { + return 0; + } + + if ((image.width <= 0) || (image.height <= 0)) { + Tcl_AppendResult(interp, "XPM image data has dimension(s) <= 0", + (char *) NULL); + XpmFreeXpmImage(&image); + return TCL_ERROR; + } + + if ((srcX + width) > image.width) { + width = image.width - srcX; + } + if ((srcY + height) > image.height) { + height = image.height - srcY; + } + if ((width <= 0) || (height <= 0) + || (srcX >= image.width) || (srcY >= image.height)) { + XpmFreeXpmImage(&image); + return TCL_OK; + } + + colorMap=MakeColortable(interp, image, &transparent); + if (colorMap==NULL) + goto error; + Tk_PhotoExpand(imageHandle, destX + width, destY + height); + + block.width = image.width; + block.height = image.height; + block.pixelSize = 4; + block.pitch = 4 * image.width; + block.offset[0] = 0; + block.offset[1] = 1; + block.offset[2] = 2; + nBytes = image.height * block.pitch; + block.pixelPtr = (unsigned char *) ckalloc((unsigned) nBytes); + + if (ReadImage(interp, (char *)block.pixelPtr, image, (int)image.width, + (int)image.height, colorMap, transparent) != TCL_OK) { + goto error; + } + + if (transparent!=-1) + { + int x, y; + Tk_PhotoImageBlock run; + + /* Clear current contents */ + Tk_PhotoBlank(imageHandle); + + /* Setup run descriptor */ + run.height = 1; + run.pitch = block.pitch; + run.pixelSize = block.pixelSize; + run.offset[0] = 0; + run.offset[1] = 1; + run.offset[2] = 2; + + /* Copy opaque runs to photo image */ + for (y = 0; y < block.height; y++) { + char* p = block.pixelPtr + y*block.pitch; + char* s = p; + int w = 0; + for (x = 0; x < block.width; x++) { + if (p[3]) { + /* opaque: add pixel to current run */ + if (w == 0) + s = p; + w = w + 1; + } else if (s) { + /* copy run to photo image */ + if (w > 0) { + run.width = w; + run.pixelPtr = s; + Tk_PhotoPutBlock(imageHandle, &run, x-w, y, run.width, 1); + } + w = 0; + } + p += block.pixelSize; + } + if (w > 0) { + /* copy final run, if any */ + run.width = w; + run.pixelPtr = s; + Tk_PhotoPutBlock(imageHandle, &run, x-w, y, run.width, 1); + } + } + } + else + Tk_PhotoPutBlock(imageHandle, &block, destX, destY, + (int)image.width, (int)image.height); + ckfree((char *) block.pixelPtr); + XpmFreeXpmImage(&image); + if (colorMap) ckfree(colorMap); + return TCL_OK; + + error: + ckfree((char *) block.pixelPtr); + XpmFreeXpmImage(&image); + if (colorMap) ckfree(colorMap); + return TCL_ERROR; + } + + + /* + * Private + */ + + /* + *------------------------------------------------------------------ + * + * MakeColortable -- + * Converts a XpmColor colortable to a indexed RGB colortable + * + *------------------------------------------------------------------ + */ + static unsigned char * + MakeColortable(interp, image, transparent) + Tcl_Interp *interp; + XpmImage image; + int *transparent; + { + int i; + unsigned char *cmap; + + if (image.colorTable==NULL) + return NULL; + + cmap=(unsigned char *)ckalloc(sizeof(unsigned char)*CM_COLSIZE*image.ncolors); + if (cmap==NULL) + return NULL; + + for (i=0; ired >> 8; + cmap[i*CM_COLSIZE+CM_GREEN] = colorPtr->green >> 8; + cmap[i*CM_COLSIZE+CM_BLUE] = colorPtr->blue >> 8; + Tk_FreeColor(colorPtr); + } else { + cmap[i*CM_COLSIZE+CM_RED] = 0xbf; + cmap[i*CM_COLSIZE+CM_GREEN] = 0xbf; + cmap[i*CM_COLSIZE+CM_BLUE] = 0xbf; + } + } + return cmap; + } + + /* + *------------------------------------------------------------------ + * + * ReadImage -- + * Converts a XpmImage image to a RGB image + * + *------------------------------------------------------------------ + */ + static int + ReadImage(interp, imagePtr, image, len, height, cmap, transparent) + Tcl_Interp *interp; + char *imagePtr; + XpmImage image; + int len, height; + unsigned char *cmap; + int transparent; + { + int v; + int xpos = 0, ypos = 0; + /* char *colStr; *//* removes compiler warning */ + unsigned int offset; + + offset = 0; + for(ypos=0; ypos + * - surgery performed and implanted into Tk8.0 by Steve Murray + */ + + #include "tkPort.h" + #include "default.h" + #include "tkInt.h" + + /* + * One record of the following type is kept for each element + * associated with a listbox widget: + */ + + typedef struct Element { + int textLength; /* # non-NULL characters in text. */ + int lBearing; /* Distance from first character's + * origin to left edge of character. */ + int pixelWidth; /* Total width of element in pixels (including + * left bearing and right bearing). */ + int selected; /* 1 means this item is selected, 0 means + * it isn't. */ + #ifdef ENABLE_STEP + int arrow; /* append a N*XTSTEP arrow to the entry. */ + #endif + struct Element *nextPtr; /* Next in list of all elements of this + * listbox, or NULL for last element. */ + char text[4]; /* Characters of this element, NULL- + * terminated. The actual space allocated + * here will be as large as needed (> 4, + * most likely). Must be the last field + * of the record. */ + } Element; + + #define ElementSize(stringLength) \ + ((unsigned) (sizeof(Element) - 3 + stringLength)) + + /* + * A data structure of the following type is kept for each listbox + * widget managed by this file: + */ + + typedef struct { + Tk_Window tkwin; /* Window that embodies the listbox. NULL + * means that the window has been destroyed + * but the data structures haven't yet been + * cleaned up.*/ + Display *display; /* Display containing widget. Used, among + * other things, so that resources can be + * freed even after tkwin has gone away. */ + Tcl_Interp *interp; /* Interpreter associated with listbox. */ + Tcl_Command widgetCmd; /* Token for listbox's widget command. */ + int numElements; /* Total number of elements in this listbox. */ + Element *firstPtr; /* First in list of elements (NULL if no + * elements). */ + Element *lastPtr; /* Last in list of elements (NULL if no + * elements). */ + + /* + * Information used when displaying widget: + */ + + Tk_3DBorder normalBorder; /* Used for drawing border around whole + * window, plus used for background. */ + int borderWidth; /* Width of 3-D border around window. */ + int relief; /* 3-D effect: TK_RELIEF_RAISED, etc. */ + int highlightWidth; /* Width in pixels of highlight to draw + * around widget when it has the focus. + * <= 0 means don't draw a highlight. */ + XColor *highlightBgColorPtr; + /* Color for drawing traversal highlight + * area when highlight is off. */ + XColor *highlightColorPtr; /* Color for drawing traversal highlight. */ + int inset; /* Total width of all borders, including + * traversal highlight and 3-D border. + * Indicates how much interior stuff must + * be offset from outside edges to leave + * room for borders. */ + Tk_Font tkfont; /* Information about text font, or NULL. */ + XColor *fgColorPtr; /* Text color in normal mode. */ + GC textGC; /* For drawing normal text. */ + Tk_3DBorder selBorder; /* Borders and backgrounds for selected + * elements. */ + int selBorderWidth; /* Width of border around selection. */ + XColor *selFgColorPtr; /* Foreground color for selected elements. */ + GC selTextGC; /* For drawing selected text. */ + int width; /* Desired width of window, in characters. */ + int height; /* Desired height of window, in lines. */ + int lineHeight; /* Number of pixels allocated for each line + * in display. */ + int topIndex; /* Index of top-most element visible in + * window. */ + int fullLines; /* Number of lines that fit are completely + * visible in window. There may be one + * additional line at the bottom that is + * partially visible. */ + int partialLine; /* 0 means that the window holds exactly + * fullLines lines. 1 means that there is + * one additional line that is partially + * visble. */ + int setGrid; /* Non-zero means pass gridding information + * to window manager. */ + + /* + * Information to support horizontal scrolling: + */ + + int maxWidth; /* Width (in pixels) of widest string in + * listbox. */ + int xScrollUnit; /* Number of pixels in one "unit" for + * horizontal scrolling (window scrolls + * horizontally in increments of this size). + * This is an average character size. */ + int xOffset; /* The left edge of each string in the + * listbox is offset to the left by this + * many pixels (0 means no offset, positive + * means there is an offset). */ + + /* + * Information about what's selected or active, if any. + */ + + Tk_Uid selectMode; /* Selection style: single, browse, multiple, + * or extended. This value isn't used in C + * code, but the Tcl bindings use it. */ + int numSelected; /* Number of elements currently selected. */ + int selectAnchor; /* Fixed end of selection (i.e. element + * at which selection was started.) */ + int exportSelection; /* Non-zero means tie internal listbox + * to X selection. */ + int active; /* Index of "active" element (the one that + * has been selected by keyboard traversal). + * -1 means none. */ + + /* + * Information for scanning: + */ + + int scanMarkX; /* X-position at which scan started (e.g. + * button was pressed here). */ + int scanMarkY; /* Y-position at which scan started (e.g. + * button was pressed here). */ + int scanMarkXOffset; /* Value of "xOffset" field when scan + * started. */ + int scanMarkYIndex; /* Index of line that was at top of window + * when scan started. */ + + /* + * Miscellaneous information: + */ + + Tk_Cursor cursor; /* Current cursor for window, or None. */ + char *takeFocus; /* Value of -takefocus option; not used in + * the C code, but used by keyboard traversal + * scripts. Malloc'ed, but may be NULL. */ + char *yScrollCmd; /* Command prefix for communicating with + * vertical scrollbar. NULL means no command + * to issue. Malloc'ed. */ + char *xScrollCmd; /* Command prefix for communicating with + * horizontal scrollbar. NULL means no command + * to issue. Malloc'ed. */ + int flags; /* Various flag bits: see below for + * definitions. */ + } Listbox; + + /* + * Flag bits for listboxes: + * + * REDRAW_PENDING: Non-zero means a DoWhenIdle handler + * has already been queued to redraw + * this window. + * UPDATE_V_SCROLLBAR: Non-zero means vertical scrollbar needs + * to be updated. + * UPDATE_H_SCROLLBAR: Non-zero means horizontal scrollbar needs + * to be updated. + * GOT_FOCUS: Non-zero means this widget currently + * has the input focus. + */ + + #define REDRAW_PENDING 1 + #define UPDATE_V_SCROLLBAR 2 + #define UPDATE_H_SCROLLBAR 4 + #define GOT_FOCUS 8 + + /* + * Information used for argv parsing: + */ + + static Tk_ConfigSpec configSpecs[] = { + {TK_CONFIG_BORDER, "-background", "background", "Background", + DEF_LISTBOX_BG_COLOR, Tk_Offset(Listbox, normalBorder), + TK_CONFIG_COLOR_ONLY}, + {TK_CONFIG_BORDER, "-background", "background", "Background", + DEF_LISTBOX_BG_MONO, Tk_Offset(Listbox, normalBorder), + TK_CONFIG_MONO_ONLY}, + {TK_CONFIG_SYNONYM, "-bd", "borderWidth", (char *) NULL, + (char *) NULL, 0, 0}, + {TK_CONFIG_SYNONYM, "-bg", "background", (char *) NULL, + (char *) NULL, 0, 0}, + {TK_CONFIG_PIXELS, "-borderwidth", "borderWidth", "BorderWidth", + DEF_LISTBOX_BORDER_WIDTH, Tk_Offset(Listbox, borderWidth), 0}, + {TK_CONFIG_ACTIVE_CURSOR, "-cursor", "cursor", "Cursor", + DEF_LISTBOX_CURSOR, Tk_Offset(Listbox, cursor), TK_CONFIG_NULL_OK}, + {TK_CONFIG_BOOLEAN, "-exportselection", "exportSelection", + "ExportSelection", DEF_LISTBOX_EXPORT_SELECTION, + Tk_Offset(Listbox, exportSelection), 0}, + {TK_CONFIG_SYNONYM, "-fg", "foreground", (char *) NULL, + (char *) NULL, 0, 0}, + {TK_CONFIG_FONT, "-font", "font", "Font", + DEF_LISTBOX_FONT, Tk_Offset(Listbox, tkfont), 0}, + {TK_CONFIG_COLOR, "-foreground", "foreground", "Foreground", + DEF_LISTBOX_FG, Tk_Offset(Listbox, fgColorPtr), 0}, + {TK_CONFIG_INT, "-height", "height", "Height", + DEF_LISTBOX_HEIGHT, Tk_Offset(Listbox, height), 0}, + {TK_CONFIG_COLOR, "-highlightbackground", "highlightBackground", + "HighlightBackground", DEF_LISTBOX_HIGHLIGHT_BG, + Tk_Offset(Listbox, highlightBgColorPtr), 0}, + {TK_CONFIG_COLOR, "-highlightcolor", "highlightColor", "HighlightColor", + DEF_LISTBOX_HIGHLIGHT, Tk_Offset(Listbox, highlightColorPtr), 0}, + {TK_CONFIG_PIXELS, "-highlightthickness", "highlightThickness", + "HighlightThickness", + DEF_LISTBOX_HIGHLIGHT_WIDTH, Tk_Offset(Listbox, highlightWidth), 0}, + {TK_CONFIG_RELIEF, "-relief", "relief", "Relief", + DEF_LISTBOX_RELIEF, Tk_Offset(Listbox, relief), 0}, + {TK_CONFIG_BORDER, "-selectbackground", "selectBackground", "Foreground", + DEF_LISTBOX_SELECT_COLOR, Tk_Offset(Listbox, selBorder), + TK_CONFIG_COLOR_ONLY}, + {TK_CONFIG_BORDER, "-selectbackground", "selectBackground", "Foreground", + DEF_LISTBOX_SELECT_MONO, Tk_Offset(Listbox, selBorder), + TK_CONFIG_MONO_ONLY}, + {TK_CONFIG_PIXELS, "-selectborderwidth", "selectBorderWidth", "BorderWidth", + DEF_LISTBOX_SELECT_BD, Tk_Offset(Listbox, selBorderWidth), 0}, + {TK_CONFIG_COLOR, "-selectforeground", "selectForeground", "Background", + DEF_LISTBOX_SELECT_FG_COLOR, Tk_Offset(Listbox, selFgColorPtr), + TK_CONFIG_COLOR_ONLY}, + {TK_CONFIG_COLOR, "-selectforeground", "selectForeground", "Background", + DEF_LISTBOX_SELECT_FG_MONO, Tk_Offset(Listbox, selFgColorPtr), + TK_CONFIG_MONO_ONLY}, + {TK_CONFIG_UID, "-selectmode", "selectMode", "SelectMode", + DEF_LISTBOX_SELECT_MODE, Tk_Offset(Listbox, selectMode), 0}, + {TK_CONFIG_BOOLEAN, "-setgrid", "setGrid", "SetGrid", + DEF_LISTBOX_SET_GRID, Tk_Offset(Listbox, setGrid), 0}, + {TK_CONFIG_STRING, "-takefocus", "takeFocus", "TakeFocus", + DEF_LISTBOX_TAKE_FOCUS, Tk_Offset(Listbox, takeFocus), + TK_CONFIG_NULL_OK}, + {TK_CONFIG_INT, "-width", "width", "Width", + DEF_LISTBOX_WIDTH, Tk_Offset(Listbox, width), 0}, + {TK_CONFIG_STRING, "-xscrollcommand", "xScrollCommand", "ScrollCommand", + DEF_LISTBOX_SCROLL_COMMAND, Tk_Offset(Listbox, xScrollCmd), + TK_CONFIG_NULL_OK}, + {TK_CONFIG_STRING, "-yscrollcommand", "yScrollCommand", "ScrollCommand", + DEF_LISTBOX_SCROLL_COMMAND, Tk_Offset(Listbox, yScrollCmd), + TK_CONFIG_NULL_OK}, + {TK_CONFIG_END, (char *) NULL, (char *) NULL, (char *) NULL, + (char *) NULL, 0, 0} + }; + + /* + * Forward declarations for procedures defined later in this file: + */ + + static void ChangeListboxOffset _ANSI_ARGS_((Listbox *listPtr, + int offset)); + static void ChangeListboxView _ANSI_ARGS_((Listbox *listPtr, + int index)); + static int ConfigureListbox _ANSI_ARGS_((Tcl_Interp *interp, + Listbox *listPtr, int argc, char **argv, + int flags)); + static void DeleteEls _ANSI_ARGS_((Listbox *listPtr, int first, + int last)); + static void DestroyListbox _ANSI_ARGS_((char *memPtr)); + static void DisplayListbox _ANSI_ARGS_((ClientData clientData)); + static int GetListboxIndex _ANSI_ARGS_((Tcl_Interp *interp, + Listbox *listPtr, char *string, int endIsSize, + int *indexPtr)); + static void InsertEls _ANSI_ARGS_((Listbox *listPtr, int index, + int argc, char **argv)); + static void ListboxCmdDeletedProc _ANSI_ARGS_(( + ClientData clientData)); + static void ListboxComputeGeometry _ANSI_ARGS_((Listbox *listPtr, + int fontChanged, int maxIsStale, int updateGrid)); + static void ListboxEventProc _ANSI_ARGS_((ClientData clientData, + XEvent *eventPtr)); + static int ListboxFetchSelection _ANSI_ARGS_(( + ClientData clientData, int offset, char *buffer, + int maxBytes)); + static void ListboxLostSelection _ANSI_ARGS_(( + ClientData clientData)); + static void ListboxRedrawRange _ANSI_ARGS_((Listbox *listPtr, + int first, int last)); + static void ListboxScanTo _ANSI_ARGS_((Listbox *listPtr, + int x, int y)); + static void ListboxSelect _ANSI_ARGS_((Listbox *listPtr, + int first, int last, int select)); + static void ListboxUpdateHScrollbar _ANSI_ARGS_((Listbox *listPtr)); + static void ListboxUpdateVScrollbar _ANSI_ARGS_((Listbox *listPtr)); + static int ListboxWidgetCmd _ANSI_ARGS_((ClientData clientData, + Tcl_Interp *interp, int argc, char **argv)); + static void ListboxWorldChanged _ANSI_ARGS_(( + ClientData instanceData)); + static int NearestListboxElement _ANSI_ARGS_((Listbox *listPtr, + int y)); + + /* + * The structure below defines button class behavior by means of procedures + * that can be invoked from generic window code. + */ + + static TkClassProcs listboxClass = { + NULL, /* createProc. */ + ListboxWorldChanged, /* geometryProc. */ + NULL /* modalProc. */ + }; + + + /* + *-------------------------------------------------------------- + * + * Tk_ListboxCmd -- + * + * This procedure is invoked to process the "listbox" Tcl + * command. See the user documentation for details on what + * it does. + * + * Results: + * A standard Tcl result. + * + * Side effects: + * See the user documentation. + * + *-------------------------------------------------------------- + */ + + int + Tk_ListboxCmd(clientData, interp, argc, argv) + ClientData clientData; /* Main window associated with + * interpreter. */ + Tcl_Interp *interp; /* Current interpreter. */ + int argc; /* Number of arguments. */ + char **argv; /* Argument strings. */ + { + register Listbox *listPtr; + Tk_Window new; + Tk_Window tkwin = (Tk_Window) clientData; + + if (argc < 2) { + Tcl_AppendResult(interp, "wrong # args: should be \"", + argv[0], " pathName ?options?\"", (char *) NULL); + return TCL_ERROR; + } + + new = Tk_CreateWindowFromPath(interp, tkwin, argv[1], (char *) NULL); + if (new == NULL) { + return TCL_ERROR; + } + + /* + * Initialize the fields of the structure that won't be initialized + * by ConfigureListbox, or that ConfigureListbox requires to be + * initialized already (e.g. resource pointers). + */ + + listPtr = (Listbox *) ckalloc(sizeof(Listbox)); + listPtr->tkwin = new; + listPtr->display = Tk_Display(new); + listPtr->interp = interp; + listPtr->widgetCmd = Tcl_CreateCommand(interp, + Tk_PathName(listPtr->tkwin), ListboxWidgetCmd, + (ClientData) listPtr, ListboxCmdDeletedProc); + listPtr->numElements = 0; + listPtr->firstPtr = NULL; + listPtr->lastPtr = NULL; + listPtr->normalBorder = NULL; + listPtr->borderWidth = 0; + listPtr->relief = TK_RELIEF_RAISED; + listPtr->highlightWidth = 0; + listPtr->highlightBgColorPtr = NULL; + listPtr->highlightColorPtr = NULL; + listPtr->inset = 0; + listPtr->tkfont = NULL; + listPtr->fgColorPtr = NULL; + listPtr->textGC = None; + listPtr->selBorder = NULL; + listPtr->selBorderWidth = 0; + listPtr->selFgColorPtr = None; + listPtr->selTextGC = None; + listPtr->width = 0; + listPtr->height = 0; + listPtr->lineHeight = 0; + listPtr->topIndex = 0; + listPtr->fullLines = 1; + listPtr->partialLine = 0; + listPtr->setGrid = 0; + listPtr->maxWidth = 0; + listPtr->xScrollUnit = 1; + listPtr->xOffset = 0; + listPtr->selectMode = NULL; + listPtr->numSelected = 0; + listPtr->selectAnchor = 0; + listPtr->exportSelection = 1; + listPtr->active = 0; + listPtr->scanMarkX = 0; + listPtr->scanMarkY = 0; + listPtr->scanMarkXOffset = 0; + listPtr->scanMarkYIndex = 0; + listPtr->cursor = None; + listPtr->takeFocus = NULL; + listPtr->xScrollCmd = NULL; + listPtr->yScrollCmd = NULL; + listPtr->flags = 0; + + Tk_SetClass(listPtr->tkwin, "Listbox"); + TkSetClassProcs(listPtr->tkwin, &listboxClass, (ClientData) listPtr); + Tk_CreateEventHandler(listPtr->tkwin, + ExposureMask|StructureNotifyMask|FocusChangeMask, + ListboxEventProc, (ClientData) listPtr); + Tk_CreateSelHandler(listPtr->tkwin, XA_PRIMARY, XA_STRING, + ListboxFetchSelection, (ClientData) listPtr, XA_STRING); + if (ConfigureListbox(interp, listPtr, argc-2, argv+2, 0) != TCL_OK) { + goto error; + } + + interp->result = Tk_PathName(listPtr->tkwin); + return TCL_OK; + + error: + Tk_DestroyWindow(listPtr->tkwin); + return TCL_ERROR; + } + + /* + *-------------------------------------------------------------- + * + * ListboxWidgetCmd -- + * + * This procedure is invoked to process the Tcl command + * that corresponds to a widget managed by this module. + * See the user documentation for details on what it does. + * + * Results: + * A standard Tcl result. + * + * Side effects: + * See the user documentation. + * + *-------------------------------------------------------------- + */ + + static int + ListboxWidgetCmd(clientData, interp, argc, argv) + ClientData clientData; /* Information about listbox widget. */ + Tcl_Interp *interp; /* Current interpreter. */ + int argc; /* Number of arguments. */ + char **argv; /* Argument strings. */ + { + register Listbox *listPtr = (Listbox *) clientData; + int result = TCL_OK; + size_t length; + int c; + Tk_FontMetrics fm; + + if (argc < 2) { + Tcl_AppendResult(interp, "wrong # args: should be \"", + argv[0], " option ?arg arg ...?\"", (char *) NULL); + return TCL_ERROR; + } + Tcl_Preserve((ClientData) listPtr); + c = argv[1][0]; + length = strlen(argv[1]); + if ((c == 'a') && (strncmp(argv[1], "activate", length) == 0)) { + int index; + + if (argc != 3) { + Tcl_AppendResult(interp, "wrong # args: should be \"", + argv[0], " activate index\"", + (char *) NULL); + goto error; + } + ListboxRedrawRange(listPtr, listPtr->active, listPtr->active); + if (GetListboxIndex(interp, listPtr, argv[2], 0, &index) != TCL_OK) { + goto error; + } + if (index >= listPtr->numElements) { + index = listPtr->numElements-1; + } + if (index < 0) { + index = 0; + } + listPtr->active = index; + ListboxRedrawRange(listPtr, listPtr->active, listPtr->active); + } else if ((c == 'b') && (strncmp(argv[1], "bbox", length) == 0)) { + int index, x, y, i; + Element *elPtr; + + if (argc != 3) { + Tcl_AppendResult(interp, "wrong # args: should be \"", + argv[0], " bbox index\"", (char *) NULL); + goto error; + } + if (GetListboxIndex(interp, listPtr, argv[2], 0, &index) != TCL_OK) { + goto error; + } + if ((index >= listPtr->numElements) || (index < 0)) { + goto done; + } + for (i = 0, elPtr = listPtr->firstPtr; i < index; + i++, elPtr = elPtr->nextPtr) { + /* Empty loop body. */ + } + if ((index >= listPtr->topIndex) && (index < listPtr->numElements) + && (index < (listPtr->topIndex + listPtr->fullLines + + listPtr->partialLine))) { + x = listPtr->inset + listPtr->selBorderWidth - listPtr->xOffset; + y = ((index - listPtr->topIndex)*listPtr->lineHeight) + + listPtr->inset + listPtr->selBorderWidth; + Tk_GetFontMetrics(listPtr->tkfont, &fm); + sprintf(interp->result, "%d %d %d %d", x, y, elPtr->pixelWidth, + fm.linespace); + } + } else if ((c == 'c') && (strncmp(argv[1], "cget", length) == 0) + && (length >= 2)) { + if (argc != 3) { + Tcl_AppendResult(interp, "wrong # args: should be \"", + argv[0], " cget option\"", + (char *) NULL); + goto error; + } + result = Tk_ConfigureValue(interp, listPtr->tkwin, configSpecs, + (char *) listPtr, argv[2], 0); + } else if ((c == 'c') && (strncmp(argv[1], "configure", length) == 0) + && (length >= 2)) { + if (argc == 2) { + result = Tk_ConfigureInfo(interp, listPtr->tkwin, configSpecs, + (char *) listPtr, (char *) NULL, 0); + } else if (argc == 3) { + result = Tk_ConfigureInfo(interp, listPtr->tkwin, configSpecs, + (char *) listPtr, argv[2], 0); + } else { + result = ConfigureListbox(interp, listPtr, argc-2, argv+2, + TK_CONFIG_ARGV_ONLY); + } + } else if ((c == 'c') && (strncmp(argv[1], "curselection", length) == 0) + && (length >= 2)) { + int i, count; + char index[20]; + Element *elPtr; + + if (argc != 2) { + Tcl_AppendResult(interp, "wrong # args: should be \"", + argv[0], " curselection\"", + (char *) NULL); + goto error; + } + count = 0; + for (i = 0, elPtr = listPtr->firstPtr; elPtr != NULL; + i++, elPtr = elPtr->nextPtr) { + if (elPtr->selected) { + sprintf(index, "%d", i); + Tcl_AppendElement(interp, index); + count++; + } + } + if (count != listPtr->numSelected) { + panic("ListboxWidgetCmd: selection count incorrect"); + } + } else if ((c == 'd') && (strncmp(argv[1], "delete", length) == 0)) { + int first, last; + + if ((argc < 3) || (argc > 4)) { + Tcl_AppendResult(interp, "wrong # args: should be \"", + argv[0], " delete firstIndex ?lastIndex?\"", + (char *) NULL); + goto error; + } + if (GetListboxIndex(interp, listPtr, argv[2], 0, &first) != TCL_OK) { + goto error; + } + if (first < listPtr->numElements) { + if (argc == 3) { + last = first; + } else { + if (GetListboxIndex(interp, listPtr, argv[3], 0, + &last) != TCL_OK) { + goto error; + } + if (last >= listPtr->numElements) { + last = listPtr->numElements-1; + } + } + DeleteEls(listPtr, first, last); + } + } else if ((c == 'g') && (strncmp(argv[1], "get", length) == 0)) { + int first, last, i; + Element *elPtr; + + if ((argc != 3) && (argc != 4)) { + Tcl_AppendResult(interp, "wrong # args: should be \"", + argv[0], " get first ?last?\"", (char *) NULL); + goto error; + } + if (GetListboxIndex(interp, listPtr, argv[2], 0, &first) != TCL_OK) { + goto error; + } + if ((argc == 4) && (GetListboxIndex(interp, listPtr, argv[3], + 0, &last) != TCL_OK)) { + goto error; + } + if (first >= listPtr->numElements) { + goto done; + } + if (last >= listPtr->numElements) { + last = listPtr->numElements-1; + } + + for (elPtr = listPtr->firstPtr, i = 0; i < first; + i++, elPtr = elPtr->nextPtr) { + /* Empty loop body. */ + } + if (elPtr != NULL) { + if (argc == 3) { + if (first >= 0) { + interp->result = elPtr->text; + } + } else { + for ( ; i <= last; i++, elPtr = elPtr->nextPtr) { + Tcl_AppendElement(interp, elPtr->text); + } + } + } + } else if ((c == 'i') && (strncmp(argv[1], "index", length) == 0) + && (length >= 3)) { + int index; + + if (argc != 3) { + Tcl_AppendResult(interp, "wrong # args: should be \"", + argv[0], " index index\"", + (char *) NULL); + goto error; + } + if (GetListboxIndex(interp, listPtr, argv[2], 1, &index) + != TCL_OK) { + goto error; + } + sprintf(interp->result, "%d", index); + } else if ((c == 'i') && (strncmp(argv[1], "insert", length) == 0) + && (length >= 3)) { + int index; + + if (argc < 3) { + Tcl_AppendResult(interp, "wrong # args: should be \"", + argv[0], " insert index ?element element ...?\"", + (char *) NULL); + goto error; + } + if (GetListboxIndex(interp, listPtr, argv[2], 1, &index) + != TCL_OK) { + goto error; + } + InsertEls(listPtr, index, argc-3, argv+3); + } else if ((c == 'n') && (strncmp(argv[1], "nearest", length) == 0)) { + int index, y; + + if (argc != 3) { + Tcl_AppendResult(interp, "wrong # args: should be \"", + argv[0], " nearest y\"", (char *) NULL); + goto error; + } + if (Tcl_GetInt(interp, argv[2], &y) != TCL_OK) { + goto error; + } + index = NearestListboxElement(listPtr, y); + sprintf(interp->result, "%d", index); + } else if ((c == 's') && (length >= 2) + && (strncmp(argv[1], "scan", length) == 0)) { + int x, y; + + if (argc != 5) { + Tcl_AppendResult(interp, "wrong # args: should be \"", + argv[0], " scan mark|dragto x y\"", (char *) NULL); + goto error; + } + if ((Tcl_GetInt(interp, argv[3], &x) != TCL_OK) + || (Tcl_GetInt(interp, argv[4], &y) != TCL_OK)) { + goto error; + } + if ((argv[2][0] == 'm') + && (strncmp(argv[2], "mark", strlen(argv[2])) == 0)) { + listPtr->scanMarkX = x; + listPtr->scanMarkY = y; + listPtr->scanMarkXOffset = listPtr->xOffset; + listPtr->scanMarkYIndex = listPtr->topIndex; + } else if ((argv[2][0] == 'd') + && (strncmp(argv[2], "dragto", strlen(argv[2])) == 0)) { + ListboxScanTo(listPtr, x, y); + } else { + Tcl_AppendResult(interp, "bad scan option \"", argv[2], + "\": must be mark or dragto", (char *) NULL); + goto error; + } + } else if ((c == 's') && (strncmp(argv[1], "see", length) == 0) + && (length >= 3)) { + int index, diff; + if (argc != 3) { + Tcl_AppendResult(interp, "wrong # args: should be \"", + argv[0], " see index\"", + (char *) NULL); + goto error; + } + if (GetListboxIndex(interp, listPtr, argv[2], 0, &index) != TCL_OK) { + goto error; + } + if (index >= listPtr->numElements) { + index = listPtr->numElements-1; + } + if (index < 0) { + index = 0; + } + diff = listPtr->topIndex-index; + if (diff > 0) { + if (diff <= (listPtr->fullLines/3)) { + ChangeListboxView(listPtr, index); + } else { + ChangeListboxView(listPtr, index - (listPtr->fullLines-1)/2); + } + } else { + diff = index - (listPtr->topIndex + listPtr->fullLines - 1); + if (diff > 0) { + if (diff <= (listPtr->fullLines/3)) { + ChangeListboxView(listPtr, listPtr->topIndex + diff); + } else { + ChangeListboxView(listPtr, + index - (listPtr->fullLines-1)/2); + } + } + } + } else if ((c == 's') && (length >= 3) + && (strncmp(argv[1], "selection", length) == 0)) { + int first, last; + + if ((argc != 4) && (argc != 5)) { + Tcl_AppendResult(interp, "wrong # args: should be \"", + argv[0], " selection option index ?index?\"", + (char *) NULL); + goto error; + } + if (GetListboxIndex(interp, listPtr, argv[3], 0, &first) != TCL_OK) { + goto error; + } + if (argc == 5) { + if (GetListboxIndex(interp, listPtr, argv[4], 0, &last) != TCL_OK) { + goto error; + } + } else { + last = first; + } + length = strlen(argv[2]); + c = argv[2][0]; + if ((c == 'a') && (strncmp(argv[2], "anchor", length) == 0)) { + if (argc != 4) { + Tcl_AppendResult(interp, "wrong # args: should be \"", + argv[0], " selection anchor index\"", (char *) NULL); + goto error; + } + if (first >= listPtr->numElements) { + first = listPtr->numElements-1; + } + if (first < 0) { + first = 0; + } + listPtr->selectAnchor = first; + } else if ((c == 'c') && (strncmp(argv[2], "clear", length) == 0)) { + ListboxSelect(listPtr, first, last, 0); + } else if ((c == 'i') && (strncmp(argv[2], "includes", length) == 0)) { + int i; + Element *elPtr; + + if (argc != 4) { + Tcl_AppendResult(interp, "wrong # args: should be \"", + argv[0], " selection includes index\"", (char *) NULL); + goto error; + } + if ((first < 0) || (first >= listPtr->numElements)) { + interp->result = "0"; + goto done; + } + for (elPtr = listPtr->firstPtr, i = 0; i < first; + i++, elPtr = elPtr->nextPtr) { + /* Empty loop body. */ + } + if (elPtr->selected) { + interp->result = "1"; + } else { + interp->result = "0"; + } + } else if ((c == 's') && (strncmp(argv[2], "set", length) == 0)) { + ListboxSelect(listPtr, first, last, 1); + } else { + Tcl_AppendResult(interp, "bad selection option \"", argv[2], + "\": must be anchor, clear, includes, or set", + (char *) NULL); + goto error; + } + } else if ((c == 's') && (length >= 2) + && (strncmp(argv[1], "size", length) == 0)) { + if (argc != 2) { + Tcl_AppendResult(interp, "wrong # args: should be \"", + argv[0], " size\"", (char *) NULL); + goto error; + } + sprintf(interp->result, "%d", listPtr->numElements); + } else if ((c == 'x') && (strncmp(argv[1], "xview", length) == 0)) { + int index, count, type, windowWidth, windowUnits; + int offset = 0; /* Initialized to stop gcc warnings. */ + double fraction, fraction2; + + windowWidth = Tk_Width(listPtr->tkwin) + - 2*(listPtr->inset + listPtr->selBorderWidth); + if (argc == 2) { + if (listPtr->maxWidth == 0) { + interp->result = "0 1"; + } else { + fraction = listPtr->xOffset/((double) listPtr->maxWidth); + fraction2 = (listPtr->xOffset + windowWidth) + /((double) listPtr->maxWidth); + if (fraction2 > 1.0) { + fraction2 = 1.0; + } + sprintf(interp->result, "%g %g", fraction, fraction2); + } + } else if (argc == 3) { + if (Tcl_GetInt(interp, argv[2], &index) != TCL_OK) { + goto error; + } + ChangeListboxOffset(listPtr, index*listPtr->xScrollUnit); + } else { + type = Tk_GetScrollInfo(interp, argc, argv, &fraction, &count); + switch (type) { + case TK_SCROLL_ERROR: + goto error; + case TK_SCROLL_MOVETO: + offset = (int) (fraction*listPtr->maxWidth + 0.5); + break; + case TK_SCROLL_PAGES: + windowUnits = windowWidth/listPtr->xScrollUnit; + if (windowUnits > 2) { + offset = listPtr->xOffset + + count*listPtr->xScrollUnit*(windowUnits-2); + } else { + offset = listPtr->xOffset + count*listPtr->xScrollUnit; + } + break; + case TK_SCROLL_UNITS: + offset = listPtr->xOffset + count*listPtr->xScrollUnit; + break; + } + ChangeListboxOffset(listPtr, offset); + } + } else if ((c == 'y') && (strncmp(argv[1], "yview", length) == 0)) { + int index, count, type; + double fraction, fraction2; + + if (argc == 2) { + if (listPtr->numElements == 0) { + interp->result = "0 1"; + } else { + fraction = listPtr->topIndex/((double) listPtr->numElements); + fraction2 = (listPtr->topIndex+listPtr->fullLines) + /((double) listPtr->numElements); + if (fraction2 > 1.0) { + fraction2 = 1.0; + } + sprintf(interp->result, "%g %g", fraction, fraction2); + } + } else if (argc == 3) { + if (GetListboxIndex(interp, listPtr, argv[2], 0, &index) + != TCL_OK) { + goto error; + } + ChangeListboxView(listPtr, index); + } else { + type = Tk_GetScrollInfo(interp, argc, argv, &fraction, &count); + switch (type) { + case TK_SCROLL_ERROR: + goto error; + case TK_SCROLL_MOVETO: + index = (int) (listPtr->numElements*fraction + 0.5); + break; + case TK_SCROLL_PAGES: + if (listPtr->fullLines > 2) { + index = listPtr->topIndex + + count*(listPtr->fullLines-2); + } else { + index = listPtr->topIndex + count; + } + break; + case TK_SCROLL_UNITS: + index = listPtr->topIndex + count; + break; + } + ChangeListboxView(listPtr, index); + } + } else { + Tcl_AppendResult(interp, "bad option \"", argv[1], + "\": must be activate, bbox, cget, configure, ", + "curselection, delete, get, index, insert, nearest, ", + "scan, see, selection, size, ", + "xview, or yview", (char *) NULL); + goto error; + } + done: + Tcl_Release((ClientData) listPtr); + return result; + + error: + Tcl_Release((ClientData) listPtr); + return TCL_ERROR; + } + + /* + *---------------------------------------------------------------------- + * + * DestroyListbox -- + * + * This procedure is invoked by Tcl_EventuallyFree or Tcl_Release + * to clean up the internal structure of a listbox at a safe time + * (when no-one is using it anymore). + * + * Results: + * None. + * + * Side effects: + * Everything associated with the listbox is freed up. + * + *---------------------------------------------------------------------- + */ + + static void + DestroyListbox(memPtr) + char *memPtr; /* Info about listbox widget. */ + { + register Listbox *listPtr = (Listbox *) memPtr; + register Element *elPtr, *nextPtr; + + /* + * Free up all of the list elements. + */ + + for (elPtr = listPtr->firstPtr; elPtr != NULL; ) { + nextPtr = elPtr->nextPtr; + ckfree((char *) elPtr); + elPtr = nextPtr; + } + + /* + * Free up all the stuff that requires special handling, then + * let Tk_FreeOptions handle all the standard option-related + * stuff. + */ + + if (listPtr->textGC != None) { + Tk_FreeGC(listPtr->display, listPtr->textGC); + } + if (listPtr->selTextGC != None) { + Tk_FreeGC(listPtr->display, listPtr->selTextGC); + } + Tk_FreeOptions(configSpecs, (char *) listPtr, listPtr->display, 0); + ckfree((char *) listPtr); + } + + /* + *---------------------------------------------------------------------- + * + * ConfigureListbox -- + * + * This procedure is called to process an argv/argc list, plus + * the Tk option database, in order to configure (or reconfigure) + * a listbox widget. + * + * Results: + * The return value is a standard Tcl result. If TCL_ERROR is + * returned, then interp->result contains an error message. + * + * Side effects: + * Configuration information, such as colors, border width, + * etc. get set for listPtr; old resources get freed, + * if there were any. + * + *---------------------------------------------------------------------- + */ + + static int + ConfigureListbox(interp, listPtr, argc, argv, flags) + Tcl_Interp *interp; /* Used for error reporting. */ + register Listbox *listPtr; /* Information about widget; may or may + * not already have values for some fields. */ + int argc; /* Number of valid entries in argv. */ + char **argv; /* Arguments. */ + int flags; /* Flags to pass to Tk_ConfigureWidget. */ + { + int oldExport; + + oldExport = listPtr->exportSelection; + if (Tk_ConfigureWidget(interp, listPtr->tkwin, configSpecs, + argc, argv, (char *) listPtr, flags) != TCL_OK) { + return TCL_ERROR; + } + + /* + * A few options need special processing, such as setting the + * background from a 3-D border. + */ + + Tk_SetBackgroundFromBorder(listPtr->tkwin, listPtr->normalBorder); + + if (listPtr->highlightWidth < 0) { + listPtr->highlightWidth = 0; + } + listPtr->inset = listPtr->highlightWidth + listPtr->borderWidth; + + /* + * Claim the selection if we've suddenly started exporting it and + * there is a selection to export. + */ + + if (listPtr->exportSelection && !oldExport + && (listPtr->numSelected != 0)) { + Tk_OwnSelection(listPtr->tkwin, XA_PRIMARY, ListboxLostSelection, + (ClientData) listPtr); + } + + ListboxWorldChanged((ClientData) listPtr); + return TCL_OK; + } + + /* + *--------------------------------------------------------------------------- + * + * ListboxWorldChanged -- + * + * This procedure is called when the world has changed in some + * way and the widget needs to recompute all its graphics contexts + * and determine its new geometry. + * + * Results: + * None. + * + * Side effects: + * Listbox will be relayed out and redisplayed. + * + *--------------------------------------------------------------------------- + */ + + static void + ListboxWorldChanged(instanceData) + ClientData instanceData; /* Information about widget. */ + { + XGCValues gcValues; + GC gc; + unsigned long mask; + Listbox *listPtr; + + listPtr = (Listbox *) instanceData; + + gcValues.foreground = listPtr->fgColorPtr->pixel; + gcValues.font = Tk_FontId(listPtr->tkfont); + gcValues.graphics_exposures = False; + mask = GCForeground | GCFont | GCGraphicsExposures; + gc = Tk_GetGC(listPtr->tkwin, mask, &gcValues); + if (listPtr->textGC != None) { + Tk_FreeGC(listPtr->display, listPtr->textGC); + } + listPtr->textGC = gc; + + gcValues.foreground = listPtr->selFgColorPtr->pixel; + gcValues.font = Tk_FontId(listPtr->tkfont); + mask = GCForeground | GCFont; + gc = Tk_GetGC(listPtr->tkwin, mask, &gcValues); + if (listPtr->selTextGC != None) { + Tk_FreeGC(listPtr->display, listPtr->selTextGC); + } + listPtr->selTextGC = gc; + + /* + * Register the desired geometry for the window and arrange for + * the window to be redisplayed. + */ + + ListboxComputeGeometry(listPtr, 1, 1, 1); + listPtr->flags |= UPDATE_V_SCROLLBAR|UPDATE_H_SCROLLBAR; + ListboxRedrawRange(listPtr, 0, listPtr->numElements-1); + } + + /* + *-------------------------------------------------------------- + * + * DisplayListbox -- + * + * This procedure redraws the contents of a listbox window. + * + * Results: + * None. + * + * Side effects: + * Information appears on the screen. + * + *-------------------------------------------------------------- + */ + + static void + DisplayListbox(clientData) + ClientData clientData; /* Information about window. */ + { + register Listbox *listPtr = (Listbox *) clientData; + register Tk_Window tkwin = listPtr->tkwin; + register Element *elPtr; + GC gc; + int i, limit, x, y, width, prevSelected; + Tk_FontMetrics fm; + int left, right; /* Non-zero values here indicate + * that the left or right edge of + * the listbox is off-screen. */ + Pixmap pixmap; + + listPtr->flags &= ~REDRAW_PENDING; + if (listPtr->flags & UPDATE_V_SCROLLBAR) { + ListboxUpdateVScrollbar(listPtr); + } + if (listPtr->flags & UPDATE_H_SCROLLBAR) { + ListboxUpdateHScrollbar(listPtr); + } + listPtr->flags &= ~(REDRAW_PENDING|UPDATE_V_SCROLLBAR|UPDATE_H_SCROLLBAR); + if ((listPtr->tkwin == NULL) || !Tk_IsMapped(tkwin)) { + return; + } + + /* + * Redrawing is done in a temporary pixmap that is allocated + * here and freed at the end of the procedure. All drawing is + * done to the pixmap, and the pixmap is copied to the screen + * at the end of the procedure. This provides the smoothest + * possible visual effects (no flashing on the screen). + */ + + pixmap = Tk_GetPixmap(listPtr->display, Tk_WindowId(tkwin), + Tk_Width(tkwin), Tk_Height(tkwin), Tk_Depth(tkwin)); + Tk_Fill3DRectangle(tkwin, pixmap, listPtr->normalBorder, 0, 0, + Tk_Width(tkwin), Tk_Height(tkwin), 0, TK_RELIEF_FLAT); + + /* + * Iterate through all of the elements of the listbox, displaying each + * in turn. Selected elements use a different GC and have a raised + * background. + */ + + limit = listPtr->topIndex + listPtr->fullLines + listPtr->partialLine - 1; + if (limit >= listPtr->numElements) { + limit = listPtr->numElements-1; + } + left = right = 0; + if (listPtr->xOffset > 0) { + left = listPtr->selBorderWidth+1; + } + if ((listPtr->maxWidth - listPtr->xOffset) > (Tk_Width(listPtr->tkwin) + - 2*(listPtr->inset + listPtr->selBorderWidth))) { + right = listPtr->selBorderWidth+1; + } + prevSelected = 0; + for (elPtr = listPtr->firstPtr, i = 0; (elPtr != NULL) && (i <= limit); + prevSelected = elPtr->selected, elPtr = elPtr->nextPtr, i++) { + if (i < listPtr->topIndex) { + continue; + } + x = listPtr->inset; + y = ((i - listPtr->topIndex) * listPtr->lineHeight) + + listPtr->inset; + gc = listPtr->textGC; + if (elPtr->selected) { + gc = listPtr->selTextGC; + width = Tk_Width(tkwin) - 2*listPtr->inset; + Tk_Fill3DRectangle(tkwin, pixmap, listPtr->selBorder, x, y, + width, listPtr->lineHeight, 0, TK_RELIEF_FLAT); + + /* + * Draw beveled edges around the selection, if there are visible + * edges next to this element. Special considerations: + * 1. The left and right bevels may not be visible if horizontal + * scrolling is enabled (the "left" and "right" variables + * are zero to indicate that the corresponding bevel is + * visible). + * 2. Top and bottom bevels are only drawn if this is the + * first or last seleted item. + * 3. If the left or right bevel isn't visible, then the "left" + * and "right" variables, computed above, have non-zero values + * that extend the top and bottom bevels so that the mitered + * corners are off-screen. + */ + + if (left == 0) { + Tk_3DVerticalBevel(tkwin, pixmap, listPtr->selBorder, + x, y, listPtr->selBorderWidth, listPtr->lineHeight, + 1, TK_RELIEF_RAISED); + } + if (right == 0) { + Tk_3DVerticalBevel(tkwin, pixmap, listPtr->selBorder, + x + width - listPtr->selBorderWidth, y, + listPtr->selBorderWidth, listPtr->lineHeight, + 0, TK_RELIEF_RAISED); + } + if (!prevSelected) { + Tk_3DHorizontalBevel(tkwin, pixmap, listPtr->selBorder, + x-left, y, width+left+right, listPtr->selBorderWidth, + 1, 1, 1, TK_RELIEF_RAISED); + } + if ((elPtr->nextPtr == NULL) || !elPtr->nextPtr->selected) { + Tk_3DHorizontalBevel(tkwin, pixmap, listPtr->selBorder, x-left, + y + listPtr->lineHeight - listPtr->selBorderWidth, + width+left+right, listPtr->selBorderWidth, 0, 0, 0, + TK_RELIEF_RAISED); + } + } + Tk_GetFontMetrics(listPtr->tkfont, &fm); + y += fm.ascent + listPtr->selBorderWidth; + x = listPtr->inset + listPtr->selBorderWidth - elPtr->lBearing + - listPtr->xOffset; + Tk_DrawChars(listPtr->display, pixmap, gc, listPtr->tkfont, + elPtr->text, elPtr->textLength, x, y); + + #ifdef ENABLE_STEP + if (elPtr->arrow) + { + int tx, ty; + GC lightGC, darkGC, dark2GC; + + tx = listPtr->width*listPtr->xScrollUnit /* + */ - 6*listPtr->inset - 12; + ty = y - fm.ascent/2 - 3; + + lightGC = Tk_3DBorderGC(listPtr->tkwin, + elPtr->selected?listPtr->selBorder:listPtr->normalBorder, + TK_3D_LIGHT_GC); + darkGC = Tk_3DBorderGC(listPtr->tkwin, + elPtr->selected?listPtr->selBorder:listPtr->normalBorder, + TK_3D_DARK_GC); + dark2GC = Tk_3DBorderGC(listPtr->tkwin, + elPtr->selected?listPtr->selBorder:listPtr->normalBorder, + TK_3D_DARK2_GC); + + XDrawLine(listPtr->display, pixmap, darkGC, + tx, ty-1, tx+7, ty+3); + XDrawLine(listPtr->display, pixmap, lightGC, + tx, ty+7, tx+7, ty+3); + XDrawLine(listPtr->display, pixmap, dark2GC, + tx, ty, tx, ty+6); + } + #endif + + /* + * If this is the active element, underline it. + */ + + if ((i == listPtr->active) && (listPtr->flags & GOT_FOCUS)) { + Tk_UnderlineChars(listPtr->display, pixmap, gc, listPtr->tkfont, + elPtr->text, x, y, 0, elPtr->textLength); + } + } + + /* + * Redraw the border for the listbox to make sure that it's on top + * of any of the text of the listbox entries. + */ + + Tk_Draw3DRectangle(tkwin, pixmap, listPtr->normalBorder, + listPtr->highlightWidth, listPtr->highlightWidth, + Tk_Width(tkwin) - 2*listPtr->highlightWidth, + Tk_Height(tkwin) - 2*listPtr->highlightWidth, + listPtr->borderWidth, listPtr->relief); + if (listPtr->highlightWidth > 0) { + GC gc; + + if (listPtr->flags & GOT_FOCUS) { + gc = Tk_GCForColor(listPtr->highlightColorPtr, pixmap); + } else { + gc = Tk_GCForColor(listPtr->highlightBgColorPtr, pixmap); + } + Tk_DrawFocusHighlight(tkwin, gc, listPtr->highlightWidth, pixmap); + } + XCopyArea(listPtr->display, pixmap, Tk_WindowId(tkwin), + listPtr->textGC, 0, 0, (unsigned) Tk_Width(tkwin), + (unsigned) Tk_Height(tkwin), 0, 0); + Tk_FreePixmap(listPtr->display, pixmap); + } + + /* + *---------------------------------------------------------------------- + * + * ListboxComputeGeometry -- + * + * This procedure is invoked to recompute geometry information + * such as the sizes of the elements and the overall dimensions + * desired for the listbox. + * + * Results: + * None. + * + * Side effects: + * Geometry information is updated and a new requested size is + * registered for the widget. Internal border and gridding + * information is also set. + * + *---------------------------------------------------------------------- + */ + + static void + ListboxComputeGeometry(listPtr, fontChanged, maxIsStale, updateGrid) + Listbox *listPtr; /* Listbox whose geometry is to be + * recomputed. */ + int fontChanged; /* Non-zero means the font may have changed + * so per-element width information also + * has to be computed. */ + int maxIsStale; /* Non-zero means the "maxWidth" field may + * no longer be up-to-date and must + * be recomputed. If fontChanged is 1 then + * this must be 1. */ + int updateGrid; /* Non-zero means call Tk_SetGrid or + * Tk_UnsetGrid to update gridding for + * the window. */ + { + register Element *elPtr; + int width, height, pixelWidth, pixelHeight; + Tk_FontMetrics fm; + + if (fontChanged || maxIsStale) { + listPtr->xScrollUnit = Tk_TextWidth(listPtr->tkfont, "0", 1); + if (listPtr->xScrollUnit == 0) { + listPtr->xScrollUnit = 1; + } + listPtr->maxWidth = 0; + for (elPtr = listPtr->firstPtr; elPtr != NULL; elPtr = elPtr->nextPtr) { + if (fontChanged) { + elPtr->pixelWidth = Tk_TextWidth(listPtr->tkfont, + elPtr->text, elPtr->textLength); + elPtr->lBearing = 0; + } + if (elPtr->pixelWidth > listPtr->maxWidth) { + listPtr->maxWidth = elPtr->pixelWidth; + } + } + } + + Tk_GetFontMetrics(listPtr->tkfont, &fm); + listPtr->lineHeight = fm.linespace + 1 + 2*listPtr->selBorderWidth; + #ifdef ENABLE_STEP + if (listPtr->lineHeight < 11) + listPtr->lineHeight = 11; + #endif + width = listPtr->width; + if (width <= 0) { + width = (listPtr->maxWidth + listPtr->xScrollUnit - 1) + /listPtr->xScrollUnit; + if (width < 1) { + width = 1; + } + } + pixelWidth = width*listPtr->xScrollUnit + 2*listPtr->inset + + 2*listPtr->selBorderWidth; + height = listPtr->height; + if (listPtr->height <= 0) { + height = listPtr->numElements; + if (height < 1) { + height = 1; + } + } + pixelHeight = height*listPtr->lineHeight + 2*listPtr->inset; + Tk_GeometryRequest(listPtr->tkwin, pixelWidth, pixelHeight); + Tk_SetInternalBorder(listPtr->tkwin, listPtr->inset); + if (updateGrid) { + if (listPtr->setGrid) { + Tk_SetGrid(listPtr->tkwin, width, height, listPtr->xScrollUnit, + listPtr->lineHeight); + } else { + Tk_UnsetGrid(listPtr->tkwin); + } + } + } + + /* + *---------------------------------------------------------------------- + * + * InsertEls -- + * + * Add new elements to a listbox widget. + * + * Results: + * None. + * + * Side effects: + * New information gets added to listPtr; it will be redisplayed + * soon, but not immediately. + * + *---------------------------------------------------------------------- + */ + + static void + InsertEls(listPtr, index, argc, argv) + register Listbox *listPtr; /* Listbox that is to get the new + * elements. */ + int index; /* Add the new elements before this + * element. */ + int argc; /* Number of new elements to add. */ + char **argv; /* New elements (one per entry). */ + { + register Element *prevPtr, *newPtr; + int length, i, oldMaxWidth; + #ifdef ENABLE_STEP + int arrow; + #endif + + /* + * Find the element before which the new ones will be inserted. + */ + + if (index <= 0) { + index = 0; + } + if (index > listPtr->numElements) { + index = listPtr->numElements; + } + if (index == 0) { + prevPtr = NULL; + } else if (index == listPtr->numElements) { + prevPtr = listPtr->lastPtr; + } else { + for (prevPtr = listPtr->firstPtr, i = index - 1; i > 0; i--) { + prevPtr = prevPtr->nextPtr; + } + } + + /* + * For each new element, create a record, initialize it, and link + * it into the list of elements. + */ + + oldMaxWidth = listPtr->maxWidth; + for (i = argc ; i > 0; i--, argv++, prevPtr = newPtr) { + length = strlen(*argv); + #ifdef ENABLE_STEP + if (strcmp(*argv+length-3," ->") == 0) { + arrow = 1; + length -= 3; + (*argv)[length] = 0; + } else + arrow = 0; + #endif + newPtr = (Element *) ckalloc(ElementSize(length)); + newPtr->textLength = length; + strcpy(newPtr->text, *argv); + newPtr->pixelWidth = Tk_TextWidth(listPtr->tkfont, newPtr->text, + newPtr->textLength); + newPtr->lBearing = 0; + #ifdef ENABLE_STEP + newPtr->arrow = arrow; + if (newPtr->arrow) + newPtr->pixelWidth += 16; + #endif + if (newPtr->pixelWidth > listPtr->maxWidth) { + listPtr->maxWidth = newPtr->pixelWidth; + } + newPtr->selected = 0; + if (prevPtr == NULL) { + newPtr->nextPtr = listPtr->firstPtr; + listPtr->firstPtr = newPtr; + } else { + newPtr->nextPtr = prevPtr->nextPtr; + prevPtr->nextPtr = newPtr; + } + } + if ((prevPtr != NULL) && (prevPtr->nextPtr == NULL)) { + listPtr->lastPtr = prevPtr; + } + listPtr->numElements += argc; + + /* + * Update the selection and other indexes to account for the + * renumbering that has just occurred. Then arrange for the new + * information to be displayed. + */ + + if (index <= listPtr->selectAnchor) { + listPtr->selectAnchor += argc; + } + if (index < listPtr->topIndex) { + listPtr->topIndex += argc; + } + if (index <= listPtr->active) { + listPtr->active += argc; + if ((listPtr->active >= listPtr->numElements) + && (listPtr->numElements > 0)) { + listPtr->active = listPtr->numElements-1; + } + } + listPtr->flags |= UPDATE_V_SCROLLBAR; + if (listPtr->maxWidth != oldMaxWidth) { + listPtr->flags |= UPDATE_H_SCROLLBAR; + } + ListboxComputeGeometry(listPtr, 0, 0, 0); + ListboxRedrawRange(listPtr, index, listPtr->numElements-1); + } + + /* + *---------------------------------------------------------------------- + * + * DeleteEls -- + * + * Remove one or more elements from a listbox widget. + * + * Results: + * None. + * + * Side effects: + * Memory gets freed, the listbox gets modified and (eventually) + * redisplayed. + * + *---------------------------------------------------------------------- + */ + + static void + DeleteEls(listPtr, first, last) + register Listbox *listPtr; /* Listbox widget to modify. */ + int first; /* Index of first element to delete. */ + int last; /* Index of last element to delete. */ + { + register Element *prevPtr, *elPtr; + int count, i, widthChanged; + + /* + * Adjust the range to fit within the existing elements of the + * listbox, and make sure there's something to delete. + */ + + if (first < 0) { + first = 0; + } + if (last >= listPtr->numElements) { + last = listPtr->numElements-1; + } + count = last + 1 - first; + if (count <= 0) { + return; + } + + /* + * Find the element just before the ones to delete. + */ + + if (first == 0) { + prevPtr = NULL; + } else { + for (i = first-1, prevPtr = listPtr->firstPtr; i > 0; i--) { + prevPtr = prevPtr->nextPtr; + } + } + + /* + * Delete the requested number of elements. + */ + + widthChanged = 0; + for (i = count; i > 0; i--) { + if (prevPtr == NULL) { + elPtr = listPtr->firstPtr; + listPtr->firstPtr = elPtr->nextPtr; + if (listPtr->firstPtr == NULL) { + listPtr->lastPtr = NULL; + } + } else { + elPtr = prevPtr->nextPtr; + prevPtr->nextPtr = elPtr->nextPtr; + if (prevPtr->nextPtr == NULL) { + listPtr->lastPtr = prevPtr; + } + } + if (elPtr->pixelWidth == listPtr->maxWidth) { + widthChanged = 1; + } + if (elPtr->selected) { + listPtr->numSelected -= 1; + } + ckfree((char *) elPtr); + } + listPtr->numElements -= count; + + /* + * Update the selection and viewing information to reflect the change + * in the element numbering, and redisplay to slide information up over + * the elements that were deleted. + */ + + if (first <= listPtr->selectAnchor) { + listPtr->selectAnchor -= count; + if (listPtr->selectAnchor < first) { + listPtr->selectAnchor = first; + } + } + if (first <= listPtr->topIndex) { + listPtr->topIndex -= count; + if (listPtr->topIndex < first) { + listPtr->topIndex = first; + } + } + if (listPtr->topIndex > (listPtr->numElements - listPtr->fullLines)) { + listPtr->topIndex = listPtr->numElements - listPtr->fullLines; + if (listPtr->topIndex < 0) { + listPtr->topIndex = 0; + } + } + if (listPtr->active > last) { + listPtr->active -= count; + } else if (listPtr->active >= first) { + listPtr->active = first; + if ((listPtr->active >= listPtr->numElements) + && (listPtr->numElements > 0)) { + listPtr->active = listPtr->numElements-1; + } + } + listPtr->flags |= UPDATE_V_SCROLLBAR; + ListboxComputeGeometry(listPtr, 0, widthChanged, 0); + if (widthChanged) { + listPtr->flags |= UPDATE_H_SCROLLBAR; + } + ListboxRedrawRange(listPtr, first, listPtr->numElements-1); + } + + /* + *-------------------------------------------------------------- + * + * ListboxEventProc -- + * + * This procedure is invoked by the Tk dispatcher for various + * events on listboxes. + * + * Results: + * None. + * + * Side effects: + * When the window gets deleted, internal structures get + * cleaned up. When it gets exposed, it is redisplayed. + * + *-------------------------------------------------------------- + */ + + static void + ListboxEventProc(clientData, eventPtr) + ClientData clientData; /* Information about window. */ + XEvent *eventPtr; /* Information about event. */ + { + Listbox *listPtr = (Listbox *) clientData; + + if (eventPtr->type == Expose) { + ListboxRedrawRange(listPtr, + NearestListboxElement(listPtr, eventPtr->xexpose.y), + NearestListboxElement(listPtr, eventPtr->xexpose.y + + eventPtr->xexpose.height)); + } else if (eventPtr->type == DestroyNotify) { + if (listPtr->tkwin != NULL) { + if (listPtr->setGrid) { + Tk_UnsetGrid(listPtr->tkwin); + } + listPtr->tkwin = NULL; + Tcl_DeleteCommandFromToken(listPtr->interp, listPtr->widgetCmd); + } + if (listPtr->flags & REDRAW_PENDING) { + Tcl_CancelIdleCall(DisplayListbox, (ClientData) listPtr); + } + Tcl_EventuallyFree((ClientData) listPtr, DestroyListbox); + } else if (eventPtr->type == ConfigureNotify) { + int vertSpace; + + vertSpace = Tk_Height(listPtr->tkwin) - 2*listPtr->inset; + listPtr->fullLines = vertSpace / listPtr->lineHeight; + if ((listPtr->fullLines*listPtr->lineHeight) < vertSpace) { + listPtr->partialLine = 1; + } else { + listPtr->partialLine = 0; + } + listPtr->flags |= UPDATE_V_SCROLLBAR|UPDATE_H_SCROLLBAR; + ChangeListboxView(listPtr, listPtr->topIndex); + ChangeListboxOffset(listPtr, listPtr->xOffset); + + /* + * Redraw the whole listbox. It's hard to tell what needs + * to be redrawn (e.g. if the listbox has shrunk then we + * may only need to redraw the borders), so just redraw + * everything for safety. + */ + + ListboxRedrawRange(listPtr, 0, listPtr->numElements-1); + } else if (eventPtr->type == FocusIn) { + if (eventPtr->xfocus.detail != NotifyInferior) { + listPtr->flags |= GOT_FOCUS; + ListboxRedrawRange(listPtr, 0, listPtr->numElements-1); + } + } else if (eventPtr->type == FocusOut) { + if (eventPtr->xfocus.detail != NotifyInferior) { + listPtr->flags &= ~GOT_FOCUS; + ListboxRedrawRange(listPtr, 0, listPtr->numElements-1); + } + } + } + + /* + *---------------------------------------------------------------------- + * + * ListboxCmdDeletedProc -- + * + * This procedure is invoked when a widget command is deleted. If + * the widget isn't already in the process of being destroyed, + * this command destroys it. + * + * Results: + * None. + * + * Side effects: + * The widget is destroyed. + * + *---------------------------------------------------------------------- + */ + + static void + ListboxCmdDeletedProc(clientData) + ClientData clientData; /* Pointer to widget record for widget. */ + { + Listbox *listPtr = (Listbox *) clientData; + Tk_Window tkwin = listPtr->tkwin; + + /* + * This procedure could be invoked either because the window was + * destroyed and the command was then deleted (in which case tkwin + * is NULL) or because the command was deleted, and then this procedure + * destroys the widget. + */ + + if (tkwin != NULL) { + if (listPtr->setGrid) { + Tk_UnsetGrid(listPtr->tkwin); + } + listPtr->tkwin = NULL; + Tk_DestroyWindow(tkwin); + } + } + + /* + *-------------------------------------------------------------- + * + * GetListboxIndex -- + * + * Parse an index into a listbox and return either its value + * or an error. + * + * Results: + * A standard Tcl result. If all went well, then *indexPtr is + * filled in with the index (into listPtr) corresponding to + * string. Otherwise an error message is left in interp->result. + * + * Side effects: + * None. + * + *-------------------------------------------------------------- + */ + + static int + GetListboxIndex(interp, listPtr, string, endIsSize, indexPtr) + Tcl_Interp *interp; /* For error messages. */ + Listbox *listPtr; /* Listbox for which the index is being + * specified. */ + char *string; /* Specifies an element in the listbox. */ + int endIsSize; /* If 1, "end" refers to the number of + * entries in the listbox. If 0, "end" + * refers to 1 less than the number of + * entries. */ + int *indexPtr; /* Where to store converted index. */ + { + int c; + size_t length; + + length = strlen(string); + c = string[0]; + if ((c == 'a') && (strncmp(string, "active", length) == 0) + && (length >= 2)) { + *indexPtr = listPtr->active; + } else if ((c == 'a') && (strncmp(string, "anchor", length) == 0) + && (length >= 2)) { + *indexPtr = listPtr->selectAnchor; + } else if ((c == 'e') && (strncmp(string, "end", length) == 0)) { + if (endIsSize) { + *indexPtr = listPtr->numElements; + } else { + *indexPtr = listPtr->numElements - 1; + } + } else if (c == '@') { + int y; + char *p, *end; + + p = string+1; + strtol(p, &end, 0); + if ((end == p) || (*end != ',')) { + goto badIndex; + } + p = end+1; + y = strtol(p, &end, 0); + if ((end == p) || (*end != 0)) { + goto badIndex; + } + *indexPtr = NearestListboxElement(listPtr, y); + } else { + if (Tcl_GetInt(interp, string, indexPtr) != TCL_OK) { + Tcl_ResetResult(interp); + goto badIndex; + } + } + return TCL_OK; + + badIndex: + Tcl_AppendResult(interp, "bad listbox index \"", string, + "\": must be active, anchor, end, @x,y, or a number", + (char *) NULL); + return TCL_ERROR; + } + + /* + *---------------------------------------------------------------------- + * + * ChangeListboxView -- + * + * Change the view on a listbox widget so that a given element + * is displayed at the top. + * + * Results: + * None. + * + * Side effects: + * What's displayed on the screen is changed. If there is a + * scrollbar associated with this widget, then the scrollbar + * is instructed to change its display too. + * + *---------------------------------------------------------------------- + */ + + static void + ChangeListboxView(listPtr, index) + register Listbox *listPtr; /* Information about widget. */ + int index; /* Index of element in listPtr + * that should now appear at the + * top of the listbox. */ + { + if (index >= (listPtr->numElements - listPtr->fullLines)) { + index = listPtr->numElements - listPtr->fullLines; + } + if (index < 0) { + index = 0; + } + if (listPtr->topIndex != index) { + listPtr->topIndex = index; + if (!(listPtr->flags & REDRAW_PENDING)) { + Tcl_DoWhenIdle(DisplayListbox, (ClientData) listPtr); + listPtr->flags |= REDRAW_PENDING; + } + listPtr->flags |= UPDATE_V_SCROLLBAR; + } + } + + /* + *---------------------------------------------------------------------- + * + * ChangListboxOffset -- + * + * Change the horizontal offset for a listbox. + * + * Results: + * None. + * + * Side effects: + * The listbox may be redrawn to reflect its new horizontal + * offset. + * + *---------------------------------------------------------------------- + */ + + static void + ChangeListboxOffset(listPtr, offset) + register Listbox *listPtr; /* Information about widget. */ + int offset; /* Desired new "xOffset" for + * listbox. */ + { + int maxOffset; + + /* + * Make sure that the new offset is within the allowable range, and + * round it off to an even multiple of xScrollUnit. + */ + + maxOffset = listPtr->maxWidth - (Tk_Width(listPtr->tkwin) - + 2*listPtr->inset - 2*listPtr->selBorderWidth) + + listPtr->xScrollUnit - 1; + if (offset > maxOffset) { + offset = maxOffset; + } + if (offset < 0) { + offset = 0; + } + offset -= offset % listPtr->xScrollUnit; + if (offset != listPtr->xOffset) { + listPtr->xOffset = offset; + listPtr->flags |= UPDATE_H_SCROLLBAR; + ListboxRedrawRange(listPtr, 0, listPtr->numElements); + } + } + + /* + *---------------------------------------------------------------------- + * + * ListboxScanTo -- + * + * Given a point (presumably of the curent mouse location) + * drag the view in the window to implement the scan operation. + * + * Results: + * None. + * + * Side effects: + * The view in the window may change. + * + *---------------------------------------------------------------------- + */ + + static void + ListboxScanTo(listPtr, x, y) + register Listbox *listPtr; /* Information about widget. */ + int x; /* X-coordinate to use for scan + * operation. */ + int y; /* Y-coordinate to use for scan + * operation. */ + { + int newTopIndex, newOffset, maxIndex, maxOffset; + + maxIndex = listPtr->numElements - listPtr->fullLines; + maxOffset = listPtr->maxWidth + (listPtr->xScrollUnit - 1) + - (Tk_Width(listPtr->tkwin) - 2*listPtr->inset + - 2*listPtr->selBorderWidth - listPtr->xScrollUnit); + + /* + * Compute new top line for screen by amplifying the difference + * between the current position and the place where the scan + * started (the "mark" position). If we run off the top or bottom + * of the list, then reset the mark point so that the current + * position continues to correspond to the edge of the window. + * This means that the picture will start dragging as soon as the + * mouse reverses direction (without this reset, might have to slide + * mouse a long ways back before the picture starts moving again). + */ + + newTopIndex = listPtr->scanMarkYIndex + - (10*(y - listPtr->scanMarkY))/listPtr->lineHeight; + if (newTopIndex > maxIndex) { + newTopIndex = listPtr->scanMarkYIndex = maxIndex; + listPtr->scanMarkY = y; + } else if (newTopIndex < 0) { + newTopIndex = listPtr->scanMarkYIndex = 0; + listPtr->scanMarkY = y; + } + ChangeListboxView(listPtr, newTopIndex); + + /* + * Compute new left edge for display in a similar fashion by amplifying + * the difference between the current position and the place where the + * scan started. + */ + + newOffset = listPtr->scanMarkXOffset - (10*(x - listPtr->scanMarkX)); + if (newOffset > maxOffset) { + newOffset = listPtr->scanMarkXOffset = maxOffset; + listPtr->scanMarkX = x; + } else if (newOffset < 0) { + newOffset = listPtr->scanMarkXOffset = 0; + listPtr->scanMarkX = x; + } + ChangeListboxOffset(listPtr, newOffset); + } + + /* + *---------------------------------------------------------------------- + * + * NearestListboxElement -- + * + * Given a y-coordinate inside a listbox, compute the index of + * the element under that y-coordinate (or closest to that + * y-coordinate). + * + * Results: + * The return value is an index of an element of listPtr. If + * listPtr has no elements, then 0 is always returned. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- + */ + + static int + NearestListboxElement(listPtr, y) + register Listbox *listPtr; /* Information about widget. */ + int y; /* Y-coordinate in listPtr's window. */ + { + int index; + + index = (y - listPtr->inset)/listPtr->lineHeight; + if (index >= (listPtr->fullLines + listPtr->partialLine)) { + index = listPtr->fullLines + listPtr->partialLine - 1; + } + if (index < 0) { + index = 0; + } + index += listPtr->topIndex; + if (index >= listPtr->numElements) { + index = listPtr->numElements-1; + } + return index; + } + + /* + *---------------------------------------------------------------------- + * + * ListboxSelect -- + * + * Select or deselect one or more elements in a listbox.. + * + * Results: + * None. + * + * Side effects: + * All of the elements in the range between first and last are + * marked as either selected or deselected, depending on the + * "select" argument. Any items whose state changes are redisplayed. + * The selection is claimed from X when the number of selected + * elements changes from zero to non-zero. + * + *---------------------------------------------------------------------- + */ + + static void + ListboxSelect(listPtr, first, last, select) + register Listbox *listPtr; /* Information about widget. */ + int first; /* Index of first element to + * select or deselect. */ + int last; /* Index of last element to + * select or deselect. */ + int select; /* 1 means select items, 0 means + * deselect them. */ + { + int i, firstRedisplay, increment, oldCount; + Element *elPtr; + + if (last < first) { + i = first; + first = last; + last = i; + } + if ((last < 0) || (first >= listPtr->numElements)) { + return; + } + if (first < 0) { + first = 0; + } + if (last >= listPtr->numElements) { + last = listPtr->numElements - 1; + } + oldCount = listPtr->numSelected; + firstRedisplay = -1; + increment = select ? 1 : -1; + for (i = 0, elPtr = listPtr->firstPtr; i < first; + i++, elPtr = elPtr->nextPtr) { + /* Empty loop body. */ + } + for ( ; i <= last; i++, elPtr = elPtr->nextPtr) { + if (elPtr->selected == select) { + continue; + } + listPtr->numSelected += increment; + elPtr->selected = select; + if (firstRedisplay < 0) { + firstRedisplay = i; + } + } + if (firstRedisplay >= 0) { + ListboxRedrawRange(listPtr, first, last); + } + if ((oldCount == 0) && (listPtr->numSelected > 0) + && (listPtr->exportSelection)) { + Tk_OwnSelection(listPtr->tkwin, XA_PRIMARY, ListboxLostSelection, + (ClientData) listPtr); + } + } + + /* + *---------------------------------------------------------------------- + * + * ListboxFetchSelection -- + * + * This procedure is called back by Tk when the selection is + * requested by someone. It returns part or all of the selection + * in a buffer provided by the caller. + * + * Results: + * The return value is the number of non-NULL bytes stored + * at buffer. Buffer is filled (or partially filled) with a + * NULL-terminated string containing part or all of the selection, + * as given by offset and maxBytes. The selection is returned + * as a Tcl list with one list element for each element in the + * listbox. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- + */ + + static int + ListboxFetchSelection(clientData, offset, buffer, maxBytes) + ClientData clientData; /* Information about listbox widget. */ + int offset; /* Offset within selection of first + * byte to be returned. */ + char *buffer; /* Location in which to place + * selection. */ + int maxBytes; /* Maximum number of bytes to place + * at buffer, not including terminating + * NULL character. */ + { + register Listbox *listPtr = (Listbox *) clientData; + register Element *elPtr; + Tcl_DString selection; + int length, count, needNewline; + + if (!listPtr->exportSelection) { + return -1; + } + + /* + * Use a dynamic string to accumulate the contents of the selection. + */ + + needNewline = 0; + Tcl_DStringInit(&selection); + for (elPtr = listPtr->firstPtr; elPtr != NULL; elPtr = elPtr->nextPtr) { + if (elPtr->selected) { + if (needNewline) { + Tcl_DStringAppend(&selection, "\n", 1); + } + Tcl_DStringAppend(&selection, elPtr->text, elPtr->textLength); + needNewline = 1; + } + } + + length = Tcl_DStringLength(&selection); + if (length == 0) { + return -1; + } + + /* + * Copy the requested portion of the selection to the buffer. + */ + + count = length - offset; + if (count <= 0) { + count = 0; + } else { + if (count > maxBytes) { + count = maxBytes; + } + memcpy((VOID *) buffer, + (VOID *) (Tcl_DStringValue(&selection) + offset), + (size_t) count); + } + buffer[count] = '\0'; + Tcl_DStringFree(&selection); + return count; + } + + /* + *---------------------------------------------------------------------- + * + * ListboxLostSelection -- + * + * This procedure is called back by Tk when the selection is + * grabbed away from a listbox widget. + * + * Results: + * None. + * + * Side effects: + * The existing selection is unhighlighted, and the window is + * marked as not containing a selection. + * + *---------------------------------------------------------------------- + */ + + static void + ListboxLostSelection(clientData) + ClientData clientData; /* Information about listbox widget. */ + { + register Listbox *listPtr = (Listbox *) clientData; + + if ((listPtr->exportSelection) && (listPtr->numElements > 0)) { + ListboxSelect(listPtr, 0, listPtr->numElements-1, 0); + } + } + + /* + *---------------------------------------------------------------------- + * + * ListboxRedrawRange -- + * + * Ensure that a given range of elements is eventually redrawn on + * the display (if those elements in fact appear on the display). + * + * Results: + * None. + * + * Side effects: + * Information gets redisplayed. + * + *---------------------------------------------------------------------- + */ + + /* ARGSUSED */ + static void + ListboxRedrawRange(listPtr, first, last) + register Listbox *listPtr; /* Information about widget. */ + int first; /* Index of first element in list + * that needs to be redrawn. */ + int last; /* Index of last element in list + * that needs to be redrawn. May + * be less than first; + * these just bracket a range. */ + { + if ((listPtr->tkwin == NULL) || !Tk_IsMapped(listPtr->tkwin) + || (listPtr->flags & REDRAW_PENDING)) { + return; + } + Tcl_DoWhenIdle(DisplayListbox, (ClientData) listPtr); + listPtr->flags |= REDRAW_PENDING; + } + + /* + *---------------------------------------------------------------------- + * + * ListboxUpdateVScrollbar -- + * + * This procedure is invoked whenever information has changed in + * a listbox in a way that would invalidate a vertical scrollbar + * display. If there is an associated scrollbar, then this command + * updates it by invoking a Tcl command. + * + * Results: + * None. + * + * Side effects: + * A Tcl command is invoked, and an additional command may be + * invoked to process errors in the command. + * + *---------------------------------------------------------------------- + */ + + static void + ListboxUpdateVScrollbar(listPtr) + register Listbox *listPtr; /* Information about widget. */ + { + char string[100]; + double first, last; + int result; + Tcl_Interp *interp; + + if (listPtr->yScrollCmd == NULL) { + return; + } + if (listPtr->numElements == 0) { + first = 0.0; + last = 1.0; + } else { + first = listPtr->topIndex/((double) listPtr->numElements); + last = (listPtr->topIndex+listPtr->fullLines) + /((double) listPtr->numElements); + if (last > 1.0) { + last = 1.0; + } + } + sprintf(string, " %g %g", first, last); + + /* + * We must hold onto the interpreter from the listPtr because the data + * at listPtr might be freed as a result of the Tcl_VarEval. + */ + + interp = listPtr->interp; + Tcl_Preserve((ClientData) interp); + result = Tcl_VarEval(interp, listPtr->yScrollCmd, string, + (char *) NULL); + if (result != TCL_OK) { + Tcl_AddErrorInfo(interp, + "\n (vertical scrolling command executed by listbox)"); + Tcl_BackgroundError(interp); + } + Tcl_Release((ClientData) interp); + } + + /* + *---------------------------------------------------------------------- + * + * ListboxUpdateHScrollbar -- + * + * This procedure is invoked whenever information has changed in + * a listbox in a way that would invalidate a horizontal scrollbar + * display. If there is an associated horizontal scrollbar, then + * this command updates it by invoking a Tcl command. + * + * Results: + * None. + * + * Side effects: + * A Tcl command is invoked, and an additional command may be + * invoked to process errors in the command. + * + *---------------------------------------------------------------------- + */ + + static void + ListboxUpdateHScrollbar(listPtr) + register Listbox *listPtr; /* Information about widget. */ + { + char string[60]; + int result, windowWidth; + double first, last; + Tcl_Interp *interp; + + if (listPtr->xScrollCmd == NULL) { + return; + } + windowWidth = Tk_Width(listPtr->tkwin) - 2*(listPtr->inset + + listPtr->selBorderWidth); + if (listPtr->maxWidth == 0) { + first = 0; + last = 1.0; + } else { + first = listPtr->xOffset/((double) listPtr->maxWidth); + last = (listPtr->xOffset + windowWidth) + /((double) listPtr->maxWidth); + if (last > 1.0) { + last = 1.0; + } + } + sprintf(string, " %g %g", first, last); + + /* + * We must hold onto the interpreter because the data referred to at + * listPtr might be freed as a result of the call to Tcl_VarEval. + */ + + interp = listPtr->interp; + Tcl_Preserve((ClientData) interp); + result = Tcl_VarEval(interp, listPtr->xScrollCmd, string, + (char *) NULL); + if (result != TCL_OK) { + Tcl_AddErrorInfo(interp, + "\n (horizontal scrolling command executed by listbox)"); + Tcl_BackgroundError(interp); + } + Tcl_Release((ClientData) interp); + } diff -r -c -P -x CVS ../tk8.0.5/generic/tkListbox.c ./generic/tkListbox.c *** ../tk8.0.5/generic/tkListbox.c Tue Aug 17 18:48:55 1999 --- ./generic/tkListbox.c Sun Aug 22 20:17:45 1999 *************** *** 13,18 **** --- 13,22 ---- * * RCS: @(#) $Id: tkListbox.c,v 1.9 1999/03/11 15:36:58 m-hirano Exp $ */ + /* + * TkSTEP modifications Copyright (c) 1997 by Oliver Graf + * - surgery performed and implanted into Tk8.0 by Steve Murray + */ #ifdef KANJI #define TK_KANJI_OK *************** *** 35,40 **** --- 39,47 ---- * left bearing and right bearing). */ int selected; /* 1 means this item is selected, 0 means * it isn't. */ + #ifdef ENABLE_STEP + int arrow; /* append a N*XTSTEP arrow to the entry. */ + #endif struct Element *nextPtr; /* Next in list of all elements of this * listbox, or NULL for last element. */ #ifdef TK_KANJI_OK *************** *** 1280,1285 **** --- 1287,1320 ---- Tk_DrawChars(listPtr->display, pixmap, gc, listPtr->tkfont, elPtr->text, elPtr->textLength, x, y); + #ifdef ENABLE_STEP + if (elPtr->arrow) + { + int tx, ty; + GC lightGC, darkGC, dark2GC; + + tx = Tk_Width(tkwin)-40; /* magic number - fix it! (stevem) */ + ty = y - fm.ascent/2 - 1; + + lightGC = Tk_3DBorderGC(listPtr->tkwin, + elPtr->selected?listPtr->selBorder:listPtr->normalBorder, + TK_3D_LIGHT_GC); + darkGC = Tk_3DBorderGC(listPtr->tkwin, + elPtr->selected?listPtr->selBorder:listPtr->normalBorder, + TK_3D_DARK_GC); + dark2GC = Tk_3DBorderGC(listPtr->tkwin, + elPtr->selected?listPtr->selBorder:listPtr->normalBorder, + TK_3D_DARK2_GC); + + XDrawLine(listPtr->display, pixmap, dark2GC, + tx, ty-1, tx, ty+ARROW_HEIGHT-1); + XDrawLine(listPtr->display, pixmap, darkGC, + tx+1, ty-1, tx+ARROW_WIDTH-1, ty+ARROW_HEIGHT/2-1); + XDrawLine(listPtr->display, pixmap, lightGC, + tx+1, ty+ARROW_HEIGHT-1, tx+ARROW_WIDTH-1, ty+ARROW_HEIGHT/2-1); + } + #endif + /* * If this is the active element, underline it. */ *************** *** 1294,1305 **** * Redraw the border for the listbox to make sure that it's on top * of any of the text of the listbox entries. */ ! Tk_Draw3DRectangle(tkwin, pixmap, listPtr->normalBorder, listPtr->highlightWidth, listPtr->highlightWidth, Tk_Width(tkwin) - 2*listPtr->highlightWidth, Tk_Height(tkwin) - 2*listPtr->highlightWidth, listPtr->borderWidth, listPtr->relief); if (listPtr->highlightWidth > 0) { GC gc; --- 1329,1353 ---- * Redraw the border for the listbox to make sure that it's on top * of any of the text of the listbox entries. */ ! /* As for entries, this fixes the 3D border colour to be NORMAL_BG ! * which is not optimal, but much better than the same colour as the ! * background and will suit nearly all applications. But, since it's not ! * universally correct, I'll fix it one day. (stevem) ! */ ! #ifdef ENABLE_STEP ! Tk_Draw3DRectangle(tkwin, pixmap, ! Tk_Get3DBorder(listPtr->interp, tkwin, NORMAL_BG), ! listPtr->highlightWidth, listPtr->highlightWidth, ! Tk_Width(tkwin) - 2*listPtr->highlightWidth, ! Tk_Height(tkwin) - 2*listPtr->highlightWidth, ! listPtr->borderWidth, listPtr->relief); ! #else Tk_Draw3DRectangle(tkwin, pixmap, listPtr->normalBorder, listPtr->highlightWidth, listPtr->highlightWidth, Tk_Width(tkwin) - 2*listPtr->highlightWidth, Tk_Height(tkwin) - 2*listPtr->highlightWidth, listPtr->borderWidth, listPtr->relief); + #endif if (listPtr->highlightWidth > 0) { GC gc; *************** *** 1380,1385 **** --- 1428,1437 ---- Tk_GetFontMetrics(listPtr->tkfont, &fm); listPtr->lineHeight = fm.linespace + 1 + 2*listPtr->selBorderWidth; + #ifdef ENABLE_STEP + if (listPtr->lineHeight < 11) + listPtr->lineHeight = 11; + #endif width = listPtr->width; if (width <= 0) { width = (listPtr->maxWidth + listPtr->xScrollUnit - 1) *************** *** 1437,1447 **** char **argv; /* New elements (one per entry). */ { register Element *prevPtr, *newPtr; - #ifdef TK_KANJI_OK - int i, oldMaxWidth; - #else int length, i, oldMaxWidth; ! #endif /* TK_KANJI_OK */ /* * Find the element before which the new ones will be inserted. */ --- 1489,1498 ---- char **argv; /* New elements (one per entry). */ { register Element *prevPtr, *newPtr; int length, i, oldMaxWidth; ! #ifdef ENABLE_STEP ! int arrow; ! #endif /* * Find the element before which the new ones will be inserted. */ *************** *** 1473,1480 **** --- 1524,1550 ---- newPtr = (Element *)ckalloc((unsigned)sizeof(Element)); newPtr->text = Tcl_GetWStr(NULL, *argv, NULL); newPtr->textLength = Tcl_WStrlen(newPtr->text); + + #ifdef ENABLE_STEP + length = Tcl_WStrlen(newPtr->text); + if (strcmp(*argv+length-3," ->") == 0) { + arrow = 1; + newPtr->textLength -= 3; + (*argv)[length] = 0; + } else + arrow = 0; + #endif + ; #else length = strlen(*argv); + #ifdef ENABLE_STEP + if (strcmp(*argv+length-3," ->") == 0) { + arrow = 1; + length -= 3; + (*argv)[length] = 0; + } else + arrow = 0; + #endif newPtr = (Element *) ckalloc(ElementSize(length)); newPtr->textLength = length; strcpy(newPtr->text, *argv); *************** *** 1482,1487 **** --- 1552,1562 ---- newPtr->pixelWidth = Tk_TextWidth(listPtr->tkfont, newPtr->text, newPtr->textLength); newPtr->lBearing = 0; + #ifdef ENABLE_STEP + newPtr->arrow = arrow; + if (newPtr->arrow) + newPtr->pixelWidth += 16; + #endif if (newPtr->pixelWidth > listPtr->maxWidth) { listPtr->maxWidth = newPtr->pixelWidth; } diff -r -c -P -x CVS ../tk8.0.5/generic/tkMenu.c ./generic/tkMenu.c *** ../tk8.0.5/generic/tkMenu.c Tue Aug 17 18:48:56 1999 --- ./generic/tkMenu.c Tue Aug 17 18:54:35 1999 *************** *** 14,19 **** --- 14,23 ---- * * RCS: @(#) $Id: tkMenu.c,v 1.2 1998/09/14 18:23:14 stanton Exp $ */ + /* + * TkSTEP modifications Copyright (c) Alfredo K. Kojima + * - surgery performed and implanted into Tk8.0 by Steve Murray + */ /* * Notes on implementation of menus: *************** *** 1421,1427 **** static int ConfigureMenuEntry(mePtr, argc, argv, flags) ! register TkMenuEntry *mePtr; /* Information about menu entry; may * or may not already have values for * some fields. */ int argc; /* Number of valid entries in argv. */ --- 1425,1431 ---- static int ConfigureMenuEntry(mePtr, argc, argv, flags) ! register TkMenuEntry *mePtr; /* Information about menu entry; may * or may not already have values for * some fields. */ int argc; /* Number of valid entries in argv. */ *************** *** 1454,1459 **** --- 1458,1468 ---- } } + #ifdef ENABLE_STEP + if (mePtr->columnBreak) + menuPtr->menuFlags |= MENU_COLUMNBREAK; + #endif + /* * The code below handles special configuration stuff not taken * care of by Tk_ConfigureWidget, such as special processing for *************** *** 1551,1557 **** if (TkpConfigureMenuEntry(mePtr) != TCL_OK) { return TCL_ERROR; } ! if ((mePtr->type == CHECK_BUTTON_ENTRY) || (mePtr->type == RADIO_BUTTON_ENTRY)) { char *value; --- 1560,1573 ---- if (TkpConfigureMenuEntry(mePtr) != TCL_OK) { return TCL_ERROR; } ! /* ! #ifdef ENABLE_STEP ! if (mePtr->columnBreak) ! menuPtr->menuFlags |= MENU_COLUMNBREAK; ! else ! menuPtr->menuFlags &= ~MENU_COLUMNBREAK; ! #endif ! */ if ((mePtr->type == CHECK_BUTTON_ENTRY) || (mePtr->type == RADIO_BUTTON_ENTRY)) { char *value; diff -r -c -P -x CVS ../tk8.0.5/generic/tkMenu.h ./generic/tkMenu.h *** ../tk8.0.5/generic/tkMenu.h Tue Aug 17 18:48:56 1999 --- ./generic/tkMenu.h Tue Aug 17 18:54:35 1999 *************** *** 10,16 **** * * RCS: @(#) $Id: tkMenu.h,v 1.4 1998/09/14 18:23:14 stanton Exp $ */ ! #ifndef _TKMENU #define _TKMENU --- 10,20 ---- * * RCS: @(#) $Id: tkMenu.h,v 1.4 1998/09/14 18:23:14 stanton Exp $ */ ! /* ! * TkSTEP modifications Copyright (c) Alfredo K. Kojima ! * - surgery performed and implanted into Tk8.0 by Steve Murray ! */ ! #ifndef _TKMENU #define _TKMENU *************** *** 87,92 **** --- 91,97 ---- * accelerator. */ int indicatorOn; /* True means draw indicator, false means * don't draw it. */ + int indicatorDiameter; /* Size of indicator display, in pixels. */ /* * Display attributes */ *************** *** 328,333 **** --- 333,345 ---- * indicator (such as a dashed stripe) is * drawn, and when the menu is selected, the * tearoff is created. */ + int transient; /* 1 means menu is only posted briefly as + * a popup, pull-down or cascade. 0 means + * menu is always visible, e.g. as a torn-off + * menu. Determines whether save_under and + * override_redirect should be set. */ + + char *title; /* The title to use when this menu is torn * off. If this is NULL, a default scheme * will be used to generate a title for *************** *** 436,446 **** * this menu (via a destroy binding or somesuch). * MENU_PLATFORM_FLAG1... Reserved for use by the platform-specific menu * code. */ ! #define REDRAW_PENDING 1 #define RESIZE_PENDING 2 #define MENU_DELETION_PENDING 4 #define MENU_PLATFORM_FLAG1 (1 << 30) #define MENU_PLATFORM_FLAG2 (1 << 29) #define MENU_PLATFORM_FLAG3 (1 << 28) --- 448,467 ---- * this menu (via a destroy binding or somesuch). * MENU_PLATFORM_FLAG1... Reserved for use by the platform-specific menu * code. + * + * MENU_COLUMNBREAK: Provides an indicator at menu level (rather + * than just at menuentry level) that a column + * break is present. Needed by TkSTEP so as to + * prevent bevels being drawn. */ ! #define REDRAW_PENDING 1 #define RESIZE_PENDING 2 #define MENU_DELETION_PENDING 4 + #ifdef ENABLE_STEP + #define MENU_COLUMNBREAK 8 + #endif + #define MENU_PLATFORM_FLAG1 (1 << 30) #define MENU_PLATFORM_FLAG2 (1 << 29) #define MENU_PLATFORM_FLAG3 (1 << 28) *************** *** 463,471 **** * Various geometry definitions: */ ! #define CASCADE_ARROW_HEIGHT 10 ! #define CASCADE_ARROW_WIDTH 8 ! #define DECORATION_BORDER_WIDTH 2 /* * Configuration specs. Needed for platform-specific default initializations. --- 484,490 ---- * Various geometry definitions: */ ! #define DECORATION_BORDER_WIDTH 1 /* * Configuration specs. Needed for platform-specific default initializations. diff -r -c -P -x CVS ../tk8.0.5/generic/tkMenuDraw.c ./generic/tkMenuDraw.c *** ../tk8.0.5/generic/tkMenuDraw.c Tue Sep 15 03:23:14 1998 --- ./generic/tkMenuDraw.c Tue Aug 17 18:54:35 1999 *************** *** 11,16 **** --- 11,21 ---- * * RCS: @(#) $Id: tkMenuDraw.c,v 1.2 1998/09/14 18:23:14 stanton Exp $ */ + /* + * TkSTEP modifications Copyright (c) Alfredo K. Kojima + * - surgery performed and implanted into Tk8.0 by Steve Murray along with + * some other changes. + */ #include "tkMenu.h" *************** *** 535,546 **** TkpComputeStandardMenuGeometry(menuPtr); } if ((menuPtr->totalWidth != Tk_ReqWidth(menuPtr->tkwin)) || (menuPtr->totalHeight != Tk_ReqHeight(menuPtr->tkwin))) { Tk_GeometryRequest(menuPtr->tkwin, menuPtr->totalWidth, menuPtr->totalHeight); } ! /* * Must always force a redisplay here if the window is mapped * (even if the size didn't change, something else might have --- 540,553 ---- TkpComputeStandardMenuGeometry(menuPtr); } + /* menuPtr->totalWidth += 2; *//* might have to change this later (stevem)*/ + if ((menuPtr->totalWidth != Tk_ReqWidth(menuPtr->tkwin)) || (menuPtr->totalHeight != Tk_ReqHeight(menuPtr->tkwin))) { Tk_GeometryRequest(menuPtr->tkwin, menuPtr->totalWidth, menuPtr->totalHeight); } ! /* * Must always force a redisplay here if the window is mapped * (even if the size didn't change, something else might have *************** *** 625,630 **** --- 632,651 ---- return; } + /* the following line was removed by the tkstep patch and should + * perhaps not have been - otherwise strictMoif is not initialised + * for the call on line 711 below. I'm replacing it for a test. + * (stevem) + */ + strictMotif = Tk_StrictMotif(menuPtr->tkwin); + + /* + * Draw Window border before + */ + Tk_Draw3DRectangle(menuPtr->tkwin, Tk_WindowId(tkwin), + menuPtr->border, 0, 0, Tk_Width(tkwin), Tk_Height(tkwin), + menuPtr->borderWidth, menuPtr->relief); + if (menuPtr->menuType == MENUBAR) { Tk_Fill3DRectangle(tkwin, Tk_WindowId(tkwin), menuPtr->border, menuPtr->borderWidth, menuPtr->borderWidth, *************** *** 633,640 **** TK_RELIEF_FLAT); } - strictMotif = Tk_StrictMotif(menuPtr->tkwin); - /* * See note in ComputeMenuGeometry. We don't want to be doing font metrics * all of the time. --- 654,659 ---- *************** *** 648,653 **** --- 667,697 ---- for (index = 0; index < menuPtr->numEntries; index++) { mePtr = menuPtr->entries[index]; + + /* + * Draw top and bottom part of entry bevel - if there isn't a + * column break set, otherwise, don't draw the horizontal lines. + */ + if (!(menuPtr->menuFlags & MENU_COLUMNBREAK)) + { + if (index!=0) { + XDrawLine(menuPtr->display, Tk_WindowId(menuPtr->tkwin), + Tk_3DBorderGC(menuPtr->tkwin, menuPtr->border, + TK_3D_LIGHT_GC), 0, mePtr->y, Tk_Width(tkwin)-2, mePtr->y); + } + if (index < menuPtr->numEntries-1) { + if (mePtr->type != SEPARATOR_ENTRY) { + XDrawLine(menuPtr->display, Tk_WindowId(menuPtr->tkwin), + Tk_3DBorderGC(menuPtr->tkwin, menuPtr->border, + TK_3D_DARK_GC), 0, mePtr->y+mePtr->height-2, + Tk_Width(tkwin)-1, mePtr->y+mePtr->height-2); + } + XDrawLine(menuPtr->display, Tk_WindowId(menuPtr->tkwin), + Tk_3DBorderGC(menuPtr->tkwin, menuPtr->border, + TK_3D_DARK2_GC), 0, mePtr->y+mePtr->height-1,Tk_Width(tkwin), + mePtr->y+mePtr->height-1); + } + } if (menuPtr->menuType != MENUBAR) { if (!(mePtr->entryFlags & ENTRY_NEEDS_REDISPLAY)) { continue; *************** *** 694,711 **** mePtr->width, Tk_Height(tkwin) - mePtr->y - mePtr->height - menuPtr->activeBorderWidth, 0, TK_RELIEF_FLAT); ! x = mePtr->x + mePtr->width; y = mePtr->y + mePtr->height; width = Tk_Width(tkwin) - x - menuPtr->activeBorderWidth; ! height = Tk_Height(tkwin) - y - menuPtr->activeBorderWidth; } Tk_Fill3DRectangle(tkwin, Tk_WindowId(tkwin), menuPtr->border, x, y, width, height, 0, TK_RELIEF_FLAT); } - - Tk_Draw3DRectangle(menuPtr->tkwin, Tk_WindowId(tkwin), - menuPtr->border, 0, 0, Tk_Width(tkwin), Tk_Height(tkwin), - menuPtr->borderWidth, menuPtr->relief); } /* --- 738,751 ---- mePtr->width, Tk_Height(tkwin) - mePtr->y - mePtr->height - menuPtr->activeBorderWidth, 0, TK_RELIEF_FLAT); ! x = mePtr->x + mePtr->width; y = mePtr->y + mePtr->height; width = Tk_Width(tkwin) - x - menuPtr->activeBorderWidth; ! height = Tk_Height(tkwin) - y - menuPtr->activeBorderWidth - 4; } Tk_Fill3DRectangle(tkwin, Tk_WindowId(tkwin), menuPtr->border, x, y, width, height, 0, TK_RELIEF_FLAT); } } /* *************** *** 984,992 **** *---------------------------------------------------------------------- * * AdjustMenuCoords -- ! * * Adjusts the given coordinates down and the left to give a Motif * look. * * Results: * None. --- 1024,1034 ---- *---------------------------------------------------------------------- * * AdjustMenuCoords -- ! * This function used to ... * Adjusts the given coordinates down and the left to give a Motif * look. + * ... instead, it now positions the cascade to the right of the + * parent as per default behaviour for AfterStep and Window Maker. * * Results: * None. *************** *** 1009,1018 **** *xPtr += mePtr->x; *yPtr += mePtr->y + mePtr->height; } else { ! *xPtr += Tk_Width(menuPtr->tkwin) - menuPtr->borderWidth ! - menuPtr->activeBorderWidth - 2; ! *yPtr += mePtr->y ! + menuPtr->activeBorderWidth + 2; } sprintf(string, "%d %d", *xPtr, *yPtr); } --- 1051,1058 ---- *xPtr += mePtr->x; *yPtr += mePtr->y + mePtr->height; } else { ! *xPtr += Tk_Width(menuPtr->tkwin); ! *yPtr += mePtr->y; } sprintf(string, "%d %d", *xPtr, *yPtr); } diff -r -c -P -x CVS ../tk8.0.5/generic/tkMenubutton.c ./generic/tkMenubutton.c *** ../tk8.0.5/generic/tkMenubutton.c Tue Aug 17 18:48:56 1999 --- ./generic/tkMenubutton.c Tue Aug 17 18:54:35 1999 *************** *** 12,17 **** --- 12,21 ---- * * RCS: @(#) $Id: tkMenubutton.c,v 1.2 1998/09/14 18:23:14 stanton Exp $ */ + /* + * TkSTEP modifications Copyright (c) Alfredo K. Kojima + * - surgery performed and implanted into Tk8.0 by Steve Murray + */ #include "tkMenubutton.h" #include "tkPort.h" *************** *** 97,102 **** --- 101,110 ---- TK_CONFIG_NULL_OK}, {TK_CONFIG_BOOLEAN, "-indicatoron", "indicatorOn", "IndicatorOn", DEF_MENUBUTTON_INDICATOR, Tk_Offset(TkMenuButton, indicatorOn), 0}, + #ifdef ENABLE_STEP + {TK_CONFIG_STRING, "-indicatortype", "indicatorType", "IndicatorType", + DEF_MENUBUTTON_INDICATORTYPE, Tk_Offset(TkMenuButton, iTypeString), 0}, + #endif {TK_CONFIG_JUSTIFY, "-justify", "justify", "Justify", DEF_MENUBUTTON_JUSTIFY, Tk_Offset(TkMenuButton, justify), 0}, {TK_CONFIG_STRING, "-menu", "menu", "Menu", *************** *** 249,254 **** --- 257,266 ---- mbPtr->anchor = TK_ANCHOR_CENTER; mbPtr->justify = TK_JUSTIFY_CENTER; mbPtr->textLayout = NULL; + #ifdef ENABLE_STEP + mbPtr->indicatorType = 0; + mbPtr->iTypeString = NULL; + #endif mbPtr->indicatorOn = 0; mbPtr->indicatorWidth = 0; mbPtr->indicatorHeight = 0; *************** *** 665,670 **** --- 677,690 ---- mbPtr->disabledGC = gc; TkpComputeMenuButtonGeometry(mbPtr); + + #ifdef ENABLE_STEP + if (strcmp(mbPtr->iTypeString, "downarrow") == 0) { + mbPtr->indicatorType = 1; + } else { + mbPtr->indicatorType = 0; + } + #endif /* * Lastly, arrange for the button to be redisplayed. diff -r -c -P -x CVS ../tk8.0.5/generic/tkMenubutton.h ./generic/tkMenubutton.h *** ../tk8.0.5/generic/tkMenubutton.h Tue Aug 17 18:48:56 1999 --- ./generic/tkMenubutton.h Tue Aug 17 18:54:35 1999 *************** *** 11,16 **** --- 11,20 ---- * * RCS: @(#) $Id: tkMenubutton.h,v 1.4 1998/09/14 18:23:15 stanton Exp $ */ + /* + * TkSTEP modifications Copyright (c) Alfredo K. Kojima + * - surgery performed and implanted into Tk8.0 by Steve Murray + */ #ifndef _TKMENUBUTTON #define _TKMENUBUTTON *************** *** 141,146 **** --- 145,154 ---- Tk_TextLayout textLayout; /* Saved text layout information. */ int indicatorOn; /* Non-zero means display indicator; 0 means * don't display. */ + #ifdef ENABLE_STEP + int indicatorType; /* Normal (0) or downarrow (1) types. */ + char *iTypeString; /* For configuring. */ + #endif int indicatorHeight; /* Height of indicator in pixels. This same * amount of extra space is also left on each * side of the indicator. 0 if no indicator. */ *************** *** 194,201 **** * these options are 1/10 millimeters. */ ! #define INDICATOR_WIDTH 40 ! #define INDICATOR_HEIGHT 17 /* * Declaration of variables shared between the files in the button module. --- 202,213 ---- * these options are 1/10 millimeters. */ ! #define INDICATOR_WIDTH 35 ! #define INDICATOR_HEIGHT 22 ! ! #ifdef ENABLE_STEP ! #define MARGIN_WIDTH 2 ! #endif /* * Declaration of variables shared between the files in the button module. diff -r -c -P -x CVS ../tk8.0.5/generic/tkRectOval.c ./generic/tkRectOval.c *** ../tk8.0.5/generic/tkRectOval.c Tue Sep 15 03:23:16 1998 --- ./generic/tkRectOval.c Tue Aug 17 18:54:35 1999 *************** *** 4,9 **** --- 4,12 ---- * This file implements rectangle and oval items for canvas * widgets. * + * Modifications copyright (c) 1997 by Oliver Graf + * -- added rounded corners to rectangle (option -rounded) + * * Copyright (c) 1991-1994 The Regents of the University of California. * Copyright (c) 1994-1996 Sun Microsystems, Inc. * *************** *** 23,39 **** */ typedef struct RectOvalItem { ! Tk_Item header; /* Generic stuff that's the same for all * types. MUST BE FIRST IN STRUCTURE. */ ! double bbox[4]; /* Coordinates of bounding box for rectangle * or oval (x1, y1, x2, y2). Item includes * x1 and x2 but not y1 and y2. */ ! int width; /* Width of outline. */ ! XColor *outlineColor; /* Color for outline. */ ! XColor *fillColor; /* Color for filling rectangle/oval. */ ! Pixmap fillStipple; /* Stipple bitmap for filling item. */ ! GC outlineGC; /* Graphics context for outline. */ ! GC fillGC; /* Graphics context for filling item. */ } RectOvalItem; /* --- 26,45 ---- */ typedef struct RectOvalItem { ! Tk_Item header; /* Generic stuff that's the same for all * types. MUST BE FIRST IN STRUCTURE. */ ! double bbox[4]; /* Coordinates of bounding box for rectangle * or oval (x1, y1, x2, y2). Item includes * x1 and x2 but not y1 and y2. */ ! int width; /* Width of outline. */ ! #ifdef ENABLE_STEP ! int rounded; /* Rounded corners for rectangle */ ! #endif ! XColor *outlineColor; /* Color for outline. */ ! XColor *fillColor; /* Color for filling rectangle/oval. */ ! Pixmap fillStipple; /* Stipple bitmap for filling item. */ ! GC outlineGC; /* Graphics context for outline. */ ! GC fillGC; /* Graphics context for filling item. */ } RectOvalItem; /* *************** *** 49,54 **** --- 55,64 ---- (char *) NULL, Tk_Offset(RectOvalItem, fillColor), TK_CONFIG_NULL_OK}, {TK_CONFIG_COLOR, "-outline", (char *) NULL, (char *) NULL, "black", Tk_Offset(RectOvalItem, outlineColor), TK_CONFIG_NULL_OK}, + #ifdef ENABLE_STEP + {TK_CONFIG_PIXELS, "-rounded", (char *) NULL, (char *) NULL, + (char *) NULL, Tk_Offset(RectOvalItem, rounded), TK_CONFIG_NULL_OK}, + #endif {TK_CONFIG_BITMAP, "-stipple", (char *) NULL, (char *) NULL, (char *) NULL, Tk_Offset(RectOvalItem, fillStipple), TK_CONFIG_NULL_OK}, {TK_CONFIG_CUSTOM, "-tags", (char *) NULL, (char *) NULL, *************** *** 191,196 **** --- 201,209 ---- */ rectOvalPtr->width = 1; + #ifdef ENABLE_STEP + rectOvalPtr->rounded = 0; + #endif rectOvalPtr->outlineColor = NULL; rectOvalPtr->fillColor = NULL; rectOvalPtr->fillStipple = None; *************** *** 547,557 **** Tk_CanvasSetStippleOrigin(canvas, rectOvalPtr->fillGC); } if (rectOvalPtr->header.typePtr == &tkRectangleType) { XFillRectangle(display, drawable, rectOvalPtr->fillGC, ! x1, y1, (unsigned int) (x2-x1), (unsigned int) (y2-y1)); } else { XFillArc(display, drawable, rectOvalPtr->fillGC, ! x1, y1, (unsigned) (x2-x1), (unsigned) (y2-y1), 0, 360*64); } if (rectOvalPtr->fillStipple != None) { --- 560,607 ---- Tk_CanvasSetStippleOrigin(canvas, rectOvalPtr->fillGC); } if (rectOvalPtr->header.typePtr == &tkRectangleType) { + #ifdef ENABLE_STEP + if (rectOvalPtr->rounded>0) + { + int r=rectOvalPtr->rounded; + if (rectOvalPtr->rounded<(unsigned)(x2-x1)/2 + && rectOvalPtr->rounded<(unsigned)(y2-y1)/2) + { + XFillRectangle(display, drawable, rectOvalPtr->fillGC, + x1+r, y1, + (unsigned)(x2-x1)-r*2, (unsigned)(y2-y1)); + XFillRectangle(display, drawable, rectOvalPtr->fillGC, + x1, y1+r, + (unsigned)(x2-x1), (unsigned)(y2-y1)-r*2); + XFillArc(display, drawable, rectOvalPtr->fillGC, + x1, y1, + (unsigned)r*2, (unsigned)r*2, + 90*64, 90*64); + XFillArc(display, drawable, rectOvalPtr->fillGC, + x2-r*2, y1, + (unsigned)r*2, (unsigned)r*2, + 0, 90*64); + XFillArc(display, drawable, rectOvalPtr->fillGC, + x1, y2-r*2, + (unsigned)r*2, (unsigned)r*2, + 180*64, 90*64); + XFillArc(display, drawable, rectOvalPtr->fillGC, + x2-r*2, y2-r*2, + (unsigned)r*2, (unsigned)r*2, + 270*64, 90*64); + } + else + XFillArc(display, drawable, rectOvalPtr->fillGC, + x1, y1, (unsigned)(x2-x1), (unsigned)(y2-y1), + 0, 360*64); + } + else + #endif XFillRectangle(display, drawable, rectOvalPtr->fillGC, ! x1, y1, (unsigned) (x2-x1), (unsigned) (y2-y1)); } else { XFillArc(display, drawable, rectOvalPtr->fillGC, ! x1, y1, (unsigned)(x2-x1), (unsigned)(y2-y1), 0, 360*64); } if (rectOvalPtr->fillStipple != None) { *************** *** 560,570 **** } if (rectOvalPtr->outlineGC != None) { if (rectOvalPtr->header.typePtr == &tkRectangleType) { XDrawRectangle(display, drawable, rectOvalPtr->outlineGC, ! x1, y1, (unsigned) (x2-x1), (unsigned) (y2-y1)); } else { XDrawArc(display, drawable, rectOvalPtr->outlineGC, ! x1, y1, (unsigned) (x2-x1), (unsigned) (y2-y1), 0, 360*64); } } } --- 610,663 ---- } if (rectOvalPtr->outlineGC != None) { if (rectOvalPtr->header.typePtr == &tkRectangleType) { + #ifdef ENABLE_STEP + if (rectOvalPtr->rounded>0) + { + int r=rectOvalPtr->rounded; + if (rectOvalPtr->rounded<(unsigned int)(x2-x1)/2 + && rectOvalPtr->rounded<(unsigned int)(y2-y1)/2) + { + XDrawLine(display, drawable, rectOvalPtr->outlineGC, + x1+r, y1, + x2-r, y1); + XDrawLine(display, drawable, rectOvalPtr->outlineGC, + x1+r, y2, + x2-r, y2); + XDrawLine(display, drawable, rectOvalPtr->outlineGC, + x1, y1+r, + x1, y2-r); + XDrawLine(display, drawable, rectOvalPtr->outlineGC, + x2, y1+r, + x2, y2-r); + XDrawArc(display, drawable, rectOvalPtr->outlineGC, + x1, y1, + (unsigned)r*2, (unsigned)r*2, + 90*64, 90*64); + XDrawArc(display, drawable, rectOvalPtr->outlineGC, + x2-r*2, y1, + (unsigned)r*2, (unsigned)r*2, + 0, 90*64); + XDrawArc(display, drawable, rectOvalPtr->outlineGC, + x1, y2-r*2, + (unsigned)r*2, (unsigned)r*2, + 180*64, 90*64); + XDrawArc(display, drawable, rectOvalPtr->outlineGC, + x2-r*2, y2-r*2, + (unsigned)r*2, (unsigned)r*2, + 270*64, 90*64); + } + else + XDrawArc(display, drawable, rectOvalPtr->outlineGC, + x1, y1, (unsigned)(x2-x1), (unsigned)(y2-y1), + 0, 360*64); + } + else + #endif XDrawRectangle(display, drawable, rectOvalPtr->outlineGC, ! x1, y1, (unsigned)(x2-x1),(unsigned)(y2-y1)); } else { XDrawArc(display, drawable, rectOvalPtr->outlineGC, ! x1, y1, (unsigned)(x2-x1), (unsigned)(y2-y1), 0, 360*64); } } } diff -r -c -P -x CVS ../tk8.0.5/generic/tkScale.c ./generic/tkScale.c *** ../tk8.0.5/generic/tkScale.c Tue Aug 17 18:48:56 1999 --- ./generic/tkScale.c Tue Aug 17 19:19:53 1999 *************** *** 19,24 **** --- 19,27 ---- * * RCS: @(#) $Id: tkScale.c,v 1.5 1999/03/11 15:37:06 m-hirano Exp $ */ + /* + * TkSTEP modifications Copyright (c) 1996 Andy Lo A Foe + */ #ifdef KANJI #define TK_KANJI_OK *************** *** 33,48 **** static Tk_ConfigSpec configSpecs[] = { {TK_CONFIG_BORDER, "-activebackground", "activeBackground", "Foreground", DEF_SCALE_ACTIVE_BG_COLOR, Tk_Offset(TkScale, activeBorder), ! TK_CONFIG_COLOR_ONLY}, {TK_CONFIG_BORDER, "-activebackground", "activeBackground", "Foreground", DEF_SCALE_ACTIVE_BG_MONO, Tk_Offset(TkScale, activeBorder), ! TK_CONFIG_MONO_ONLY}, {TK_CONFIG_BORDER, "-background", "background", "Background", DEF_SCALE_BG_COLOR, Tk_Offset(TkScale, bgBorder), ! TK_CONFIG_COLOR_ONLY}, {TK_CONFIG_BORDER, "-background", "background", "Background", DEF_SCALE_BG_MONO, Tk_Offset(TkScale, bgBorder), ! TK_CONFIG_MONO_ONLY}, {TK_CONFIG_DOUBLE, "-bigincrement", "bigIncrement", "BigIncrement", DEF_SCALE_BIG_INCREMENT, Tk_Offset(TkScale, bigIncrement), 0}, {TK_CONFIG_SYNONYM, "-bd", "borderWidth", (char *) NULL, --- 36,51 ---- static Tk_ConfigSpec configSpecs[] = { {TK_CONFIG_BORDER, "-activebackground", "activeBackground", "Foreground", DEF_SCALE_ACTIVE_BG_COLOR, Tk_Offset(TkScale, activeBorder), ! TK_CONFIG_COLOR_ONLY | DISABLE_CHANGE}, {TK_CONFIG_BORDER, "-activebackground", "activeBackground", "Foreground", DEF_SCALE_ACTIVE_BG_MONO, Tk_Offset(TkScale, activeBorder), ! TK_CONFIG_MONO_ONLY | DISABLE_CHANGE}, {TK_CONFIG_BORDER, "-background", "background", "Background", DEF_SCALE_BG_COLOR, Tk_Offset(TkScale, bgBorder), ! TK_CONFIG_COLOR_ONLY | DISABLE_CHANGE}, {TK_CONFIG_BORDER, "-background", "background", "Background", DEF_SCALE_BG_MONO, Tk_Offset(TkScale, bgBorder), ! TK_CONFIG_MONO_ONLY | DISABLE_CHANGE}, {TK_CONFIG_DOUBLE, "-bigincrement", "bigIncrement", "BigIncrement", DEF_SCALE_BIG_INCREMENT, Tk_Offset(TkScale, bigIncrement), 0}, {TK_CONFIG_SYNONYM, "-bd", "borderWidth", (char *) NULL, *************** *** 50,56 **** {TK_CONFIG_SYNONYM, "-bg", "background", (char *) NULL, (char *) NULL, 0, 0}, {TK_CONFIG_PIXELS, "-borderwidth", "borderWidth", "BorderWidth", ! DEF_SCALE_BORDER_WIDTH, Tk_Offset(TkScale, borderWidth), 0}, {TK_CONFIG_STRING, "-command", "command", "Command", DEF_SCALE_COMMAND, Tk_Offset(TkScale, command), TK_CONFIG_NULL_OK}, {TK_CONFIG_ACTIVE_CURSOR, "-cursor", "cursor", "Cursor", --- 53,59 ---- {TK_CONFIG_SYNONYM, "-bg", "background", (char *) NULL, (char *) NULL, 0, 0}, {TK_CONFIG_PIXELS, "-borderwidth", "borderWidth", "BorderWidth", ! DEF_SCALE_BORDER_WIDTH, Tk_Offset(TkScale, borderWidth), DISABLE_CHANGE}, {TK_CONFIG_STRING, "-command", "command", "Command", DEF_SCALE_COMMAND, Tk_Offset(TkScale, command), TK_CONFIG_NULL_OK}, {TK_CONFIG_ACTIVE_CURSOR, "-cursor", "cursor", "Cursor", *************** *** 64,83 **** 0}, {TK_CONFIG_COLOR, "-foreground", "foreground", "Foreground", DEF_SCALE_FG_COLOR, Tk_Offset(TkScale, textColorPtr), ! TK_CONFIG_COLOR_ONLY}, {TK_CONFIG_COLOR, "-foreground", "foreground", "Foreground", DEF_SCALE_FG_MONO, Tk_Offset(TkScale, textColorPtr), ! TK_CONFIG_MONO_ONLY}, {TK_CONFIG_DOUBLE, "-from", "from", "From", DEF_SCALE_FROM, Tk_Offset(TkScale, fromValue), 0}, {TK_CONFIG_COLOR, "-highlightbackground", "highlightBackground", "HighlightBackground", DEF_SCALE_HIGHLIGHT_BG, ! Tk_Offset(TkScale, highlightBgColorPtr), 0}, {TK_CONFIG_COLOR, "-highlightcolor", "highlightColor", "HighlightColor", DEF_SCALE_HIGHLIGHT, Tk_Offset(TkScale, highlightColorPtr), 0}, {TK_CONFIG_PIXELS, "-highlightthickness", "highlightThickness", "HighlightThickness", ! DEF_SCALE_HIGHLIGHT_WIDTH, Tk_Offset(TkScale, highlightWidth), 0}, #ifdef TK_KANJI_OK {TK_CONFIG_WSTRING, "-label", "label", "Label", DEF_SCALE_LABEL, Tk_Offset(TkScale, label), TK_CONFIG_NULL_OK}, --- 67,87 ---- 0}, {TK_CONFIG_COLOR, "-foreground", "foreground", "Foreground", DEF_SCALE_FG_COLOR, Tk_Offset(TkScale, textColorPtr), ! TK_CONFIG_COLOR_ONLY | DISABLE_CHANGE}, {TK_CONFIG_COLOR, "-foreground", "foreground", "Foreground", DEF_SCALE_FG_MONO, Tk_Offset(TkScale, textColorPtr), ! TK_CONFIG_MONO_ONLY | DISABLE_CHANGE}, {TK_CONFIG_DOUBLE, "-from", "from", "From", DEF_SCALE_FROM, Tk_Offset(TkScale, fromValue), 0}, {TK_CONFIG_COLOR, "-highlightbackground", "highlightBackground", "HighlightBackground", DEF_SCALE_HIGHLIGHT_BG, ! Tk_Offset(TkScale, highlightBgColorPtr), DISABLE_CHANGE}, {TK_CONFIG_COLOR, "-highlightcolor", "highlightColor", "HighlightColor", DEF_SCALE_HIGHLIGHT, Tk_Offset(TkScale, highlightColorPtr), 0}, {TK_CONFIG_PIXELS, "-highlightthickness", "highlightThickness", "HighlightThickness", ! DEF_SCALE_HIGHLIGHT_WIDTH, Tk_Offset(TkScale, highlightWidth), ! DISABLE_CHANGE}, #ifdef TK_KANJI_OK {TK_CONFIG_WSTRING, "-label", "label", "Label", DEF_SCALE_LABEL, Tk_Offset(TkScale, label), TK_CONFIG_NULL_OK}, *************** *** 90,96 **** {TK_CONFIG_UID, "-orient", "orient", "Orient", DEF_SCALE_ORIENT, Tk_Offset(TkScale, orientUid), 0}, {TK_CONFIG_RELIEF, "-relief", "relief", "Relief", ! DEF_SCALE_RELIEF, Tk_Offset(TkScale, relief), 0}, {TK_CONFIG_INT, "-repeatdelay", "repeatDelay", "RepeatDelay", DEF_SCALE_REPEAT_DELAY, Tk_Offset(TkScale, repeatDelay), 0}, {TK_CONFIG_INT, "-repeatinterval", "repeatInterval", "RepeatInterval", --- 94,100 ---- {TK_CONFIG_UID, "-orient", "orient", "Orient", DEF_SCALE_ORIENT, Tk_Offset(TkScale, orientUid), 0}, {TK_CONFIG_RELIEF, "-relief", "relief", "Relief", ! DEF_SCALE_RELIEF, Tk_Offset(TkScale, relief), DISABLE_CHANGE}, {TK_CONFIG_INT, "-repeatdelay", "repeatDelay", "RepeatDelay", DEF_SCALE_REPEAT_DELAY, Tk_Offset(TkScale, repeatDelay), 0}, {TK_CONFIG_INT, "-repeatinterval", "repeatInterval", "RepeatInterval", *************** *** 100,109 **** {TK_CONFIG_BOOLEAN, "-showvalue", "showValue", "ShowValue", DEF_SCALE_SHOW_VALUE, Tk_Offset(TkScale, showValue), 0}, {TK_CONFIG_PIXELS, "-sliderlength", "sliderLength", "SliderLength", ! DEF_SCALE_SLIDER_LENGTH, Tk_Offset(TkScale, sliderLength), 0}, {TK_CONFIG_RELIEF, "-sliderrelief", "sliderRelief", "SliderRelief", DEF_SCALE_SLIDER_RELIEF, Tk_Offset(TkScale, sliderRelief), ! TK_CONFIG_DONT_SET_DEFAULT}, {TK_CONFIG_UID, "-state", "state", "State", DEF_SCALE_STATE, Tk_Offset(TkScale, state), 0}, {TK_CONFIG_STRING, "-takefocus", "takeFocus", "TakeFocus", --- 104,114 ---- {TK_CONFIG_BOOLEAN, "-showvalue", "showValue", "ShowValue", DEF_SCALE_SHOW_VALUE, Tk_Offset(TkScale, showValue), 0}, {TK_CONFIG_PIXELS, "-sliderlength", "sliderLength", "SliderLength", ! DEF_SCALE_SLIDER_LENGTH, Tk_Offset(TkScale, sliderLength), ! DISABLE_CHANGE}, {TK_CONFIG_RELIEF, "-sliderrelief", "sliderRelief", "SliderRelief", DEF_SCALE_SLIDER_RELIEF, Tk_Offset(TkScale, sliderRelief), ! TK_CONFIG_DONT_SET_DEFAULT | DISABLE_CHANGE}, {TK_CONFIG_UID, "-state", "state", "State", DEF_SCALE_STATE, Tk_Offset(TkScale, state), 0}, {TK_CONFIG_STRING, "-takefocus", "takeFocus", "TakeFocus", *************** *** 115,128 **** DEF_SCALE_TO, Tk_Offset(TkScale, toValue), 0}, {TK_CONFIG_COLOR, "-troughcolor", "troughColor", "Background", DEF_SCALE_TROUGH_COLOR, Tk_Offset(TkScale, troughColorPtr), ! TK_CONFIG_COLOR_ONLY}, {TK_CONFIG_COLOR, "-troughcolor", "troughColor", "Background", DEF_SCALE_TROUGH_MONO, Tk_Offset(TkScale, troughColorPtr), ! TK_CONFIG_MONO_ONLY}, {TK_CONFIG_STRING, "-variable", "variable", "Variable", DEF_SCALE_VARIABLE, Tk_Offset(TkScale, varName), TK_CONFIG_NULL_OK}, {TK_CONFIG_PIXELS, "-width", "width", "Width", ! DEF_SCALE_WIDTH, Tk_Offset(TkScale, width), 0}, {TK_CONFIG_END, (char *) NULL, (char *) NULL, (char *) NULL, (char *) NULL, 0, 0} }; --- 120,133 ---- DEF_SCALE_TO, Tk_Offset(TkScale, toValue), 0}, {TK_CONFIG_COLOR, "-troughcolor", "troughColor", "Background", DEF_SCALE_TROUGH_COLOR, Tk_Offset(TkScale, troughColorPtr), ! TK_CONFIG_COLOR_ONLY | DISABLE_CHANGE}, {TK_CONFIG_COLOR, "-troughcolor", "troughColor", "Background", DEF_SCALE_TROUGH_MONO, Tk_Offset(TkScale, troughColorPtr), ! TK_CONFIG_MONO_ONLY | DISABLE_CHANGE}, {TK_CONFIG_STRING, "-variable", "variable", "Variable", DEF_SCALE_VARIABLE, Tk_Offset(TkScale, varName), TK_CONFIG_NULL_OK}, {TK_CONFIG_PIXELS, "-width", "width", "Width", ! DEF_SCALE_WIDTH, Tk_Offset(TkScale, width), DISABLE_CHANGE}, {TK_CONFIG_END, (char *) NULL, (char *) NULL, (char *) NULL, (char *) NULL, 0, 0} }; *************** *** 229,234 **** --- 234,241 ---- scalePtr->command = NULL; scalePtr->repeatDelay = 0; scalePtr->repeatInterval = 0; + scalePtr->stipple = None; + scalePtr->darkPtr = NULL; scalePtr->label = NULL; scalePtr->labelLength = 0; scalePtr->state = tkNormalUid; *************** *** 241,246 **** --- 248,254 ---- scalePtr->copyGC = None; scalePtr->tkfont = NULL; scalePtr->textColorPtr = NULL; + scalePtr->troughBackGC = None; scalePtr->textGC = None; scalePtr->relief = TK_RELIEF_FLAT; scalePtr->highlightWidth = 0; *************** *** 475,480 **** --- 483,497 ---- if (scalePtr->textGC != None) { Tk_FreeGC(scalePtr->display, scalePtr->textGC); } + if (scalePtr->darkPtr != NULL) { + Tk_FreeColor(scalePtr->darkPtr); + } + if (scalePtr->stipple != None) { + Tk_FreeBitmap(scalePtr->display, scalePtr->stipple); + } + if (scalePtr->troughBackGC != None) { + Tk_FreeGC(scalePtr->display, scalePtr->troughBackGC); + } Tk_FreeOptions(configSpecs, (char *) scalePtr, scalePtr->display, 0); TkpDestroyScale(scalePtr); } *************** *** 521,526 **** --- 538,547 ---- ScaleVarProc, (ClientData) scalePtr); } + if (Tk_StrictMotif(scalePtr->tkwin)) { + flags |= TK_CONFIG_CHECK_MY_FLAG; + } + if (Tk_ConfigureWidget(interp, scalePtr->tkwin, configSpecs, argc, argv, (char *) scalePtr, flags) != TCL_OK) { return TCL_ERROR; *************** *** 609,620 **** } Tk_SetBackgroundFromBorder(scalePtr->tkwin, scalePtr->bgBorder); - - if (scalePtr->highlightWidth < 0) { - scalePtr->highlightWidth = 0; - } - scalePtr->inset = scalePtr->highlightWidth + scalePtr->borderWidth; - ScaleWorldChanged((ClientData) scalePtr); return TCL_OK; } --- 630,635 ---- *************** *** 644,653 **** --- 659,670 ---- XGCValues gcValues; GC gc; TkScale *scalePtr; + XColor newcolor; scalePtr = (TkScale *) instanceData; gcValues.foreground = scalePtr->troughColorPtr->pixel; + gcValues.background = scalePtr->troughColorPtr->pixel; gc = Tk_GetGC(scalePtr->tkwin, GCForeground, &gcValues); if (scalePtr->troughGC != None) { Tk_FreeGC(scalePtr->display, scalePtr->troughGC); *************** *** 667,678 **** scalePtr->copyGC = Tk_GetGC(scalePtr->tkwin, GCGraphicsExposures, &gcValues); } ! scalePtr->inset = scalePtr->highlightWidth + scalePtr->borderWidth; /* * Recompute display-related information, and let the geometry * manager know how much space is needed now. */ ComputeScaleGeometry(scalePtr); --- 684,734 ---- scalePtr->copyGC = Tk_GetGC(scalePtr->tkwin, GCGraphicsExposures, &gcValues); } ! ! /* Force a borderwidth of 1 */ ! scalePtr->borderWidth = 1; ! ! if (scalePtr->stipple==None) { ! scalePtr->stipple = Tk_GetBitmap((Tcl_Interp *)NULL, scalePtr->tkwin, ! Tk_GetUid("gray50")); ! if (scalePtr->stipple == None) { ! panic("ScrollBar couldn't allocate bitmap for trough"); ! } ! } ! ! Tk_SetBackgroundFromBorder(scalePtr->tkwin, scalePtr->bgBorder); ! /* alloc color for trough base stipple */ ! newcolor.red = (60 * (int) scalePtr->troughColorPtr->red)/100; ! newcolor.green =(60 * (int) scalePtr->troughColorPtr->green)/100; ! newcolor.blue = (60 * (int) scalePtr->troughColorPtr->blue)/100; ! ! if (scalePtr->darkPtr != NULL) { ! Tk_FreeColor(scalePtr->darkPtr); ! } ! scalePtr->darkPtr = Tk_GetColorByValue(scalePtr->tkwin, ! &newcolor); ! ! gcValues.background = scalePtr->troughColorPtr->pixel; ! gcValues.foreground = scalePtr->darkPtr->pixel; ! gcValues.stipple = scalePtr->stipple; ! gcValues.fill_style = FillOpaqueStippled; ! ! gc = Tk_GetGC(scalePtr->tkwin, GCForeground|GCBackground|GCStipple| ! GCFillStyle, &gcValues); ! if (scalePtr->troughBackGC != None) { ! Tk_FreeGC(scalePtr->display, scalePtr->troughBackGC); ! } ! scalePtr->troughBackGC = gc; /* * Recompute display-related information, and let the geometry * manager know how much space is needed now. */ + + if (scalePtr->highlightWidth < 0) { + scalePtr->highlightWidth = 0; + } + scalePtr->inset = scalePtr->highlightWidth + scalePtr->borderWidth; ComputeScaleGeometry(scalePtr); diff -r -c -P -x CVS ../tk8.0.5/generic/tkScale.h ./generic/tkScale.h *** ../tk8.0.5/generic/tkScale.h Tue Aug 17 18:48:56 1999 --- ./generic/tkScale.h Tue Aug 17 18:54:35 1999 *************** *** 11,17 **** * * RCS: @(#) $Id: tkScale.h,v 1.4 1998/09/14 18:23:17 stanton Exp $ */ ! #ifndef _TKSCALE #define _TKSCALE --- 11,20 ---- * * RCS: @(#) $Id: tkScale.h,v 1.4 1998/09/14 18:23:17 stanton Exp $ */ ! /* ! * TkSTEP modifications Copyright (c) 1996 Andy Lo A Foe ! */ ! #ifndef _TKSCALE #define _TKSCALE *************** *** 102,109 **** --- 105,114 ---- Tk_3DBorder activeBorder; /* For drawing the slider when active. */ int sliderRelief; /* Is slider to be drawn raised, sunken, etc. */ XColor *troughColorPtr; /* Color for drawing trough. */ + XColor *darkPtr; GC troughGC; /* For drawing trough. */ GC copyGC; /* Used for copying from pixmap onto screen. */ + GC troughBackGC; Tk_Font tkfont; /* Information about text font, or NULL. */ XColor *textColorPtr; /* Color for drawing text. */ GC textGC; /* GC for drawing text in normal mode. */ *************** *** 112,117 **** --- 117,123 ---- int highlightWidth; /* Width in pixels of highlight to draw * around widget when it has the focus. * <= 0 means don't draw a highlight. */ + Pixmap stipple; XColor *highlightBgColorPtr; /* Color for drawing traversal highlight * area when highlight is off. */ *************** *** 215,221 **** */ #define PRINT_CHARS 150 ! /* * Declaration of procedures used in the implementation of the scrollbar * widget. --- 221,238 ---- */ #define PRINT_CHARS 150 ! ! /* ! * If you want to make Tk ignore attribute settings that may be violating ! * NeXSTEP (tm) styles, leave DISABLE_FORCE_STEP undef'ed, otherwise define it ! * somewhere. ! */ ! #ifndef DISABLE_FORCE_STEP ! #define DISABLE_CHANGE TK_CONFIG_DONT_CHANGE_DEFAULT ! #else ! #define DISABLE_CHANGE 0 ! #endif ! /* * Declaration of procedures used in the implementation of the scrollbar * widget. diff -r -c -P -x CVS ../tk8.0.5/generic/tkScrollbar.c ./generic/tkScrollbar.c *** ../tk8.0.5/generic/tkScrollbar.c Tue Sep 15 03:23:17 1998 --- ./generic/tkScrollbar.c Tue Aug 17 18:54:35 1999 *************** *** 14,19 **** --- 14,24 ---- * * RCS: @(#) $Id: tkScrollbar.c,v 1.2 1998/09/14 18:23:17 stanton Exp $ */ + /* + * TkSTEP modifications Copyright (c) Alfredo K. Kojima + * - surgery performed and implanted into Tk8.0 by Steve Murray + */ + #include "tkPort.h" #include "tkScrollbar.h" *************** *** 26,49 **** Tk_ConfigSpec tkpScrollbarConfigSpecs[] = { {TK_CONFIG_BORDER, "-activebackground", "activeBackground", "Foreground", DEF_SCROLLBAR_ACTIVE_BG_COLOR, Tk_Offset(TkScrollbar, activeBorder), ! TK_CONFIG_COLOR_ONLY}, {TK_CONFIG_BORDER, "-activebackground", "activeBackground", "Foreground", DEF_SCROLLBAR_ACTIVE_BG_MONO, Tk_Offset(TkScrollbar, activeBorder), ! TK_CONFIG_MONO_ONLY}, {TK_CONFIG_RELIEF, "-activerelief", "activeRelief", "Relief", ! DEF_SCROLLBAR_ACTIVE_RELIEF, Tk_Offset(TkScrollbar, activeRelief), 0}, {TK_CONFIG_BORDER, "-background", "background", "Background", DEF_SCROLLBAR_BG_COLOR, Tk_Offset(TkScrollbar, bgBorder), ! TK_CONFIG_COLOR_ONLY}, {TK_CONFIG_BORDER, "-background", "background", "Background", DEF_SCROLLBAR_BG_MONO, Tk_Offset(TkScrollbar, bgBorder), ! TK_CONFIG_MONO_ONLY}, {TK_CONFIG_SYNONYM, "-bd", "borderWidth", (char *) NULL, (char *) NULL, 0, 0}, {TK_CONFIG_SYNONYM, "-bg", "background", (char *) NULL, (char *) NULL, 0, 0}, {TK_CONFIG_PIXELS, "-borderwidth", "borderWidth", "BorderWidth", ! DEF_SCROLLBAR_BORDER_WIDTH, Tk_Offset(TkScrollbar, borderWidth), 0}, {TK_CONFIG_STRING, "-command", "command", "Command", DEF_SCROLLBAR_COMMAND, Tk_Offset(TkScrollbar, command), TK_CONFIG_NULL_OK}, --- 31,56 ---- Tk_ConfigSpec tkpScrollbarConfigSpecs[] = { {TK_CONFIG_BORDER, "-activebackground", "activeBackground", "Foreground", DEF_SCROLLBAR_ACTIVE_BG_COLOR, Tk_Offset(TkScrollbar, activeBorder), ! TK_CONFIG_COLOR_ONLY | DISABLE_CHANGE}, {TK_CONFIG_BORDER, "-activebackground", "activeBackground", "Foreground", DEF_SCROLLBAR_ACTIVE_BG_MONO, Tk_Offset(TkScrollbar, activeBorder), ! TK_CONFIG_MONO_ONLY | DISABLE_CHANGE}, {TK_CONFIG_RELIEF, "-activerelief", "activeRelief", "Relief", ! DEF_SCROLLBAR_ACTIVE_RELIEF, Tk_Offset(TkScrollbar, activeRelief), ! DISABLE_CHANGE}, {TK_CONFIG_BORDER, "-background", "background", "Background", DEF_SCROLLBAR_BG_COLOR, Tk_Offset(TkScrollbar, bgBorder), ! TK_CONFIG_COLOR_ONLY | DISABLE_CHANGE}, {TK_CONFIG_BORDER, "-background", "background", "Background", DEF_SCROLLBAR_BG_MONO, Tk_Offset(TkScrollbar, bgBorder), ! TK_CONFIG_MONO_ONLY | DISABLE_CHANGE}, {TK_CONFIG_SYNONYM, "-bd", "borderWidth", (char *) NULL, (char *) NULL, 0, 0}, {TK_CONFIG_SYNONYM, "-bg", "background", (char *) NULL, (char *) NULL, 0, 0}, {TK_CONFIG_PIXELS, "-borderwidth", "borderWidth", "BorderWidth", ! DEF_SCROLLBAR_BORDER_WIDTH, Tk_Offset(TkScrollbar, borderWidth), ! DISABLE_CHANGE}, {TK_CONFIG_STRING, "-command", "command", "Command", DEF_SCROLLBAR_COMMAND, Tk_Offset(TkScrollbar, command), TK_CONFIG_NULL_OK}, *************** *** 54,72 **** Tk_Offset(TkScrollbar, elementBorderWidth), 0}, {TK_CONFIG_COLOR, "-highlightbackground", "highlightBackground", "HighlightBackground", DEF_SCROLLBAR_HIGHLIGHT_BG, ! Tk_Offset(TkScrollbar, highlightBgColorPtr), 0}, {TK_CONFIG_COLOR, "-highlightcolor", "highlightColor", "HighlightColor", DEF_SCROLLBAR_HIGHLIGHT, ! Tk_Offset(TkScrollbar, highlightColorPtr), 0}, {TK_CONFIG_PIXELS, "-highlightthickness", "highlightThickness", "HighlightThickness", ! DEF_SCROLLBAR_HIGHLIGHT_WIDTH, Tk_Offset(TkScrollbar, highlightWidth), 0}, {TK_CONFIG_BOOLEAN, "-jump", "jump", "Jump", DEF_SCROLLBAR_JUMP, Tk_Offset(TkScrollbar, jump), 0}, {TK_CONFIG_UID, "-orient", "orient", "Orient", DEF_SCROLLBAR_ORIENT, Tk_Offset(TkScrollbar, orientUid), 0}, {TK_CONFIG_RELIEF, "-relief", "relief", "Relief", ! DEF_SCROLLBAR_RELIEF, Tk_Offset(TkScrollbar, relief), 0}, {TK_CONFIG_INT, "-repeatdelay", "repeatDelay", "RepeatDelay", DEF_SCROLLBAR_REPEAT_DELAY, Tk_Offset(TkScrollbar, repeatDelay), 0}, {TK_CONFIG_INT, "-repeatinterval", "repeatInterval", "RepeatInterval", --- 61,87 ---- Tk_Offset(TkScrollbar, elementBorderWidth), 0}, {TK_CONFIG_COLOR, "-highlightbackground", "highlightBackground", "HighlightBackground", DEF_SCROLLBAR_HIGHLIGHT_BG, ! Tk_Offset(TkScrollbar, highlightBgColorPtr), ! DISABLE_CHANGE}, {TK_CONFIG_COLOR, "-highlightcolor", "highlightColor", "HighlightColor", DEF_SCROLLBAR_HIGHLIGHT, ! Tk_Offset(TkScrollbar, highlightColorPtr), ! DISABLE_CHANGE}, {TK_CONFIG_PIXELS, "-highlightthickness", "highlightThickness", "HighlightThickness", ! DEF_SCROLLBAR_HIGHLIGHT_WIDTH, Tk_Offset(TkScrollbar, highlightWidth), ! DISABLE_CHANGE}, {TK_CONFIG_BOOLEAN, "-jump", "jump", "Jump", DEF_SCROLLBAR_JUMP, Tk_Offset(TkScrollbar, jump), 0}, + #ifdef ENABLE_STEP + {TK_CONFIG_BOOLEAN, "-noarrows", "noArrows", "NoArrows", + DEF_SCROLLBAR_NOARROWS, Tk_Offset(TkScrollbar, noArrows), 0}, + #endif {TK_CONFIG_UID, "-orient", "orient", "Orient", DEF_SCROLLBAR_ORIENT, Tk_Offset(TkScrollbar, orientUid), 0}, {TK_CONFIG_RELIEF, "-relief", "relief", "Relief", ! DEF_SCROLLBAR_RELIEF, Tk_Offset(TkScrollbar, relief), ! DISABLE_CHANGE}, {TK_CONFIG_INT, "-repeatdelay", "repeatDelay", "RepeatDelay", DEF_SCROLLBAR_REPEAT_DELAY, Tk_Offset(TkScrollbar, repeatDelay), 0}, {TK_CONFIG_INT, "-repeatinterval", "repeatInterval", "RepeatInterval", *************** *** 76,91 **** TK_CONFIG_NULL_OK}, {TK_CONFIG_COLOR, "-troughcolor", "troughColor", "Background", DEF_SCROLLBAR_TROUGH_COLOR, Tk_Offset(TkScrollbar, troughColorPtr), ! TK_CONFIG_COLOR_ONLY}, {TK_CONFIG_COLOR, "-troughcolor", "troughColor", "Background", DEF_SCROLLBAR_TROUGH_MONO, Tk_Offset(TkScrollbar, troughColorPtr), ! TK_CONFIG_MONO_ONLY}, {TK_CONFIG_PIXELS, "-width", "width", "Width", ! DEF_SCROLLBAR_WIDTH, Tk_Offset(TkScrollbar, width), 0}, {TK_CONFIG_END, (char *) NULL, (char *) NULL, (char *) NULL, (char *) NULL, 0, 0} }; /* * Forward declarations for procedures defined later in this file: */ --- 91,109 ---- TK_CONFIG_NULL_OK}, {TK_CONFIG_COLOR, "-troughcolor", "troughColor", "Background", DEF_SCROLLBAR_TROUGH_COLOR, Tk_Offset(TkScrollbar, troughColorPtr), ! TK_CONFIG_COLOR_ONLY | DISABLE_CHANGE}, {TK_CONFIG_COLOR, "-troughcolor", "troughColor", "Background", DEF_SCROLLBAR_TROUGH_MONO, Tk_Offset(TkScrollbar, troughColorPtr), ! TK_CONFIG_MONO_ONLY | DISABLE_CHANGE}, {TK_CONFIG_PIXELS, "-width", "width", "Width", ! DEF_SCROLLBAR_WIDTH, Tk_Offset(TkScrollbar, width), ! DISABLE_CHANGE}, {TK_CONFIG_END, (char *) NULL, (char *) NULL, (char *) NULL, (char *) NULL, 0, 0} }; + + /* * Forward declarations for procedures defined later in this file: */ *************** *** 97,102 **** --- 115,216 ---- ClientData clientData)); static int ScrollbarWidgetCmd _ANSI_ARGS_((ClientData clientData, Tcl_Interp *, int argc, char **argv)); + + + + /* xpm and bmp for the dimple (/bump) on the scrollbar. These were + * originally in ./tkScrollbar.h, but were moved here to avoid some + * compiler warnings. */ + + static char scrollbar_bump[] = { + " dbbb "\ + "dbdddd"\ + "bdd "\ + "bd ww"\ + "bd www"\ + " d ww " + }; + + static unsigned char scrollbar_bump_bmp[] = { + 0x1e, 0x21, 0x39, 0x35, 0x3d, 0x1e}; + + + /* + *-------------------------------------------------------- + * PaintPixmap - + * Dirty routine to draw pixmaps from char data + * + * gotta find a better way to do this... + *-------------------------------------------------------- + */ + static void PaintPixmap(clientData, d, data, width, height) + ClientData clientData; + Drawable d; + char *data; + int width, height; + { + int x, y, ofs=0; + TkScrollbar *scrollPtr = (TkScrollbar *)clientData; + /* Display *display = scrollPtr->display; *//* removes compiler warning */ + + GC lightGC, backGC, darkGC, dark2GC; + + + backGC = Tk_3DBorderGC( scrollPtr->tkwin, scrollPtr->bgBorder, + TK_3D_FLAT_GC); + lightGC = Tk_3DBorderGC( scrollPtr->tkwin, scrollPtr->bgBorder, + TK_3D_LIGHT_GC); + darkGC = Tk_3DBorderGC( scrollPtr->tkwin, scrollPtr->bgBorder, + TK_3D_DARK_GC); + dark2GC = Tk_3DBorderGC( scrollPtr->tkwin, scrollPtr->bgBorder, + TK_3D_DARK2_GC); + for(y = 0; y < height; y++) { + for(x = 0; x < width; x++) { + switch (data[ofs++]) { + case 'b': /* black */ + XDrawPoint( scrollPtr->display, d, dark2GC, x, y); + break; + case 'd': /* dark */ + XDrawPoint( scrollPtr->display, d, darkGC, x, y); + break; + case 'w': /* white */ + XDrawPoint( scrollPtr->display, d, lightGC, x, y); + break; + default: + XDrawPoint( scrollPtr->display, d, backGC, x, y); + } + } + } + } + + + /* + *--------------------------------------------- + * + * MakePixmaps + * Make pixmaps needed by scrollbar with + * PaintPixmap + * + *--------------------------------------------- + */ + void MakePixmaps(clientData) + ClientData clientData; + { + register TkScrollbar *scrollPtr = (TkScrollbar *) clientData; + + if (Tk_Depth(scrollPtr->tkwin) > 1) { + scrollPtr->bump = Tk_GetPixmap( scrollPtr->display, + Tk_WindowId(scrollPtr->tkwin), + SB_BUMP_WIDTH, SB_BUMP_HEIGHT, Tk_Depth(scrollPtr->tkwin) ); + PaintPixmap(clientData, scrollPtr->bump, scrollbar_bump, + SB_BUMP_WIDTH, SB_BUMP_HEIGHT); + + } else { /* monochrome display */ + scrollPtr->bump = XCreateBitmapFromData( scrollPtr->display, + Tk_WindowId(scrollPtr->tkwin), scrollbar_bump_bmp, + SB_BUMP_WIDTH, SB_BUMP_HEIGHT); + } + } /* *-------------------------------------------------------------- *************** *** 167,172 **** --- 281,289 ---- scrollPtr->bgBorder = NULL; scrollPtr->activeBorder = NULL; scrollPtr->troughColorPtr = NULL; + scrollPtr->darkPtr = NULL; + scrollPtr->bump = None; + scrollPtr->stipple = None; scrollPtr->relief = TK_RELIEF_FLAT; scrollPtr->highlightWidth = 0; scrollPtr->highlightBgColorPtr = NULL; *************** *** 187,192 **** --- 304,312 ---- scrollPtr->cursor = None; scrollPtr->takeFocus = NULL; scrollPtr->flags = 0; + #ifdef ENABLE_STEP + scrollPtr->noArrows = 0; + #endif if (ConfigureScrollbar(interp, scrollPtr, argc-2, argv+2, 0) != TCL_OK) { Tk_DestroyWindow(scrollPtr->tkwin); *************** *** 255,263 **** --- 375,391 ---- length = strlen(argv[2]); oldActiveField = scrollPtr->activeField; if ((c == 'a') && (strcmp(argv[2], "arrow1") == 0)) { + #ifdef ENABLE_STEP + scrollPtr->activeField = scrollPtr->noArrows ? OUTSIDE : TOP_ARROW; + #else scrollPtr->activeField = TOP_ARROW; + #endif } else if ((c == 'a') && (strcmp(argv[2], "arrow2") == 0)) { + #ifdef ENABLE_STEP + scrollPtr->activeField = scrollPtr->noArrows ? OUTSIDE : BOTTOM_ARROW; + #else scrollPtr->activeField = BOTTOM_ARROW; + #endif } else if ((c == 's') && (strncmp(argv[2], "slider", length) == 0)) { scrollPtr->activeField = SLIDER; } else { *************** *** 278,283 **** --- 406,413 ---- tkpScrollbarConfigSpecs, (char *) scrollPtr, argv[2], 0); } else if ((c == 'c') && (strncmp(argv[1], "configure", length) == 0) && (length >= 2)) { + /* Make sure that the foreground colours will be changed. */ + scrollPtr->flags |= RECONFIGURE; if (argc == 2) { result = Tk_ConfigureInfo(interp, scrollPtr->tkwin, tkpScrollbarConfigSpecs, (char *) scrollPtr, *************** *** 304,315 **** } if (scrollPtr->vertical) { pixels = yDelta; ! length = Tk_Height(scrollPtr->tkwin) - 1 ! - 2*(scrollPtr->arrowLength + scrollPtr->inset); } else { pixels = xDelta; ! length = Tk_Width(scrollPtr->tkwin) - 1 ! - 2*(scrollPtr->arrowLength + scrollPtr->inset); } if (length == 0) { fraction = 0.0; --- 434,445 ---- } if (scrollPtr->vertical) { pixels = yDelta; ! length = Tk_Height(scrollPtr->tkwin) ! - 2*(scrollPtr->arrowLength + 1 + scrollPtr->inset); } else { pixels = xDelta; ! length = Tk_Width(scrollPtr->tkwin) ! - 2*(scrollPtr->arrowLength + 1 + scrollPtr->inset); } if (length == 0) { fraction = 0.0; *************** *** 331,343 **** goto error; } if (scrollPtr->vertical) { ! pos = y - (scrollPtr->arrowLength + scrollPtr->inset); ! length = Tk_Height(scrollPtr->tkwin) - 1 ! - 2*(scrollPtr->arrowLength + scrollPtr->inset); } else { ! pos = x - (scrollPtr->arrowLength + scrollPtr->inset); ! length = Tk_Width(scrollPtr->tkwin) - 1 ! - 2*(scrollPtr->arrowLength + scrollPtr->inset); } if (length == 0) { fraction = 0.0; --- 461,473 ---- goto error; } if (scrollPtr->vertical) { ! pos = y - scrollPtr->inset; ! length = Tk_Height(scrollPtr->tkwin) ! - 2*(scrollPtr->arrowLength + scrollPtr->inset + 1); } else { ! pos = x - 2*(scrollPtr->arrowLength + 1) - scrollPtr->inset; ! length = Tk_Width(scrollPtr->tkwin) ! - 2*(scrollPtr->arrowLength + scrollPtr->inset + 1); } if (length == 0) { fraction = 0.0; *************** *** 511,516 **** --- 641,650 ---- { size_t length; + if (Tk_StrictMotif(scrollPtr->tkwin)) { + flags |= TK_CONFIG_CHECK_MY_FLAG; + } + if (Tk_ConfigureWidget(interp, scrollPtr->tkwin, tkpScrollbarConfigSpecs, argc, argv, (char *) scrollPtr, flags) != TCL_OK) { return TCL_ERROR; *************** *** 689,691 **** --- 823,826 ---- scrollPtr->flags |= REDRAW_PENDING; } } + diff -r -c -P -x CVS ../tk8.0.5/generic/tkScrollbar.h ./generic/tkScrollbar.h *** ../tk8.0.5/generic/tkScrollbar.h Tue Sep 15 03:23:17 1998 --- ./generic/tkScrollbar.h Tue Aug 17 18:54:35 1999 *************** *** 11,17 **** * * RCS: @(#) $Id: tkScrollbar.h,v 1.4 1998/09/14 18:23:17 stanton Exp $ */ ! #ifndef _TKSCROLLBAR #define _TKSCROLLBAR --- 11,21 ---- * * RCS: @(#) $Id: tkScrollbar.h,v 1.4 1998/09/14 18:23:17 stanton Exp $ */ ! /* ! * TkSTEP modifications Copyright (c) Alfredo K. Kojima ! * - surgery performed and implanted into Tk8.0 by Steve Murray ! */ ! #ifndef _TKSCROLLBAR #define _TKSCROLLBAR *************** *** 64,69 **** --- 68,74 ---- Tk_3DBorder activeBorder; /* For drawing backgrounds when active (i.e. * when mouse is positioned over element). */ XColor *troughColorPtr; /* Color for drawing trough. */ + XColor *darkPtr; /* Colour for background stipple. */ int relief; /* Indicates whether window as a whole is * raised, sunken, or flat. */ int highlightWidth; /* Width in pixels of highlight to draw *************** *** 73,78 **** --- 78,85 ---- /* Color for drawing traversal highlight * area when highlight is off. */ XColor *highlightColorPtr; /* Color for drawing traversal highlight. */ + Pixmap stipple; /* Trough base pattern. */ + Pixmap bump; /* Bump on the thumb. */ int inset; /* Total width of all borders, including * traversal highlight and 3-D border. * Indicates how much interior stuff must *************** *** 137,142 **** --- 144,152 ---- * scripts. Malloc'ed, but may be NULL. */ int flags; /* Various flags; see below for * definitions. */ + #ifdef ENABLE_STEP + int noArrows; /* If arrow buttons should not be drawn. */ + #endif } TkScrollbar; /* *************** *** 151,156 **** --- 161,172 ---- #define BOTTOM_GAP 4 #define BOTTOM_ARROW 5 + #define ARROW_UP 0 + #define ARROW_DOWN 1 + #define ARROW_LEFT 2 + #define ARROW_RIGHT 3 + + /* * Flag bits for scrollbars: * *************** *** 169,174 **** --- 185,207 ---- #define NEW_STYLE_COMMANDS 2 #define GOT_FOCUS 4 + #define RECONFIGURE 256 + + /* + * If you want to make Tk ignore attribute settings that may be violating + * NeXTSTEP (tm) styles, leave DISABLE_FORCE_STEP undef'ed, otherwise + * define it somewhere. + */ + #ifndef DISABLE_FORCE_STEP + #define DISABLE_CHANGE TK_CONFIG_DONT_CHANGE_DEFAULT + #else + #define DISABLE_CHANGE 0 + #endif + + + #define SB_BUMP_WIDTH 6 + #define SB_BUMP_HEIGHT 6 + /* * Declaration of scrollbar class procedures structure. */ *************** *** 201,207 **** TkScrollbar *scrollPtr)); EXTERN int TkpScrollbarPosition _ANSI_ARGS_(( TkScrollbar *scrollPtr, int x, int y)); ! # undef TCL_STORAGE_CLASS # define TCL_STORAGE_CLASS DLLIMPORT --- 234,246 ---- TkScrollbar *scrollPtr)); EXTERN int TkpScrollbarPosition _ANSI_ARGS_(( TkScrollbar *scrollPtr, int x, int y)); ! EXTERN void DrawArrow _ANSI_ARGS_(( ! TkScrollbar *scrollPtr, Drawable drawable, ! int x, int y, ! int width, int height, unsigned dir)); ! EXTERN void MakePixmaps _ANSI_ARGS_(( ! ClientData clientData)); ! # undef TCL_STORAGE_CLASS # define TCL_STORAGE_CLASS DLLIMPORT diff -r -c -P -x CVS ../tk8.0.5/generic/tkTextDisp.c ./generic/tkTextDisp.c *** ../tk8.0.5/generic/tkTextDisp.c Tue Aug 17 18:48:56 1999 --- ./generic/tkTextDisp.c Tue Aug 17 19:14:07 1999 *************** *** 13,18 **** --- 13,21 ---- * * RCS: @(#) $Id: tkTextDisp.c,v 1.10 1999/03/11 15:37:11 m-hirano Exp $ */ + /* + * TkSTEP modifications Copyright (c) Steve Murray + */ #ifdef KANJI #define TK_KANJI_OK *************** *** 21,26 **** --- 24,30 ---- #include "tkPort.h" #include "tkInt.h" #include "tkText.h" + #include "default.h" /* * The following structure describes how to display a range of characters. *************** *** 2245,2257 **** goto end; } ! Tk_Draw3DRectangle(textPtr->tkwin, Tk_WindowId(textPtr->tkwin), textPtr->border, textPtr->highlightWidth, textPtr->highlightWidth, Tk_Width(textPtr->tkwin) - 2*textPtr->highlightWidth, Tk_Height(textPtr->tkwin) - 2*textPtr->highlightWidth, textPtr->borderWidth, textPtr->relief); if (textPtr->highlightWidth != 0) { GC gc; --- 2249,2276 ---- goto end; } ! ! /* See comments in tkEntry.c and/or tkList.c about this quick fix ! * of the 3D border colour - it's good only for applications that ! * don't mind having grey borders. I'll fix it properly one day ! * (stevem). ! */ ! #ifdef ENABLE_STEP ! Tk_Draw3DRectangle(textPtr->tkwin, Tk_WindowId(textPtr->tkwin), ! Tk_Get3DBorder(textPtr->interp, textPtr->tkwin, NORMAL_BG), ! textPtr->highlightWidth, ! textPtr->highlightWidth, ! Tk_Width(textPtr->tkwin) - 2*textPtr->highlightWidth, ! Tk_Height(textPtr->tkwin) - 2*textPtr->highlightWidth, ! textPtr->borderWidth, textPtr->relief); ! #else Tk_Draw3DRectangle(textPtr->tkwin, Tk_WindowId(textPtr->tkwin), textPtr->border, textPtr->highlightWidth, textPtr->highlightWidth, Tk_Width(textPtr->tkwin) - 2*textPtr->highlightWidth, Tk_Height(textPtr->tkwin) - 2*textPtr->highlightWidth, textPtr->borderWidth, textPtr->relief); + #endif if (textPtr->highlightWidth != 0) { GC gc; diff -r -c -P -x CVS ../tk8.0.5/generic/tkWindow.c ./generic/tkWindow.c *** ../tk8.0.5/generic/tkWindow.c Tue Aug 17 18:48:56 1999 --- ./generic/tkWindow.c Tue Aug 17 18:54:35 1999 *************** *** 8,13 **** --- 8,15 ---- * * Copyright (c) 1989-1994 The Regents of the University of California. * Copyright (c) 1994-1997 Sun Microsystems, Inc. + * + * Drag and Drop portions Copyright (c) 1996 Alfredo K. Kojima * * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. *************** *** 163,168 **** --- 165,176 ---- #ifdef MAC_TCL {"unsupported1", TkUnsupported1Cmd, NULL, 1}, #endif + + #ifdef ENABLE_DND + {"dnd_setdata", Tk_DndSetDataCmd}, + {"dnd_handledrag", Tk_DndHandleDragCmd}, + #endif + {(char *) NULL, (int (*) _ANSI_ARGS_((ClientData, Tcl_Interp *, int, char **))) NULL, NULL, 0} }; *************** *** 286,292 **** Tk_CreatePhotoImageFormat(&tkImgFmtGIF); Tk_CreatePhotoImageFormat(&tkImgFmtPPM); ! /* * Create exit handler to delete all windows when the application * exits. --- 294,306 ---- Tk_CreatePhotoImageFormat(&tkImgFmtGIF); Tk_CreatePhotoImageFormat(&tkImgFmtPPM); ! #ifdef ENABLE_TIFF ! Tk_CreatePhotoImageFormat(&tkImgFmtTIFF); ! #endif ! #ifdef ENABLE_XPM ! Tk_CreatePhotoImageFormat(&tkImgFmtXPM); ! #endif ! /* * Create exit handler to delete all windows when the application * exits. *************** *** 3099,3104 **** --- 3113,3126 ---- if (code != TCL_OK) { goto done; } + + #ifdef ENABLE_DND + /* + * Initialize DragAndDrop stuff + */ + Tk_DndInitialize(interp, (TkWindow *)Tk_MainWindow(interp)); + #endif + Tcl_ResetResult(interp); if (synchronize) { XSynchronize(Tk_Display(Tk_MainWindow(interp)), True); diff -r -c -P -x CVS ../tk8.0.5/library/FontChooser.tcl ./library/FontChooser.tcl *** ../tk8.0.5/library/FontChooser.tcl Thu Jan 1 09:00:00 1970 --- ./library/FontChooser.tcl Tue Aug 17 18:54:36 1999 *************** *** 0 **** --- 1,313 ---- + #! + # Simplified font selection dialog for TkSTEP + # + # Copyright (c) 1996 by Alfredo Kojima + # + + + set tksFWeight(o) Oblique + set tksFWeight(i) Italic + set tksFWeight(r) Roman + set tksFWeight(Oblique) o + set tksFWeight(Italic) i + set tksFWeight(Roman) r + + # + # Updates global font database + # + proc tksUpdateFontDB {} { + global tksFontDB + + #get font path + set fp [exec /bin/sh -c "xset q | grep \"Font Path\" -A 1"] + #split to a list of paths + set fp [split [string trim [lindex [split $fp \n] 1]] ,] + #gets all fonts in each font dir + set tksFontDB(idx) {} + foreach dir "$fp" { + set f [open $dir/fonts.dir] + set entries [gets $f] + for {set i 0} {$i < $entries} {incr i} { + #list of font data + set font [split [lrange [gets $f] 1 end] -] + if {[llength $font]!=15 || [lindex $font 5]!="normal"}\ + continue + set enc "[lindex $font 13]-[lindex $font 14]" + set fam [lindex $font 2] + set sty [lindex $font 3] + set wei [lindex $font 4] + set siz [lindex $font 7] + if {![info exists tksFontDB($enc)]} { + lappend tksFontDB(idx) $enc + set tksFontDB($enc) {} + } + if {![info exists tksFontDB($enc,$fam)]} { + lappend tksFontDB($enc) $fam + set tksFontDB($enc,$fam) {} + } + if {![info exists tksFontDB($enc,$fam,$sty)]} { + lappend tksFontDB($enc,$fam) $sty + set tksFontDB($enc,$fam,$sty) {} + } + if {![info exists tksFontDB($enc,$fam,$sty,$wei)]} { + lappend tksFontDB($enc,$fam,$sty) $wei + set tksFontDB($enc,$fam,$sty,$wei) {} + } + if {[lsearch -exact "$tksFontDB($enc,$fam,$sty,$wei)" \ + $siz] < 0} { + lappend tksFontDB($enc,$fam,$sty,$wei) $siz + } + } + close $f + } + } + + # + # Displays a Font Selection Dialog + # + proc tksFontChooser {} { + global tksFontDB tksSelection tksFOK + + # Only one instance of this dialog may be active at any moment + if {[winfo exists .tksFC]} { + return + } + + toplevel .tksFC + .tksFC configure -width 425 -height 375 + wm title .tksFC "Font Chooser" + wm protocol .tksFC WM_DELETE_WINDOW {set tksSelection {}} + entry .tksFC.sample -bd 2 -relief sunken + label .tksFC.lenc -text "Encoding" -fg white -bg gray30 -bd 2 \ + -relief sunken -font "-adobe-helvetica-bold-r-normal--12-120-75-75-p-70-iso8859-1" + label .tksFC.lfam -text "Family" -fg white -bg gray30 -relief sunken \ + -bd 2 -font "-adobe-helvetica-bold-r-normal--12-120-75-75-p-70-iso8859-1" + label .tksFC.ltpf -text "Typeface" -fg white -bg gray30 -relief sunken\ + -bd 2 -font "-adobe-helvetica-bold-r-normal--12-120-75-75-p-70-iso8859-1" + label .tksFC.lsiz -text "Size" -fg white -bg gray30 -relief sunken \ + -bd 2 -font "-adobe-helvetica-bold-r-normal--12-120-75-75-p-70-iso8859-1" + frame .tksFC.enc -bd 2 -relief sunken + frame .tksFC.fam -bd 2 -relief sunken + frame .tksFC.tpf -bd 2 -relief sunken + frame .tksFC.siz -bd 2 -relief sunken + listbox .tksFC.enc.lb -relief flat -yscrollcommand ".tksFC.enc.sb set"\ + -exportselection 0 + listbox .tksFC.fam.lb -relief flat -yscrollcommand ".tksFC.fam.sb set"\ + -exportselection 0 + listbox .tksFC.tpf.lb -relief flat -yscrollcommand ".tksFC.tpf.sb set"\ + -exportselection 0 + listbox .tksFC.siz.lb -relief flat -yscrollcommand ".tksFC.siz.sb set"\ + -exportselection 0 + scrollbar .tksFC.enc.sb -command ".tksFC.enc.lb yview" + scrollbar .tksFC.fam.sb -command ".tksFC.fam.lb yview" + scrollbar .tksFC.tpf.sb -command ".tksFC.tpf.lb yview" + scrollbar .tksFC.siz.sb -command ".tksFC.siz.lb yview" + entry .tksFC.esiz -justify center -exportselection 0 + #layout + .tksFC.sample insert 0 "Sample Text" + place .tksFC.sample -x 10 -y 10 -width 404 -height 50 + #encoding + place .tksFC.lenc -x 10 -y 70 -width 98 -height 20 + place .tksFC.enc.sb -in .tksFC.enc -x -1 -y -1 -width 20 -height 173 + place .tksFC.enc.lb -in .tksFC.enc -x 20 -y 0 -width 75 -height 172 + place .tksFC.enc -x 10 -y 92 -width 98 -height 175 + #family + place .tksFC.lfam -x 110 -y 70 -width 124 -height 20 + place .tksFC.fam.sb -in .tksFC.fam -x -1 -y -1 -width 20 -height 173 + place .tksFC.fam.lb -in .tksFC.fam -x 20 -y 0 -width 100 -height 172 + place .tksFC.fam -x 110 -y 92 -width 124 -height 175 + #typeface + place .tksFC.ltpf -x 236 -y 70 -width 122 -height 20 + place .tksFC.tpf.sb -in .tksFC.tpf -x -1 -y -1 -width 20 -height 173 + place .tksFC.tpf.lb -in .tksFC.tpf -x 20 -y 0 -width 98 -height 172 + place .tksFC.tpf -x 236 -y 92 -width 122 -height 175 + #size + place .tksFC.lsiz -x 360 -y 70 -width 54 -height 20 + place .tksFC.esiz -x 360 -y 92 -width 54 -height 20 + place .tksFC.siz.sb -in .tksFC.siz -x -1 -y -1 -width 20 -height 151 + place .tksFC.siz.lb -in .tksFC.siz -x 20 -y 0 -width 30 -height 150 + place .tksFC.siz -x 360 -y 114 -width 54 -height 153 + #display other stuff + entry .tksFC.font -exportselection 0 + checkbutton .tksFC.sel -text "Select" -variable select -command { + .tksFC.font configure -exportselection $select } + place .tksFC.font -x 10 -y 290 -width 334 -height 20 + place .tksFC.sel -x 350 -y 290 + + #buttons + frame .tksFC.sep -bd 1 -relief sunken + place .tksFC.sep -x 0 -y 330 -width 435 -height 2 + button .tksFC.preview -text Preview -command {tks_action preview} + place .tksFC.preview -x 257 -y 340 -width 75 -height 25 + button .tksFC.setf -text Set -indicatoron 1 -command { + global tksSelection + set tmp [tks_action get] + if {$tmp!={}} {set tksSelection $tmp} + } + place .tksFC.setf -x 340 -y 340 -width 75 -height 25 + button .tksFC.rebuild -text Rescan -command {tksUpdateFontDB } + place .tksFC.rebuild -x 174 -y 340 -width 75 -height 25 + #build font DB if not already done + if {![info exists tksFontDB(idx)] || [llength $tksFontDB(idx)]<=0} { + label .tksFC.msg -text "Building font database..." + place .tksFC.msg -x 10 -y 340 + .tksFC configure -cursor watch + update + tksUpdateFontDB + .tksFC configure -cursor {} + destroy .tksFC.msg + } + #aux procs + #preview font + proc tks_action {action} { + global tksFontDB tksFWeight + set fam [.tksFC.fam.lb get [.tksFC.fam.lb curselection]] + set tpf [.tksFC.tpf.lb get [.tksFC.tpf.lb curselection]] + set siz [.tksFC.esiz get] + if {$siz!={}} { + tks_usiz 1 + } + set font [.tksFC.font get] + if {$action=="preview"} { + set text "$fam $tpf $siz.0 pt." + .tksFC.sample configure -font $font + .tksFC.sample delete 0 end + .tksFC.sample insert 0 $text + } else { + return $font + } + } + #update size listbox + proc tks_usiz {{lb 0}} { + global tksFontDB tksFWeight + set tmp [.tksFC.siz.lb curselection] + set enc [.tksFC.enc.lb get [.tksFC.enc.lb curselection]] + set fam [.tksFC.fam.lb get [.tksFC.fam.lb curselection]] + set tpf [.tksFC.tpf.lb get [.tksFC.tpf.lb curselection]] + set wei $tksFWeight([lindex $tpf 0]) + set sty [lindex $tpf 1] + if {!$lb} { + .tksFC.siz.lb delete 0 end + foreach i [lsort -integer "$tksFontDB($enc,$fam,$sty,$wei)"] { + .tksFC.siz.lb insert end $i + } + .tksFC.esiz delete 0 end + if {$tmp!={}} { + .tksFC.siz.lb selection set $tmp + set siz [.tksFC.siz.lb get $tmp] + .tksFC.esiz insert 0 $siz + .tksFC.esiz selection range 0 end + } else { + .tksFC.siz.lb selection clear 0 end + .tksFC.siz.lb selection set 0 + set siz [.tksFC.siz.lb get 0] + .tksFC.esiz delete 0 end + .tksFC.esiz insert 0 $siz + .tksFC.esiz selection range 0 end + } + } else { + set siz [.tksFC.esiz get] + } + .tksFC.font delete 0 end + .tksFC.font insert 0 "-*-$fam-$sty-$wei-*-*-$siz-*-*-*-*-*-$enc" + .tksFC.font selection range 0 end + set cursel [.tksFC.siz.lb curselection] + if {$cursel==""} return + .tksFC.siz.lb see $cursel + } + #update typeface listbox + proc tks_utpf {} { + global tksFontDB tksFWeight + + set enc [.tksFC.enc.lb get [.tksFC.enc.lb curselection]] + set fam [.tksFC.fam.lb get [.tksFC.fam.lb curselection]] + .tksFC.tpf.lb delete 0 end + foreach i "$tksFontDB($enc,$fam)" { + foreach w "$tksFontDB($enc,$fam,$i)" { + .tksFC.tpf.lb insert end "$tksFWeight($w) $i" + } + } + .tksFC.siz.lb delete 0 end + .tksFC.tpf.lb selection set 0 + tks_usiz + } + #update family listbox + proc tks_ufam {} { + global tksFontDB + + set enc [.tksFC.enc.lb get [.tksFC.enc.lb curselection]] + .tksFC.fam.lb delete 0 end + foreach i "$tksFontDB($enc)" { + .tksFC.fam.lb insert end $i + } + .tksFC.tpf.lb delete 0 end + .tksFC.siz.lb delete 0 end + + .tksFC.fam.lb selection set 0 + tks_utpf + } + #handle drags + proc tksfc_handledrag {} { + set text [.tksFC.font get] + if {$text=={}} return + dnd_setdata Text $text + dnd_handledrag + } + #bindings + global DNDPos + set DNDPos {} + bind .tksFC.font <3> {set DNDPos 1} + bind .tksFC.font {if {$DNDPos==1} {tksfc_handledrag;set DNDPos {}}} + bind .tksFC.enc.lb { + tks_ufam + } + bind .tksFC.fam.lb { + tks_utpf + } + bind .tksFC.tpf.lb { + tks_usiz + } + bind .tksFC.siz.lb { + tks_usiz + } + bind .tksFC.esiz { + set size [.tksFC.esiz get] + # don't know how to check if a string is a number... + if {[catch {expr [expr $size]}]} { + .tksFC.esiz delete 0 end + } else { + .tksFC.siz.lb selection clear 0 end + } + } + bind .tksFC { + if {[.tksFC.setf cget -indicatoron]} { + .tksFC.setf configure -relief sunken + update idletasks + after 100 + .tksFC.setf configure -relief raised + .tksFC.setf invoke + } + } + #ready to set font? + set tksFOK 0 + bind .tksFC { + if {$tksFOK} { + .tksFC.setf configure -indicatoron 1 + } + } + bind .tksFC { + set tksFOK [.tksFC.setf cget -indicatoron] + .tksFC.setf configure -indicatoron 0 + } + #update lists + foreach i "$tksFontDB(idx)" { + .tksFC.enc.lb insert end $i + } + .tksFC.enc.lb selection set 0 + tks_ufam + + tkwait variable tksSelection + destroy .tksFC + return $tksSelection + } + diff -r -c -P -x CVS ../tk8.0.5/library/button.tcl ./library/button.tcl *** ../tk8.0.5/library/button.tcl Tue Sep 15 03:23:22 1998 --- ./library/button.tcl Tue Aug 17 18:54:36 1999 *************** *** 8,13 **** --- 8,15 ---- # # Copyright (c) 1992-1994 The Regents of the University of California. # Copyright (c) 1994-1996 Sun Microsystems, Inc. + # TkSTEP modifications originally completed by Alfredo K. Kojima + # - surgery performed and implanted into Tk8.0 by Steve Murray # # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. *************** *** 17,254 **** # The code below creates the default class bindings for buttons. #------------------------------------------------------------------------- ! if {$tcl_platform(platform) == "macintosh"} { ! bind Radiobutton { ! tkButtonEnter %W ! } ! bind Radiobutton <1> { ! tkButtonDown %W ! } ! bind Radiobutton { ! tkButtonUp %W ! } ! bind Checkbutton { ! tkButtonEnter %W ! } ! bind Checkbutton <1> { ! tkButtonDown %W ! } ! bind Checkbutton { ! tkButtonUp %W } } - if {$tcl_platform(platform) == "windows"} { - bind Checkbutton { - tkCheckRadioInvoke %W select - } - bind Checkbutton { - tkCheckRadioInvoke %W select - } - bind Checkbutton { - tkCheckRadioInvoke %W deselect - } - bind Checkbutton <1> { - tkCheckRadioDown %W - } - bind Checkbutton { - tkButtonUp %W - } - bind Checkbutton { - tkCheckRadioEnter %W - } ! bind Radiobutton <1> { ! tkCheckRadioDown %W ! } ! bind Radiobutton { ! tkButtonUp %W ! } ! bind Radiobutton { ! tkCheckRadioEnter %W ! } ! } ! if {$tcl_platform(platform) == "unix"} { ! bind Checkbutton { ! if {!$tk_strictMotif} { ! tkCheckRadioInvoke %W ! } ! } ! bind Radiobutton { ! if {!$tk_strictMotif} { ! tkCheckRadioInvoke %W ! } ! } ! bind Checkbutton <1> { tkCheckRadioInvoke %W } ! bind Radiobutton <1> { ! tkCheckRadioInvoke %W ! } ! bind Checkbutton { ! tkButtonEnter %W ! } ! bind Radiobutton { ! tkButtonEnter %W ! } } bind Button { tkButtonInvoke %W } bind Checkbutton { tkCheckRadioInvoke %W } bind Radiobutton { tkCheckRadioInvoke %W } bind Button {} bind Button { tkButtonEnter %W } bind Button { tkButtonLeave %W } bind Button <1> { tkButtonDown %W } bind Button { tkButtonUp %W } bind Checkbutton {} bind Checkbutton { tkButtonLeave %W } bind Radiobutton {} bind Radiobutton { tkButtonLeave %W } - if {$tcl_platform(platform) == "windows"} { - - ######################### - # Windows implementation - ######################### - - # tkButtonEnter -- - # The procedure below is invoked when the mouse pointer enters a - # button widget. It records the button we're in and changes the - # state of the button to active unless the button is disabled. - # - # Arguments: - # w - The name of the widget. - - proc tkButtonEnter w { - global tkPriv - if {[$w cget -state] != "disabled"} { - if {$tkPriv(buttonWindow) == $w} { - $w configure -state active -relief sunken - } - } - set tkPriv(window) $w - } - - # tkButtonLeave -- - # The procedure below is invoked when the mouse pointer leaves a - # button widget. It changes the state of the button back to - # inactive. If we're leaving the button window with a mouse button - # pressed (tkPriv(buttonWindow) == $w), restore the relief of the - # button too. - # - # Arguments: - # w - The name of the widget. - - proc tkButtonLeave w { - global tkPriv - if {[$w cget -state] != "disabled"} { - $w config -state normal - } - if {$w == $tkPriv(buttonWindow)} { - $w configure -relief $tkPriv(relief) - } - set tkPriv(window) "" - } - - # tkCheckRadioEnter -- - # The procedure below is invoked when the mouse pointer enters a - # checkbutton or radiobutton widget. It records the button we're in - # and changes the state of the button to active unless the button is - # disabled. - # - # Arguments: - # w - The name of the widget. - - proc tkCheckRadioEnter w { - global tkPriv - if {[$w cget -state] != "disabled"} { - if {$tkPriv(buttonWindow) == $w} { - $w configure -state active - } - } - set tkPriv(window) $w - } - - # tkButtonDown -- - # The procedure below is invoked when the mouse button is pressed in - # a button widget. It records the fact that the mouse is in the button, - # saves the button's relief so it can be restored later, and changes - # the relief to sunken. - # - # Arguments: - # w - The name of the widget. - - proc tkButtonDown w { - global tkPriv - set tkPriv(relief) [lindex [$w conf -relief] 4] - if {[$w cget -state] != "disabled"} { - set tkPriv(buttonWindow) $w - $w config -relief sunken -state active - } - } - - # tkCheckRadioDown -- - # The procedure below is invoked when the mouse button is pressed in - # a button widget. It records the fact that the mouse is in the button, - # saves the button's relief so it can be restored later, and changes - # the relief to sunken. - # - # Arguments: - # w - The name of the widget. - - proc tkCheckRadioDown w { - global tkPriv - set tkPriv(relief) [lindex [$w conf -relief] 4] - if {[$w cget -state] != "disabled"} { - set tkPriv(buttonWindow) $w - $w config -state active - } - } - - # tkButtonUp -- - # The procedure below is invoked when the mouse button is released - # in a button widget. It restores the button's relief and invokes - # the command as long as the mouse hasn't left the button. - # - # Arguments: - # w - The name of the widget. - - proc tkButtonUp w { - global tkPriv - if {$w == $tkPriv(buttonWindow)} { - set tkPriv(buttonWindow) "" - if {($w == $tkPriv(window)) - && ([$w cget -state] != "disabled")} { - $w config -relief $tkPriv(relief) -state normal - uplevel #0 [list $w invoke] - } - } - } - - } - - if {$tcl_platform(platform) == "unix"} { ##################### # Unix implementation --- 19,94 ---- # The code below creates the default class bindings for buttons. #------------------------------------------------------------------------- ! bind Checkbutton { ! if {!$tk_strictMotif} { ! tkCheckRadioInvoke %W } } ! bind Radiobutton { ! if {!$tk_strictMotif} { tkCheckRadioInvoke %W } ! } ! ! bind Checkbutton <1> { ! tkCheckRadioInvoke %W ! } ! ! bind Radiobutton <1> { ! tkCheckRadioInvoke %W ! } ! ! bind Checkbutton { ! tkButtonEnter %W ! } ! ! bind Radiobutton { ! tkButtonEnter %W } bind Button { tkButtonInvoke %W } + bind Checkbutton { tkCheckRadioInvoke %W } + bind Radiobutton { tkCheckRadioInvoke %W } bind Button {} + bind Button { tkButtonEnter %W } + bind Button { tkButtonLeave %W } + bind Button <1> { tkButtonDown %W } + bind Button { tkButtonUp %W } bind Checkbutton {} + bind Checkbutton { tkButtonLeave %W } bind Radiobutton {} + bind Radiobutton { tkButtonLeave %W } ##################### # Unix implementation *************** *** 263,273 **** # w - The name of the widget. proc tkButtonEnter {w} { ! global tkPriv if {[$w cget -state] != "disabled"} { $w config -state active if {$tkPriv(buttonWindow) == $w} { ! $w configure -state active -relief sunken } } set tkPriv(window) $w --- 103,117 ---- # w - The name of the widget. proc tkButtonEnter {w} { ! global tkPriv TKSTEP_PUSH_STYLE if {[$w cget -state] != "disabled"} { $w config -state active if {$tkPriv(buttonWindow) == $w} { ! if {$TKSTEP_PUSH_STYLE} { ! $w configure -state active -activebackground white ! } else { ! $w configure -state active -relief sunken ! } } } set tkPriv(window) $w *************** *** 284,295 **** # w - The name of the widget. proc tkButtonLeave w { ! global tkPriv if {[$w cget -state] != "disabled"} { $w config -state normal } if {$w == $tkPriv(buttonWindow)} { ! $w configure -relief $tkPriv(relief) } set tkPriv(window) "" } --- 128,143 ---- # w - The name of the widget. proc tkButtonLeave w { ! global tkPriv TKSTEP_PUSH_STYLE if {[$w cget -state] != "disabled"} { $w config -state normal } if {$w == $tkPriv(buttonWindow)} { ! if {$TKSTEP_PUSH_STYLE} { ! $w configure -activebackground $tkPriv(relief) ! } else { ! $w configure -relief $tkPriv(relief) ! } } set tkPriv(window) "" } *************** *** 304,314 **** # w - The name of the widget. proc tkButtonDown w { ! global tkPriv ! set tkPriv(relief) [lindex [$w config -relief] 4] if {[$w cget -state] != "disabled"} { ! set tkPriv(buttonWindow) $w ! $w config -relief sunken } } --- 152,167 ---- # w - The name of the widget. proc tkButtonDown w { ! global tkPriv TKSTEP_PUSH_STYLE if {[$w cget -state] != "disabled"} { ! set tkPriv(buttonWindow) $w ! if {$TKSTEP_PUSH_STYLE} { ! set tkPriv(relief) [$w cget -activebackground] ! $w config -activebackground white ! } else { ! set tkPriv(relief) [lindex [$w config -relief] 4] ! $w config -relief sunken ! } } } *************** *** 321,330 **** # w - The name of the widget. proc tkButtonUp w { ! global tkPriv if {$w == $tkPriv(buttonWindow)} { set tkPriv(buttonWindow) "" ! $w config -relief $tkPriv(relief) if {($w == $tkPriv(window)) && ([$w cget -state] != "disabled")} { uplevel #0 [list $w invoke] --- 174,187 ---- # w - The name of the widget. proc tkButtonUp w { ! global tkPriv TKSTEP_PUSH_STYLE if {$w == $tkPriv(buttonWindow)} { set tkPriv(buttonWindow) "" ! if {$TKSTEP_PUSH_STYLE} { ! $w config -activebackground $tkPriv(relief) ! } else { ! $w config -relief $tkPriv(relief) ! } if {($w == $tkPriv(window)) && ([$w cget -state] != "disabled")} { uplevel #0 [list $w invoke] *************** *** 332,419 **** } } - } - - if {$tcl_platform(platform) == "macintosh"} { - - #################### - # Mac implementation - #################### - - # tkButtonEnter -- - # The procedure below is invoked when the mouse pointer enters a - # button widget. It records the button we're in and changes the - # state of the button to active unless the button is disabled. - # - # Arguments: - # w - The name of the widget. - - proc tkButtonEnter {w} { - global tkPriv - if {[$w cget -state] != "disabled"} { - if {$tkPriv(buttonWindow) == $w} { - $w configure -state active - } - } - set tkPriv(window) $w - } - - # tkButtonLeave -- - # The procedure below is invoked when the mouse pointer leaves a - # button widget. It changes the state of the button back to - # inactive. If we're leaving the button window with a mouse button - # pressed (tkPriv(buttonWindow) == $w), restore the relief of the - # button too. - # - # Arguments: - # w - The name of the widget. - - proc tkButtonLeave w { - global tkPriv - if {$w == $tkPriv(buttonWindow)} { - $w configure -state normal - } - set tkPriv(window) "" - } - - # tkButtonDown -- - # The procedure below is invoked when the mouse button is pressed in - # a button widget. It records the fact that the mouse is in the button, - # saves the button's relief so it can be restored later, and changes - # the relief to sunken. - # - # Arguments: - # w - The name of the widget. - - proc tkButtonDown w { - global tkPriv - if {[$w cget -state] != "disabled"} { - set tkPriv(buttonWindow) $w - $w config -state active - } - } - - # tkButtonUp -- - # The procedure below is invoked when the mouse button is released - # in a button widget. It restores the button's relief and invokes - # the command as long as the mouse hasn't left the button. - # - # Arguments: - # w - The name of the widget. - - proc tkButtonUp w { - global tkPriv - if {$w == $tkPriv(buttonWindow)} { - $w config -state normal - set tkPriv(buttonWindow) "" - if {($w == $tkPriv(window)) - && ([$w cget -state] != "disabled")} { - uplevel #0 [list $w invoke] - } - } - } - } ################## # Shared routines --- 189,195 ---- diff -r -c -P -x CVS ../tk8.0.5/library/demos/dragtest ./library/demos/dragtest *** ../tk8.0.5/library/demos/dragtest Thu Jan 1 09:00:00 1970 --- ./library/demos/dragtest Tue Aug 17 18:54:36 1999 *************** *** 0 **** --- 1,39 ---- + #!/bin/sh + # the next line restarts using wish \ + exec wish "$0" "$@" + + set data "Hello, I'm TkDND!!" + set type "Text" + set number "10" + + label .l -bd 2 -relief groove -text "Drag Data" + pack .l + bind .l { + if {$type == "Number"} { + dnd_setdata $number $data + } else { + dnd_setdata $type $data + } + dnd_handledrag + } + + entry .e -bd 2 -relief sunken -textvariable data + pack .e + + frame .f + radiobutton .f.r1 -value "RawData" -variable type -text "RawData" + radiobutton .f.r2 -value "File" -variable type -text "File" + radiobutton .f.r3 -value "Files" -variable type -text "Files" + radiobutton .f.r4 -value "Text" -variable type -text "Text" + radiobutton .f.r5 -value "Dir" -variable type -text "Dir" + radiobutton .f.r6 -value "Link" -variable type -text "Link" + radiobutton .f.r7 -value "Exe" -variable type -text "Exe" + radiobutton .f.r8 -value "URL" -variable type -text "URL" + radiobutton .f.r9 -value "MIME" -variable type -text "MIME" + frame .f.n + radiobutton .f.n.r -value "Number" -variable type + entry .f.n.e -bd 2 -relief sunken -textvariable number + pack .f.n.r .f.n.e -side left + + pack .f.r1 .f.r2 .f.r3 .f.r4 .f.r5 .f.r6 .f.r7 .f.r8 .f.r9 .f.n -anchor w + pack .f -anchor c diff -r -c -P -x CVS ../tk8.0.5/library/demos/droptest ./library/demos/droptest *** ../tk8.0.5/library/demos/droptest Thu Jan 1 09:00:00 1970 --- ./library/demos/droptest Tue Aug 17 18:54:36 1999 *************** *** 0 **** --- 1,7 ---- + #!/bin/sh + # the next line restarts using wish \ + exec wish "$0" "$@" + + # Simple drop test + + bind . {puts "Received a drop!!\nData Type:%P\nData Size:%Z\nData:%D\nButton:%b\nState:%s\nPos: %x %y\nRootPos: %X %Y"} diff -r -c -P -x CVS ../tk8.0.5/library/demos/imagedrop ./library/demos/imagedrop *** ../tk8.0.5/library/demos/imagedrop Thu Jan 1 09:00:00 1970 --- ./library/demos/imagedrop Tue Aug 17 18:54:36 1999 *************** *** 0 **** --- 1,28 ---- + #!/bin/sh + # the next line restarts using wish \ + exec wish "$0" "$@" + + # Trivial Image Drop Displayer + # + # Use files or something to drag a supported format + # and drop in the sunken box + # + + image create photo .i + label .l -image .i + label .da -text "Image Viewer" -bd 2 -relief sunken + pack .da + pack .l -side bottom -fill both -expand y + bind .da { + . configure -cursor clock + image delete .i + image create photo .i + if {[catch { + .i read %D + }] != 0} { + puts "Invalid file type" + .i read [file join $tk_library demos images tcllogo.gif] + } + . configure -cursor top_left_arrow + } + diff -r -c -P -x CVS ../tk8.0.5/library/demos/tcolor2 ./library/demos/tcolor2 *** ../tk8.0.5/library/demos/tcolor2 Thu Jan 1 09:00:00 1970 --- ./library/demos/tcolor2 Tue Aug 17 18:54:36 1999 *************** *** 0 **** --- 1,367 ---- + #!/bin/sh + # \ + exec wishstep8.0 "$0" "$@" + + # tcolor -- + # This script implements a simple color editor, where you can + # create colors using either the RGB, HSB, or CYM color spaces + # and apply the color to existing applications. + # + # Used as a colorpanel until a real one is built + # + # SCCS: @(#) tcolor 1.10 96/02/16 10:49:25 + + wm title . "Color Panel" + + # Global variables that control the program: + # + # colorSpace - Color space currently being used for + # editing. Must be "rgb", "cmy", or "hsb". + # label1, label2, label3 - Labels for the scales. + # red, green, blue - Current color intensities in decimal + # on a scale of 0-65535. + # color - A string giving the current color value + # in the proper form for x: + # #RRRRGGGGBBBB + # updating - Non-zero means that we're in the middle of + # updating the scales to load a new color,so + # information shouldn't be propagating back + # from the scales to other elements of the + # program: this would make an infinite loop. + # command - Holds the command that has been typed + # into the "Command" entry. + # autoUpdate - 1 means execute the update command + # automatically whenever the color changes. + # name - Name for new color, typed into entry. + + set colorSpace hsb + set red 65535 + set green 0 + set blue 0 + set color #ffff00000000 + set updating 0 + set autoUpdate 1 + set name "" + + # Create the menu bar at the top of the window. + + frame .menu -relief raised -borderwidth 2 + pack .menu -side top -fill x + menubutton .menu.file -text File -menu .menu.file.m -underline 0 + menu .menu.file.m + .menu.file.m add radio -label "RGB color space" -variable colorSpace \ + -value rgb -underline 0 -command {changeColorSpace rgb} + .menu.file.m add radio -label "CMY color space" -variable colorSpace \ + -value cmy -underline 0 -command {changeColorSpace cmy} + .menu.file.m add radio -label "HSB color space" -variable colorSpace \ + -value hsb -underline 0 -command {changeColorSpace hsb} + #.menu.file.m add separator + #.menu.file.m add radio -label "Automatic updates" -variable autoUpdate \ + # -value 1 -underline 0 + #.menu.file.m add radio -label "Manual updates" -variable autoUpdate \ + # -value 0 -underline 0 + #.menu.file.m add separator + .menu.file.m add command -label "Exit program" -underline 0 \ + -command "destroy ." + pack .menu.file -side left + + # Create the command entry window at the bottom of the window, along + # with the update button. + + frame .bot -relief raised -borderwidth 2 + pack .bot -side bottom -fill x + label .commandLabel -text "Command:" + entry .command -relief sunken -borderwidth 2 -textvariable command \ + -font -Adobe-Courier-Medium-R-Normal--*-120-*-*-*-*-*-* + button .update -text Update -command doUpdate + #pack .commandLabel -in .bot -side left + #pack .update -in .bot -side right -pady .1c -padx .25c + #pack .command -in .bot -expand yes -fill x -ipadx 0.25c + + # Create the listbox that holds all of the color names in rgb.txt, + # if an rgb.txt file can be found. + + frame .middle -relief raised -borderwidth 2 + pack .middle -side top -fill both + foreach i {/usr/local/lib/X11/rgb.txt /usr/lib/X11/rgb.txt + /X11/R5/lib/X11/rgb.txt /X11/R4/lib/rgb/rgb.txt + /usr/openwin/lib/X11/rgb.txt} { + if ![file readable $i] { + continue; + } + set f [open $i] + frame .middle.left + pack .middle.left -side left -padx .25c -pady .25c + listbox .names -width 20 -height 12 -yscrollcommand ".scroll set" \ + -relief sunken -borderwidth 2 -exportselection false + bind .names { + tc_loadNamedColor [.names get [.names curselection]] + } + scrollbar .scroll -orient vertical -command ".names yview" \ + -relief sunken -borderwidth 2 + pack .names -in .middle.left -side left + pack .scroll -in .middle.left -side right -fill y + while {[gets $f line] >= 0} { + if {[llength $line] == 4} { + .names insert end [lindex $line 3] + } + } + close $f + break + } + + # Create the three scales for editing the color, and the entry for + # typing in a color value. + + frame .middle.middle + pack .middle.middle -side left -expand yes -fill y + frame .middle.middle.1 + frame .middle.middle.2 + frame .middle.middle.3 + frame .middle.middle.4 + pack .middle.middle.1 .middle.middle.2 .middle.middle.3 -side top -expand yes + pack .middle.middle.4 -side top -expand yes -fill x + foreach i {1 2 3} { + label .label$i -textvariable label$i + scale .scale$i -from 0 -to 1000 -length 6c -orient horizontal \ + -command tc_scaleChanged + pack .scale$i .label$i -in .middle.middle.$i -side top -anchor w + } + label .nameLabel -text "Name:" + entry .name -relief sunken -borderwidth 2 -textvariable name -width 10 \ + -font -Adobe-Courier-Medium-R-Normal--*-120-*-*-*-*-*-* + pack .nameLabel -in .middle.middle.4 -side left + pack .name -in .middle.middle.4 -side right -expand 1 -fill x + bind .name {tc_loadNamedColor $name} + + # Create the color display swatch on the right side of the window. + + frame .middle.right + pack .middle.right -side left -pady .25c -padx .25c -anchor s + frame .bd -relief sunken -bd 4 + frame .bd.swatch -width 2c -height 5c -background $color -relief flat + bind .bd.swatch {dnd_setdata Text [.bd.swatch cget -bg]; + dnd_handledrag "@$tk_library/paint.xbm $tk_library/paintm.xbm [.bd.swatch cget -bg] white" + } + + label .value -textvariable color -width 13 \ + -font -Adobe-Courier-Medium-R-Normal--*-120-*-*-*-*-*-* + pack .bd.swatch -in .bd -expand yes -fill both + pack .bd -in .middle.right -side top -expand yes -fill both + pack .value -in .middle.right -side bottom -pady .25c + + # The procedure below is invoked when one of the scales is adjusted. + # It propagates color information from the current scale readings + # to everywhere else that it is used. + + proc tc_scaleChanged args { + global red green blue colorSpace color updating autoUpdate + if $updating { + return + } + if {$colorSpace == "rgb"} { + set red [format %.0f [expr [.scale1 get]*65.535]] + set green [format %.0f [expr [.scale2 get]*65.535]] + set blue [format %.0f [expr [.scale3 get]*65.535]] + } else { + if {$colorSpace == "cmy"} { + set red [format %.0f [expr {65535 - [.scale1 get]*65.535}]] + set green [format %.0f [expr {65535 - [.scale2 get]*65.535}]] + set blue [format %.0f [expr {65535 - [.scale3 get]*65.535}]] + } else { + set list [hsbToRgb [expr {[.scale1 get]/1000.0}] \ + [expr {[.scale2 get]/1000.0}] \ + [expr {[.scale3 get]/1000.0}]] + set red [lindex $list 0] + set green [lindex $list 1] + set blue [lindex $list 2] + } + } + set color [format "#%04x%04x%04x" $red $green $blue] + .bd.swatch config -bg $color + if $autoUpdate doUpdate + update idletasks + } + + # The procedure below is invoked to update the scales from the + # current red, green, and blue intensities. It's invoked after + # a change in the color space and after a named color value has + # been loaded. + + proc tc_setScales {} { + global red green blue colorSpace updating + set updating 1 + if {$colorSpace == "rgb"} { + .scale1 set [format %.0f [expr $red/65.535]] + .scale2 set [format %.0f [expr $green/65.535]] + .scale3 set [format %.0f [expr $blue/65.535]] + } else { + if {$colorSpace == "cmy"} { + .scale1 set [format %.0f [expr (65535-$red)/65.535]] + .scale2 set [format %.0f [expr (65535-$green)/65.535]] + .scale3 set [format %.0f [expr (65535-$blue)/65.535]] + } else { + set list [rgbToHsv $red $green $blue] + .scale1 set [format %.0f [expr {[lindex $list 0] * 1000.0}]] + .scale2 set [format %.0f [expr {[lindex $list 1] * 1000.0}]] + .scale3 set [format %.0f [expr {[lindex $list 2] * 1000.0}]] + } + } + set updating 0 + } + + # The procedure below is invoked when a named color has been + # selected from the listbox or typed into the entry. It loads + # the color into the editor. + + proc tc_loadNamedColor name { + global red green blue color autoUpdate + + if {[string index $name 0] != "#"} { + set list [winfo rgb .bd.swatch $name] + set red [lindex $list 0] + set green [lindex $list 1] + set blue [lindex $list 2] + } else { + case [string length $name] { + 4 {set format "#%1x%1x%1x"; set shift 12} + 7 {set format "#%2x%2x%2x"; set shift 8} + 10 {set format "#%3x%3x%3x"; set shift 4} + 13 {set format "#%4x%4x%4x"; set shift 0} + default {error "syntax error in color name \"$name\""} + } + if {[scan $name $format red green blue] != 3} { + error "syntax error in color name \"$name\"" + } + set red [expr $red<<$shift] + set green [expr $green<<$shift] + set blue [expr $blue<<$shift] + } + tc_setScales + set color [format "#%04x%04x%04x" $red $green $blue] + .bd.swatch config -bg $color + if $autoUpdate doUpdate + } + + # The procedure below is invoked when a new color space is selected. + # It changes the labels on the scales and re-loads the scales with + # the appropriate values for the current color in the new color space + + proc changeColorSpace space { + global label1 label2 label3 + if {$space == "rgb"} { + set label1 Red + set label2 Green + set label3 Blue + tc_setScales + return + } + if {$space == "cmy"} { + set label1 Cyan + set label2 Magenta + set label3 Yellow + tc_setScales + return + } + if {$space == "hsb"} { + set label1 Hue + set label2 Saturation + set label3 Brightness + tc_setScales + return + } + } + + # The procedure below converts an RGB value to HSB. It takes red, green, + # and blue components (0-65535) as arguments, and returns a list containing + # HSB components (floating-point, 0-1) as result. The code here is a copy + # of the code on page 615 of "Fundamentals of Interactive Computer Graphics" + # by Foley and Van Dam. + + proc rgbToHsv {red green blue} { + if {$red > $green} { + set max $red.0 + set min $green.0 + } else { + set max $green.0 + set min $red.0 + } + if {$blue > $max} { + set max $blue.0 + } else { + if {$blue < $min} { + set min $blue.0 + } + } + set range [expr $max-$min] + if {$max == 0} { + set sat 0 + } else { + set sat [expr {($max-$min)/$max}] + } + if {$sat == 0} { + set hue 0 + } else { + set rc [expr {($max - $red)/$range}] + set gc [expr {($max - $green)/$range}] + set bc [expr {($max - $blue)/$range}] + if {$red == $max} { + set hue [expr {.166667*($bc - $gc)}] + } else { + if {$green == $max} { + set hue [expr {.166667*(2 + $rc - $bc)}] + } else { + set hue [expr {.166667*(4 + $gc - $rc)}] + } + } + if {$hue < 0.0} { + set hue [expr $hue + 1.0] + } + } + return [list $hue $sat [expr {$max/65535}]] + } + + # The procedure below converts an HSB value to RGB. It takes hue, saturation, + # and value components (floating-point, 0-1.0) as arguments, and returns a + # list containing RGB components (integers, 0-65535) as result. The code + # here is a copy of the code on page 616 of "Fundamentals of Interactive + # Computer Graphics" by Foley and Van Dam. + + proc hsbToRgb {hue sat value} { + set v [format %.0f [expr 65535.0*$value]] + if {$sat == 0} { + return "$v $v $v" + } else { + set hue [expr $hue*6.0] + if {$hue >= 6.0} { + set hue 0.0 + } + scan $hue. %d i + set f [expr $hue-$i] + set p [format %.0f [expr {65535.0*$value*(1 - $sat)}]] + set q [format %.0f [expr {65535.0*$value*(1 - ($sat*$f))}]] + set t [format %.0f [expr {65535.0*$value*(1 - ($sat*(1 - $f)))}]] + case $i \ + 0 {return "$v $t $p"} \ + 1 {return "$q $v $p"} \ + 2 {return "$p $v $t"} \ + 3 {return "$p $q $v"} \ + 4 {return "$t $p $v"} \ + 5 {return "$v $p $q"} + error "i value $i is out of range" + } + } + + # The procedure below is invoked when the "Update" button is pressed, + # and whenever the color changes if update mode is enabled. It + # propagates color information as determined by the command in the + # Command entry. + + proc doUpdate {} { + # global color command + # set newCmd $command + # regsub -all %% $command $color newCmd + # eval $newCmd + } + + changeColorSpace hsb diff -r -c -P -x CVS ../tk8.0.5/library/demos/tfontsel ./library/demos/tfontsel *** ../tk8.0.5/library/demos/tfontsel Thu Jan 1 09:00:00 1970 --- ./library/demos/tfontsel Tue Aug 17 18:54:36 1999 *************** *** 0 **** --- 1,8 ---- + #!/bin/sh + # \ + exec wishstep8.0 "$0" "$@" + + wm withdraw . + set font [tksFontChooser] + puts $font + exit diff -r -c -P -x CVS ../tk8.0.5/library/demos/widget ./library/demos/widget *** ../tk8.0.5/library/demos/widget Tue Sep 15 03:23:30 1998 --- ./library/demos/widget Tue Aug 17 18:54:36 1999 *************** *** 1,6 **** #!/bin/sh # the next line restarts using wish \ ! exec wish "$0" "$@" # widget -- # This script demonstrates the various widgets provided by Tk, --- 1,6 ---- #!/bin/sh # the next line restarts using wish \ ! exec wish8.0 "$0" "$@" # widget -- # This script demonstrates the various widgets provided by Tk, *************** *** 342,347 **** --- 342,348 ---- pack .code.buttons -side bottom -fill x button .code.buttons.dismiss -text Dismiss \ -default active -command "destroy .code" + bind .code "tkButtonInvoke .code.buttons.dismiss" button .code.buttons.rerun -text "Rerun Demo" -command { eval [.code.text get 1.0 end] } diff -r -c -P -x CVS ../tk8.0.5/library/demos.jp/dragtest ./library/demos.jp/dragtest *** ../tk8.0.5/library/demos.jp/dragtest Thu Jan 1 09:00:00 1970 --- ./library/demos.jp/dragtest Wed Aug 18 13:18:01 1999 *************** *** 0 **** --- 1,39 ---- + #!/bin/sh + # the next line restarts using wish \ + exec wish "$0" "$@" + + set data "Hello, I'm TkDND!!" + set type "Text" + set number "10" + + label .l -bd 2 -relief groove -text "Drag Data" + pack .l + bind .l { + if {$type == "Number"} { + dnd_setdata $number $data + } else { + dnd_setdata $type $data + } + dnd_handledrag + } + + entry .e -bd 2 -relief sunken -textvariable data + pack .e + + frame .f + radiobutton .f.r1 -value "RawData" -variable type -text "RawData" + radiobutton .f.r2 -value "File" -variable type -text "File" + radiobutton .f.r3 -value "Files" -variable type -text "Files" + radiobutton .f.r4 -value "Text" -variable type -text "Text" + radiobutton .f.r5 -value "Dir" -variable type -text "Dir" + radiobutton .f.r6 -value "Link" -variable type -text "Link" + radiobutton .f.r7 -value "Exe" -variable type -text "Exe" + radiobutton .f.r8 -value "URL" -variable type -text "URL" + radiobutton .f.r9 -value "MIME" -variable type -text "MIME" + frame .f.n + radiobutton .f.n.r -value "Number" -variable type + entry .f.n.e -bd 2 -relief sunken -textvariable number + pack .f.n.r .f.n.e -side left + + pack .f.r1 .f.r2 .f.r3 .f.r4 .f.r5 .f.r6 .f.r7 .f.r8 .f.r9 .f.n -anchor w + pack .f -anchor c diff -r -c -P -x CVS ../tk8.0.5/library/demos.jp/droptest ./library/demos.jp/droptest *** ../tk8.0.5/library/demos.jp/droptest Thu Jan 1 09:00:00 1970 --- ./library/demos.jp/droptest Wed Aug 18 13:18:01 1999 *************** *** 0 **** --- 1,7 ---- + #!/bin/sh + # the next line restarts using wish \ + exec wish "$0" "$@" + + # Simple drop test + + bind . {puts "Received a drop!!\nData Type:%P\nData Size:%Z\nData:%D\nButton:%b\nState:%s\nPos: %x %y\nRootPos: %X %Y"} diff -r -c -P -x CVS ../tk8.0.5/library/demos.jp/imagedrop ./library/demos.jp/imagedrop *** ../tk8.0.5/library/demos.jp/imagedrop Thu Jan 1 09:00:00 1970 --- ./library/demos.jp/imagedrop Wed Aug 18 13:18:01 1999 *************** *** 0 **** --- 1,28 ---- + #!/bin/sh + # the next line restarts using wish \ + exec wish "$0" "$@" + + # Trivial Image Drop Displayer + # + # Use files or something to drag a supported format + # and drop in the sunken box + # + + image create photo .i + label .l -image .i + label .da -text "Image Viewer" -bd 2 -relief sunken + pack .da + pack .l -side bottom -fill both -expand y + bind .da { + . configure -cursor clock + image delete .i + image create photo .i + if {[catch { + .i read %D + }] != 0} { + puts "Invalid file type" + .i read [file join $tk_library demos images tcllogo.gif] + } + . configure -cursor top_left_arrow + } + diff -r -c -P -x CVS ../tk8.0.5/library/demos.jp/tcolor2 ./library/demos.jp/tcolor2 *** ../tk8.0.5/library/demos.jp/tcolor2 Thu Jan 1 09:00:00 1970 --- ./library/demos.jp/tcolor2 Wed Aug 18 13:18:01 1999 *************** *** 0 **** --- 1,367 ---- + #!/bin/sh + # \ + exec wishstep8.0 "$0" "$@" + + # tcolor -- + # This script implements a simple color editor, where you can + # create colors using either the RGB, HSB, or CYM color spaces + # and apply the color to existing applications. + # + # Used as a colorpanel until a real one is built + # + # SCCS: @(#) tcolor 1.10 96/02/16 10:49:25 + + wm title . "Color Panel" + + # Global variables that control the program: + # + # colorSpace - Color space currently being used for + # editing. Must be "rgb", "cmy", or "hsb". + # label1, label2, label3 - Labels for the scales. + # red, green, blue - Current color intensities in decimal + # on a scale of 0-65535. + # color - A string giving the current color value + # in the proper form for x: + # #RRRRGGGGBBBB + # updating - Non-zero means that we're in the middle of + # updating the scales to load a new color,so + # information shouldn't be propagating back + # from the scales to other elements of the + # program: this would make an infinite loop. + # command - Holds the command that has been typed + # into the "Command" entry. + # autoUpdate - 1 means execute the update command + # automatically whenever the color changes. + # name - Name for new color, typed into entry. + + set colorSpace hsb + set red 65535 + set green 0 + set blue 0 + set color #ffff00000000 + set updating 0 + set autoUpdate 1 + set name "" + + # Create the menu bar at the top of the window. + + frame .menu -relief raised -borderwidth 2 + pack .menu -side top -fill x + menubutton .menu.file -text File -menu .menu.file.m -underline 0 + menu .menu.file.m + .menu.file.m add radio -label "RGB color space" -variable colorSpace \ + -value rgb -underline 0 -command {changeColorSpace rgb} + .menu.file.m add radio -label "CMY color space" -variable colorSpace \ + -value cmy -underline 0 -command {changeColorSpace cmy} + .menu.file.m add radio -label "HSB color space" -variable colorSpace \ + -value hsb -underline 0 -command {changeColorSpace hsb} + #.menu.file.m add separator + #.menu.file.m add radio -label "Automatic updates" -variable autoUpdate \ + # -value 1 -underline 0 + #.menu.file.m add radio -label "Manual updates" -variable autoUpdate \ + # -value 0 -underline 0 + #.menu.file.m add separator + .menu.file.m add command -label "Exit program" -underline 0 \ + -command "destroy ." + pack .menu.file -side left + + # Create the command entry window at the bottom of the window, along + # with the update button. + + frame .bot -relief raised -borderwidth 2 + pack .bot -side bottom -fill x + label .commandLabel -text "Command:" + entry .command -relief sunken -borderwidth 2 -textvariable command \ + -font -Adobe-Courier-Medium-R-Normal--*-120-*-*-*-*-*-* + button .update -text Update -command doUpdate + #pack .commandLabel -in .bot -side left + #pack .update -in .bot -side right -pady .1c -padx .25c + #pack .command -in .bot -expand yes -fill x -ipadx 0.25c + + # Create the listbox that holds all of the color names in rgb.txt, + # if an rgb.txt file can be found. + + frame .middle -relief raised -borderwidth 2 + pack .middle -side top -fill both + foreach i {/usr/local/lib/X11/rgb.txt /usr/lib/X11/rgb.txt + /X11/R5/lib/X11/rgb.txt /X11/R4/lib/rgb/rgb.txt + /usr/openwin/lib/X11/rgb.txt} { + if ![file readable $i] { + continue; + } + set f [open $i] + frame .middle.left + pack .middle.left -side left -padx .25c -pady .25c + listbox .names -width 20 -height 12 -yscrollcommand ".scroll set" \ + -relief sunken -borderwidth 2 -exportselection false + bind .names { + tc_loadNamedColor [.names get [.names curselection]] + } + scrollbar .scroll -orient vertical -command ".names yview" \ + -relief sunken -borderwidth 2 + pack .names -in .middle.left -side left + pack .scroll -in .middle.left -side right -fill y + while {[gets $f line] >= 0} { + if {[llength $line] == 4} { + .names insert end [lindex $line 3] + } + } + close $f + break + } + + # Create the three scales for editing the color, and the entry for + # typing in a color value. + + frame .middle.middle + pack .middle.middle -side left -expand yes -fill y + frame .middle.middle.1 + frame .middle.middle.2 + frame .middle.middle.3 + frame .middle.middle.4 + pack .middle.middle.1 .middle.middle.2 .middle.middle.3 -side top -expand yes + pack .middle.middle.4 -side top -expand yes -fill x + foreach i {1 2 3} { + label .label$i -textvariable label$i + scale .scale$i -from 0 -to 1000 -length 6c -orient horizontal \ + -command tc_scaleChanged + pack .scale$i .label$i -in .middle.middle.$i -side top -anchor w + } + label .nameLabel -text "Name:" + entry .name -relief sunken -borderwidth 2 -textvariable name -width 10 \ + -font -Adobe-Courier-Medium-R-Normal--*-120-*-*-*-*-*-* + pack .nameLabel -in .middle.middle.4 -side left + pack .name -in .middle.middle.4 -side right -expand 1 -fill x + bind .name {tc_loadNamedColor $name} + + # Create the color display swatch on the right side of the window. + + frame .middle.right + pack .middle.right -side left -pady .25c -padx .25c -anchor s + frame .bd -relief sunken -bd 4 + frame .bd.swatch -width 2c -height 5c -background $color -relief flat + bind .bd.swatch {dnd_setdata Text [.bd.swatch cget -bg]; + dnd_handledrag "@$tk_library/paint.xbm $tk_library/paintm.xbm [.bd.swatch cget -bg] white" + } + + label .value -textvariable color -width 13 \ + -font -Adobe-Courier-Medium-R-Normal--*-120-*-*-*-*-*-* + pack .bd.swatch -in .bd -expand yes -fill both + pack .bd -in .middle.right -side top -expand yes -fill both + pack .value -in .middle.right -side bottom -pady .25c + + # The procedure below is invoked when one of the scales is adjusted. + # It propagates color information from the current scale readings + # to everywhere else that it is used. + + proc tc_scaleChanged args { + global red green blue colorSpace color updating autoUpdate + if $updating { + return + } + if {$colorSpace == "rgb"} { + set red [format %.0f [expr [.scale1 get]*65.535]] + set green [format %.0f [expr [.scale2 get]*65.535]] + set blue [format %.0f [expr [.scale3 get]*65.535]] + } else { + if {$colorSpace == "cmy"} { + set red [format %.0f [expr {65535 - [.scale1 get]*65.535}]] + set green [format %.0f [expr {65535 - [.scale2 get]*65.535}]] + set blue [format %.0f [expr {65535 - [.scale3 get]*65.535}]] + } else { + set list [hsbToRgb [expr {[.scale1 get]/1000.0}] \ + [expr {[.scale2 get]/1000.0}] \ + [expr {[.scale3 get]/1000.0}]] + set red [lindex $list 0] + set green [lindex $list 1] + set blue [lindex $list 2] + } + } + set color [format "#%04x%04x%04x" $red $green $blue] + .bd.swatch config -bg $color + if $autoUpdate doUpdate + update idletasks + } + + # The procedure below is invoked to update the scales from the + # current red, green, and blue intensities. It's invoked after + # a change in the color space and after a named color value has + # been loaded. + + proc tc_setScales {} { + global red green blue colorSpace updating + set updating 1 + if {$colorSpace == "rgb"} { + .scale1 set [format %.0f [expr $red/65.535]] + .scale2 set [format %.0f [expr $green/65.535]] + .scale3 set [format %.0f [expr $blue/65.535]] + } else { + if {$colorSpace == "cmy"} { + .scale1 set [format %.0f [expr (65535-$red)/65.535]] + .scale2 set [format %.0f [expr (65535-$green)/65.535]] + .scale3 set [format %.0f [expr (65535-$blue)/65.535]] + } else { + set list [rgbToHsv $red $green $blue] + .scale1 set [format %.0f [expr {[lindex $list 0] * 1000.0}]] + .scale2 set [format %.0f [expr {[lindex $list 1] * 1000.0}]] + .scale3 set [format %.0f [expr {[lindex $list 2] * 1000.0}]] + } + } + set updating 0 + } + + # The procedure below is invoked when a named color has been + # selected from the listbox or typed into the entry. It loads + # the color into the editor. + + proc tc_loadNamedColor name { + global red green blue color autoUpdate + + if {[string index $name 0] != "#"} { + set list [winfo rgb .bd.swatch $name] + set red [lindex $list 0] + set green [lindex $list 1] + set blue [lindex $list 2] + } else { + case [string length $name] { + 4 {set format "#%1x%1x%1x"; set shift 12} + 7 {set format "#%2x%2x%2x"; set shift 8} + 10 {set format "#%3x%3x%3x"; set shift 4} + 13 {set format "#%4x%4x%4x"; set shift 0} + default {error "syntax error in color name \"$name\""} + } + if {[scan $name $format red green blue] != 3} { + error "syntax error in color name \"$name\"" + } + set red [expr $red<<$shift] + set green [expr $green<<$shift] + set blue [expr $blue<<$shift] + } + tc_setScales + set color [format "#%04x%04x%04x" $red $green $blue] + .bd.swatch config -bg $color + if $autoUpdate doUpdate + } + + # The procedure below is invoked when a new color space is selected. + # It changes the labels on the scales and re-loads the scales with + # the appropriate values for the current color in the new color space + + proc changeColorSpace space { + global label1 label2 label3 + if {$space == "rgb"} { + set label1 Red + set label2 Green + set label3 Blue + tc_setScales + return + } + if {$space == "cmy"} { + set label1 Cyan + set label2 Magenta + set label3 Yellow + tc_setScales + return + } + if {$space == "hsb"} { + set label1 Hue + set label2 Saturation + set label3 Brightness + tc_setScales + return + } + } + + # The procedure below converts an RGB value to HSB. It takes red, green, + # and blue components (0-65535) as arguments, and returns a list containing + # HSB components (floating-point, 0-1) as result. The code here is a copy + # of the code on page 615 of "Fundamentals of Interactive Computer Graphics" + # by Foley and Van Dam. + + proc rgbToHsv {red green blue} { + if {$red > $green} { + set max $red.0 + set min $green.0 + } else { + set max $green.0 + set min $red.0 + } + if {$blue > $max} { + set max $blue.0 + } else { + if {$blue < $min} { + set min $blue.0 + } + } + set range [expr $max-$min] + if {$max == 0} { + set sat 0 + } else { + set sat [expr {($max-$min)/$max}] + } + if {$sat == 0} { + set hue 0 + } else { + set rc [expr {($max - $red)/$range}] + set gc [expr {($max - $green)/$range}] + set bc [expr {($max - $blue)/$range}] + if {$red == $max} { + set hue [expr {.166667*($bc - $gc)}] + } else { + if {$green == $max} { + set hue [expr {.166667*(2 + $rc - $bc)}] + } else { + set hue [expr {.166667*(4 + $gc - $rc)}] + } + } + if {$hue < 0.0} { + set hue [expr $hue + 1.0] + } + } + return [list $hue $sat [expr {$max/65535}]] + } + + # The procedure below converts an HSB value to RGB. It takes hue, saturation, + # and value components (floating-point, 0-1.0) as arguments, and returns a + # list containing RGB components (integers, 0-65535) as result. The code + # here is a copy of the code on page 616 of "Fundamentals of Interactive + # Computer Graphics" by Foley and Van Dam. + + proc hsbToRgb {hue sat value} { + set v [format %.0f [expr 65535.0*$value]] + if {$sat == 0} { + return "$v $v $v" + } else { + set hue [expr $hue*6.0] + if {$hue >= 6.0} { + set hue 0.0 + } + scan $hue. %d i + set f [expr $hue-$i] + set p [format %.0f [expr {65535.0*$value*(1 - $sat)}]] + set q [format %.0f [expr {65535.0*$value*(1 - ($sat*$f))}]] + set t [format %.0f [expr {65535.0*$value*(1 - ($sat*(1 - $f)))}]] + case $i \ + 0 {return "$v $t $p"} \ + 1 {return "$q $v $p"} \ + 2 {return "$p $v $t"} \ + 3 {return "$p $q $v"} \ + 4 {return "$t $p $v"} \ + 5 {return "$v $p $q"} + error "i value $i is out of range" + } + } + + # The procedure below is invoked when the "Update" button is pressed, + # and whenever the color changes if update mode is enabled. It + # propagates color information as determined by the command in the + # Command entry. + + proc doUpdate {} { + # global color command + # set newCmd $command + # regsub -all %% $command $color newCmd + # eval $newCmd + } + + changeColorSpace hsb diff -r -c -P -x CVS ../tk8.0.5/library/demos.jp/tfontsel ./library/demos.jp/tfontsel *** ../tk8.0.5/library/demos.jp/tfontsel Thu Jan 1 09:00:00 1970 --- ./library/demos.jp/tfontsel Wed Aug 18 13:18:01 1999 *************** *** 0 **** --- 1,8 ---- + #!/bin/sh + # \ + exec wishstep8.0 "$0" "$@" + + wm withdraw . + set font [tksFontChooser] + puts $font + exit diff -r -c -P -x CVS ../tk8.0.5/library/dialog.tcl ./library/dialog.tcl *** ../tk8.0.5/library/dialog.tcl Tue Aug 17 18:48:56 1999 --- ./library/dialog.tcl Tue Aug 17 18:54:36 1999 *************** *** 46,62 **** # the dialog can become obscured by other windows in the application, # even though its grab keeps the rest of the application from being used. ! wm transient $w [winfo toplevel [winfo parent $w]] ! if {$tcl_platform(platform) == "macintosh"} { ! unsupported1 style $w dBoxProc ! } frame $w.bot frame $w.top ! if {$tcl_platform(platform) == "unix"} { ! $w.bot configure -relief raised -bd 1 ! $w.top configure -relief raised -bd 1 ! } pack $w.bot -side bottom -fill both pack $w.top -side top -fill both -expand 1 --- 46,58 ---- # the dialog can become obscured by other windows in the application, # even though its grab keeps the rest of the application from being used. ! # wm transient $w [winfo toplevel [winfo parent $w]] frame $w.bot frame $w.top ! $w.bot configure -relief raised -bd 1 ! $w.top configure -relief raised -bd 1 ! pack $w.bot -side bottom -fill both pack $w.top -side top -fill both -expand 1 *************** *** 104,118 **** } else { $w.button$i configure -default normal } ! grid $w.button$i -in $w.bot -column $i -row 0 -sticky ew -padx 10 grid columnconfigure $w.bot $i - # We boost the size of some Mac buttons for l&f - if {$tcl_platform(platform) == "macintosh"} { - set tmp [string tolower $but] - if {($tmp == "ok") || ($tmp == "cancel")} { - grid columnconfigure $w.bot $i -minsize [expr 59 + 20] - } - } incr i } --- 100,107 ---- } else { $w.button$i configure -default normal } ! grid $w.button$i -in $w.bot -column $i -row 0 -sticky ew -padx 10 -pady 2m grid columnconfigure $w.bot $i incr i } *************** *** 121,127 **** if {$default >= 0} { bind $w " ! $w.button$default configure -state active -relief sunken update idletasks after 100 set tkPriv(button) $default --- 110,116 ---- if {$default >= 0} { bind $w " ! $w.button$default configure -state active -indicatoron 1 update idletasks after 100 set tkPriv(button) $default diff -r -c -P -x CVS ../tk8.0.5/library/images/.xvpics/README ./library/images/.xvpics/README *** ../tk8.0.5/library/images/.xvpics/README Thu Jan 1 09:00:00 1970 --- ./library/images/.xvpics/README Tue Aug 17 18:54:36 1999 *************** *** 0 **** --- 1,5 ---- + P7 332 + #XVVERSION:Version 3.10a Rev: 12/29/94 (PNG patch 1.2) + #BUILTIN:UNKNOWN + #IMGINFO: + #END_OF_COMMENTS diff -r -c -P -x CVS ../tk8.0.5/library/images/.xvpics/logo100.gif ./library/images/.xvpics/logo100.gif *** ../tk8.0.5/library/images/.xvpics/logo100.gif Thu Jan 1 09:00:00 1970 --- ./library/images/.xvpics/logo100.gif Tue Aug 17 18:54:36 1999 *************** *** 0 **** --- 1,53 ---- + P7 332 + #XVVERSION:Version 3.10a Rev: 12/29/94 (PNG patch 1.2) + #IMGINFO:68x100 GIF89 file (2341 bytes) + #END_OF_COMMENTS + 41 60 255 + ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÛúöòÒÒ±ÍÍößÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿúÒÒÒÍÑÍÍÍͨÉĨÄȤÈĨÄĤȤÍÖûÿÿÿÿÿÿÿÿÿûûúÿÒĤÄÈÄÄĤĨĨĤÄȤÈĨÄȤÈÄÄÈÉͨÉɨĤĤÈÍÿòÈĨĨĨĨÄÄĨÈĤȤĨĤÈĨĤ¨ÄȤ¤ÈĨÈĤÑÿò¤È¤ÄĨÄÈĨĨÄĨÄĨÄȤȤĨÄÈĤÈÄȤÈĤÈÄÍÿúĤȤÈĤĤȤȤÈĤÄȤÄÈÄȤȤĨĨĤȤÈĤÈÒÿöÈĨĤȨÄȤÄÄĤȬĨĨĤÈÄÄȤÈĤÈĤȤȤÄÒÿÛĨÄÈĤȤÄÄÔȤÄÌøÌĤȤȤȤĨĨĤÈĤÈÄȤÖÿÿ¤Ä¨Ä¨ÄÄȤÈÐÄÄÌô¤Ä¤ÈÄĨĤȤÈÄĨĨÄȤĨÄÖÿÿĨÄÄȤȤÈÈÈĤüÈĨĤȤÀÀĤÈĨÄȤȤÄȤÈÄÚÿÿÄȤȤÈÄȤìĨÌÔĨÄÈĤÉöú©ÄĤĨÄÄÈĨÄȤÈöÿÿ¨Ä¨ÄĨĤȨÄÄô¤ÄĨĤÖÛrN²¤È¤ÈĨĤȤȤĤûÿÿɤÄȤĨÄĤĤÔÀ¨Ä¤ÄÒû) + ©¤È¤Ä¨Ä¨ÄĤÈÄÈßÿÿ¨È¤ÈĨÄȤÈÄÐÐÄÄÈÄɶ + +  + %¤ÈÄȤÄÈĨÄȤȥÿÿÿÉÄȤÈĤÈĤÄøĤȤ¤¶ +  *¤È¤ÄÈȤÄÐĤȤÄÍÿÿÿ­¤Ä¨Ä¨Ä¤È¨ÄôÈĤÈöN +  + „ĨÄÈÔøĨôÐÄÄȤÍÿÿÿͤÈĤÈÄȤÄÄô¤ÈÄÍ— +  EÄÄĤÄÐôÄÄÐÌȤȤÒÿÿÿÍĤÈĤȤȤÈÐĤIJ +  + *¤ÍÒÑĤÔȤÄ̤ĨĤòÿÿÿÍÄȤÈĤÈÄȤ̤Ĥ’ + )*.ÖÀÄôÀ¤È¤ÈÄĨÄúÿÿÿÍĤȤÈĤȤÄÄĨÄr +  + IÖÀ¤ÐÄĨÄĨÄĨûÿÿÿÑÄȤĨĨÄȤȤȥ* +   ŽÒÀÈĨÄĨĨĨÄÿÿÿÿÍȤÈÄȤĨĨÄȤÈ*  +  + ²ÍÀÌÄĨÄȤÈÄĨÿÿÿÿÑÄȤĨÄÈĤĨÄÄ¥ + +  +  + ҨĨĤȤÄȤȤÉÿÿÿÿҤĨÄĨĨÄÈĨÄÈ + . + IòĤÈÄȤȤĨĨÉÿÿÿÿÒÈÄȤȤÄȤĨĨÄ& + %R + –ÈÄȤȤÄȤÈÄĤÍÿÿÿÿÒĨĨÄȤÄȤÈÄͤ% + eN *ÍĨÄĤȤÈĤȨÄÍÿÿÿÿ֤ĨĤÈĨÄȤÄúö*.„ĤĨÈĨĤÈĤĨÍÿÿÿÿÖÄÈÄÈĤÈĨĨÄûr + ­.IÉÍȤĤÈÄÈĨÄȤÈÒÿÿÿÿÖĨĤȤĨĤĨöN + %®* + ’öÄĨĤȤȤȤÈÄÒÿÿÿÿÖÄȤȤÈÄĨÄÈÄö.)Ò  + rÍĤÈÄȤÄÄȤÈĤÒÿÿÿÿÖĤÈÄȤȤȤĤòNIÕ + ¶Å¤È¤È¤È¤È¤Ä¤ÈÄÒÿÿÿÿÒȤĨĤÈĤÈĤÍn iÒ + + Ö¨ÄÈĤÈĨÄȤȤÈÑÿÿÿÿÒĨÄĨĨÄȤÈÄÉm + …Ò +  + ÒȤĨĤÈĤÈĨĤÑÿÿÿÿҤĨÄȤĨÄȤĨŽˆÖ)ÍɤÈÄÈĤÈĨÄĨÄÍÿÿÿÿÑÄÈĨÄȤĨÄĨÀ­ + …¶ + &ñ¤ÄĨ¤ÈĨĤȤÄÈÍÿÿÿÿÑĨĤȤÈÄĨÄȤ­ + „¶ + IÉĤÈÄĨĤÈĨĨÄÍÿÿÿÿÍȤÈĤȤȤȤÄÄ© + eÖ…¨ÅĤȤȤȤÈÄÄȤÍÿÿÿÿÍÄȤÈĤÈÄȤȤÈÄ + iÒ + )©ÛĨĨÄÄȤĨĨĤÍÿÿÿÿÍĤȤÈĤȤÄȤɤ)EÒ + %’¤ÈÄĨĤÈÄĨÄȤÈÿÿÿÿÍȤÄȤÈĤȤĤÌû*IÒ + + ÖÀ¤È¤È¤È¤È¤Ä¨ÄÈ©ÿÿÿÿÍÄȤĨĨÄÈĨÄÄ’ + Ñ* + ÑĤȤÈÄÈĤÈÄȤÄÈÿÿÿÿͤÄȤÄÈĨĤȤÄÉN­.NɤÄÈĤȤÈĨĤȤÄßÿÿÿͤȤȤĨĨÄÄȤ¤­N­ÄĨĨĤĨĤÈĨĨûÿÿÿ¨È¤ÄÈĨÄÄĨĨÄÄÄŠR*¤Ä¨Ä¤ÄÈĨÄÈĨÄĨÄßÿÿÿÉÄȤȤĨȤȤȤÍȤȮ¤È¤ÄÈȤÈÍɤ¤È¤È¤ÈÄúûÿÿ©¤Ä¨ÀȤĤÈÄĤÈÍÒȤñ ÄȤÀ¤È¤ÖÍĤÄȤÈĤößÿÿÈȤÄÒĨÄȤȤÈÄÉÒÄÄÒÀ¤ÄÈÒĤÄÖͤȤÄȤÄÈöÿÿÿ¨ÄȤûÍĤÄÒÒͤÄÉѨÄÑĨÄÑûÈĤö­ÎÉȤÄȤÈòÿÿÿĨÄÄöɤÄÒÒÈŤÈÉÒĤÑŤĥö¤ÄÄÖöÒ ÈĨĨIJÿÿÿÄĨÄö¤ÄÄÍÖÀ©Ä¨ÉÑÈÄɱÄÄÄû¤Ä¤öÎúɤĨÄĨÑÿÿßĨĤÒÒȤÈÍÍȤÄÍÍĨÄòĤ¨ÒɤÄÒÍÉÑĨĨÄÄ­ÿÿÛĤÈÄÄ ÄȤĤÄȤĤÄĨͤÈÄÀ¤È¤ÄĨÀ¨ÄÄȤȭûÿúÄȤȤĨÄĤĨÄȤĨÄĨÈĤȤÄȤÄĨÄȤȤÄÍÿÿö¨Ä¨ÄĨĨÄÈĨĤÈÄȤÈĤȤÄȤÄȤÈĤȤÄȤ¨ûÿö¨ÄĨÄȤĨĨÄÈĤȤȤÈĤÈĨĨĨĨÄÄȤÈÄÉÿÿòȤÈĤÄÈÄȤĨĨĤÈÄĤÈĨÄȤÄÈĤȤȤȤȤÿÿòÄȤȤȤȤÈÄĨÄÈĤȨĨĤȤȤĨÄÈĨÄĨÄÄûÿò¤ÄȤÈĨÄĨĨŤɨÅÄ¥ÈĨÄÄȤȤȤĨĨÄĨÄûÿÒÈÍÍÍÒÒÖÖÚöûÿÿÿÿÿÿßÿÿûûþûúöûÚöÚÖöÖÖÒÖòÒÿ diff -r -c -P -x CVS ../tk8.0.5/library/images/.xvpics/logo64.gif ./library/images/.xvpics/logo64.gif *** ../tk8.0.5/library/images/.xvpics/logo64.gif Thu Jan 1 09:00:00 1970 --- ./library/images/.xvpics/logo64.gif Tue Aug 17 18:54:36 1999 *************** *** 0 **** --- 1,39 ---- + P7 332 + #XVVERSION:Version 3.10a Rev: 12/29/94 (PNG patch 1.2) + #IMGINFO:43x64 GIF89 file (1670 bytes) + #END_OF_COMMENTS + 40 60 255 + ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÛúöûòúÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿöûúöòòòÒ±ÍÍ­ÍÄ©Ä¥¤ÄȤĥÍûÿÿÿÿÿÿÿÿÿÿÿÿÿú¥Ä¤Ä¨Ä¤¨ÄȤÄĨÄĨÄȤȤȤĨÒúöûúòòòÒ²ÍÍ­öȤÈÄȤÈĤÈĨĤȤĨÄĨÄÄȤÄȤȤĤĨ¤Ä¨ÄÄߍȤÄȤÈĨĤÈĨÄÈĨÄĨĨÄȤÄÄȤȤÄÈĤȥûÈĨĨÄĨĤÈĨÄȤĨĨĨÄĨÄȤȤÄÈĨĨÄÄÈÿ¥È¤ÄȨĤÈĤȤĤÀ ÄȤÄĨÄĨĨÄȤĨĤȤȭÿĨĨĤÈĤÈĤÈÈÄ°ÌȤȤÈĨĤÈĨĨÄĨÄÈĤÍÿ©ÄÄĨÄĨĨÄøÄ ðü°ÄĨÄȤĨĨĤÄȤÈĨĨĭÿŨĨÄȤÈÄ Ìø¤ÌøÄȤÈĨÄȤÈÄĨÄȤȤÈĤÈÄÑÿ̤ÄȤÄȤȠаÄô¬ ÄȤÄÈ ÄÀ¤È¤È¤ÈĤȤÄȤȲÿ­Ä¨ÄȨĤÄÀ¬ÌÄðÀȤĨ ÄñúòȤÈÄĤÈĤȤÈĤòÿÍÄȤĤÈĨÀ̤ÈÌ ÄȤÀÉúÛ›šÍ Ä¨È¤È¤ÈĨĨÄòÿ­Ä¤È¤È¤ÈĤÈÄÌÄȤÄÀ¥ÿrmÈĤÄȤĨÄĤĨúÿ­ÄȤÈÄĤÈĨ ð ÄÈ Éúr i¤ÈĨÄȤĨÄÈÄÄúÿͨÄȤȤȤÈĤì¤Ä¤ÉÒ. +  + eÄȤÌȤÄÌÈĨĨ¥ÿÿҤȤÄÈĨĤÈÄÌĨĶ +  + dÀ¨ÄÈôð Àð̠ĨÄÈûÿÒ¨ÄȤĨÄÈĤÈÌÄ Ír + %ÈÄ¥¤Èø̠ĬÄȤĨÍÿÿò¤Ä¤È¤Ä¨Ä¨Ä¤ÈÈ Ò + ˆ…¶ÿĤøÄÈÄȤÄȤĭÿÿòĨÄÈÄÈĤÈÄȤÄÈ’ +  + –ÉÌð¤È¤Ä¨Ä¨ÄÈÍÿÿò¨ÄȤȤÈĤȤȤ¥m +   +  + ¶É°Ì ÄȤȤÈĤÑßÿòĤĨĤȤȤÄÄÈÄ. +  + )öÉðÄȤÄȤÈĨIJÿÿúĨÄȤÈÄĨĨĨÅ. +   + IûĬ ÄȤÈĤÄȤòÿÿúĨĤȤȤÄȤȤÉ- +  +  + ’ñÄÈĨÄȤÄȨĤòÿÿö¨ÄÈĤÈĨĨÄĤÄ..  + ҭĨÄĨĤȤĨÄúÿÿûĤȤȤÄȤÈĨÀÈ% + En + .ѠĨĨĨÄÈĨÄÈößÿÚ¨ÄĨÄȤÄȤÄÈ¥Ä)i‘ mɤÄȤÄÈĤȤĨÅßÿÿû¥È¤ÈĤȤÄȤÄòò% + ‰r)Ä ÄȤÈĨĨÄȤÄÈûÿÿßÄÈĤÈÄÈĨÄȤúšNr + ˆÍĨÄĨĤÈĤÄȤÅßÿÿÿ¥Ä¨Ä¨Ä¨Ä¨Ä¤Äò. Í2 + EºÍ È¤ÄÈĤÈȨĨÍÿÿÿÿĨÄÈĤÄÈĨĤÒ-%Ò. + ÖÄĤÈĨĨĤĤÄÍÿÿÿû©ÄȤȤȤÄȤÄñn + E¶N.ò ÈĨĨÄĨÄÈĨÄÿÿÿÚĨĤÈĤȤÈĤíni² + nñÀ¤ÈĨÄȤȤȤȥÿÿÿúĨÄȤÈĨĤȤɑe¶mñÀȤÄĨÄÄÄȤĤÉÿÿÿ÷¨Ä¤ÄȤÈÄÈĤÈÄr + e¶ + ‰ñ ÄȤÈĨĨÄȤÈÄßÿÿúÄÈĨÄĤȤÈĤÉi¶ + ÍÀ¤È¤Ä¨Ä¨Ä¤ÈĤÉÛÿÿú¤Ä¨Ä¨Ä¨Ä¤È¤È¤Íe¶­Ä¨ÄÄȤÄÈĨĤÈĨöÿÿòĨÄȤÈĨÄÄȤÀÅ%¶. + eíÍĨĨĨĤÈÄȨĤúûÿòÈĤÄȤÄȤȤȠ¤N%¶Nˆ¶ò Ä¨ÄȤÈĤȤĨÄúÛÿò¤È¤È¤È¤ÄȤÄÄɤ%I².Ò ÄĨÄĨĨĤÈÄÄúÿÿò¤ÈĨÄÄȨĨĤÍú.ÒR .͠ȤĨÄĨÄÈĤȤòÿÿòĤÈĨĤĨÄȤĶÖr + ‘Å ÄÈÄȤÈĤȤȤÈòÿÿҨĤÈĨÄÈĤÄÈ Í.®r²Ä¨Ä¨Ä¨Ä¤È¤ÈĨÄÄòÿÿ²Ä¨Ä¤ÈĨĨĨÄĨÍ“ + M­ ÈĤÈĨĨĤÈĨIJÿÿѨÄÈĤȤÄȤȤÈĤmŽ’…ÀÈĤȤÄȤÈÄȤÄĨÒÿÿ­ÄĨĤÄȤÈĤȤÍÍĤ։ÄĤÄÄÈÄÍÈĤĨĨĤÑÿÿÍĨÄÈͤĨĨÀÄ Íò  òĨÄȥȤÈ÷­ ÀĨÄȤÈÍÿÿ­ÄȤÄßĨÄĥ̥ Íò À­ÍÀ¨Äú­Ä¤úÍŬÄȤÄȤÍûÿ­Ä¤È­û­È ÑòÍÉÀ­ò ÀÍ­ Ä¥úÒ¨ÄûѱɤÄȤȤÍÿÿÍÄȤÄÿÄ ÄúҨĠÍò Ä¥ÑÈÄÈöͤÄúúö È¤ÈĤȤÿÿ­¤ÄÈ©ÿÍÄ òòȨÀ­öĨÄÑ¥¨Äú±ÄÅ÷­öòÄȤÈĤÉÿÿÄȨĤѭÈĨͭÄÄÍ­ÉĠͥĤ­Í¤¥ÍÍÍ­¥Ä¨Ä¨Ä¥ÿÿ¥ÄĨĠÀ¤ÈÄ ÀȤÀÀ¤Ä¨ÉĨȠÀÄÈ   ÀĨÄÄȤÉÿÿȤÈĨÄÈĤÈĤÄȤÈĨĤÈÄÄÄȤÄÈÄĨÄȤȤĤÿÿŨĤÈĨĨĨÄȤȤÈĤȤĨĨĨĨÄȤÄȤÈÄÈÛÿĤÈĤȤÄĨÄȤÈĤĨÄÄȤȤÄȤÄȤÄȤÄȤȤúßÅȤÈĤÈĨÄȤĤÈȤÈĨÄȤÈĤȤÄȤÄȨĤĨöû¨ÄȤÈĨÄȤÄȤȤÄȤĨĤÈĨÄÈĨĨĤĨÄÈÄûúĨĤȤĨĨĤȥɤĨÄĨĤÈĨĨÄÈĨÄÈĨĨòúĤȥÉÄ­ÍѲòòúûÞÛúöûúöúòòòòҲұѭͭ­Í­Ìö diff -r -c -P -x CVS ../tk8.0.5/library/images/.xvpics/logoLarge.gif ./library/images/.xvpics/logoLarge.gif *** ../tk8.0.5/library/images/.xvpics/logoLarge.gif Thu Jan 1 09:00:00 1970 --- ./library/images/.xvpics/logoLarge.gif Tue Aug 17 18:54:36 1999 *************** *** 0 **** --- 1,40 ---- + P7 332 + #XVVERSION:Version 3.10a Rev: 12/29/94 (PNG patch 1.2) + #IMGINFO:354x520 GIF89 file (11000 bytes) + #END_OF_COMMENTS + 41 60 255 + ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿûúúöÖöÖÑÒÑÍÍÍÍÈÈÈÍúßÿÿÿÿÿÿÿÿÿÿÿÿÿÿöÍÈÈȤĨĨÄȤÄÈÄÈĨĤĨĨÄÉÖÿÿÿÿÿÿûúúöÖöÿÖĨĤÈĨÄĨÄȨĨĨÄĨÄȤÄȤÄÈÈÈȨĨĨĨÄÿö¨Ä¨Ä¨ÄĨĨĨÄĨÄĨÄȤÄȨÄȤĨĤÄĨÄĨÄÈÿÖÄÈÄÄȨÄĨĨĨÄĨÄĨÄȨÄĤĨĨÄȨÄĨÄȤÈÿúĤȤĨĨÄÄÄÄĨÄĨĨĤĨĨÄȤĨÄĨĨĨÄÈÿû¤È¤È¤ÄÄȨĮ̃ĨÐÈÈĨÄȤÄȨÄÈÄĨĨÄĨĨÍÿú¨ÄĨÄȤĨÄÔÌÄÈôøÐĨĨÄĨÄĨĨĨÄĨÄÄÄÄÍÿûĨÄȤĨÄÄÈøȨÈøȨÄĨÄĨĨÄĨÄÄĨÄĨĨÄÑÿÿ¤Ä¨ÄȨÄȤÈÔÄÄØȨĨÄĨÄȤĨÄĨĨĨĨĨÄÒÿÿĨĨÄĨĨÄÌÈÈÔÄÄÈĨÄÍúÿÑÄĨĨÄȤÄÈĨĨöÿÿ¨ÄÄĨÄĨÄÈ̤ÐÈȤ¨Ä¨ÍÿrN²¨È¤ÈĨÄȨĨÄÄÄÖÿÿÄȤȤȤÄȤÈÄø¨ÄÄĨÍÛ* + ‰ÄĨÄĤĨÄĨĨúÿÿȨĨÄÄȨĨÄÈÔĨĨÈÛ + )¤¨ÄĨĨÄĨĨÄÄûÿÿÈĨÄȤĨÄĨÌÌÄȤÄÖ*  + „ÈĨÄȨĄ̈ĨĨÄÿÿÿɨĨĨÄĨÄÄÔȨÄÈÑN +  + eĨÄÄÐüĨÐðÄĨĨÿÿÿͤÄÄÄĨÄĨÄô¨Ä¨Ä· +  + %ĨĨÄÈü¤ÄÈШÄÄÈÈÿÿÿÍĨĨĨĨĨÐÄÄÄÑ. + ˆÈÑÒĨÌÔÄÈÌÈĨĤÍÿÿÿͨĨÄÈĨÄÄĄ̈ĨÒ )F*Nÿ¤ÄÐÌȤĨĨĨÍÿÿÿÍÄÄȤĨĨĨÈĨĒ +  + %úȨôȤȤÄĨÄÄÍÿÿÿÑȤĨÄĨĨĨÄĨn   Iû¤ÈÐÄÄÄȨÄĨÄÑÿÿÿÑĨÄȤÈĨÄÄĨÄÄ. +  +  + ‰ÖÈÌȨĨĨĨĨÒÿÿÿÒÄȤĨĨĨĨĨÄ* +   + ÒÑÄÌĨÄĨÄÄĨÄöÿÿÿ֤ĨÄȤÄÄĨÄȤÈ* + * )ÖĨĨĨÄĨĨĨöÿÿÿö¤ÄȤÄȨĨĨÄĨ%&M + jÍÄÄÈÄÄĨĨÄĨÄúÿÿÿÖĨÄȨÄĨÄÄĨÈÄIIn + ­¨Ä¨Ä¨¨Ä¨ÄĨÄĨûÿÿÿö¨Ä¨Ä¤Ä¨Ä¨Ä¨ÄÖÍE + er EÄĨĨÄĨÄĨĨÄÄûÿÿÿöĨÄÄȨÄĨÄĨö–*‰N*¨Í¤ÄÈĨÄĨÄȤĨÄßÿÿÿÚÄĨĨĨÄĨÄÄÖ* + Í.IúĨĨĨÄĨÄȨÄÈÿÿÿÿö¨ÄȤÄÄĨÄȤÈÒ* Ñ* + JÖĨÄĨĨĨĤÄȨÿÿÿÿÖĨÄȨĨĨĨÄÑ*)Ò* nÑÄĨÄĨÄÄĨĨÄÈßÿÿÿöÈĨĨÄĨĨĨÍI + EÖ + ’ͤȤȤÄȤÈĨÄĨûÿÿÿÖ¤ÄĨĨÄĨÄÄÄÍiIÖ + ŽÌĨÄÄȨĨĨÄȤÄÿÿÿÿö¤È¨ÄĨĨÄȨÄÈŽ + EÖ + ­ÍÄĨĨĨÄÄĨÄȨûÿÿÿÑĨĨÄĨĨÄĨıIÖ + ÍȨĨÄĨÄĨĨĤÄúÿÿÿÒÈÄÄĨÄÄÈĨĨĭEÖ &ÑĨÄĨÄĨĨÄĨĨúÛÿÿÑĨ¨ÄĨĤĨÄĨÍ&IÖ + IÈȤȤĨĨÄĨÄÄÈÄûÿÿÿÑÄÄĨĨĨÄĨÄÄÈ*EÖ + ©ÖÍĨÄȤÄĨÄȨĤ¨öÿÿÿͨĨĨÄȨĨĨĤI&Ö + erͤÄȤȨÄȨĤÈÄÄÖÿÿÿÍÈĨÄĨÄĨÄĨÍÑj Ò* + nÈĨÄĨÄĨÄÄȤȨöÿÿÿͨÄĨÄĨÄĨÄÄÈ· + Ñ* + ²¤ÈĨÄĨÄĨĨĨÄÒÿÿÿÍĨÄĨÄĨĨĨ¤Ñ*­N ÍȤĨĨĨĨÄĨĨÑÿÿÿɤĨÄȤȤÈĨÄĨ­ + rnȤȤÄÈĨÄÄĨÄĨÄÒÿÿÿÌĨĨĨÄĨÄĨÄÄȉs©¨ÄÄȨĨĨĨĨÄĨíÿÿÿȤÈÄĨÄȤĨÄĨĨą¶e¤Ä¨Ä¨Ä¤ÄÄȤÄȤȤÄÑÿÿÿÈĤȨĨÄȤĨÄÈÍö¤Ä֤ȨĨÄÄÈÑҨĨÄĨÄÈÍÿÿÿ¨ÈĨÈÈĨÄȨĨÄÍÖȨñ¨ÄĨɨĨÍÖÄÄĨÄĨÄÍÿÿÿĤÈÄÖÒÈĨÄÍÈĤÍúĤÑÈĨÈÿÈÄÄÍöÈÍȨĨÄÄÍÿÿÿÈĨÄöÑĨÈöÈû¤ÈÉÚÄÈÉÍÄÄÈÿĨÄÍÖÑȤÄÈĨÄÌÿÿÿ¤Ä¨ÄÒÑÄÄÍû¤¨Ä¤Íú¤ÄÈѨĤÿ¨Ä¨ÍöÿÈȤĨĨ¨ûÿÿ¤ÄȤöÑɨÈÖÄͨÄÍúĨÄÒĨÄÿÈÄÄÍÖÍûȤÈĨÄÈßÿû¤È¤ÄÈÍÈĨÈÍÄĨÈÉȨÄÑÄȤÍȨÄÍÈÉÌȤȤÄÄÈÿÿúĨÄȤĨÄĨĨÄĨĨÄÄͤĨÄĤȤȤĨÄÄȨĤÿÿú¤ÄȤȤĨÄĨĨÄĨÄĨ¤Ä¨Ä¨ÄȤĨĨĨĨĨÄÿÿúĨÄĨÄÈĨĨÄĨÄĨÄĨÄÄÈĨÄȤÄÈÄĨÄĨÄÄûÿÖȤȨÄĤȤÄĨÄĨĨĨĨĤĨĨÄȤȤĨÄĨÄÚÿö¤ÈÄĨĨÄȨÄĨĨÄȤÄÈĨÄÈĨÄĨĨÄÈĨÄĨúÿÖȤĨĨĨÄĨĨÄȤÄȨĨĨĨÄĨÄÄĨĨĨÄÄÖÿöÄȨÄÄÄÈĨÍÍÑÑÖöÒÕÒÑÑÍÑÍÍÍÍÉÌȨÈȤÄĨĨö diff -r -c -P -x CVS ../tk8.0.5/library/images/.xvpics/logoMed.gif ./library/images/.xvpics/logoMed.gif *** ../tk8.0.5/library/images/.xvpics/logoMed.gif Thu Jan 1 09:00:00 1970 --- ./library/images/.xvpics/logoMed.gif Tue Aug 17 18:54:36 1999 *************** *** 0 **** --- 1,6 ---- + P7 332 + #XVVERSION:Version 3.10a Rev: 12/29/94 (PNG patch 1.2) + #IMGINFO:120x181 GIF87 file (3889 bytes) + #END_OF_COMMENTS + 40 60 255 + ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿöòòÉéÄòÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿûúûöööòòÑîíÍéÉéÅäÅÄÅäÄÅäÅéöÿÿÿÿÿÿÿÿÿÿÿÿÿÄÅäÅÄÅÄÅäÅÄåÄåÄÄÅäÅäÅäÅÄäÅÄÅñöööòòòÍîíÍéäÅÄåÄåÄäÅäÅÄåÄåÄåÄäÅäÅäÅÄåÄåÄÅÅÄÅÄÄåÄÅäÅÍåÄäÅäÅäÅÄåÄåÄÅäÅäÅÄåÄÅäÅäÅäÅääÅäåÄÅäÄåÄéÄåÄåÄåÄåÄåÄåÄåÄéÉäÅÄåÄåÄåÄåÄÅäÅÄåÄåÄåÄåòÄÅäÅÄÅäÅäÄöîÄåòÿöÅäÅäÄåÄÄåÄåÄåÄåÄåÄåÄÅÄòÄåÄåÄåÄäÅéûÄåÉÿíÅäÅäÅäÅäÅäÅÄåÄåÄÅäÅÄåäÅúÅäÅÄåÄåÄÅòòÄÄöíÅÄåÄÅäÅÄåÄÅäÄåÄÄåÄäÅäÄÅäöÅäÅäÄåÄåÄòÉäé÷ÄåÄÅäÄåÉòíÅäÅäÅäÅäÅäÅÄåÄåÿÄåÄåÄÅäÅäíÅÄòíÅÄåÄåÄòÿûÛíÅäÅäÅäÅäÅäÅäÅÄÿÅäÅÄåÄÅäÅéÄåûÄåÄäÅäòÛnŽåÄÅäÅÄåÄÅäÅäÄåÿåÄäÅäÅäÅÄåÅÉöÄÅäÅäÎÛ&&ÅÄäÅäÅÄåÄåÄÅäÉÿÉÄåÄÅäÅäÅäÄîíÅäÅäÉÛ&…äÅäÅÄäÅäÅÄäÅäéÿéÄÅäÅäÄåÄÅäöÉäÅäÅ÷&eÄåÄÅééÅäòéÄåÄÅíÿéÄåÄåÄåÄåÄÅöÅäÅÄòn&ÅäÅäÅòÿÄÅí÷ÄÅäÅíÿÍåÄåÄÅÄåÄåÄöÅäÅä×¥äÅÄåÄíûäÅÄöåÄåÄòÿéÄÅäÅäÅäÅäÅòÄåÄînEÅíòíÅäòÒÄåéÉÄåÄåòÿíÅäÅäÅäÄåÄäîÄÅäÒEFJ“öÄÅöéÅäÅäÅäÅÄöÿíÅÄäÅÄÅäÅÄÅéÄåIJjûäÅöÅäÄÅäÅÄäÅöÿÎäÅÄåäÅÄåÄåÄåÄ厭öÅéòÄÅäÅäÅäÅäûÿñÅäÅÄåÄåÄåÄåÄÅåNòòÄòÄåÄåÄåÄåÄÅûÿòÄÅäÅäÅäÄÅäÄåÄåJEûÉäÎäÄåÄåÄÅäÅäÿÿòÄåÄåÄäÅäÅäÅÄåÄ&&ŠöÄåÄÅäÅÄäÅäÅäÅÿÿòÄåÄäÅÄåÄåÄåÄÄåEj²éÅÄåÄåÄåÄåÄÄåÉÿÿöÅäÅÄåÄÅäÅÄåÄåÄF&ª \ No newline at end of file diff -r -c -P -x CVS ../tk8.0.5/library/images/.xvpics/pwrdLogo100.gif ./library/images/.xvpics/pwrdLogo100.gif *** ../tk8.0.5/library/images/.xvpics/pwrdLogo100.gif Thu Jan 1 09:00:00 1970 --- ./library/images/.xvpics/pwrdLogo100.gif Tue Aug 17 18:54:36 1999 *************** *** 0 **** --- 1,28 ---- + P7 332 + #XVVERSION:Version 3.10a Rev: 12/29/94 (PNG patch 1.2) + #IMGINFO:63x100 GIF89 file (4147 bytes) + #END_OF_COMMENTS + 38 60 255 + ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶»¶º¶·º¶·º¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶·Ú·º·¶»¶»¶»¶·¶Ö¶Ò²ÑÎÑÍÒ¶·¶·Ú·¶·Ú¶·¶Û¶¶¶¶²ÍÍÍÍÉÉÈÉÈèÈÄäÈÄÄÈÄÄÄÉͶ¶¶¶Ö¶¶²Ö²²¶¶·¶ÒÄÈäÈÄèÄðìÄåÐøìÈèÄèÈèÈÄèÉÈÈÄÈèÄÈÄѶ¶Ö¶²ÄèÄÈèÄèøÄÉÌüìÈÅèÄÉäÄèÈäÈèÅÈäÉÄèÄÒ¶¶¶¶ÖÄèÄÉäÈñÐäÈôìÈÄèÄÈèÄÈåÈÄÈÅèÄÈèÄÈ貶¶·¶²ÄÈèÄÉÄðÌäÈðÈÄéÈÈÅèÍòÈäÉäÈäÈåÈÄéĶ¶¶¶Ú²èÄÉäÈäðÈÄðÍäÉÈÄèÈûÿÿûÈÈäÈÈÄÈÄèÄÈÖ·¶·¶¶ÄèÄÈèÄÌèÅôÈÈÄèÄÉö·N%nÍÈÄÈåÈèÅÈèɶ¶¶¶¶ÖÄÈèÅÈÈåÈèðÄèÄÈäöN …èÄÈèÄÈèÄÈɶ¶¶·¶¶èÅÈäÈäÈÄðÐÄÉäÄö’ EÈÄéÄÈåÄÄÉäͶ·¶Ö¶¶ÄèÄÈåÈÄÈôìÈèÄí» )èÄèÈèÌÈÈðÈèɺ¶¶¶·¶ÈÄéÈÄèÉäøÈÅäȶ ÄÈÉäÈÌôÅèÌôĉ*¶»¶¶éÈÄèÄÈäÈôÈèÄín IèÄÄèÅèøÄÅìðÈ…*¶¶Ö¶ÈèÄÈåÈÈÈôÅèÄÒ) ¥ÍööÄèÌðäÈèÈÅi*¶·¶·ÉäÈÄÈèÅäðÄÈIJ +  % + %ÛÈÄðÈÈÄÈÄèeN¶¶¶ºÉÈÄéäÈÈÄÉÈäÄ’ %ÖÉÄôåÈéäÉäIr¶¶¶¶ÍèÄÈÈÅèÄèÄÈén +  EúÄèðÄÈÄÈÈÄI’¶·Ö·ÍÄèÅèÈäÈÄéÄìJ  ÍöÄðÉÈäÉÄèè%¶¶¶¶ºÍäÈÈÄÈÄÉÈÄèé)  )öñÈìÄèÈÈèÄÄJ%¶¶»¶¶ÎÈäÈåÈèäÈÄÈè** + iûÈÄÈÈÅÄèÄÉè%N¶¶¶Ö¶ÑÄÈÄÈÄÈÅÈèÅäEEn ŽÉèÈåÈèäÈÄèÄr¶¶·¶·ÑÄÉèÄéÈèÄÄíÄIdŽÍÄèÄÈèÄÉäÉÄȶ¶¶¶¶¶ÒÈäÈÈäÈÄéÈöíIÉn + EÈèÄÉèÄÈäÈèÄÉ*¶¶¶Û¶¶²ÈÄéÄÈåÈÈÄún*%íN %ÉíÄÈèÄÉäÈÄÉÈÄ.Ö¶¶¶¶»­äÉÄÈèÄèÄè×EöN)öÄÄÈèÄÈÉäÈä©M¶·¶¶¶¶²ÄÈèÄÈåÈÄÄÖ Eö* JñäÉäÈåÈÄÈÄÈ¥r¶Ö¶·Ö·­ÈÄÈåÈÈÄéÄÖiú*NíÈÈÄÈäÈèÄéÄÈ’¶·¶¶¶ºäÈèÄèÄÈèÄò%iû) réÈÄÈåÈÄÉÄÈ褶·¶¶·¶¶©ÄÉÄÈåÈÄÈÄñ)ˆÿ&’ÈèÄèÈÄèÄèÄÈŶ¶¶¶Ö¶¶èÄèÄÈèåÈèÍi‰û) ­éÈåÈÄÉèÈÅèÈÈ·¶¶¶¶·º…äÈåÈÄÈèÄÉé‰ÿ + ÍÉÈÈäÉÄäÈèÄÉĶ¶¶¶»¶¶‰ÄÈèÄéÄÈÄè貉û)ÑäÈÄÈèÈÄÉÄèäÈ·Ö¶¶¶¶’…èÄÉÈèÄéÈÄÈò%‰û*iéÈÄéÄÈèÄèÈÄÉÄÖ¶·¶·¶’„èèÄäÈÈäÈåÈé)iÛ)ÈöÍèÄèÅäÉÄèÈèĶ¶¶¶Ö¶r¥ÈÄÈÉäÈÅÈÈÄèIeÿ)E‰²éÈÄÉÈÈÄèÅèÄÈÖ¶·¶·ºnÄÈèÄèÄÈèÄèííiEú*rÈäÈèÄèÄÈèÄÉĶ¶¶¶¶¶NÈÄÉäÈÉäÈåÈÍÛ*EúJ ŽÈÈÄÈåÈÄÉäÈèÄÒ¶·¶¶Û)ÄÈèÄÈäÈÄÈÄé¶)%òN²äÈåÈäÈèÄÉÄèĶֶ¶¶¶*äÈÅÈèÅÈèÅèÈè’%ÍnNíÈäÈÄÈåÈèÈäÈÅѶ·¶·¶)ÄÈèÄÈäÈÄÈäÈÅèNÉ’ ÒÄèÄÈéÈÈÄÄÈÄèÄÒ¶¶¶¶¶&ÈèÅèÄÉèÈåÈÄÈ艄’EèäÈÉÄäÈÅèÈåÈÄÈÒ¶¶¶·–%èÄèÄÈÄÈÄÈÈèéÍäÄöÄÈÈÄèÈÄèÄèÄÈèåÈͶ·¶Ö’%ÈÅÈÄèåÈèÅèÄÍúÄäÒèÄéÄÈåÈÈÄÉèÄÈÈÄÒ¶¶¶¶r%èäÉúÍèÄÈéÄäÍöÈäÑÄÈäÉÄèÄéÈäÈåÈèÄÑ·¶¶ÛN%èÈäÿÒÄéöÍñÄíöÄÉíÍèÄÈèÄÈäÈÄÈèÄÅèͶ¶¶¶NEèÄÉÿíÈñöÄÄèÍúÄèÈíÄÉäÉÈèÄÉèÄÉÈäÈͶ·¶Û)EèÄèöÒäÄÒèÍÄíöÈÄÉñÄèÈÄäÈÈèÄÈäÈÄÈÍ·¶¶¶*EèÈÄèÈÄÈèÈÅÈÄÈåÈÄíÄÈÄÈÉäÅÈèÅèÄéÄͶ¶Ö¶IäÉäÄÈèÅÄäèäèäèèèèÅäèÄèÈäÈÄèÄÉÈäͶ¶¶–EèÄ©¤©…ˆ‰eEI%)E%EEiEieeei…‰…‰¤©ÍͶ·Úr* +     +  +  + –¶¶¶¶¶N +  +  +  +  +  +    ¶¶·¶¶¶J r**rN*NNn *’*rN*rnN + ¶¶¶·Ö¶·IrJÛ¶·¶NÛ)*Û–J¶’–%¶·Ö¶¶’  N + %¶*NN**¶*%nn*rrJ*¶º¶¶¶n +  + )¶¶·¶¶¶¶¶¶¶¶–¶¶–¶¶¶–nrNM**   + *Ö¶¶¶·¶·¶¶¶·¶·¶¶·¶¶¶¶¶Ö·ºÖ–’rJ) +  )»¶·Ö¶¶¶¶·¶¶¶¶¶¶¶¶·¶·Ú¶¶¶¶·Ö¶¶·¶¶’rnNNN¶Ö¶º¶ diff -r -c -P -x CVS ../tk8.0.5/library/images/.xvpics/pwrdLogo150.gif ./library/images/.xvpics/pwrdLogo150.gif *** ../tk8.0.5/library/images/.xvpics/pwrdLogo150.gif Thu Jan 1 09:00:00 1970 --- ./library/images/.xvpics/pwrdLogo150.gif Tue Aug 17 18:54:36 1999 *************** *** 0 **** --- 1,67 ---- + P7 332 + #XVVERSION:Version 3.10a Rev: 12/29/94 (PNG patch 1.2) + #IMGINFO:95x150 GIF89 file (6809 bytes) + #END_OF_COMMENTS + 38 60 255 + ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶»¶º¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶·¶·¶»¶·º×º·º·¶Ö¶¶ÖÒ±ÒÍÒ¶·¶·¶·¶·¶·¶·¶¶¶¶Ú¶ÍÍÍÍÉÌÉÈéÈéÄèÄÄÈäÄÈÈÉѶֺ¶Ö¶Ö¶Ö¶Ö¶¶·¶¶èÈÄèÈÄèÌìÈÄìøðÅÈÄèÅèÄÄèÉÈéÈÈÄÈäÄͶ¶¶¶·ÈÄèÅÈäÈøÈÄìøÐÈèÄèÈÄÈèÈÄÄÈÄÄèéÄÈèͶ¶¶¶ºéÄÈÄèÈíôÄéÔìÅèÅèÅÈèÅÄèéÄèéÈÄÈÄèű·¶·Ö¶ÈéÄèÅÈìÌÄèôÄèÈÄÈÈäÍíÈÅÄÈÄÈÄèÅèÄÈÒ¶¶º¶·ÈÈéÄèÄÌèÅÔìÈÅÈèÄèöÿÿöÈÈäèÅÈÄèÈÄ貶¶·¶ºÉäÈÈÄèÈéÄøÄÈäÈÄÉö·NnÉäÈÅÈèÅÈÄèÅÕ¶¶Ö¶·ÈÈÄèÉÄèÈÌðéÄÈÄèö’ + ‰ÈÄèÄÈäÈèÅĶ¶¶¶¶ºÉèÈÄèÈÅÈðÌÄÈäÈò’ +  + EÈèÅèÄéÈÄÅÈÈÒ¶¶·¶·ÍÄÄéÄÈèÄðÈèÅÈé– + ÉäÈÄÈìÄÈðèÄ鶶¶¶Ú¶ÍÈäÈÄèÅÈðÄÄèÄú* + ©ÄÈÄèÌüèÅìøÄÈ*)¶·¶¶ÍÄèÉÄéÄÄðéÄèÍ’ +  + EÈÄèÅèìøÈÈÈðȤ + ¶¶¶·ÍÈÄèÈÄÈäÐÄÈÄÒÉÍööÈÄÌôÅèÈèÈ¥*¶¶º¶ÍéÄÈäèÈÅìÈäé²  %*ÿÉèðÌÈÄéÄȉN¶×¶¶ÍÈÄèÉÄéÄÈÄèÈn    + %úÉÄôÄèÄÈÈäer¶¶¶·ÑÄèÅÈäÈÈäÉÄíJ + iÿÈèìÈÅèÄèÅi–¶»¶¶ÑÅèÈÄÈÄèÈÈèÉ) +  +  + ŽöÄìÈèÈÄéÈäI¶¶¶¶·ÑÄÈÄèéÄéÄÄéÈ* +  + ÖíÈìÉÄéÈÄÈÈE)¶¶Ö¶¶ÒÄèÈÄÈÈÄèÈÄè% + J + %öÄèÈÄÈäÈäéÄ%N¶¶·¶¶ÒÄÈåÈäéÄÈäÉÈ%%r + míÈÅÈäÈÈÄÈÄÈ&n¶¶¶º¶ÒÈÄÈäÈÄèÅÈéÈ% + inÍÈÄèÅèÅèÅèéÄ r¶¶·¶¶ÒÄèÅÈéÄÈÈÄöíE­N eÈÅèÈäÈÈÄèÄÈÉ’¶¶¶¶¶²ÈÄèÄÈÈäéÄö’*Î)%ÉÍèÄéÈÄèÈÄèĨ¶¶¶·ºÖ²äÈéÄèÅÈÄÄú + Ò) júÄÈÄÈäÈÅèÈŨ*¶¶¶Ö¶¶²ÈÄÈÈÄèÄÈèÒ + %Ò MöÄèÈÄÉäÈÄèÈ¥M·¶¶·¶¶²äÈèÄèÈäÈÄÖEÖ + níÈÅèÄèÈÄéÄÈ¥r¶¶¶¶º¶®ÈÄÄéÄéÄéÄò% + eÖ + ’ÉÈäÈÄéÄèÈÄ褖¶¶¶·¶¶­èéÈÄÈÄÈÈÄñ)eÖ’èÈÈÅèÈÄéÄèÉȶ·Ö¶¶¶¶®ÈÄÈäèÈäéÈíi„¶ + ²èÅÈäÈÄèÄÈÅÄÈ·¶¶¶¶¶ÛäÈäÉÄéÈÄÄí‰eÖÍÉÈèÄÈÅÈéÄèÈ鶶¶¶¶¶¶ÄèÈÄÈÄÈäÈÈ® …Ö + %ÑèÄÄÉäèÄÈÈÄÈ䶺··Ú·Ú‰éÄéÈäèÅÈäÈÒeÖIíÄÉèäÈÈéÄèÄéȶ¶¶¶¶¶¶eÈäÈÄÈÈÄèÉÄíe¶ÉÒíÄÈÈÄéÄÈÄèÄÈÖ¶·¶¶·¶…ÈÈÄèÅèÈÄèÄè*EÖ)©²ÈèÄéÄÈÄèÉÄèŶ¶¶¶¶¶–…ÈäÉäÈÅÈäÈÍéEE¶rèÅèÄÈèÅÈäÈÅÄÒ¶¶¶»Ör„ÈÅÈÄÈäÈÅÈíÛ-%Ò% ’ÄÈÄÈäÈèÄèÄèȲ¶¶¶¶¶N…èÄÈèÅèÈèÄè¶%Ò*ÑÄèéÈÄéÄÈÅèÈÄÒ¶¶¶·¶*¤ÈéÄÈÈÄÄéÄÈén²)IíÈÅÄÈäÈéÄèÄéı·º¶Ö¶*ˆÄÈèÄèÄèÈÄéÄÍN­n²ÈäÈèÅèÄÈÈÄÈÄÈͶֶ¶¶ + ¤éÄéÄéÈÅèÈÄÈÄɉ–%èÅèÄÈÈÄèÅèÈäèÅͺ·¶·–¥ÈäÈÄÈÄèÄéÄéÈÈÈÖÅÈÈÄèÅèÈÅÈÄéÈÄèͶ¶¶¶’¨ÅÈÄèÅÈÄÈäÈñöÄÄúÄèÄèÈÄéÄèÄÈÄÈéÄͶ¶¶¶rÈÄèòÍèÄèÉÈÄÍöÈäöÈÅÈÅÈÈäÈÄèÈäÈÄÈɺ¶¶·n¨ÄÈúòÈéöñíÄíöÄÈíÍäÈèÄèÅèÈÅÈéÄèÅÈ·¶¶ÚNÉÄä÷ÑäÍúÉÈèÍöÄéÈíÈÄéÄÈÈÄÈèÄÈÄÈèɶ¶¶¶*ÈéÄöÖÈÄöíÍÄòöÈÄéÑäÈÄéÄèÅÈÄèÄéÄÈȶ¶¶¶*ÈÄÈÈèÄèÅÈäÈÈÈÄÈÄíÈÅÈäÈÄèÄéÄéÄÈäɶ¶¶·)ÈÄèÄÄÉÈäÈÈäÄèéäÈÉäèÄÈéÄÈÈÄÈäÈÄèĶ׶¶%ÈÅɤ©¤…ieeI&E%IEIeIeeie……‰…‰…ÍÉͶ¶¶–* +  +    +  +  +   r¶¶¶¶¶r +  +  +   +  +  +  +  + ’¶»¶¶ÚN + ’.*’N*)Nn + ’ + rN*rrN–¶¶Ö·¶* + %»’rJ’*·¶¶*¶ + Û’N¶’¶* + ²¶·¶¶¶) + ’)·r–n**’% + ’nJ– “r + ¶¶¶¶º’ +  +  +  +  +  + ¶·¶¶·¶–·–¶’–’–’–’’rn)* +  +  +   +  + ¶¶¶Ú¶¶·¶¶·¶¶·¶¶¶¶¶¶¶¶»¶¶’’nNN*) + )¶·¶·¶¶¶¶¶Ö¶ºÖ¶·Ö·¶»Ö¶¶¶¶¶¶¶¶¶¶¶¶–’nN)*¶¶¶¶¶ diff -r -c -P -x CVS ../tk8.0.5/library/images/.xvpics/pwrdLogo175.gif ./library/images/.xvpics/pwrdLogo175.gif *** ../tk8.0.5/library/images/.xvpics/pwrdLogo175.gif Thu Jan 1 09:00:00 1970 --- ./library/images/.xvpics/pwrdLogo175.gif Tue Aug 17 18:54:36 1999 *************** *** 0 **** --- 1,34 ---- + P7 332 + #XVVERSION:Version 3.10a Rev: 12/29/94 (PNG patch 1.2) + #IMGINFO:111x175 GIF89 file (7964 bytes) + #END_OF_COMMENTS + 38 60 255 + ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶·¶·¶»¶·¶»¶¶·Ö¶Ö²ÖÒÒÑÎÑÒ¶·¶·¶¶·¶»¶·¶·¶¶¶Ú¶ÍÍÍÈéÈéÈèÄÈÄèÄÄÈÄÈÄÈÈÍÖ¶ºÖ¶Ö¶ÖÒµÖ¶¶¶¶·ÈèÄÈÈÄÈèÐäÉèøðÈäÈäÉèÄÄÈéÈÉÈÉÄÄÈäͶ¶·¶¶ÉÈäÉèäÈøÉÈèøôÌÉÈäÈÄÉèäÈÄÉÄèÄèÄèÄͶ¶¶º·ÈÉÈäÈÈéôÄÈðôÄÈèÄéÈèÄÈäÉèÈäÈäÈÉÄÉѶ¶·ÖºÉèÄÈåÈÌìÈèôÈäÈåÈÄÄÉèÉÄÈÄÄÉÈäÈèÄ貶¶¶¶¶ÍÄèÄÈÄìÈäÐìÉÄÈÄÈèòÿÿöÄèÉèÄÈäÉÄÉÄÒ¶¶·¶ºÉÈäÈäÈèÉÈôÉÄÈäÉÈòÛnnéÈÄÈèÄÈÄèÈ貶¶Ú¶¶ÍÉÈäÉÈÉÈèðÈèÉÈäò¶  ‰ÈäÉÄèÅèÉÄÈÖ¶¶¶¶·ÍÈäÈäÈÄèÐìÄÄèÄí¶ EÈÄèÄèÉÄÈäÈ䶶¶·¶¶ÍÄÉÈäÈäÈðÉÈäÈɶ +  ÈäÈäÌèÈÄðÈèɶ¶¶¶º¶ÒÈäÈÉÄÉÄôÈäÈäòJ ‰ÈäÉÈèüÌäèøÉÄ + %¶·¶ÖÍÈäÈèÄèÉðÄÉÄɶ EèÄÈÄÉÈøÉÈÈðĨ*¶¶¶·ÑÉÄÉÄèÄÈðÄèÈñ*  ÉÍöûÈäÈôÈäÉÈè¥*¶·Ö¶²ÈèÄèÉÈäÌÉÈäÒ % *ûÈÈìðÈÈèÄÈ… N¶¶º¶ÒÄÄèÄÈäÄèÈäĶ  %úÉèôèÈåÈäÈ…n¶·¶¶ÒÈèÉÈäÈÉÈäÈÉŽ  IûÈÈôÄÈÄÉÈäi’¶¶¶¶ÒÄÄèÄÈäÈåÈÄèN  öÄðÈÉèÄèÄÈe + ¶¶Ö»¶¶èÄÉèÉÄÈÈÄèé)  ÒñäÌäÄÉèÄÉèE)¶¶¶¶¶ÖÄÈèÄÈèåÄèÄÉI + * + )öÈÉÈÉèÄÈèÄÄI*¶¶·¶¶¶ÄèÄÉäÈÄÈÉèÈE%nmíÈäÄèÄÈäÈäÈ%n¶¶¶º¶ÖÈÅÈèÄÈäÈÄéÄIE’ ®ÈäÈÉÈèÄÉÄéÄ*r¶¶·¶¶¶äÈÄÄèÅÈäÈúíe …rIÄÉÄÈäÄÉèÄÈÈÄ%’¶¶¶¶¶¶ÉèäÉÈÈèÄäû’*©n)ÉÈèÈäÈèÄÄèäÈÉ·¶¶¶Û¶¶ÄÈÉÄèÄÉÈÉú +  ÍNIúÄÅÈÅÈäÈÉÄè¥)¶º¶·¶¶²ÈåÄÈåÈäÄÈÖ + %Ò* JòÈèÄèÉÈäÈÉÈÄN¶¶¶¶¶·¶ÄÈÄÈÈÄÈèäÖ%ö)NñÉÈèÄèÄÉäÈäÈn¶·¶·Ö¶²ÈèäÉèÄèÅÄö% %ö) + níÄÄÉÈÄèÄÈèÄÄr¶¶¶¶º¶’ÄÈÉÄÄèÄÈÈòIEö ’ÍÈäÈäÉÈèåÈäɶ¶¶¶¶·¶²ÈäÄèÈÅÈäÈíiEö ­íÈÄèÄèÄÄÈÉÄȶ·¶¶¶¶¶’èÉÈÄèÈäÉÄíIÖ* + ÍÉèÉÄÉÈäÈèÄèĶ¶¶¶Ö»¶ÄÈäÈåÈÈÄèÈÒEö)%ÑÉÄèÈäÄÉÄÉÈÄ貺··¶¶¶ŽÈäÈäÈäÈÉÄèÑ%EÖ*JíÈäÄÈÄèÈäÈäÉè²Ö¶¶¶¶ÖiÄÉÄÉÈäÈèÉÄí*EÖ)ˆñÍÈäÉèÉÄèÉÄèÄÒ¶¶¶»¶·iÈèÄèÄÉÄÄèÄèE%Ö*%©’íÄÉÄÈäÈÄèÄÈÄÒº¶¶¶¶¶EèÄÉÈèÄèÈÄíÉi%Ò)nÉèÈèÄÈäÈäÈäÈÒ¶¶¶¶¶’eÈèÄèÄÉÈäÉíÛN%Ò* ’ÈÄèÄèÅÈäÉÈÉÈÍ·¶¶¶ÛNeÄÉäÄÈääÈÄÈÖ%±nÑÉèÄÉÈèÉÄÈèÄÄÒ¶¶·¶¶IièÄÈèÉÄÈÉèÄè’­n *íÈÄèÄèÄÈèÄäÈèͶº¶¶º*eÈèÉÄèÄèÄÉèÄÍN‰rŽÈèåÈÄäÈåÄÉÈäÉͶ¶¶¶¶…ÈÄèÄÈÉÈèÄÄÉ詉²ÉÈÄÈÄÉÈÄÈÈèÄÈÄÍ·¶¶·¶ˆäÈåÈäÈäÉÈèÈÄèÄÖ¥ÈäÈäÈèäÈäÈåÈäÈͶ¶¶¶’…ÈäÈÄÉèÄÈäÄíûÄÈòÈÄÉèÉÄÈÅÈÉèÈÄÈÉͶ¶¶·r©ÄÈîñÄÄÈäÈäÍúÄèÑèäÈÄèÄèÈäÄÄèÉäÈɶ·¶¶N©ÄÈöòÈèòòÍÈéûÈäÍÍÉèÄÉèÄÉèÈèÄÈÄèɶ¶¶ºJ¨äÈòÑÉéÚÈèÉèûÈÉèòÄÄÈäÈÄèÄäÉÄèÉÄ̶¶¶¶*©ÄÉñöÈÈòéÉÄÍúÈÄÈòÄÈäÈäÈÉÄÈÄÉÈäÈÉÖ·¶¶¨äÈÄÈäÈÈÈÈèÈäÈäÈíÈäÉÈÅÈèÄèÉäÄÈèɶ¶¶¶ + ÄÉÈèåÈÄäÉÄèÉÄÉÄèÉÈÄèÄèÄÉèÄÈÄèÉäȶ¶¶’ÈÄÄ¥ˆ…‰eEE%%%)%%EEIEIeeeei…‰…©ÍͶ¶¶r + % +   +  +     r¶¶¶¶¶n   +  +  +  +  +  +  +    r¶¶¶·¶N N* n.*)*N + N)N)*NNNr¶¶·¶ºJ + ¶¶Nm’*¶·Ú)·)¶—N¶ Ör* + ’¶·Ö¶¶) r)—’–nN¶*rn*–—’)’¶¶º¶¶     +   +  + –¶¶¶¶¶’’’’’r’r’rr’nM*)     ’·¶·¶¶¶¶º¶¶¶¶¶¶¶¶¶¶»Ö¶¶¶’’rNI*  + ¶¶¶¶¶¶·¶¶·¶º¶¶·¶¶·¶¶¶º¶·¶¶¶¶·¶¶¶’’rNJ)¶¶¶Ö» diff -r -c -P -x CVS ../tk8.0.5/library/images/.xvpics/pwrdLogo200.gif ./library/images/.xvpics/pwrdLogo200.gif *** ../tk8.0.5/library/images/.xvpics/pwrdLogo200.gif Thu Jan 1 09:00:00 1970 --- ./library/images/.xvpics/pwrdLogo200.gif Tue Aug 17 18:54:36 1999 *************** *** 0 **** --- 1,27 ---- + P7 332 + #XVVERSION:Version 3.10a Rev: 12/29/94 (PNG patch 1.2) + #IMGINFO:127x200 GIF89 file (8964 bytes) + #END_OF_COMMENTS + 38 60 255 + ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶·¶·¶·¶¶·¶·¶¶·¶Ö¶¶Ö²ÒÒѲ¶·¶¶·¶¶·¶¶·¶¶·¶¶¶¶ÒÑÑÍÍÍÍÉèÉÈÉäÄÈäÈÄÈèÉѶ¶Ö·¶Ú¶»Ö¶Ö¶¶¶Ö¶ÈäÉÈäÈÈèÌèäÌôìÉÄÈèÅÈäÉèÍÍÍÉÉÈÈÉÈͶ¶·¶¶ÈÈäÉÄÈäøÌÉÄøðÈÈèÄÈäÈÈäÈÄÈÈäÈäÉÄäͶ¶¶Ú·äÉÄÈèÄèøÄÈìôÈÈåÈäÉäÉÈÈåÈäÈÈÈÈäÈÉͶ¶·¶¶ÈÈäÈÈÅÌðÈäøÉÄäÈÈÈäÉèÄÈäÈÉäÈåäÈäÈÒ¶¶¶¶·èÄÈåÈäìèÉððÄèÈÈåÈöÿßöÈÉÄÈäÉÄÈÉÄÈÒ¶¶¶Ö¶ÉèÉÄÈÈÈÉÄôÈÈÄÅèÄöÛr%’ÉèäÉÄÈäÈÈäȲ¶¶·¶¶ÉÈÈäÈåÈèÈôäÉÈèÄò¶ ‰ÄÈÈäÈÈåÈäɶ¶¶¶º¶ÍÄäÉÈäÈäÌðÈäÈÄò¶ )ÄèÄÈÈåÈÈäÈ䶶¶¶×¶ÍÈäÈäÈÈÈðÈÉÄÈéº  ÈÈÈåÈèÄäÌÈÈɶ¶¶·¶¶ÍäÈÄÈÅèÅðÈäÈäÒ) ‰ÄÈäÈìøÈÉìôÈÄ*N¶¶¶¶ÍÈÈåÈèÄÈðÅÈÈé’ %ÈÈåÈÅÈøäÈèôŨ¶¶¶·ÍÈäÈäÈÈåÐäÈäÑJ  + ©ÈòöÈÈèôÈÄÉÈè¥ + ¶¶¶ÖÍÉÄÈÉäÈäÌÈäÉÖ)E*nÚéÈìÐÈäèÄÈ… *·Ö·¶ÑÄèÄÈÈäÈÈÈÈä’  %ûÍÄôÈåÈÉÈä‰N¶¶¶¶ÒÄÈéäÄÉäÅäÉÈN   EúÉèôÄÈäÄÈäir¶¶»¶ÑÉÄÈÄÈÈÈÈÈäí*  ûÈìÈÈäÈÈäÈe–¶¶¶¶ÒÄèäÈåÈåÈäÈÉ%  òñÈÌäÉÈÅèÉäI&¶¶·¶¶ÒÈÄÈÈäÈÈäÉÈè * + )ûÈÈäÈÈäèÄÈÈE)¶¶¶Ö¶²ÈäÉäÈÈåÈÄäÈ%n + iÑåÈÈåÈÄÉÈåÈEN¶¶·¶¶ÖÄÈäÈÅÈÈäÈÉè% e’ + ŽÈÈäÄÈäÈäÈÈä%r¶¶¶¶·¶ÄèÈÈäÈåÈäöÍE‰n %èÄäÈÉäÈÅÈäÄÈ&–¶¶·¶¶²èÄÅèÉÈÈäÈò¶*ÍN*©ÈÈÉäÈÈäèÉÈèÄ)¶¶¶¶¶Ö¶ÄÈèÄÈäÄÈÈöN)ÒIIöÈäÉÈåÈÄÈäÈÉ*¶¶¶Ö·¶²ÈäÉÈäÉèäÄö*Eö* &öÄÈäÄÈÈäÉÄÈä*¶·¶¶¶¶²ÈÄÈäÈäÈÅÈòI + EÖ NÑèÉÈäÈäÈÈäÉÈn¶¶¶·¶¶’äÈåÈÄÈÈäÈíNeú níÄäÈÈåÈÈäÈäÈ’¶¶¶¶º¶²ÄèÈÈåÈÈÈÅímeÛ + ÍÈÈåÈÄÈåÈÄÈȲ¶¶¶¶×¶ÈÈåÈÈåäÈäÈniÚ ­íÅèÄèÉäÈÈåÈ嶶¶¶·¶¶®äÉÄäÈÄèÄÈÈ®eûÉÍèÈÄÈÈäÉÈÈäȲֶ¶¶¶¶ÄÈÈÈäÈÉÈåÄ­ + eÚ *ÑéÈÈäÉÄÈääÄÈ䲶·¶¶¶·ièÄèÅèÄÈäÈÈÍiÛ + EíÈäÄÈäèÄÈÉÈäÈÖ¶¶¶¶¶ÖiÄÈÈäÈÅÈÈäÉÉeÚ©ÍíÈÉäÈÉÈäÈÈÅÈÒ¶¶¶×¶¶eÈåÈÈÈäÈåÈÈè)EÛ%)ɶíÈäÈÄèÄÈåÈäÈÒ¶¶¶¶·–…ÈäÉäÄéÄÈäÉÈEEÚ NÍäÈÉäÈÉäÈäÈ䱶¶¶¶¶r…ÈÈÈäÈÈÈäÈéÛN%ö)’ÈÉÈÄÈÈäÈÄÈÉÈ涶·¶r„ÈåÄÈÈåÈÈÈä²%ÒN²èÄäÈäÉäÈÉäÈäѶ¶¶¶¶N‰äÈÈäÉÄäÈåÈÉn ÒNJñÄÈÈåÈäÈÈäÈÈÄζ¶¶Ö¶N¤ÈÈåÈÈäÈÈäÈÈíJ­r²ÄÈåÈÈäÈÉäÈÈåÈͶ·¶·¶*¨åÈÈäÈÈåÈÄÈäÈ©‰²)ÈÈäÈäÉÈäÈÄÉäÈäͶ¶¶¶º&¨ÄäÈÈåÈÈåÈäÉèÄÈÖ¥äÉäÈÉÄÈÈÈäÈäÈÈͶ¶¶¶¶©ÈÄÈåÄäÈÈäÈÍûÄÈöÈÄÈÉÈäÈåäÉäÈÉäÈÍ·¶¶¶·ÄÈéíÑÈÉÄäÈÉíúäÉñÉèÄäÈäÈÈÄÈÉÈÄÈäͶ¶·¶rÉÈÄööÈäöÑíÄíÚÄÈíÉÈÈäÈÈäÈÈäÄèÈäÉȶ¶¶¶n ÄäÈöòÈÉÿÈéÈíúÈåÈñäÉÈäÉÄÉäÈÈäÉÄÈÉ·¶¶¶NÈÉÈòöÈäúÉèÈÍûäÈÄòÈÄÈÈäÈäÈÅèÄÈäÈÈÖ¶¶¶*)ÄÈäÈÉÈÉÄèÉÄèÉÈäÈíÄèäÅÈÈÄÈèÄéÄÈåÈ·¶¶·)ÈåÈäÈäÈäÈäÈÉÄÈÈÈÉÈÄÈÈäÉäÉäÈÄÈèÈȶ¶¶¶&ÈÈäÈÄɤ©‰eeEIeEee…i……‰„‰¤©¤ÉÄÉÄÉÖ¶¶–EE)% +       +  r¶¶·¶¶r      +   +  +   ’¶¶¶¶¶n N)NN*)N*)N*N* *N N* + ’¶·¶¶¶N ¶’Nn¶ + ·Ú’*»)Û²*Ú—’–¶¶¶·¶*’ ’’’Jr)¶ + r’ + )· + ’r ²¶·¶¶¶         –¶¶Ö¶¶’rr’rrrrnrnrnNN* +      +  ¶¶·¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶–’nN)*  ¶¶¶º¶¶¶¶¶¶¶×¶¶¶¶¶¶¶¶¶·¶¶¶¶¶¶¶¶¶–rnN)*¶¶¶·¶ diff -r -c -P -x CVS ../tk8.0.5/library/images/.xvpics/pwrdLogo75.gif ./library/images/.xvpics/pwrdLogo75.gif *** ../tk8.0.5/library/images/.xvpics/pwrdLogo75.gif Thu Jan 1 09:00:00 1970 --- ./library/images/.xvpics/pwrdLogo75.gif Tue Aug 17 18:54:36 1999 *************** *** 0 **** --- 1,24 ---- + P7 332 + #XVVERSION:Version 3.10a Rev: 12/29/94 (PNG patch 1.2) + #IMGINFO:47x75 GIF89 file (3189 bytes) + #END_OF_COMMENTS + 38 60 255 + ¶¶¶¶¶º·º¶º·º·º¶»¶º·¶¶¶¶¶»¶¶¶¶¶¶¶¶¶¶¶¶¶¶·Ú·¶¶Ö¶Ö²Ò±ÒÑÍÍÍÍÉÌÉèÉÍÒ¶»¶¶º·º·º·Ú·¶¶¶¶¶ÍÉÈÉÈÄÈäÈÄÄÄÈäÄäÄÄèÄÄÉÑ·¶ÖÖ²ÖÒѲ¶¶¶·ºÖäÄÄäÄèÄðìÈäðüÌÈÈèÄÈäÈÄÈÉÈÉÈÈÄÈÄäÍ»¶¶·¶ÈäÈÈäÅðøÈÅôôìÈåÈäÉÄÈäÈäÈäÈÄäÈäÉÄÒº¶Ö¶¶ÈÉäÈÈÄôÌäÈøÈÅèÄÈäÈÄäÈÅèÈäÈéÈÅèÄè’¶¶»¶·èÄÈÅèÈðèÅðÌäÈÄÈÅÈÈòòÄÄÈäÉÄÈäÈÄÈÈÖ¶¶¶¶¶ÈÈäÈäÉðÈäðÈÄäÈèäÄúßÿöèÄÈÈäÈÄÈèÄɶ¶¶·¶ºÉäÉÈäÈÈÈÈðÅÄÈÅÄÍûr&)N­äÉäÉäÈÅÈäɶ¶¶Ö¶·ÈÈäÈÄÈéÄììÄÈèäòßI…ÈäÈÄÈäÈäÉͶ¶¶»¶ºéÄÈåÈäÄÄðÌÈåÈÈÛJ iäÈÈÅÄÈéÄÈÄͺ·¶¶¶·ÈÈèÈäÉÈäôéÈÄÄñN)äÈäÈììäÈðìÄͺ¶¶¶¶ºÉäÉÄÈäÈÅôÈäÈä² IÄäÄéÄìüÈÄðøäi&*¶·¶ÛÈÈäÈÈÅèÈðÈÄäÒN%ÄèÉÍÄäÌüéÄÌìÈE)¶º¶¶ÍÄÈÅèÈÄÈðÈÅèÒ) IÉÒúûÈäðÔÄäÉÈäE*¶Ö·ºÉäÈÈäÈäÉìäÄè¶ %) + NÛíÄôðÄÈèÄé)N¶¶¶¶ÍÈÅèÈÅèÈÈÈÄír + EÚéÌðÈÅèÈÄÈ%r¶¶·ºÍÄèÄÈäÈÄäÉäÍN  ‰ûÈðìÈäÉÄèÅ ²·¶¶ºÉäÉäÈÅÈèÈÄäÍ* +  ²úÈðÈÅÈÄèÈÅ*¶¶¶¶·ÍÈÄÈèÄÈÅèÈäÍ* %ööÄèÄÈäÈäÉÄJº¶Û¶ºÍäÈäÉÈäÈÄéÄ©%*) ŽöÈäÈäÉÄÈÈä¨nº¶¶¶·ÍÈäÈäÈÈåÈÄäÈ%­N%²èÄÈÉÄèÈäÉÄ©’º¶¶¶¶ÍÄÉÈÈåÈÄèÈéÄ)%ÍNJìÄÈäÈÈäÉÄèȤ + ¶¶¶·¶»ÍÈäÈÄÈäÈäÍúíE%Ò* + ¤èäÉÈäÉÄèÈäÈ¥*¶¶¶¶Ö¶ÒÄÈåÈäÉÈäÉßn + EÖ)EíÍÄÈÄÈäÈÄÈÅè…Mº·¶º·º­ÄèÈäÈäÈÉè·i¶–òÄèÅèÈÅèÈäĉrÖ¶¶Ö¶·ÍÄÈäÉÈÈÄÈé¶i’ + ÖÍäÈÈäÈÈäÈÈè…–¶·¶·¶º­äÈÈäÄéäÈè·‰–ÛìÄäÈÅèÄéÄéĉ¶Ú¶¶¶¶¶ÍÄéÄÈÈÄÈÅÈÒ “*ÖèÄÉÄèÈÄÈÈÄ詶·¶¶·Ö»©ÈäÈåÈèäÈèÒ)’)öäÉÄÈäÈéÄèÄÄɺ¶¶¶º¶¶­äÈÈäÈÅÈäÉñi©rIòÈÄèÄéÄÈäÉÈèɺ¶·¶¶·º©èÄéÈäÈÈÄÈíJ“EöÈäÉèÄÈäÈäÈÄÍ·¶¶¶Ö¶·©ÄÈäÉÈäÉèÄí’iíÄÈÄÈÈäÉÈÈÅèɶ¶¶¶¶Û–¨ÈäÈÄÈÈäÉÄè­‰“‰èÉÄèÄéÈÄÈäÈäɺ·Ö¶¶º²©ÄÉÈäÈåÈÄèä­*‰–ÍúÈäÉÄèÈäÈÅÈÈÈ·¶º¶·¶–¥ÈäÈéÄÈäÈÄäÉ)i—%ÖéÄèÈÄÈÅèÈäÈ鶶¶¶¶Úr¥ÈÄÈäÈäÈéÈòÍIi’&ÖäÈÄÈåèÄÈäÉÄȶ»¶¶·¶N¤ÈäÈÉÄÈÄÈäö–i· *ñÄÈäÉÄÈÄÈÈäÈɶ¶¶¶ºÖ.¥ÈÈäÈèÅèÄÈé’EÖ*NèÄÈäÈäÈéÄÈéÄÈÖ¶·¶Ö¶*¨äÉäÈäÈÈéÄÄñnIÖ*ŽèÄéÈÄÈäÈäÈÄÈä·º¶¶·¶*¤ÈäÈÅÈäÈÄÈäÈéjÖ*©ÄÈäÉèÈÅÈÈÅèÄÈÖ·¶¶Ú’©äÈÈèÄÉäÈäÉäĤÑreèÈèÈÄÄÈèÄèÄÈéĶ¶¶¶·rÅÈäÅÈÈäÈÉÄÈÍíÄíòÄäÈÄéÄèÅÈäÉèÄÈä¶Ö¶¶ÚnÈÈÈäÄÈéÄÄèÄööèÉöÄÈäÈÄÈÈäÈÈäÉÄèÈÒ»¶¶·NÅÄÈ÷öÄÄÉíÈÄöúÄÈöÈäÉÈèÅèÈåÈÄÈèÄ䲶¶Ú¶)ÈÄÈúÖäööÍíäÖöäÈñÍÄÈäÈäÉÄèÄèÄéÈIJº¶¶¶ + %ÈÄÅúöÄÒúÄÈÄööÉÄíòÄÈÅÈÄÈÈäÈÉÄÈäÈÍ»¶»’ + ÄèäööÈéöíÈäööÄÄÉõäÈèäÈäÉÈäÈÈäÉÄÑ·¶Ör%ÉÄÈÉÈÄèÄÈäÉÄÈèäÈíÉÄÈÅÈÈäÈÄéÄÈäÈͺ¶Ún%ÈèÄäèäÄèÄȤ©¨¥¨ÉÄÈÄÈèäÈåèäÄèäÈÄÍ·¶¶N)Ť©¥‰eIE*%% + %&)%&)%&IEEEIeei©ÍÒ¶¶ºJ)&    +    +  +  r»¶¶¶¶) *  +    & + %r¶¶¶·’MÛN*–n*’’’ nr·)N¶*)·–*’¶¶Û¶r N×)nr¶»ûnr’ Û*nÛJ–¶* ’Û¶¶¶rN) + ’Nnr*NnrIJ–& ’’ + ’¶¶¶¶n)*)*%*)%*%*)  %–Ö¶·¶¶º¶¶ºÖºÖº·º¶Ö·¶’rn.*) *–·º¶¶¶Ö¶Û¶·¶¶·Ö¶¶·ºÖºÖºÖ¶¶’rNN*) + ¶¶¶Ö·¶·¶¶¶Ö¶·º¶¶Û¶¶¶¶·¶¶·ºÖºÖº¶¶’rrN)J¶¶Ö·¶ diff -r -c -P -x CVS ../tk8.0.5/library/msgbox.tcl ./library/msgbox.tcl *** ../tk8.0.5/library/msgbox.tcl Tue Aug 17 18:48:57 1999 --- ./library/msgbox.tcl Tue Aug 17 18:54:36 1999 *************** *** 51,65 **** if {[lsearch {info warning error question} $data(-icon)] == -1} { error "invalid icon \"$data(-icon)\", must be error, info, question or warning" } - if {$tcl_platform(platform) == "macintosh"} { - if {$data(-icon) == "error"} { - set data(-icon) "stop" - } elseif {$data(-icon) == "warning"} { - set data(-icon) "caution" - } elseif {$data(-icon) == "info"} { - set data(-icon) "note" - } - } if {![winfo exists $data(-parent)]} { error "bad window path name \"$data(-parent)\"" --- 51,56 ---- *************** *** 142,159 **** wm iconname $w Dialog wm protocol $w WM_DELETE_WINDOW { } wm transient $w $data(-parent) - if {$tcl_platform(platform) == "macintosh"} { - unsupported1 style $w dBoxProc - } frame $w.bot pack $w.bot -side bottom -fill both frame $w.top pack $w.top -side top -fill both -expand 1 ! if {$tcl_platform(platform) != "macintosh"} { ! $w.bot configure -relief raised -bd 1 ! $w.top configure -relief raised -bd 1 ! } # 4. Fill the top part with bitmap and message (use the option # database for -wraplength so that it can be overridden by --- 133,145 ---- wm iconname $w Dialog wm protocol $w WM_DELETE_WINDOW { } wm transient $w $data(-parent) frame $w.bot pack $w.bot -side bottom -fill both frame $w.top pack $w.top -side top -fill both -expand 1 ! $w.bot configure -relief raised -bd 1 ! $w.top configure -relief raised -bd 1 # 4. Fill the top part with bitmap and message (use the option # database for -wraplength so that it can be overridden by diff -r -c -P -x CVS ../tk8.0.5/library/optMenu.tcl ./library/optMenu.tcl *** ../tk8.0.5/library/optMenu.tcl Tue Sep 15 03:23:24 1998 --- ./library/optMenu.tcl Tue Aug 17 18:54:36 1999 *************** *** 34,40 **** set var $firstValue } menubutton $w -textvariable $varName -indicatoron 1 -menu $w.menu \ ! -relief raised -bd 2 -highlightthickness 2 -anchor c \ -direction flush menu $w.menu -tearoff 0 $w.menu add radiobutton -label $firstValue -variable $varName --- 34,40 ---- set var $firstValue } menubutton $w -textvariable $varName -indicatoron 1 -menu $w.menu \ ! -relief raised -bd 2 -highlightthickness 2 -anchor w \ -direction flush menu $w.menu -tearoff 0 $w.menu add radiobutton -label $firstValue -variable $varName diff -r -c -P -x CVS ../tk8.0.5/library/paint.xbm ./library/paint.xbm *** ../tk8.0.5/library/paint.xbm Thu Jan 1 09:00:00 1970 --- ./library/paint.xbm Tue Aug 17 18:54:36 1999 *************** *** 0 **** --- 1,10 ---- + #define paint_width 20 + #define paint_height 20 + #define paint_x_hot 0 + #define paint_y_hot 19 + static unsigned char paint_bits[] = { + 0x00, 0x60, 0x00, 0x00, 0x58, 0x00, 0x00, 0x86, 0x00, 0x80, 0x81, 0x00, + 0x60, 0x80, 0x01, 0x18, 0x00, 0x01, 0x0c, 0x00, 0x02, 0x52, 0x55, 0x03, + 0xa2, 0xaa, 0x06, 0x66, 0x55, 0x05, 0xc6, 0xaa, 0x0a, 0x43, 0x55, 0x0d, + 0x83, 0xaa, 0x0a, 0x8b, 0x55, 0x0d, 0x01, 0xab, 0x06, 0x05, 0x55, 0x03, + 0x11, 0xea, 0x00, 0x09, 0x36, 0x00, 0x23, 0x0c, 0x00, 0x1a, 0x00, 0x00}; diff -r -c -P -x CVS ../tk8.0.5/library/paintm.xbm ./library/paintm.xbm *** ../tk8.0.5/library/paintm.xbm Thu Jan 1 09:00:00 1970 --- ./library/paintm.xbm Tue Aug 17 18:54:36 1999 *************** *** 0 **** --- 1,8 ---- + #define paintm_width 20 + #define paintm_height 20 + static unsigned char paintm_bits[] = { + 0x00, 0x70, 0x00, 0x00, 0x7c, 0x00, 0x80, 0xff, 0x00, 0xe0, 0xff, 0x00, + 0xf8, 0xff, 0x01, 0xfc, 0xff, 0x01, 0xfe, 0xff, 0x03, 0xf7, 0xff, 0x03, + 0xef, 0xff, 0x07, 0xff, 0xff, 0x07, 0xdf, 0xff, 0x0f, 0xdf, 0xff, 0x0f, + 0x8f, 0xff, 0x0f, 0x8f, 0xff, 0x0f, 0x07, 0xff, 0x07, 0x0f, 0xff, 0x03, + 0x1f, 0xfe, 0x00, 0x3f, 0x3e, 0x00, 0x7f, 0x0c, 0x00, 0x7f, 0x00, 0x00}; diff -r -c -P -x CVS ../tk8.0.5/library/scrlbar.tcl ./library/scrlbar.tcl *** ../tk8.0.5/library/scrlbar.tcl Thu Nov 12 15:22:05 1998 --- ./library/scrlbar.tcl Tue Aug 17 18:54:36 1999 *************** *** 7,12 **** --- 7,14 ---- # # Copyright (c) 1994 The Regents of the University of California. # Copyright (c) 1994-1996 Sun Microsystems, Inc. + # TkSTEP modifications originally completed by Alfredo K. Kojima + # - surgery performed and implanted into Tk8.0 by Steve Murray # # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. *************** *** 140,149 **** # x, y - Mouse coordinates. proc tkScrollButtonDown {w x y} { ! global tkPriv ! set tkPriv(relief) [$w cget -activerelief] ! $w configure -activerelief sunken set element [$w identify $x $y] if {$element == "slider"} { tkScrollStartDrag $w $x $y } else { --- 142,159 ---- # x, y - Mouse coordinates. proc tkScrollButtonDown {w x y} { ! global tkPriv TKSTEP_PUSH_STYLE ! set element [$w identify $x $y] + if {$TKSTEP_PUSH_STYLE} { + set tkPriv(relief) [$w cget -activebackground] + if {$element != "slider"} { + $w configure -activebackground white + } + } else { + set tkPriv(relief) [$w cget -activerelief] + $w configure -activerelief sunken + } if {$element == "slider"} { tkScrollStartDrag $w $x $y } else { *************** *** 161,169 **** # x, y - Mouse coordinates. proc tkScrollButtonUp {w x y} { ! global tkPriv tkCancelRepeat ! $w configure -activerelief $tkPriv(relief) tkScrollEndDrag $w $x $y $w activate [$w identify $x $y] } --- 171,184 ---- # x, y - Mouse coordinates. proc tkScrollButtonUp {w x y} { ! global tkPriv TKSTEP_PUSH_STYLE tkCancelRepeat ! ! if {$TKSTEP_PUSH_STYLE} { ! $w configure -activebackground $tkPriv(relief) ! } else { ! $w configure -activerelief $tkPriv(relief) ! } tkScrollEndDrag $w $x $y $w activate [$w identify $x $y] } diff -r -c -P -x CVS ../tk8.0.5/library/tclIndex ./library/tclIndex *** ../tk8.0.5/library/tclIndex Sun Jun 28 03:06:45 1998 --- ./library/tclIndex Tue Aug 17 18:54:36 1999 *************** *** 34,39 **** --- 34,43 ---- set auto_index(tkEntrySeeInsert) [list source [file join $dir entry.tcl]] set auto_index(tkEntrySetCursor) [list source [file join $dir entry.tcl]] set auto_index(tkEntryTranspose) [list source [file join $dir entry.tcl]] + set auto_index(tk_focusNext) [list source [file join $dir focus.tcl]] + set auto_index(tk_focusPrev) [list source [file join $dir focus.tcl]] + set auto_index(tkFocusOK) [list source [file join $dir focus.tcl]] + set auto_index(tk_focusFollowsMouse) [list source [file join $dir focus.tcl]] set auto_index(tkEntryPreviousWord) [list source [file join $dir entry.tcl]] set auto_index(tkListboxBeginSelect) [list source [file join $dir listbox.tcl]] set auto_index(tkListboxMotion) [list source [file join $dir listbox.tcl]] *************** *** 177,182 **** --- 181,190 ---- set auto_index(::safe::allowTk) [list source [file join $dir safetk.tcl]] set auto_index(::safe::tkTopLevel) [list source [file join $dir safetk.tcl]] set auto_index(tkMessageBox) [list source [file join $dir msgbox.tcl]] + set auto_index(tksColorPanel) [list source [file join $dir tkstep.tcl]] + set auto_index(tksColorWell) [list source [file join $dir tkstep.tcl]] + set auto_index(tksUpdateFontDB) [list source [file join $dir FontChooser.tcl]] + set auto_index(tksFontChooser) [list source [file join $dir FontChooser.tcl]] set auto_index(tkIconList) [list source [file join $dir tkfbox.tcl]] set auto_index(tkIconList_Config) [list source [file join $dir tkfbox.tcl]] set auto_index(tkIconList_Create) [list source [file join $dir tkfbox.tcl]] diff -r -c -P -x CVS ../tk8.0.5/library/tk.tcl ./library/tk.tcl *** ../tk8.0.5/library/tk.tcl Tue Aug 17 18:48:57 1999 --- ./library/tk.tcl Tue Aug 17 19:10:25 1999 *************** *** 8,13 **** --- 8,16 ---- # Copyright (c) 1992-1994 The Regents of the University of California. # Copyright (c) 1994-1996 Sun Microsystems, Inc. # Copyright (c) 1998-1999 Scriptics Corporation. + # TkSTEP modifications originally completed by Alfredo K. Kojima + # - surgery performed and implanted into Tk8.0 by Steve Murray + # And the TkStep implaned into tk8.0.5jp by Jun Wakaya(Sumitaka Takei) # # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. *************** *** 26,33 **** } } ! # Turn off strict Motif look and feel as a default. set tk_strictMotif 0 # tkScreenChanged -- --- 29,39 ---- } } ! # Set default tkstep button push style (0). Set to 1 for NeXTSTEP stlye ! # push buttons. ! set TKSTEP_PUSH_STYLE 0 + # Turn off strict Motif look and feel as a default. set tk_strictMotif 0 # tkScreenChanged -- diff -r -c -P -x CVS ../tk8.0.5/library/tkstep.tcl ./library/tkstep.tcl *** ../tk8.0.5/library/tkstep.tcl Thu Jan 1 09:00:00 1970 --- ./library/tkstep.tcl Tue Aug 17 18:54:36 1999 *************** *** 0 **** --- 1,84 ---- + #! + # This implements some new widgets and other stuff + # in tcl/tk. Some of them try to mimic N*XTSTEP widgets. + # + # Copyright (c) 1996 by Alfredo K. Kojima + # + # You can use this software for any purpose as long as this copyright + # notice appear unchanged in it's derivative works. This software is provided + # AS IS and I disclaim any warranties about it. + # + + # + # tksColorChooser -- + # + # + # + # + # + proc tksColorChooser {} { + global tk_library + + exec $tk_library/demos/tcolor2 & + } + + + # + # tksColorWell -- + # You can use this to select colors for something. You can drop + # a color from a color chooser or another color well and set it's + # color. The color selected is stored in the textvariable you + # supply + # If the ColorWell already exists, the variable is replaced with the new + # value + # + # w - path for the ColorWell + # var - global variable to hold color + # text - text to display inside well + proc tksColorWell { w var {text ""} } { + upvar $var col + + proc aux { w } { + global tk_library + + set col [$w cget -bg] + dnd_setdata Text $col + dnd_handledrag "@$tk_library/paint.xbm $tk_library/paintm.xbm $col white" + } + proc chcol { w var color } { + upvar $var cv + + $w configure -bg $color + set cv $color + } + if "[winfo exists $w]" { + #change variable... + bind $w.b [list if {"%P"=="Text"} "chcol $w.b $var %D"] + chcol $w.b $var $col + #...and get out + return + } + frame $w -bd 2 -relief raised + label $w.b -bd 2 -relief sunken -bg $col \ + -padx 12 -pady 0 -text $text + pack $w.b -in $w -padx 5 -pady 5 + bind $w.b [list if {"%P"=="Text"} "chcol $w.b $var %D"] + bind $w.b [list aux $w.b] + bind $w {tksColorChooser} + + return $w + } + + # + # tksStopButton -- + # This is a button that changes it's label when it is first pressed + # and released, and changes back the label after a second press. + # + # w - path for the button + # image1 - default image to be shown + # image2 - image to show after first press + # var - variable to hold current button state + # args - other arguments as for normal buttons + # + #proc tksStopButton {w image1 image2 var args} { + #} diff -r -c -P -x CVS ../tk8.0.5/tests/script ./tests/script *** ../tk8.0.5/tests/script Thu Jan 1 09:00:00 1970 --- ./tests/script Tue Aug 17 18:54:36 1999 *************** *** 0 **** --- 1,14 ---- + + interp create x + x eval {set argc 2} + x eval {set argv "-geometry 10x10+0+0"} + x eval {load {} Tk} + x eval { + button .b -text hello + bind .b foo + } + x alias foo destroy_x + proc destroy_x {} {interp delete x} + update + exit + diff -r -c -P -x CVS ../tk8.0.5/tkstep/NOTES ./tkstep/NOTES *** ../tk8.0.5/tkstep/NOTES Thu Jan 1 09:00:00 1970 --- ./tkstep/NOTES Tue Aug 17 18:54:36 1999 *************** *** 0 **** --- 1,72 ---- + + **** NOTES **** + + + == New options available if ENABLE_STEP is defined: + + listbox + Entries are scanned for " ->" at the end of the string. If the + sequence is found, it is replaced by a *step styled arrow at the + right side of the listbox (seen in the *step filer). + + canvas rectangle item + -rounded NUMBER + rounded corners for the rectangle (highlighting of icons...) + use same outline as fill for no outline (this makes the thing + smooth...) + + scrollbar + -noArrow + if 1 arrows buttons aren't drawed. Default is 0 + + menubutton + -indicatorType + can be either normal (for pop-up lists) or downarrow (for pull-down + lists) + + button + -indicatoron + If 1 (default is 0) a return indicator is drawed on the right of + text. + + frame + -text + Text to display on the top of frame + -foreground + -fg + Text color + -font + Font for text + -justify + Justification of text + + == New widgets + Written in Tk: + + tksColorWell- + drag and drop color setting widget for use with tksColorChooser or + the standard tcolor demo + + == Others + + XPM image format (load from files). Requires libXpm 4.7 (better 4.9) + + If you set TKSTEP_PUSH_STYLE to 1, the button push behaviour + will be changed. + + + + **** BUGS and LIMITATIONS **** + + - It works in monochrome displays but some things will not be visible + because of it's colors. I'll not fix this in the near future, unless + somebody needs it. If you do that, send me them and I'll include in the + package. + - Sometimes, widget behavior with attributes (color, width...) other + than the default will not be as the user expects. + - Scrollbars need some attention, there are a few residual problems with the + slider size changes. + - I'd like to make the 3D border colours of the text, entry and listbox + widgets change colour to reflect that of the parent widget, but at the + moment they're fixed to be NORMAL_BG. + diff -r -c -P -x CVS ../tk8.0.5/tkstep/README.TkDND ./tkstep/README.TkDND *** ../tk8.0.5/tkstep/README.TkDND Thu Jan 1 09:00:00 1970 --- ./tkstep/README.TkDND Tue Aug 17 18:54:36 1999 *************** *** 0 **** --- 1,105 ---- + Drag and Drop for Tk + version 0.3 + Oliver Graf + original by + Alfredo K. Kojima + + This is a implementation of the DND drag and drop + protocol (aka OffiX Drag and Drop) from Cesar Crusius + for the Tk toolkit. It should work with Tk version 4.2p2 + + This implementation has some limitations. They are: + + - for now, there is no way to bind scripts for drops in the + root window and on icons (root win is NOT . but your desktop) + + But it has also some advantages over DND for Xt, like: + + - you can optionally select the pointer cursor to anything you + want during the drag + - Tcl/Tk is much easier to program than Xt, and so is the Tcl interface + to the protocol + + --*-- + + DROP HANDLING: + + To bind some script to a drop event in a widget just use the normal + `` bind'' mechanism, setting the event as , like in: + + bind . {puts "Got a Drop!"} + + New % replacements were defined to allow information about the drop to be + retrieved. + + %D - the data retrieved from the drop. If the data type is + DndFiles, \0 characters will be converted to \n. + For the RawData type anything below 32 and the backslash + will be backslashed. + + %P - gives the type of the data droppped. It can have the + following values: + Unknown (treated as RawData) + RawData (0-31 == \[0-O] (this is 48+x), \=\\) + File + Files (returns values seperated by \n) + Text + Dir + Link + Exe + URL + MIME + or a number (treated as RawData) + + %Z - the size of the original data (ignoring any convertions made + by tcl/tk) + + --*-- + + DRAG HANDLING: + + To bind a script to a drag event use the built-in bind command with the + event type: + + bind window script + + To set the data to be dragged use the dnd_setdata command. It's sintax is: + + dnd_setdata datatype data ?size? + + where + datatype - is the type of the data to send, which can be one of + RawData (0-31 == \[0-O] (this is 48+x), \=\\) + File + Files (use \n for seperating entries) + Text + Dir + Link + Exe + URL + MIME + or a number (treated as RawData if not within standart + range of types RawData==1, MIME==9) + data - is the string to send + size - is the size of the string to be sent. If size if + not supplied, the whole string will be sent + + After setting the data type and doing other processing, you must call + dnd_handledrag (inside the event handler) to proceed the dragging. + You can specify an optional cursor to be used during the drag as in: + dnd_handledrag top_left_arrow + If no cursor is specified it defaults to the DND standart cursor for + the data type set. An unknown data type results in the RawData cursor. + + The cursor identifier must be a standard Tk cursor nameId (see manpage + for Tk_GetCursor) + + Example: + bind .label {dnd_setdata Text "Hello, I'm TkDND!!!!" + dnd_handledrag trek } + + See the OffiX/DragAndDrop documentation for more information about + the protocol. + --*-- + + Send bug reports, comments, patches etc. to ograf@fga.de diff -r -c -P -x CVS ../tk8.0.5/tkstep/README.step ./tkstep/README.step *** ../tk8.0.5/tkstep/README.step Thu Jan 1 09:00:00 1970 --- ./tkstep/README.step Tue Aug 17 18:54:36 1999 *************** *** 0 **** --- 1,139 ---- + TkSTEP 8.0 + ========== + + Oliver Graf + + http://rhein-zeitung.de/~ograf/wm/ + + Steve Murray + + http://touchwood.ee.uts.edu.au/TkSTEP/TkSTEP.html + + original Version by + Alfredo K. Kojima + + + This is Tk 8.0 with some modifications to make it look like N*XTSTEP's + interface, plus some new widgets inspired by N*XTSTEP. + It also incorporates the Offix DND drag and drop patches (see README.TkDND) + + Since we've never used N*XTSTEP we can't guarantee that it really + looks and feel like the Real Thing, it is only based on what + we've seen on pictures and screen shots. Feel free to email the current + maintainers about what is wrong and what else should be changed. We're + aware that the scrollbars don't act in precisely the same way as the real + N*XTSTEP ones do for example. + + The programming aspects of Tk have not been changed much - this has been a + principle goal. Consequently, you can run your old Tk apps normally + with it, although some options will not do anything (like "-relief" for + scrollbars). Other options like the "-default active" option for + push-buttons have had the ring translated into the return indicator, + whilst still retaining the older (pre tk8.0) tkstep-specific option for + backward compatability. + + If you find that some code that worked with the original Tk8.0 doesn't + with this one, please email the current maintainers, Oliver Graf and + Steve Murray, *also sending the piece of code with the problem* - this is + important in reducing the time taken to debug. + + You can specify at compile time if you want to enable the new widgets and + widget options with -DENABLE_STEP and the drag and drop extension with + -DENABLE_DND. Begin by running the configure script with the help option + so that you can examine what features are available ... + + ./configure --help + + At runtime you can force some default values, to be able to run programs + written to Tk, that break the interface due to some incompatibilities in + the visual aspects of the interface. Set the tk_StrictMotif variable to 1 + (in tkstep8.0/tk.tcl) to enable the default forcing. + + With the Drag and Drop extension, adding OffiX compatible drag and drop + capabilites to your program is as easy as binding a script to an event. + See the README.TkDND for instructions on it. + + You can use TkSTEP with Bowman, AfterStep or Window Maker to make your + desktop look more consistent. + BowMan is a window manager that emulates the look and feel of the N*XTSTEP + user interface (this project seems to have been discontinued). AfterStep + is a continuation of BowMan with many enhancements and is even better + looking - this project is still under active development. Window Maker is + a modern window manager created from the ground up by Alfredo Kojima. + + + Changes for TkSTEP8.0.3 and TkSTEP8.0.4 (by Steve Murray) + - fixed cosmetic bug with the first and last menuitems being two pixels too + high. Also fixed the size of the selected rectangle superimposed onto the + menuitem (it was 2 pixels too narrow). + - fixed a long-standing bug with the inability to change the background + colour of entry widgets. They used to be white always and ignored any + request to change. + - fixed some trivial cosmetic bugs with the scale widget shadows. + - fixed incorrect 3D shadings on the right and lower edges of the text and + listbox widgets. They will always take the NORMAL_BG colour from now on. + - fixed problem with the scrollbar slider shrinking too far - it's now + limited to 16 pixels length, which makes it no smaller than square on + default scrollbar widths. + - modified source so that all compiler warnings were removed. + - modified arrow indicators on cascade menus, menu buttons and listboxes so + that they exactly matched those provided by WINGs (Window Maker widgets). + - modified cascade menus so that they are mapped to the right of the parent + menu, attempting to mimic the default menu behaviour of AfterStep and + Window Maker. + + Changes for TkSTEP8.0p2 (by Oliver Graf and Steve Murray) + - added support for the "-default active|normal|disabled" button option, + but retained "-indicatoron 0|1" for compatability. + - added support for the -columnbreak 0|1 menuentry configuration option. + + Changes for tkstep4.2 (by Oliver Graf): + - listbox arrows + - transparent GIFs and XPMs + - rounded rectangles + - any DNDType is possible + - DND 1.0 protocol + - adapted to Tk 4.2 event handling (it seems to work ...) + + Changed Tk Widgets: + - 3D rectangle (reliefs) + - Button + - Scrollbar + - Menus + - Check buttons + - Radio buttons + - Some other minor changes + - Scale + + Changes since 0.5a: + - Added XPM image support + - Fixed some drawing bugs in scrollbars and menus + + Changes since 0.3b4: + - Included DND support + - New options to various widgets (see NOTES) + - Some new widgets implemented in Tk (see NOTES) + - Changed base source to Tk4.1 patchlevel 1 + + Changes since 0.3b3: + - Just some small changes + + Changes since 0.3b2: + - Some minor internal changes/fixes + - Fixed bug that made TkDesk's menu selectors invisible + (if tk_strictMotif==1) + + Changes since 0.3b1: + - Scrollbar arrows are now scalable and antialiased + + Changes since 0.2: + - tk_strictMotif now makes Tk ignore changes in some default attributes + - changed scale again + - Fixed a bug that crashed Tk, when reconfiguring non-packed scrollbars + + Changes since 0.1: + - Fixed bug in sunken and raised reliefs with borderwidth of 1 + - Converted the scale widget (contributed by Andy Lo A Foe) + + If you have any comments, bug reports, suggestions, patches, complaints + etc. etc. etc. you can contact us at the email addresses listed above. diff -r -c -P -x CVS ../tk8.0.5/tkstep/TODO ./tkstep/TODO *** ../tk8.0.5/tkstep/TODO Thu Jan 1 09:00:00 1970 --- ./tkstep/TODO Tue Aug 17 18:54:36 1999 *************** *** 0 **** --- 1,44 ---- + + TkSTEP TODO Tasks + ==================== + + Created: 28/12/98, stevem@eng.uts.edu.au + + + + + This is a list that has evolved and includes required modifications in no + particular order. Some are quite straightforward to implement and others are + a good deal more problematic. + + + 1. Dialog Boxes - add pixmap support rather than bitmaps for the built-in + dialogs. + - This is currently underway, but is not a high priority. + + 2. Fix bug with 3D menu light shading that's apparent when menus are created + from the 'C' interface. Compile and build ical to verify. + - Haven't had time to follow this one up yet. + + 3. Consider including Jan Nijtmans' tk patches and others that are popular + with tk. + - Haven't had time to look at this either. + + 4. Add support for captions on push-button widgets. + - Should have done this by now, but haven't got around to it yet. + + 5. Create some new file open/save dialog boxes. + - This is a high priority and is nearly complete, but since they're so + important I'm making sure they're correct before releasing them. + + + + ---------------------------------------------------------------------------- + + If anyone is willing to have a look at some of these, they're welcome to + send in patches for inclusion. + + Steve Murray. + + + diff -r -c -P -x CVS ../tk8.0.5/tkstepjp/changes.TkSTEPjp ./tkstepjp/changes.TkSTEPjp *** ../tk8.0.5/tkstepjp/changes.TkSTEPjp Thu Jan 1 09:00:00 1970 --- ./tkstepjp/changes.TkSTEPjp Mon Aug 23 01:15:09 1999 *************** *** 0 **** --- 1,33 ---- + + Release TkStep8.0.5jp1.6pl1 Mon Aug 23 01:12:51 JST 1999. ¼ãë¡¡½ã + + (Update)¡¡¥ê¥¹¥È¥Ü¥Ã¥¯¥¹¤ÎÌð°õ¤ÎµóÆ°¤ò¿·¥Ñ¥Ã¥Á¤Ë¹ç¤ï¤»¤¿¡£ + + Release TkStep8.0.5jp1.6 Wed Aug 18 00:45:47 JST 1999. ¼ãë¡¡½ã + + (Update) ÃÙ¤ì¤Æ¤ä¤Ã¤Æ¤­¤¿¡Ê¾Ð¡ËËܲȤΥѥåÁ¤òŬÍÑ¡£ + ¡¡¡¡¡¡¡¡¡¡¡¡¡¡Ã±¤Ê¤ëŬÍѤǤϰÕÌ£¤¬¤Ê¤¤¤Î¤Ç8.0.5¤ËÂбþ¤µ¤»¤¿¡£ + + Release TkStep8.0.4jp1.3 Sat Jan 30 01:25:55 JST 1999. ¼ãë ½ã + + (Update) ¿·¤¿¤Ë£Ó£Ò£Á¤«¤é¥ê¥ê¡¼¥¹¤µ¤ì¤¿ 8.0.4¤ËÂбþ¤·¤¿¡£ + £Ø£É£Í¤ËÂбþ¤·¤Æ¤¤¤ë¤¿¤á¡¢£Ö£Ê£Å¤ä£Ø£×£Î£Í£Ï¤¬ÆþÎϤ˻ÈÍÑ + ½ÐÍè¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¡£ + + (bug fix) ¥é¥¤¥Ö¥é¥ê¤Î¥µ¡¼¥Á»þ¤ËtkÍѤΥ饤¥Ö¥é¥ê¤ò¸«¤Ë¹Ô¤Ã¤Æ¤¤¤¿¤È¤¤¤¦ + ¤È¤ó¤Ç¤â¤Ê¤¤¥Ð¥°¤ò½¤Àµ¡£ + + Release TkStep8.0p2-1jp3 Feb.24, 1998. ¼ãë ½ã + + (bug fix) ¥³¥ó¥Ñ¥¤¥ë»þ¤ËENABLE_STEP ¤ò»ØÄꤹ¤ë¤³¤È¤Ç¥ê¥¹¥È¥Ü¥Ã¥¯¥¹Ãæ¤Î + ¡Ö ->¡× ¤È¤¤¤¦¥¹¥È¥í¡¼¥¯¤ò£Î£å£Ø£ÔÉ÷¤ÎÌð°õ¤ËÊѤ¨¤ëµ¡Ç½¤¬¤¢¤ë¤¬¡¢ + ¤³¤ì¤¬Æ°¤¤¤Æ¤Ê¤«¤Ã¤¿¤Î¤Ç½¤Àµ¡£ + + Release TkStep8.0p2-1jp2 Feb 02, 1998. ¼ãë ½ã + + (bug fix) ¸ýÀ¾¤µ¤ó¡Êjkuchi@mahoroba.or.jp¡Ë¤Î¤´»ØŦ¤Èµ®½Å¤Ê¥Ñ¥Ã¥Á¤Ë¤è¤ê + ¥Õ¥ì¡¼¥à¥¦¥£¥¸¥§¥Ã¥È¤Î¥¿¥¤¥È¥ë¤Ë¤ª¤¤¤ÆÆüËܸì¤Î»ÈÍѤ¬²Äǽ¤Ë¤Ê + ¤Ã¤¿¡£ + + + diff -r -c -P -x CVS ../tk8.0.5/unix/ClientWin.c ./unix/ClientWin.c *** ../tk8.0.5/unix/ClientWin.c Thu Jan 1 09:00:00 1970 --- ./unix/ClientWin.c Tue Aug 17 18:54:36 1999 *************** *** 0 **** --- 1,90 ---- + /* $XConsortium: ClientWin.c,v 1.4 94/04/17 20:15:50 rws Exp $ */ + + /* + + Copyright (c) 1989 X Consortium + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + Except as contained in this notice, the name of the X Consortium shall not be + used in advertising or otherwise to promote the sale, use or other dealings + in this Software without prior written authorization from the X Consortium. + + */ + + #include + #include + + static Window TryChildren(); + + /* Find a window with WM_STATE, else return win itself, as per ICCCM */ + + Window XmuClientWindow (dpy, win) + Display *dpy; + Window win; + { + Atom WM_STATE; + Atom type = None; + int format; + unsigned long nitems, after; + unsigned char *data; + Window inf; + + WM_STATE = XInternAtom(dpy, "WM_STATE", True); + if (!WM_STATE) + return win; + XGetWindowProperty(dpy, win, WM_STATE, 0, 0, False, AnyPropertyType, + &type, &format, &nitems, &after, &data); + if (type) + return win; + inf = TryChildren(dpy, win, WM_STATE); + if (!inf) + inf = win; + return inf; + } + + static + Window TryChildren (dpy, win, WM_STATE) + Display *dpy; + Window win; + Atom WM_STATE; + { + Window root, parent; + Window *children; + unsigned int nchildren; + unsigned int i; + Atom type = None; + int format; + unsigned long nitems, after; + unsigned char *data; + Window inf = 0; + + if (!XQueryTree(dpy, win, &root, &parent, &children, &nchildren)) + return 0; + for (i = 0; !inf && (i < nchildren); i++) { + XGetWindowProperty(dpy, children[i], WM_STATE, 0, 0, False, + AnyPropertyType, &type, &format, &nitems, + &after, &data); + if (type) + inf = children[i]; + } + for (i = 0; !inf && (i < nchildren); i++) + inf = TryChildren(dpy, children[i], WM_STATE); + if (children) XFree((char *)children); + return inf; + } diff -r -c -P -x CVS ../tk8.0.5/unix/ImakeCheck/Makefile ./unix/ImakeCheck/Makefile *** ../tk8.0.5/unix/ImakeCheck/Makefile Thu Jan 1 09:00:00 1970 --- ./unix/ImakeCheck/Makefile Sun Aug 22 20:19:05 1999 *************** *** 0 **** --- 1,702 ---- + # Makefile generated by imake - do not edit! + # $TOG: imake.c /main/97 1997/06/20 20:23:51 kaleb $ + + # ---------------------------------------------------------------------- + # Makefile generated from "Imake.tmpl" and + # $TOG: Imake.tmpl /main/245 1997/05/20 10:05:47 kaleb $ + # + # + # + # + # $XFree86: xc/config/cf/Imake.tmpl,v 3.32.2.11 1998/11/08 09:06:27 dawes Exp $ + # ---------------------------------------------------------------------- + + all:: + + .SUFFIXES: .i + + # $TOG: Imake.cf /main/28 1997/06/25 08:31:36 barstow $ + # $XFree86: xc/config/cf/Imake.cf,v 3.34.2.11 1998/12/22 11:23:01 hohndel Exp $ + + # ----------------------------------------------------------------------- + # site-specific configuration parameters that need to come before + # the platform-specific parameters - edit site.def to change + + # site: $XConsortium: site.def /main/revisionist/4 1996/12/31 08:02:07 kaleb $ + # site: $XFree86: xc/config/cf/site.def,v 3.17.2.1 1997/06/22 10:32:21 dawes Exp $ + + # $XFree86: xc/config/cf/xf86site.def,v 3.101.2.25 1998/11/08 09:06:29 dawes Exp $ + + # ---------------------------------------------------------------------- + # platform-specific configuration parameters - edit linux.cf to change + + # platform: $TOG: linux.cf /main/36 1997/06/16 22:21:03 kaleb $ + # platform: $XFree86: xc/config/cf/linux.cf,v 3.57.2.16 1998/11/08 11:21:49 hohndel Exp $ + + # operating system: Linux 2.0.36 i586 [ELF] (2.0.36) + # libc: (5.4.46) + # binutils: (28) + + # $XConsortium: lnxLib.rules /main/13 1996/09/28 16:11:01 rws $ + # $XFree86: xc/config/cf/lnxLib.rules,v 3.28.2.4 1998/12/18 11:56:08 dawes Exp $ + + # $XFree86: xc/config/cf/xfree86.cf,v 3.129.2.36 1998/11/07 04:42:24 dawes Exp $ + + # $XConsortium: xfree86.cf /main/34 1996/12/06 11:45:18 rws $ + + LINKKITDIR = $(USRLIBDIR)/Server + XF98LINKKITDIR = $(USRLIBDIR)/Server + + XF86SRC = $(SERVERSRC)/hw/xfree86 + XF86ACCELSRC = $(XF86SRC)/accel + XF86COMSRC = $(XF86SRC)/common + XF86CONFIGSRC = $(XF86COMSRC) + XF86HWSRC = $(XF86SRC)/common_hw + XF86OSSRC = $(XF86SRC)/os-support + VGADRIVERSRC = $(XF86SRC)/vga256/drivers + VGA16DRIVERSRC = $(XF86SRC)/vga16/drivers + VGA2DRIVERSRC = $(XF86SRC)/vga2/drivers + MONODRIVERSRC = $(XF86SRC)/mono/drivers + S3DRIVERSRC = $(XF86SRC)/accel/s3/drivers + S3VDRIVERSRC = $(XF86SRC)/accel/s3_virge/drivers + + XF68SRC = $(SERVERSRC)/hw/xfree68 + XF68COMSRC = $(XF68SRC)/common + XF68CONFIGSRC = $(XF68COMSRC) + XF68OSSRC = $(XF68SRC)/os-support + + XF98SRC = $(SERVERSRC)/hw/xfree98 + XF98ACCELSRC = $(XF98SRC)/accel + XF98COMSRC = $(XF98SRC)/common + XF98CONFIGSRC = $(XF98COMSRC) + XF98HWSRC = $(XF98SRC)/common_hw/generic + XF98HWNECSRC = $(XF98SRC)/common_hw/nec + XF98HWPWSKBSRC = $(XF98SRC)/common_hw/pwskb + XF98HWPWLBSRC = $(XF98SRC)/common_hw/pwlb + XF98HWGA968SRC = $(XF98SRC)/common_hw/ga968 + XF98OSSRC = $(XF98SRC)/os-support + XF98VGADRIVERSRC = $(XF98SRC)/vga256/drivers + XF98VGA16DRIVERSRC = $(XF98SRC)/vga16/drivers + XF98VGA2DRIVERSRC = $(XF98SRC)/vga2/drivers + XF98MONODRIVERSRC = $(XF98SRC)/mono/drivers + XF98NECS3DRIVERSRC = $(XF98SRC)/accel/s3nec/drivers + XF98PWSKBDRIVERSRC = $(XF98SRC)/accel/s3pwskb/drivers + XF98PWLBDRIVERSRC = $(XF98SRC)/accel/s3pwlb/drivers + XF98GA968DRIVERSRC = $(XF98SRC)/accel/s3ga968/drivers + + XFREE86DOCDIR = $(DOCDIR) + XFREE86PSDOCDIR = $(DOCPSDIR) + XFREE86HTMLDOCDIR = $(DOCHTMLDIR) + XFREE86JAPANESEDOCDIR = $(DOCDIR)/Japanese + + # $XConsortium: xf86.rules /main/9 1996/10/31 14:54:26 kaleb $ + # $XFree86: xc/config/cf/xf86.rules,v 3.16.2.1 1997/05/18 12:00:01 dawes Exp $ + + # ---------------------------------------------------------------------- + # site-specific configuration parameters that go after + # the platform-specific parameters - edit site.def to change + + # site: $XConsortium: site.def /main/revisionist/4 1996/12/31 08:02:07 kaleb $ + # site: $XFree86: xc/config/cf/site.def,v 3.17.2.1 1997/06/22 10:32:21 dawes Exp $ + + # --------------------------------------------------------------------- + # Imake rules for building libraries, programs, scripts, and data files + # rules: $TOG: Imake.rules /main/222 1997/07/17 20:04:40 kaleb $ + # rules: $XFree86: xc/config/cf/Imake.rules,v 3.33.2.10 1998/11/04 10:53:01 dawes Exp $ + + _NULLCMD_ = @ echo -n + + TKLIBNAME = + + TKLIBDIR = + + TCLLIBNAME = + + TCLIBDIR = + + PATHSEP = / + SHELL = /bin/sh + + TOP = . + CURRENT_DIR = . + + IMAKE = imake + DEPEND = gccmakedep + MKDIRHIER = mkdir -p + EXPORTLISTGEN = + CONFIGSRC = $(TOP)/config + IMAKESRC = $(CONFIGSRC)/imake + DEPENDSRC = $(CONFIGSRC)/util + + INCROOT = /usr/X11R6/include + USRLIBDIR = /usr/X11R6/lib + VARLIBDIR = /var/lib + SHLIBDIR = /usr/X11R6/lib + LINTLIBDIR = $(USRLIBDIR)/lint + MANPATH = /usr/X11R6/man + MANSOURCEPATH = $(MANPATH)/man + MANDIR = $(MANSOURCEPATH)1 + LIBMANDIR = $(MANSOURCEPATH)3 + FILEMANDIR = $(MANSOURCEPATH)5 + + AR = ar clq + BOOTSTRAPCFLAGS = + CC = gcc + AS = as + + .SUFFIXES: .cc + + CXX = c++ + CXXFILT = c++filt + CXXLIB = + CXXDEBUGFLAGS = -O2 -fno-strength-reduce + CXXDEPENDINCLUDES = + CXXEXTRA_DEFINES = + CXXEXTRA_INCLUDES = + CXXSTD_DEFINES = -Dlinux -D__i386__ -D_POSIX_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE -DX_LOCALE $(CXXPROJECT_DEFINES) + CXXOPTIONS = + CXXINCLUDES = $(INCLUDES) $(TOP_INCLUDES) $(CXXEXTRA_INCLUDES) + CXXDEFINES = $(CXXINCLUDES) $(CXXSTD_DEFINES) $(THREADS_CXXDEFINES) $(CXXEXTRA_DEFINES) $(DEFINES) + CXXFLAGS = $(CXXDEBUGFLAGS) $(CXXOPTIONS) $(THREADS_CXXFLAGS) $(CXXDEFINES) + + COMPRESS = compress + GZIPCMD = gzip + CPP = /lib/cpp $(STD_CPP_DEFINES) + PREPROCESSCMD = gcc -E $(STD_CPP_DEFINES) + INSTALL = install + INSTALLFLAGS = -c + LD = ld + LEX = flex -l + LEXLIB = -lfl + YACC = bison -y + CCYACC = bison -y + LINT = lint + LINTLIBFLAG = -C + LINTOPTS = -axz + LN = ln -s + MAKE = make + MV = mv -f + CP = cp + + RANLIB = ranlib + RANLIBINSTFLAGS = + + RM = rm -f + MANSUFFIX = 1x + LIBMANSUFFIX = 3x + FILEMANSUFFIX = 5x + TROFF = groff -Tps + NROFF = nroff + MSMACROS = -ms + MANMACROS = -man + TBL = tbl + EQN = eqn + NEQN = neqn + COL = col + COLFLAGS = -b + + DVIPS = dvips + LATEX = latex + + STD_INCLUDES = + STD_CPP_DEFINES = -traditional -Dlinux -D__i386__ -D_POSIX_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE -DX_LOCALE $(PROJECT_DEFINES) + STD_DEFINES = -Dlinux -D__i386__ -D_POSIX_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE -DX_LOCALE $(PROJECT_DEFINES) + EXTRA_LOAD_FLAGS = + EXTRA_LDOPTIONS = + EXTRA_LIBRARIES = + TAGS = ctags + + PARALLELMFLAGS = + + SHAREDCODEDEF = + SHLIBDEF = + + SHLIBLDFLAGS = -shared + + PICFLAGS = -fPIC + + CXXPICFLAGS = -fPIC + + PROTO_DEFINES = -DFUNCPROTO=15 -DNARROWPROTO + + INSTPGMFLAGS = -s + + INSTBINFLAGS = -m 0755 + INSTUIDFLAGS = -m 4711 + INSTLIBFLAGS = -m 0644 + INSTINCFLAGS = -m 0444 + INSTMANFLAGS = -m 0444 + INSTDATFLAGS = -m 0444 + INSTKMEMFLAGS = -m 4711 + + PROJECTROOT = /usr/X11R6 + + CDEBUGFLAGS = -O2 -fno-strength-reduce + CCOPTIONS = + + ALLINCLUDES = $(INCLUDES) $(EXTRA_INCLUDES) $(TOP_INCLUDES) $(STD_INCLUDES) + ALLDEFINES = $(ALLINCLUDES) $(STD_DEFINES) $(EXTRA_DEFINES) $(PROTO_DEFINES) $(THREADS_DEFINES) $(DEFINES) + CFLAGS = $(CDEBUGFLAGS) $(CCOPTIONS) $(THREADS_CFLAGS) $(ALLDEFINES) + LINTFLAGS = $(LINTOPTS) -DLINT $(ALLDEFINES) $(DEPEND_DEFINES) + LDPRELIB = -L$(USRLIBDIR) + LDPOSTLIB = + LDOPTIONS = $(CDEBUGFLAGS) $(CCOPTIONS) $(EXTRA_LDOPTIONS) $(THREADS_LDFLAGS) $(LOCAL_LDFLAGS) $(LDPRELIBS) + CXXLDOPTIONS = $(CXXDEBUGFLAGS) $(CXXOPTIONS) $(EXTRA_LDOPTIONS) $(THREADS_CXXLDFLAGS) $(LOCAL_LDFLAGS) $(LDPRELIBS) + + LDLIBS = $(LDPOSTLIBS) $(THREADS_LIBS) $(SYS_LIBRARIES) $(EXTRA_LIBRARIES) + + CCLINK = $(CC) + + CXXLINK = $(CXX) + + LDSTRIPFLAGS = -x + LDCOMBINEFLAGS = -r + DEPENDFLAGS = + + # Not sure this belongs here + TKLIBDIR = + TKINCDIR = + TKLIBNAME = + TKLIBRARY = -L$(TKLIBDIR) -l$(TKLIBNAME) + TCLLIBDIR = + TCLINCDIR = + TCLLIBNAME = + TCLLIBRARY = -L$(TCLLIBDIR) -l$(TCLLIBNAME) + + MACROFILE = linux.cf + RM_CMD = $(RM) + + IMAKE_DEFINES = + + IRULESRC = $(CONFIGDIR) + IMAKE_CMD = $(IMAKE) -DUseInstalled -I$(IRULESRC) $(IMAKE_DEFINES) + + ICONFIGFILES = $(IRULESRC)/Imake.tmpl $(IRULESRC)/X11.tmpl $(IRULESRC)/site.def $(IRULESRC)/$(MACROFILE) $(IRULESRC)/xfree86.cf $(IRULESRC)/xf86.rules $(IRULESRC)/xf86site.def $(IRULESRC)/host.def $(EXTRA_ICONFIGFILES) + + # $TOG: X11.rules /main/4 1997/04/30 15:23:24 kaleb $ + # + # + # + # $XFree86: xc/config/cf/X11.rules,v 1.1.1.1.2.3 1998/10/04 15:22:47 hohndel Exp $ + + # ---------------------------------------------------------------------- + # X Window System Build Parameters and Rules + # $TOG: X11.tmpl /main/292 1997/05/20 10:05:59 kaleb $ + # + # + # + # + # $XFree86: xc/config/cf/X11.tmpl,v 1.8.2.9 1998/12/30 10:04:09 dawes Exp $ + + CONNECTION_FLAGS = -DUNIXCONN -DTCPCONN -DHAS_STICKY_DIR_BIT + + # ----------------------------------------------------------------------- + # X Window System make variables; these need to be coordinated with rules + + XTOP = $(TOP) + BINDIR = /usr/X11R6/bin + BUILDINCROOT = $(TOP)/exports + BUILDINCDIR = $(BUILDINCROOT)/include + BUILDINCTOP = ../.. + BUILDLIBDIR = $(TOP)/exports/lib + BUILDLIBTOP = ../.. + BUILDBINDIR = $(TOP)/exports/bin + BUILDBINTOP = ../.. + XBUILDINCROOT = $(XTOP)/exports + XBUILDINCDIR = $(XBUILDINCROOT)/include/X11 + XBUILDINCTOP = ../../.. + XBUILDBINDIR = $(XBUILDINCROOT)/bin + INCDIR = $(INCROOT) + ADMDIR = /usr/adm + LIBDIR = $(USRLIBDIR)/X11 + TOP_X_INCLUDES = + + VARDIR = /var/X11 + + DOCDIR = $(LIBDIR)/doc + DOCHTMLDIR = $(DOCDIR)/html + DOCPSDIR = $(DOCDIR)/PostScript + FONTDIR = $(LIBDIR)/fonts + XINITDIR = $(LIBDIR)/xinit + XDMDIR = $(LIBDIR)/xdm + XDMVARDIR = $(VARLIBDIR)/xdm + TWMDIR = $(LIBDIR)/twm + XSMDIR = $(LIBDIR)/xsm + NLSDIR = $(LIBDIR)/nls + XLOCALEDIR = $(LIBDIR)/locale + PEXAPIDIR = $(LIBDIR)/PEX + LBXPROXYDIR = $(LIBDIR)/lbxproxy + PROXYMANAGERDIR = $(LIBDIR)/proxymngr + XPRINTDIR = $(LIBDIR) + XAPPLOADDIR = $(LIBDIR)/app-defaults + FONTCFLAGS = -t + + INSTAPPFLAGS = $(INSTDATFLAGS) + + RGB = rgb + FONTC = bdftopcf + MKFONTDIR = mkfontdir + + DOCUTILSRC = $(XTOP)/doc/util + CLIENTSRC = $(TOP)/clients + DEMOSRC = $(TOP)/demos + XDOCMACROS = $(DOCUTILSRC)/macros.t + XIDXMACROS = $(DOCUTILSRC)/indexmacros.t + PROGRAMSRC = $(TOP)/programs + LIBSRC = $(XTOP)/lib + FONTSRC = $(XTOP)/fonts + INCLUDESRC = $(BUILDINCROOT)/include + XINCLUDESRC = $(INCLUDESRC)/X11 + SERVERSRC = $(XTOP)/programs/Xserver + CONTRIBSRC = $(XTOP)/../contrib + UNSUPPORTEDSRC = $(XTOP)/unsupported + DOCSRC = $(XTOP)/doc + RGBSRC = $(XTOP)/programs/rgb + BDFTOPCFSRC = $(PROGRAMSRC)/bdftopcf + MKFONTDIRSRC = $(PROGRAMSRC)/mkfontdir + FONTSERVERSRC = $(PROGRAMSRC)/xfs + FONTINCSRC = $(XTOP)/include/fonts + EXTINCSRC = $(XTOP)/include/extensions + TRANSCOMMSRC = $(LIBSRC)/xtrans + TRANS_INCLUDES = -I$(TRANSCOMMSRC) + + XENVLIBDIR = $(USRLIBDIR) + CLIENTENVSETUP = LD_LIBRARY_PATH=$(XENVLIBDIR) + + # $XConsortium: lnxLib.tmpl,v 1.5 95/01/11 21:44:44 kaleb Exp $ + # $XFree86: xc/config/cf/lnxLib.tmpl,v 3.9 1996/02/24 04:32:52 dawes Exp $ + + XLIBSRC = $(LIBSRC)/X11 + + SOXLIBREV = 6.1 + DEPXONLYLIB = + XONLYLIB = -lX11 + + LINTXONLY = $(LINTLIBDIR)/llib-lX11.ln + + XLIBONLY = $(XONLYLIB) + + XEXTLIBSRC = $(LIBSRC)/Xext + + SOXEXTREV = 6.3 + DEPEXTENSIONLIB = + EXTENSIONLIB = -lXext + + LINTEXTENSION = $(LINTLIBDIR)/llib-lXext.ln + + LINTEXTENSIONLIB = $(LINTEXTENSION) + DEPXLIB = $(DEPEXTENSIONLIB) $(DEPXONLYLIB) + XLIB = $(EXTENSIONLIB) $(XONLYLIB) + LINTXLIB = $(LINTXONLYLIB) + + XSSLIBSRC = $(LIBSRC)/Xss + + DEPXSSLIB = $(USRLIBDIR)/libXss.a + XSSLIB = -lXss + + LINTXSS = $(LINTLIBDIR)/llib-lXss.ln + + XXF86MISCLIBSRC = $(LIBSRC)/Xxf86misc + + DEPXXF86MISCLIB = $(USRLIBDIR)/libXxf86misc.a + XXF86MISCLIB = -lXxf86misc + + LINTXXF86MISC = $(LINTLIBDIR)/llib-lXxf86misc.ln + + XXF86VMLIBSRC = $(LIBSRC)/Xxf86vm + + DEPXXF86VMLIB = $(USRLIBDIR)/libXxf86vm.a + XXF86VMLIB = -lXxf86vm + + LINTXXF86VM = $(LINTLIBDIR)/llib-lXxf86vm.ln + + XXF86DGALIBSRC = $(LIBSRC)/Xxf86dga + + DEPXXF86DGALIB = $(USRLIBDIR)/libXxf86dga.a + XXF86DGALIB = -lXxf86dga + + LINTXXF86DGA = $(LINTLIBDIR)/llib-lXxf86dga.ln + + XDPMSLIBSRC = $(LIBSRC)/Xdpms + + DEPXDPMSLIB = $(USRLIBDIR)/libXdpms.a + XDPMSLIB = -lXdpms + + LINTXDPMS = $(LINTLIBDIR)/llib-lXdpms.ln + + XAUTHSRC = $(LIBSRC)/Xau + + DEPXAUTHLIB = $(USRLIBDIR)/libXau.a + XAUTHLIB = -lXau + + LINTXAUTH = $(LINTLIBDIR)/llib-lXau.ln + + XDMCPLIBSRC = $(LIBSRC)/Xdmcp + + DEPXDMCPLIB = $(USRLIBDIR)/libXdmcp.a + XDMCPLIB = -lXdmcp + + LINTXDMCP = $(LINTLIBDIR)/llib-lXdmcp.ln + + XMUSRC = $(LIBSRC)/Xmu + + SOXMUREV = 6.0 + DEPXMULIB = + XMULIB = -lXmu + + LINTXMU = $(LINTLIBDIR)/llib-lXmu.ln + + OLDXLIBSRC = $(LIBSRC)/oldX + + DEPOLDXLIB = $(USRLIBDIR)/liboldX.a + OLDXLIB = -loldX + + LINTOLDX = $(LINTLIBDIR)/llib-loldX.ln + + XPLIBSRC = $(LIBSRC)/Xp + + SOXPREV = 6.2 + DEPXPLIB = + XPLIB = -lXp + + LINTXP = $(LINTLIBDIR)/llib-lXp.ln + + TOOLKITSRC = $(LIBSRC)/Xt + + SOXTREV = 6.0 + DEPXTOOLONLYLIB = + XTOOLONLYLIB = -lXt + + LINTXTOOLONLY = $(LINTLIBDIR)/llib-lXt.ln + + DEPXTOOLLIB = $(DEPXTOOLONLYLIB) $(DEPSMLIB) $(DEPICELIB) + XTOOLLIB = $(XTOOLONLYLIB) $(SMLIB) $(ICELIB) + LINTXTOOLLIB = $(LINTXTOOLONLYLIB) + + XALIBSRC = $(LIBSRC)/Xa + + SOXAREV = 1.0 + DEPXALIB = + XALIB = -lXa + + LINTXA = $(LINTLIBDIR)/llib-lXa.ln + + AWIDGETSRC = $(LIBSRC)/Xaw + + SOXAWREV = 6.1 + DEPXAWLIB = + XAWLIB = -lXaw + + LINTXAW = $(LINTLIBDIR)/llib-lXaw.ln + + XILIBSRC = $(LIBSRC)/Xi + + SOXINPUTREV = 6.0 + DEPXILIB = + XILIB = -lXi + + LINTXI = $(LINTLIBDIR)/llib-lXi.ln + + XTESTLIBSRC = $(LIBSRC)/Xtst + + SOXTESTREV = 6.1 + DEPXTESTLIB = + XTESTLIB = -lXtst + + LINTXTEST = $(LINTLIBDIR)/llib-lXtst.ln + + PEXLIBSRC = $(LIBSRC)/PEX5 + + SOPEXREV = 6.0 + DEPPEXLIB = + PEXLIB = -lPEX5 + + LINTPEX = $(LINTLIBDIR)/llib-lPEX5.ln + + XIELIBSRC = $(LIBSRC)/XIE + + SOXIEREV = 6.0 + DEPXIELIB = + XIELIB = -lXIE + + LINTXIE = $(LINTLIBDIR)/llib-lXIE.ln + + PHIGSLIBSRC = $(LIBSRC)/PHIGS + + DEPPHIGSLIB = $(USRLIBDIR)/libphigs.a + PHIGSLIB = -lphigs + + LINTPHIGS = $(LINTLIBDIR)/llib-lphigs.ln + + DEPXBSDLIB = $(USRLIBDIR)/libXbsd.a + XBSDLIB = -lXbsd + + LINTXBSD = $(LINTLIBDIR)/llib-lXbsd.ln + + ICESRC = $(LIBSRC)/ICE + + SOICEREV = 6.3 + DEPICELIB = + ICELIB = -lICE + + LINTICE = $(LINTLIBDIR)/llib-lICE.ln + + SMSRC = $(LIBSRC)/SM + + SOSMREV = 6.0 + DEPSMLIB = + SMLIB = -lSM + + LINTSM = $(LINTLIBDIR)/llib-lSM.ln + + XKEYSRC = $(LIBSRC)/Xkey + + SOXKEYREV = 6.0 + DEPXKEYLIB = + XKEYLIB = -lXkey + + LINTXKEY = $(LINTLIBDIR)/llib-lXkey.ln + + FSLIBSRC = $(LIBSRC)/FS + + DEPFSLIB = $(USRLIBDIR)/libFS.a + FSLIB = -lFS + + LINTFS = $(LINTLIBDIR)/llib-lFS.ln + + FONTLIBSRC = $(LIBSRC)/font + + DEPFONTLIB = $(USRLIBDIR)/libfont.a + FONTLIB = -lfont + + LINTFONT = $(LINTLIBDIR)/llib-lfont.ln + + XPMLIBSRC = $(LIBSRC)/Xpm + + DEPXPMLIB = $(USRLIBDIR)/libXpm.a + XPMLIB = -lXpm + + LINTXPM = $(LINTLIBDIR)/llib-lXpm.ln + + XKBFILELIBSRC = $(LIBSRC)/xkbfile + + DEPXKBFILELIB = $(USRLIBDIR)/libxkbfile.a + XKBFILELIB = -lxkbfile + + LINTXKBFILE = $(LINTLIBDIR)/llib-lxkbfile.ln + + XKBCOMPCMD = xkbcomp + + XKBUILIBSRC = $(LIBSRC)/xkbui + + DEPXKBUILIB = $(USRLIBDIR)/libxkbui.a + XKBUILIB = -lxkbui + + LINTXKBUI = $(LINTLIBDIR)/llib-lxkbui.ln + + DEPLIBS = $(DEPXAWLIB) $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXLIB) + + DEPLIBS1 = $(DEPLIBS) + DEPLIBS2 = $(DEPLIBS) + DEPLIBS3 = $(DEPLIBS) + DEPLIBS4 = $(DEPLIBS) + DEPLIBS5 = $(DEPLIBS) + DEPLIBS6 = $(DEPLIBS) + DEPLIBS7 = $(DEPLIBS) + DEPLIBS8 = $(DEPLIBS) + DEPLIBS9 = $(DEPLIBS) + DEPLIBS10 = $(DEPLIBS) + + XMULIBONLY = -lXmu + XMULIB = $(XMULIBONLY) $(XTOOLLIB) $(XLIB) + + CONFIGDIR = $(LIBDIR)/config + + USRLIBDIRPATH = $(USRLIBDIR) + LDPRELIBS = -L$(USRLIBDIR) + LDPOSTLIBS = + TOP_INCLUDES = -I$(INCROOT) $(TOP_X_INCLUDES) + PROJECT_DEFINES = + + CXXPROJECT_DEFINES = + + # ---------------------------------------------------------------------- + # start of Imakefile + + SRCS = dummy.c + OBJS = dummy.o + + PROGRAM = dummy + + all:: dummy + + dummy: $(OBJS) $(DEPLIBS) + $(RM) $@ + $(CCLINK) -o $@ $(LDOPTIONS) $(OBJS) $(LOCAL_LIBRARIES) $(LDLIBS) $(EXTRA_LOAD_FLAGS) + + install:: dummy + @if [ -d $(DESTDIR)$(BINDIR) ]; then set +x; \ + else (set -x; $(MKDIRHIER) $(DESTDIR)$(BINDIR)); fi + $(INSTALL) $(INSTALLFLAGS) $(INSTPGMFLAGS) dummy $(DESTDIR)$(BINDIR)/dummy + + install.man:: dummy.man + @if [ -d $(DESTDIR)$(MANDIR) ]; then set +x; \ + else (set -x; $(MKDIRHIER) $(DESTDIR)$(MANDIR)); fi + $(INSTALL) $(INSTALLFLAGS) $(INSTMANFLAGS) dummy.man $(DESTDIR)$(MANDIR)/dummy.$(MANSUFFIX) + + depend:: + $(DEPEND) $(DEPENDFLAGS) -- $(ALLDEFINES) $(DEPEND_DEFINES) -- $(SRCS) + + lint: + $(LINT) $(LINTFLAGS) $(SRCS) $(LINTLIBS) + lint1: + $(LINT) $(LINTFLAGS) $(FILE) $(LINTLIBS) + + clean:: + $(RM) dummy + + # ---------------------------------------------------------------------- + # common rules for all Makefiles - do not edit + + .c.i: + $(RM) $@ + $(CC) -E $(CFLAGS) $(_NOOP_) $*.c > $@ + + emptyrule:: + + clean:: + $(RM) *.CKP *.ln *.BAK *.bak *.o core errs ,* *~ *.a .emacs_* tags TAGS make.log MakeOut "#"* + + Makefile:: + -@if [ -f Makefile ]; then set -x; \ + $(RM) Makefile.bak; $(MV) Makefile Makefile.bak; \ + else exit 0; fi + $(IMAKE_CMD) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT_DIR) + + tags:: + $(TAGS) -w *.[ch] + $(TAGS) -xw *.[ch] > TAGS + + man_keywords:: + + # ---------------------------------------------------------------------- + # empty rules for directories that do not have SUBDIRS - do not edit + + install:: + @echo "install in $(CURRENT_DIR) done" + + install.man:: + @echo "install.man in $(CURRENT_DIR) done" + + install.linkkit:: + @echo "install.linkkit in $(CURRENT_DIR) done" + + Makefiles:: + + includes:: + + depend:: + + # ---------------------------------------------------------------------- + # dependencies generated by makedepend + diff -r -c -P -x CVS ../tk8.0.5/unix/Makefile.in ./unix/Makefile.in *** ../tk8.0.5/unix/Makefile.in Tue Aug 17 18:48:57 1999 --- ./unix/Makefile.in Wed Aug 18 13:30:01 1999 *************** *** 38,44 **** # Directory from which applications will reference the library of Tcl # scripts (note: you can set the TK_LIBRARY environment variable at # run-time to override the compiled-in location): ! TK_LIBRARY = $(prefix)/lib/tk$(VERSION) # Path name to use when installing library scripts: SCRIPT_INSTALL_DIR = $(INSTALL_ROOT)$(TK_LIBRARY) --- 38,44 ---- # Directory from which applications will reference the library of Tcl # scripts (note: you can set the TK_LIBRARY environment variable at # run-time to override the compiled-in location): ! TK_LIBRARY = $(prefix)/lib/tk@STEP@$(VERSION) # Path name to use when installing library scripts: SCRIPT_INSTALL_DIR = $(INSTALL_ROOT)$(TK_LIBRARY) *************** *** 49,58 **** # Path to use at runtime to refer to LIB_INSTALL_DIR: LIB_RUNTIME_DIR = $(exec_prefix)/lib ! # Directory in which to install the program wish: BIN_INSTALL_DIR = $(INSTALL_ROOT)$(exec_prefix)/bin ! # Directory from which the program wish should be referenced by scripts: BIN_DIR = $(exec_prefix)/bin # Directory in which to install the include file tk.h: --- 49,58 ---- # Path to use at runtime to refer to LIB_INSTALL_DIR: LIB_RUNTIME_DIR = $(exec_prefix)/lib ! # Directory in which to install the program wishstep: BIN_INSTALL_DIR = $(INSTALL_ROOT)$(exec_prefix)/bin ! # Directory from which the program wishstep should be referenced by scripts: BIN_DIR = $(exec_prefix)/bin # Directory in which to install the include file tk.h: *************** *** 61,67 **** # Top-level directory for manual entries: MAN_INSTALL_DIR = $(INSTALL_ROOT)$(prefix)/man ! # Directory in which to install manual entry for wish: MAN1_INSTALL_DIR = $(MAN_INSTALL_DIR)/man1 # Directory in which to install manual entries for Tk's C library --- 61,67 ---- # Top-level directory for manual entries: MAN_INSTALL_DIR = $(INSTALL_ROOT)$(prefix)/man ! # Directory in which to install manual entry for wishstep: MAN1_INSTALL_DIR = $(MAN_INSTALL_DIR)/man1 # Directory in which to install manual entries for Tk's C library *************** *** 97,103 **** #CFLAGS = $(CFLAGS_DEBUG) #CFLAGS = $(CFLAGS_OPTIMIZE) #CFLAGS = $(CFLAGS_DEBUG) $(CFLAGS_OPTIMIZE) ! CFLAGS = $(@CFLAGS_DEFAULT@) # A "-I" switch that can be used when compiling to make all of the # X11 include files accessible (the configure script will try to --- 97,104 ---- #CFLAGS = $(CFLAGS_DEBUG) #CFLAGS = $(CFLAGS_OPTIMIZE) #CFLAGS = $(CFLAGS_DEBUG) $(CFLAGS_OPTIMIZE) ! #CFLAGS = $(@CFLAGS_DEFAULT@) ! CFLAGS = $(CFLAGS_OPTIMIZE) @ENABLE_XPM@ @ENABLE_TIFF@ @ENABLE_DND@ @ENABLE_STEP@ # A "-I" switch that can be used when compiling to make all of the # X11 include files accessible (the configure script will try to *************** *** 112,118 **** # Libraries to use when linking. This definition is determined by the # configure script. ! LIBS = @TCL_BUILD_LIB_SPEC@ @LIBS@ $(X11_LIB_SWITCHES) @DL_LIBS@ @MATH_LIBS@ -lc # To turn off the security checks that disallow incoming sends when # the X server appears to be insecure, reverse the comments on the --- 113,119 ---- # Libraries to use when linking. This definition is determined by the # configure script. ! LIBS = @TCL_BUILD_LIB_SPEC@ @LIBS@ $(X11_LIB_SWITCHES) @DL_LIBS@ @MATH_LIBS@ @EXTRA_LIBS@ # To turn off the security checks that disallow incoming sends when # the X server appears to be insecure, reverse the comments on the *************** *** 244,256 **** tkCanvLine.o tkCanvPoly.o tkCanvPs.o tkCanvText.o \ tkCanvUtil.o tkCanvWind.o tkRectOval.o tkTrig.o ! IMAGEOBJS = tkImage.o tkImgBmap.o tkImgGIF.o tkImgPPM.o tkImgPhoto.o TEXTOBJS = tkText.o tkTextBTree.o tkTextDisp.o tkTextImage.o tkTextIndex.o \ tkTextMark.o tkTextTag.o tkTextWind.o UNIXOBJS = tkUnix.o tkUnix3d.o tkUnixButton.o tkUnixColor.o tkUnixCursor.o \ ! tkUnixDialog.o tkUnixDraw.o \ tkUnixEmbed.o tkUnixEvent.o tkUnixFocus.o tkUnixFont.o tkUnixInit.o \ tkUnixMenu.o tkUnixMenubu.o tkUnixScale.o tkUnixScrlbr.o \ tkUnixSelect.o tkUnixSend.o tkUnixWm.o tkUnixXId.o --- 245,258 ---- tkCanvLine.o tkCanvPoly.o tkCanvPs.o tkCanvText.o \ tkCanvUtil.o tkCanvWind.o tkRectOval.o tkTrig.o ! IMAGEOBJS = tkImage.o tkImgBmap.o tkImgGIF.o tkImgPPM.o \ ! @IMAGE_OBJ@ tkImgPhoto.o TEXTOBJS = tkText.o tkTextBTree.o tkTextDisp.o tkTextImage.o tkTextIndex.o \ tkTextMark.o tkTextTag.o tkTextWind.o UNIXOBJS = tkUnix.o tkUnix3d.o tkUnixButton.o tkUnixColor.o tkUnixCursor.o \ ! tkUnixDialog.o tkUnixDraw.o @OFFIX_OBJ@ \ tkUnixEmbed.o tkUnixEvent.o tkUnixFocus.o tkUnixFont.o tkUnixInit.o \ tkUnixMenu.o tkUnixMenubu.o tkUnixScale.o tkUnixScrlbr.o \ tkUnixSelect.o tkUnixSend.o tkUnixWm.o tkUnixXId.o *************** *** 293,298 **** --- 295,301 ---- $(GENERIC_DIR)/tkCanvWind.c $(GENERIC_DIR)/tkRectOval.c \ $(GENERIC_DIR)/tkTrig.c $(GENERIC_DIR)/tkImage.c \ $(GENERIC_DIR)/tkImgBmap.c $(GENERIC_DIR)/tkImgGIF.c \ + $(GENERIC_DIR)/tkImgXPM.c $(GENERIC_DIR)/tkImgTIFF.c \ $(GENERIC_DIR)/tkImgPPM.c \ $(GENERIC_DIR)/tkImgPhoto.c $(GENERIC_DIR)/tkText.c \ $(GENERIC_DIR)/tkTextBTree.c $(GENERIC_DIR)/tkTextDisp.c \ *************** *** 304,309 **** --- 307,313 ---- $(UNIX_DIR)/tkAppInit.c $(UNIX_DIR)/tkKinput2.c \ $(UNIX_DIR)/tkUnix.c $(UNIX_DIR)/tkUnix3d.c \ $(UNIX_DIR)/tkUnixButton.c $(UNIX_DIR)/tkUnixColor.c \ + $(UNIX_DIR)/tkDragDrop.c $(UNIX_DIR)/ClientWin.c \ $(UNIX_DIR)/tkUnixCursor.c \ $(UNIX_DIR)/tkUnixDialog.c $(UNIX_DIR)/tkUnixDraw.c \ $(UNIX_DIR)/tkUnixEmbed.c $(UNIX_DIR)/tkUnixEvent.c \ *************** *** 320,328 **** default.h ks_names.h tkPatch.h tk.h tkButton.h tkCanvas.h tkInt.h \ tkPort.h tkScrollbar.h tkText.h ! DEMOPROGS = browse hello ixset rmt rolodex square tcolor timer widget ! all: wish # The following target is configured by autoconf to generate either # a shared library or non-shared library for Tk. --- 324,333 ---- default.h ks_names.h tkPatch.h tk.h tkButton.h tkCanvas.h tkInt.h \ tkPort.h tkScrollbar.h tkText.h ! DEMOPROGS = browse hello ixset rmt rolodex square tcolor timer widget \ ! dragtest droptest imagedrop tcolor2 tfontsel ! all: wish@STEP@ # The following target is configured by autoconf to generate either # a shared library or non-shared library for Tk. *************** *** 341,349 **** objs: ${OBJS} ! wish: $(WISH_OBJS) $(TK_LIB_FILE) ${PURECOM} ${CC} @LD_FLAGS@ ${CFLAGS} $(WISH_OBJS) @TK_BUILD_LIB_SPEC@ $(LIBS) \ ! $(TK_CC_SEARCH_FLAGS) -o wish tktest: $(TKTEST_OBJS) $(TK_LIB_FILE) ${PURECOM} ${CC} @LD_FLAGS@ ${CFLAGS} $(TKTEST_OBJS) @TK_BUILD_LIB_SPEC@ $(LIBS) \ --- 346,354 ---- objs: ${OBJS} ! wish@STEP@: $(WISH_OBJS) $(TK_LIB_FILE) ${PURECOM} ${CC} @LD_FLAGS@ ${CFLAGS} $(WISH_OBJS) @TK_BUILD_LIB_SPEC@ $(LIBS) \ ! $(TK_CC_SEARCH_FLAGS) -o wish@STEP@ tktest: $(TKTEST_OBJS) $(TK_LIB_FILE) ${PURECOM} ${CC} @LD_FLAGS@ ${CFLAGS} $(TKTEST_OBJS) @TK_BUILD_LIB_SPEC@ $(LIBS) \ *************** *** 385,391 **** # some ranlibs write to current directory, and this might not always be # possible (e.g. if installing as root). ! install-binaries: $(TK_LIB_FILE) wish @for i in $(LIB_INSTALL_DIR) $(BIN_INSTALL_DIR) ; \ do \ if [ ! -d $$i ] ; then \ --- 390,396 ---- # some ranlibs write to current directory, and this might not always be # possible (e.g. if installing as root). ! install-binaries: $(TK_LIB_FILE) wish@STEP@ @for i in $(LIB_INSTALL_DIR) $(BIN_INSTALL_DIR) ; \ do \ if [ ! -d $$i ] ; then \ *************** *** 399,408 **** @$(INSTALL_DATA) $(TK_LIB_FILE) $(LIB_INSTALL_DIR)/$(TK_LIB_FILE) @(cd $(LIB_INSTALL_DIR); $(RANLIB) $(TK_LIB_FILE)) @chmod 555 $(LIB_INSTALL_DIR)/$(TK_LIB_FILE) ! @echo "Installing wish" ! @$(INSTALL_PROGRAM) wish $(BIN_INSTALL_DIR)/wish$(VERSION) ! @echo "Installing tkConfig.sh" ! @$(INSTALL_DATA) tkConfig.sh $(LIB_INSTALL_DIR)/tkConfig.sh install-libraries: @for i in $(INSTALL_ROOT)$(prefix)/lib $(INCLUDE_INSTALL_DIR) \ --- 404,413 ---- @$(INSTALL_DATA) $(TK_LIB_FILE) $(LIB_INSTALL_DIR)/$(TK_LIB_FILE) @(cd $(LIB_INSTALL_DIR); $(RANLIB) $(TK_LIB_FILE)) @chmod 555 $(LIB_INSTALL_DIR)/$(TK_LIB_FILE) ! @echo "Installing wish@STEP@" ! @$(INSTALL_PROGRAM) wish@STEP@ $(BIN_INSTALL_DIR)/wish@STEP@$(VERSION) ! @echo "Installing tk@STEP@Config.sh" ! @$(INSTALL_DATA) tk@STEP@Config.sh $(LIB_INSTALL_DIR)/tk@STEP@Config.sh install-libraries: @for i in $(INSTALL_ROOT)$(prefix)/lib $(INCLUDE_INSTALL_DIR) \ *************** *** 415,423 **** else true; \ fi; \ done; ! @echo "Installing tk.h" ! @$(INSTALL_DATA) $(GENERIC_DIR)/tk.h $(INCLUDE_INSTALL_DIR)/tk.h ! for i in $(SRC_DIR)/library/*.tcl $(SRC_DIR)/library/tclIndex $(SRC_DIR)/library/prolog.ps $(UNIX_DIR)/tkAppInit.c; \ do \ echo "Installing $$i"; \ $(INSTALL_DATA) $$i $(SCRIPT_INSTALL_DIR); \ --- 420,428 ---- else true; \ fi; \ done; ! @echo "Installing tk@STEP@.h" ! @$(INSTALL_DATA) $(GENERIC_DIR)/tk.h $(INCLUDE_INSTALL_DIR)/tk@STEP@.h ! for i in $(SRC_DIR)/library/*.tcl $(SRC_DIR)/library/*.xbm $(SRC_DIR)/library/tclIndex $(SRC_DIR)/library/prolog.ps $(UNIX_DIR)/tkAppInit.c; \ do \ echo "Installing $$i"; \ $(INSTALL_DATA) $$i $(SCRIPT_INSTALL_DIR); \ *************** *** 446,452 **** do \ if [ -f $$i ] ; then \ echo "Installing $$i"; \ ! sed -e '3 s|exec wish|exec wish$(VERSION)|' \ $$i > $(SCRIPT_INSTALL_DIR)/demos/`basename $$i`; \ fi; \ done; --- 451,457 ---- do \ if [ -f $$i ] ; then \ echo "Installing $$i"; \ ! sed -e '3 s:exec \(wish\|wish@STEP@\):exec wish@STEP@:' \ $$i > $(SCRIPT_INSTALL_DIR)/demos/`basename $$i`; \ fi; \ done; *************** *** 477,483 **** do \ if [ -f $$i ] ; then \ echo "Installing $$i"; \ ! sed -e '3 s|exec wish|exec wish$(VERSION)|' \ $$i > $(SCRIPT_INSTALL_DIR)/demos.jp/`basename $$i`; \ fi; \ done; --- 482,488 ---- do \ if [ -f $$i ] ; then \ echo "Installing $$i"; \ ! sed -e '3 s:exec \(wish\|wish@STEP@\):exec wish@STEP@:' \ $$i > $(SCRIPT_INSTALL_DIR)/demos.jp/`basename $$i`; \ fi; \ done; *************** *** 532,538 **** clean: rm -f *.a *.o libtk* core errs *~ \#* TAGS *.E a.out errors \ ! tktest wish config.info lib.exp distclean: clean rm -f Makefile config.status config.cache config.log tkConfig.sh \ --- 537,543 ---- clean: rm -f *.a *.o libtk* core errs *~ \#* TAGS *.E a.out errors \ ! tktest wishstep config.info lib.exp distclean: clean rm -f Makefile config.status config.cache config.log tkConfig.sh \ *************** *** 738,743 **** --- 743,754 ---- tkImgGIF.o: $(GENERIC_DIR)/tkImgGIF.c $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkImgGIF.c + tkImgTIFF.o: $(GENERIC_DIR)/tkImgTIFF.c + $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkImgTIFF.c + + tkImgXPM.o: $(GENERIC_DIR)/tkImgXPM.c + $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkImgXPM.c + tkImgPPM.o: $(GENERIC_DIR)/tkImgPPM.c $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkImgPPM.c *************** *** 774,779 **** --- 785,796 ---- tkUnix.o: $(UNIX_DIR)/tkUnix.c $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tkUnix.c + tkDragdrop.o: $(UNIX_DIR)/tkDragdrop.c + $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tkDragdrop.c + + ClientWin.o: $(UNIX_DIR)/ClientWin.c + $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/ClientWin.c + tkUnix3d.o: $(UNIX_DIR)/tkUnix3d.c $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tkUnix3d.c *************** *** 875,882 **** # DISTROOT = /tmp/dist ! DISTNAME = tk@TK_VERSION@@TK_PATCH_LEVEL@ ! ZIPNAME = tk@TK_MAJOR_VERSION@@TK_MINOR_VERSION@@TK_PATCH_LEVEL@.zip DISTDIR = $(DISTROOT)/$(DISTNAME) TCLDIR = @TCL_SRC_DIR@ $(UNIX_DIR)/configure: $(UNIX_DIR)/configure.in --- 892,899 ---- # DISTROOT = /tmp/dist ! DISTNAME = tk@STEP@@TK_VERSION@@TK_PATCH_LEVEL@ ! ZIPNAME = tk@STEP@@TK_MAJOR_VERSION@@TK_MINOR_VERSION@@TK_PATCH_LEVEL@.zip DISTDIR = $(DISTROOT)/$(DISTNAME) TCLDIR = @TCL_SRC_DIR@ $(UNIX_DIR)/configure: $(UNIX_DIR)/configure.in *************** *** 961,966 **** --- 978,986 ---- $(TOP_DIR)/library/demos/tcolor \ $(TOP_DIR)/library/demos/timer \ $(TOP_DIR)/library/demos/widget \ + $(TOP_DIR)/library/demos/dragtest \ + $(TOP_DIR)/library/demos/droptest \ + $(TOP_DIR)/library/demos/imagedrop \ $(TOP_DIR)/library/demos/README \ $(TOP_DIR)/license.terms $(DISTDIR)/library/demos mkdir $(DISTDIR)/library/demos/images *************** *** 1078,1086 **** exec_prefix=$(DISTDIR)/SUNWtcl/$(TCLVERSION)/`arch` mkdir -p $(DISTDIR)/SUNWtcl/$(TCLVERSION)/bin sed -e "s/TCLVERSION/$(TCLVERSION)/g" \ ! -e "s/TKVERSION/$(VERSION)/g" < $(UNIX_DIR)/wish.sh \ ! > $(DISTDIR)/SUNWtcl/$(TCLVERSION)/bin/wish$(VERSION) ! chmod 755 $(DISTDIR)/SUNWtcl/$(TCLVERSION)/bin/wish$(VERSION) # # Build and install the architecture specific files in the dist directory. --- 1098,1106 ---- exec_prefix=$(DISTDIR)/SUNWtcl/$(TCLVERSION)/`arch` mkdir -p $(DISTDIR)/SUNWtcl/$(TCLVERSION)/bin sed -e "s/TCLVERSION/$(TCLVERSION)/g" \ ! -e "s/TKVERSION/$(VERSION)/g" < $(UNIX_DIR)/wishstep.sh \ ! > $(DISTDIR)/SUNWtcl/$(TCLVERSION)/bin/wishstep$(VERSION) ! chmod 755 $(DISTDIR)/SUNWtcl/$(TCLVERSION)/bin/wishstep$(VERSION) # # Build and install the architecture specific files in the dist directory. diff -r -c -P -x CVS ../tk8.0.5/unix/configure ./unix/configure *** ../tk8.0.5/unix/configure Tue Aug 17 18:48:57 1999 --- ./unix/configure Wed Aug 18 12:30:18 1999 *************** *** 32,38 **** --- 32,50 ---- ac_help="$ac_help --with-x use the X Window System" ac_help="$ac_help + --enable-replace build tkstep with normal tk names" + ac_help="$ac_help --enable-shared build libtk as a shared library" + ac_help="$ac_help + --with-optimize=OPT set CFLAG optimizations to OPT (default -O)" + ac_help="$ac_help + --enable-tiff build with TIFF image format support " + ac_help="$ac_help + --enable-xpm build with XPM image format support " + ac_help="$ac_help + --enable-dnd build with OffiX Drag'n'Drop support " + ac_help="$ac_help + --enable-step build with nextified style " # Initialize some variables set by options. # The variables have the same names as the options, with *************** *** 924,930 **** withval="$with_tcl" TCL_BIN_DIR=$withval else ! TCL_BIN_DIR=`cd ../../tcl8.0${TK_PATCH_LEVEL}jp/unix; pwd` fi if test ! -d $TCL_BIN_DIR; then --- 936,942 ---- withval="$with_tcl" TCL_BIN_DIR=$withval else ! TCL_BIN_DIR=`cd ../../tcl8.0${TK_PATCH_LEVEL}/unix; pwd` fi if test ! -d $TCL_BIN_DIR; then *************** *** 2784,2789 **** --- 2796,2817 ---- # building libtk as a shared library instead of a static library. #-------------------------------------------------------------------- + # Check whether --enable-replace or --disable-replace was given. + if test "${enable_replace+set}" = set; then + enableval="$enable_replace" + ok=$enableval + else + ok=no + fi + + if test "$ok" = "yes"; then + echo "Using normal tk names" + STEP="" + else + STEP="step" + fi + + # Check whether --enable-shared or --disable-shared was given. if test "${enable_shared+set}" = set; then enableval="$enable_shared" *************** *** 2795,2807 **** if test "$ok" = "yes" -a "${SHLIB_SUFFIX}" != ""; then TK_SHARED_BUILD=1 TK_SHLIB_CFLAGS="${SHLIB_CFLAGS}" ! TK_LIB_FILE=libtk${TCL_SHARED_LIB_SUFFIX} MAKE_LIB="\${SHLIB_LD} -o \${TK_LIB_FILE} \${OBJS} \$(TK_LD_SEARCH_FLAGS) ${SHLIB_LD_LIBS}" RANLIB=":" else TK_SHARED_BUILD=0 TK_SHLIB_CFLAGS="" ! TK_LIB_FILE=libtk${TCL_UNSHARED_LIB_SUFFIX} MAKE_LIB="ar cr \${TK_LIB_FILE} \${OBJS}" fi --- 2823,2835 ---- if test "$ok" = "yes" -a "${SHLIB_SUFFIX}" != ""; then TK_SHARED_BUILD=1 TK_SHLIB_CFLAGS="${SHLIB_CFLAGS}" ! eval "TK_LIB_FILE=libtk${STEP}${TCL_SHARED_LIB_SUFFIX}" MAKE_LIB="\${SHLIB_LD} -o \${TK_LIB_FILE} \${OBJS} \$(TK_LD_SEARCH_FLAGS) ${SHLIB_LD_LIBS}" RANLIB=":" else TK_SHARED_BUILD=0 TK_SHLIB_CFLAGS="" ! eval "TK_LIB_FILE=libtk${STEP}${TCL_UNSHARED_LIB_SUFFIX}" MAKE_LIB="ar cr \${TK_LIB_FILE} \${OBJS}" fi *************** *** 2814,2826 **** # up the Tcl library. if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then ! TK_LIB_FLAG="-ltk${VERSION}\${TK_DBGX}" else ! TK_LIB_FLAG="-ltk`echo ${VERSION} | tr -d .`\${TK_DBGX}" fi TK_BUILD_LIB_SPEC="-L`pwd` ${TK_LIB_FLAG}" TK_LIB_SPEC="-L${exec_prefix}/lib ${TK_LIB_FLAG}" --- 2842,2947 ---- # up the Tcl library. if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then ! TK_LIB_FLAG="-ltk${STEP}${VERSION}\${TK_DBGX}" else ! TK_LIB_FLAG="-ltk${STEP}`echo ${VERSION} | tr -d .`\${TK_DBGX}" fi TK_BUILD_LIB_SPEC="-L`pwd` ${TK_LIB_FLAG}" TK_LIB_SPEC="-L${exec_prefix}/lib ${TK_LIB_FLAG}" + #---------------------------------------------------------------- + # check for TkStep options + # Copyright (c) 1997 by Oliver Graf + #---------------------------------------------------------------- + + WITH_OPT="" + EXTRA_LIBS="" + IMAGE_OBJ="" + OFFIX_OBJ="" + + # Check whether --with-optimize or --without-optimize was given. + if test "${with_optimize+set}" = set; then + withval="$with_optimize" + WITH_OPT=$withval + else + WITH_OPT="-O" + fi + + + # Check whether --enable-tiff or --disable-tiff was given. + if test "${enable_tiff+set}" = set; then + enableval="$enable_tiff" + ok=$enableval + else + ok=no + fi + + if test "$ok" = "yes" ; then + ENABLE_TIFF="-DENABLE_TIFF" + EXTRA_LIBS="$EXTRA_LIBS -ltiff -ljpeg -lz" + IMAGE_OBJ="$IMAGE_OBJ tkImgTIFF.o" + else + ENABLE_TIFF="" + fi + + # Check whether --enable-xpm or --disable-xpm was given. + if test "${enable_xpm+set}" = set; then + enableval="$enable_xpm" + ok=$enableval + else + ok=no + fi + + if test "$ok" = "yes" ; then + ENABLE_XPM="-DENABLE_XPM" + EXTRA_LIBS="$EXTRA_LIBS -lXpm" + IMAGE_OBJ="$IMAGE_OBJ tkImgXPM.o" + else + ENABLE_XPM="" + fi + + # Check whether --enable-dnd or --disable-dnd was given. + if test "${enable_dnd+set}" = set; then + enableval="$enable_dnd" + ok=$enableval + else + ok=no + fi + + if test "$ok" = "yes" ; then + ENABLE_DND="-DENABLE_DND" + OFFIX_OBJ="$OFFIX_OBJ tkDragdrop.o ClientWin.o" + else + ENABLE_DND="" + fi + + # Check whether --enable-step or --disable-step was given. + if test "${enable_step+set}" = set; then + enableval="$enable_step" + ok=$enableval + else + ok=no + fi + + if test "$ok" = "yes" ; then + ENABLE_STEP="-DENABLE_STEP" + else + ENABLE_STEP="" + fi + + + + + + + + + + + #---------------------- + # define substitutions + #---------------------- + *************** *** 3003,3008 **** --- 3124,3138 ---- s%@RANLIB@%$RANLIB%g s%@CC@%$CC%g s%@CPP@%$CPP%g + s%@STEP@%$STEP%g + s%@ENABLE_TIFF@%$ENABLE_TIFF%g + s%@ENABLE_XPM@%$ENABLE_XPM%g + s%@IMAGE_OBJ@%$IMAGE_OBJ%g + s%@ENABLE_DND@%$ENABLE_DND%g + s%@OFFIX_OBJ@%$OFFIX_OBJ%g + s%@ENABLE_STEP@%$ENABLE_STEP%g + s%@EXTRA_LIBS@%$EXTRA_LIBS%g + s%@WITH_OPT@%$WITH_OPT%g s%@KANJI_FLAGS@%$KANJI_FLAGS%g s%@XLIB_HACK_DEF@%$XLIB_HACK_DEF%g s%@HAVE_XMKMF@%$HAVE_XMKMF%g *************** *** 3150,3152 **** --- 3280,3286 ---- rm -fr confdefs* $ac_clean_files test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 + + if test "$STEP" = "step"; then + cp tkConfig.sh tkstepConfig.sh + fi diff -r -c -P -x CVS ../tk8.0.5/unix/configure.in ./unix/configure.in *** ../tk8.0.5/unix/configure.in Tue Aug 17 18:48:57 1999 --- ./unix/configure.in Wed Aug 18 11:27:56 1999 *************** *** 64,70 **** #-------------------------------------------------------------------- AC_ARG_WITH(tcl, [ --with-tcl=DIR use Tcl 8.0 binaries from DIR], ! TCL_BIN_DIR=$withval, TCL_BIN_DIR=`cd ../../tcl8.0${TK_PATCH_LEVEL}jp/unix; pwd`) if test ! -d $TCL_BIN_DIR; then AC_MSG_ERROR(Tcl directory $TCL_BIN_DIR doesn't exist) fi --- 64,70 ---- #-------------------------------------------------------------------- AC_ARG_WITH(tcl, [ --with-tcl=DIR use Tcl 8.0 binaries from DIR], ! TCL_BIN_DIR=$withval, TCL_BIN_DIR=`cd ../../tcl8.0${TK_PATCH_LEVEL}/unix; pwd`) if test ! -d $TCL_BIN_DIR; then AC_MSG_ERROR(Tcl directory $TCL_BIN_DIR doesn't exist) fi *************** *** 568,586 **** # building libtk as a shared library instead of a static library. #-------------------------------------------------------------------- AC_ARG_ENABLE(shared, [ --enable-shared build libtk as a shared library], [ok=$enableval], [ok=no]) if test "$ok" = "yes" -a "${SHLIB_SUFFIX}" != ""; then TK_SHARED_BUILD=1 TK_SHLIB_CFLAGS="${SHLIB_CFLAGS}" ! TK_LIB_FILE=libtk${TCL_SHARED_LIB_SUFFIX} MAKE_LIB="\${SHLIB_LD} -o \${TK_LIB_FILE} \${OBJS} \$(TK_LD_SEARCH_FLAGS) ${SHLIB_LD_LIBS}" RANLIB=":" else TK_SHARED_BUILD=0 TK_SHLIB_CFLAGS="" ! TK_LIB_FILE=libtk${TCL_UNSHARED_LIB_SUFFIX} MAKE_LIB="ar cr \${TK_LIB_FILE} \${OBJS}" fi --- 568,597 ---- # building libtk as a shared library instead of a static library. #-------------------------------------------------------------------- + AC_ARG_ENABLE(replace, + [ --enable-replace build tkstep with normal tk names], + [ok=$enableval], [ok=no]) + if test "$ok" = "yes"; then + echo "Using normal tk names" + STEP="" + else + STEP="step" + fi + AC_SUBST(STEP) + AC_ARG_ENABLE(shared, [ --enable-shared build libtk as a shared library], [ok=$enableval], [ok=no]) if test "$ok" = "yes" -a "${SHLIB_SUFFIX}" != ""; then TK_SHARED_BUILD=1 TK_SHLIB_CFLAGS="${SHLIB_CFLAGS}" ! eval "TK_LIB_FILE=libtk${STEP}${TCL_SHARED_LIB_SUFFIX}" MAKE_LIB="\${SHLIB_LD} -o \${TK_LIB_FILE} \${OBJS} \$(TK_LD_SEARCH_FLAGS) ${SHLIB_LD_LIBS}" RANLIB=":" else TK_SHARED_BUILD=0 TK_SHLIB_CFLAGS="" ! eval "TK_LIB_FILE=libtk${STEP}${TCL_UNSHARED_LIB_SUFFIX}" MAKE_LIB="ar cr \${TK_LIB_FILE} \${OBJS}" fi *************** *** 593,606 **** # up the Tcl library. if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then ! TK_LIB_FLAG="-ltk${VERSION}\${TK_DBGX}" else ! TK_LIB_FLAG="-ltk`echo ${VERSION} | tr -d .`\${TK_DBGX}" fi TK_BUILD_LIB_SPEC="-L`pwd` ${TK_LIB_FLAG}" TK_LIB_SPEC="-L${exec_prefix}/lib ${TK_LIB_FLAG}" AC_SUBST(CFLAGS_DEBUG) AC_SUBST(CFLAGS_DEFAULT) AC_SUBST(CFLAGS_OPTIMIZE) AC_SUBST(CFLAGS_WARNING) --- 604,689 ---- # up the Tcl library. if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then ! TK_LIB_FLAG="-ltk${STEP}${VERSION}\${TK_DBGX}" else ! TK_LIB_FLAG="-ltk${STEP}`echo ${VERSION} | tr -d .`\${TK_DBGX}" fi TK_BUILD_LIB_SPEC="-L`pwd` ${TK_LIB_FLAG}" TK_LIB_SPEC="-L${exec_prefix}/lib ${TK_LIB_FLAG}" + #---------------------------------------------------------------- + # check for TkStep options + # Copyright (c) 1997 by Oliver Graf + #---------------------------------------------------------------- + + WITH_OPT="" + EXTRA_LIBS="" + IMAGE_OBJ="" + OFFIX_OBJ="" + + AC_ARG_WITH(optimize, + [ --with-optimize=OPT set CFLAG optimizations to OPT (default -O)], + [WITH_OPT=$withval], [WITH_OPT="-O"]) + + AC_ARG_ENABLE(tiff, + [ --enable-tiff build with TIFF image format support ], + [ok=$enableval], [ok=no]) + if test "$ok" = "yes" ; then + ENABLE_TIFF="-DENABLE_TIFF" + EXTRA_LIBS="$EXTRA_LIBS -ltiff -ljpeg -lz" + IMAGE_OBJ="$IMAGE_OBJ tkImgTIFF.o" + else + ENABLE_TIFF="" + fi + + AC_ARG_ENABLE(xpm, + [ --enable-xpm build with XPM image format support ], + [ok=$enableval], [ok=no]) + if test "$ok" = "yes" ; then + ENABLE_XPM="-DENABLE_XPM" + EXTRA_LIBS="$EXTRA_LIBS -lXpm" + IMAGE_OBJ="$IMAGE_OBJ tkImgXPM.o" + else + ENABLE_XPM="" + fi + + AC_ARG_ENABLE(dnd, + [ --enable-dnd build with OffiX Drag'n'Drop support ], + [ok=$enableval], [ok=no]) + if test "$ok" = "yes" ; then + ENABLE_DND="-DENABLE_DND" + OFFIX_OBJ="$OFFIX_OBJ tkDragdrop.o ClientWin.o" + else + ENABLE_DND="" + fi + + AC_ARG_ENABLE(step, + [ --enable-step build with nextified style ], + [ok=$enableval], [ok=no]) + if test "$ok" = "yes" ; then + ENABLE_STEP="-DENABLE_STEP" + else + ENABLE_STEP="" + fi + + AC_SUBST(ENABLE_TIFF) + AC_SUBST(ENABLE_XPM) + AC_SUBST(IMAGE_OBJ) + AC_SUBST(ENABLE_DND) + AC_SUBST(OFFIX_OBJ) + AC_SUBST(ENABLE_STEP) + AC_SUBST(EXTRA_LIBS) + AC_SUBST(WITH_OPT) + + #---------------------- + # define substitutions + #---------------------- + AC_SUBST(CFLAGS_DEBUG) + + if test "$STEP" = "step"; then + cp tkConfig.sh tkstepConfig.sh + fi AC_SUBST(CFLAGS_DEFAULT) AC_SUBST(CFLAGS_OPTIMIZE) AC_SUBST(CFLAGS_WARNING) diff -r -c -P -x CVS ../tk8.0.5/unix/cursor/app.xbm ./unix/cursor/app.xbm *** ../tk8.0.5/unix/cursor/app.xbm Thu Jan 1 09:00:00 1970 --- ./unix/cursor/app.xbm Tue Aug 17 18:54:58 1999 *************** *** 0 **** --- 1,21 ---- + #define app_width 42 + #define app_height 32 + #define app_x_hot 1 + #define app_y_hot 1 + static unsigned char app_bits[] = { + 0x00, 0xc0, 0xff, 0xff, 0x00, 0x00, 0x02, 0x40, 0x00, 0x80, 0x01, 0x00, + 0x06, 0x40, 0x00, 0x80, 0x02, 0x00, 0x0e, 0x40, 0x00, 0x80, 0x04, 0x00, + 0x1e, 0x40, 0x00, 0x80, 0x08, 0x00, 0x3e, 0x40, 0x00, 0x80, 0x10, 0x00, + 0x7e, 0x40, 0x00, 0x80, 0x20, 0x00, 0xfe, 0x40, 0x00, 0x80, 0x7f, 0x00, + 0xfe, 0x41, 0x00, 0x00, 0x60, 0x00, 0x3e, 0x40, 0xfe, 0xff, 0x67, 0x00, + 0x36, 0x40, 0xaa, 0xaa, 0x6e, 0x00, 0x62, 0x40, 0x56, 0x55, 0x6d, 0x00, + 0x60, 0x40, 0xfe, 0xff, 0x6f, 0x00, 0xc0, 0x40, 0x02, 0x00, 0x6c, 0x00, + 0xc0, 0x40, 0x02, 0x00, 0x6c, 0x00, 0x00, 0x40, 0x02, 0x00, 0x6c, 0x00, + 0x00, 0x40, 0x02, 0x00, 0x6c, 0x00, 0x00, 0x40, 0x02, 0x00, 0x6c, 0x00, + 0x00, 0x40, 0x02, 0x00, 0x6c, 0x00, 0x00, 0x40, 0x02, 0x00, 0x6c, 0x00, + 0x00, 0x40, 0x02, 0x00, 0x6c, 0x00, 0x00, 0x40, 0x02, 0x00, 0x6c, 0x00, + 0x00, 0x40, 0x02, 0x00, 0x6c, 0x00, 0x00, 0x40, 0x02, 0x00, 0x6c, 0x00, + 0x00, 0x40, 0x02, 0x00, 0x6c, 0x00, 0x00, 0x40, 0xfe, 0xff, 0x6f, 0x00, + 0x00, 0x40, 0xfc, 0xff, 0x6f, 0x00, 0x00, 0x40, 0x00, 0x00, 0x60, 0x00, + 0x00, 0x40, 0x00, 0x00, 0x60, 0x00, 0x00, 0x40, 0x00, 0x00, 0x60, 0x00, + 0x00, 0xc0, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x80, 0xff, 0xff, 0x7f, 0x00}; diff -r -c -P -x CVS ../tk8.0.5/unix/cursor/app_mask.xbm ./unix/cursor/app_mask.xbm *** ../tk8.0.5/unix/cursor/app_mask.xbm Thu Jan 1 09:00:00 1970 --- ./unix/cursor/app_mask.xbm Tue Aug 17 18:54:58 1999 *************** *** 0 **** --- 1,21 ---- + #define app_mask_width 42 + #define app_mask_height 32 + #define app_mask_x_hot 1 + #define app_mask_y_hot 1 + static unsigned char app_mask_bits[] = { + 0x03, 0xc0, 0xff, 0xff, 0x00, 0x00, 0x07, 0xc0, 0xff, 0xff, 0x01, 0x00, + 0x0f, 0xc0, 0xff, 0xff, 0x03, 0x00, 0x1f, 0xc0, 0xff, 0xff, 0x07, 0x00, + 0x3f, 0xc0, 0xff, 0xff, 0x0f, 0x00, 0x7f, 0xc0, 0xff, 0xff, 0x1f, 0x00, + 0xff, 0xc0, 0xff, 0xff, 0x3f, 0x00, 0xff, 0xc1, 0xff, 0xff, 0x7f, 0x00, + 0xff, 0xc3, 0xff, 0xff, 0x7f, 0x00, 0xff, 0xc3, 0xff, 0xff, 0x7f, 0x00, + 0x7f, 0xc0, 0xff, 0xff, 0x7f, 0x00, 0xf7, 0xc0, 0xff, 0xff, 0x7f, 0x00, + 0xf3, 0xc0, 0xff, 0xff, 0x7f, 0x00, 0xe0, 0xc1, 0xff, 0xff, 0x7f, 0x00, + 0xe0, 0xc1, 0xff, 0xff, 0x7f, 0x00, 0xc0, 0xc0, 0xff, 0xff, 0x7f, 0x00, + 0x00, 0xc0, 0xff, 0xff, 0x7f, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x7f, 0x00, + 0x00, 0xc0, 0xff, 0xff, 0x7f, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x7f, 0x00, + 0x00, 0xc0, 0xff, 0xff, 0x7f, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x7f, 0x00, + 0x00, 0xc0, 0xff, 0xff, 0x7f, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x7f, 0x00, + 0x00, 0xc0, 0xff, 0xff, 0x7f, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x7f, 0x00, + 0x00, 0xc0, 0xff, 0xff, 0x7f, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x7f, 0x00, + 0x00, 0xc0, 0xff, 0xff, 0x7f, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x7f, 0x00, + 0x00, 0xc0, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x80, 0xff, 0xff, 0x7f, 0x00}; diff -r -c -P -x CVS ../tk8.0.5/unix/cursor/dir.xbm ./unix/cursor/dir.xbm *** ../tk8.0.5/unix/cursor/dir.xbm Thu Jan 1 09:00:00 1970 --- ./unix/cursor/dir.xbm Tue Aug 17 18:54:58 1999 *************** *** 0 **** --- 1,17 ---- + #define dir_width 42 + #define dir_height 24 + #define dir_x_hot 1 + #define dir_y_hot 1 + static unsigned char dir_bits[] = { + 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0x02, 0x80, 0x00, 0x02, 0x00, 0x00, + 0x06, 0x40, 0x00, 0x04, 0x00, 0x00, 0x0e, 0x20, 0x00, 0x08, 0x00, 0x00, + 0x1e, 0xf0, 0xff, 0xff, 0xff, 0x03, 0x3e, 0x10, 0x00, 0x00, 0x00, 0x02, + 0x7e, 0x10, 0x00, 0x00, 0x00, 0x02, 0xfe, 0x10, 0x00, 0x00, 0x00, 0x02, + 0xfe, 0x11, 0x00, 0x00, 0x00, 0x02, 0x3e, 0x10, 0x00, 0x00, 0x00, 0x02, + 0x36, 0x10, 0x00, 0x00, 0x00, 0x02, 0x62, 0x10, 0x00, 0x00, 0x00, 0x02, + 0x60, 0x10, 0x00, 0x00, 0x00, 0x02, 0xc0, 0x10, 0x00, 0x00, 0x00, 0x02, + 0xc0, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x10, 0x00, 0x00, 0x00, 0x02, + 0x00, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x10, 0x00, 0x00, 0x00, 0x02, + 0x00, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x10, 0x00, 0x00, 0x00, 0x02, + 0x00, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x10, 0x00, 0x00, 0x00, 0x02, + 0x00, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0xf0, 0xff, 0xff, 0xff, 0x03}; diff -r -c -P -x CVS ../tk8.0.5/unix/cursor/dir_mask.xbm ./unix/cursor/dir_mask.xbm *** ../tk8.0.5/unix/cursor/dir_mask.xbm Thu Jan 1 09:00:00 1970 --- ./unix/cursor/dir_mask.xbm Tue Aug 17 18:54:58 1999 *************** *** 0 **** --- 1,17 ---- + #define dir_mask_width 42 + #define dir_mask_height 24 + #define dir_mask_x_hot 1 + #define dir_mask_y_hot 1 + static unsigned char dir_mask_bits[] = { + 0x03, 0x00, 0xff, 0x01, 0x00, 0x00, 0x07, 0x80, 0xff, 0x03, 0x00, 0x00, + 0x0f, 0xc0, 0xff, 0x07, 0x00, 0x00, 0x1f, 0xe0, 0xff, 0x0f, 0x00, 0x00, + 0x3f, 0xf0, 0xff, 0xff, 0xff, 0x03, 0x7f, 0xf0, 0xff, 0xff, 0xff, 0x03, + 0xff, 0xf0, 0xff, 0xff, 0xff, 0x03, 0xff, 0xf1, 0xff, 0xff, 0xff, 0x03, + 0xff, 0xf3, 0xff, 0xff, 0xff, 0x03, 0xff, 0xf3, 0xff, 0xff, 0xff, 0x03, + 0x7f, 0xf0, 0xff, 0xff, 0xff, 0x03, 0xf7, 0xf0, 0xff, 0xff, 0xff, 0x03, + 0xf3, 0xf0, 0xff, 0xff, 0xff, 0x03, 0xe0, 0xf1, 0xff, 0xff, 0xff, 0x03, + 0xe0, 0xf1, 0xff, 0xff, 0xff, 0x03, 0xc0, 0xf0, 0xff, 0xff, 0xff, 0x03, + 0x00, 0xf0, 0xff, 0xff, 0xff, 0x03, 0x00, 0xf0, 0xff, 0xff, 0xff, 0x03, + 0x00, 0xf0, 0xff, 0xff, 0xff, 0x03, 0x00, 0xf0, 0xff, 0xff, 0xff, 0x03, + 0x00, 0xf0, 0xff, 0xff, 0xff, 0x03, 0x00, 0xf0, 0xff, 0xff, 0xff, 0x03, + 0x00, 0xf0, 0xff, 0xff, 0xff, 0x03, 0x00, 0xf0, 0xff, 0xff, 0xff, 0x03}; diff -r -c -P -x CVS ../tk8.0.5/unix/cursor/file.xbm ./unix/cursor/file.xbm *** ../tk8.0.5/unix/cursor/file.xbm Thu Jan 1 09:00:00 1970 --- ./unix/cursor/file.xbm Tue Aug 17 18:54:58 1999 *************** *** 0 **** --- 1,21 ---- + #define file_width 42 + #define file_height 32 + #define file_x_hot 1 + #define file_y_hot 1 + static unsigned char file_bits[] = { + 0x00, 0xc0, 0xff, 0xff, 0x07, 0x00, 0x02, 0x40, 0x00, 0x00, 0x0a, 0x00, + 0x06, 0x40, 0x00, 0x00, 0x12, 0x00, 0x0e, 0x40, 0x00, 0x00, 0x22, 0x00, + 0x1e, 0x40, 0x00, 0x00, 0x3e, 0x00, 0x3e, 0x40, 0x00, 0x00, 0x20, 0x00, + 0x7e, 0x40, 0x00, 0x00, 0x20, 0x00, 0xfe, 0x40, 0x00, 0x00, 0x20, 0x00, + 0xfe, 0x41, 0x00, 0x00, 0x20, 0x00, 0x3e, 0x40, 0x00, 0x00, 0x20, 0x00, + 0x36, 0x40, 0x00, 0x00, 0x20, 0x00, 0x62, 0x40, 0x00, 0x00, 0x20, 0x00, + 0x60, 0x40, 0x00, 0x00, 0x20, 0x00, 0xc0, 0x40, 0x00, 0x00, 0x20, 0x00, + 0xc0, 0x40, 0x00, 0x00, 0x20, 0x00, 0x00, 0x40, 0x00, 0x00, 0x20, 0x00, + 0x00, 0x40, 0x00, 0x00, 0x20, 0x00, 0x00, 0x40, 0x00, 0x00, 0x20, 0x00, + 0x00, 0x40, 0x00, 0x00, 0x20, 0x00, 0x00, 0x40, 0x00, 0x00, 0x20, 0x00, + 0x00, 0x40, 0x00, 0x00, 0x20, 0x00, 0x00, 0x40, 0x00, 0x00, 0x20, 0x00, + 0x00, 0x40, 0x00, 0x00, 0x20, 0x00, 0x00, 0x40, 0x00, 0x00, 0x20, 0x00, + 0x00, 0x40, 0x00, 0x00, 0x20, 0x00, 0x00, 0x40, 0x00, 0x00, 0x20, 0x00, + 0x00, 0x40, 0x00, 0x00, 0x20, 0x00, 0x00, 0x40, 0x00, 0x00, 0x20, 0x00, + 0x00, 0x40, 0x00, 0x00, 0x20, 0x00, 0x00, 0x40, 0x00, 0x00, 0x20, 0x00, + 0x00, 0xc0, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff -r -c -P -x CVS ../tk8.0.5/unix/cursor/file_mask.xbm ./unix/cursor/file_mask.xbm *** ../tk8.0.5/unix/cursor/file_mask.xbm Thu Jan 1 09:00:00 1970 --- ./unix/cursor/file_mask.xbm Tue Aug 17 18:54:58 1999 *************** *** 0 **** --- 1,21 ---- + #define file_mask_width 42 + #define file_mask_height 32 + #define file_mask_x_hot 1 + #define file_mask_y_hot 1 + static unsigned char file_mask_bits[] = { + 0x03, 0xc0, 0xff, 0xff, 0x07, 0x00, 0x07, 0xc0, 0xff, 0xff, 0x0f, 0x00, + 0x0f, 0xc0, 0xff, 0xff, 0x1f, 0x00, 0x1f, 0xc0, 0xff, 0xff, 0x3f, 0x00, + 0x3f, 0xc0, 0xff, 0xff, 0x3f, 0x00, 0x7f, 0xc0, 0xff, 0xff, 0x3f, 0x00, + 0xff, 0xc0, 0xff, 0xff, 0x3f, 0x00, 0xff, 0xc1, 0xff, 0xff, 0x3f, 0x00, + 0xff, 0xc3, 0xff, 0xff, 0x3f, 0x00, 0xff, 0xc3, 0xff, 0xff, 0x3f, 0x00, + 0x7f, 0xc0, 0xff, 0xff, 0x3f, 0x00, 0xf7, 0xc0, 0xff, 0xff, 0x3f, 0x00, + 0xf3, 0xc0, 0xff, 0xff, 0x3f, 0x00, 0xe0, 0xc1, 0xff, 0xff, 0x3f, 0x00, + 0xe0, 0xc1, 0xff, 0xff, 0x3f, 0x00, 0xc0, 0xc0, 0xff, 0xff, 0x3f, 0x00, + 0x00, 0xc0, 0xff, 0xff, 0x3f, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x3f, 0x00, + 0x00, 0xc0, 0xff, 0xff, 0x3f, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x3f, 0x00, + 0x00, 0xc0, 0xff, 0xff, 0x3f, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x3f, 0x00, + 0x00, 0xc0, 0xff, 0xff, 0x3f, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x3f, 0x00, + 0x00, 0xc0, 0xff, 0xff, 0x3f, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x3f, 0x00, + 0x00, 0xc0, 0xff, 0xff, 0x3f, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x3f, 0x00, + 0x00, 0xc0, 0xff, 0xff, 0x3f, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x3f, 0x00, + 0x00, 0xc0, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff -r -c -P -x CVS ../tk8.0.5/unix/cursor/files.xbm ./unix/cursor/files.xbm *** ../tk8.0.5/unix/cursor/files.xbm Thu Jan 1 09:00:00 1970 --- ./unix/cursor/files.xbm Tue Aug 17 18:54:58 1999 *************** *** 0 **** --- 1,21 ---- + #define files_width 42 + #define files_height 32 + #define files_x_hot 1 + #define files_y_hot 1 + static unsigned char files_bits[] = { + 0x00, 0xf8, 0xff, 0xff, 0x01, 0x00, 0x02, 0x08, 0x00, 0x80, 0x02, 0x00, + 0x06, 0x08, 0x00, 0x80, 0x04, 0x00, 0x0e, 0x08, 0x00, 0x80, 0x08, 0x00, + 0x1e, 0x08, 0x00, 0x80, 0x1f, 0x00, 0x3e, 0x08, 0x00, 0x00, 0x28, 0x00, + 0x7e, 0x08, 0x00, 0x00, 0x78, 0x00, 0xfe, 0x08, 0x00, 0x00, 0xa8, 0x00, + 0xfe, 0x09, 0x00, 0x00, 0xe8, 0x00, 0x3e, 0x08, 0x00, 0x00, 0xa8, 0x00, + 0x36, 0x08, 0x00, 0x00, 0xa8, 0x00, 0x62, 0x08, 0x00, 0x00, 0xa8, 0x00, + 0x60, 0x08, 0x00, 0x00, 0xa8, 0x00, 0xc0, 0x08, 0x00, 0x00, 0xa8, 0x00, + 0xc0, 0x08, 0x00, 0x00, 0xa8, 0x00, 0x00, 0x08, 0x00, 0x00, 0xa8, 0x00, + 0x00, 0x08, 0x00, 0x00, 0xa8, 0x00, 0x00, 0x08, 0x00, 0x00, 0xa8, 0x00, + 0x00, 0x08, 0x00, 0x00, 0xa8, 0x00, 0x00, 0x08, 0x00, 0x00, 0xa8, 0x00, + 0x00, 0x08, 0x00, 0x00, 0xa8, 0x00, 0x00, 0x08, 0x00, 0x00, 0xa8, 0x00, + 0x00, 0x08, 0x00, 0x00, 0xa8, 0x00, 0x00, 0x08, 0x00, 0x00, 0xa8, 0x00, + 0x00, 0x08, 0x00, 0x00, 0xa8, 0x00, 0x00, 0x08, 0x00, 0x00, 0xa8, 0x00, + 0x00, 0x08, 0x00, 0x00, 0xa8, 0x00, 0x00, 0xf8, 0xff, 0xff, 0xaf, 0x00, + 0x00, 0x10, 0x00, 0x00, 0xa0, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xbf, 0x00, + 0x00, 0x20, 0x00, 0x00, 0x80, 0x00, 0x00, 0xe0, 0xff, 0xff, 0xff, 0x00}; diff -r -c -P -x CVS ../tk8.0.5/unix/cursor/files_mask.xbm ./unix/cursor/files_mask.xbm *** ../tk8.0.5/unix/cursor/files_mask.xbm Thu Jan 1 09:00:00 1970 --- ./unix/cursor/files_mask.xbm Tue Aug 17 18:54:58 1999 *************** *** 0 **** --- 1,21 ---- + #define files_mask_width 42 + #define files_mask_height 32 + #define files_mask_x_hot 1 + #define files_mask_y_hot 1 + static unsigned char files_mask_bits[] = { + 0x03, 0xf8, 0xff, 0xff, 0x01, 0x00, 0x07, 0xf8, 0xff, 0xff, 0x03, 0x00, + 0x0f, 0xf8, 0xff, 0xff, 0x07, 0x00, 0x1f, 0xf8, 0xff, 0xff, 0x0f, 0x00, + 0x3f, 0xf8, 0xff, 0xff, 0x1f, 0x00, 0x7f, 0xf8, 0xff, 0xff, 0x3f, 0x00, + 0xff, 0xf8, 0xff, 0xff, 0x7f, 0x00, 0xff, 0xf9, 0xff, 0xff, 0xff, 0x00, + 0xff, 0xfb, 0xff, 0xff, 0xff, 0x00, 0xff, 0xfb, 0xff, 0xff, 0xff, 0x00, + 0x7f, 0xf8, 0xff, 0xff, 0xff, 0x00, 0xf7, 0xf8, 0xff, 0xff, 0xff, 0x00, + 0xf3, 0xf8, 0xff, 0xff, 0xff, 0x00, 0xe0, 0xf9, 0xff, 0xff, 0xff, 0x00, + 0xe0, 0xf9, 0xff, 0xff, 0xff, 0x00, 0xc0, 0xf8, 0xff, 0xff, 0xff, 0x00, + 0x00, 0xf8, 0xff, 0xff, 0xff, 0x00, 0x00, 0xf8, 0xff, 0xff, 0xff, 0x00, + 0x00, 0xf8, 0xff, 0xff, 0xff, 0x00, 0x00, 0xf8, 0xff, 0xff, 0xff, 0x00, + 0x00, 0xf8, 0xff, 0xff, 0xff, 0x00, 0x00, 0xf8, 0xff, 0xff, 0xff, 0x00, + 0x00, 0xf8, 0xff, 0xff, 0xff, 0x00, 0x00, 0xf8, 0xff, 0xff, 0xff, 0x00, + 0x00, 0xf8, 0xff, 0xff, 0xff, 0x00, 0x00, 0xf8, 0xff, 0xff, 0xff, 0x00, + 0x00, 0xf8, 0xff, 0xff, 0xff, 0x00, 0x00, 0xf8, 0xff, 0xff, 0xff, 0x00, + 0x00, 0xf0, 0xff, 0xff, 0xff, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, 0x00, + 0x00, 0xe0, 0xff, 0xff, 0xff, 0x00, 0x00, 0xe0, 0xff, 0xff, 0xff, 0x00}; diff -r -c -P -x CVS ../tk8.0.5/unix/cursor/grey.xbm ./unix/cursor/grey.xbm *** ../tk8.0.5/unix/cursor/grey.xbm Thu Jan 1 09:00:00 1970 --- ./unix/cursor/grey.xbm Tue Aug 17 18:54:58 1999 *************** *** 0 **** --- 1,21 ---- + #define grey_width 42 + #define grey_height 32 + #define grey_x_hot 1 + #define grey_y_hot 1 + static unsigned char grey_bits[] = { + 0x00, 0xc0, 0xff, 0xff, 0x00, 0x00, 0x02, 0x40, 0x55, 0xd5, 0x01, 0x00, + 0x06, 0xc0, 0xaa, 0xaa, 0x03, 0x00, 0x0e, 0x40, 0x55, 0xd5, 0x07, 0x00, + 0x1e, 0xc0, 0xaa, 0xaa, 0x0f, 0x00, 0x3e, 0x40, 0x55, 0xd5, 0x1f, 0x00, + 0x7e, 0xc0, 0xaa, 0xaa, 0x3f, 0x00, 0xfe, 0x40, 0x55, 0xd5, 0x7f, 0x00, + 0xfe, 0xc1, 0xaa, 0xaa, 0x7f, 0x00, 0x3e, 0x40, 0x55, 0x55, 0x75, 0x00, + 0x36, 0xc0, 0xaa, 0xaa, 0x6a, 0x00, 0x72, 0x40, 0x55, 0x55, 0x75, 0x00, + 0x60, 0xc0, 0xaa, 0xaa, 0x6a, 0x00, 0xc0, 0x40, 0x55, 0x55, 0x75, 0x00, + 0xc0, 0xc0, 0xaa, 0xaa, 0x6a, 0x00, 0x00, 0x40, 0x55, 0x55, 0x75, 0x00, + 0x00, 0xc0, 0xaa, 0xaa, 0x6a, 0x00, 0x00, 0x40, 0x55, 0x55, 0x75, 0x00, + 0x00, 0xc0, 0xaa, 0xaa, 0x6a, 0x00, 0x00, 0x40, 0x55, 0x55, 0x75, 0x00, + 0x00, 0xc0, 0xaa, 0xaa, 0x6a, 0x00, 0x00, 0x40, 0x55, 0x55, 0x75, 0x00, + 0x00, 0xc0, 0xaa, 0xaa, 0x6a, 0x00, 0x00, 0x40, 0x55, 0x55, 0x75, 0x00, + 0x00, 0xc0, 0xaa, 0xaa, 0x6a, 0x00, 0x00, 0x40, 0x55, 0x55, 0x75, 0x00, + 0x00, 0xc0, 0xaa, 0xaa, 0x6a, 0x00, 0x00, 0x40, 0x55, 0x55, 0x75, 0x00, + 0x00, 0xc0, 0xaa, 0xaa, 0x6a, 0x00, 0x00, 0x40, 0x55, 0x55, 0x75, 0x00, + 0x00, 0xc0, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x80, 0xff, 0xff, 0x7f, 0x00}; diff -r -c -P -x CVS ../tk8.0.5/unix/cursor/grey_mask.xbm ./unix/cursor/grey_mask.xbm *** ../tk8.0.5/unix/cursor/grey_mask.xbm Thu Jan 1 09:00:00 1970 --- ./unix/cursor/grey_mask.xbm Tue Aug 17 18:54:58 1999 *************** *** 0 **** --- 1,21 ---- + #define grey_mask_width 42 + #define grey_mask_height 32 + #define grey_mask_x_hot 1 + #define grey_mask_y_hot 1 + static unsigned char grey_mask_bits[] = { + 0x03, 0xc0, 0xff, 0xff, 0x00, 0x00, 0x07, 0xc0, 0xff, 0xff, 0x01, 0x00, + 0x0f, 0xc0, 0xff, 0xff, 0x03, 0x00, 0x1f, 0xc0, 0xff, 0xff, 0x07, 0x00, + 0x3f, 0xc0, 0xff, 0xff, 0x0f, 0x00, 0x7f, 0xc0, 0xff, 0xff, 0x1f, 0x00, + 0xff, 0xc0, 0xff, 0xff, 0x3f, 0x00, 0xff, 0xc1, 0xff, 0xff, 0x7f, 0x00, + 0xff, 0xc3, 0xff, 0xff, 0x7f, 0x00, 0xff, 0xc3, 0xff, 0xff, 0x7f, 0x00, + 0x7f, 0xc0, 0xff, 0xff, 0x7f, 0x00, 0xff, 0xc0, 0xff, 0xff, 0x7f, 0x00, + 0xf3, 0xc0, 0xff, 0xff, 0x7f, 0x00, 0xe0, 0xc1, 0xff, 0xff, 0x7f, 0x00, + 0xe0, 0xc1, 0xff, 0xff, 0x7f, 0x00, 0xc0, 0xc0, 0xff, 0xff, 0x7f, 0x00, + 0x00, 0xc0, 0xff, 0xff, 0x7f, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x7f, 0x00, + 0x00, 0xc0, 0xff, 0xff, 0x7f, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x7f, 0x00, + 0x00, 0xc0, 0xff, 0xff, 0x7f, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x7f, 0x00, + 0x00, 0xc0, 0xff, 0xff, 0x7f, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x7f, 0x00, + 0x00, 0xc0, 0xff, 0xff, 0x7f, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x7f, 0x00, + 0x00, 0xc0, 0xff, 0xff, 0x7f, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x7f, 0x00, + 0x00, 0xc0, 0xff, 0xff, 0x7f, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x7f, 0x00, + 0x00, 0xc0, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x80, 0xff, 0xff, 0x7f, 0x00}; diff -r -c -P -x CVS ../tk8.0.5/unix/cursor/link.xbm ./unix/cursor/link.xbm *** ../tk8.0.5/unix/cursor/link.xbm Thu Jan 1 09:00:00 1970 --- ./unix/cursor/link.xbm Tue Aug 17 18:54:58 1999 *************** *** 0 **** --- 1,21 ---- + #define link_width 42 + #define link_height 32 + #define link_x_hot 1 + #define link_y_hot 1 + static unsigned char link_bits[] = { + 0x00, 0xc0, 0xff, 0xff, 0x01, 0x00, 0x02, 0x40, 0x00, 0x00, 0x03, 0x00, + 0x06, 0x40, 0x00, 0x00, 0x05, 0x00, 0x0e, 0x40, 0x00, 0x00, 0x09, 0x00, + 0x1e, 0x40, 0x00, 0x00, 0x11, 0x00, 0x3e, 0x40, 0x00, 0x00, 0x21, 0x00, + 0x7e, 0x40, 0x00, 0x00, 0x7f, 0x00, 0xfe, 0x40, 0x00, 0x00, 0x60, 0x00, + 0xfe, 0x41, 0x00, 0x00, 0x60, 0x00, 0x3e, 0x40, 0x00, 0x00, 0x60, 0x00, + 0x36, 0xc0, 0xc3, 0x1f, 0x7e, 0x00, 0x62, 0x40, 0xa5, 0x2a, 0x75, 0x00, + 0x60, 0xc0, 0xdb, 0xdf, 0x7e, 0x00, 0xc0, 0x40, 0xff, 0xf8, 0x67, 0x00, + 0xc0, 0xc0, 0x55, 0xad, 0x6a, 0x00, 0x00, 0xc0, 0xaa, 0x55, 0x6d, 0x00, + 0x00, 0x40, 0xff, 0xf8, 0x67, 0x00, 0x00, 0xc0, 0xdb, 0xdf, 0x7e, 0x00, + 0x00, 0x40, 0xa5, 0x2a, 0x75, 0x00, 0x00, 0xc0, 0xc3, 0x1f, 0x7e, 0x00, + 0x00, 0x40, 0x00, 0x00, 0x60, 0x00, 0x00, 0x40, 0x00, 0x00, 0x60, 0x00, + 0x00, 0x40, 0x00, 0x00, 0x60, 0x00, 0x00, 0x40, 0x88, 0x52, 0x62, 0x00, + 0x00, 0x40, 0x88, 0x56, 0x61, 0x00, 0x00, 0x40, 0x88, 0xda, 0x60, 0x00, + 0x00, 0x40, 0x88, 0x52, 0x61, 0x00, 0x00, 0x40, 0xb8, 0x52, 0x62, 0x00, + 0x00, 0x40, 0x00, 0x00, 0x60, 0x00, 0x00, 0x40, 0x00, 0x00, 0x60, 0x00, + 0x00, 0xc0, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x80, 0xff, 0xff, 0x7f, 0x00}; diff -r -c -P -x CVS ../tk8.0.5/unix/cursor/link_mask.xbm ./unix/cursor/link_mask.xbm *** ../tk8.0.5/unix/cursor/link_mask.xbm Thu Jan 1 09:00:00 1970 --- ./unix/cursor/link_mask.xbm Tue Aug 17 18:54:58 1999 *************** *** 0 **** --- 1,21 ---- + #define link_mask_width 42 + #define link_mask_height 32 + #define link_mask_x_hot 1 + #define link_mask_y_hot 1 + static unsigned char link_mask_bits[] = { + 0x03, 0xc0, 0xff, 0xff, 0x01, 0x00, 0x07, 0xc0, 0xff, 0xff, 0x03, 0x00, + 0x0f, 0xc0, 0xff, 0xff, 0x07, 0x00, 0x1f, 0xc0, 0xff, 0xff, 0x0f, 0x00, + 0x3f, 0xc0, 0xff, 0xff, 0x1f, 0x00, 0x7f, 0xc0, 0xff, 0xff, 0x3f, 0x00, + 0xff, 0xc0, 0xff, 0xff, 0x7f, 0x00, 0xff, 0xc1, 0xff, 0xff, 0x7f, 0x00, + 0xff, 0xc3, 0xff, 0xff, 0x7f, 0x00, 0xff, 0xc3, 0xff, 0xff, 0x7f, 0x00, + 0x7f, 0xc0, 0xff, 0xff, 0x7f, 0x00, 0xf7, 0xc0, 0xff, 0xff, 0x7f, 0x00, + 0xf3, 0xc0, 0xff, 0xff, 0x7f, 0x00, 0xe0, 0xc1, 0xff, 0xff, 0x7f, 0x00, + 0xe0, 0xc1, 0xff, 0xff, 0x7f, 0x00, 0xc0, 0xc0, 0xff, 0xff, 0x7f, 0x00, + 0x00, 0xc0, 0xff, 0xff, 0x7f, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x7f, 0x00, + 0x00, 0xc0, 0xff, 0xff, 0x7f, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x7f, 0x00, + 0x00, 0xc0, 0xff, 0xff, 0x7f, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x7f, 0x00, + 0x00, 0xc0, 0xff, 0xff, 0x7f, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x7f, 0x00, + 0x00, 0xc0, 0xff, 0xff, 0x7f, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x7f, 0x00, + 0x00, 0xc0, 0xff, 0xff, 0x7f, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x7f, 0x00, + 0x00, 0xc0, 0xff, 0xff, 0x7f, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x7f, 0x00, + 0x00, 0xc0, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x80, 0xff, 0xff, 0x7f, 0x00}; diff -r -c -P -x CVS ../tk8.0.5/unix/cursor/mime.xbm ./unix/cursor/mime.xbm *** ../tk8.0.5/unix/cursor/mime.xbm Thu Jan 1 09:00:00 1970 --- ./unix/cursor/mime.xbm Tue Aug 17 18:54:58 1999 *************** *** 0 **** --- 1,12 ---- + #define mime_width 30 + #define mime_height 20 + #define mime_x_hot 1 + #define mime_y_hot 1 + static unsigned char mime_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x80, 0x01, 0x06, 0x00, 0x80, 0x01, + 0x0e, 0x00, 0x00, 0x00, 0x1e, 0xb0, 0x99, 0x01, 0x3e, 0x70, 0xb7, 0x01, + 0x7e, 0x30, 0xb3, 0x01, 0xfe, 0x30, 0xb3, 0x01, 0xfe, 0x31, 0xb3, 0x01, + 0x3e, 0x30, 0xb3, 0x01, 0x36, 0x30, 0xb3, 0x01, 0x62, 0x00, 0x00, 0x00, + 0x60, 0xb0, 0x19, 0x0f, 0xc0, 0x70, 0xb7, 0x19, 0xc0, 0x30, 0xb3, 0x19, + 0x00, 0x30, 0xb3, 0x1f, 0x00, 0x30, 0xb3, 0x01, 0x00, 0x30, 0xb3, 0x11, + 0x00, 0x30, 0x33, 0x0f, 0x00, 0x00, 0x00, 0x00}; diff -r -c -P -x CVS ../tk8.0.5/unix/cursor/mime_mask.xbm ./unix/cursor/mime_mask.xbm *** ../tk8.0.5/unix/cursor/mime_mask.xbm Thu Jan 1 09:00:00 1970 --- ./unix/cursor/mime_mask.xbm Tue Aug 17 18:54:58 1999 *************** *** 0 **** --- 1,10 ---- + #define mime_mask_width 30 + #define mime_mask_height 20 + static unsigned char mime_mask_bits[] = { + 0x03, 0x00, 0x80, 0x01, 0x07, 0x00, 0xc0, 0x03, 0x0f, 0x00, 0xc0, 0x03, + 0x1f, 0xb8, 0x99, 0x01, 0x3f, 0xf8, 0xff, 0x03, 0x7f, 0xf8, 0xff, 0x03, + 0xff, 0xf8, 0xff, 0x03, 0xff, 0xf9, 0xff, 0x03, 0xff, 0xfb, 0xff, 0x03, + 0xff, 0xf9, 0xff, 0x03, 0x7f, 0xf8, 0xff, 0x03, 0xf7, 0xf8, 0xff, 0x0f, + 0xf3, 0xf8, 0xff, 0x1f, 0xe0, 0xf9, 0xff, 0x3f, 0xe0, 0xf9, 0xff, 0x3f, + 0xc0, 0xf8, 0xff, 0x3f, 0x00, 0xf8, 0xff, 0x3f, 0x00, 0xf8, 0xff, 0x3f, + 0x00, 0xf8, 0xff, 0x1f, 0x00, 0xf8, 0xff, 0x0f}; diff -r -c -P -x CVS ../tk8.0.5/unix/cursor/text.xbm ./unix/cursor/text.xbm *** ../tk8.0.5/unix/cursor/text.xbm Thu Jan 1 09:00:00 1970 --- ./unix/cursor/text.xbm Tue Aug 17 18:54:58 1999 *************** *** 0 **** --- 1,21 ---- + #define text_width 42 + #define text_height 32 + #define text_x_hot 1 + #define text_y_hot 1 + static unsigned char text_bits[] = { + 0x00, 0xc0, 0xff, 0xff, 0x00, 0x00, 0x02, 0x40, 0x00, 0x80, 0x01, 0x00, + 0x06, 0x40, 0x00, 0x80, 0x02, 0x00, 0x0e, 0x40, 0xde, 0xbd, 0x04, 0x00, + 0x1e, 0x40, 0x00, 0x80, 0x08, 0x00, 0x3e, 0x40, 0x00, 0x80, 0x10, 0x00, + 0x7e, 0x40, 0xb8, 0xef, 0x20, 0x00, 0xfe, 0x40, 0x00, 0x80, 0x7f, 0x00, + 0xfe, 0x41, 0xfe, 0xf6, 0x64, 0x00, 0x3e, 0x40, 0x00, 0x00, 0x60, 0x00, + 0x36, 0x40, 0xf6, 0xce, 0x67, 0x00, 0x62, 0x40, 0x00, 0x00, 0x60, 0x00, + 0x60, 0x40, 0xba, 0xfb, 0x60, 0x00, 0xc0, 0x40, 0x00, 0x00, 0x60, 0x00, + 0xc0, 0x40, 0x00, 0x00, 0x60, 0x00, 0x00, 0x40, 0x00, 0x00, 0x60, 0x00, + 0x00, 0x40, 0x14, 0x3b, 0x63, 0x00, 0x00, 0x40, 0x00, 0x00, 0x60, 0x00, + 0x00, 0x40, 0xf4, 0xba, 0x60, 0x00, 0x00, 0x40, 0x00, 0x00, 0x60, 0x00, + 0x00, 0x40, 0x74, 0x07, 0x60, 0x00, 0x00, 0x40, 0x00, 0x00, 0x60, 0x00, + 0x00, 0x40, 0xff, 0xf6, 0x67, 0x00, 0x00, 0x40, 0x00, 0x00, 0x60, 0x00, + 0x00, 0x40, 0xf7, 0x7d, 0x66, 0x00, 0x00, 0x40, 0x00, 0x00, 0x60, 0x00, + 0x00, 0x40, 0xdf, 0xef, 0x63, 0x00, 0x00, 0x40, 0x00, 0x00, 0x60, 0x00, + 0x00, 0x40, 0x00, 0x06, 0x60, 0x00, 0x00, 0x40, 0x00, 0x00, 0x60, 0x00, + 0x00, 0xc0, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x80, 0xff, 0xff, 0x7f, 0x00}; diff -r -c -P -x CVS ../tk8.0.5/unix/cursor/text_mask.xbm ./unix/cursor/text_mask.xbm *** ../tk8.0.5/unix/cursor/text_mask.xbm Thu Jan 1 09:00:00 1970 --- ./unix/cursor/text_mask.xbm Tue Aug 17 18:54:58 1999 *************** *** 0 **** --- 1,21 ---- + #define text_mask_width 42 + #define text_mask_height 32 + #define text_mask_x_hot 1 + #define text_mask_y_hot 1 + static unsigned char text_mask_bits[] = { + 0x03, 0xc0, 0xff, 0xff, 0x00, 0x00, 0x07, 0xc0, 0xff, 0xff, 0x01, 0x00, + 0x0f, 0xc0, 0xff, 0xff, 0x03, 0x00, 0x1f, 0xc0, 0xff, 0xff, 0x07, 0x00, + 0x3f, 0xc0, 0xff, 0xff, 0x0f, 0x00, 0x7f, 0xc0, 0xff, 0xff, 0x1f, 0x00, + 0xff, 0xc0, 0xff, 0xff, 0x3f, 0x00, 0xff, 0xc1, 0xff, 0xff, 0x7f, 0x00, + 0xff, 0xc3, 0xff, 0xff, 0x7f, 0x00, 0xff, 0xc3, 0xff, 0xff, 0x7f, 0x00, + 0x7f, 0xc0, 0xff, 0xff, 0x7f, 0x00, 0xf7, 0xc0, 0xff, 0xff, 0x7f, 0x00, + 0xf3, 0xc0, 0xff, 0xff, 0x7f, 0x00, 0xe0, 0xc1, 0xff, 0xff, 0x7f, 0x00, + 0xe0, 0xc1, 0xff, 0xff, 0x7f, 0x00, 0xc0, 0xc0, 0xff, 0xff, 0x7f, 0x00, + 0x00, 0xc0, 0xff, 0xff, 0x7f, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x7f, 0x00, + 0x00, 0xc0, 0xff, 0xff, 0x7f, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x7f, 0x00, + 0x00, 0xc0, 0xff, 0xff, 0x7f, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x7f, 0x00, + 0x00, 0xc0, 0xff, 0xff, 0x7f, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x7f, 0x00, + 0x00, 0xc0, 0xff, 0xff, 0x7f, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x7f, 0x00, + 0x00, 0xc0, 0xff, 0xff, 0x7f, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x7f, 0x00, + 0x00, 0xc0, 0xff, 0xff, 0x7f, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x7f, 0x00, + 0x00, 0xc0, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x80, 0xff, 0xff, 0x7f, 0x00}; diff -r -c -P -x CVS ../tk8.0.5/unix/cursor/url.xbm ./unix/cursor/url.xbm *** ../tk8.0.5/unix/cursor/url.xbm Thu Jan 1 09:00:00 1970 --- ./unix/cursor/url.xbm Tue Aug 17 18:54:58 1999 *************** *** 0 **** --- 1,15 ---- + #define url_width 33 + #define url_height 23 + #define url_x_hot 1 + #define url_y_hot 1 + static unsigned char url_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0xf8, 0x03, 0x00, 0x06, 0x00, + 0xee, 0x0e, 0x00, 0x0e, 0x00, 0x77, 0x1c, 0x00, 0x1e, 0x80, 0x1f, 0x38, + 0x00, 0x3e, 0xc0, 0x0f, 0x6c, 0x00, 0x7e, 0xe0, 0x07, 0xf4, 0x00, 0xfe, + 0xe0, 0x05, 0xfe, 0x00, 0xfe, 0xf1, 0x00, 0xfe, 0x01, 0x3e, 0xd0, 0x00, + 0xfc, 0x01, 0x36, 0xb0, 0x01, 0xfc, 0x01, 0x62, 0x10, 0x0f, 0xe8, 0x01, + 0x60, 0x30, 0x1f, 0xf0, 0x01, 0xc0, 0x10, 0x3f, 0xfa, 0x01, 0xc0, 0x10, + 0x3e, 0xfd, 0x01, 0x00, 0x60, 0xbc, 0xfe, 0x00, 0x00, 0xa0, 0x1c, 0xff, + 0x00, 0x00, 0xc0, 0xcd, 0x7f, 0x00, 0x00, 0x80, 0xff, 0x3f, 0x00, 0x00, + 0x00, 0xff, 0x1f, 0x00, 0x00, 0x00, 0xfe, 0x0f, 0x00, 0x00, 0x00, 0xf8, + 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff -r -c -P -x CVS ../tk8.0.5/unix/cursor/url_mask.xbm ./unix/cursor/url_mask.xbm *** ../tk8.0.5/unix/cursor/url_mask.xbm Thu Jan 1 09:00:00 1970 --- ./unix/cursor/url_mask.xbm Tue Aug 17 18:54:58 1999 *************** *** 0 **** --- 1,13 ---- + #define url_mask_width 33 + #define url_mask_height 23 + static unsigned char url_mask_bits[] = { + 0x03, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0xf8, 0x03, 0x00, 0x0f, 0x00, + 0xfe, 0x0f, 0x00, 0x1f, 0x00, 0xff, 0x1f, 0x00, 0x3f, 0x80, 0xff, 0x3f, + 0x00, 0x7f, 0xc0, 0xff, 0x7f, 0x00, 0xff, 0xe0, 0xff, 0xff, 0x00, 0xff, + 0xe1, 0xff, 0xff, 0x00, 0xff, 0xf3, 0xff, 0xff, 0x01, 0xff, 0xf1, 0xff, + 0xff, 0x01, 0x7f, 0xf0, 0xff, 0xff, 0x01, 0xf7, 0xf0, 0xff, 0xff, 0x01, + 0xf3, 0xf0, 0xff, 0xff, 0x01, 0xe0, 0xf1, 0xff, 0xff, 0x01, 0xe0, 0xf1, + 0xff, 0xff, 0x01, 0xc0, 0xe0, 0xff, 0xff, 0x00, 0x00, 0xe0, 0xff, 0xff, + 0x00, 0x00, 0xc0, 0xff, 0x7f, 0x00, 0x00, 0x80, 0xff, 0x3f, 0x00, 0x00, + 0x00, 0xff, 0x1f, 0x00, 0x00, 0x00, 0xfe, 0x0f, 0x00, 0x00, 0x00, 0xf8, + 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff -r -c -P -x CVS ../tk8.0.5/unix/tkConfig.sh.in ./unix/tkConfig.sh.in *** ../tk8.0.5/unix/tkConfig.sh.in Tue Aug 17 18:48:57 1999 --- ./unix/tkConfig.sh.in Tue Aug 17 19:01:44 1999 *************** *** 1,6 **** ! # tkConfig.sh -- # ! # This shell script (for sh) is generated automatically by Tk's # configure script. It will create shell variables for most of # the configuration options discovered by the configure script. # This script is intended to be included by the configure scripts --- 1,6 ---- ! # tkStepConfig.sh -- # ! # This shell script (for sh) is generated automatically by TkStep's # configure script. It will create shell variables for most of # the configuration options discovered by the configure script. # This script is intended to be included by the configure scripts *************** *** 20,26 **** TK_PATCH_LEVEL='@TK_PATCH_LEVEL@' # -D flags for use with the C compiler. ! TK_DEFS='@DEFS@ @X11_IMAKE_FLAGS@ @KANJI_FLAGS@ @XLIB_HACK_DEF@' # Flag, 1: we built a shared lib, 0 we didn't TK_SHARED_BUILD=@TK_SHARED_BUILD@ --- 20,26 ---- TK_PATCH_LEVEL='@TK_PATCH_LEVEL@' # -D flags for use with the C compiler. ! TK_DEFS='@DEFS@ @X11_IMAKE_FLAGS@ @KANJI_FLAGS@ @XLIB_HACK_DEF@ @ENABLE_TIFF@ @ENABLE_XPM@ @ENABLE_DND@ @ENABLE_STEP@' # Flag, 1: we built a shared lib, 0 we didn't TK_SHARED_BUILD=@TK_SHARED_BUILD@ *************** *** 32,38 **** TK_LIB_FILE='@TK_LIB_FILE@' # Additional libraries to use when linking Tk. ! TK_LIBS='@XLIBSW@ @DL_LIBS@ @LIBS@ @MATH_LIBS@' # Top-level directory in which Tcl's platform-independent files are # installed. --- 32,38 ---- TK_LIB_FILE='@TK_LIB_FILE@' # Additional libraries to use when linking Tk. ! TK_LIBS='@XLIBSW@ @DL_LIBS@ @LIBS@ @MATH_LIBS@ @EXTRA_LIBS@' # Top-level directory in which Tcl's platform-independent files are # installed. diff -r -c -P -x CVS ../tk8.0.5/unix/tkDragdrop.c ./unix/tkDragdrop.c *** ../tk8.0.5/unix/tkDragdrop.c Thu Jan 1 09:00:00 1970 --- ./unix/tkDragdrop.c Tue Aug 17 18:54:58 1999 *************** *** 0 **** --- 1,609 ---- + /* + * tkDragdrop.c -- + * + * Drag and drop (DND) support functions and commands + * + * Copyright (c) 1996 Alfredo K. Kojima + * + * Adaption to tk4.2p2 Copyright (c) 1997 Oliver Graf + * + * Full DND 1.0 support Copyright (c) 1997 Oliver Graf + */ + + #include "tkPort.h" + #include "tkInt.h" + + #ifndef MAXINT + #define MAXINT (0x80000000) + #endif + + #ifdef ENABLE_DND + + typedef struct + { + int Width,Height; + char *ImageData,*MaskData; + int HotSpotX,HotSpotY; + Pixmap ImagePixmap,MaskPixmap; + Cursor CursorID; + } CursorData; + + #include "cursor/file.xbm" + #include "cursor/file_mask.xbm" + #include "cursor/files.xbm" + #include "cursor/files_mask.xbm" + #include "cursor/dir.xbm" + #include "cursor/dir_mask.xbm" + #include "cursor/text.xbm" + #include "cursor/text_mask.xbm" + #include "cursor/grey.xbm" + #include "cursor/grey_mask.xbm" + #include "cursor/link.xbm" + #include "cursor/link_mask.xbm" + #include "cursor/app.xbm" + #include "cursor/app_mask.xbm" + #include "cursor/url.xbm" + #include "cursor/url_mask.xbm" + #include "cursor/mime.xbm" + #include "cursor/mime_mask.xbm" + /* + * Cursors to be used during drags + */ + CursorData DndCursor[]={ + { 0,0,NULL,NULL,0,0,0 }, + { grey_width, grey_height, grey_bits, grey_mask_bits, grey_x_hot, grey_y_hot}, + { file_width, file_height, file_bits, file_mask_bits, file_x_hot, file_y_hot}, + { files_width,files_height, files_bits, files_mask_bits,files_x_hot, files_y_hot}, + { text_width, text_height, text_bits, text_mask_bits, text_x_hot, text_y_hot }, + { dir_width, dir_height, dir_bits, dir_mask_bits, dir_x_hot, dir_y_hot}, + { link_width, link_height, link_bits, link_mask_bits, link_x_hot, link_y_hot}, + { app_width, app_height, app_bits, app_mask_bits, app_x_hot, app_y_hot}, + { url_width, url_height, url_bits, url_mask_bits, url_x_hot, url_y_hot }, + { mime_width, mime_height, mime_bits, mime_mask_bits, mime_x_hot, mime_y_hot }, + }; + + static char *DND_STRING_TYPES[]={"Unknown", "RawData", "File", "Files", + "Text", "Dir", "Link", "Exe", "URL", + "MIME",NULL}; + + EXTERN Window XmuClientWindow(Display *dpy, Window win); + + /* + * Limit of property size to retrieve + */ + #define MAX_PROP_DATA 1000000L + + + /* + *------------------------------------------------------------------- + * + * Tk_DndInitialize -- + * + * Initialize drag & drop data structures and other stuff in + * MainInfo + * + * Result: + * None + * + * Side effects: + * DndProtocol and DndSelection atoms are created + * (if they weren't already), and the dndInfo structure in MainInfo + * is initialized + * + *------------------------------------------------------------------- + */ + void + Tk_DndInitialize(interp, tkwin) + Tcl_Interp *interp; + TkWindow *tkwin; + { + int i; + XColor Black,White; + Colormap colormap; + /* Window root = RootWindowOfScreen(Tk_Screen((Tk_Window)tkwin)); */ + /* removes compiler warning */ + + tkwin->mainPtr->dndInfo.DndProtocol= + Tk_InternAtom((Tk_Window)tkwin,"_DND_PROTOCOL"); + tkwin->mainPtr->dndInfo.DndSelection= + Tk_InternAtom((Tk_Window)tkwin,"_DND_SELECTION"); + tkwin->mainPtr->dndInfo.BState = 0; + tkwin->mainPtr->dndInfo.Dragging = 0; + tkwin->mainPtr->dndInfo.Target = None; + tkwin->mainPtr->dndInfo.DataSet = 0; + tkwin->mainPtr->dndInfo.DragPrecision = DRAG_PRECISION; + colormap = DefaultColormapOfScreen(Tk_Screen((Tk_Window)tkwin)); + Black.pixel=BlackPixelOfScreen(Tk_Screen((Tk_Window)tkwin)); + White.pixel=WhitePixelOfScreen(Tk_Screen((Tk_Window)tkwin)); + XQueryColor(tkwin->display,colormap,&Black); + XQueryColor(tkwin->display,colormap,&White); + + for(i = 1; i < DndEND ; i++) { + DndCursor[i].ImagePixmap= + XCreateBitmapFromData(tkwin->display, + RootWindowOfScreen(Tk_Screen((Tk_Window)tkwin)), + DndCursor[i].ImageData, + (unsigned)DndCursor[i].Width, + (unsigned)DndCursor[i].Height); + DndCursor[i].MaskPixmap= + XCreateBitmapFromData(tkwin->display, + RootWindowOfScreen(Tk_Screen((Tk_Window)tkwin)), + DndCursor[i].MaskData, + (unsigned)DndCursor[i].Width, + (unsigned)DndCursor[i].Height); + DndCursor[i].CursorID= + XCreatePixmapCursor(tkwin->display, + DndCursor[i].ImagePixmap, + DndCursor[i].MaskPixmap, + &Black,&White, + (unsigned)DndCursor[i].HotSpotX, + (unsigned)DndCursor[i].HotSpotY); + } + DndCursor[0].CursorID=XCreateFontCursor(tkwin->display, XC_question_arrow); + } + + + + + /* + *--------------------------------------------------------------------- + * + * Tk_DndSetDataCmd -- + * + * This procedure is invoked to process the dnd_setdata command. + * It sets up the data to be dragged, it's type and optionally + * it's size. + * + * Results: + * A standard Tcl result. + * + * Side Effects: + * Modifies dndInfo structure and sets the DND selection buffer on + * the X server. + * + *--------------------------------------------------------------------- + */ + int + Tk_DndSetDataCmd(clientData, interp, argc, argv) + ClientData clientData; /* Main window associated with interpreter. */ + Tcl_Interp *interp; /* Current interpreter. */ + int argc; /* Number of arguments. */ + char **argv; /* Argument strings. */ + { + Tk_Window tkwin = (Tk_Window) clientData; + TkMainInfo *mainPtr = ((TkWindow *)tkwin)->mainPtr; + int bsize, t; + unsigned long size, tmp; + char *adata, *data, *d; + + if ((argc < 3) || (argc > 4)) { + Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0], + " datatype data ?size? \"", (char *) NULL); + return TCL_ERROR; + } + tmp = strlen(argv[2]) + 1; /* don't forget the 0 */ + if (argc == 4) { + if (Tcl_GetInt(interp, argv[3], (int *) &size) != TCL_OK) { + return TCL_ERROR; + } + } else { + size = tmp; + } + if (size > tmp) { + size = tmp; + } + + t=strtoul(argv[1],&d,0); + if (*d!=0) + { + for (t=0; DND_STRING_TYPES[t]!=NULL; t++) + if (strcmp(argv[1], DND_STRING_TYPES[t])==0) + break; + if (DND_STRING_TYPES[t]==NULL) + t=-1; + } + adata=data=strdup(argv[2]); + switch (t) + { + case -1: + Tcl_AppendResult(interp, "bad data type \"", argv[1], + "\" : must be Unknown, RawData, File, Files, Text, Dir, Link, Exe, URL, MIME or a number", + (char *) NULL); + free(data); + return TCL_ERROR; + case DndFile: + case DndText: + case DndDir: + case DndLink: + case DndExe: + case DndURL: + case DndMIME: + mainPtr->dndInfo.DataType = t; + break; + case DndFiles: + /* convert '\n' to '\0' for Files */ + for (d=data; *d; d++) + if (*d=='\n') *d=0; + mainPtr->dndInfo.DataType = t; + break; + case DndUnknown: + case DndRawData: + default: + { + char *ndata; + int i,j; + ndata=(char *)malloc(size+1); + for (i=j=0; i=48 && data[i]<48+32) + ndata[j++]=data[i]-48; + else + { + Tcl_AppendResult(interp, "can't convert data", (char *) NULL); + free(data); + free(ndata); + return TCL_ERROR; + } + } else + ndata[j++]=data[i]; + } + ndata[j++]=0; + free(data); + data=ndata; + size=j; + mainPtr->dndInfo.DataType = t; + } + break; + } + + bsize = size > MAXINT ? MAXINT : (int)size ; + XChangeProperty(Tk_Display(tkwin), RootWindow(Tk_Display(tkwin), + Tk_ScreenNumber(tkwin)), + mainPtr->dndInfo.DndSelection, XA_STRING, + 8, PropModeReplace, data, bsize); + size -= (unsigned long)bsize; + while (size > 0) { + adata += bsize; + bsize = size > MAXINT ? MAXINT : (int)size ; + XChangeProperty(Tk_Display(tkwin), RootWindow(Tk_Display(tkwin), + Tk_ScreenNumber(tkwin)), + mainPtr->dndInfo.DndSelection, XA_STRING, + 8, PropModeAppend, adata, bsize); + size -= (unsigned long)bsize; + } + /* + * signal that data is ready to go + */ + mainPtr->dndInfo.DataSet = 1; + + free(data); + + return TCL_OK; + } + + /* + *------------------------------------------------------------------------ + * + * Tk_DndGetData -- + * Gets dropped data from root window. The maximum size of data + * retrieved if MAX_PROP_DATA + * + * Returns: + * Pointer to data in a 8 bit string format. NULL if an error occurs + * + * Side effects: + * It modifies the selection data changing \0 with \n if + * the data type is DndFiles. It also frees up the data used in the + * last call to it. + * + *------------------------------------------------------------------------ + */ + char * + Tk_DndGetData(tkwin, eventPtr) + Tk_Window tkwin; + XEvent *eventPtr; + { + TkWindow *tkw = (TkWindow *)tkwin; + Atom atype; + int aformat; + unsigned long rmnsize, size; + unsigned char *data, *ndata; + int i,j; + + XGetWindowProperty(eventPtr->xany.display, + RootWindow(eventPtr->xany.display,Tk_ScreenNumber(tkwin)), + tkw->mainPtr->dndInfo.DndSelection, + 0, MAX_PROP_DATA, False, AnyPropertyType, + &atype,&aformat, &size,&rmnsize, &data); + + if (atype == None) { /* uh oh... */ + panic("XGetWindowProperty says it doesn't know DndSelection..."); + } + + switch (eventPtr->xclient.data.l[0]) + { + case DndText: + case DndFile: + case DndExe: + case DndDir: + case DndLink: + case DndURL: + case DndMIME: + return data; + + case DndFiles: + for(i = 0; i < size-1; i++) { /* left last \0 intact */ + if (data[i] == 0) + data[i] = '\n'; + } + return data; + + case DndRawData: + case DndUnknown: + default: + ndata=(unsigned char *)malloc(size*2+1); + for(i=j=0; i < size-1; i++) { + if (data[i]<32) /* map anything below space to '\[0-O]' NULL to Oh */ + { + ndata[j++]='\\'; + ndata[j++]=data[i]+48; + } + else if (data[i]=='\\') /* map backslash to double-backslash */ + { + ndata[j++]='\\'; + ndata[j++]='\\'; + } + else + ndata[j++]=data[i]; + } + ndata[j]=0; + free(data); + return ndata; + } + return NULL; + } + + /* + *------------------------------------------------------------------------ + * + * Tk_DndGetDataSize -- + * Gets the size of the data dropped on us. + * + * Returns: + * Amount of data that was dropped + * + * Side effects: + * None + * + *------------------------------------------------------------------------ + */ + unsigned long + Tk_DndGetDataSize(tkwin, eventPtr) + Tk_Window tkwin; + XEvent *eventPtr; + { + Atom atype; + int aformat; + unsigned long rmnsize, size; + unsigned char *data; + + XGetWindowProperty(eventPtr->xany.display, + RootWindow(eventPtr->xany.display, + Tk_ScreenNumber((Tk_Window)tkwin)), + ((TkWindow *)tkwin)->mainPtr->dndInfo.DndSelection, + 0, MAX_PROP_DATA, False, AnyPropertyType, + &atype,&aformat, &size,&rmnsize, &data); + return size; + } + + /* + *------------------------------------------------------------------------ + * + * Tk_DndGetDataType -- + * Gets the type of the data dropped on us. + * + * Returns: + * Type of data that was dropped. -1 if last event was not a drop + * + * Side effects: + * None + * + *------------------------------------------------------------------------ + */ + int + Tk_DndGetDataType(tkwin, eventPtr) + Tk_Window tkwin; /* not used */ + XEvent *eventPtr; + { + if ((eventPtr->type != ClientMessage) || (eventPtr->xclient.message_type!= + ((TkWindow *)tkwin)->mainPtr->dndInfo.DndProtocol)) { + printf("DndGetDataSize is being called after an invalid event\n"); + return DndUnknown; + } + return eventPtr->xclient.data.l[0]; + } + + /* + *------------------------------------------------------------------------ + * + * Tk_DndGetButtonInfo -- + * Gets the button that dropped on us. + * + * Returns: + * Button number. -1 if last event was not a drop + * + * Side effects: + * None + * + *------------------------------------------------------------------------ + */ + int + Tk_DndGetButtonInfo(tkwin, eventPtr) + Tk_Window tkwin; /* not used */ + XEvent *eventPtr; + { + if ((eventPtr->type != ClientMessage) || (eventPtr->xclient.message_type!= + ((TkWindow *)tkwin)->mainPtr->dndInfo.DndProtocol)) { + printf("DndGetButtonInfo is being called after an invalid event\n"); + return DndUnknown; + } + return eventPtr->xclient.data.l[1]; + } + + /* + *------------------------------------------------------------------------ + * + * Tk_DndGetRootPos -- + * Gets Drop position. + * + * Returns: + * -1 if last event was not a drop + * + * Side effects: + * None + * + *------------------------------------------------------------------------ + */ + int + Tk_DndGetRootPos(tkwin, eventPtr, x, y) + Tk_Window tkwin; /* not used */ + XEvent *eventPtr; + int *x, *y; + { + if ((eventPtr->type != ClientMessage) || (eventPtr->xclient.message_type!= + ((TkWindow *)tkwin)->mainPtr->dndInfo.DndProtocol)) { + printf("DndGetRootPos is being called after an invalid event\n"); + return DndUnknown; + } + *x=eventPtr->xclient.data.l[3]&0xffff; + *y=(eventPtr->xclient.data.l[3]>>16)&0xffff; + return 0; + } + + + /* + *---------------------------------------------------------------------- + * + * Tk_DndHandleDragCmd -- + * + * This procedure is invoked to process the dnd_handledrag command. + * It sets the cursor to be used during the drag, grabs the pointer + * until the user releases the mouse button and signals the + * target. + * + * It should be only executed inside of a drag event handler. + * + * Results: + * A standard Tcl result. + * + * Side Effects: + * Grabs the pointer and sends a ClientMessage event to the target. + * + *--------------------------------------------------------------------- + */ + int + Tk_DndHandleDragCmd(clientData, interp, argc, argv) + ClientData clientData; /* Main window associated with interpreter. */ + Tcl_Interp *interp; /* Current interpreter. */ + int argc; /* Number of arguments. */ + char **argv; /* Argument strings. */ + { + Tk_Window tkwin = (Tk_Window) clientData; + TkMainInfo *mainPtr = ((TkWindow *)tkwin)->mainPtr; + XEvent Event; + Window root = RootWindowOfScreen(Tk_Screen(tkwin)); + Window DispatchWindow; + Cursor cursor; + Tk_Cursor tkcursor = None; + int DropX, DropY; + + if (mainPtr->dndInfo.Dragging != 2) { + Tcl_AppendResult(interp, "must be called during a drag", + (char *) NULL); + return TCL_ERROR; + } + + if (argc > 2) { + Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0], + "?cursor?\"", (char *) NULL); + return TCL_ERROR; + } + + if (argc == 2) { + tkcursor = Tk_GetCursor(interp, tkwin, argv[1]); + if (tkcursor == None) { + return TCL_ERROR; + } + cursor = (Cursor)tkcursor; + } else { + if (mainPtr->dndInfo.DataType>0 + && mainPtr->dndInfo.DataTypedndInfo.DataType].CursorID; + else + cursor = DndCursor[DndRawData].CursorID; + } + XUngrabPointer(Tk_Display(tkwin), CurrentTime); + XGrabPointer(Tk_Display(tkwin), root, False, + ButtonMotionMask|ButtonPressMask|ButtonReleaseMask, + GrabModeSync,GrabModeAsync,root, + cursor, CurrentTime); + mainPtr->dndInfo.Dragging = 3; + mainPtr->dndInfo.RootFlag = 0; + while (mainPtr->dndInfo.Dragging == 3) { + XAllowEvents(Tk_Display(tkwin),SyncPointer,CurrentTime); + XNextEvent(Tk_Display(tkwin),&Event); + if (Event.type == ButtonRelease) { + if (Event.xbutton.subwindow) + mainPtr->dndInfo.RootFlag = 0; + else + mainPtr->dndInfo.RootFlag = 1; + mainPtr->dndInfo.Dragging = 0; + } else { + Tk_HandleEvent(&Event); + } + } + mainPtr->dndInfo.DataSet = 0; + XUngrabPointer(Tk_Display(tkwin), CurrentTime); + + if (tkcursor != None) { + Tk_FreeCursor(Tk_Display(tkwin), tkcursor); + } + + if (!mainPtr->dndInfo.RootFlag) { + mainPtr->dndInfo.Target= + XmuClientWindow(Tk_Display(tkwin),Event.xbutton.subwindow); + if (mainPtr->dndInfo.Target == Event.xbutton.subwindow) + /* dropped on an icon */ + DispatchWindow = mainPtr->dndInfo.Target; + else + /* droppen on a window */ + DispatchWindow = PointerWindow; + } else { + /* Dropped on root */ + DispatchWindow = mainPtr->dndInfo.Target = mainPtr->winPtr->window; + } + DropX=Event.xbutton.x_root; + DropY=Event.xbutton.y_root; + Event.xclient.type = ClientMessage; + Event.xclient.display = Tk_Display(tkwin); + Event.xclient.message_type = mainPtr->dndInfo.DndProtocol; + Event.xclient.format = 32; + Event.xclient.window = mainPtr->dndInfo.Target; + Event.xclient.data.l[0] = mainPtr->dndInfo.DataType; + Event.xclient.data.l[1] = mainPtr->dndInfo.BState; + Event.xclient.data.l[2] = Tk_WindowId(tkwin); + Event.xclient.data.l[3] = DropX + 65536L*(long)DropY; + Event.xclient.data.l[4] = 1; + + XSendEvent(Tk_Display(tkwin),DispatchWindow,True,NoEventMask,&Event); + + mainPtr->dndInfo.DataType = 0; + + return TCL_OK; + } + + + #endif /* ENABLE_DND */ diff -r -c -P -x CVS ../tk8.0.5/unix/tkUnix3d.c ./unix/tkUnix3d.c *** ../tk8.0.5/unix/tkUnix3d.c Tue Sep 15 03:23:55 1998 --- ./unix/tkUnix3d.c Tue Aug 17 18:54:58 1999 *************** *** 11,16 **** --- 11,21 ---- * * RCS: @(#) $Id: tkUnix3d.c,v 1.2 1998/09/14 18:23:55 stanton Exp $ */ + /* + * TkSTEP modifications Copyright (c) Alfredo K. Kojima + * - surgery performed and implanted into Tk8.0 by Steve Murray + */ + #include *************** *** 122,145 **** TkBorder *borderPtr = (TkBorder *) border; GC left, right; Display *display = Tk_Display(tkwin); if ((borderPtr->lightGC == None) && (relief != TK_RELIEF_FLAT)) { TkpGetShadows(borderPtr, tkwin); } if (relief == TK_RELIEF_RAISED) { ! XFillRectangle(display, drawable, ! (leftBevel) ? borderPtr->lightGC : borderPtr->darkGC, ! x, y, (unsigned) width, (unsigned) height); } else if (relief == TK_RELIEF_SUNKEN) { ! XFillRectangle(display, drawable, ! (leftBevel) ? borderPtr->darkGC : borderPtr->lightGC, ! x, y, (unsigned) width, (unsigned) height); } else if (relief == TK_RELIEF_RIDGE) { - int half; - left = borderPtr->lightGC; ! right = borderPtr->darkGC; ridgeGroove: half = width/2; if (!leftBevel && (width & 1)) { --- 127,180 ---- TkBorder *borderPtr = (TkBorder *) border; GC left, right; Display *display = Tk_Display(tkwin); + int half; + if ((borderPtr->lightGC == None) && (relief != TK_RELIEF_FLAT)) { TkpGetShadows(borderPtr, tkwin); } if (relief == TK_RELIEF_RAISED) { ! if (width > 1) { ! if (leftBevel) { ! left = borderPtr->lightGC; ! right = borderPtr->bgGC; ! } else { ! left = borderPtr->darkGC; ! right = borderPtr->dark2GC; ! } ! half = width/2; ! XFillRectangle(display, drawable, left, ! x, y, (unsigned) half, (unsigned) height); ! XFillRectangle(display, drawable, right, ! x+half, y, (unsigned) (width - half), (unsigned) height); ! } else { ! left = (leftBevel) ? borderPtr->lightGC : borderPtr->dark2GC; ! XFillRectangle(display, drawable, left, ! x, y, (unsigned) width, (unsigned) height); ! } } else if (relief == TK_RELIEF_SUNKEN) { ! if (width > 1) { ! if (leftBevel) { ! left = borderPtr->darkGC; ! right = borderPtr->dark2GC; ! } else { ! left = borderPtr->bgGC; ! right = borderPtr->lightGC; ! } ! half = width/2; ! XFillRectangle(display, drawable, left, ! x, y, (unsigned) half, (unsigned) height); ! XFillRectangle(display, drawable, right, ! x + half, y, (unsigned) (width - half), (unsigned) height); ! } else { ! left = (leftBevel) ? borderPtr->dark2GC : borderPtr->lightGC; ! XFillRectangle(display, drawable, left, ! x, y, (unsigned) width, (unsigned) height); ! } } else if (relief == TK_RELIEF_RIDGE) { left = borderPtr->lightGC; ! right = borderPtr->dark2GC; ridgeGroove: half = width/2; if (!leftBevel && (width & 1)) { *************** *** 150,156 **** XFillRectangle(display, drawable, right, x+half, y, (unsigned) (width-half), (unsigned) height); } else if (relief == TK_RELIEF_GROOVE) { ! left = borderPtr->darkGC; right = borderPtr->lightGC; goto ridgeGroove; } else if (relief == TK_RELIEF_FLAT) { --- 185,191 ---- XFillRectangle(display, drawable, right, x+half, y, (unsigned) (width-half), (unsigned) height); } else if (relief == TK_RELIEF_GROOVE) { ! left = borderPtr->dark2GC; right = borderPtr->lightGC; goto ridgeGroove; } else if (relief == TK_RELIEF_FLAT) { *************** *** 236,251 **** topGC = bottomGC = borderPtr->bgGC; break; case TK_RELIEF_GROOVE: ! topGC = borderPtr->darkGC; bottomGC = borderPtr->lightGC; break; case TK_RELIEF_RAISED: ! topGC = bottomGC = ! (topBevel) ? borderPtr->lightGC : borderPtr->darkGC; break; case TK_RELIEF_RIDGE: topGC = borderPtr->lightGC; ! bottomGC = borderPtr->darkGC; break; case TK_RELIEF_SOLID: if (unixBorderPtr->solidGC == None) { --- 271,290 ---- topGC = bottomGC = borderPtr->bgGC; break; case TK_RELIEF_GROOVE: ! topGC = borderPtr->dark2GC; bottomGC = borderPtr->lightGC; break; case TK_RELIEF_RAISED: ! if (height == 1) { ! topGC = (topBevel) ? borderPtr->lightGC : borderPtr->dark2GC; ! } else { ! topGC = (topBevel) ? borderPtr->lightGC : borderPtr->darkGC; ! bottomGC = (topBevel) ? borderPtr->bgGC : borderPtr->dark2GC; ! } break; case TK_RELIEF_RIDGE: topGC = borderPtr->lightGC; ! bottomGC = borderPtr->dark2GC; break; case TK_RELIEF_SOLID: if (unixBorderPtr->solidGC == None) { *************** *** 259,266 **** (unsigned) width, (unsigned) height); return; case TK_RELIEF_SUNKEN: ! topGC = bottomGC = ! (topBevel) ? borderPtr->darkGC : borderPtr->lightGC; break; } --- 298,309 ---- (unsigned) width, (unsigned) height); return; case TK_RELIEF_SUNKEN: ! if (height == 1) { ! topGC = (topBevel) ? borderPtr->dark2GC : borderPtr->lightGC; ! } else { ! topGC = (topBevel) ? borderPtr->darkGC : borderPtr->bgGC; ! bottomGC = (topBevel) ? borderPtr->dark2GC : borderPtr->lightGC; ! } break; } *************** *** 270,280 **** x1 = x; if (!leftIn) { ! x1 += height; } x2 = x+width; if (!rightIn) { ! x2 -= height; } x1Delta = (leftIn) ? 1 : -1; x2Delta = (rightIn) ? -1 : 1; --- 313,323 ---- x1 = x; if (!leftIn) { ! x1 += height-1; } x2 = x+width; if (!rightIn) { ! x2 -= height-1; } x1Delta = (leftIn) ? 1 : -1; x2Delta = (rightIn) ? -1 : 1; *************** *** 285,307 **** bottom = y + height; /* ! * Draw one line for each y-coordinate covered by the bevel. */ ! ! for ( ; y < bottom; y++) { ! /* ! * In some weird cases (such as large border widths for skinny ! * rectangles) x1 can be >= x2. Don't draw the lines ! * in these cases. ! */ ! ! if (x1 < x2) { ! XFillRectangle(display, drawable, ! (y < halfway) ? topGC : bottomGC, x1, y, ! (unsigned) (x2-x1), (unsigned) 1); ! } ! x1 += x1Delta; ! x2 += x2Delta; } } --- 328,359 ---- bottom = y + height; /* ! * if borderwidth is 1, then just draw the line and get out ! */ ! if (height == 1) { ! if (x1 < x2) { ! XFillRectangle(display, drawable, ! topGC, x1, y, (unsigned) (x2-x1-topBevel), (unsigned) 1); ! } ! } else { ! /* ! * Draw one line for each y-coordinate covered by the bevel. ! */ ! for ( ; y < bottom; y++) { ! /* ! * In some weird cases (such as large border widths for skinny ! * rectangles) x1 can be >= x2. Don't draw the lines ! * in these cases. ! */ ! ! if (x1 < x2) { ! XFillRectangle(display, drawable, ! (y < halfway) ? topGC : bottomGC, x1, y, ! (unsigned) (x2-x1-topBevel), (unsigned) 1); ! } ! x1 += x1Delta; ! x2 += x2Delta; ! } } } *************** *** 333,340 **** Tk_Window tkwin; /* Window where border will be used for * drawing. */ { ! XColor lightColor, darkColor; ! int stressed, tmp1, tmp2; XGCValues gcValues; if (borderPtr->lightGC != None) { --- 385,392 ---- Tk_Window tkwin; /* Window where border will be used for * drawing. */ { ! XColor /* lightColor, */ darkColor; /* removes compiler warning */ ! int stressed /*, tmp1, tmp2 */ ; /* removes compiler warning */ XGCValues gcValues; if (borderPtr->lightGC != None) { *************** *** 368,399 **** gcValues.foreground = borderPtr->darkColorPtr->pixel; borderPtr->darkGC = Tk_GetGC(tkwin, GCForeground, &gcValues); ! /* ! * Compute the colors using integers, not using lightColor.red ! * etc.: these are shorts and may have problems with integer ! * overflow. ! */ ! ! tmp1 = (14 * (int) borderPtr->bgColorPtr->red)/10; ! if (tmp1 > MAX_INTENSITY) { ! tmp1 = MAX_INTENSITY; ! } ! tmp2 = (MAX_INTENSITY + (int) borderPtr->bgColorPtr->red)/2; ! lightColor.red = (tmp1 > tmp2) ? tmp1 : tmp2; ! tmp1 = (14 * (int) borderPtr->bgColorPtr->green)/10; ! if (tmp1 > MAX_INTENSITY) { ! tmp1 = MAX_INTENSITY; ! } ! tmp2 = (MAX_INTENSITY + (int) borderPtr->bgColorPtr->green)/2; ! lightColor.green = (tmp1 > tmp2) ? tmp1 : tmp2; ! tmp1 = (14 * (int) borderPtr->bgColorPtr->blue)/10; ! if (tmp1 > MAX_INTENSITY) { ! tmp1 = MAX_INTENSITY; ! } ! tmp2 = (MAX_INTENSITY + (int) borderPtr->bgColorPtr->blue)/2; ! lightColor.blue = (tmp1 > tmp2) ? tmp1 : tmp2; ! borderPtr->lightColorPtr = Tk_GetColorByValue(tkwin, &lightColor); ! gcValues.foreground = borderPtr->lightColorPtr->pixel; borderPtr->lightGC = Tk_GetGC(tkwin, GCForeground, &gcValues); return; } --- 420,435 ---- gcValues.foreground = borderPtr->darkColorPtr->pixel; borderPtr->darkGC = Tk_GetGC(tkwin, GCForeground, &gcValues); ! /* ! * dark2 colous is always black ! */ ! gcValues.foreground = BlackPixelOfScreen(borderPtr->screen); ! borderPtr->dark2GC = Tk_GetGC(tkwin, GCForeground, &gcValues); ! ! /* ! * light colour is always white ! */ ! gcValues.foreground = WhitePixelOfScreen(borderPtr->screen); borderPtr->lightGC = Tk_GetGC(tkwin, GCForeground, &gcValues); return; } *************** *** 422,427 **** --- 458,466 ---- gcValues.background = WhitePixelOfScreen(borderPtr->screen); borderPtr->lightGC = Tk_GetGC(tkwin, GCForeground|GCBackground|GCStipple|GCFillStyle, &gcValues); + gcValues.foreground = gcValues.background; + borderPtr->dark2GC = Tk_GetGC(tkwin, + GCForeground|GCBackground, &gcValues); return; } *************** *** 445,448 **** --- 484,591 ---- borderPtr->darkGC = borderPtr->lightGC; borderPtr->lightGC = Tk_GetGC(tkwin, GCForeground, &gcValues); } + gcValues.foreground = gcValues.background; + borderPtr->dark2GC = Tk_GetGC(tkwin, + GCForeground|GCBackground, &gcValues); } + + + /* + *---------------------------------------------------------------------- + * + * Draw3DCircle -- + * Draws a beveled circle + * + * TODO: Fix circle code + *---------------------------------------------------------------------- + */ + void Tk_Draw3DCircle(display, tkwin, d, x, y, wid, rad, relief, border) + Display *display; + Tk_Window tkwin; + Drawable d; + int x, y; /* position in d */ + int wid; /* border width */ + int rad; + int relief; + Tk_3DBorder border; + { + GC lightGC, darkGC, dark2GC, bgGC; + int half /* , i */ ; /* removes compiler warning */ + + if (relief==TK_RELIEF_SUNKEN) { + lightGC = Tk_3DBorderGC(tkwin, border, TK_3D_LIGHT_GC); + darkGC = Tk_3DBorderGC(tkwin, border, TK_3D_DARK_GC); + dark2GC = Tk_3DBorderGC(tkwin, border, TK_3D_DARK2_GC); + bgGC = Tk_3DBorderGC(tkwin, border, TK_3D_FLAT_GC); + } else { + darkGC = Tk_3DBorderGC(tkwin, border, TK_3D_LIGHT_GC); + lightGC = Tk_3DBorderGC(tkwin, border, TK_3D_DARK_GC); + bgGC = Tk_3DBorderGC(tkwin, border, TK_3D_DARK2_GC); + dark2GC = Tk_3DBorderGC(tkwin, border, TK_3D_FLAT_GC); + } + half = wid/2; + if (half>1) { + XSetLineAttributes(display, darkGC, (unsigned)half, + LineSolid, CapButt, JoinMiter); + XSetLineAttributes(display, lightGC, (unsigned)half, + LineSolid, CapButt, JoinMiter); + XSetLineAttributes(display, dark2GC, (unsigned)half, + LineSolid, CapButt, JoinMiter); + XSetLineAttributes(display, bgGC, (unsigned)half, + LineSolid, CapButt, JoinMiter); + } + /* + * These coords are based on trial and error + */ + XDrawArc(display, d, dark2GC, x, y, (unsigned)(rad*2-half), + (unsigned)(rad*2-half), 60*64, 150*64); + XDrawArc(display, d, darkGC, x, y, (unsigned)(rad*2), + (unsigned)(rad*2), 55*64, 160*64); + XDrawArc(display, d, lightGC, x, y, (unsigned)(rad*2), + (unsigned)(rad*2), 35*64, -160*64); + XDrawArc(display, d, dark2GC, x+half, y+half, (unsigned)(rad*2-half), + (unsigned)(rad*2-half), 60*64, 150*64); + XDrawArc(display, d, bgGC, x, y, (unsigned)(rad*2-half), + (unsigned)(rad*2-half), 30*64, -150*64); + if (half>1) { + XSetLineAttributes(display, dark2GC, 0, LineSolid, CapButt, + JoinMiter); + XSetLineAttributes(display, lightGC, 0, LineSolid, CapButt, + JoinMiter); + XSetLineAttributes(display, darkGC, 0, LineSolid, CapButt, + JoinMiter); + XSetLineAttributes(display, bgGC, 0, LineSolid, CapButt, + JoinMiter); + } + } + + + + /* + *---------------------------------------------------------------------- + * + * DrawCheckMark -- + * + * Draws a 3D check mark on the drawable + * + *---------------------------------------------------------------------- + */ + void Tk_DrawCheckMark(display, tkwin, d, x, y, border) + Display *display; + Tk_Window tkwin; + Drawable d; + int x, y; /* position in d */ + Tk_3DBorder border; + { + GC lightGC, darkGC, dark2GC; + + lightGC = Tk_3DBorderGC(tkwin,border,TK_3D_LIGHT_GC); + darkGC = Tk_3DBorderGC(tkwin,border,TK_3D_DARK_GC); + dark2GC = Tk_3DBorderGC(tkwin,border,TK_3D_DARK2_GC); + XDrawLine(display, d, dark2GC, x+1, y+3, x+1, y+6); + XDrawLine(display, d, lightGC, x, y+3, x, y+8); + XDrawLine(display, d, lightGC, x, y+8, x+8, y); + XDrawLine(display, d, dark2GC, x, y+9, x+8, y+1); + XDrawLine(display, d, darkGC, x+1, y+9, x+8, y+2); + } + diff -r -c -P -x CVS ../tk8.0.5/unix/tkUnixButton.c ./unix/tkUnixButton.c *** ../tk8.0.5/unix/tkUnixButton.c Tue Aug 17 18:48:57 1999 --- ./unix/tkUnixButton.c Tue Aug 17 18:54:58 1999 *************** *** 11,16 **** --- 11,21 ---- * * RCS: @(#) $Id: tkUnixButton.c,v 1.2 1998/09/14 18:23:55 stanton Exp $ */ + /* + * TkSTEP modifications Copyright (c) Alfredo K. Kojima + * - surgery performed and implanted into Tk8.0 by Steve Murray + */ + #include "tkButton.h" *************** *** 107,116 **** } else { gc = butPtr->normalTextGC; } - if ((butPtr->flags & SELECTED) && (butPtr->state != tkActiveUid) - && (butPtr->selectBorder != NULL) && !butPtr->indicatorOn) { - border = butPtr->selectBorder; - } /* * Override the relief specified for the button if this is a --- 112,117 ---- *************** *** 123,129 **** : TK_RELIEF_RAISED; } ! offset = (butPtr->type == TYPE_BUTTON) && !Tk_StrictMotif(butPtr->tkwin); /* * In order to avoid screen flashes, this procedure redraws --- 124,137 ---- : TK_RELIEF_RAISED; } ! #ifdef ENABLE_STEP ! if (butPtr->type == TYPE_BUTTON) ! offset = 1; ! else ! offset = 0; ! #else ! offset = (butPtr->type == TYPE_BUTTON) && !Tk_StrictMotif(butPtr->tkwin); ! #endif /* * In order to avoid screen flashes, this procedure redraws *************** *** 145,156 **** --- 153,201 ---- Tk_SizeOfImage(butPtr->image, &width, &height); imageOrBitmap: + #ifdef ENABLE_STEP + switch (butPtr->anchor) { + case TK_ANCHOR_NW: case TK_ANCHOR_W: case TK_ANCHOR_SW: + if ((butPtr->type == TYPE_BUTTON) && (butPtr->flags & INDICATORON)) { + x = butPtr->inset + offset; + } else + x = butPtr->inset + butPtr->indicatorSpace + offset; + break; + case TK_ANCHOR_N: case TK_ANCHOR_CENTER: case TK_ANCHOR_S: + if ((butPtr->type == TYPE_BUTTON) && (butPtr->flags & INDICATORON)) { + x = ((int) (Tk_Width(tkwin) - butPtr->indicatorSpace + - width))/2; + } else + x = ((int) (Tk_Width(tkwin) + butPtr->indicatorSpace + - width))/2; + break; + default: + if ((butPtr->type == TYPE_BUTTON) && (butPtr->flags & INDICATORON)) { + x = Tk_Width(tkwin) - butPtr->indicatorSpace + - butPtr->inset - width - offset; + } else + x = Tk_Width(tkwin) - butPtr->inset - width - offset; + break; + } + switch (butPtr->anchor) { + case TK_ANCHOR_NW: case TK_ANCHOR_N: case TK_ANCHOR_NE: + y = butPtr->inset + offset; + break; + case TK_ANCHOR_W: case TK_ANCHOR_CENTER: case TK_ANCHOR_E: + y = ((int) (Tk_Height(tkwin) - height))/2; + break; + default: + y = Tk_Height(tkwin) - butPtr->inset - height - offset; + break; + } + #else TkComputeAnchor(butPtr->anchor, tkwin, 0, 0, butPtr->indicatorSpace + width, height, &x, &y); x += butPtr->indicatorSpace; x += offset; y += offset; + #endif if (relief == TK_RELIEF_RAISED) { x -= offset; y -= offset; *************** *** 177,182 **** --- 222,266 ---- Tk_SizeOfBitmap(butPtr->display, butPtr->bitmap, &width, &height); goto imageOrBitmap; } else { + #ifdef ENABLE_STEP + switch (butPtr->anchor) { + case TK_ANCHOR_NW: case TK_ANCHOR_W: case TK_ANCHOR_SW: + if ((butPtr->type == TYPE_BUTTON) && (butPtr->flags & INDICATORON)) { + x = butPtr->inset + butPtr->padX + offset; + } else + x = butPtr->inset + butPtr->padX + butPtr->indicatorSpace + + offset; + break; + case TK_ANCHOR_N: case TK_ANCHOR_CENTER: case TK_ANCHOR_S: + if ((butPtr->type == TYPE_BUTTON) && (butPtr->flags & INDICATORON)) { + x = ((int) (Tk_Width(tkwin) - butPtr->indicatorSpace + - butPtr->textWidth))/2; + } else + x = ((int) (Tk_Width(tkwin) + butPtr->indicatorSpace + - butPtr->textWidth))/2; + break; + default: + if ((butPtr->type == TYPE_BUTTON) && (butPtr->flags & INDICATORON)) { + x = (Tk_Width(tkwin)-butPtr->indicatorSpace)-butPtr->inset + - butPtr->padX - butPtr->textWidth - offset; + } else + x = Tk_Width(tkwin) - butPtr->inset - butPtr->padX + - butPtr->textWidth - offset; + break; + } + switch (butPtr->anchor) { + case TK_ANCHOR_NW: case TK_ANCHOR_N: case TK_ANCHOR_NE: + y = butPtr->inset + butPtr->padY + offset; + break; + case TK_ANCHOR_W: case TK_ANCHOR_CENTER: case TK_ANCHOR_E: + y = ((int) (Tk_Height(tkwin) - butPtr->textHeight))/2; + break; + default: + y = Tk_Height(tkwin) - butPtr->inset - butPtr->padY + - butPtr->textHeight - offset; + break; + } + #else TkComputeAnchor(butPtr->anchor, tkwin, butPtr->padX, butPtr->padY, butPtr->indicatorSpace + butPtr->textWidth, butPtr->textHeight, &x, &y); *************** *** 185,190 **** --- 269,275 ---- x += offset; y += offset; + #endif if (relief == TK_RELIEF_RAISED) { x -= offset; y -= offset; *************** *** 205,210 **** --- 290,333 ---- * or bitmap. */ + #ifdef ENABLE_STEP + /* Draw return indicator for button */ + if (butPtr->type == TYPE_BUTTON && (butPtr->flags & INDICATORON)) { + XPoint points[4]; + int dim = RETURN_HEIGHT; + + x = Tk_Width(tkwin)-(butPtr->indicatorSpace*2)/3 - butPtr->borderWidth; + y = Tk_Height(tkwin)/2; + if (relief == TK_RELIEF_RAISED) { + x -= offset; + y -= offset; + } else if (relief == TK_RELIEF_SUNKEN) { + x += offset; + y += offset; + } + points[0].x = x+(6*dim)/10; points[0].y = y-(4*dim)/10; + points[1].x = x+(6*dim)/10; points[1].y = y+(2*dim)/10; + points[2].x = x-(3*dim)/10; points[2].y = y+(2*dim)/10; + points[3].x = x-(3*dim)/10; points[3].y = y+(4*dim)/10; + XDrawLines(Tk_Display(tkwin), pixmap, + Tk_3DBorderGC(tkwin,border,TK_3D_LIGHT_GC), + points, 4, CoordModeOrigin); + points[0].x = x-(4*dim)/10; points[0].y = y+(4*dim)/10; + points[1].x = x-(8*dim)/10; points[1].y = y; + points[2].x = x-(4*dim)/10; points[2].y = y-(4*dim)/10; + points[3].x = x-(3*dim)/10; points[3].y = y-(4*dim)/10; + XDrawLines(Tk_Display(tkwin), pixmap, + Tk_3DBorderGC(tkwin,border,TK_3D_DARK2_GC), + points, 4, CoordModeOrigin); + points[0].x = x-(2*dim)/10; points[0].y = y-(2*dim)/10; + points[1].x = x+(2*dim)/10; points[1].y = y-(2*dim)/10; + points[2].x = x+(2*dim)/10; points[2].y = y-(5*dim)/10; + points[3].x = x+(5*dim)/10; points[3].y = y-(5*dim)/10; + XDrawLines(Tk_Display(tkwin), pixmap, + Tk_3DBorderGC(tkwin,border,TK_3D_DARK2_GC), + points, 4, CoordModeOrigin); + } else + #endif if ((butPtr->type == TYPE_CHECK_BUTTON) && butPtr->indicatorOn) { int dim; *************** *** 212,265 **** x -= butPtr->indicatorSpace; y -= dim/2; if (dim > 2*butPtr->borderWidth) { ! Tk_Draw3DRectangle(tkwin, pixmap, border, x, y, dim, dim, ! butPtr->borderWidth, ! (butPtr->flags & SELECTED) ? TK_RELIEF_SUNKEN : ! TK_RELIEF_RAISED); x += butPtr->borderWidth; y += butPtr->borderWidth; dim -= 2*butPtr->borderWidth; if (butPtr->flags & SELECTED) { ! GC gc; ! ! gc = Tk_3DBorderGC(tkwin,(butPtr->selectBorder != NULL) ! ? butPtr->selectBorder : butPtr->normalBorder, ! TK_3D_FLAT_GC); ! XFillRectangle(butPtr->display, pixmap, gc, x, y, ! (unsigned int) dim, (unsigned int) dim); ! } else { ! Tk_Fill3DRectangle(tkwin, pixmap, butPtr->normalBorder, x, y, ! dim, dim, butPtr->borderWidth, TK_RELIEF_FLAT); } } } else if ((butPtr->type == TYPE_RADIO_BUTTON) && butPtr->indicatorOn) { - XPoint points[4]; int radius; radius = butPtr->indicatorDiameter/2; - points[0].x = x - butPtr->indicatorSpace; - points[0].y = y; - points[1].x = points[0].x + radius; - points[1].y = points[0].y + radius; - points[2].x = points[1].x + radius; - points[2].y = points[0].y; - points[3].x = points[1].x; - points[3].y = points[0].y - radius; if (butPtr->flags & SELECTED) { - GC gc; - gc = Tk_3DBorderGC(tkwin, (butPtr->selectBorder != NULL) ? butPtr->selectBorder : butPtr->normalBorder, TK_3D_FLAT_GC); ! XFillPolygon(butPtr->display, pixmap, gc, points, 4, Convex, ! CoordModeOrigin); } else { ! Tk_Fill3DPolygon(tkwin, pixmap, butPtr->normalBorder, points, ! 4, butPtr->borderWidth, TK_RELIEF_FLAT); ! } ! Tk_Draw3DPolygon(tkwin, pixmap, border, points, 4, butPtr->borderWidth, ! (butPtr->flags & SELECTED) ? TK_RELIEF_SUNKEN : ! TK_RELIEF_RAISED); } /* --- 335,373 ---- x -= butPtr->indicatorSpace; y -= dim/2; if (dim > 2*butPtr->borderWidth) { ! Tk_Fill3DRectangle(tkwin, pixmap, border, x, y, dim, dim, ! butPtr->borderWidth, TK_RELIEF_RAISED); x += butPtr->borderWidth; y += butPtr->borderWidth; dim -= 2*butPtr->borderWidth; if (butPtr->flags & SELECTED) { ! Tk_DrawCheckMark(butPtr->display, tkwin, pixmap, ! x+1+(dim-CHECK_WIDTH)/2, y+(dim-CHECK_HEIGHT)/2, ! butPtr->normalBorder); } } } else if ((butPtr->type == TYPE_RADIO_BUTTON) && butPtr->indicatorOn) { int radius; + GC gc; radius = butPtr->indicatorDiameter/2; if (butPtr->flags & SELECTED) { gc = Tk_3DBorderGC(tkwin, (butPtr->selectBorder != NULL) ? butPtr->selectBorder : butPtr->normalBorder, TK_3D_FLAT_GC); ! XFillArc(butPtr->display, pixmap, gc, x-butPtr->indicatorSpace+ ! butPtr->borderWidth, butPtr->borderWidth + y-radius, ! (unsigned)(radius*2-butPtr->borderWidth-1), ! (unsigned)(radius*2-butPtr->borderWidth-1), 0, 360*64); } else { ! gc = Tk_3DBorderGC(tkwin, butPtr->normalBorder, TK_3D_FLAT_GC); ! XFillArc(butPtr->display, pixmap, gc, x-butPtr->indicatorSpace, ! y-radius, (unsigned)(radius*2-butPtr->borderWidth-1), ! (unsigned)(radius*2-butPtr->borderWidth-1), 0, 360*64); ! } ! Tk_Draw3DCircle(butPtr->display, tkwin,pixmap, x-butPtr->indicatorSpace, ! y-radius, butPtr->borderWidth, radius, TK_RELIEF_SUNKEN, ! butPtr->normalBorder); } /* *************** *** 271,277 **** if ((butPtr->state == tkDisabledUid) && ((butPtr->disabledFg == NULL) || (butPtr->image != NULL))) { ! if ((butPtr->flags & SELECTED) && !butPtr->indicatorOn && (butPtr->selectBorder != NULL)) { XSetForeground(butPtr->display, butPtr->disabledGC, Tk_3DBorderColor(butPtr->selectBorder)->pixel); --- 379,385 ---- if ((butPtr->state == tkDisabledUid) && ((butPtr->disabledFg == NULL) || (butPtr->image != NULL))) { ! if ((butPtr->flags & SELECTED) && !(butPtr->flags & INDICATORON) && (butPtr->selectBorder != NULL)) { XSetForeground(butPtr->display, butPtr->disabledGC, Tk_3DBorderColor(butPtr->selectBorder)->pixel); *************** *** 280,286 **** butPtr->inset, butPtr->inset, (unsigned) (Tk_Width(tkwin) - 2*butPtr->inset), (unsigned) (Tk_Height(tkwin) - 2*butPtr->inset)); ! if ((butPtr->flags & SELECTED) && !butPtr->indicatorOn && (butPtr->selectBorder != NULL)) { XSetForeground(butPtr->display, butPtr->disabledGC, Tk_3DBorderColor(butPtr->normalBorder)->pixel); --- 388,394 ---- butPtr->inset, butPtr->inset, (unsigned) (Tk_Width(tkwin) - 2*butPtr->inset), (unsigned) (Tk_Height(tkwin) - 2*butPtr->inset)); ! if ((butPtr->flags & SELECTED) && !(butPtr->flags & INDICATORON) && (butPtr->selectBorder != NULL)) { XSetForeground(butPtr->display, butPtr->disabledGC, Tk_3DBorderColor(butPtr->normalBorder)->pixel); *************** *** 297,335 **** if (relief != TK_RELIEF_FLAT) { int inset = butPtr->highlightWidth; - if (butPtr->defaultState == tkActiveUid) { - /* - * Draw the default ring with 2 pixels of space between the - * default ring and the button and the default ring and the - * focus ring. Note that we need to explicitly draw the space - * in the highlightBorder color to ensure that we overwrite any - * overflow text and/or a different button background color. - */ - - Tk_Draw3DRectangle(tkwin, pixmap, butPtr->highlightBorder, inset, - inset, Tk_Width(tkwin) - 2*inset, - Tk_Height(tkwin) - 2*inset, 2, TK_RELIEF_FLAT); - inset += 2; - Tk_Draw3DRectangle(tkwin, pixmap, butPtr->highlightBorder, inset, - inset, Tk_Width(tkwin) - 2*inset, - Tk_Height(tkwin) - 2*inset, 1, TK_RELIEF_SUNKEN); - inset++; - Tk_Draw3DRectangle(tkwin, pixmap, butPtr->highlightBorder, inset, - inset, Tk_Width(tkwin) - 2*inset, - Tk_Height(tkwin) - 2*inset, 2, TK_RELIEF_FLAT); - - inset += 2; - } else if (butPtr->defaultState == tkNormalUid) { - /* - * Leave room for the default ring and write over any text or - * background color. - */ - - Tk_Draw3DRectangle(tkwin, pixmap, butPtr->highlightBorder, 0, - 0, Tk_Width(tkwin), - Tk_Height(tkwin), 5, TK_RELIEF_FLAT); - inset += 5; - } /* * Draw the button border. --- 405,410 ---- *************** *** 339,344 **** --- 414,420 ---- Tk_Width(tkwin) - 2*inset, Tk_Height(tkwin) - 2*inset, butPtr->borderWidth, relief); } + if (butPtr->highlightWidth != 0) { GC gc; *************** *** 348,365 **** gc = Tk_GCForColor(Tk_3DBorderColor(butPtr->highlightBorder), pixmap); } - - /* - * Make sure the focus ring shrink-wraps the actual button, not the - * padding space left for a default ring. - */ - - if (butPtr->defaultState == tkNormalUid) { - TkDrawInsetFocusHighlight(tkwin, gc, butPtr->highlightWidth, - pixmap, 5); - } else { - Tk_DrawFocusHighlight(tkwin, gc, butPtr->highlightWidth, pixmap); - } } /* --- 424,429 ---- *************** *** 406,415 **** /* * Leave room for the default ring if needed. */ ! if (butPtr->defaultState != tkDisabledUid) { butPtr->inset += 5; } butPtr->indicatorSpace = 0; if (butPtr->image != NULL) { Tk_SizeOfImage(butPtr->image, &width, &height); --- 470,480 ---- /* * Leave room for the default ring if needed. */ ! /* if (butPtr->defaultState != tkDisabledUid) { butPtr->inset += 5; } + */ butPtr->indicatorSpace = 0; if (butPtr->image != NULL) { Tk_SizeOfImage(butPtr->image, &width, &height); *************** *** 458,469 **** if ((butPtr->type >= TYPE_CHECK_BUTTON) && butPtr->indicatorOn) { butPtr->indicatorDiameter = fm.linespace; if (butPtr->type == TYPE_CHECK_BUTTON) { ! butPtr->indicatorDiameter = (80*butPtr->indicatorDiameter)/100; } butPtr->indicatorSpace = butPtr->indicatorDiameter + avgWidth; } } /* * When issuing the geometry request, add extra space for the indicator, * if any, and for the border and padding, plus two extra pixels so the --- 523,541 ---- if ((butPtr->type >= TYPE_CHECK_BUTTON) && butPtr->indicatorOn) { butPtr->indicatorDiameter = fm.linespace; if (butPtr->type == TYPE_CHECK_BUTTON) { ! butPtr->indicatorDiameter++; } butPtr->indicatorSpace = butPtr->indicatorDiameter + avgWidth; } } + #ifdef ENABLE_STEP + if ((butPtr->flags & INDICATORON) && (butPtr->type == TYPE_BUTTON)) { + butPtr->indicatorDiameter = RETURN_HEIGHT; + butPtr->indicatorSpace = RETURN_WIDTH; + } + #endif + /* * When issuing the geometry request, add extra space for the indicator, * if any, and for the border and padding, plus two extra pixels so the *************** *** 475,484 **** --- 547,560 ---- width += 2*butPtr->padX; height += 2*butPtr->padY; } + + #ifndef ENABLE_STEP if ((butPtr->type == TYPE_BUTTON) && !Tk_StrictMotif(butPtr->tkwin)) { width += 2; height += 2; } + #endif + Tk_GeometryRequest(butPtr->tkwin, (int) (width + butPtr->indicatorSpace + 2*butPtr->inset), (int) (height + 2*butPtr->inset)); Tk_SetInternalBorder(butPtr->tkwin, butPtr->inset); diff -r -c -P -x CVS ../tk8.0.5/unix/tkUnixDefault.h ./unix/tkUnixDefault.h *** ../tk8.0.5/unix/tkUnixDefault.h Tue Aug 17 18:48:57 1999 --- ./unix/tkUnixDefault.h Wed Aug 18 00:13:49 1999 *************** *** 12,17 **** --- 12,22 ---- * * RCS: @(#) $Id: tkUnixDefault.h,v 1.2 1998/09/14 18:23:55 stanton Exp $ */ + /* + * TkSTEP modifications copyright (c) Alfredo K. Kojima + * - surgery performed and implanted into Tk8.0 by Steve Murray + */ + #ifndef _TKUNIXDEFAULT #define _TKUNIXDEFAULT *************** *** 29,51 **** #define BLACK "Black" #define WHITE "White" ! #define NORMAL_BG "#d9d9d9" ! #define ACTIVE_BG "#ececec" #define SELECT_BG "#c3c3c3" ! #define TROUGH "#c3c3c3" ! #define INDICATOR "#b03060" ! #define DISABLED "#a3a3a3" /* * Defaults for labels, buttons, checkbuttons, and radiobuttons: */ #define DEF_BUTTON_ANCHOR "center" ! #define DEF_BUTTON_ACTIVE_BG_COLOR ACTIVE_BG ! #define DEF_BUTTON_ACTIVE_BG_MONO BLACK #define DEF_BUTTON_ACTIVE_FG_COLOR BLACK #define DEF_CHKRAD_ACTIVE_FG_COLOR DEF_BUTTON_ACTIVE_FG_COLOR ! #define DEF_BUTTON_ACTIVE_FG_MONO WHITE #define DEF_BUTTON_BG_COLOR NORMAL_BG #define DEF_BUTTON_BG_MONO WHITE #define DEF_BUTTON_BITMAP "" --- 34,56 ---- #define BLACK "Black" #define WHITE "White" ! #define NORMAL_BG "#bfbfbf" ! #define ACTIVE_BG "#ffffff" #define SELECT_BG "#c3c3c3" ! #define TROUGH "#bfbfbf" ! #define INDICATOR "#ffffff" ! #define DISABLED "#636363" /* * Defaults for labels, buttons, checkbuttons, and radiobuttons: */ #define DEF_BUTTON_ANCHOR "center" ! #define DEF_BUTTON_ACTIVE_BG_COLOR NORMAL_BG ! #define DEF_BUTTON_ACTIVE_BG_MONO WHITE #define DEF_BUTTON_ACTIVE_FG_COLOR BLACK #define DEF_CHKRAD_ACTIVE_FG_COLOR DEF_BUTTON_ACTIVE_FG_COLOR ! #define DEF_BUTTON_ACTIVE_FG_MONO BLACK #define DEF_BUTTON_BG_COLOR NORMAL_BG #define DEF_BUTTON_BG_MONO WHITE #define DEF_BUTTON_BITMAP "" *************** *** 60,74 **** #ifdef KANJI #define DEF_BUTTON_FONT "Mincho:Helvetica-Bold-12" #else ! #define DEF_BUTTON_FONT "Helvetica -12 bold" #endif /* KANJI */ #define DEF_BUTTON_HEIGHT "0" #define DEF_BUTTON_HIGHLIGHT_BG NORMAL_BG #define DEF_BUTTON_HIGHLIGHT BLACK #define DEF_LABEL_HIGHLIGHT_WIDTH "0" ! #define DEF_BUTTON_HIGHLIGHT_WIDTH "1" #define DEF_BUTTON_IMAGE (char *) NULL #define DEF_BUTTON_INDICATOR "1" #define DEF_BUTTON_JUSTIFY "center" #define DEF_BUTTON_OFF_VALUE "0" #define DEF_BUTTON_ON_VALUE "1" --- 65,82 ---- #ifdef KANJI #define DEF_BUTTON_FONT "Mincho:Helvetica-Bold-12" #else ! #define DEF_BUTTON_FONT "Helvetica -12 normal" #endif /* KANJI */ #define DEF_BUTTON_HEIGHT "0" #define DEF_BUTTON_HIGHLIGHT_BG NORMAL_BG #define DEF_BUTTON_HIGHLIGHT BLACK #define DEF_LABEL_HIGHLIGHT_WIDTH "0" ! #define DEF_BUTTON_HIGHLIGHT_WIDTH "0" #define DEF_BUTTON_IMAGE (char *) NULL #define DEF_BUTTON_INDICATOR "1" + #ifdef ENABLE_STEP + #define DEF_BUTTON_RTRNINDICATOR "0" + #endif #define DEF_BUTTON_JUSTIFY "center" #define DEF_BUTTON_OFF_VALUE "0" #define DEF_BUTTON_ON_VALUE "1" *************** *** 106,112 **** #define DEF_CANVAS_HEIGHT "7c" #define DEF_CANVAS_HIGHLIGHT_BG NORMAL_BG #define DEF_CANVAS_HIGHLIGHT BLACK ! #define DEF_CANVAS_HIGHLIGHT_WIDTH "1" #define DEF_CANVAS_INSERT_BG BLACK #define DEF_CANVAS_INSERT_BD_COLOR "0" #define DEF_CANVAS_INSERT_BD_MONO "0" --- 114,120 ---- #define DEF_CANVAS_HEIGHT "7c" #define DEF_CANVAS_HIGHLIGHT_BG NORMAL_BG #define DEF_CANVAS_HIGHLIGHT BLACK ! #define DEF_CANVAS_HIGHLIGHT_WIDTH "0" #define DEF_CANVAS_INSERT_BG BLACK #define DEF_CANVAS_INSERT_BD_COLOR "0" #define DEF_CANVAS_INSERT_BD_MONO "0" *************** *** 132,138 **** * Defaults for entries: */ ! #define DEF_ENTRY_BG_COLOR NORMAL_BG #define DEF_ENTRY_BG_MONO WHITE #define DEF_ENTRY_BORDER_WIDTH "2" #define DEF_ENTRY_CURSOR "xterm" --- 140,146 ---- * Defaults for entries: */ ! #define DEF_ENTRY_BG_COLOR WHITE #define DEF_ENTRY_BG_MONO WHITE #define DEF_ENTRY_BORDER_WIDTH "2" #define DEF_ENTRY_CURSOR "xterm" *************** *** 145,151 **** #define DEF_ENTRY_FG BLACK #define DEF_ENTRY_HIGHLIGHT_BG NORMAL_BG #define DEF_ENTRY_HIGHLIGHT BLACK ! #define DEF_ENTRY_HIGHLIGHT_WIDTH "1" #define DEF_ENTRY_INSERT_BG BLACK #define DEF_ENTRY_INSERT_BD_COLOR "0" #define DEF_ENTRY_INSERT_BD_MONO "0" --- 153,159 ---- #define DEF_ENTRY_FG BLACK #define DEF_ENTRY_HIGHLIGHT_BG NORMAL_BG #define DEF_ENTRY_HIGHLIGHT BLACK ! #define DEF_ENTRY_HIGHLIGHT_WIDTH "0" #define DEF_ENTRY_INSERT_BG BLACK #define DEF_ENTRY_INSERT_BD_COLOR "0" #define DEF_ENTRY_INSERT_BD_MONO "0" *************** *** 160,166 **** #define DEF_ENTRY_SELECT_BD_COLOR "1" #define DEF_ENTRY_SELECT_BD_MONO "0" #define DEF_ENTRY_SELECT_FG_COLOR BLACK ! #define DEF_ENTRY_SELECT_FG_MONO WHITE #define DEF_ENTRY_SHOW (char *) NULL #define DEF_ENTRY_STATE "normal" #define DEF_ENTRY_TAKE_FOCUS (char *) NULL --- 168,174 ---- #define DEF_ENTRY_SELECT_BD_COLOR "1" #define DEF_ENTRY_SELECT_BD_MONO "0" #define DEF_ENTRY_SELECT_FG_COLOR BLACK ! #define DEF_ENTRY_SELECT_FG_MONO BLACK #define DEF_ENTRY_SHOW (char *) NULL #define DEF_ENTRY_STATE "normal" #define DEF_ENTRY_TAKE_FOCUS (char *) NULL *************** *** 180,192 **** #define DEF_FRAME_CURSOR "" #define DEF_FRAME_HEIGHT "0" #define DEF_FRAME_HIGHLIGHT_BG NORMAL_BG ! #define DEF_FRAME_HIGHLIGHT BLACK #define DEF_FRAME_HIGHLIGHT_WIDTH "0" #define DEF_FRAME_RELIEF "flat" #define DEF_FRAME_TAKE_FOCUS "0" #define DEF_FRAME_USE "" #define DEF_FRAME_VISUAL "" #define DEF_FRAME_WIDTH "0" /* * Defaults for listboxes: --- 188,210 ---- #define DEF_FRAME_CURSOR "" #define DEF_FRAME_HEIGHT "0" #define DEF_FRAME_HIGHLIGHT_BG NORMAL_BG ! #define DEF_FRAME_HIGHLIGHT WHITE #define DEF_FRAME_HIGHLIGHT_WIDTH "0" #define DEF_FRAME_RELIEF "flat" #define DEF_FRAME_TAKE_FOCUS "0" #define DEF_FRAME_USE "" #define DEF_FRAME_VISUAL "" #define DEF_FRAME_WIDTH "0" + #ifdef ENABLE_STEP + #define DEF_FRAME_FG BLACK + #ifdef KANJI + #define DEF_FRAME_FONT "Mincho:Helvetica-12" + #else + #define DEF_FRAME_FONT "Helvetica -12" + #endif /* KANJI */ + #define DEF_FRAME_JUSTIFY "center" + #define DEF_FRAME_TEXT "" + #endif /* * Defaults for listboxes: *************** *** 200,217 **** #ifdef KANJI #define DEF_LISTBOX_FONT "Mincho:Helvetica-Bold-12" #else ! #define DEF_LISTBOX_FONT "Helvetica -12 bold" #endif /* KANJI */ #define DEF_LISTBOX_FG BLACK #define DEF_LISTBOX_HEIGHT "10" #define DEF_LISTBOX_HIGHLIGHT_BG NORMAL_BG #define DEF_LISTBOX_HIGHLIGHT BLACK ! #define DEF_LISTBOX_HIGHLIGHT_WIDTH "1" #define DEF_LISTBOX_RELIEF "sunken" #define DEF_LISTBOX_SCROLL_COMMAND "" ! #define DEF_LISTBOX_SELECT_COLOR SELECT_BG #define DEF_LISTBOX_SELECT_MONO BLACK ! #define DEF_LISTBOX_SELECT_BD "1" #define DEF_LISTBOX_SELECT_FG_COLOR BLACK #define DEF_LISTBOX_SELECT_FG_MONO WHITE #define DEF_LISTBOX_SELECT_MODE "browse" --- 218,235 ---- #ifdef KANJI #define DEF_LISTBOX_FONT "Mincho:Helvetica-Bold-12" #else ! #define DEF_LISTBOX_FONT "Helvetica -12 normal" #endif /* KANJI */ #define DEF_LISTBOX_FG BLACK #define DEF_LISTBOX_HEIGHT "10" #define DEF_LISTBOX_HIGHLIGHT_BG NORMAL_BG #define DEF_LISTBOX_HIGHLIGHT BLACK ! #define DEF_LISTBOX_HIGHLIGHT_WIDTH "0" #define DEF_LISTBOX_RELIEF "sunken" #define DEF_LISTBOX_SCROLL_COMMAND "" ! #define DEF_LISTBOX_SELECT_COLOR WHITE #define DEF_LISTBOX_SELECT_MONO BLACK ! #define DEF_LISTBOX_SELECT_BD "0" #define DEF_LISTBOX_SELECT_FG_COLOR BLACK #define DEF_LISTBOX_SELECT_FG_MONO WHITE #define DEF_LISTBOX_SELECT_MODE "browse" *************** *** 252,261 **** */ #define DEF_MENU_ACTIVE_BG_COLOR ACTIVE_BG ! #define DEF_MENU_ACTIVE_BG_MONO BLACK #define DEF_MENU_ACTIVE_BORDER_WIDTH "2" #define DEF_MENU_ACTIVE_FG_COLOR BLACK ! #define DEF_MENU_ACTIVE_FG_MONO WHITE #define DEF_MENU_BG_COLOR NORMAL_BG #define DEF_MENU_BG_MONO WHITE #define DEF_MENU_BORDER_WIDTH "2" --- 270,279 ---- */ #define DEF_MENU_ACTIVE_BG_COLOR ACTIVE_BG ! #define DEF_MENU_ACTIVE_BG_MONO WHITE #define DEF_MENU_ACTIVE_BORDER_WIDTH "2" #define DEF_MENU_ACTIVE_FG_COLOR BLACK ! #define DEF_MENU_ACTIVE_FG_MONO BLACK #define DEF_MENU_BG_COLOR NORMAL_BG #define DEF_MENU_BG_MONO WHITE #define DEF_MENU_BORDER_WIDTH "2" *************** *** 265,271 **** #ifdef KANJI #define DEF_MENU_FONT "Mincho:Helvetica-Bold-12" #else ! #define DEF_MENU_FONT "Helvetica -12 bold" #endif /* KANJI */ #define DEF_MENU_FG BLACK #define DEF_MENU_POST_COMMAND "" --- 283,289 ---- #ifdef KANJI #define DEF_MENU_FONT "Mincho:Helvetica-Bold-12" #else ! #define DEF_MENU_FONT "Helvetica -12 normal" #endif /* KANJI */ #define DEF_MENU_FG BLACK #define DEF_MENU_POST_COMMAND "" *************** *** 283,292 **** */ #define DEF_MENUBUTTON_ANCHOR "center" ! #define DEF_MENUBUTTON_ACTIVE_BG_COLOR ACTIVE_BG ! #define DEF_MENUBUTTON_ACTIVE_BG_MONO BLACK #define DEF_MENUBUTTON_ACTIVE_FG_COLOR BLACK ! #define DEF_MENUBUTTON_ACTIVE_FG_MONO WHITE #define DEF_MENUBUTTON_BG_COLOR NORMAL_BG #define DEF_MENUBUTTON_BG_MONO WHITE #define DEF_MENUBUTTON_BITMAP "" --- 301,310 ---- */ #define DEF_MENUBUTTON_ANCHOR "center" ! #define DEF_MENUBUTTON_ACTIVE_BG_COLOR NORMAL_BG ! #define DEF_MENUBUTTON_ACTIVE_BG_MONO WHITE #define DEF_MENUBUTTON_ACTIVE_FG_COLOR BLACK ! #define DEF_MENUBUTTON_ACTIVE_FG_MONO BLACK #define DEF_MENUBUTTON_BG_COLOR NORMAL_BG #define DEF_MENUBUTTON_BG_MONO WHITE #define DEF_MENUBUTTON_BITMAP "" *************** *** 298,304 **** #ifdef KANJI #define DEF_MENUBUTTON_FONT "Mincho:Helvetica-Bold-12" #else ! #define DEF_MENUBUTTON_FONT "Helvetica -12 bold" #endif /* KANJI */ #define DEF_MENUBUTTON_FG BLACK #define DEF_MENUBUTTON_HEIGHT "0" --- 316,322 ---- #ifdef KANJI #define DEF_MENUBUTTON_FONT "Mincho:Helvetica-Bold-12" #else ! #define DEF_MENUBUTTON_FONT "Helvetica -12 normal" #endif /* KANJI */ #define DEF_MENUBUTTON_FG BLACK #define DEF_MENUBUTTON_HEIGHT "0" *************** *** 307,312 **** --- 325,333 ---- #define DEF_MENUBUTTON_HIGHLIGHT_WIDTH "0" #define DEF_MENUBUTTON_IMAGE (char *) NULL #define DEF_MENUBUTTON_INDICATOR "0" + #ifdef ENABLE_STEP + #define DEF_MENUBUTTON_INDICATORTYPE "normal" + #endif #define DEF_MENUBUTTON_JUSTIFY "center" #define DEF_MENUBUTTON_MENU "" #define DEF_MENUBUTTON_PADX "4p" *************** *** 334,340 **** #ifdef KANJI #define DEF_MESSAGE_FONT "Mincho:Helvetica-Bold-12" #else ! #define DEF_MESSAGE_FONT "Helvetica -12 bold" #endif /* KANJI */ #define DEF_MESSAGE_HIGHLIGHT_BG NORMAL_BG #define DEF_MESSAGE_HIGHLIGHT BLACK --- 355,361 ---- #ifdef KANJI #define DEF_MESSAGE_FONT "Mincho:Helvetica-Bold-12" #else ! #define DEF_MESSAGE_FONT "Helvetica -12 normal" #endif /* KANJI */ #define DEF_MESSAGE_HIGHLIGHT_BG NORMAL_BG #define DEF_MESSAGE_HIGHLIGHT BLACK *************** *** 353,359 **** */ #define DEF_SCALE_ACTIVE_BG_COLOR ACTIVE_BG ! #define DEF_SCALE_ACTIVE_BG_MONO BLACK #define DEF_SCALE_BG_COLOR NORMAL_BG #define DEF_SCALE_BG_MONO WHITE #define DEF_SCALE_BIG_INCREMENT "0" --- 374,380 ---- */ #define DEF_SCALE_ACTIVE_BG_COLOR ACTIVE_BG ! #define DEF_SCALE_ACTIVE_BG_MONO WHITE #define DEF_SCALE_BG_COLOR NORMAL_BG #define DEF_SCALE_BG_MONO WHITE #define DEF_SCALE_BIG_INCREMENT "0" *************** *** 364,377 **** #ifdef KANJI #define DEF_SCALE_FONT "Mincho:Helvetica-Bold-12" #else ! #define DEF_SCALE_FONT "Helvetica -12 bold" #endif /* KANJI */ #define DEF_SCALE_FG_COLOR BLACK #define DEF_SCALE_FG_MONO BLACK #define DEF_SCALE_FROM "0" #define DEF_SCALE_HIGHLIGHT_BG NORMAL_BG #define DEF_SCALE_HIGHLIGHT BLACK ! #define DEF_SCALE_HIGHLIGHT_WIDTH "1" #define DEF_SCALE_LABEL "" #define DEF_SCALE_LENGTH "100" #define DEF_SCALE_ORIENT "vertical" --- 385,398 ---- #ifdef KANJI #define DEF_SCALE_FONT "Mincho:Helvetica-Bold-12" #else ! #define DEF_SCALE_FONT "Helvetica -12 normal" #endif /* KANJI */ #define DEF_SCALE_FG_COLOR BLACK #define DEF_SCALE_FG_MONO BLACK #define DEF_SCALE_FROM "0" #define DEF_SCALE_HIGHLIGHT_BG NORMAL_BG #define DEF_SCALE_HIGHLIGHT BLACK ! #define DEF_SCALE_HIGHLIGHT_WIDTH "0" #define DEF_SCALE_LABEL "" #define DEF_SCALE_LENGTH "100" #define DEF_SCALE_ORIENT "vertical" *************** *** 380,402 **** #define DEF_SCALE_REPEAT_INTERVAL "100" #define DEF_SCALE_RESOLUTION "1" #define DEF_SCALE_TROUGH_COLOR TROUGH ! #define DEF_SCALE_TROUGH_MONO WHITE #define DEF_SCALE_SHOW_VALUE "1" ! #define DEF_SCALE_SLIDER_LENGTH "30" #define DEF_SCALE_SLIDER_RELIEF "raised" #define DEF_SCALE_STATE "normal" #define DEF_SCALE_TAKE_FOCUS (char *) NULL #define DEF_SCALE_TICK_INTERVAL "0" #define DEF_SCALE_TO "100" #define DEF_SCALE_VARIABLE "" ! #define DEF_SCALE_WIDTH "15" /* * Defaults for scrollbars: */ ! #define DEF_SCROLLBAR_ACTIVE_BG_COLOR ACTIVE_BG ! #define DEF_SCROLLBAR_ACTIVE_BG_MONO BLACK #define DEF_SCROLLBAR_ACTIVE_RELIEF "raised" #define DEF_SCROLLBAR_BG_COLOR NORMAL_BG #define DEF_SCROLLBAR_BG_MONO WHITE --- 401,423 ---- #define DEF_SCALE_REPEAT_INTERVAL "100" #define DEF_SCALE_RESOLUTION "1" #define DEF_SCALE_TROUGH_COLOR TROUGH ! #define DEF_SCALE_TROUGH_MONO BLACK #define DEF_SCALE_SHOW_VALUE "1" ! #define DEF_SCALE_SLIDER_LENGTH "20" #define DEF_SCALE_SLIDER_RELIEF "raised" #define DEF_SCALE_STATE "normal" #define DEF_SCALE_TAKE_FOCUS (char *) NULL #define DEF_SCALE_TICK_INTERVAL "0" #define DEF_SCALE_TO "100" #define DEF_SCALE_VARIABLE "" ! #define DEF_SCALE_WIDTH "14" /* * Defaults for scrollbars: */ ! #define DEF_SCROLLBAR_ACTIVE_BG_COLOR NORMAL_BG ! #define DEF_SCROLLBAR_ACTIVE_BG_MONO WHITE #define DEF_SCROLLBAR_ACTIVE_RELIEF "raised" #define DEF_SCROLLBAR_BG_COLOR NORMAL_BG #define DEF_SCROLLBAR_BG_MONO WHITE *************** *** 406,421 **** #define DEF_SCROLLBAR_EL_BORDER_WIDTH "-1" #define DEF_SCROLLBAR_HIGHLIGHT_BG NORMAL_BG #define DEF_SCROLLBAR_HIGHLIGHT BLACK ! #define DEF_SCROLLBAR_HIGHLIGHT_WIDTH "1" #define DEF_SCROLLBAR_JUMP "0" #define DEF_SCROLLBAR_ORIENT "vertical" ! #define DEF_SCROLLBAR_RELIEF "sunken" #define DEF_SCROLLBAR_REPEAT_DELAY "300" #define DEF_SCROLLBAR_REPEAT_INTERVAL "100" #define DEF_SCROLLBAR_TAKE_FOCUS (char *) NULL #define DEF_SCROLLBAR_TROUGH_COLOR TROUGH ! #define DEF_SCROLLBAR_TROUGH_MONO WHITE ! #define DEF_SCROLLBAR_WIDTH "15" /* * Defaults for texts: --- 427,445 ---- #define DEF_SCROLLBAR_EL_BORDER_WIDTH "-1" #define DEF_SCROLLBAR_HIGHLIGHT_BG NORMAL_BG #define DEF_SCROLLBAR_HIGHLIGHT BLACK ! #define DEF_SCROLLBAR_HIGHLIGHT_WIDTH "0" #define DEF_SCROLLBAR_JUMP "0" + #ifdef ENABLE_STEP + #define DEF_SCROLLBAR_NOARROWS "0" + #endif #define DEF_SCROLLBAR_ORIENT "vertical" ! #define DEF_SCROLLBAR_RELIEF "flat" #define DEF_SCROLLBAR_REPEAT_DELAY "300" #define DEF_SCROLLBAR_REPEAT_INTERVAL "100" #define DEF_SCROLLBAR_TAKE_FOCUS (char *) NULL #define DEF_SCROLLBAR_TROUGH_COLOR TROUGH ! #define DEF_SCROLLBAR_TROUGH_MONO BLACK ! #define DEF_SCROLLBAR_WIDTH "16" /* * Defaults for texts: *************** *** 435,441 **** #define DEF_TEXT_HEIGHT "24" #define DEF_TEXT_HIGHLIGHT_BG NORMAL_BG #define DEF_TEXT_HIGHLIGHT BLACK ! #define DEF_TEXT_HIGHLIGHT_WIDTH "1" #define DEF_TEXT_INSERT_BG BLACK #define DEF_TEXT_INSERT_BD_COLOR "0" #define DEF_TEXT_INSERT_BD_MONO "0" --- 459,465 ---- #define DEF_TEXT_HEIGHT "24" #define DEF_TEXT_HIGHLIGHT_BG NORMAL_BG #define DEF_TEXT_HIGHLIGHT BLACK ! #define DEF_TEXT_HIGHLIGHT_WIDTH "0" #define DEF_TEXT_INSERT_BG BLACK #define DEF_TEXT_INSERT_BD_COLOR "0" #define DEF_TEXT_INSERT_BD_MONO "0" *************** *** 445,457 **** #define DEF_TEXT_PADX "1" #define DEF_TEXT_PADY "1" #define DEF_TEXT_RELIEF "sunken" ! #define DEF_TEXT_SELECT_COLOR SELECT_BG ! #define DEF_TEXT_SELECT_MONO BLACK #define DEF_TEXT_SELECT_BD_COLOR "1" #define DEF_TEXT_SELECT_BD_MONO "0" #define DEF_TEXT_SELECT_FG_COLOR BLACK #define DEF_TEXT_SELECT_FG_MONO WHITE ! #define DEF_TEXT_SELECT_RELIEF "raised" #define DEF_TEXT_SET_GRID "0" #define DEF_TEXT_SPACING1 "0" #define DEF_TEXT_SPACING2 "0" --- 469,481 ---- #define DEF_TEXT_PADX "1" #define DEF_TEXT_PADY "1" #define DEF_TEXT_RELIEF "sunken" ! #define DEF_TEXT_SELECT_COLOR NORMAL_BG ! #define DEF_TEXT_SELECT_MONO WHITE #define DEF_TEXT_SELECT_BD_COLOR "1" #define DEF_TEXT_SELECT_BD_MONO "0" #define DEF_TEXT_SELECT_FG_COLOR BLACK #define DEF_TEXT_SELECT_FG_MONO WHITE ! #define DEF_TEXT_SELECT_RELIEF "flat" #define DEF_TEXT_SET_GRID "0" #define DEF_TEXT_SPACING1 "0" #define DEF_TEXT_SPACING2 "0" diff -r -c -P -x CVS ../tk8.0.5/unix/tkUnixFont.c ./unix/tkUnixFont.c *** ../tk8.0.5/unix/tkUnixFont.c Tue Aug 17 18:48:57 1999 --- ./unix/tkUnixFont.c Tue Aug 17 18:54:58 1999 *************** *** 421,427 **** * First try for the Q&D exact match. */ ! #if 0 sprintf(buf, "-*-%.200s-%s-%c-normal-*-*-%d-*-*-*-*-iso8859-1", family, ((faPtr->weight > TK_FW_NORMAL) ? "bold" : "medium"), ((faPtr->slant == TK_FS_ROMAN) ? 'r' : --- 421,428 ---- * First try for the Q&D exact match. */ ! /* without this, tk will pick my black fonts by default */ ! #if 1 sprintf(buf, "-*-%.200s-%s-%c-normal-*-*-%d-*-*-*-*-iso8859-1", family, ((faPtr->weight > TK_FW_NORMAL) ? "bold" : "medium"), ((faPtr->slant == TK_FS_ROMAN) ? 'r' : diff -r -c -P -x CVS ../tk8.0.5/unix/tkUnixMenu.c ./unix/tkUnixMenu.c *** ../tk8.0.5/unix/tkUnixMenu.c Tue Aug 17 18:48:57 1999 --- ./unix/tkUnixMenu.c Tue Aug 17 18:59:54 1999 *************** *** 10,15 **** --- 10,19 ---- * * RCS: @(#) $Id: tkUnixMenu.c,v 1.7 1999/03/11 15:39:23 m-hirano Exp $ */ + /* + * TkSTEP modifications Copyright (c) Alfredo K. Kojima + * - surgery performed and implanted into Tk8.0 by Steve Murray + */ #ifdef KANJI #define TK_KANJI_OK *************** *** 382,388 **** { *heightPtr = fmPtr->linespace; if (mePtr->type == CASCADE_ENTRY) { ! *widthPtr = 2 * CASCADE_ARROW_WIDTH; } else if ((menuPtr->menuType != MENUBAR) && (mePtr->accel != NULL)) { *widthPtr = Tk_TextWidth(tkfont, mePtr->accel, mePtr->accelLength); } else { --- 386,392 ---- { *heightPtr = fmPtr->linespace; if (mePtr->type == CASCADE_ENTRY) { ! *widthPtr = 2 * ARROW_WIDTH; } else if ((menuPtr->menuType != MENUBAR) && (mePtr->accel != NULL)) { *widthPtr = Tk_TextWidth(tkfont, mePtr->accel, mePtr->accelLength); } else { *************** *** 422,428 **** { if (mePtr->state == tkActiveUid) { int relief; - bgBorder = activeBorder; if ((menuPtr->menuType == MENUBAR) && ((menuPtr->postedCascade == NULL) --- 426,431 ---- *************** *** 431,442 **** } else { relief = TK_RELIEF_RAISED; } ! ! Tk_Fill3DRectangle(menuPtr->tkwin, d, bgBorder, x, y, width, height, ! menuPtr->activeBorderWidth, relief); } else { ! Tk_Fill3DRectangle(menuPtr->tkwin, d, bgBorder, x, y, width, height, ! 0, TK_RELIEF_FLAT); } } --- 434,450 ---- } else { relief = TK_RELIEF_RAISED; } ! ! Tk_Fill3DRectangle(menuPtr->tkwin, d, activeBorder, ! x-1, mePtr->y+1, ! width+1, mePtr->height-3, ! menuPtr->borderWidth, TK_RELIEF_FLAT); ! } else { ! Tk_Fill3DRectangle(menuPtr->tkwin, d, bgBorder, ! x-1, mePtr->y+1, ! width+1, mePtr->height-3, ! menuPtr->borderWidth, TK_RELIEF_FLAT); } } *************** *** 473,479 **** int height; /* Height of entry */ int drawArrow; /* Whether or not to draw arrow. */ { - XPoint points[3]; /* * Draw accelerator or cascade arrow. --- 481,486 ---- *************** *** 484,500 **** } if ((mePtr->type == CASCADE_ENTRY) && drawArrow) { ! points[0].x = x + width - menuPtr->borderWidth ! - menuPtr->activeBorderWidth - CASCADE_ARROW_WIDTH; ! points[0].y = y + (height - CASCADE_ARROW_HEIGHT)/2; ! points[1].x = points[0].x; ! points[1].y = points[0].y + CASCADE_ARROW_HEIGHT; ! points[2].x = points[0].x + CASCADE_ARROW_WIDTH; ! points[2].y = points[0].y + CASCADE_ARROW_HEIGHT/2; ! Tk_Fill3DPolygon(menuPtr->tkwin, d, activeBorder, points, 3, ! DECORATION_BORDER_WIDTH, ! (menuPtr->postedCascade == mePtr) ! ? TK_RELIEF_SUNKEN : TK_RELIEF_RAISED); } else if (mePtr->accel != NULL) { int left = x + mePtr->labelWidth + menuPtr->activeBorderWidth + mePtr->indicatorSpace; --- 491,513 ---- } if ((mePtr->type == CASCADE_ENTRY) && drawArrow) { ! int x /* ,u */ ; /* removes compiler warning */ ! ! x = Tk_Width(menuPtr->tkwin) - menuPtr->borderWidth ! - menuPtr->activeBorderWidth - MENU_MARGIN_WIDTH ! - ARROW_WIDTH; ! y = mePtr->y + (mePtr->height - ARROW_HEIGHT)/2; ! XDrawLine(menuPtr->display, Tk_WindowId(menuPtr->tkwin), ! Tk_3DBorderGC(menuPtr->tkwin, menuPtr->border, ! TK_3D_DARK2_GC), x, y-1, x, y+ARROW_HEIGHT-1); ! XDrawLine(menuPtr->display, Tk_WindowId(menuPtr->tkwin), ! Tk_3DBorderGC(menuPtr->tkwin, menuPtr->border, ! TK_3D_DARK_GC), x+1, y-1, x+ARROW_WIDTH-1, ! y+ARROW_HEIGHT/2-1); ! XDrawLine(menuPtr->display, Tk_WindowId(menuPtr->tkwin), ! Tk_3DBorderGC(menuPtr->tkwin, menuPtr->border, ! TK_3D_LIGHT_GC), x+1, y+ARROW_HEIGHT-1, ! x+ARROW_WIDTH-1, y+ARROW_HEIGHT/2-1); } else if (mePtr->accel != NULL) { int left = x + mePtr->labelWidth + menuPtr->activeBorderWidth + mePtr->indicatorSpace; *************** *** 556,569 **** } top = y + (height - dim)/2; Tk_Fill3DRectangle(menuPtr->tkwin, d, menuPtr->border, left, top, dim, ! dim, DECORATION_BORDER_WIDTH, TK_RELIEF_SUNKEN); left += DECORATION_BORDER_WIDTH; top += DECORATION_BORDER_WIDTH; dim -= 2*DECORATION_BORDER_WIDTH; if ((dim > 0) && (mePtr->entryFlags & ENTRY_SELECTED)) { ! XFillRectangle(menuPtr->display, d, indicatorGC, left, top, ! (unsigned int) dim, (unsigned int) dim); } } --- 569,583 ---- } top = y + (height - dim)/2; Tk_Fill3DRectangle(menuPtr->tkwin, d, menuPtr->border, left, top, dim, ! dim, DECORATION_BORDER_WIDTH, TK_RELIEF_RAISED); left += DECORATION_BORDER_WIDTH; top += DECORATION_BORDER_WIDTH; dim -= 2*DECORATION_BORDER_WIDTH; if ((dim > 0) && (mePtr->entryFlags & ENTRY_SELECTED)) { ! Tk_DrawCheckMark(menuPtr->display, menuPtr->tkwin, ! Tk_WindowId(menuPtr->tkwin), ! left, top, menuPtr->border); } } *************** *** 573,600 **** if ((mePtr->type == RADIO_BUTTON_ENTRY) && mePtr->indicatorOn) { - XPoint points[4]; int radius; ! radius = ((int) mePtr->platformEntryData)/2; ! points[0].x = x + (mePtr->indicatorSpace ! - (int) mePtr->platformEntryData)/2; ! points[0].y = y + (height)/2; ! points[1].x = points[0].x + radius; ! points[1].y = points[0].y + radius; ! points[2].x = points[1].x + radius; ! points[2].y = points[0].y; ! points[3].x = points[1].x; ! points[3].y = points[0].y - radius; if (mePtr->entryFlags & ENTRY_SELECTED) { ! XFillPolygon(menuPtr->display, d, indicatorGC, points, 4, Convex, ! CoordModeOrigin); ! } else { ! Tk_Fill3DPolygon(menuPtr->tkwin, d, menuPtr->border, points, 4, ! DECORATION_BORDER_WIDTH, TK_RELIEF_FLAT); ! } ! Tk_Draw3DPolygon(menuPtr->tkwin, d, menuPtr->border, points, 4, ! DECORATION_BORDER_WIDTH, TK_RELIEF_SUNKEN); } } --- 587,622 ---- if ((mePtr->type == RADIO_BUTTON_ENTRY) && mePtr->indicatorOn) { int radius; ! int dim, top, left; ! ! dim = (int) mePtr->platformEntryData; ! left = x + menuPtr->activeBorderWidth ! + (mePtr->indicatorSpace - dim)/2; ! if (menuPtr->menuType == MENUBAR) { ! left += 5; ! } ! top = y + (height - dim)/2; ! ! radius = height/2-4; ! Tk_Draw3DCircle(menuPtr->display, menuPtr->tkwin, ! Tk_WindowId(menuPtr->tkwin), ! left, top, menuPtr->borderWidth, radius, TK_RELIEF_SUNKEN, ! menuPtr->border); if (mePtr->entryFlags & ENTRY_SELECTED) { ! gc = Tk_3DBorderGC(menuPtr->tkwin, menuPtr->border, TK_3D_LIGHT_GC); ! XFillArc(menuPtr->display, Tk_WindowId(menuPtr->tkwin), gc, ! left+menuPtr->borderWidth, top+menuPtr->borderWidth, ! (unsigned)(radius*2-menuPtr->borderWidth-1), ! (unsigned)(radius*2-menuPtr->borderWidth-1),0,360*64); ! } else { ! gc = Tk_3DBorderGC(menuPtr->tkwin, menuPtr->border, TK_3D_FLAT_GC); ! XFillArc(menuPtr->display, Tk_WindowId(menuPtr->tkwin), gc, ! left+menuPtr->borderWidth, top+menuPtr->borderWidth, ! (unsigned)(radius*2-menuPtr->borderWidth-1), ! (unsigned)(radius*2-menuPtr->borderWidth-1),0,360*64); ! } } } *************** *** 628,647 **** int width; int height; { - XPoint points[2]; - int margin; - if (menuPtr->menuType == MENUBAR) { return; } - - margin = (fmPtr->ascent + fmPtr->descent)/2; - points[0].x = x; - points[0].y = y + height/2; - points[1].x = width - 1; - points[1].y = points[0].y; - Tk_Draw3DPolygon(menuPtr->tkwin, d, menuPtr->border, points, 2, 1, - TK_RELIEF_RAISED); } /* --- 650,658 ---- *************** *** 715,721 **** XCopyPlane(menuPtr->display, mePtr->bitmap, d, gc, 0, 0, (unsigned) width, (unsigned) height, leftEdge, ! (int) (y + (mePtr->height - height)/2), 1); } else { if (mePtr->labelLength > 0) { Tk_DrawChars(menuPtr->display, d, gc, --- 726,732 ---- XCopyPlane(menuPtr->display, mePtr->bitmap, d, gc, 0, 0, (unsigned) width, (unsigned) height, leftEdge, ! (int) (y + (mePtr->height - height)/2 + 1), 1); } else { if (mePtr->labelLength > 0) { Tk_DrawChars(menuPtr->display, d, gc, *************** *** 837,843 **** int *heightPtr; /* The resulting height */ { *widthPtr = 0; ! *heightPtr = fmPtr->linespace; } /* --- 848,854 ---- int *heightPtr; /* The resulting height */ { *widthPtr = 0; ! *heightPtr = 0; } /* *************** *** 869,875 **** *heightPtr = 0; *widthPtr = 0; } else { ! *heightPtr = fmPtr->linespace; #ifdef TK_KANJI_OK { wchar wTmp = 'W'; --- 880,886 ---- *heightPtr = 0; *widthPtr = 0; } else { ! *heightPtr = fmPtr->linespace - (int)((fmPtr->linespace)/2); #ifdef TK_KANJI_OK { wchar wTmp = 'W'; *************** *** 962,972 **** * the first time, we don't know how big its neighbor might * be. */ ! if ((mePtr->type == SEPARATOR_ENTRY) || (mePtr->type == TEAROFF_ENTRY)) { mePtr->height = mePtr->width = 0; ! } else { GetMenuLabelGeometry(mePtr, tkfont, fmPtr, &width, &height); --- 973,989 ---- * the first time, we don't know how big its neighbor might * be. */ ! /* if ((mePtr->type == SEPARATOR_ENTRY) || (mePtr->type == TEAROFF_ENTRY)) { mePtr->height = mePtr->width = 0; ! */ ! switch(mePtr->type) { ! case SEPARATOR_ENTRY : mePtr->height = 1; ! break; ! case TEAROFF_ENTRY : mePtr->height = 12; ! break; ! default: GetMenuLabelGeometry(mePtr, tkfont, fmPtr, &width, &height); *************** *** 981,986 **** --- 998,1004 ---- } mePtr->width += 2 * menuPtr->activeBorderWidth + 10; } + if (mePtr->entryFlags & ENTRY_HELP_MENU) { helpMenuIndex = i; } else if (x + mePtr->width + menuPtr->borderWidth *************** *** 1106,1116 **** } margin = (fmPtr->ascent + fmPtr->descent)/2; ! points[0].x = x; ! points[0].y = y + height/2; points[1].y = points[0].y; segmentWidth = 6; ! maxX = width - 1; while (points[0].x < maxX) { points[1].x = points[0].x + segmentWidth; --- 1124,1134 ---- } margin = (fmPtr->ascent + fmPtr->descent)/2; ! points[0].x = 2; ! points[0].y = y + height/2-1; points[1].y = points[0].y; segmentWidth = 6; ! maxX = width - 2; while (points[0].x < maxX) { points[1].x = points[0].x + segmentWidth; *************** *** 1290,1302 **** if (bgBorder == NULL) { bgBorder = menuPtr->border; } ! if (strictMotif) { ! activeBorder = bgBorder; ! } else { ! activeBorder = mePtr->activeBorder; ! if (activeBorder == NULL) { ! activeBorder = menuPtr->activeBorder; ! } } if (mePtr->tkfont == NULL) { --- 1308,1316 ---- if (bgBorder == NULL) { bgBorder = menuPtr->border; } ! activeBorder = mePtr->activeBorder; ! if (activeBorder == NULL) { ! activeBorder = menuPtr->activeBorder; } if (mePtr->tkfont == NULL) { *************** *** 1376,1382 **** *widthPtr = 0; } } - *heightPtr += 1; } /* --- 1390,1395 ---- *************** *** 1528,1534 **** mePtr->height += 2 * menuPtr->activeBorderWidth + MENU_DIVIDER_HEIGHT; } ! mePtr->y = y; y += mePtr->height; if (y > windowHeight) { windowHeight = y; --- 1541,1547 ---- mePtr->height += 2 * menuPtr->activeBorderWidth + MENU_DIVIDER_HEIGHT; } ! mePtr->y = y -2; /* -2 added for first menuitem height */ y += mePtr->height; if (y > windowHeight) { windowHeight = y; *************** *** 1550,1556 **** + 2 * menuPtr->activeBorderWidth + 2 * menuPtr->borderWidth; ! windowHeight += menuPtr->borderWidth; /* * The X server doesn't like zero dimensions, so round up to at least --- 1563,1570 ---- + 2 * menuPtr->activeBorderWidth + 2 * menuPtr->borderWidth; ! windowHeight -= menuPtr->borderWidth; /* adjust height of last ! menuitem: it was an adition before.*/ /* * The X server doesn't like zero dimensions, so round up to at least diff -r -c -P -x CVS ../tk8.0.5/unix/tkUnixMenubu.c ./unix/tkUnixMenubu.c *** ../tk8.0.5/unix/tkUnixMenubu.c Tue Aug 17 18:48:57 1999 --- ./unix/tkUnixMenubu.c Tue Aug 17 18:54:58 1999 *************** *** 11,16 **** --- 11,20 ---- * * RCS: @(#) $Id: tkUnixMenubu.c,v 1.2 1998/09/14 18:23:57 stanton Exp $ */ + /* + * TkSTEP modifications Copyright (c) Alfredo K. Kojima + * - surgery performed and implanted into Tk8.0 by Steve Murray + */ #include "tkMenubutton.h" *************** *** 155,160 **** --- 159,186 ---- * right side of the window, if desired. */ + #ifdef ENABLE_STEP + /* Down arrow indicator */ + if (mbPtr->indicatorOn && (mbPtr->indicatorType==1)) { + int x, b; + + x = Tk_Width(tkwin) - mbPtr->borderWidth*2 - MARGIN_WIDTH + - ARROW_WIDTH; + b = (Tk_Height(tkwin) - ARROW_HEIGHT)/2; + XDrawLine(mbPtr->display, pixmap, + Tk_3DBorderGC(tkwin, border,TK_3D_LIGHT_GC), + x+ARROW_WIDTH-1, b+1, + x+ARROW_WIDTH/2+1, b+ARROW_HEIGHT-1); + XDrawLine(mbPtr->display, pixmap, + Tk_3DBorderGC(tkwin, border, TK_3D_DARK_GC), + x, b+1, x+ARROW_WIDTH/2, + b+ARROW_HEIGHT); + XDrawLine(mbPtr->display, pixmap, + Tk_3DBorderGC(tkwin, border, TK_3D_DARK2_GC), + x, b, x+ARROW_WIDTH-1, b); + } else + #endif + /* shadowed box indicator */ if (mbPtr->indicatorOn) { int borderWidth; *************** *** 163,172 **** borderWidth = 1; } /*y += mbPtr->textHeight / 2;*/ Tk_Fill3DRectangle(tkwin, pixmap, border, Tk_Width(tkwin) - mbPtr->inset - mbPtr->indicatorWidth + mbPtr->indicatorHeight, ! ((int) (Tk_Height(tkwin) - mbPtr->indicatorHeight))/2, mbPtr->indicatorWidth - 2*mbPtr->indicatorHeight, mbPtr->indicatorHeight, borderWidth, TK_RELIEF_RAISED); } --- 189,205 ---- borderWidth = 1; } /*y += mbPtr->textHeight / 2;*/ + XFillRectangle(mbPtr->display, pixmap, + Tk_3DBorderGC(tkwin, border, TK_3D_DARK_GC), + Tk_Width(tkwin) - mbPtr->inset - mbPtr->indicatorWidth + + mbPtr->indicatorHeight + 2, + ((int) (Tk_Height(tkwin) - mbPtr->indicatorHeight))/2, + (unsigned)(mbPtr->indicatorWidth - 2*mbPtr->indicatorHeight), + (unsigned)(mbPtr->indicatorHeight)); Tk_Fill3DRectangle(tkwin, pixmap, border, Tk_Width(tkwin) - mbPtr->inset - mbPtr->indicatorWidth + mbPtr->indicatorHeight, ! ((int) (Tk_Height(tkwin) - mbPtr->indicatorHeight))/2-2, mbPtr->indicatorWidth - 2*mbPtr->indicatorHeight, mbPtr->indicatorHeight, borderWidth, TK_RELIEF_RAISED); } diff -r -c -P -x CVS ../tk8.0.5/unix/tkUnixScale.c ./unix/tkUnixScale.c *** ../tk8.0.5/unix/tkUnixScale.c Tue Aug 17 18:48:57 1999 --- ./unix/tkUnixScale.c Tue Aug 17 19:05:56 1999 *************** *** 11,16 **** --- 11,20 ---- * * RCS: @(#) $Id: tkUnixScale.c,v 1.2 1998/09/14 18:23:57 stanton Exp $ */ + /* + * TkSTEP modifications Copyright (c) Andy Lo A Foe + */ + #include "tkScale.h" #include "tkInt.h" *************** *** 109,114 **** --- 113,125 ---- int x, y, width, height, shadowWidth; double tickValue; Tk_3DBorder sliderBorder; + GC darkGC, dark2GC, lightGC, light2GC; + + + darkGC = Tk_3DBorderGC(tkwin,scalePtr->bgBorder, TK_3D_DARK_GC); + dark2GC = Tk_3DBorderGC(tkwin,scalePtr->bgBorder, TK_3D_DARK2_GC); + lightGC = Tk_3DBorderGC(tkwin,scalePtr->bgBorder, TK_3D_LIGHT_GC); + light2GC = Tk_3DBorderGC(tkwin,scalePtr->bgBorder, TK_3D_DARK_GC); /* * Display the information from left to right across the window. *************** *** 166,182 **** * Display the trough and the slider. */ ! Tk_Draw3DRectangle(tkwin, drawable, ! scalePtr->bgBorder, scalePtr->vertTroughX, scalePtr->inset, ! scalePtr->width + 2*scalePtr->borderWidth, ! Tk_Height(tkwin) - 2*scalePtr->inset, scalePtr->borderWidth, ! TK_RELIEF_SUNKEN); ! XFillRectangle(scalePtr->display, drawable, scalePtr->troughGC, scalePtr->vertTroughX + scalePtr->borderWidth, scalePtr->inset + scalePtr->borderWidth, (unsigned) scalePtr->width, (unsigned) (Tk_Height(tkwin) - 2*scalePtr->inset - 2*scalePtr->borderWidth)); if (scalePtr->state == tkActiveUid) { sliderBorder = scalePtr->activeBorder; } else { --- 177,194 ---- * Display the trough and the slider. */ ! XFillRectangle(scalePtr->display, drawable, scalePtr->troughBackGC, scalePtr->vertTroughX + scalePtr->borderWidth, scalePtr->inset + scalePtr->borderWidth, (unsigned) scalePtr->width, (unsigned) (Tk_Height(tkwin) - 2*scalePtr->inset - 2*scalePtr->borderWidth)); + Tk_Draw3DRectangle(tkwin, drawable, + scalePtr->activeBorder, scalePtr->vertTroughX, scalePtr->inset, + scalePtr->width + 2*scalePtr->borderWidth, + Tk_Height(tkwin) - 2*scalePtr->inset, scalePtr->borderWidth, + TK_RELIEF_SUNKEN); + if (scalePtr->state == tkActiveUid) { sliderBorder = scalePtr->activeBorder; } else { *************** *** 186,205 **** height = scalePtr->sliderLength/2; x = scalePtr->vertTroughX + scalePtr->borderWidth; y = TkpValueToPixel(scalePtr, scalePtr->value) - height; ! shadowWidth = scalePtr->borderWidth/2; ! if (shadowWidth == 0) { ! shadowWidth = 1; ! } ! Tk_Draw3DRectangle(tkwin, drawable, sliderBorder, x, y, width, ! 2*height, shadowWidth, scalePtr->sliderRelief); ! x += shadowWidth; ! y += shadowWidth; ! width -= 2*shadowWidth; ! height -= shadowWidth; ! Tk_Fill3DRectangle(tkwin, drawable, sliderBorder, x, y, width, ! height, shadowWidth, scalePtr->sliderRelief); ! Tk_Fill3DRectangle(tkwin, drawable, sliderBorder, x, y+height, ! width, height, shadowWidth, scalePtr->sliderRelief); /* * Draw the label to the right of the scale. --- 198,227 ---- height = scalePtr->sliderLength/2; x = scalePtr->vertTroughX + scalePtr->borderWidth; y = TkpValueToPixel(scalePtr, scalePtr->value) - height; ! ! /* We know the borderwidth is 1 */ ! shadowWidth = scalePtr->borderWidth+1; ! ! Tk_Fill3DRectangle(tkwin, drawable, scalePtr->bgBorder, x, y, width, ! 2*height, 2, TK_RELIEF_FLAT); ! ! XDrawLine(scalePtr->display, drawable, darkGC, x, y, x, y+2*height-shadowWidth); ! XDrawLine(scalePtr->display, drawable, lightGC, x+1, y, x+1, y+2*height-shadowWidth); ! ! XDrawLine(scalePtr->display, drawable, dark2GC, x+width-1, y+2*height-shadowWidth, x+width-1, y+1); ! XDrawLine(scalePtr->display, drawable, darkGC, x+width-2, y+2*height-shadowWidth, x+width-2, y+1); ! ! ! XDrawLine(scalePtr->display, drawable, lightGC, x+1, y, x+width-2, y); ! ! if (scalePtr->sliderLength >= 12) ! { ! XDrawLine(scalePtr->display, drawable, darkGC, x+1, y+height-2, x+width-2, y+height-2); ! XDrawLine(scalePtr->display, drawable, lightGC, x+1, y+height-1, x+width-2, y+height-1); ! } ! ! XDrawLine(scalePtr->display, drawable, darkGC, x, y+height*2-2, x+width-2, y+height*2-2); ! XDrawLine(scalePtr->display, drawable, dark2GC, x, y+height*2-1, x+width-1, y+height*2-1); /* * Draw the label to the right of the scale. *************** *** 321,326 **** --- 343,354 ---- int x, y, width, height, shadowWidth; double tickValue; Tk_3DBorder sliderBorder; + GC lightGC, light2GC, darkGC, dark2GC; + + darkGC = Tk_3DBorderGC(tkwin,scalePtr->bgBorder, TK_3D_DARK_GC); + dark2GC = Tk_3DBorderGC(tkwin,scalePtr->bgBorder, TK_3D_DARK2_GC); + lightGC = Tk_3DBorderGC(tkwin,scalePtr->bgBorder, TK_3D_LIGHT_GC); + light2GC = Tk_3DBorderGC(tkwin,scalePtr->bgBorder, TK_3D_DARK_GC); /* * Display the information from bottom to top across the window. *************** *** 384,390 **** Tk_Width(tkwin) - 2*scalePtr->inset, scalePtr->width + 2*scalePtr->borderWidth, scalePtr->borderWidth, TK_RELIEF_SUNKEN); ! XFillRectangle(scalePtr->display, drawable, scalePtr->troughGC, scalePtr->inset + scalePtr->borderWidth, y + scalePtr->borderWidth, (unsigned) (Tk_Width(tkwin) - 2*scalePtr->inset --- 412,418 ---- Tk_Width(tkwin) - 2*scalePtr->inset, scalePtr->width + 2*scalePtr->borderWidth, scalePtr->borderWidth, TK_RELIEF_SUNKEN); ! XFillRectangle(scalePtr->display, drawable, scalePtr->troughBackGC, scalePtr->inset + scalePtr->borderWidth, y + scalePtr->borderWidth, (unsigned) (Tk_Width(tkwin) - 2*scalePtr->inset *************** *** 399,418 **** height = scalePtr->width; x = TkpValueToPixel(scalePtr, scalePtr->value) - width; y += scalePtr->borderWidth; ! shadowWidth = scalePtr->borderWidth/2; ! if (shadowWidth == 0) { ! shadowWidth = 1; ! } ! Tk_Draw3DRectangle(tkwin, drawable, sliderBorder, ! x, y, 2*width, height, shadowWidth, scalePtr->sliderRelief); ! x += shadowWidth; ! y += shadowWidth; ! width -= shadowWidth; ! height -= 2*shadowWidth; ! Tk_Fill3DRectangle(tkwin, drawable, sliderBorder, x, y, width, height, ! shadowWidth, scalePtr->sliderRelief); ! Tk_Fill3DRectangle(tkwin, drawable, sliderBorder, x+width, y, ! width, height, shadowWidth, scalePtr->sliderRelief); /* * Draw the label at the top of the scale. --- 427,452 ---- height = scalePtr->width; x = TkpValueToPixel(scalePtr, scalePtr->value) - width; y += scalePtr->borderWidth; ! ! /* We know that scalePtr->borderWidth is 1 */ ! shadowWidth = scalePtr->borderWidth + 1; ! ! Tk_Fill3DRectangle(tkwin, drawable, scalePtr->bgBorder, x, y, ! 2*width, height, 2, TK_RELIEF_FLAT); ! ! XDrawLine(scalePtr->display, drawable, lightGC, x, y, x+2*width-2, y); ! ! XDrawLine(scalePtr->display, drawable, darkGC, x, y+height-2, x+2*width-2, y+height-2); ! XDrawLine(scalePtr->display, drawable, dark2GC, x, y+height-1, x+2*width-2, y+height-1); ! XDrawLine(scalePtr->display, drawable, darkGC, x, y, x, y+height-2); ! XDrawLine(scalePtr->display, drawable, lightGC, x+1, y, x+1, y+height-3); ! if (scalePtr->sliderLength >= 12) ! { ! XDrawLine(scalePtr->display, drawable, darkGC, x+width-1, y+1, x+width-1, y+height-3); ! XDrawLine(scalePtr->display, drawable, lightGC, x+width, y, x+width, y+height-2); ! } ! XDrawLine(scalePtr->display, drawable, darkGC, x+2*width-2, y, x+2*width-2, y+height-2); ! XDrawLine(scalePtr->display, drawable, dark2GC, x+2*width-1, y, x+2*width-1, y+height-1); /* * Draw the label at the top of the scale. *************** *** 480,485 **** --- 514,522 ---- * inside the window. */ + /* force a borderWidth of 1 */ + scalePtr->borderWidth = 1; + x -= (width)/2; if (x < (scalePtr->inset + SPACING)) { x = scalePtr->inset + SPACING; *************** *** 488,494 **** x = Tk_Width(tkwin) - scalePtr->inset - SPACING - width; } Tk_DrawChars(scalePtr->display, drawable, scalePtr->textGC, ! scalePtr->tkfont, valueString, length, x, y); #if defined(KANJI) && defined(TK_KANJI_OK) && defined(TK_REPLACE_TO_KANJIFUNC) #define Tk_TextWidth Tk_WTextWidth #define Tk_DrawChars Tk_DrawWChars --- 525,531 ---- x = Tk_Width(tkwin) - scalePtr->inset - SPACING - width; } Tk_DrawChars(scalePtr->display, drawable, scalePtr->textGC, ! scalePtr->tkfont, valueString, length, x-2*scalePtr->borderWidth, y); #if defined(KANJI) && defined(TK_KANJI_OK) && defined(TK_REPLACE_TO_KANJIFUNC) #define Tk_TextWidth Tk_WTextWidth #define Tk_DrawChars Tk_DrawWChars *************** *** 590,596 **** Tk_Width(tkwin) - 2*scalePtr->highlightWidth, Tk_Height(tkwin) - 2*scalePtr->highlightWidth, scalePtr->borderWidth, scalePtr->relief); ! } if (scalePtr->highlightWidth != 0) { GC gc; --- 627,634 ---- Tk_Width(tkwin) - 2*scalePtr->highlightWidth, Tk_Height(tkwin) - 2*scalePtr->highlightWidth, scalePtr->borderWidth, scalePtr->relief); ! } ! /* if (scalePtr->highlightWidth != 0) { GC gc; *************** *** 601,606 **** --- 639,645 ---- } Tk_DrawFocusHighlight(tkwin, gc, scalePtr->highlightWidth, pixmap); } + */ } /* diff -r -c -P -x CVS ../tk8.0.5/unix/tkUnixScrlbr.c ./unix/tkUnixScrlbr.c *** ../tk8.0.5/unix/tkUnixScrlbr.c Tue Sep 15 03:23:57 1998 --- ./unix/tkUnixScrlbr.c Tue Aug 17 18:54:58 1999 *************** *** 11,16 **** --- 11,20 ---- * * RCS: @(#) $Id: tkUnixScrlbr.c,v 1.2 1998/09/14 18:23:57 stanton Exp $ */ + /* + * TkSTEP modifications Copyright (c) Alfredo K. Kojima + * - surgery performed and implanted into Tk8.0 by Steve Murray + */ #include "tkScrollbar.h" *************** *** 19,25 **** * is always easy to grab with the mouse). */ ! #define MIN_SLIDER_LENGTH 5 /* * Declaration of Unix specific scrollbar structure. --- 23,29 ---- * is always easy to grab with the mouse). */ ! #define MIN_SLIDER_LENGTH 16 /* * Declaration of Unix specific scrollbar structure. *************** *** 27,33 **** typedef struct UnixScrollbar { TkScrollbar info; /* Generic scrollbar info. */ ! GC troughGC; /* For drawing trough. */ GC copyGC; /* Used for copying from pixmap onto screen. */ } UnixScrollbar; --- 31,38 ---- typedef struct UnixScrollbar { TkScrollbar info; /* Generic scrollbar info. */ ! GC troughGC; /* For drawing trough's stippled part. */ ! GC troughBackGC; /* For drawing trough. */ GC copyGC; /* Used for copying from pixmap onto screen. */ } UnixScrollbar; *************** *** 64,69 **** --- 69,75 ---- { UnixScrollbar *scrollPtr = (UnixScrollbar *)ckalloc(sizeof(UnixScrollbar)); scrollPtr->troughGC = None; + scrollPtr->troughBackGC = None; scrollPtr->copyGC = None; Tk_CreateEventHandler(tkwin, *************** *** 96,111 **** ClientData clientData; /* Information about window. */ { register TkScrollbar *scrollPtr = (TkScrollbar *) clientData; register Tk_Window tkwin = scrollPtr->tkwin; - XPoint points[7]; Tk_3DBorder border; ! int relief, width, elementBorderWidth; Pixmap pixmap; if ((scrollPtr->tkwin == NULL) || !Tk_IsMapped(tkwin)) { goto done; } if (scrollPtr->vertical) { width = Tk_Width(tkwin) - 2*scrollPtr->inset; } else { --- 102,124 ---- ClientData clientData; /* Information about window. */ { register TkScrollbar *scrollPtr = (TkScrollbar *) clientData; + UnixScrollbar *unixScrollPtr = (UnixScrollbar *)scrollPtr; register Tk_Window tkwin = scrollPtr->tkwin; Tk_3DBorder border; ! int relief, width, elementBorderWidth, sliderSize, delta; ! int arrowl = scrollPtr->arrowLength, arrsize; ! int buttonSize; Pixmap pixmap; + int empty=0; if ((scrollPtr->tkwin == NULL) || !Tk_IsMapped(tkwin)) { goto done; } + if ((scrollPtr->firstFraction <= 0.0) && (scrollPtr->lastFraction >= 1.0)) { + empty = 1; + } + if (scrollPtr->vertical) { width = Tk_Width(tkwin) - 2*scrollPtr->inset; } else { *************** *** 116,121 **** --- 129,138 ---- elementBorderWidth = scrollPtr->borderWidth; } + if (scrollPtr->bump == None) { + MakePixmaps((ClientData)scrollPtr); + } + /* * In order to avoid screen flashes, this procedure redraws * the scrollbar in a pixmap, then copies the pixmap to the *************** *** 125,130 **** --- 142,149 ---- pixmap = Tk_GetPixmap(scrollPtr->display, Tk_WindowId(tkwin), Tk_Width(tkwin), Tk_Height(tkwin), Tk_Depth(tkwin)); + + sliderSize = scrollPtr->sliderLast - scrollPtr->sliderFirst; if (scrollPtr->highlightWidth != 0) { GC gc; *************** *** 136,186 **** } Tk_DrawFocusHighlight(tkwin, gc, scrollPtr->highlightWidth, pixmap); } - Tk_Draw3DRectangle(tkwin, pixmap, scrollPtr->bgBorder, - scrollPtr->highlightWidth, scrollPtr->highlightWidth, - Tk_Width(tkwin) - 2*scrollPtr->highlightWidth, - Tk_Height(tkwin) - 2*scrollPtr->highlightWidth, - scrollPtr->borderWidth, scrollPtr->relief); - XFillRectangle(scrollPtr->display, pixmap, - ((UnixScrollbar*)scrollPtr)->troughGC, - scrollPtr->inset, scrollPtr->inset, - (unsigned) (Tk_Width(tkwin) - 2*scrollPtr->inset), - (unsigned) (Tk_Height(tkwin) - 2*scrollPtr->inset)); ! /* ! * Draw the top or left arrow. The coordinates of the polygon ! * points probably seem odd, but they were carefully chosen with ! * respect to X's rules for filling polygons. These point choices ! * cause the arrows to just fill the narrow dimension of the ! * scrollbar and be properly centered. */ if (scrollPtr->activeField == TOP_ARROW) { border = scrollPtr->activeBorder; relief = scrollPtr->activeField == TOP_ARROW ? scrollPtr->activeRelief : TK_RELIEF_RAISED; } else { border = scrollPtr->bgBorder; relief = TK_RELIEF_RAISED; } if (scrollPtr->vertical) { ! points[0].x = scrollPtr->inset - 1; ! points[0].y = scrollPtr->arrowLength + scrollPtr->inset - 1; ! points[1].x = width + scrollPtr->inset; ! points[1].y = points[0].y; ! points[2].x = width/2 + scrollPtr->inset; ! points[2].y = scrollPtr->inset - 1; ! Tk_Fill3DPolygon(tkwin, pixmap, border, points, 3, ! elementBorderWidth, relief); } else { ! points[0].x = scrollPtr->arrowLength + scrollPtr->inset - 1; ! points[0].y = scrollPtr->inset - 1; ! points[1].x = scrollPtr->inset; ! points[1].y = width/2 + scrollPtr->inset; ! points[2].x = points[0].x; ! points[2].y = width + scrollPtr->inset; ! Tk_Fill3DPolygon(tkwin, pixmap, border, points, 3, ! elementBorderWidth, relief); } /* --- 155,235 ---- } Tk_DrawFocusHighlight(tkwin, gc, scrollPtr->highlightWidth, pixmap); } ! XFillRectangle(scrollPtr->display, pixmap, unixScrollPtr->troughBackGC, ! scrollPtr->highlightWidth, scrollPtr->highlightWidth, ! (unsigned)(Tk_Width(tkwin) - 2*scrollPtr->highlightWidth), ! (unsigned)(Tk_Height(tkwin) - 2*scrollPtr->highlightWidth)); ! ! XDrawRectangle(scrollPtr->display, pixmap, ! Tk_3DBorderGC(scrollPtr->tkwin,scrollPtr->bgBorder,TK_3D_DARK2_GC), ! scrollPtr->highlightWidth, scrollPtr->highlightWidth, ! (unsigned)(Tk_Width(tkwin) - 2*scrollPtr->highlightWidth-1), ! (unsigned)(Tk_Height(tkwin) - 2*scrollPtr->highlightWidth-1)); ! ! buttonSize = arrowl+1; ! if (empty) { ! XFillRectangle(scrollPtr->display, pixmap, unixScrollPtr->troughGC, ! scrollPtr->inset, scrollPtr->inset, ! (unsigned) (Tk_Width(tkwin) - 2*scrollPtr->inset), ! (unsigned) (Tk_Height(tkwin) - 2*scrollPtr->inset)); ! } else { ! if (scrollPtr->vertical) { ! XFillRectangle(scrollPtr->display, pixmap, unixScrollPtr->troughGC, ! scrollPtr->inset, scrollPtr->inset, ! (unsigned) (Tk_Width(tkwin) - 2*scrollPtr->inset), ! (unsigned) (Tk_Height(tkwin) - 2*buttonSize - ! 2*scrollPtr->inset)); ! } else { ! XFillRectangle(scrollPtr->display, pixmap, unixScrollPtr->troughGC, ! scrollPtr->inset+(arrowl+1)*2, scrollPtr->inset, ! (unsigned) (Tk_Width(tkwin) - 2*buttonSize - ! 2*scrollPtr->inset), ! (unsigned) (Tk_Height(tkwin) - 2*scrollPtr->inset)); ! } ! } ! ! /* ! * don't draw slider/arrows if everything is visible */ + if (empty) { + goto docopy; + } + #ifdef ENABLE_STEP + if (scrollPtr->noArrows) { + goto doSlider; + } + #endif if (scrollPtr->activeField == TOP_ARROW) { border = scrollPtr->activeBorder; relief = scrollPtr->activeField == TOP_ARROW ? scrollPtr->activeRelief : TK_RELIEF_RAISED; + delta = (relief == TK_RELIEF_SUNKEN) ? (scrollPtr->borderWidth)/2+1 : 0; + } else { border = scrollPtr->bgBorder; relief = TK_RELIEF_RAISED; + delta = 0; } + + arrsize = scrollPtr->arrowLength - elementBorderWidth*2-3; if (scrollPtr->vertical) { ! Tk_Fill3DRectangle(tkwin, pixmap, border, scrollPtr->inset, ! Tk_Height(tkwin) - 2*buttonSize - ! scrollPtr->inset+1, arrowl, arrowl, ! elementBorderWidth, relief); ! DrawArrow(scrollPtr, pixmap, Tk_Width(tkwin)/2 - 1 + delta, ! Tk_Height(tkwin) - buttonSize*2 - ! scrollPtr->inset + buttonSize/2 + delta, ! arrsize, arrsize, (unsigned)ARROW_UP); } else { ! Tk_Fill3DRectangle(tkwin, pixmap, border, ! scrollPtr->inset, scrollPtr->inset, ! arrowl, arrowl, elementBorderWidth, relief); ! DrawArrow(scrollPtr, pixmap, scrollPtr->inset + buttonSize/2 + delta-1, ! (Tk_Height(tkwin)+1)/2 - 1 + delta, ! arrsize, arrsize, (unsigned)ARROW_LEFT); } /* *************** *** 191,244 **** border = scrollPtr->activeBorder; relief = scrollPtr->activeField == BOTTOM_ARROW ? scrollPtr->activeRelief : TK_RELIEF_RAISED; } else { border = scrollPtr->bgBorder; relief = TK_RELIEF_RAISED; } if (scrollPtr->vertical) { ! points[0].x = scrollPtr->inset; ! points[0].y = Tk_Height(tkwin) - scrollPtr->arrowLength ! - scrollPtr->inset + 1; ! points[1].x = width/2 + scrollPtr->inset; ! points[1].y = Tk_Height(tkwin) - scrollPtr->inset; ! points[2].x = width + scrollPtr->inset; ! points[2].y = points[0].y; ! Tk_Fill3DPolygon(tkwin, pixmap, border, ! points, 3, elementBorderWidth, relief); ! } else { ! points[0].x = Tk_Width(tkwin) - scrollPtr->arrowLength ! - scrollPtr->inset + 1; ! points[0].y = scrollPtr->inset - 1; ! points[1].x = points[0].x; ! points[1].y = width + scrollPtr->inset; ! points[2].x = Tk_Width(tkwin) - scrollPtr->inset; ! points[2].y = width/2 + scrollPtr->inset; ! Tk_Fill3DPolygon(tkwin, pixmap, border, ! points, 3, elementBorderWidth, relief); } /* * Display the slider. */ if (scrollPtr->activeField == SLIDER) { border = scrollPtr->activeBorder; ! relief = scrollPtr->activeField == SLIDER ? scrollPtr->activeRelief ! : TK_RELIEF_RAISED; } else { border = scrollPtr->bgBorder; relief = TK_RELIEF_RAISED; } if (scrollPtr->vertical) { Tk_Fill3DRectangle(tkwin, pixmap, border, ! scrollPtr->inset, scrollPtr->sliderFirst, ! width, scrollPtr->sliderLast - scrollPtr->sliderFirst, elementBorderWidth, relief); } else { Tk_Fill3DRectangle(tkwin, pixmap, border, scrollPtr->sliderFirst, scrollPtr->inset, ! scrollPtr->sliderLast - scrollPtr->sliderFirst, width, elementBorderWidth, relief); } /* --- 240,329 ---- border = scrollPtr->activeBorder; relief = scrollPtr->activeField == BOTTOM_ARROW ? scrollPtr->activeRelief : TK_RELIEF_RAISED; + delta = (relief == TK_RELIEF_SUNKEN) ? (scrollPtr->borderWidth)/2+1 : 0; + } else { border = scrollPtr->bgBorder; relief = TK_RELIEF_RAISED; + delta = 0; } + if (scrollPtr->vertical) { ! Tk_Fill3DRectangle(tkwin, pixmap, border, scrollPtr->inset, ! Tk_Height(tkwin)-buttonSize-scrollPtr->inset+1, ! arrowl, arrowl, ! elementBorderWidth, relief); ! DrawArrow(scrollPtr, pixmap, Tk_Width(tkwin)/2 - 1 + delta, ! Tk_Height(tkwin) - buttonSize + buttonSize/2 - ! scrollPtr->inset+ delta, arrsize, ! arrsize, ARROW_DOWN); ! } else { ! Tk_Fill3DRectangle(tkwin, pixmap, border, ! scrollPtr->inset + buttonSize, scrollPtr->inset, ! arrowl, arrowl, elementBorderWidth, relief); ! DrawArrow(scrollPtr, pixmap, ! scrollPtr->inset + buttonSize + buttonSize/2 + delta-1, ! (Tk_Height(tkwin)+1)/2 - 1 + delta, ! arrsize, arrsize, ARROW_RIGHT); } + + #ifdef ENABLE_STEP + doSlider: + #endif + /* * Display the slider. */ if (scrollPtr->activeField == SLIDER) { border = scrollPtr->activeBorder; ! relief = TK_RELIEF_RAISED; } else { border = scrollPtr->bgBorder; relief = TK_RELIEF_RAISED; } if (scrollPtr->vertical) { Tk_Fill3DRectangle(tkwin, pixmap, border, ! scrollPtr->inset, scrollPtr->sliderFirst, width, sliderSize, elementBorderWidth, relief); + if ((sliderSize > SB_BUMP_HEIGHT*2) && (width > SB_BUMP_WIDTH)) { + XCopyArea(scrollPtr->display, scrollPtr->bump, pixmap, + unixScrollPtr->copyGC, 0, 0, SB_BUMP_WIDTH, SB_BUMP_HEIGHT, + (Tk_Width(tkwin) - SB_BUMP_WIDTH)/2, + scrollPtr->sliderFirst + (sliderSize - 1 - SB_BUMP_HEIGHT)/2); + } else { + int bump_size; + + bump_size = width - 2*(scrollPtr->inset+4); + if ((sliderSize > bump_size+2) && (bump_size > 1)) { + Tk_Fill3DRectangle(tkwin, pixmap, border, + (Tk_Width(tkwin) - bump_size)/2, + scrollPtr->sliderFirst + (sliderSize - bump_size)/2, + bump_size, bump_size, 2, TK_RELIEF_SUNKEN); + } + } } else { Tk_Fill3DRectangle(tkwin, pixmap, border, scrollPtr->sliderFirst, scrollPtr->inset, ! sliderSize, width, elementBorderWidth, relief); + if ((sliderSize > SB_BUMP_HEIGHT*2) && (width > SB_BUMP_HEIGHT)) { + XCopyArea(scrollPtr->display, scrollPtr->bump, pixmap, + unixScrollPtr->copyGC, 0, 0, SB_BUMP_WIDTH, SB_BUMP_HEIGHT, + scrollPtr->sliderFirst + (sliderSize - SB_BUMP_HEIGHT)/2, + (Tk_Height(tkwin) - 1 - SB_BUMP_WIDTH)/2); + } else { + int bump_size; + + bump_size = width - 2*(scrollPtr->inset+4); + if ((sliderSize > bump_size+2) && (bump_size > 1)) { + Tk_Fill3DRectangle(tkwin, pixmap, border, + scrollPtr->sliderFirst + (sliderSize - bump_size)/2-1, + (Tk_Height(tkwin) - bump_size)/2, + bump_size, bump_size, 2, TK_RELIEF_SUNKEN); + } + } } /* *************** *** 246,251 **** --- 331,338 ---- * then delete the pixmap. */ + docopy: + XCopyArea(scrollPtr->display, pixmap, Tk_WindowId(tkwin), ((UnixScrollbar*)scrollPtr)->copyGC, 0, 0, (unsigned) Tk_Width(tkwin), (unsigned) Tk_Height(tkwin), 0, 0); *************** *** 278,284 **** register TkScrollbar *scrollPtr; /* Scrollbar whose geometry may * have changed. */ { ! int width, fieldLength; if (scrollPtr->highlightWidth < 0) { scrollPtr->highlightWidth = 0; --- 365,371 ---- register TkScrollbar *scrollPtr; /* Scrollbar whose geometry may * have changed. */ { ! int width, fieldLength, minLength; if (scrollPtr->highlightWidth < 0) { scrollPtr->highlightWidth = 0; *************** *** 286,295 **** scrollPtr->inset = scrollPtr->highlightWidth + scrollPtr->borderWidth; width = (scrollPtr->vertical) ? Tk_Width(scrollPtr->tkwin) : Tk_Height(scrollPtr->tkwin); ! scrollPtr->arrowLength = width - 2*scrollPtr->inset + 1; fieldLength = (scrollPtr->vertical ? Tk_Height(scrollPtr->tkwin) : Tk_Width(scrollPtr->tkwin)) ! - 2*(scrollPtr->arrowLength + scrollPtr->inset); if (fieldLength < 0) { fieldLength = 0; } --- 373,394 ---- scrollPtr->inset = scrollPtr->highlightWidth + scrollPtr->borderWidth; width = (scrollPtr->vertical) ? Tk_Width(scrollPtr->tkwin) : Tk_Height(scrollPtr->tkwin); ! #ifdef ENABLE_STEP ! if (scrollPtr->noArrows) { ! scrollPtr->arrowLength = -1; ! } else ! #endif ! scrollPtr->arrowLength = width - 2*scrollPtr->inset; fieldLength = (scrollPtr->vertical ? Tk_Height(scrollPtr->tkwin) : Tk_Width(scrollPtr->tkwin)) ! - 2*(scrollPtr->arrowLength + 1 + scrollPtr->inset); ! ! ! minLength = width - 2*scrollPtr->inset; ! if (minLength < MIN_SLIDER_LENGTH) ! minLength = MIN_SLIDER_LENGTH; ! ! if (fieldLength < 0) { fieldLength = 0; } *************** *** 301,322 **** * displayed in the scrollbar and so that it has at least * a minimal width (so it can be grabbed with the mouse). */ ! ! if (scrollPtr->sliderFirst > (fieldLength - 2*scrollPtr->borderWidth)) { ! scrollPtr->sliderFirst = fieldLength - 2*scrollPtr->borderWidth; } if (scrollPtr->sliderFirst < 0) { scrollPtr->sliderFirst = 0; } ! if (scrollPtr->sliderLast < (scrollPtr->sliderFirst ! + MIN_SLIDER_LENGTH)) { ! scrollPtr->sliderLast = scrollPtr->sliderFirst + MIN_SLIDER_LENGTH; } if (scrollPtr->sliderLast > fieldLength) { scrollPtr->sliderLast = fieldLength; } ! scrollPtr->sliderFirst += scrollPtr->arrowLength + scrollPtr->inset; ! scrollPtr->sliderLast += scrollPtr->arrowLength + scrollPtr->inset; /* * Register the desired geometry for the window (leave enough space --- 400,425 ---- * displayed in the scrollbar and so that it has at least * a minimal width (so it can be grabbed with the mouse). */ ! if (scrollPtr->sliderFirst > (fieldLength - MIN_SLIDER_LENGTH)) { ! scrollPtr->sliderFirst = fieldLength - MIN_SLIDER_LENGTH; } + if (scrollPtr->sliderFirst < 0) { scrollPtr->sliderFirst = 0; } ! if (scrollPtr->sliderLast < scrollPtr->sliderFirst + minLength) { ! scrollPtr->sliderLast = scrollPtr->sliderFirst + minLength; } if (scrollPtr->sliderLast > fieldLength) { scrollPtr->sliderLast = fieldLength; } ! if (scrollPtr->vertical) { ! scrollPtr->sliderFirst += scrollPtr->inset; ! scrollPtr->sliderLast += scrollPtr->inset; ! } else { ! scrollPtr->sliderFirst += (scrollPtr->arrowLength+1)*2 + scrollPtr->inset; ! scrollPtr->sliderLast += (scrollPtr->arrowLength+1)*2 + scrollPtr->inset; ! } /* * Register the desired geometry for the window (leave enough space *************** *** 329,339 **** Tk_GeometryRequest(scrollPtr->tkwin, scrollPtr->width + 2*scrollPtr->inset, 2*(scrollPtr->arrowLength + scrollPtr->borderWidth ! + scrollPtr->inset)); } else { Tk_GeometryRequest(scrollPtr->tkwin, 2*(scrollPtr->arrowLength + scrollPtr->borderWidth ! + scrollPtr->inset), scrollPtr->width + 2*scrollPtr->inset); } Tk_SetInternalBorder(scrollPtr->tkwin, scrollPtr->inset); } --- 432,442 ---- Tk_GeometryRequest(scrollPtr->tkwin, scrollPtr->width + 2*scrollPtr->inset, 2*(scrollPtr->arrowLength + scrollPtr->borderWidth ! + scrollPtr->inset + 1)); } else { Tk_GeometryRequest(scrollPtr->tkwin, 2*(scrollPtr->arrowLength + scrollPtr->borderWidth ! + scrollPtr->inset + 1), scrollPtr->width + 2*scrollPtr->inset); } Tk_SetInternalBorder(scrollPtr->tkwin, scrollPtr->inset); } *************** *** 360,371 **** { UnixScrollbar *unixScrollPtr = (UnixScrollbar *)scrollPtr; ! if (unixScrollPtr->troughGC != None) { Tk_FreeGC(scrollPtr->display, unixScrollPtr->troughGC); } if (unixScrollPtr->copyGC != None) { Tk_FreeGC(scrollPtr->display, unixScrollPtr->copyGC); } } /* --- 463,486 ---- { UnixScrollbar *unixScrollPtr = (UnixScrollbar *)scrollPtr; ! if (unixScrollPtr->troughGC != None) { Tk_FreeGC(scrollPtr->display, unixScrollPtr->troughGC); } if (unixScrollPtr->copyGC != None) { Tk_FreeGC(scrollPtr->display, unixScrollPtr->copyGC); } + if (unixScrollPtr->troughBackGC != None) { + Tk_FreeGC(scrollPtr->display, unixScrollPtr->troughBackGC); + } + if (scrollPtr->bump != None) { + Tk_FreePixmap(scrollPtr->display, scrollPtr->bump); + } + if (scrollPtr->stipple != None) { + Tk_FreeBitmap(scrollPtr->display, scrollPtr->stipple); + } + if (scrollPtr->darkPtr != NULL) { + Tk_FreeColor(scrollPtr->darkPtr); + } } /* *************** *** 393,414 **** * some fields. */ { XGCValues gcValues; GC new; UnixScrollbar *unixScrollPtr = (UnixScrollbar *) scrollPtr; Tk_SetBackgroundFromBorder(scrollPtr->tkwin, scrollPtr->bgBorder); ! gcValues.foreground = scrollPtr->troughColorPtr->pixel; ! new = Tk_GetGC(scrollPtr->tkwin, GCForeground, &gcValues); if (unixScrollPtr->troughGC != None) { Tk_FreeGC(scrollPtr->display, unixScrollPtr->troughGC); ! } unixScrollPtr->troughGC = new; if (unixScrollPtr->copyGC == None) { gcValues.graphics_exposures = False; unixScrollPtr->copyGC = Tk_GetGC(scrollPtr->tkwin, GCGraphicsExposures, &gcValues); } } /* --- 508,574 ---- * some fields. */ { XGCValues gcValues; + XColor newcolor; GC new; UnixScrollbar *unixScrollPtr = (UnixScrollbar *) scrollPtr; + + if (scrollPtr->stipple==None) { + scrollPtr->stipple = Tk_GetBitmap((Tcl_Interp *)NULL, scrollPtr->tkwin, + Tk_GetUid("gray50")); + if (scrollPtr->stipple == None) { + panic("ScrollBar couldn't allocate bitmap for trough"); + } + } + Tk_SetBackgroundFromBorder(scrollPtr->tkwin, scrollPtr->bgBorder); ! /* Allocate colour for trough base stipple. */ ! ! newcolor.red = (60 * (int) scrollPtr->troughColorPtr->red)/100; ! newcolor.green =(60 * (int) scrollPtr->troughColorPtr->green)/100; ! newcolor.blue = (60 * (int) scrollPtr->troughColorPtr->blue)/100; ! ! if (scrollPtr->darkPtr != NULL) { ! Tk_FreeColor(scrollPtr->darkPtr); ! } ! scrollPtr->darkPtr = Tk_GetColorByValue(scrollPtr->tkwin, &newcolor); ! ! gcValues.background = scrollPtr->troughColorPtr->pixel; ! gcValues.foreground = scrollPtr->darkPtr->pixel; ! gcValues.stipple = scrollPtr->stipple; ! gcValues.fill_style = FillOpaqueStippled; ! ! new = Tk_GetGC(scrollPtr->tkwin, GCForeground|GCBackground|GCStipple| ! GCFillStyle, &gcValues); if (unixScrollPtr->troughGC != None) { Tk_FreeGC(scrollPtr->display, unixScrollPtr->troughGC); ! } unixScrollPtr->troughGC = new; + + + gcValues.foreground = scrollPtr->troughColorPtr->pixel; + new = Tk_GetGC(scrollPtr->tkwin, GCForeground, &gcValues); + + if (unixScrollPtr->troughBackGC != None) { + Tk_FreeGC(scrollPtr->display, unixScrollPtr->troughBackGC); + } + + unixScrollPtr->troughBackGC = new; + + if (unixScrollPtr->copyGC == None) { gcValues.graphics_exposures = False; unixScrollPtr->copyGC = Tk_GetGC(scrollPtr->tkwin, GCGraphicsExposures, &gcValues); } + if (Tk_IsMapped(scrollPtr->tkwin)&&(scrollPtr->flags & RECONFIGURE)) { + scrollPtr->flags &= ~RECONFIGURE; + if (scrollPtr->bump != None) { + Tk_FreePixmap(scrollPtr->display, scrollPtr->bump); + } + MakePixmaps(scrollPtr); + } } /* *************** *** 460,476 **** * TkpDisplayScrollbar. Be sure to keep the two consistent. */ ! if (y < (scrollPtr->inset + scrollPtr->arrowLength)) { ! return TOP_ARROW; ! } ! if (y < scrollPtr->sliderFirst) { ! return TOP_GAP; ! } ! if (y < scrollPtr->sliderLast) { ! return SLIDER; ! } ! if (y >= (length - (scrollPtr->arrowLength + scrollPtr->inset))) { return BOTTOM_ARROW; } - return BOTTOM_GAP; } --- 620,744 ---- * TkpDisplayScrollbar. Be sure to keep the two consistent. */ ! if (scrollPtr->vertical) { ! if (y < scrollPtr->sliderFirst) { ! return TOP_GAP; ! } ! if (y < scrollPtr->sliderLast) { ! return SLIDER; ! } ! #ifdef ENABLE_STEP ! if (scrollPtr->noArrows || ! y < (length - ((scrollPtr->arrowLength+1)*2 + scrollPtr->inset))) { ! #else ! if (y < (length - ((scrollPtr->arrowLength+1)*2 + scrollPtr->inset))) { ! #endif ! return BOTTOM_GAP; ! } ! #ifdef ENABLE_STEP ! if (y < (length - (scrollPtr->arrowLength +1+ scrollPtr->inset)) ! && !scrollPtr->noArrows) { ! #else ! if (y < (length - (scrollPtr->arrowLength+1+ scrollPtr->inset))) { ! #endif ! return TOP_ARROW; ! } return BOTTOM_ARROW; + } else { + #ifdef ENABLE_STEP + if (!scrollPtr->noArrows && + y < (scrollPtr->arrowLength + 1+scrollPtr->inset)) { + #else + if (y < (scrollPtr->arrowLength + 1+scrollPtr->inset)) { + #endif + return TOP_ARROW; + } + #ifdef ENABLE_STEP + if (!scrollPtr->noArrows && + y < ((scrollPtr->arrowLength+1)*2 + scrollPtr->inset)) { + #else + if (y < ((scrollPtr->arrowLength+1)*2 + scrollPtr->inset)) { + #endif + return BOTTOM_ARROW; + } + if (y < (scrollPtr->sliderFirst)) { + return TOP_GAP; + } + if (y < (scrollPtr->sliderLast)) { + return SLIDER; + } + return BOTTOM_GAP; + } + } + + + /* + * DrawArrow -- + * Draws an antialiased arrow with direction dir and size w x h. + * It's coordinates are relative to the center of the arrow. + */ + void DrawArrow(scrollPtr, drawable, x, y, w, h, dir) + TkScrollbar *scrollPtr; + Drawable drawable; + int x, y; /* position relative to middle of arrow */ + int w, h; + unsigned dir; + { + int i, hw; + float d, s; + GC core, border; + + core = Tk_3DBorderGC(scrollPtr->tkwin,scrollPtr->bgBorder,TK_3D_DARK2_GC); + border = Tk_3DBorderGC(scrollPtr->tkwin,scrollPtr->bgBorder,TK_3D_DARK_GC); + + if (h<3) h=3; + if (w<3) w=3; + if (dir<2) { /* vertical */ + hw = w/2; + d = ((float)w/2)/(float)h; + y -= h/2; + } else { + hw = h/2; + d = ((float)h/2)/(float)w; + x -= w/2; + } + s=0; + switch (dir) { + case ARROW_DOWN: + s=h*d+0.5; + d=-d; + case ARROW_UP: + for(i = 0; i < h; i++) { + s += d; + XDrawLine(scrollPtr->display, drawable, core, + x-(int)(s-0.5), y+i, + x+(int)(s-0.5), y+i); + /* anti-aliasing */ + if ((int)(s+0.5)!=(int)s) { + XDrawPoint(scrollPtr->display, drawable, + border, x+(int)s, y+i); + XDrawPoint(scrollPtr->display, drawable, + border, x-(int)s, y+i); + } + } + break; + case ARROW_RIGHT: + s=h*d+0.5; + d=-d; + case ARROW_LEFT: + for(i = 0; i < h; i++) { + s += d; + XDrawLine(scrollPtr->display, drawable, + core, x+i,y-(int)(s-0.5), + x+i,y+(int)(s-0.5)); + /* anti-aliasing */ + if ((int)(s+0.5)!=(int)s) { + XDrawPoint(scrollPtr->display, drawable, + border, x+i,y+(int)s); + XDrawPoint(scrollPtr->display, drawable, + border, x+i,y-(int)s); + } + } + break; } } diff -r -c -P -x CVS ../tk8.0.5/unix/tkstepConfig.sh ./unix/tkstepConfig.sh *** ../tk8.0.5/unix/tkstepConfig.sh Thu Jan 1 09:00:00 1970 --- ./unix/tkstepConfig.sh Sun Aug 22 20:19:12 1999 *************** *** 0 **** --- 1,74 ---- + # tkStepConfig.sh -- + # + # This shell script (for sh) is generated automatically by TkStep's + # configure script. It will create shell variables for most of + # the configuration options discovered by the configure script. + # This script is intended to be included by the configure scripts + # for Tk extensions so that they don't have to figure this all + # out for themselves. This file does not duplicate information + # already provided by tclConfig.sh, so you may need to use that + # file in addition to this one. + # + # The information in this file is specific to a single platform. + # + # RCS: @(#) $Id: tkConfig.sh.in,v 1.6 1998/09/14 18:23:55 stanton Exp $ + + # Tk's version number. + TK_VERSION='8.0jp' + TK_MAJOR_VERSION='8' + TK_MINOR_VERSION='0' + TK_PATCH_LEVEL='.5' + + # -D flags for use with the C compiler. + TK_DEFS=' -DHAVE_UNISTD_H=1 -DHAVE_LIMITS_H=1 -DSTDC_HEADERS=1 -DHAVE_SYS_TIME_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_XIMREGINSTCB -Dlinux -D__i386__ -D_POSIX_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE -DX_LOCALE -DFUNCPROTO=15 -DNARROWPROTO -DKANJI -DBUGFIX -DKINPUT2 -DXIM_IMPROVE -DCHECK_XLFD -DENABLE_DND -DENABLE_STEP' + + # Flag, 1: we built a shared lib, 0 we didn't + TK_SHARED_BUILD=1 + + # This indicates if Tk was build with debugging symbols + TK_DBGX= + + # The name of the Tk library (may be either a .a file or a shared library): + TK_LIB_FILE='libtkstep8.0jp.so' + + # Additional libraries to use when linking Tk. + TK_LIBS='-L/usr/X11R6/lib -lX11 -ldl -lm ' + + # Top-level directory in which Tcl's platform-independent files are + # installed. + TK_PREFIX='/usr/local' + + # Top-level directory in which Tcl's platform-specific files (e.g. + # executables) are installed. + TK_EXEC_PREFIX='/usr/local' + + # -I switch(es) to use to make all of the X11 include files accessible: + TK_XINCLUDES='-I/usr/X11R6/include' + + # Linker switch(es) to use to link with the X11 library archive. + TK_XLIBSW='-L/usr/X11R6/lib -lX11' + + # -l flag to pass to the linker to pick up the Tcl library + TK_LIB_FLAG='-ltkstep8.0jp${TK_DBGX}' + + # String to pass to linker to pick up the Tk library from its + # build directory. + TK_BUILD_LIB_SPEC='-L/home/jwakaya/work/TkStep-8.0.5jp1.6/unix -ltkstep8.0jp${TK_DBGX}' + + # String to pass to linker to pick up the Tk library from its + # installed directory. + TK_LIB_SPEC='-L/usr/local/lib -ltkstep8.0jp${TK_DBGX}' + + # Location of the top-level source directory from which Tk was built. + # This is the directory that contains a README file as well as + # subdirectories such as generic, unix, etc. If Tk was compiled in a + # different place than the directory containing the source files, this + # points to the location of the sources, not the location where Tk was + # compiled. + TK_SRC_DIR='/home/jwakaya/work/TkStep-8.0.5jp1.6' + + # Needed if you want to make a 'fat' shared library library + # containing tk objects or link a different wish. + TK_CC_SEARCH_FLAGS='' + TK_LD_SEARCH_FLAGS='' +