# PaCkAgE DaTaStReAm SUNWtk 1 6004 # end of header 0707010006de1b000081a400004ccf0000000a0000000133f39e48000000f400000020000000d700000000000000000000000f00000004SUNWtk/pkginfoARCH=sun4 PKG=SUNWtk NAME=Tk 8.0 VERSION=8.0 CATEGORY=application DESC=Tk extension for Tcl scripting language libraries, binaries, and manual pages BASEDIR=/opt VENDOR=Sun Microsystems, Inc. MAXINST=1000 CLASSES=none PSTAMP=bisque970814170943 0707010006de10000081a400004ccf0000000a0000000133f39e480000662c00000020000000d700000000000000000000000e00000004SUNWtk/pkgmap: 1 6004 1 d none SUNWtcl 0755 root bin 1 d none SUNWtcl/8.0 0755 root bin 1 d none SUNWtcl/8.0/bin 0755 root bin 1 f none SUNWtcl/8.0/bin/wish8.0 0755 root bin 450 33848 871603778 1 d none SUNWtcl/8.0/include 0755 root bin 1 f none SUNWtcl/8.0/include/tk.h 0644 root bin 61116 48650 871603742 1 d none SUNWtcl/8.0/lib 0755 root bin 1 d none SUNWtcl/8.0/lib/tk8.0 0755 root bin 1 f none SUNWtcl/8.0/lib/tk8.0/bgerror.tcl 0644 root bin 3465 22149 871603742 1 f none SUNWtcl/8.0/lib/tk8.0/button.tcl 0644 root bin 11040 57675 871603742 1 f none SUNWtcl/8.0/lib/tk8.0/clrpick.tcl 0644 root bin 19765 35118 871603742 1 f none SUNWtcl/8.0/lib/tk8.0/comdlg.tcl 0644 root bin 7490 22870 871603743 1 f none SUNWtcl/8.0/lib/tk8.0/console.tcl 0644 root bin 11965 61508 871603743 1 f none SUNWtcl/8.0/lib/tk8.0/dialog.tcl 0644 root bin 5414 51479 871603743 1 f none SUNWtcl/8.0/lib/tk8.0/entry.tcl 0644 root bin 15066 4339 871603743 1 f none SUNWtcl/8.0/lib/tk8.0/focus.tcl 0644 root bin 4878 5758 871603744 1 d none SUNWtcl/8.0/lib/tk8.0/images 0755 root bin 1 f none SUNWtcl/8.0/lib/tk8.0/images/README 0644 root bin 366 31006 871603749 1 f none SUNWtcl/8.0/lib/tk8.0/images/logo100.gif 0644 root bin 2341 13514 871603749 1 f none SUNWtcl/8.0/lib/tk8.0/images/logo64.gif 0644 root bin 1670 61083 871603749 1 f none SUNWtcl/8.0/lib/tk8.0/images/logoLarge.gif 0644 root bin 11000 38754 871603749 1 f none SUNWtcl/8.0/lib/tk8.0/images/logoMed.gif 0644 root bin 3889 4936 871603750 1 f none SUNWtcl/8.0/lib/tk8.0/images/pwrdLogo100.gif 0644 root bin 4147 39445 871603750 1 f none SUNWtcl/8.0/lib/tk8.0/images/pwrdLogo150.gif 0644 root bin 6809 42674 871603750 1 f none SUNWtcl/8.0/lib/tk8.0/images/pwrdLogo175.gif 0644 root bin 7964 37225 871603750 1 f none SUNWtcl/8.0/lib/tk8.0/images/pwrdLogo200.gif 0644 root bin 8964 33342 871603751 1 f none SUNWtcl/8.0/lib/tk8.0/images/pwrdLogo75.gif 0644 root bin 3189 62282 871603751 1 f none SUNWtcl/8.0/lib/tk8.0/listbox.tcl 0644 root bin 11696 48139 871603744 1 f none SUNWtcl/8.0/lib/tk8.0/menu.tcl 0644 root bin 32625 20680 871603744 1 f none SUNWtcl/8.0/lib/tk8.0/msgbox.tcl 0644 root bin 6946 29432 871603745 1 f none SUNWtcl/8.0/lib/tk8.0/obsolete.tcl 0644 root bin 781 1781 871603745 1 f none SUNWtcl/8.0/lib/tk8.0/optMenu.tcl 0644 root bin 1612 5741 871603745 1 f none SUNWtcl/8.0/lib/tk8.0/palette.tcl 0644 root bin 7285 14699 871603745 1 f none SUNWtcl/8.0/lib/tk8.0/prolog.ps 0644 root bin 9546 26981 871603748 1 f none SUNWtcl/8.0/lib/tk8.0/safetk.tcl 0644 root bin 4572 49213 871603745 1 f none SUNWtcl/8.0/lib/tk8.0/scale.tcl 0644 root bin 6772 27672 871603746 1 f none SUNWtcl/8.0/lib/tk8.0/scrlbar.tcl 0644 root bin 11554 39494 871603746 1 f none SUNWtcl/8.0/lib/tk8.0/tclIndex 0644 root bin 17931 44094 871603748 1 f none SUNWtcl/8.0/lib/tk8.0/tearoff.tcl 0644 root bin 4029 64250 871603746 1 f none SUNWtcl/8.0/lib/tk8.0/text.tcl 0644 root bin 26108 354 871603746 1 f none SUNWtcl/8.0/lib/tk8.0/tk.tcl 0644 root bin 5332 37696 871603747 1 f none SUNWtcl/8.0/lib/tk8.0/tkAppInit.c 0644 root bin 3209 48999 871603748 1 f none SUNWtcl/8.0/lib/tk8.0/tkfbox.tcl 0644 root bin 36536 26634 871603747 1 f none SUNWtcl/8.0/lib/tk8.0/xmfbox.tcl 0644 root bin 15957 38612 871603747 1 d none SUNWtcl/8.0/man 0755 root bin 1 d none SUNWtcl/8.0/man/man1 0755 root bin 1 f none SUNWtcl/8.0/man/man1/wish.1 0444 root bin 12431 7951 871603752 1 d none SUNWtcl/8.0/man/man3 0755 root bin 1 f none SUNWtcl/8.0/man/man3/3DBorder.3 0444 root bin 16846 16514 871603752 1 f none SUNWtcl/8.0/man/man3/BindTable.3 0444 root bin 11399 55820 871603752 1 f none SUNWtcl/8.0/man/man3/CanvPsY.3 0444 root bin 9487 11871 871603752 1 f none SUNWtcl/8.0/man/man3/CanvTkwin.3 0444 root bin 11244 39289 871603752 1 f none SUNWtcl/8.0/man/man3/CanvTxtInfo.3 0444 root bin 9013 35125 871603752 1 f none SUNWtcl/8.0/man/man3/Clipboard.3 0444 root bin 7755 49495 871603752 1 f none SUNWtcl/8.0/man/man3/ClrSelect.3 0444 root bin 5959 15325 871603753 1 f none SUNWtcl/8.0/man/man3/ConfigWidg.3 0444 root bin 33258 55982 871603753 1 f none SUNWtcl/8.0/man/man3/ConfigWind.3 0444 root bin 10958 15258 871603753 1 f none SUNWtcl/8.0/man/man3/CoordToWin.3 0444 root bin 6439 59592 871603753 1 f none SUNWtcl/8.0/man/man3/CrtErrHdlr.3 0444 root bin 10999 19057 871603753 1 f none SUNWtcl/8.0/man/man3/CrtGenHdlr.3 0444 root bin 8083 13432 871603753 1 f none SUNWtcl/8.0/man/man3/CrtImgType.3 0444 root bin 14535 7506 871603753 1 f none SUNWtcl/8.0/man/man3/CrtItemType.3 0444 root bin 28633 40498 871603753 1 f none SUNWtcl/8.0/man/man3/CrtPhImgFmt.3 0444 root bin 14800 31518 871603753 1 f none SUNWtcl/8.0/man/man3/CrtSelHdlr.3 0444 root bin 9956 52908 871603753 1 f none SUNWtcl/8.0/man/man3/CrtWindow.3 0444 root bin 10851 2498 871603753 1 f none SUNWtcl/8.0/man/man3/DeleteImg.3 0444 root bin 5616 48848 871603754 1 f none SUNWtcl/8.0/man/man3/DrawFocHlt.3 0444 root bin 5870 7597 871603754 1 f none SUNWtcl/8.0/man/man3/EventHndlr.3 0444 root bin 7754 48019 871603754 1 f none SUNWtcl/8.0/man/man3/FindPhoto.3 0444 root bin 12644 30160 871603754 1 f none SUNWtcl/8.0/man/man3/FontId.3 0444 root bin 7324 9079 871603754 1 f none SUNWtcl/8.0/man/man3/FreeXId.3 0444 root bin 6636 11644 871603754 1 f none SUNWtcl/8.0/man/man3/GeomReq.3 0444 root bin 7519 29113 871603754 1 f none SUNWtcl/8.0/man/man3/GetAnchor.3 0444 root bin 6976 37678 871603754 1 f none SUNWtcl/8.0/man/man3/GetBitmap.3 0444 root bin 13134 63608 871603755 1 f none SUNWtcl/8.0/man/man3/GetCapStyl.3 0444 root bin 6745 19705 871603755 1 f none SUNWtcl/8.0/man/man3/GetClrmap.3 0444 root bin 7473 23320 871603755 1 f none SUNWtcl/8.0/man/man3/GetColor.3 0444 root bin 10583 38518 871603755 1 f none SUNWtcl/8.0/man/man3/GetCursor.3 0444 root bin 13007 1465 871603755 1 f none SUNWtcl/8.0/man/man3/GetFont.3 0444 root bin 7598 32206 871603755 1 f none SUNWtcl/8.0/man/man3/GetGC.3 0444 root bin 7540 26233 871603755 1 f none SUNWtcl/8.0/man/man3/GetImage.3 0444 root bin 9761 28113 871603755 1 f none SUNWtcl/8.0/man/man3/GetJoinStl.3 0444 root bin 6759 21960 871603755 1 f none SUNWtcl/8.0/man/man3/GetJustify.3 0444 root bin 7032 46205 871603755 1 f none SUNWtcl/8.0/man/man3/GetOption.3 0444 root bin 6162 33217 871603755 1 f none SUNWtcl/8.0/man/man3/GetPixels.3 0444 root bin 7183 61903 871603756 1 f none SUNWtcl/8.0/man/man3/GetPixmap.3 0444 root bin 6453 59892 871603756 1 f none SUNWtcl/8.0/man/man3/GetRelief.3 0444 root bin 6694 9929 871603756 1 f none SUNWtcl/8.0/man/man3/GetRootCrd.3 0444 root bin 6109 30364 871603756 1 f none SUNWtcl/8.0/man/man3/GetScroll.3 0444 root bin 7039 46912 871603756 1 f none SUNWtcl/8.0/man/man3/GetSelect.3 0444 root bin 7811 53299 871603756 1 f none SUNWtcl/8.0/man/man3/GetUid.3 0444 root bin 6381 51546 871603756 1 f none SUNWtcl/8.0/man/man3/GetVRoot.3 0444 root bin 6554 4199 871603756 1 f none SUNWtcl/8.0/man/man3/GetVisual.3 0444 root bin 8281 29435 871603756 1 f none SUNWtcl/8.0/man/man3/HandleEvent.3 0444 root bin 6372 53186 871603756 1 f none SUNWtcl/8.0/man/man3/IdToWindow.3 0444 root bin 5602 48477 871603757 1 f none SUNWtcl/8.0/man/man3/ImgChanged.3 0444 root bin 7174 58397 871603757 1 f none SUNWtcl/8.0/man/man3/InternAtom.3 0444 root bin 6678 15192 871603757 1 f none SUNWtcl/8.0/man/man3/MainLoop.3 0444 root bin 5698 57804 871603757 1 f none SUNWtcl/8.0/man/man3/MainWin.3 0444 root bin 5712 58703 871603757 1 f none SUNWtcl/8.0/man/man3/MaintGeom.3 0444 root bin 8793 14562 871603757 1 f none SUNWtcl/8.0/man/man3/ManageGeom.3 0444 root bin 8185 24800 871603757 1 f none SUNWtcl/8.0/man/man3/MapWindow.3 0444 root bin 6385 54175 871603757 1 f none SUNWtcl/8.0/man/man3/MeasureChar.3 0444 root bin 10533 38686 871603757 1 f none SUNWtcl/8.0/man/man3/MoveToplev.3 0444 root bin 6907 38169 871603757 1 f none SUNWtcl/8.0/man/man3/Name.3 0444 root bin 7918 61007 871603757 1 f none SUNWtcl/8.0/man/man3/NameOfImg.3 0444 root bin 5577 45445 871603758 1 f none SUNWtcl/8.0/man/man3/OwnSelect.3 0444 root bin 6560 5230 871603758 1 f none SUNWtcl/8.0/man/man3/ParseArgv.3 0444 root bin 19077 64526 871603758 1 f none SUNWtcl/8.0/man/man3/QWinEvent.3 0444 root bin 6054 24060 871603758 1 f none SUNWtcl/8.0/man/man3/Restack.3 0444 root bin 6349 50347 871603758 1 f none SUNWtcl/8.0/man/man3/RestrictEv.3 0444 root bin 8283 33273 871603758 1 f none SUNWtcl/8.0/man/man3/SetAppName.3 0444 root bin 7087 52902 871603758 1 f none SUNWtcl/8.0/man/man3/SetClass.3 0444 root bin 6780 22850 871603758 1 f none SUNWtcl/8.0/man/man3/SetGrid.3 0444 root bin 7101 55389 871603758 1 f none SUNWtcl/8.0/man/man3/SetVisual.3 0444 root bin 6552 4391 871603758 1 f none SUNWtcl/8.0/man/man3/StrictMotif.3 0444 root bin 5915 12172 871603758 1 f none SUNWtcl/8.0/man/man3/TextLayout.3 0444 root bin 18618 62380 871603759 1 l none SUNWtcl/8.0/man/man3/Tk_3DBorderColor.3=3DBorder.3 1 l none SUNWtcl/8.0/man/man3/Tk_3DBorderGC.3=3DBorder.3 1 l none SUNWtcl/8.0/man/man3/Tk_3DHorizontalBevel.3=3DBorder.3 1 l none SUNWtcl/8.0/man/man3/Tk_3DVerticalBevel.3=3DBorder.3 1 l none SUNWtcl/8.0/man/man3/Tk_Attributes.3=WindowId.3 1 l none SUNWtcl/8.0/man/man3/Tk_BindEvent.3=BindTable.3 1 l none SUNWtcl/8.0/man/man3/Tk_CanvasDrawableCoords.3=CanvTkwin.3 1 l none SUNWtcl/8.0/man/man3/Tk_CanvasEventuallyRedraw.3=CanvTkwin.3 1 l none SUNWtcl/8.0/man/man3/Tk_CanvasGetCoord.3=CanvTkwin.3 1 l none SUNWtcl/8.0/man/man3/Tk_CanvasPsBitmap.3=CanvPsY.3 1 l none SUNWtcl/8.0/man/man3/Tk_CanvasPsColor.3=CanvPsY.3 1 l none SUNWtcl/8.0/man/man3/Tk_CanvasPsFont.3=CanvPsY.3 1 l none SUNWtcl/8.0/man/man3/Tk_CanvasPsPath.3=CanvPsY.3 1 l none SUNWtcl/8.0/man/man3/Tk_CanvasPsStipple.3=CanvPsY.3 1 l none SUNWtcl/8.0/man/man3/Tk_CanvasPsY.3=CanvPsY.3 1 l none SUNWtcl/8.0/man/man3/Tk_CanvasSetStippleOrigin.3=CanvTkwin.3 1 l none SUNWtcl/8.0/man/man3/Tk_CanvasTagsOption.3=CanvTkwin.3 1 l none SUNWtcl/8.0/man/man3/Tk_CanvasTextInfo.3=CanvTxtInfo.3 1 l none SUNWtcl/8.0/man/man3/Tk_CanvasTkwin.3=CanvTkwin.3 1 l none SUNWtcl/8.0/man/man3/Tk_CanvasWindowCoords.3=CanvTkwin.3 1 l none SUNWtcl/8.0/man/man3/Tk_ChangeWindowAttributes.3=ConfigWind.3 1 l none SUNWtcl/8.0/man/man3/Tk_Changes.3=WindowId.3 1 l none SUNWtcl/8.0/man/man3/Tk_CharBbox.3=TextLayout.3 1 l none SUNWtcl/8.0/man/man3/Tk_Class.3=SetClass.3 1 l none SUNWtcl/8.0/man/man3/Tk_ClearSelection.3=ClrSelect.3 1 l none SUNWtcl/8.0/man/man3/Tk_ClipboardAppend.3=Clipboard.3 1 l none SUNWtcl/8.0/man/man3/Tk_ClipboardClear.3=Clipboard.3 1 l none SUNWtcl/8.0/man/man3/Tk_Colormap.3=WindowId.3 1 l none SUNWtcl/8.0/man/man3/Tk_ComputeTextLayout.3=TextLayout.3 1 l none SUNWtcl/8.0/man/man3/Tk_ConfigureInfo.3=ConfigWidg.3 1 l none SUNWtcl/8.0/man/man3/Tk_ConfigureValue.3=ConfigWidg.3 1 l none SUNWtcl/8.0/man/man3/Tk_ConfigureWidget.3=ConfigWidg.3 1 l none SUNWtcl/8.0/man/man3/Tk_ConfigureWindow.3=ConfigWind.3 1 l none SUNWtcl/8.0/man/man3/Tk_CoordsToWindow.3=CoordToWin.3 1 l none SUNWtcl/8.0/man/man3/Tk_CreateBinding.3=BindTable.3 1 l none SUNWtcl/8.0/man/man3/Tk_CreateBindingTable.3=BindTable.3 1 l none SUNWtcl/8.0/man/man3/Tk_CreateErrorHandler.3=CrtErrHdlr.3 1 l none SUNWtcl/8.0/man/man3/Tk_CreateEventHandler.3=EventHndlr.3 1 l none SUNWtcl/8.0/man/man3/Tk_CreateGenericHandler.3=CrtGenHdlr.3 1 l none SUNWtcl/8.0/man/man3/Tk_CreateImageType.3=CrtImgType.3 1 l none SUNWtcl/8.0/man/man3/Tk_CreateItemType.3=CrtItemType.3 1 l none SUNWtcl/8.0/man/man3/Tk_CreatePhotoImageFormat.3=CrtPhImgFmt.3 1 l none SUNWtcl/8.0/man/man3/Tk_CreateSelHandler.3=CrtSelHdlr.3 1 l none SUNWtcl/8.0/man/man3/Tk_CreateWindow.3=CrtWindow.3 1 l none SUNWtcl/8.0/man/man3/Tk_CreateWindowFromPath.3=CrtWindow.3 1 l none SUNWtcl/8.0/man/man3/Tk_DefineBitmap.3=GetBitmap.3 1 l none SUNWtcl/8.0/man/man3/Tk_DefineCursor.3=ConfigWind.3 1 l none SUNWtcl/8.0/man/man3/Tk_DeleteAllBindings.3=BindTable.3 1 l none SUNWtcl/8.0/man/man3/Tk_DeleteBinding.3=BindTable.3 1 l none SUNWtcl/8.0/man/man3/Tk_DeleteBindingTable.3=BindTable.3 1 l none SUNWtcl/8.0/man/man3/Tk_DeleteErrorHandler.3=CrtErrHdlr.3 1 l none SUNWtcl/8.0/man/man3/Tk_DeleteEventHandler.3=EventHndlr.3 1 l none SUNWtcl/8.0/man/man3/Tk_DeleteGenericHandler.3=CrtGenHdlr.3 1 l none SUNWtcl/8.0/man/man3/Tk_DeleteImage.3=DeleteImg.3 1 l none SUNWtcl/8.0/man/man3/Tk_DeleteSelHandler.3=CrtSelHdlr.3 1 l none SUNWtcl/8.0/man/man3/Tk_Depth.3=WindowId.3 1 l none SUNWtcl/8.0/man/man3/Tk_DestroyWindow.3=CrtWindow.3 1 l none SUNWtcl/8.0/man/man3/Tk_Display.3=WindowId.3 1 l none SUNWtcl/8.0/man/man3/Tk_DisplayName.3=WindowId.3 1 l none SUNWtcl/8.0/man/man3/Tk_DistanceToTextLayout.3=TextLayout.3 1 l none SUNWtcl/8.0/man/man3/Tk_Draw3DPolygon.3=3DBorder.3 1 l none SUNWtcl/8.0/man/man3/Tk_Draw3DRectangle.3=3DBorder.3 1 l none SUNWtcl/8.0/man/man3/Tk_DrawChars.3=MeasureChar.3 1 l none SUNWtcl/8.0/man/man3/Tk_DrawFocusHighlight.3=DrawFocHlt.3 1 l none SUNWtcl/8.0/man/man3/Tk_DrawTextLayout.3=TextLayout.3 1 l none SUNWtcl/8.0/man/man3/Tk_Fill3DPolygon.3=3DBorder.3 1 l none SUNWtcl/8.0/man/man3/Tk_Fill3DRectangle.3=3DBorder.3 1 l none SUNWtcl/8.0/man/man3/Tk_FindPhoto.3=FindPhoto.3 1 l none SUNWtcl/8.0/man/man3/Tk_FontId.3=FontId.3 1 l none SUNWtcl/8.0/man/man3/Tk_FontMetrics.3=FontId.3 1 l none SUNWtcl/8.0/man/man3/Tk_Free3DBorder.3=3DBorder.3 1 l none SUNWtcl/8.0/man/man3/Tk_FreeBitmap.3=GetBitmap.3 1 l none SUNWtcl/8.0/man/man3/Tk_FreeColor.3=GetColor.3 1 l none SUNWtcl/8.0/man/man3/Tk_FreeColormap.3=GetClrmap.3 1 l none SUNWtcl/8.0/man/man3/Tk_FreeCursor.3=GetCursor.3 1 l none SUNWtcl/8.0/man/man3/Tk_FreeFont.3=GetFont.3 1 l none SUNWtcl/8.0/man/man3/Tk_FreeGC.3=GetGC.3 1 l none SUNWtcl/8.0/man/man3/Tk_FreeImage.3=GetImage.3 1 l none SUNWtcl/8.0/man/man3/Tk_FreeOptions.3=ConfigWidg.3 1 l none SUNWtcl/8.0/man/man3/Tk_FreePixmap.3=GetPixmap.3 1 l none SUNWtcl/8.0/man/man3/Tk_FreeTextLayout.3=TextLayout.3 1 l none SUNWtcl/8.0/man/man3/Tk_FreeXId.3=FreeXId.3 1 l none SUNWtcl/8.0/man/man3/Tk_GeometryRequest.3=GeomReq.3 1 l none SUNWtcl/8.0/man/man3/Tk_Get3DBorder.3=3DBorder.3 1 l none SUNWtcl/8.0/man/man3/Tk_GetAllBindings.3=BindTable.3 1 l none SUNWtcl/8.0/man/man3/Tk_GetAnchor.3=GetAnchor.3 1 l none SUNWtcl/8.0/man/man3/Tk_GetAtomName.3=InternAtom.3 1 l none SUNWtcl/8.0/man/man3/Tk_GetBinding.3=BindTable.3 1 l none SUNWtcl/8.0/man/man3/Tk_GetBitmap.3=GetBitmap.3 1 l none SUNWtcl/8.0/man/man3/Tk_GetBitmapFromData.3=GetBitmap.3 1 l none SUNWtcl/8.0/man/man3/Tk_GetCapStyle.3=GetCapStyl.3 1 l none SUNWtcl/8.0/man/man3/Tk_GetColor.3=GetColor.3 1 l none SUNWtcl/8.0/man/man3/Tk_GetColorByValue.3=GetColor.3 1 l none SUNWtcl/8.0/man/man3/Tk_GetColormap.3=GetClrmap.3 1 l none SUNWtcl/8.0/man/man3/Tk_GetCursor.3=GetCursor.3 1 l none SUNWtcl/8.0/man/man3/Tk_GetCursorFromData.3=GetCursor.3 1 l none SUNWtcl/8.0/man/man3/Tk_GetFont.3=GetFont.3 1 l none SUNWtcl/8.0/man/man3/Tk_GetGC.3=GetGC.3 1 l none SUNWtcl/8.0/man/man3/Tk_GetImage.3=GetImage.3 1 l none SUNWtcl/8.0/man/man3/Tk_GetImageMasterData.3=CrtImgType.3 1 l none SUNWtcl/8.0/man/man3/Tk_GetItemTypes.3=CrtItemType.3 1 l none SUNWtcl/8.0/man/man3/Tk_GetJoinStyle.3=GetJoinStl.3 1 l none SUNWtcl/8.0/man/man3/Tk_GetJustify.3=GetJustify.3 1 l none SUNWtcl/8.0/man/man3/Tk_GetOption.3=GetOption.3 1 l none SUNWtcl/8.0/man/man3/Tk_GetPixels.3=GetPixels.3 1 l none SUNWtcl/8.0/man/man3/Tk_GetPixmap.3=GetPixmap.3 1 l none SUNWtcl/8.0/man/man3/Tk_GetRelief.3=GetRelief.3 1 l none SUNWtcl/8.0/man/man3/Tk_GetRootCoords.3=GetRootCrd.3 1 l none SUNWtcl/8.0/man/man3/Tk_GetScreenMM.3=GetPixels.3 1 l none SUNWtcl/8.0/man/man3/Tk_GetScrollInfo.3=GetScroll.3 1 l none SUNWtcl/8.0/man/man3/Tk_GetSelection.3=GetSelect.3 1 l none SUNWtcl/8.0/man/man3/Tk_GetUid.3=GetUid.3 1 l none SUNWtcl/8.0/man/man3/Tk_GetVRootGeometry.3=GetVRoot.3 1 l none SUNWtcl/8.0/man/man3/Tk_GetVisual.3=GetVisual.3 1 l none SUNWtcl/8.0/man/man3/Tk_HandleEvent.3=HandleEvent.3 1 l none SUNWtcl/8.0/man/man3/Tk_Height.3=WindowId.3 1 l none SUNWtcl/8.0/man/man3/Tk_IdToWindow.3=IdToWindow.3 1 l none SUNWtcl/8.0/man/man3/Tk_ImageChanged.3=ImgChanged.3 1 f none SUNWtcl/8.0/man/man3/Tk_Init.3 0444 root bin 6222 39067 871603759 1 l none SUNWtcl/8.0/man/man3/Tk_InternAtom.3=InternAtom.3 1 l none SUNWtcl/8.0/man/man3/Tk_InternalBorderWidth.3=WindowId.3 1 l none SUNWtcl/8.0/man/man3/Tk_IntersectTextLayout.3=TextLayout.3 1 l none SUNWtcl/8.0/man/man3/Tk_IsMapped.3=WindowId.3 1 l none SUNWtcl/8.0/man/man3/Tk_IsTopLevel.3=WindowId.3 1 f none SUNWtcl/8.0/man/man3/Tk_Main.3 0444 root bin 6917 37261 871603759 1 l none SUNWtcl/8.0/man/man3/Tk_MainLoop.3=MainLoop.3 1 l none SUNWtcl/8.0/man/man3/Tk_MainWindow.3=MainWin.3 1 l none SUNWtcl/8.0/man/man3/Tk_MaintainGeometry.3=MaintGeom.3 1 l none SUNWtcl/8.0/man/man3/Tk_MakeWindowExist.3=CrtWindow.3 1 l none SUNWtcl/8.0/man/man3/Tk_ManageGeometry.3=ManageGeom.3 1 l none SUNWtcl/8.0/man/man3/Tk_MapWindow.3=MapWindow.3 1 l none SUNWtcl/8.0/man/man3/Tk_MeasureChars.3=MeasureChar.3 1 l none SUNWtcl/8.0/man/man3/Tk_MoveResizeWindow.3=ConfigWind.3 1 l none SUNWtcl/8.0/man/man3/Tk_MoveToplevelWindow.3=MoveToplev.3 1 l none SUNWtcl/8.0/man/man3/Tk_MoveWindow.3=ConfigWind.3 1 l none SUNWtcl/8.0/man/man3/Tk_Name.3=Name.3 1 l none SUNWtcl/8.0/man/man3/Tk_NameOf3DBorder.3=3DBorder.3 1 l none SUNWtcl/8.0/man/man3/Tk_NameOfAnchor.3=GetAnchor.3 1 l none SUNWtcl/8.0/man/man3/Tk_NameOfBitmap.3=GetBitmap.3 1 l none SUNWtcl/8.0/man/man3/Tk_NameOfCapStyle.3=GetCapStyl.3 1 l none SUNWtcl/8.0/man/man3/Tk_NameOfColor.3=GetColor.3 1 l none SUNWtcl/8.0/man/man3/Tk_NameOfCursor.3=GetCursor.3 1 l none SUNWtcl/8.0/man/man3/Tk_NameOfFont.3=GetFont.3 1 l none SUNWtcl/8.0/man/man3/Tk_NameOfImage.3=NameOfImg.3 1 l none SUNWtcl/8.0/man/man3/Tk_NameOfJoinStyle.3=GetJoinStl.3 1 l none SUNWtcl/8.0/man/man3/Tk_NameOfJustify.3=GetJustify.3 1 l none SUNWtcl/8.0/man/man3/Tk_NameOfRelief.3=GetRelief.3 1 l none SUNWtcl/8.0/man/man3/Tk_NameToWindow.3=Name.3 1 l none SUNWtcl/8.0/man/man3/Tk_Offset.3=ConfigWidg.3 1 l none SUNWtcl/8.0/man/man3/Tk_OwnSelection.3=OwnSelect.3 1 l none SUNWtcl/8.0/man/man3/Tk_Parent.3=WindowId.3 1 l none SUNWtcl/8.0/man/man3/Tk_ParseArgv.3=ParseArgv.3 1 l none SUNWtcl/8.0/man/man3/Tk_PathName.3=Name.3 1 l none SUNWtcl/8.0/man/man3/Tk_PhotoBlank.3=FindPhoto.3 1 l none SUNWtcl/8.0/man/man3/Tk_PhotoExpand.3=FindPhoto.3 1 l none SUNWtcl/8.0/man/man3/Tk_PhotoGetImage.3=FindPhoto.3 1 l none SUNWtcl/8.0/man/man3/Tk_PhotoGetSize.3=FindPhoto.3 1 l none SUNWtcl/8.0/man/man3/Tk_PhotoPutBlock.3=FindPhoto.3 1 l none SUNWtcl/8.0/man/man3/Tk_PhotoPutZoomedBlock.3=FindPhoto.3 1 l none SUNWtcl/8.0/man/man3/Tk_PhotoSetSize.3=FindPhoto.3 1 l none SUNWtcl/8.0/man/man3/Tk_PointToChar.3=TextLayout.3 1 l none SUNWtcl/8.0/man/man3/Tk_PostscriptFontName.3=FontId.3 1 l none SUNWtcl/8.0/man/man3/Tk_QueueWindowEvent.3=QWinEvent.3 1 l none SUNWtcl/8.0/man/man3/Tk_RedrawImage.3=GetImage.3 1 l none SUNWtcl/8.0/man/man3/Tk_ReqHeight.3=WindowId.3 1 l none SUNWtcl/8.0/man/man3/Tk_ReqWidth.3=WindowId.3 1 l none SUNWtcl/8.0/man/man3/Tk_ResizeWindow.3=ConfigWind.3 1 l none SUNWtcl/8.0/man/man3/Tk_RestackWindow.3=Restack.3 1 l none SUNWtcl/8.0/man/man3/Tk_RestrictEvents.3=RestrictEv.3 1 l none SUNWtcl/8.0/man/man3/Tk_Screen.3=WindowId.3 1 l none SUNWtcl/8.0/man/man3/Tk_ScreenNumber.3=WindowId.3 1 l none SUNWtcl/8.0/man/man3/Tk_SetAppName.3=SetAppName.3 1 l none SUNWtcl/8.0/man/man3/Tk_SetBackgroundFromBorder.3=3DBorder.3 1 l none SUNWtcl/8.0/man/man3/Tk_SetClass.3=SetClass.3 1 l none SUNWtcl/8.0/man/man3/Tk_SetGrid.3=SetGrid.3 1 l none SUNWtcl/8.0/man/man3/Tk_SetInternalBorder.3=GeomReq.3 1 l none SUNWtcl/8.0/man/man3/Tk_SetWindowBackground.3=ConfigWind.3 1 l none SUNWtcl/8.0/man/man3/Tk_SetWindowBackgroundPixmap.3=ConfigWind.3 1 l none SUNWtcl/8.0/man/man3/Tk_SetWindowBorder.3=ConfigWind.3 1 l none SUNWtcl/8.0/man/man3/Tk_SetWindowBorderPixmap.3=ConfigWind.3 1 l none SUNWtcl/8.0/man/man3/Tk_SetWindowBorderWidth.3=ConfigWind.3 1 l none SUNWtcl/8.0/man/man3/Tk_SetWindowColormap.3=ConfigWind.3 1 l none SUNWtcl/8.0/man/man3/Tk_SetWindowVisual.3=SetVisual.3 1 l none SUNWtcl/8.0/man/man3/Tk_SizeOfBitmap.3=GetBitmap.3 1 l none SUNWtcl/8.0/man/man3/Tk_SizeOfImage.3=GetImage.3 1 l none SUNWtcl/8.0/man/man3/Tk_StrictMotif.3=StrictMotif.3 1 l none SUNWtcl/8.0/man/man3/Tk_TextLayoutToPostscript.3=TextLayout.3 1 l none SUNWtcl/8.0/man/man3/Tk_TextWidth.3=MeasureChar.3 1 l none SUNWtcl/8.0/man/man3/Tk_Uid.3=GetUid.3 1 l none SUNWtcl/8.0/man/man3/Tk_UndefineCursor.3=ConfigWind.3 1 l none SUNWtcl/8.0/man/man3/Tk_UnderlineChars.3=MeasureChar.3 1 l none SUNWtcl/8.0/man/man3/Tk_UnderlineTextLayout.3=TextLayout.3 1 l none SUNWtcl/8.0/man/man3/Tk_UnmaintainGeometry.3=MaintGeom.3 1 l none SUNWtcl/8.0/man/man3/Tk_UnmapWindow.3=MapWindow.3 1 l none SUNWtcl/8.0/man/man3/Tk_UnsetGrid.3=SetGrid.3 1 l none SUNWtcl/8.0/man/man3/Tk_Visual.3=WindowId.3 1 l none SUNWtcl/8.0/man/man3/Tk_Width.3=WindowId.3 1 l none SUNWtcl/8.0/man/man3/Tk_WindowId.3=WindowId.3 1 l none SUNWtcl/8.0/man/man3/Tk_X.3=WindowId.3 1 l none SUNWtcl/8.0/man/man3/Tk_Y.3=WindowId.3 1 f none SUNWtcl/8.0/man/man3/WindowId.3 0444 root bin 9610 19935 871603759 1 d none SUNWtcl/8.0/man/mann 0755 root bin 1 f none SUNWtcl/8.0/man/mann/bell.n 0444 root bin 5799 825 871603771 1 f none SUNWtcl/8.0/man/mann/bind.n 0444 root bin 24376 30989 871603771 1 f none SUNWtcl/8.0/man/mann/bindtags.n 0444 root bin 8012 4622 871603771 1 f none SUNWtcl/8.0/man/mann/bitmap.n 0444 root bin 8935 20821 871603771 1 f none SUNWtcl/8.0/man/mann/button.n 0444 root bin 12245 63790 871603772 1 f none SUNWtcl/8.0/man/mann/canvas.n 0444 root bin 74275 60783 871603772 1 f none SUNWtcl/8.0/man/mann/checkbutton.n 0444 root bin 15394 26908 871603772 1 f none SUNWtcl/8.0/man/mann/chooseColor.n 0444 root bin 6289 45485 871603772 1 f none SUNWtcl/8.0/man/mann/clipboard.n 0444 root bin 8250 26417 871603772 1 f none SUNWtcl/8.0/man/mann/destroy.n 0444 root bin 5732 60643 871603772 1 f none SUNWtcl/8.0/man/mann/dialog.n 0444 root bin 6954 39328 871603772 1 f none SUNWtcl/8.0/man/mann/entry.n 0444 root bin 22376 2710 871603772 1 f none SUNWtcl/8.0/man/mann/event.n 0444 root bin 18710 58867 871603772 1 f none SUNWtcl/8.0/man/mann/focus.n 0444 root bin 9634 24398 871603772 1 f none SUNWtcl/8.0/man/mann/focusNext.n 0444 root bin 7193 887 871603773 1 f none SUNWtcl/8.0/man/mann/font.n 0444 root bin 17409 158 871603773 1 f none SUNWtcl/8.0/man/mann/frame.n 0444 root bin 10127 170 871603773 1 f none SUNWtcl/8.0/man/mann/getOpenFile.n 0444 root bin 11545 57059 871603773 1 f none SUNWtcl/8.0/man/mann/grab.n 0444 root bin 9846 45071 871603773 1 f none SUNWtcl/8.0/man/mann/grid.n 0444 root bin 20319 5764 871603773 1 f none SUNWtcl/8.0/man/mann/image.n 0444 root bin 7982 1307 871603773 1 f none SUNWtcl/8.0/man/mann/label.n 0444 root bin 8867 15017 871603773 1 f none SUNWtcl/8.0/man/mann/listbox.n 0444 root bin 24301 47330 871603773 1 f none SUNWtcl/8.0/man/mann/loadTk.n 0444 root bin 8060 10667 871603774 1 f none SUNWtcl/8.0/man/mann/lower.n 0444 root bin 6016 20633 871603774 1 f none SUNWtcl/8.0/man/mann/menu.n 0444 root bin 37419 57300 871603774 1 f none SUNWtcl/8.0/man/mann/menubar.n 0444 root bin 5832 3932 871603774 1 f none SUNWtcl/8.0/man/mann/menubutton.n 0444 root bin 13413 45831 871603774 1 f none SUNWtcl/8.0/man/mann/message.n 0444 root bin 11056 17885 871603774 1 f none SUNWtcl/8.0/man/mann/messageBox.n 0444 root bin 7670 38588 871603774 1 f none SUNWtcl/8.0/man/mann/option.n 0444 root bin 8348 38509 871603774 1 f none SUNWtcl/8.0/man/mann/optionMenu.n 0444 root bin 6194 37607 871603775 1 f none SUNWtcl/8.0/man/mann/options.n 0444 root bin 21927 46141 871603775 1 f none SUNWtcl/8.0/man/mann/pack-old.n 0444 root bin 12606 30642 871603775 1 f none SUNWtcl/8.0/man/mann/pack.n 0444 root bin 15419 16696 871603775 1 f none SUNWtcl/8.0/man/mann/palette.n 0444 root bin 7853 60884 871603775 1 f none SUNWtcl/8.0/man/mann/photo.n 0444 root bin 21029 61349 871603775 1 f none SUNWtcl/8.0/man/mann/place.n 0444 root bin 15065 57084 871603775 1 f none SUNWtcl/8.0/man/mann/popup.n 0444 root bin 5795 1208 871603775 1 f none SUNWtcl/8.0/man/mann/radiobutton.n 0444 root bin 15185 10487 871603775 1 f none SUNWtcl/8.0/man/mann/raise.n 0444 root bin 6016 20406 871603775 1 f none SUNWtcl/8.0/man/mann/scale.n 0444 root bin 15392 17324 871603776 1 f none SUNWtcl/8.0/man/mann/scrollbar.n 0444 root bin 19512 1616 871603776 1 f none SUNWtcl/8.0/man/mann/selection.n 0444 root bin 11238 38488 871603776 1 f none SUNWtcl/8.0/man/mann/send.n 0444 root bin 8381 39968 871603776 1 f none SUNWtcl/8.0/man/mann/text.n 0444 root bin 77039 60151 871603776 1 f none SUNWtcl/8.0/man/mann/tk.n 0444 root bin 7850 54754 871603776 1 l none SUNWtcl/8.0/man/mann/tk_bindForTraversal.n=menubar.n 1 l none SUNWtcl/8.0/man/mann/tk_bisque.n=palette.n 1 l none SUNWtcl/8.0/man/mann/tk_chooseColor.n=chooseColor.n 1 l none SUNWtcl/8.0/man/mann/tk_dialog.n=dialog.n 1 l none SUNWtcl/8.0/man/mann/tk_focusFollowsMouse.n=focusNext.n 1 l none SUNWtcl/8.0/man/mann/tk_focusNext.n=focusNext.n 1 l none SUNWtcl/8.0/man/mann/tk_focusPrev.n=focusNext.n 1 l none SUNWtcl/8.0/man/mann/tk_getOpenFile.n=getOpenFile.n 1 l none SUNWtcl/8.0/man/mann/tk_getSaveFile.n=getOpenFile.n 1 l none SUNWtcl/8.0/man/mann/tk_menuBar.n=menubar.n 1 l none SUNWtcl/8.0/man/mann/tk_messageBox.n=messageBox.n 1 l none SUNWtcl/8.0/man/mann/tk_optionMenu.n=optionMenu.n 1 l none SUNWtcl/8.0/man/mann/tk_popup.n=popup.n 1 l none SUNWtcl/8.0/man/mann/tk_setPalette.n=palette.n 1 f none SUNWtcl/8.0/man/mann/tkerror.n 0444 root bin 6184 37026 871603776 1 f none SUNWtcl/8.0/man/mann/tkvars.n 0444 root bin 7708 46594 871603776 1 f none SUNWtcl/8.0/man/mann/tkwait.n 0444 root bin 6735 22370 871603776 1 f none SUNWtcl/8.0/man/mann/toplevel.n 0444 root bin 11596 4092 871603776 1 f none SUNWtcl/8.0/man/mann/winfo.n 0444 root bin 18413 44022 871603777 1 f none SUNWtcl/8.0/man/mann/wm.n 0444 root bin 30933 15971 871603777 1 d none SUNWtcl/8.0/sun4 0755 root bin 1 d none SUNWtcl/8.0/sun4/bin 0755 root bin 1 f none SUNWtcl/8.0/sun4/bin/wish8.0 0755 root bin 69532 3985 871603781 1 d none SUNWtcl/8.0/sun4/lib 0755 root bin 1 f none SUNWtcl/8.0/sun4/lib/libtk8.0.so 0555 root bin 984864 24987 871603779 1 f none SUNWtcl/8.0/sun4/lib/tkConfig.sh 0644 root bin 2322 588 871603782 1 i copyright 2209 55092 840127225 1 i depend 155 11905 840127819 1 i pkginfo 244 19810 871603784 07070100000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000b00000000TRAILER!!!0707010006de1b000081a400004ccf0000000a0000000133f39e48000000f400000020000000d700000000000000000000000800000004pkginfoARCH=sun4 PKG=SUNWtk NAME=Tk 8.0 VERSION=8.0 CATEGORY=application DESC=Tk extension for Tcl scripting language libraries, binaries, and manual pages BASEDIR=/opt VENDOR=Sun Microsystems, Inc. MAXINST=1000 CLASSES=none PSTAMP=bisque970814170943 0707010006de10000081a400004ccf0000000a0000000133f39e480000662c00000020000000d700000000000000000000000700000004pkgmap: 1 6004 1 d none SUNWtcl 0755 root bin 1 d none SUNWtcl/8.0 0755 root bin 1 d none SUNWtcl/8.0/bin 0755 root bin 1 f none SUNWtcl/8.0/bin/wish8.0 0755 root bin 450 33848 871603778 1 d none SUNWtcl/8.0/include 0755 root bin 1 f none SUNWtcl/8.0/include/tk.h 0644 root bin 61116 48650 871603742 1 d none SUNWtcl/8.0/lib 0755 root bin 1 d none SUNWtcl/8.0/lib/tk8.0 0755 root bin 1 f none SUNWtcl/8.0/lib/tk8.0/bgerror.tcl 0644 root bin 3465 22149 871603742 1 f none SUNWtcl/8.0/lib/tk8.0/button.tcl 0644 root bin 11040 57675 871603742 1 f none SUNWtcl/8.0/lib/tk8.0/clrpick.tcl 0644 root bin 19765 35118 871603742 1 f none SUNWtcl/8.0/lib/tk8.0/comdlg.tcl 0644 root bin 7490 22870 871603743 1 f none SUNWtcl/8.0/lib/tk8.0/console.tcl 0644 root bin 11965 61508 871603743 1 f none SUNWtcl/8.0/lib/tk8.0/dialog.tcl 0644 root bin 5414 51479 871603743 1 f none SUNWtcl/8.0/lib/tk8.0/entry.tcl 0644 root bin 15066 4339 871603743 1 f none SUNWtcl/8.0/lib/tk8.0/focus.tcl 0644 root bin 4878 5758 871603744 1 d none SUNWtcl/8.0/lib/tk8.0/images 0755 root bin 1 f none SUNWtcl/8.0/lib/tk8.0/images/README 0644 root bin 366 31006 871603749 1 f none SUNWtcl/8.0/lib/tk8.0/images/logo100.gif 0644 root bin 2341 13514 871603749 1 f none SUNWtcl/8.0/lib/tk8.0/images/logo64.gif 0644 root bin 1670 61083 871603749 1 f none SUNWtcl/8.0/lib/tk8.0/images/logoLarge.gif 0644 root bin 11000 38754 871603749 1 f none SUNWtcl/8.0/lib/tk8.0/images/logoMed.gif 0644 root bin 3889 4936 871603750 1 f none SUNWtcl/8.0/lib/tk8.0/images/pwrdLogo100.gif 0644 root bin 4147 39445 871603750 1 f none SUNWtcl/8.0/lib/tk8.0/images/pwrdLogo150.gif 0644 root bin 6809 42674 871603750 1 f none SUNWtcl/8.0/lib/tk8.0/images/pwrdLogo175.gif 0644 root bin 7964 37225 871603750 1 f none SUNWtcl/8.0/lib/tk8.0/images/pwrdLogo200.gif 0644 root bin 8964 33342 871603751 1 f none SUNWtcl/8.0/lib/tk8.0/images/pwrdLogo75.gif 0644 root bin 3189 62282 871603751 1 f none SUNWtcl/8.0/lib/tk8.0/listbox.tcl 0644 root bin 11696 48139 871603744 1 f none SUNWtcl/8.0/lib/tk8.0/menu.tcl 0644 root bin 32625 20680 871603744 1 f none SUNWtcl/8.0/lib/tk8.0/msgbox.tcl 0644 root bin 6946 29432 871603745 1 f none SUNWtcl/8.0/lib/tk8.0/obsolete.tcl 0644 root bin 781 1781 871603745 1 f none SUNWtcl/8.0/lib/tk8.0/optMenu.tcl 0644 root bin 1612 5741 871603745 1 f none SUNWtcl/8.0/lib/tk8.0/palette.tcl 0644 root bin 7285 14699 871603745 1 f none SUNWtcl/8.0/lib/tk8.0/prolog.ps 0644 root bin 9546 26981 871603748 1 f none SUNWtcl/8.0/lib/tk8.0/safetk.tcl 0644 root bin 4572 49213 871603745 1 f none SUNWtcl/8.0/lib/tk8.0/scale.tcl 0644 root bin 6772 27672 871603746 1 f none SUNWtcl/8.0/lib/tk8.0/scrlbar.tcl 0644 root bin 11554 39494 871603746 1 f none SUNWtcl/8.0/lib/tk8.0/tclIndex 0644 root bin 17931 44094 871603748 1 f none SUNWtcl/8.0/lib/tk8.0/tearoff.tcl 0644 root bin 4029 64250 871603746 1 f none SUNWtcl/8.0/lib/tk8.0/text.tcl 0644 root bin 26108 354 871603746 1 f none SUNWtcl/8.0/lib/tk8.0/tk.tcl 0644 root bin 5332 37696 871603747 1 f none SUNWtcl/8.0/lib/tk8.0/tkAppInit.c 0644 root bin 3209 48999 871603748 1 f none SUNWtcl/8.0/lib/tk8.0/tkfbox.tcl 0644 root bin 36536 26634 871603747 1 f none SUNWtcl/8.0/lib/tk8.0/xmfbox.tcl 0644 root bin 15957 38612 871603747 1 d none SUNWtcl/8.0/man 0755 root bin 1 d none SUNWtcl/8.0/man/man1 0755 root bin 1 f none SUNWtcl/8.0/man/man1/wish.1 0444 root bin 12431 7951 871603752 1 d none SUNWtcl/8.0/man/man3 0755 root bin 1 f none SUNWtcl/8.0/man/man3/3DBorder.3 0444 root bin 16846 16514 871603752 1 f none SUNWtcl/8.0/man/man3/BindTable.3 0444 root bin 11399 55820 871603752 1 f none SUNWtcl/8.0/man/man3/CanvPsY.3 0444 root bin 9487 11871 871603752 1 f none SUNWtcl/8.0/man/man3/CanvTkwin.3 0444 root bin 11244 39289 871603752 1 f none SUNWtcl/8.0/man/man3/CanvTxtInfo.3 0444 root bin 9013 35125 871603752 1 f none SUNWtcl/8.0/man/man3/Clipboard.3 0444 root bin 7755 49495 871603752 1 f none SUNWtcl/8.0/man/man3/ClrSelect.3 0444 root bin 5959 15325 871603753 1 f none SUNWtcl/8.0/man/man3/ConfigWidg.3 0444 root bin 33258 55982 871603753 1 f none SUNWtcl/8.0/man/man3/ConfigWind.3 0444 root bin 10958 15258 871603753 1 f none SUNWtcl/8.0/man/man3/CoordToWin.3 0444 root bin 6439 59592 871603753 1 f none SUNWtcl/8.0/man/man3/CrtErrHdlr.3 0444 root bin 10999 19057 871603753 1 f none SUNWtcl/8.0/man/man3/CrtGenHdlr.3 0444 root bin 8083 13432 871603753 1 f none SUNWtcl/8.0/man/man3/CrtImgType.3 0444 root bin 14535 7506 871603753 1 f none SUNWtcl/8.0/man/man3/CrtItemType.3 0444 root bin 28633 40498 871603753 1 f none SUNWtcl/8.0/man/man3/CrtPhImgFmt.3 0444 root bin 14800 31518 871603753 1 f none SUNWtcl/8.0/man/man3/CrtSelHdlr.3 0444 root bin 9956 52908 871603753 1 f none SUNWtcl/8.0/man/man3/CrtWindow.3 0444 root bin 10851 2498 871603753 1 f none SUNWtcl/8.0/man/man3/DeleteImg.3 0444 root bin 5616 48848 871603754 1 f none SUNWtcl/8.0/man/man3/DrawFocHlt.3 0444 root bin 5870 7597 871603754 1 f none SUNWtcl/8.0/man/man3/EventHndlr.3 0444 root bin 7754 48019 871603754 1 f none SUNWtcl/8.0/man/man3/FindPhoto.3 0444 root bin 12644 30160 871603754 1 f none SUNWtcl/8.0/man/man3/FontId.3 0444 root bin 7324 9079 871603754 1 f none SUNWtcl/8.0/man/man3/FreeXId.3 0444 root bin 6636 11644 871603754 1 f none SUNWtcl/8.0/man/man3/GeomReq.3 0444 root bin 7519 29113 871603754 1 f none SUNWtcl/8.0/man/man3/GetAnchor.3 0444 root bin 6976 37678 871603754 1 f none SUNWtcl/8.0/man/man3/GetBitmap.3 0444 root bin 13134 63608 871603755 1 f none SUNWtcl/8.0/man/man3/GetCapStyl.3 0444 root bin 6745 19705 871603755 1 f none SUNWtcl/8.0/man/man3/GetClrmap.3 0444 root bin 7473 23320 871603755 1 f none SUNWtcl/8.0/man/man3/GetColor.3 0444 root bin 10583 38518 871603755 1 f none SUNWtcl/8.0/man/man3/GetCursor.3 0444 root bin 13007 1465 871603755 1 f none SUNWtcl/8.0/man/man3/GetFont.3 0444 root bin 7598 32206 871603755 1 f none SUNWtcl/8.0/man/man3/GetGC.3 0444 root bin 7540 26233 871603755 1 f none SUNWtcl/8.0/man/man3/GetImage.3 0444 root bin 9761 28113 871603755 1 f none SUNWtcl/8.0/man/man3/GetJoinStl.3 0444 root bin 6759 21960 871603755 1 f none SUNWtcl/8.0/man/man3/GetJustify.3 0444 root bin 7032 46205 871603755 1 f none SUNWtcl/8.0/man/man3/GetOption.3 0444 root bin 6162 33217 871603755 1 f none SUNWtcl/8.0/man/man3/GetPixels.3 0444 root bin 7183 61903 871603756 1 f none SUNWtcl/8.0/man/man3/GetPixmap.3 0444 root bin 6453 59892 871603756 1 f none SUNWtcl/8.0/man/man3/GetRelief.3 0444 root bin 6694 9929 871603756 1 f none SUNWtcl/8.0/man/man3/GetRootCrd.3 0444 root bin 6109 30364 871603756 1 f none SUNWtcl/8.0/man/man3/GetScroll.3 0444 root bin 7039 46912 871603756 1 f none SUNWtcl/8.0/man/man3/GetSelect.3 0444 root bin 7811 53299 871603756 1 f none SUNWtcl/8.0/man/man3/GetUid.3 0444 root bin 6381 51546 871603756 1 f none SUNWtcl/8.0/man/man3/GetVRoot.3 0444 root bin 6554 4199 871603756 1 f none SUNWtcl/8.0/man/man3/GetVisual.3 0444 root bin 8281 29435 871603756 1 f none SUNWtcl/8.0/man/man3/HandleEvent.3 0444 root bin 6372 53186 871603756 1 f none SUNWtcl/8.0/man/man3/IdToWindow.3 0444 root bin 5602 48477 871603757 1 f none SUNWtcl/8.0/man/man3/ImgChanged.3 0444 root bin 7174 58397 871603757 1 f none SUNWtcl/8.0/man/man3/InternAtom.3 0444 root bin 6678 15192 871603757 1 f none SUNWtcl/8.0/man/man3/MainLoop.3 0444 root bin 5698 57804 871603757 1 f none SUNWtcl/8.0/man/man3/MainWin.3 0444 root bin 5712 58703 871603757 1 f none SUNWtcl/8.0/man/man3/MaintGeom.3 0444 root bin 8793 14562 871603757 1 f none SUNWtcl/8.0/man/man3/ManageGeom.3 0444 root bin 8185 24800 871603757 1 f none SUNWtcl/8.0/man/man3/MapWindow.3 0444 root bin 6385 54175 871603757 1 f none SUNWtcl/8.0/man/man3/MeasureChar.3 0444 root bin 10533 38686 871603757 1 f none SUNWtcl/8.0/man/man3/MoveToplev.3 0444 root bin 6907 38169 871603757 1 f none SUNWtcl/8.0/man/man3/Name.3 0444 root bin 7918 61007 871603757 1 f none SUNWtcl/8.0/man/man3/NameOfImg.3 0444 root bin 5577 45445 871603758 1 f none SUNWtcl/8.0/man/man3/OwnSelect.3 0444 root bin 6560 5230 871603758 1 f none SUNWtcl/8.0/man/man3/ParseArgv.3 0444 root bin 19077 64526 871603758 1 f none SUNWtcl/8.0/man/man3/QWinEvent.3 0444 root bin 6054 24060 871603758 1 f none SUNWtcl/8.0/man/man3/Restack.3 0444 root bin 6349 50347 871603758 1 f none SUNWtcl/8.0/man/man3/RestrictEv.3 0444 root bin 8283 33273 871603758 1 f none SUNWtcl/8.0/man/man3/SetAppName.3 0444 root bin 7087 52902 871603758 1 f none SUNWtcl/8.0/man/man3/SetClass.3 0444 root bin 6780 22850 871603758 1 f none SUNWtcl/8.0/man/man3/SetGrid.3 0444 root bin 7101 55389 871603758 1 f none SUNWtcl/8.0/man/man3/SetVisual.3 0444 root bin 6552 4391 871603758 1 f none SUNWtcl/8.0/man/man3/StrictMotif.3 0444 root bin 5915 12172 871603758 1 f none SUNWtcl/8.0/man/man3/TextLayout.3 0444 root bin 18618 62380 871603759 1 l none SUNWtcl/8.0/man/man3/Tk_3DBorderColor.3=3DBorder.3 1 l none SUNWtcl/8.0/man/man3/Tk_3DBorderGC.3=3DBorder.3 1 l none SUNWtcl/8.0/man/man3/Tk_3DHorizontalBevel.3=3DBorder.3 1 l none SUNWtcl/8.0/man/man3/Tk_3DVerticalBevel.3=3DBorder.3 1 l none SUNWtcl/8.0/man/man3/Tk_Attributes.3=WindowId.3 1 l none SUNWtcl/8.0/man/man3/Tk_BindEvent.3=BindTable.3 1 l none SUNWtcl/8.0/man/man3/Tk_CanvasDrawableCoords.3=CanvTkwin.3 1 l none SUNWtcl/8.0/man/man3/Tk_CanvasEventuallyRedraw.3=CanvTkwin.3 1 l none SUNWtcl/8.0/man/man3/Tk_CanvasGetCoord.3=CanvTkwin.3 1 l none SUNWtcl/8.0/man/man3/Tk_CanvasPsBitmap.3=CanvPsY.3 1 l none SUNWtcl/8.0/man/man3/Tk_CanvasPsColor.3=CanvPsY.3 1 l none SUNWtcl/8.0/man/man3/Tk_CanvasPsFont.3=CanvPsY.3 1 l none SUNWtcl/8.0/man/man3/Tk_CanvasPsPath.3=CanvPsY.3 1 l none SUNWtcl/8.0/man/man3/Tk_CanvasPsStipple.3=CanvPsY.3 1 l none SUNWtcl/8.0/man/man3/Tk_CanvasPsY.3=CanvPsY.3 1 l none SUNWtcl/8.0/man/man3/Tk_CanvasSetStippleOrigin.3=CanvTkwin.3 1 l none SUNWtcl/8.0/man/man3/Tk_CanvasTagsOption.3=CanvTkwin.3 1 l none SUNWtcl/8.0/man/man3/Tk_CanvasTextInfo.3=CanvTxtInfo.3 1 l none SUNWtcl/8.0/man/man3/Tk_CanvasTkwin.3=CanvTkwin.3 1 l none SUNWtcl/8.0/man/man3/Tk_CanvasWindowCoords.3=CanvTkwin.3 1 l none SUNWtcl/8.0/man/man3/Tk_ChangeWindowAttributes.3=ConfigWind.3 1 l none SUNWtcl/8.0/man/man3/Tk_Changes.3=WindowId.3 1 l none SUNWtcl/8.0/man/man3/Tk_CharBbox.3=TextLayout.3 1 l none SUNWtcl/8.0/man/man3/Tk_Class.3=SetClass.3 1 l none SUNWtcl/8.0/man/man3/Tk_ClearSelection.3=ClrSelect.3 1 l none SUNWtcl/8.0/man/man3/Tk_ClipboardAppend.3=Clipboard.3 1 l none SUNWtcl/8.0/man/man3/Tk_ClipboardClear.3=Clipboard.3 1 l none SUNWtcl/8.0/man/man3/Tk_Colormap.3=WindowId.3 1 l none SUNWtcl/8.0/man/man3/Tk_ComputeTextLayout.3=TextLayout.3 1 l none SUNWtcl/8.0/man/man3/Tk_ConfigureInfo.3=ConfigWidg.3 1 l none SUNWtcl/8.0/man/man3/Tk_ConfigureValue.3=ConfigWidg.3 1 l none SUNWtcl/8.0/man/man3/Tk_ConfigureWidget.3=ConfigWidg.3 1 l none SUNWtcl/8.0/man/man3/Tk_ConfigureWindow.3=ConfigWind.3 1 l none SUNWtcl/8.0/man/man3/Tk_CoordsToWindow.3=CoordToWin.3 1 l none SUNWtcl/8.0/man/man3/Tk_CreateBinding.3=BindTable.3 1 l none SUNWtcl/8.0/man/man3/Tk_CreateBindingTable.3=BindTable.3 1 l none SUNWtcl/8.0/man/man3/Tk_CreateErrorHandler.3=CrtErrHdlr.3 1 l none SUNWtcl/8.0/man/man3/Tk_CreateEventHandler.3=EventHndlr.3 1 l none SUNWtcl/8.0/man/man3/Tk_CreateGenericHandler.3=CrtGenHdlr.3 1 l none SUNWtcl/8.0/man/man3/Tk_CreateImageType.3=CrtImgType.3 1 l none SUNWtcl/8.0/man/man3/Tk_CreateItemType.3=CrtItemType.3 1 l none SUNWtcl/8.0/man/man3/Tk_CreatePhotoImageFormat.3=CrtPhImgFmt.3 1 l none SUNWtcl/8.0/man/man3/Tk_CreateSelHandler.3=CrtSelHdlr.3 1 l none SUNWtcl/8.0/man/man3/Tk_CreateWindow.3=CrtWindow.3 1 l none SUNWtcl/8.0/man/man3/Tk_CreateWindowFromPath.3=CrtWindow.3 1 l none SUNWtcl/8.0/man/man3/Tk_DefineBitmap.3=GetBitmap.3 1 l none SUNWtcl/8.0/man/man3/Tk_DefineCursor.3=ConfigWind.3 1 l none SUNWtcl/8.0/man/man3/Tk_DeleteAllBindings.3=BindTable.3 1 l none SUNWtcl/8.0/man/man3/Tk_DeleteBinding.3=BindTable.3 1 l none SUNWtcl/8.0/man/man3/Tk_DeleteBindingTable.3=BindTable.3 1 l none SUNWtcl/8.0/man/man3/Tk_DeleteErrorHandler.3=CrtErrHdlr.3 1 l none SUNWtcl/8.0/man/man3/Tk_DeleteEventHandler.3=EventHndlr.3 1 l none SUNWtcl/8.0/man/man3/Tk_DeleteGenericHandler.3=CrtGenHdlr.3 1 l none SUNWtcl/8.0/man/man3/Tk_DeleteImage.3=DeleteImg.3 1 l none SUNWtcl/8.0/man/man3/Tk_DeleteSelHandler.3=CrtSelHdlr.3 1 l none SUNWtcl/8.0/man/man3/Tk_Depth.3=WindowId.3 1 l none SUNWtcl/8.0/man/man3/Tk_DestroyWindow.3=CrtWindow.3 1 l none SUNWtcl/8.0/man/man3/Tk_Display.3=WindowId.3 1 l none SUNWtcl/8.0/man/man3/Tk_DisplayName.3=WindowId.3 1 l none SUNWtcl/8.0/man/man3/Tk_DistanceToTextLayout.3=TextLayout.3 1 l none SUNWtcl/8.0/man/man3/Tk_Draw3DPolygon.3=3DBorder.3 1 l none SUNWtcl/8.0/man/man3/Tk_Draw3DRectangle.3=3DBorder.3 1 l none SUNWtcl/8.0/man/man3/Tk_DrawChars.3=MeasureChar.3 1 l none SUNWtcl/8.0/man/man3/Tk_DrawFocusHighlight.3=DrawFocHlt.3 1 l none SUNWtcl/8.0/man/man3/Tk_DrawTextLayout.3=TextLayout.3 1 l none SUNWtcl/8.0/man/man3/Tk_Fill3DPolygon.3=3DBorder.3 1 l none SUNWtcl/8.0/man/man3/Tk_Fill3DRectangle.3=3DBorder.3 1 l none SUNWtcl/8.0/man/man3/Tk_FindPhoto.3=FindPhoto.3 1 l none SUNWtcl/8.0/man/man3/Tk_FontId.3=FontId.3 1 l none SUNWtcl/8.0/man/man3/Tk_FontMetrics.3=FontId.3 1 l none SUNWtcl/8.0/man/man3/Tk_Free3DBorder.3=3DBorder.3 1 l none SUNWtcl/8.0/man/man3/Tk_FreeBitmap.3=GetBitmap.3 1 l none SUNWtcl/8.0/man/man3/Tk_FreeColor.3=GetColor.3 1 l none SUNWtcl/8.0/man/man3/Tk_FreeColormap.3=GetClrmap.3 1 l none SUNWtcl/8.0/man/man3/Tk_FreeCursor.3=GetCursor.3 1 l none SUNWtcl/8.0/man/man3/Tk_FreeFont.3=GetFont.3 1 l none SUNWtcl/8.0/man/man3/Tk_FreeGC.3=GetGC.3 1 l none SUNWtcl/8.0/man/man3/Tk_FreeImage.3=GetImage.3 1 l none SUNWtcl/8.0/man/man3/Tk_FreeOptions.3=ConfigWidg.3 1 l none SUNWtcl/8.0/man/man3/Tk_FreePixmap.3=GetPixmap.3 1 l none SUNWtcl/8.0/man/man3/Tk_FreeTextLayout.3=TextLayout.3 1 l none SUNWtcl/8.0/man/man3/Tk_FreeXId.3=FreeXId.3 1 l none SUNWtcl/8.0/man/man3/Tk_GeometryRequest.3=GeomReq.3 1 l none SUNWtcl/8.0/man/man3/Tk_Get3DBorder.3=3DBorder.3 1 l none SUNWtcl/8.0/man/man3/Tk_GetAllBindings.3=BindTable.3 1 l none SUNWtcl/8.0/man/man3/Tk_GetAnchor.3=GetAnchor.3 1 l none SUNWtcl/8.0/man/man3/Tk_GetAtomName.3=InternAtom.3 1 l none SUNWtcl/8.0/man/man3/Tk_GetBinding.3=BindTable.3 1 l none SUNWtcl/8.0/man/man3/Tk_GetBitmap.3=GetBitmap.3 1 l none SUNWtcl/8.0/man/man3/Tk_GetBitmapFromData.3=GetBitmap.3 1 l none SUNWtcl/8.0/man/man3/Tk_GetCapStyle.3=GetCapStyl.3 1 l none SUNWtcl/8.0/man/man3/Tk_GetColor.3=GetColor.3 1 l none SUNWtcl/8.0/man/man3/Tk_GetColorByValue.3=GetColor.3 1 l none SUNWtcl/8.0/man/man3/Tk_GetColormap.3=GetClrmap.3 1 l none SUNWtcl/8.0/man/man3/Tk_GetCursor.3=GetCursor.3 1 l none SUNWtcl/8.0/man/man3/Tk_GetCursorFromData.3=GetCursor.3 1 l none SUNWtcl/8.0/man/man3/Tk_GetFont.3=GetFont.3 1 l none SUNWtcl/8.0/man/man3/Tk_GetGC.3=GetGC.3 1 l none SUNWtcl/8.0/man/man3/Tk_GetImage.3=GetImage.3 1 l none SUNWtcl/8.0/man/man3/Tk_GetImageMasterData.3=CrtImgType.3 1 l none SUNWtcl/8.0/man/man3/Tk_GetItemTypes.3=CrtItemType.3 1 l none SUNWtcl/8.0/man/man3/Tk_GetJoinStyle.3=GetJoinStl.3 1 l none SUNWtcl/8.0/man/man3/Tk_GetJustify.3=GetJustify.3 1 l none SUNWtcl/8.0/man/man3/Tk_GetOption.3=GetOption.3 1 l none SUNWtcl/8.0/man/man3/Tk_GetPixels.3=GetPixels.3 1 l none SUNWtcl/8.0/man/man3/Tk_GetPixmap.3=GetPixmap.3 1 l none SUNWtcl/8.0/man/man3/Tk_GetRelief.3=GetRelief.3 1 l none SUNWtcl/8.0/man/man3/Tk_GetRootCoords.3=GetRootCrd.3 1 l none SUNWtcl/8.0/man/man3/Tk_GetScreenMM.3=GetPixels.3 1 l none SUNWtcl/8.0/man/man3/Tk_GetScrollInfo.3=GetScroll.3 1 l none SUNWtcl/8.0/man/man3/Tk_GetSelection.3=GetSelect.3 1 l none SUNWtcl/8.0/man/man3/Tk_GetUid.3=GetUid.3 1 l none SUNWtcl/8.0/man/man3/Tk_GetVRootGeometry.3=GetVRoot.3 1 l none SUNWtcl/8.0/man/man3/Tk_GetVisual.3=GetVisual.3 1 l none SUNWtcl/8.0/man/man3/Tk_HandleEvent.3=HandleEvent.3 1 l none SUNWtcl/8.0/man/man3/Tk_Height.3=WindowId.3 1 l none SUNWtcl/8.0/man/man3/Tk_IdToWindow.3=IdToWindow.3 1 l none SUNWtcl/8.0/man/man3/Tk_ImageChanged.3=ImgChanged.3 1 f none SUNWtcl/8.0/man/man3/Tk_Init.3 0444 root bin 6222 39067 871603759 1 l none SUNWtcl/8.0/man/man3/Tk_InternAtom.3=InternAtom.3 1 l none SUNWtcl/8.0/man/man3/Tk_InternalBorderWidth.3=WindowId.3 1 l none SUNWtcl/8.0/man/man3/Tk_IntersectTextLayout.3=TextLayout.3 1 l none SUNWtcl/8.0/man/man3/Tk_IsMapped.3=WindowId.3 1 l none SUNWtcl/8.0/man/man3/Tk_IsTopLevel.3=WindowId.3 1 f none SUNWtcl/8.0/man/man3/Tk_Main.3 0444 root bin 6917 37261 871603759 1 l none SUNWtcl/8.0/man/man3/Tk_MainLoop.3=MainLoop.3 1 l none SUNWtcl/8.0/man/man3/Tk_MainWindow.3=MainWin.3 1 l none SUNWtcl/8.0/man/man3/Tk_MaintainGeometry.3=MaintGeom.3 1 l none SUNWtcl/8.0/man/man3/Tk_MakeWindowExist.3=CrtWindow.3 1 l none SUNWtcl/8.0/man/man3/Tk_ManageGeometry.3=ManageGeom.3 1 l none SUNWtcl/8.0/man/man3/Tk_MapWindow.3=MapWindow.3 1 l none SUNWtcl/8.0/man/man3/Tk_MeasureChars.3=MeasureChar.3 1 l none SUNWtcl/8.0/man/man3/Tk_MoveResizeWindow.3=ConfigWind.3 1 l none SUNWtcl/8.0/man/man3/Tk_MoveToplevelWindow.3=MoveToplev.3 1 l none SUNWtcl/8.0/man/man3/Tk_MoveWindow.3=ConfigWind.3 1 l none SUNWtcl/8.0/man/man3/Tk_Name.3=Name.3 1 l none SUNWtcl/8.0/man/man3/Tk_NameOf3DBorder.3=3DBorder.3 1 l none SUNWtcl/8.0/man/man3/Tk_NameOfAnchor.3=GetAnchor.3 1 l none SUNWtcl/8.0/man/man3/Tk_NameOfBitmap.3=GetBitmap.3 1 l none SUNWtcl/8.0/man/man3/Tk_NameOfCapStyle.3=GetCapStyl.3 1 l none SUNWtcl/8.0/man/man3/Tk_NameOfColor.3=GetColor.3 1 l none SUNWtcl/8.0/man/man3/Tk_NameOfCursor.3=GetCursor.3 1 l none SUNWtcl/8.0/man/man3/Tk_NameOfFont.3=GetFont.3 1 l none SUNWtcl/8.0/man/man3/Tk_NameOfImage.3=NameOfImg.3 1 l none SUNWtcl/8.0/man/man3/Tk_NameOfJoinStyle.3=GetJoinStl.3 1 l none SUNWtcl/8.0/man/man3/Tk_NameOfJustify.3=GetJustify.3 1 l none SUNWtcl/8.0/man/man3/Tk_NameOfRelief.3=GetRelief.3 1 l none SUNWtcl/8.0/man/man3/Tk_NameToWindow.3=Name.3 1 l none SUNWtcl/8.0/man/man3/Tk_Offset.3=ConfigWidg.3 1 l none SUNWtcl/8.0/man/man3/Tk_OwnSelection.3=OwnSelect.3 1 l none SUNWtcl/8.0/man/man3/Tk_Parent.3=WindowId.3 1 l none SUNWtcl/8.0/man/man3/Tk_ParseArgv.3=ParseArgv.3 1 l none SUNWtcl/8.0/man/man3/Tk_PathName.3=Name.3 1 l none SUNWtcl/8.0/man/man3/Tk_PhotoBlank.3=FindPhoto.3 1 l none SUNWtcl/8.0/man/man3/Tk_PhotoExpand.3=FindPhoto.3 1 l none SUNWtcl/8.0/man/man3/Tk_PhotoGetImage.3=FindPhoto.3 1 l none SUNWtcl/8.0/man/man3/Tk_PhotoGetSize.3=FindPhoto.3 1 l none SUNWtcl/8.0/man/man3/Tk_PhotoPutBlock.3=FindPhoto.3 1 l none SUNWtcl/8.0/man/man3/Tk_PhotoPutZoomedBlock.3=FindPhoto.3 1 l none SUNWtcl/8.0/man/man3/Tk_PhotoSetSize.3=FindPhoto.3 1 l none SUNWtcl/8.0/man/man3/Tk_PointToChar.3=TextLayout.3 1 l none SUNWtcl/8.0/man/man3/Tk_PostscriptFontName.3=FontId.3 1 l none SUNWtcl/8.0/man/man3/Tk_QueueWindowEvent.3=QWinEvent.3 1 l none SUNWtcl/8.0/man/man3/Tk_RedrawImage.3=GetImage.3 1 l none SUNWtcl/8.0/man/man3/Tk_ReqHeight.3=WindowId.3 1 l none SUNWtcl/8.0/man/man3/Tk_ReqWidth.3=WindowId.3 1 l none SUNWtcl/8.0/man/man3/Tk_ResizeWindow.3=ConfigWind.3 1 l none SUNWtcl/8.0/man/man3/Tk_RestackWindow.3=Restack.3 1 l none SUNWtcl/8.0/man/man3/Tk_RestrictEvents.3=RestrictEv.3 1 l none SUNWtcl/8.0/man/man3/Tk_Screen.3=WindowId.3 1 l none SUNWtcl/8.0/man/man3/Tk_ScreenNumber.3=WindowId.3 1 l none SUNWtcl/8.0/man/man3/Tk_SetAppName.3=SetAppName.3 1 l none SUNWtcl/8.0/man/man3/Tk_SetBackgroundFromBorder.3=3DBorder.3 1 l none SUNWtcl/8.0/man/man3/Tk_SetClass.3=SetClass.3 1 l none SUNWtcl/8.0/man/man3/Tk_SetGrid.3=SetGrid.3 1 l none SUNWtcl/8.0/man/man3/Tk_SetInternalBorder.3=GeomReq.3 1 l none SUNWtcl/8.0/man/man3/Tk_SetWindowBackground.3=ConfigWind.3 1 l none SUNWtcl/8.0/man/man3/Tk_SetWindowBackgroundPixmap.3=ConfigWind.3 1 l none SUNWtcl/8.0/man/man3/Tk_SetWindowBorder.3=ConfigWind.3 1 l none SUNWtcl/8.0/man/man3/Tk_SetWindowBorderPixmap.3=ConfigWind.3 1 l none SUNWtcl/8.0/man/man3/Tk_SetWindowBorderWidth.3=ConfigWind.3 1 l none SUNWtcl/8.0/man/man3/Tk_SetWindowColormap.3=ConfigWind.3 1 l none SUNWtcl/8.0/man/man3/Tk_SetWindowVisual.3=SetVisual.3 1 l none SUNWtcl/8.0/man/man3/Tk_SizeOfBitmap.3=GetBitmap.3 1 l none SUNWtcl/8.0/man/man3/Tk_SizeOfImage.3=GetImage.3 1 l none SUNWtcl/8.0/man/man3/Tk_StrictMotif.3=StrictMotif.3 1 l none SUNWtcl/8.0/man/man3/Tk_TextLayoutToPostscript.3=TextLayout.3 1 l none SUNWtcl/8.0/man/man3/Tk_TextWidth.3=MeasureChar.3 1 l none SUNWtcl/8.0/man/man3/Tk_Uid.3=GetUid.3 1 l none SUNWtcl/8.0/man/man3/Tk_UndefineCursor.3=ConfigWind.3 1 l none SUNWtcl/8.0/man/man3/Tk_UnderlineChars.3=MeasureChar.3 1 l none SUNWtcl/8.0/man/man3/Tk_UnderlineTextLayout.3=TextLayout.3 1 l none SUNWtcl/8.0/man/man3/Tk_UnmaintainGeometry.3=MaintGeom.3 1 l none SUNWtcl/8.0/man/man3/Tk_UnmapWindow.3=MapWindow.3 1 l none SUNWtcl/8.0/man/man3/Tk_UnsetGrid.3=SetGrid.3 1 l none SUNWtcl/8.0/man/man3/Tk_Visual.3=WindowId.3 1 l none SUNWtcl/8.0/man/man3/Tk_Width.3=WindowId.3 1 l none SUNWtcl/8.0/man/man3/Tk_WindowId.3=WindowId.3 1 l none SUNWtcl/8.0/man/man3/Tk_X.3=WindowId.3 1 l none SUNWtcl/8.0/man/man3/Tk_Y.3=WindowId.3 1 f none SUNWtcl/8.0/man/man3/WindowId.3 0444 root bin 9610 19935 871603759 1 d none SUNWtcl/8.0/man/mann 0755 root bin 1 f none SUNWtcl/8.0/man/mann/bell.n 0444 root bin 5799 825 871603771 1 f none SUNWtcl/8.0/man/mann/bind.n 0444 root bin 24376 30989 871603771 1 f none SUNWtcl/8.0/man/mann/bindtags.n 0444 root bin 8012 4622 871603771 1 f none SUNWtcl/8.0/man/mann/bitmap.n 0444 root bin 8935 20821 871603771 1 f none SUNWtcl/8.0/man/mann/button.n 0444 root bin 12245 63790 871603772 1 f none SUNWtcl/8.0/man/mann/canvas.n 0444 root bin 74275 60783 871603772 1 f none SUNWtcl/8.0/man/mann/checkbutton.n 0444 root bin 15394 26908 871603772 1 f none SUNWtcl/8.0/man/mann/chooseColor.n 0444 root bin 6289 45485 871603772 1 f none SUNWtcl/8.0/man/mann/clipboard.n 0444 root bin 8250 26417 871603772 1 f none SUNWtcl/8.0/man/mann/destroy.n 0444 root bin 5732 60643 871603772 1 f none SUNWtcl/8.0/man/mann/dialog.n 0444 root bin 6954 39328 871603772 1 f none SUNWtcl/8.0/man/mann/entry.n 0444 root bin 22376 2710 871603772 1 f none SUNWtcl/8.0/man/mann/event.n 0444 root bin 18710 58867 871603772 1 f none SUNWtcl/8.0/man/mann/focus.n 0444 root bin 9634 24398 871603772 1 f none SUNWtcl/8.0/man/mann/focusNext.n 0444 root bin 7193 887 871603773 1 f none SUNWtcl/8.0/man/mann/font.n 0444 root bin 17409 158 871603773 1 f none SUNWtcl/8.0/man/mann/frame.n 0444 root bin 10127 170 871603773 1 f none SUNWtcl/8.0/man/mann/getOpenFile.n 0444 root bin 11545 57059 871603773 1 f none SUNWtcl/8.0/man/mann/grab.n 0444 root bin 9846 45071 871603773 1 f none SUNWtcl/8.0/man/mann/grid.n 0444 root bin 20319 5764 871603773 1 f none SUNWtcl/8.0/man/mann/image.n 0444 root bin 7982 1307 871603773 1 f none SUNWtcl/8.0/man/mann/label.n 0444 root bin 8867 15017 871603773 1 f none SUNWtcl/8.0/man/mann/listbox.n 0444 root bin 24301 47330 871603773 1 f none SUNWtcl/8.0/man/mann/loadTk.n 0444 root bin 8060 10667 871603774 1 f none SUNWtcl/8.0/man/mann/lower.n 0444 root bin 6016 20633 871603774 1 f none SUNWtcl/8.0/man/mann/menu.n 0444 root bin 37419 57300 871603774 1 f none SUNWtcl/8.0/man/mann/menubar.n 0444 root bin 5832 3932 871603774 1 f none SUNWtcl/8.0/man/mann/menubutton.n 0444 root bin 13413 45831 871603774 1 f none SUNWtcl/8.0/man/mann/message.n 0444 root bin 11056 17885 871603774 1 f none SUNWtcl/8.0/man/mann/messageBox.n 0444 root bin 7670 38588 871603774 1 f none SUNWtcl/8.0/man/mann/option.n 0444 root bin 8348 38509 871603774 1 f none SUNWtcl/8.0/man/mann/optionMenu.n 0444 root bin 6194 37607 871603775 1 f none SUNWtcl/8.0/man/mann/options.n 0444 root bin 21927 46141 871603775 1 f none SUNWtcl/8.0/man/mann/pack-old.n 0444 root bin 12606 30642 871603775 1 f none SUNWtcl/8.0/man/mann/pack.n 0444 root bin 15419 16696 871603775 1 f none SUNWtcl/8.0/man/mann/palette.n 0444 root bin 7853 60884 871603775 1 f none SUNWtcl/8.0/man/mann/photo.n 0444 root bin 21029 61349 871603775 1 f none SUNWtcl/8.0/man/mann/place.n 0444 root bin 15065 57084 871603775 1 f none SUNWtcl/8.0/man/mann/popup.n 0444 root bin 5795 1208 871603775 1 f none SUNWtcl/8.0/man/mann/radiobutton.n 0444 root bin 15185 10487 871603775 1 f none SUNWtcl/8.0/man/mann/raise.n 0444 root bin 6016 20406 871603775 1 f none SUNWtcl/8.0/man/mann/scale.n 0444 root bin 15392 17324 871603776 1 f none SUNWtcl/8.0/man/mann/scrollbar.n 0444 root bin 19512 1616 871603776 1 f none SUNWtcl/8.0/man/mann/selection.n 0444 root bin 11238 38488 871603776 1 f none SUNWtcl/8.0/man/mann/send.n 0444 root bin 8381 39968 871603776 1 f none SUNWtcl/8.0/man/mann/text.n 0444 root bin 77039 60151 871603776 1 f none SUNWtcl/8.0/man/mann/tk.n 0444 root bin 7850 54754 871603776 1 l none SUNWtcl/8.0/man/mann/tk_bindForTraversal.n=menubar.n 1 l none SUNWtcl/8.0/man/mann/tk_bisque.n=palette.n 1 l none SUNWtcl/8.0/man/mann/tk_chooseColor.n=chooseColor.n 1 l none SUNWtcl/8.0/man/mann/tk_dialog.n=dialog.n 1 l none SUNWtcl/8.0/man/mann/tk_focusFollowsMouse.n=focusNext.n 1 l none SUNWtcl/8.0/man/mann/tk_focusNext.n=focusNext.n 1 l none SUNWtcl/8.0/man/mann/tk_focusPrev.n=focusNext.n 1 l none SUNWtcl/8.0/man/mann/tk_getOpenFile.n=getOpenFile.n 1 l none SUNWtcl/8.0/man/mann/tk_getSaveFile.n=getOpenFile.n 1 l none SUNWtcl/8.0/man/mann/tk_menuBar.n=menubar.n 1 l none SUNWtcl/8.0/man/mann/tk_messageBox.n=messageBox.n 1 l none SUNWtcl/8.0/man/mann/tk_optionMenu.n=optionMenu.n 1 l none SUNWtcl/8.0/man/mann/tk_popup.n=popup.n 1 l none SUNWtcl/8.0/man/mann/tk_setPalette.n=palette.n 1 f none SUNWtcl/8.0/man/mann/tkerror.n 0444 root bin 6184 37026 871603776 1 f none SUNWtcl/8.0/man/mann/tkvars.n 0444 root bin 7708 46594 871603776 1 f none SUNWtcl/8.0/man/mann/tkwait.n 0444 root bin 6735 22370 871603776 1 f none SUNWtcl/8.0/man/mann/toplevel.n 0444 root bin 11596 4092 871603776 1 f none SUNWtcl/8.0/man/mann/winfo.n 0444 root bin 18413 44022 871603777 1 f none SUNWtcl/8.0/man/mann/wm.n 0444 root bin 30933 15971 871603777 1 d none SUNWtcl/8.0/sun4 0755 root bin 1 d none SUNWtcl/8.0/sun4/bin 0755 root bin 1 f none SUNWtcl/8.0/sun4/bin/wish8.0 0755 root bin 69532 3985 871603781 1 d none SUNWtcl/8.0/sun4/lib 0755 root bin 1 f none SUNWtcl/8.0/sun4/lib/libtk8.0.so 0555 root bin 984864 24987 871603779 1 f none SUNWtcl/8.0/sun4/lib/tkConfig.sh 0644 root bin 2322 588 871603782 1 i copyright 2209 55092 840127225 1 i depend 155 11905 840127819 1 i pkginfo 244 19810 871603784 07070100084220000041ed00004ccf0000000a0000000233f39e4e0000000000000020000000d700000000000000000000000800000004install07070100084240000081a400004ccf0000000a00000001321352f9000008a100000020000000d700000000000000000000001200000004install/copyrightThis software is copyrighted by the Regents of the University of California, Sun Microsystems, Inc., and other parties. The following terms apply to all files associated with the software unless explicitly disclaimed in individual files. The authors hereby grant permission to use, copy, modify, distribute, and license this software and its documentation for any purpose, provided that existing copyright notices are retained in all copies and that this notice is included verbatim in any distributions. No written agreement, license, or royalty fee is required for any of the authorized uses. Modifications to this software may be copyrighted by their authors and need not follow the licensing terms described here, provided that the new terms are clearly indicated on the first page of each file where they apply. IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. GOVERNMENT USE: If you are acquiring this software on behalf of the U.S. government, the Government shall have only "Restricted Rights" in the software and related documentation as defined in the Federal Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2). If you are acquiring the software on behalf of the Department of Defense, the software shall be classified as "Commercial Computer Software" and the Government shall have only "Restricted Rights" as defined in Clause 252.227-7013 (c) (1) of DFARs. Notwithstanding the foregoing, the authors grant the U.S. Government and others acting in its behalf permission to use and distribute the software in accordance with the terms specified in this license. 07070100084241000081a400004ccf0000000a000000013213554b0000009b00000020000000d700000000000000000000000f00000004install/depend# This file contains the pacakge dependency list for SUNWtk. # # SCCS: @(#) depend.pkg 1.2 96/08/15 09:45:10 # P SUNWcsu P SUNWlibms P SUNWtcl P SUNWxwplt 0707010006f420000041ed00004ccf0000000a0000000333f39e480000000000000020000000d700000000000000000000000600000004reloc070701000720fd000041ed00004ccf0000000a0000000333f39e480000000000000020000000d700000000000000000000000e00000004reloc/SUNWtcl070701000763af000041ed00004ccf0000000a0000000733f39e4c0000000000000020000000d700000000000000000000001200000004reloc/SUNWtcl/8.00707010007ffc5000041ed00004ccf0000000a0000000233f39e480000000000000020000000d700000000000000000000001600000004reloc/SUNWtcl/8.0/bin0707010007ffc6000081a400004ccf0000000a0000000133f39e42000001c200000020000000d700000000000000000000001e00000004reloc/SUNWtcl/8.0/bin/wish8.0#!/bin/sh # SCCS: @(#) wish.sh 1.1 96/08/13 13:36:58 case `/bin/uname -m` in sun4*) arch=sun4 ;; i86pc) arch=i86pc ;; esac basedir=`dirname $0`/.. olddir=`pwd` cd $basedir basedir=`pwd` cd $olddir TCL_LIBRARY=${TCL_LIBRARY:-$basedir/lib/tcl8.0} TK_LIBRARY=${TK_LIBRARY:-$basedir/lib/tk8.0} LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$basedir/$arch/lib" export TCL_LIBRARY TK_LIBRARY LD_LIBRARY_PATH exec $basedir/$arch/bin/wish8.0 "$@" 07070100009ca6000041ed00004ccf0000000a0000000233f39e480000000000000020000000d700000000000000000000001a00000004reloc/SUNWtcl/8.0/include07070100009ca7000081a400004ccf0000000a0000000133f39e1e0000eebc00000020000000d700000000000000000000001f00000004reloc/SUNWtcl/8.0/include/tk.h/* * tk.h -- * * Declarations for Tk-related things that are visible * outside of the Tk module itself. * * Copyright (c) 1989-1994 The Regents of the University of California. * Copyright (c) 1994 The Australian National University. * Copyright (c) 1994-1997 Sun Microsystems, Inc. * * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * * SCCS: @(#) tk.h 1.209 97/08/08 11:30:28 */ #ifndef _TK #define _TK /* * When version numbers change here, you must also go into the following files * and update the version numbers: * * unix/configure.in * win/makefile.bc * win/makefile.vc * library/tk.tcl * * The release level should be 0 for alpha, 1 for beta, and 2 for * final/patch. The release serial value is the number that follows the * "a", "b", or "p" in the patch level; for example, if the patch level * is 4.3b2, TK_RELEASE_SERIAL is 2. It restarts at 1 whenever the * release level is changed, except for the final release, which should * be 0. * * You may also need to update some of these files when the numbers change * for the version of Tcl that this release of Tk is compiled against. */ #define TK_MAJOR_VERSION 8 #define TK_MINOR_VERSION 0 #define TK_RELEASE_LEVEL 2 #define TK_RELEASE_SERIAL 0 #define TK_VERSION "8.0" #define TK_PATCH_LEVEL "8.0" /* * A special definition used to allow this header file to be included * in resource files. */ #ifndef RESOURCE_INCLUDED /* * The following definitions set up the proper options for Macintosh * compilers. We use this method because there is no autoconf equivalent. */ #ifdef MAC_TCL # ifndef REDO_KEYSYM_LOOKUP # define REDO_KEYSYM_LOOKUP # endif #endif #ifndef _TCL # include #endif #ifndef _XLIB_H # ifdef MAC_TCL # include # include # else # include # endif #endif #ifdef __STDC__ # include #endif /* * Decide whether or not to use input methods. */ #ifdef XNQueryInputStyle #define TK_USE_INPUT_METHODS #endif /* * Dummy types that are used by clients: */ typedef struct Tk_BindingTable_ *Tk_BindingTable; typedef struct Tk_Canvas_ *Tk_Canvas; typedef struct Tk_Cursor_ *Tk_Cursor; typedef struct Tk_ErrorHandler_ *Tk_ErrorHandler; typedef struct Tk_Font_ *Tk_Font; typedef struct Tk_Image__ *Tk_Image; typedef struct Tk_ImageMaster_ *Tk_ImageMaster; typedef struct Tk_TextLayout_ *Tk_TextLayout; typedef struct Tk_Window_ *Tk_Window; typedef struct Tk_3DBorder_ *Tk_3DBorder; /* * Additional types exported to clients. */ typedef char *Tk_Uid; /* * Structure used to specify how to handle argv options. */ typedef struct { char *key; /* The key string that flags the option in the * argv array. */ int type; /* Indicates option type; see below. */ char *src; /* Value to be used in setting dst; usage * depends on type. */ char *dst; /* Address of value to be modified; usage * depends on type. */ char *help; /* Documentation message describing this option. */ } Tk_ArgvInfo; /* * Legal values for the type field of a Tk_ArgvInfo: see the user * documentation for details. */ #define TK_ARGV_CONSTANT 15 #define TK_ARGV_INT 16 #define TK_ARGV_STRING 17 #define TK_ARGV_UID 18 #define TK_ARGV_REST 19 #define TK_ARGV_FLOAT 20 #define TK_ARGV_FUNC 21 #define TK_ARGV_GENFUNC 22 #define TK_ARGV_HELP 23 #define TK_ARGV_CONST_OPTION 24 #define TK_ARGV_OPTION_VALUE 25 #define TK_ARGV_OPTION_NAME_VALUE 26 #define TK_ARGV_END 27 /* * Flag bits for passing to Tk_ParseArgv: */ #define TK_ARGV_NO_DEFAULTS 0x1 #define TK_ARGV_NO_LEFTOVERS 0x2 #define TK_ARGV_NO_ABBREV 0x4 #define TK_ARGV_DONT_SKIP_FIRST_ARG 0x8 /* * Structure used to describe application-specific configuration * options: indicates procedures to call to parse an option and * to return a text string describing an option. */ typedef int (Tk_OptionParseProc) _ANSI_ARGS_((ClientData clientData, Tcl_Interp *interp, Tk_Window tkwin, char *value, char *widgRec, int offset)); typedef char *(Tk_OptionPrintProc) _ANSI_ARGS_((ClientData clientData, Tk_Window tkwin, char *widgRec, int offset, Tcl_FreeProc **freeProcPtr)); typedef struct Tk_CustomOption { Tk_OptionParseProc *parseProc; /* Procedure to call to parse an * option and store it in converted * form. */ Tk_OptionPrintProc *printProc; /* Procedure to return a printable * string describing an existing * option. */ ClientData clientData; /* Arbitrary one-word value used by * option parser: passed to * parseProc and printProc. */ } Tk_CustomOption; /* * Structure used to specify information for Tk_ConfigureWidget. Each * structure gives complete information for one option, including * how the option is specified on the command line, where it appears * in the option database, etc. */ typedef struct Tk_ConfigSpec { int type; /* Type of option, such as TK_CONFIG_COLOR; * see definitions below. Last option in * table must have type TK_CONFIG_END. */ char *argvName; /* Switch used to specify option in argv. * NULL means this spec is part of a group. */ char *dbName; /* Name for option in option database. */ char *dbClass; /* Class for option in database. */ char *defValue; /* Default value for option if not * specified in command line or database. */ int offset; /* Where in widget record to store value; * use Tk_Offset macro to generate values * for this. */ int specFlags; /* Any combination of the values defined * below; other bits are used internally * by tkConfig.c. */ Tk_CustomOption *customPtr; /* If type is TK_CONFIG_CUSTOM then this is * a pointer to info about how to parse and * print the option. Otherwise it is * irrelevant. */ } Tk_ConfigSpec; /* * Type values for Tk_ConfigSpec structures. See the user * documentation for details. */ #define TK_CONFIG_BOOLEAN 1 #define TK_CONFIG_INT 2 #define TK_CONFIG_DOUBLE 3 #define TK_CONFIG_STRING 4 #define TK_CONFIG_UID 5 #define TK_CONFIG_COLOR 6 #define TK_CONFIG_FONT 7 #define TK_CONFIG_BITMAP 8 #define TK_CONFIG_BORDER 9 #define TK_CONFIG_RELIEF 10 #define TK_CONFIG_CURSOR 11 #define TK_CONFIG_ACTIVE_CURSOR 12 #define TK_CONFIG_JUSTIFY 13 #define TK_CONFIG_ANCHOR 14 #define TK_CONFIG_SYNONYM 15 #define TK_CONFIG_CAP_STYLE 16 #define TK_CONFIG_JOIN_STYLE 17 #define TK_CONFIG_PIXELS 18 #define TK_CONFIG_MM 19 #define TK_CONFIG_WINDOW 20 #define TK_CONFIG_CUSTOM 21 #define TK_CONFIG_END 22 /* * Macro to use to fill in "offset" fields of Tk_ConfigInfos. * Computes number of bytes from beginning of structure to a * given field. */ #ifdef offsetof #define Tk_Offset(type, field) ((int) offsetof(type, field)) #else #define Tk_Offset(type, field) ((int) ((char *) &((type *) 0)->field)) #endif /* * Possible values for flags argument to Tk_ConfigureWidget: */ #define TK_CONFIG_ARGV_ONLY 1 /* * Possible flag values for Tk_ConfigInfo structures. Any bits at * or above TK_CONFIG_USER_BIT may be used by clients for selecting * certain entries. Before changing any values here, coordinate with * tkConfig.c (internal-use-only flags are defined there). */ #define TK_CONFIG_COLOR_ONLY 1 #define TK_CONFIG_MONO_ONLY 2 #define TK_CONFIG_NULL_OK 4 #define TK_CONFIG_DONT_SET_DEFAULT 8 #define TK_CONFIG_OPTION_SPECIFIED 0x10 #define TK_CONFIG_USER_BIT 0x100 /* * Enumerated type for describing actions to be taken in response * to a restrictProc established by Tk_RestrictEvents. */ typedef enum { TK_DEFER_EVENT, TK_PROCESS_EVENT, TK_DISCARD_EVENT } Tk_RestrictAction; /* * Priority levels to pass to Tk_AddOption: */ #define TK_WIDGET_DEFAULT_PRIO 20 #define TK_STARTUP_FILE_PRIO 40 #define TK_USER_DEFAULT_PRIO 60 #define TK_INTERACTIVE_PRIO 80 #define TK_MAX_PRIO 100 /* * Relief values returned by Tk_GetRelief: */ #define TK_RELIEF_RAISED 1 #define TK_RELIEF_FLAT 2 #define TK_RELIEF_SUNKEN 4 #define TK_RELIEF_GROOVE 8 #define TK_RELIEF_RIDGE 16 #define TK_RELIEF_SOLID 32 /* * "Which" argument values for Tk_3DBorderGC: */ #define TK_3D_FLAT_GC 1 #define TK_3D_LIGHT_GC 2 #define TK_3D_DARK_GC 3 /* * Special EnterNotify/LeaveNotify "mode" for use in events * generated by tkShare.c. Pick a high enough value that it's * unlikely to conflict with existing values (like NotifyNormal) * or any new values defined in the future. */ #define TK_NOTIFY_SHARE 20 /* * Enumerated type for describing a point by which to anchor something: */ typedef enum { TK_ANCHOR_N, TK_ANCHOR_NE, TK_ANCHOR_E, TK_ANCHOR_SE, TK_ANCHOR_S, TK_ANCHOR_SW, TK_ANCHOR_W, TK_ANCHOR_NW, TK_ANCHOR_CENTER } Tk_Anchor; /* * Enumerated type for describing a style of justification: */ typedef enum { TK_JUSTIFY_LEFT, TK_JUSTIFY_RIGHT, TK_JUSTIFY_CENTER } Tk_Justify; /* * The following structure is used by Tk_GetFontMetrics() to return * information about the properties of a Tk_Font. */ typedef struct Tk_FontMetrics { int ascent; /* The amount in pixels that the tallest * letter sticks up above the baseline, plus * any extra blank space added by the designer * of the font. */ int descent; /* The largest amount in pixels that any * letter sticks below the baseline, plus any * extra blank space added by the designer of * the font. */ int linespace; /* The sum of the ascent and descent. How * far apart two lines of text in the same * font should be placed so that none of the * characters in one line overlap any of the * characters in the other line. */ } Tk_FontMetrics; /* * Flags passed to Tk_MeasureChars: */ #define TK_WHOLE_WORDS 1 #define TK_AT_LEAST_ONE 2 #define TK_PARTIAL_OK 4 /* * Flags passed to Tk_ComputeTextLayout: */ #define TK_IGNORE_TABS 8 #define TK_IGNORE_NEWLINES 16 /* * Each geometry manager (the packer, the placer, etc.) is represented * by a structure of the following form, which indicates procedures * to invoke in the geometry manager to carry out certain functions. */ typedef void (Tk_GeomRequestProc) _ANSI_ARGS_((ClientData clientData, Tk_Window tkwin)); typedef void (Tk_GeomLostSlaveProc) _ANSI_ARGS_((ClientData clientData, Tk_Window tkwin)); typedef struct Tk_GeomMgr { char *name; /* Name of the geometry manager (command * used to invoke it, or name of widget * class that allows embedded widgets). */ Tk_GeomRequestProc *requestProc; /* Procedure to invoke when a slave's * requested geometry changes. */ Tk_GeomLostSlaveProc *lostSlaveProc; /* Procedure to invoke when a slave is * taken away from one geometry manager * by another. NULL means geometry manager * doesn't care when slaves are lost. */ } Tk_GeomMgr; /* * Result values returned by Tk_GetScrollInfo: */ #define TK_SCROLL_MOVETO 1 #define TK_SCROLL_PAGES 2 #define TK_SCROLL_UNITS 3 #define TK_SCROLL_ERROR 4 /* *--------------------------------------------------------------------------- * * Extensions to the X event set * *--------------------------------------------------------------------------- */ #define VirtualEvent (LASTEvent) #define ActivateNotify (LASTEvent + 1) #define DeactivateNotify (LASTEvent + 2) #define TK_LASTEVENT (LASTEvent + 3) #define VirtualEventMask (1L << 30) #define ActivateMask (1L << 29) #define TK_LASTEVENT (LASTEvent + 3) /* * A virtual event shares most of its fields with the XKeyEvent and * XButtonEvent structures. 99% of the time a virtual event will be * an abstraction of a key or button event, so this structure provides * the most information to the user. The only difference is the changing * of the detail field for a virtual event so that it holds the name of the * virtual event being triggered. */ typedef struct { int type; unsigned long serial; /* # of last request processed by server */ Bool send_event; /* True if this came from a SendEvent request */ Display *display; /* Display the event was read from */ Window event; /* Window on which event was requested. */ Window root; /* root window that the event occured on */ Window subwindow; /* child window */ Time time; /* milliseconds */ int x, y; /* pointer x, y coordinates in event window */ int x_root, y_root; /* coordinates relative to root */ unsigned int state; /* key or button mask */ Tk_Uid name; /* Name of virtual event. */ Bool same_screen; /* same screen flag */ } XVirtualEvent; typedef struct { int type; unsigned long serial; /* # of last request processed by server */ Bool send_event; /* True if this came from a SendEvent request */ Display *display; /* Display the event was read from */ Window window; /* Window in which event occurred. */ } XActivateDeactivateEvent; typedef XActivateDeactivateEvent XActivateEvent; typedef XActivateDeactivateEvent XDeactivateEvent; /* *-------------------------------------------------------------- * * Macros for querying Tk_Window structures. See the * manual entries for documentation. * *-------------------------------------------------------------- */ #define Tk_Display(tkwin) (((Tk_FakeWin *) (tkwin))->display) #define Tk_ScreenNumber(tkwin) (((Tk_FakeWin *) (tkwin))->screenNum) #define Tk_Screen(tkwin) (ScreenOfDisplay(Tk_Display(tkwin), \ Tk_ScreenNumber(tkwin))) #define Tk_Depth(tkwin) (((Tk_FakeWin *) (tkwin))->depth) #define Tk_Visual(tkwin) (((Tk_FakeWin *) (tkwin))->visual) #define Tk_WindowId(tkwin) (((Tk_FakeWin *) (tkwin))->window) #define Tk_PathName(tkwin) (((Tk_FakeWin *) (tkwin))->pathName) #define Tk_Name(tkwin) (((Tk_FakeWin *) (tkwin))->nameUid) #define Tk_Class(tkwin) (((Tk_FakeWin *) (tkwin))->classUid) #define Tk_X(tkwin) (((Tk_FakeWin *) (tkwin))->changes.x) #define Tk_Y(tkwin) (((Tk_FakeWin *) (tkwin))->changes.y) #define Tk_Width(tkwin) (((Tk_FakeWin *) (tkwin))->changes.width) #define Tk_Height(tkwin) \ (((Tk_FakeWin *) (tkwin))->changes.height) #define Tk_Changes(tkwin) (&((Tk_FakeWin *) (tkwin))->changes) #define Tk_Attributes(tkwin) (&((Tk_FakeWin *) (tkwin))->atts) #define Tk_IsEmbedded(tkwin) \ (((Tk_FakeWin *) (tkwin))->flags & TK_EMBEDDED) #define Tk_IsContainer(tkwin) \ (((Tk_FakeWin *) (tkwin))->flags & TK_CONTAINER) #define Tk_IsMapped(tkwin) \ (((Tk_FakeWin *) (tkwin))->flags & TK_MAPPED) #define Tk_IsTopLevel(tkwin) \ (((Tk_FakeWin *) (tkwin))->flags & TK_TOP_LEVEL) #define Tk_ReqWidth(tkwin) (((Tk_FakeWin *) (tkwin))->reqWidth) #define Tk_ReqHeight(tkwin) (((Tk_FakeWin *) (tkwin))->reqHeight) #define Tk_InternalBorderWidth(tkwin) \ (((Tk_FakeWin *) (tkwin))->internalBorderWidth) #define Tk_Parent(tkwin) (((Tk_FakeWin *) (tkwin))->parentPtr) #define Tk_Colormap(tkwin) (((Tk_FakeWin *) (tkwin))->atts.colormap) /* * The structure below is needed by the macros above so that they can * access the fields of a Tk_Window. The fields not needed by the macros * are declared as "dummyX". The structure has its own type in order to * prevent applications from accessing Tk_Window fields except using * official macros. WARNING!! The structure definition must be kept * consistent with the TkWindow structure in tkInt.h. If you change one, * then change the other. See the declaration in tkInt.h for * documentation on what the fields are used for internally. */ typedef struct Tk_FakeWin { Display *display; char *dummy1; int screenNum; Visual *visual; int depth; Window window; char *dummy2; char *dummy3; Tk_Window parentPtr; char *dummy4; char *dummy5; char *pathName; Tk_Uid nameUid; Tk_Uid classUid; XWindowChanges changes; unsigned int dummy6; XSetWindowAttributes atts; unsigned long dummy7; unsigned int flags; char *dummy8; #ifdef TK_USE_INPUT_METHODS XIC dummy9; #endif /* TK_USE_INPUT_METHODS */ ClientData *dummy10; int dummy11; int dummy12; char *dummy13; char *dummy14; ClientData dummy15; int reqWidth, reqHeight; int internalBorderWidth; char *dummy16; char *dummy17; ClientData dummy18; char *dummy19; } Tk_FakeWin; /* * Flag values for TkWindow (and Tk_FakeWin) structures are: * * TK_MAPPED: 1 means window is currently mapped, * 0 means unmapped. * TK_TOP_LEVEL: 1 means this is a top-level window (it * was or will be created as a child of * a root window). * TK_ALREADY_DEAD: 1 means the window is in the process of * being destroyed already. * TK_NEED_CONFIG_NOTIFY: 1 means that the window has been reconfigured * before it was made to exist. At the time of * making it exist a ConfigureNotify event needs * to be generated. * TK_GRAB_FLAG: Used to manage grabs. See tkGrab.c for * details. * TK_CHECKED_IC: 1 means we've already tried to get an input * context for this window; if the ic field * is NULL it means that there isn't a context * for the field. * TK_DONT_DESTROY_WINDOW: 1 means that Tk_DestroyWindow should not * invoke XDestroyWindow to destroy this widget's * X window. The flag is set when the window * has already been destroyed elsewhere (e.g. * by another application) or when it will be * destroyed later (e.g. by destroying its * parent). * TK_WM_COLORMAP_WINDOW: 1 means that this window has at some time * appeared in the WM_COLORMAP_WINDOWS property * for its toplevel, so we have to remove it * from that property if the window is * deleted and the toplevel isn't. * TK_EMBEDDED: 1 means that this window (which must be a * toplevel) is not a free-standing window but * rather is embedded in some other application. * TK_CONTAINER: 1 means that this window is a container, and * that some other application (either in * this process or elsewhere) may be * embedding itself inside the window. * TK_BOTH_HALVES: 1 means that this window is used for * application embedding (either as * container or embedded application), and * both the containing and embedded halves * are associated with windows in this * particular process. * TK_DEFER_MODAL: 1 means that this window has deferred a modal * loop until all of the bindings for the current * event have been invoked. * TK_WRAPPER: 1 means that this window is the extra * wrapper window created around a toplevel * to hold the menubar under Unix. See * tkUnixWm.c for more information. * TK_REPARENTED: 1 means that this window has been reparented * so that as far as the window system is * concerned it isn't a child of its Tk * parent. Initially this is used only for * special Unix menubar windows. */ #define TK_MAPPED 1 #define TK_TOP_LEVEL 2 #define TK_ALREADY_DEAD 4 #define TK_NEED_CONFIG_NOTIFY 8 #define TK_GRAB_FLAG 0x10 #define TK_CHECKED_IC 0x20 #define TK_DONT_DESTROY_WINDOW 0x40 #define TK_WM_COLORMAP_WINDOW 0x80 #define TK_EMBEDDED 0x100 #define TK_CONTAINER 0x200 #define TK_BOTH_HALVES 0x400 #define TK_DEFER_MODAL 0x800 #define TK_WRAPPER 0x1000 #define TK_REPARENTED 0x2000 /* *-------------------------------------------------------------- * * Procedure prototypes and structures used for defining new canvas * items: * *-------------------------------------------------------------- */ /* * For each item in a canvas widget there exists one record with * the following structure. Each actual item is represented by * a record with the following stuff at its beginning, plus additional * type-specific stuff after that. */ #define TK_TAG_SPACE 3 typedef struct Tk_Item { int id; /* Unique identifier for this item * (also serves as first tag for * item). */ struct Tk_Item *nextPtr; /* Next in display list of all * items in this canvas. Later items * in list are drawn on top of earlier * ones. */ Tk_Uid staticTagSpace[TK_TAG_SPACE];/* Built-in space for limited # of * tags. */ Tk_Uid *tagPtr; /* Pointer to array of tags. Usually * points to staticTagSpace, but * may point to malloc-ed space if * there are lots of tags. */ int tagSpace; /* Total amount of tag space available * at tagPtr. */ int numTags; /* Number of tag slots actually used * at *tagPtr. */ struct Tk_ItemType *typePtr; /* Table of procedures that implement * this type of item. */ int x1, y1, x2, y2; /* Bounding box for item, in integer * canvas units. Set by item-specific * code and guaranteed to contain every * pixel drawn in item. Item area * includes x1 and y1 but not x2 * and y2. */ /* *------------------------------------------------------------------ * Starting here is additional type-specific stuff; see the * declarations for individual types to see what is part of * each type. The actual space below is determined by the * "itemInfoSize" of the type's Tk_ItemType record. *------------------------------------------------------------------ */ } Tk_Item; /* * Records of the following type are used to describe a type of * item (e.g. lines, circles, etc.) that can form part of a * canvas widget. */ typedef int Tk_ItemCreateProc _ANSI_ARGS_((Tcl_Interp *interp, Tk_Canvas canvas, Tk_Item *itemPtr, int argc, char **argv)); typedef int Tk_ItemConfigureProc _ANSI_ARGS_((Tcl_Interp *interp, Tk_Canvas canvas, Tk_Item *itemPtr, int argc, char **argv, int flags)); typedef int Tk_ItemCoordProc _ANSI_ARGS_((Tcl_Interp *interp, Tk_Canvas canvas, Tk_Item *itemPtr, int argc, char **argv)); typedef void Tk_ItemDeleteProc _ANSI_ARGS_((Tk_Canvas canvas, Tk_Item *itemPtr, Display *display)); typedef void Tk_ItemDisplayProc _ANSI_ARGS_((Tk_Canvas canvas, Tk_Item *itemPtr, Display *display, Drawable dst, int x, int y, int width, int height)); typedef double Tk_ItemPointProc _ANSI_ARGS_((Tk_Canvas canvas, Tk_Item *itemPtr, double *pointPtr)); typedef int Tk_ItemAreaProc _ANSI_ARGS_((Tk_Canvas canvas, Tk_Item *itemPtr, double *rectPtr)); typedef int Tk_ItemPostscriptProc _ANSI_ARGS_((Tcl_Interp *interp, Tk_Canvas canvas, Tk_Item *itemPtr, int prepass)); typedef void Tk_ItemScaleProc _ANSI_ARGS_((Tk_Canvas canvas, Tk_Item *itemPtr, double originX, double originY, double scaleX, double scaleY)); typedef void Tk_ItemTranslateProc _ANSI_ARGS_((Tk_Canvas canvas, Tk_Item *itemPtr, double deltaX, double deltaY)); typedef int Tk_ItemIndexProc _ANSI_ARGS_((Tcl_Interp *interp, Tk_Canvas canvas, Tk_Item *itemPtr, char *indexString, int *indexPtr)); typedef void Tk_ItemCursorProc _ANSI_ARGS_((Tk_Canvas canvas, Tk_Item *itemPtr, int index)); typedef int Tk_ItemSelectionProc _ANSI_ARGS_((Tk_Canvas canvas, Tk_Item *itemPtr, int offset, char *buffer, int maxBytes)); typedef void Tk_ItemInsertProc _ANSI_ARGS_((Tk_Canvas canvas, Tk_Item *itemPtr, int beforeThis, char *string)); typedef void Tk_ItemDCharsProc _ANSI_ARGS_((Tk_Canvas canvas, Tk_Item *itemPtr, int first, int last)); typedef struct Tk_ItemType { char *name; /* The name of this type of item, such * as "line". */ int itemSize; /* Total amount of space needed for * item's record. */ Tk_ItemCreateProc *createProc; /* Procedure to create a new item of * this type. */ Tk_ConfigSpec *configSpecs; /* Pointer to array of configuration * specs for this type. Used for * returning configuration info. */ Tk_ItemConfigureProc *configProc; /* Procedure to call to change * configuration options. */ Tk_ItemCoordProc *coordProc; /* Procedure to call to get and set * the item's coordinates. */ Tk_ItemDeleteProc *deleteProc; /* Procedure to delete existing item of * this type. */ Tk_ItemDisplayProc *displayProc; /* Procedure to display items of * this type. */ int alwaysRedraw; /* Non-zero means displayProc should * be called even when the item has * been moved off-screen. */ Tk_ItemPointProc *pointProc; /* Computes distance from item to * a given point. */ Tk_ItemAreaProc *areaProc; /* Computes whether item is inside, * outside, or overlapping an area. */ Tk_ItemPostscriptProc *postscriptProc; /* Procedure to write a Postscript * description for items of this * type. */ Tk_ItemScaleProc *scaleProc; /* Procedure to rescale items of * this type. */ Tk_ItemTranslateProc *translateProc;/* Procedure to translate items of * this type. */ Tk_ItemIndexProc *indexProc; /* Procedure to determine index of * indicated character. NULL if * item doesn't support indexing. */ Tk_ItemCursorProc *icursorProc; /* Procedure to set insert cursor pos. * to just before a given position. */ Tk_ItemSelectionProc *selectionProc;/* Procedure to return selection (in * STRING format) when it is in this * item. */ Tk_ItemInsertProc *insertProc; /* Procedure to insert something into * an item. */ Tk_ItemDCharsProc *dCharsProc; /* Procedure to delete characters * from an item. */ struct Tk_ItemType *nextPtr; /* Used to link types together into * a list. */ } Tk_ItemType; /* * The following structure provides information about the selection and * the insertion cursor. It is needed by only a few items, such as * those that display text. It is shared by the generic canvas code * and the item-specific code, but most of the fields should be written * only by the canvas generic code. */ typedef struct Tk_CanvasTextInfo { Tk_3DBorder selBorder; /* Border and background for selected * characters. Read-only to items.*/ int selBorderWidth; /* Width of border around selection. * Read-only to items. */ XColor *selFgColorPtr; /* Foreground color for selected text. * Read-only to items. */ Tk_Item *selItemPtr; /* Pointer to selected item. NULL means * selection isn't in this canvas. * Writable by items. */ int selectFirst; /* Index of first selected character. * Writable by items. */ int selectLast; /* Index of last selected character. * Writable by items. */ Tk_Item *anchorItemPtr; /* Item corresponding to "selectAnchor": * not necessarily selItemPtr. Read-only * to items. */ int selectAnchor; /* Fixed end of selection (i.e. "select to" * operation will use this as one end of the * selection). Writable by items. */ Tk_3DBorder insertBorder; /* Used to draw vertical bar for insertion * cursor. Read-only to items. */ int insertWidth; /* Total width of insertion cursor. Read-only * to items. */ int insertBorderWidth; /* Width of 3-D border around insert cursor. * Read-only to items. */ Tk_Item *focusItemPtr; /* Item that currently has the input focus, * or NULL if no such item. Read-only to * items. */ int gotFocus; /* Non-zero means that the canvas widget has * the input focus. Read-only to items.*/ int cursorOn; /* Non-zero means that an insertion cursor * should be displayed in focusItemPtr. * Read-only to items.*/ } Tk_CanvasTextInfo; /* *-------------------------------------------------------------- * * Procedure prototypes and structures used for managing images: * *-------------------------------------------------------------- */ typedef struct Tk_ImageType Tk_ImageType; typedef int (Tk_ImageCreateProc) _ANSI_ARGS_((Tcl_Interp *interp, char *name, int argc, char **argv, Tk_ImageType *typePtr, Tk_ImageMaster master, ClientData *masterDataPtr)); typedef ClientData (Tk_ImageGetProc) _ANSI_ARGS_((Tk_Window tkwin, ClientData masterData)); typedef void (Tk_ImageDisplayProc) _ANSI_ARGS_((ClientData instanceData, Display *display, Drawable drawable, int imageX, int imageY, int width, int height, int drawableX, int drawableY)); typedef void (Tk_ImageFreeProc) _ANSI_ARGS_((ClientData instanceData, Display *display)); typedef void (Tk_ImageDeleteProc) _ANSI_ARGS_((ClientData masterData)); typedef void (Tk_ImageChangedProc) _ANSI_ARGS_((ClientData clientData, int x, int y, int width, int height, int imageWidth, int imageHeight)); /* * The following structure represents a particular type of image * (bitmap, xpm image, etc.). It provides information common to * all images of that type, such as the type name and a collection * of procedures in the image manager that respond to various * events. Each image manager is represented by one of these * structures. */ struct Tk_ImageType { char *name; /* Name of image type. */ Tk_ImageCreateProc *createProc; /* Procedure to call to create a new image * of this type. */ Tk_ImageGetProc *getProc; /* Procedure to call the first time * Tk_GetImage is called in a new way * (new visual or screen). */ Tk_ImageDisplayProc *displayProc; /* Call to draw image, in response to * Tk_RedrawImage calls. */ Tk_ImageFreeProc *freeProc; /* Procedure to call whenever Tk_FreeImage * is called to release an instance of an * image. */ Tk_ImageDeleteProc *deleteProc; /* Procedure to call to delete image. It * will not be called until after freeProc * has been called for each instance of the * image. */ struct Tk_ImageType *nextPtr; /* Next in list of all image types currently * known. Filled in by Tk, not by image * manager. */ }; /* *-------------------------------------------------------------- * * Additional definitions used to manage images of type "photo". * *-------------------------------------------------------------- */ /* * The following type is used to identify a particular photo image * to be manipulated: */ typedef void *Tk_PhotoHandle; /* * The following structure describes a block of pixels in memory: */ typedef struct Tk_PhotoImageBlock { unsigned char *pixelPtr; /* Pointer to the first pixel. */ int width; /* Width of block, in pixels. */ int height; /* Height of block, in pixels. */ int pitch; /* Address difference between corresponding * pixels in successive lines. */ int pixelSize; /* Address difference between successive * pixels in the same line. */ int offset[3]; /* Address differences between the red, green * and blue components of the pixel and the * pixel as a whole. */ } Tk_PhotoImageBlock; /* * Procedure prototypes and structures used in reading and * writing photo images: */ typedef struct Tk_PhotoImageFormat Tk_PhotoImageFormat; typedef int (Tk_ImageFileMatchProc) _ANSI_ARGS_((Tcl_Channel chan, char *fileName, char *formatString, int *widthPtr, int *heightPtr)); typedef int (Tk_ImageStringMatchProc) _ANSI_ARGS_((char *string, char *formatString, int *widthPtr, int *heightPtr)); typedef int (Tk_ImageFileReadProc) _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)); typedef int (Tk_ImageStringReadProc) _ANSI_ARGS_((Tcl_Interp *interp, char *string, char *formatString, Tk_PhotoHandle imageHandle, int destX, int destY, int width, int height, int srcX, int srcY)); typedef int (Tk_ImageFileWriteProc) _ANSI_ARGS_((Tcl_Interp *interp, char *fileName, char *formatString, Tk_PhotoImageBlock *blockPtr)); typedef int (Tk_ImageStringWriteProc) _ANSI_ARGS_((Tcl_Interp *interp, Tcl_DString *dataPtr, char *formatString, Tk_PhotoImageBlock *blockPtr)); /* * The following structure represents a particular file format for * storing images (e.g., PPM, GIF, JPEG, etc.). It provides information * to allow image files of that format to be recognized and read into * a photo image. */ struct Tk_PhotoImageFormat { char *name; /* Name of image file format */ Tk_ImageFileMatchProc *fileMatchProc; /* Procedure to call to determine whether * an image file matches this format. */ Tk_ImageStringMatchProc *stringMatchProc; /* Procedure to call to determine whether * the data in a string matches this format. */ Tk_ImageFileReadProc *fileReadProc; /* Procedure to call to read data from * an image file into a photo image. */ Tk_ImageStringReadProc *stringReadProc; /* Procedure to call to read data from * a string into a photo image. */ Tk_ImageFileWriteProc *fileWriteProc; /* Procedure to call to write data from * a photo image to a file. */ Tk_ImageStringWriteProc *stringWriteProc; /* Procedure to call to obtain a string * representation of the data in a photo * image.*/ struct Tk_PhotoImageFormat *nextPtr; /* Next in list of all photo image formats * currently known. Filled in by Tk, not * by image format handler. */ }; /* *-------------------------------------------------------------- * * The definitions below provide backward compatibility for * functions and types related to event handling that used to * be in Tk but have moved to Tcl. * *-------------------------------------------------------------- */ #define TK_READABLE TCL_READABLE #define TK_WRITABLE TCL_WRITABLE #define TK_EXCEPTION TCL_EXCEPTION #define TK_DONT_WAIT TCL_DONT_WAIT #define TK_X_EVENTS TCL_WINDOW_EVENTS #define TK_WINDOW_EVENTS TCL_WINDOW_EVENTS #define TK_FILE_EVENTS TCL_FILE_EVENTS #define TK_TIMER_EVENTS TCL_TIMER_EVENTS #define TK_IDLE_EVENTS TCL_IDLE_EVENTS #define TK_ALL_EVENTS TCL_ALL_EVENTS #define Tk_IdleProc Tcl_IdleProc #define Tk_FileProc Tcl_FileProc #define Tk_TimerProc Tcl_TimerProc #define Tk_TimerToken Tcl_TimerToken #define Tk_BackgroundError Tcl_BackgroundError #define Tk_CancelIdleCall Tcl_CancelIdleCall #define Tk_CreateFileHandler Tcl_CreateFileHandler #define Tk_CreateTimerHandler Tcl_CreateTimerHandler #define Tk_DeleteFileHandler Tcl_DeleteFileHandler #define Tk_DeleteTimerHandler Tcl_DeleteTimerHandler #define Tk_DoOneEvent Tcl_DoOneEvent #define Tk_DoWhenIdle Tcl_DoWhenIdle #define Tk_Sleep Tcl_Sleep /* Additional stuff that has moved to Tcl: */ #define Tk_AfterCmd Tcl_AfterCmd #define Tk_EventuallyFree Tcl_EventuallyFree #define Tk_FreeProc Tcl_FreeProc #define Tk_Preserve Tcl_Preserve #define Tk_Release Tcl_Release /* *-------------------------------------------------------------- * * Additional procedure types defined by Tk. * *-------------------------------------------------------------- */ typedef int (Tk_ErrorProc) _ANSI_ARGS_((ClientData clientData, XErrorEvent *errEventPtr)); typedef void (Tk_EventProc) _ANSI_ARGS_((ClientData clientData, XEvent *eventPtr)); typedef int (Tk_GenericProc) _ANSI_ARGS_((ClientData clientData, XEvent *eventPtr)); typedef int (Tk_GetSelProc) _ANSI_ARGS_((ClientData clientData, Tcl_Interp *interp, char *portion)); typedef void (Tk_LostSelProc) _ANSI_ARGS_((ClientData clientData)); typedef Tk_RestrictAction (Tk_RestrictProc) _ANSI_ARGS_(( ClientData clientData, XEvent *eventPtr)); typedef int (Tk_SelectionProc) _ANSI_ARGS_((ClientData clientData, int offset, char *buffer, int maxBytes)); /* *-------------------------------------------------------------- * * Exported procedures and variables. * *-------------------------------------------------------------- */ EXTERN XColor * Tk_3DBorderColor _ANSI_ARGS_((Tk_3DBorder border)); EXTERN GC Tk_3DBorderGC _ANSI_ARGS_((Tk_Window tkwin, Tk_3DBorder border, int which)); EXTERN void Tk_3DHorizontalBevel _ANSI_ARGS_((Tk_Window tkwin, Drawable drawable, Tk_3DBorder border, int x, int y, int width, int height, int leftIn, int rightIn, int topBevel, int relief)); EXTERN void Tk_3DVerticalBevel _ANSI_ARGS_((Tk_Window tkwin, Drawable drawable, Tk_3DBorder border, int x, int y, int width, int height, int leftBevel, int relief)); EXTERN void Tk_AddOption _ANSI_ARGS_((Tk_Window tkwin, char *name, char *value, int priority)); EXTERN void Tk_BindEvent _ANSI_ARGS_((Tk_BindingTable bindingTable, XEvent *eventPtr, Tk_Window tkwin, int numObjects, ClientData *objectPtr)); EXTERN void Tk_CanvasDrawableCoords _ANSI_ARGS_((Tk_Canvas canvas, double x, double y, short *drawableXPtr, short *drawableYPtr)); EXTERN void Tk_CanvasEventuallyRedraw _ANSI_ARGS_(( Tk_Canvas canvas, int x1, int y1, int x2, int y2)); EXTERN int Tk_CanvasGetCoord _ANSI_ARGS_((Tcl_Interp *interp, Tk_Canvas canvas, char *string, double *doublePtr)); EXTERN Tk_CanvasTextInfo *Tk_CanvasGetTextInfo _ANSI_ARGS_((Tk_Canvas canvas)); EXTERN int Tk_CanvasPsBitmap _ANSI_ARGS_((Tcl_Interp *interp, Tk_Canvas canvas, Pixmap bitmap, int x, int y, int width, int height)); EXTERN int Tk_CanvasPsColor _ANSI_ARGS_((Tcl_Interp *interp, Tk_Canvas canvas, XColor *colorPtr)); EXTERN int Tk_CanvasPsFont _ANSI_ARGS_((Tcl_Interp *interp, Tk_Canvas canvas, Tk_Font font)); EXTERN void Tk_CanvasPsPath _ANSI_ARGS_((Tcl_Interp *interp, Tk_Canvas canvas, double *coordPtr, int numPoints)); EXTERN int Tk_CanvasPsStipple _ANSI_ARGS_((Tcl_Interp *interp, Tk_Canvas canvas, Pixmap bitmap)); EXTERN double Tk_CanvasPsY _ANSI_ARGS_((Tk_Canvas canvas, double y)); EXTERN void Tk_CanvasSetStippleOrigin _ANSI_ARGS_(( Tk_Canvas canvas, GC gc)); EXTERN int Tk_CanvasTagsParseProc _ANSI_ARGS_(( ClientData clientData, Tcl_Interp *interp, Tk_Window tkwin, char *value, char *widgRec, int offset)); EXTERN char * Tk_CanvasTagsPrintProc _ANSI_ARGS_(( ClientData clientData, Tk_Window tkwin, char *widgRec, int offset, Tcl_FreeProc **freeProcPtr)); EXTERN Tk_Window Tk_CanvasTkwin _ANSI_ARGS_((Tk_Canvas canvas)); EXTERN void Tk_CanvasWindowCoords _ANSI_ARGS_((Tk_Canvas canvas, double x, double y, short *screenXPtr, short *screenYPtr)); EXTERN void Tk_ChangeWindowAttributes _ANSI_ARGS_((Tk_Window tkwin, unsigned long valueMask, XSetWindowAttributes *attsPtr)); EXTERN int Tk_CharBbox _ANSI_ARGS_((Tk_TextLayout layout, int index, int *xPtr, int *yPtr, int *widthPtr, int *heightPtr)); EXTERN void Tk_ClearSelection _ANSI_ARGS_((Tk_Window tkwin, Atom selection)); EXTERN int Tk_ClipboardAppend _ANSI_ARGS_((Tcl_Interp *interp, Tk_Window tkwin, Atom target, Atom format, char* buffer)); EXTERN int Tk_ClipboardClear _ANSI_ARGS_((Tcl_Interp *interp, Tk_Window tkwin)); EXTERN int Tk_ConfigureInfo _ANSI_ARGS_((Tcl_Interp *interp, Tk_Window tkwin, Tk_ConfigSpec *specs, char *widgRec, char *argvName, int flags)); EXTERN int Tk_ConfigureValue _ANSI_ARGS_((Tcl_Interp *interp, Tk_Window tkwin, Tk_ConfigSpec *specs, char *widgRec, char *argvName, int flags)); EXTERN int Tk_ConfigureWidget _ANSI_ARGS_((Tcl_Interp *interp, Tk_Window tkwin, Tk_ConfigSpec *specs, int argc, char **argv, char *widgRec, int flags)); EXTERN void Tk_ConfigureWindow _ANSI_ARGS_((Tk_Window tkwin, unsigned int valueMask, XWindowChanges *valuePtr)); EXTERN Tk_TextLayout Tk_ComputeTextLayout _ANSI_ARGS_((Tk_Font font, CONST char *string, int numChars, int wrapLength, Tk_Justify justify, int flags, int *widthPtr, int *heightPtr)); EXTERN Tk_Window Tk_CoordsToWindow _ANSI_ARGS_((int rootX, int rootY, Tk_Window tkwin)); EXTERN unsigned long Tk_CreateBinding _ANSI_ARGS_((Tcl_Interp *interp, Tk_BindingTable bindingTable, ClientData object, char *eventString, char *command, int append)); EXTERN Tk_BindingTable Tk_CreateBindingTable _ANSI_ARGS_((Tcl_Interp *interp)); EXTERN Tk_ErrorHandler Tk_CreateErrorHandler _ANSI_ARGS_((Display *display, int errNum, int request, int minorCode, Tk_ErrorProc *errorProc, ClientData clientData)); EXTERN void Tk_CreateEventHandler _ANSI_ARGS_((Tk_Window token, unsigned long mask, Tk_EventProc *proc, ClientData clientData)); EXTERN void Tk_CreateGenericHandler _ANSI_ARGS_(( Tk_GenericProc *proc, ClientData clientData)); EXTERN void Tk_CreateImageType _ANSI_ARGS_(( Tk_ImageType *typePtr)); EXTERN void Tk_CreateItemType _ANSI_ARGS_((Tk_ItemType *typePtr)); EXTERN void Tk_CreatePhotoImageFormat _ANSI_ARGS_(( Tk_PhotoImageFormat *formatPtr)); EXTERN void Tk_CreateSelHandler _ANSI_ARGS_((Tk_Window tkwin, Atom selection, Atom target, Tk_SelectionProc *proc, ClientData clientData, Atom format)); EXTERN Tk_Window Tk_CreateWindow _ANSI_ARGS_((Tcl_Interp *interp, Tk_Window parent, char *name, char *screenName)); EXTERN Tk_Window Tk_CreateWindowFromPath _ANSI_ARGS_(( Tcl_Interp *interp, Tk_Window tkwin, char *pathName, char *screenName)); EXTERN int Tk_DefineBitmap _ANSI_ARGS_((Tcl_Interp *interp, Tk_Uid name, char *source, int width, int height)); EXTERN void Tk_DefineCursor _ANSI_ARGS_((Tk_Window window, Tk_Cursor cursor)); EXTERN void Tk_DeleteAllBindings _ANSI_ARGS_(( Tk_BindingTable bindingTable, ClientData object)); EXTERN int Tk_DeleteBinding _ANSI_ARGS_((Tcl_Interp *interp, Tk_BindingTable bindingTable, ClientData object, char *eventString)); EXTERN void Tk_DeleteBindingTable _ANSI_ARGS_(( Tk_BindingTable bindingTable)); EXTERN void Tk_DeleteErrorHandler _ANSI_ARGS_(( Tk_ErrorHandler handler)); EXTERN void Tk_DeleteEventHandler _ANSI_ARGS_((Tk_Window token, unsigned long mask, Tk_EventProc *proc, ClientData clientData)); EXTERN void Tk_DeleteGenericHandler _ANSI_ARGS_(( Tk_GenericProc *proc, ClientData clientData)); EXTERN void Tk_DeleteImage _ANSI_ARGS_((Tcl_Interp *interp, char *name)); EXTERN void Tk_DeleteSelHandler _ANSI_ARGS_((Tk_Window tkwin, Atom selection, Atom target)); EXTERN void Tk_DestroyWindow _ANSI_ARGS_((Tk_Window tkwin)); EXTERN char * Tk_DisplayName _ANSI_ARGS_((Tk_Window tkwin)); EXTERN int Tk_DistanceToTextLayout _ANSI_ARGS_(( Tk_TextLayout layout, int x, int y)); EXTERN void Tk_Draw3DPolygon _ANSI_ARGS_((Tk_Window tkwin, Drawable drawable, Tk_3DBorder border, XPoint *pointPtr, int numPoints, int borderWidth, int leftRelief)); EXTERN void Tk_Draw3DRectangle _ANSI_ARGS_((Tk_Window tkwin, Drawable drawable, Tk_3DBorder border, int x, int y, int width, int height, int borderWidth, int relief)); EXTERN void Tk_DrawChars _ANSI_ARGS_((Display *display, Drawable drawable, GC gc, Tk_Font tkfont, CONST char *source, int numChars, int x, int y)); EXTERN void Tk_DrawFocusHighlight _ANSI_ARGS_((Tk_Window tkwin, GC gc, int width, Drawable drawable)); EXTERN void Tk_DrawTextLayout _ANSI_ARGS_((Display *display, Drawable drawable, GC gc, Tk_TextLayout layout, int x, int y, int firstChar, int lastChar)); EXTERN void Tk_Fill3DPolygon _ANSI_ARGS_((Tk_Window tkwin, Drawable drawable, Tk_3DBorder border, XPoint *pointPtr, int numPoints, int borderWidth, int leftRelief)); EXTERN void Tk_Fill3DRectangle _ANSI_ARGS_((Tk_Window tkwin, Drawable drawable, Tk_3DBorder border, int x, int y, int width, int height, int borderWidth, int relief)); EXTERN Tk_PhotoHandle Tk_FindPhoto _ANSI_ARGS_((Tcl_Interp *interp, char *imageName)); EXTERN Font Tk_FontId _ANSI_ARGS_((Tk_Font font)); EXTERN void Tk_Free3DBorder _ANSI_ARGS_((Tk_3DBorder border)); EXTERN void Tk_FreeBitmap _ANSI_ARGS_((Display *display, Pixmap bitmap)); EXTERN void Tk_FreeColor _ANSI_ARGS_((XColor *colorPtr)); EXTERN void Tk_FreeColormap _ANSI_ARGS_((Display *display, Colormap colormap)); EXTERN void Tk_FreeCursor _ANSI_ARGS_((Display *display, Tk_Cursor cursor)); EXTERN void Tk_FreeFont _ANSI_ARGS_((Tk_Font)); EXTERN void Tk_FreeGC _ANSI_ARGS_((Display *display, GC gc)); EXTERN void Tk_FreeImage _ANSI_ARGS_((Tk_Image image)); EXTERN void Tk_FreeOptions _ANSI_ARGS_((Tk_ConfigSpec *specs, char *widgRec, Display *display, int needFlags)); EXTERN void Tk_FreePixmap _ANSI_ARGS_((Display *display, Pixmap pixmap)); EXTERN void Tk_FreeTextLayout _ANSI_ARGS_(( Tk_TextLayout textLayout)); EXTERN void Tk_FreeXId _ANSI_ARGS_((Display *display, XID xid)); EXTERN GC Tk_GCForColor _ANSI_ARGS_((XColor *colorPtr, Drawable drawable)); EXTERN void Tk_GeometryRequest _ANSI_ARGS_((Tk_Window tkwin, int reqWidth, int reqHeight)); EXTERN Tk_3DBorder Tk_Get3DBorder _ANSI_ARGS_((Tcl_Interp *interp, Tk_Window tkwin, Tk_Uid colorName)); EXTERN void Tk_GetAllBindings _ANSI_ARGS_((Tcl_Interp *interp, Tk_BindingTable bindingTable, ClientData object)); EXTERN int Tk_GetAnchor _ANSI_ARGS_((Tcl_Interp *interp, char *string, Tk_Anchor *anchorPtr)); EXTERN char * Tk_GetAtomName _ANSI_ARGS_((Tk_Window tkwin, Atom atom)); EXTERN char * Tk_GetBinding _ANSI_ARGS_((Tcl_Interp *interp, Tk_BindingTable bindingTable, ClientData object, char *eventString)); EXTERN Pixmap Tk_GetBitmap _ANSI_ARGS_((Tcl_Interp *interp, Tk_Window tkwin, Tk_Uid string)); EXTERN Pixmap Tk_GetBitmapFromData _ANSI_ARGS_((Tcl_Interp *interp, Tk_Window tkwin, char *source, int width, int height)); EXTERN int Tk_GetCapStyle _ANSI_ARGS_((Tcl_Interp *interp, char *string, int *capPtr)); EXTERN XColor * Tk_GetColor _ANSI_ARGS_((Tcl_Interp *interp, Tk_Window tkwin, Tk_Uid name)); EXTERN XColor * Tk_GetColorByValue _ANSI_ARGS_((Tk_Window tkwin, XColor *colorPtr)); EXTERN Colormap Tk_GetColormap _ANSI_ARGS_((Tcl_Interp *interp, Tk_Window tkwin, char *string)); EXTERN Tk_Cursor Tk_GetCursor _ANSI_ARGS_((Tcl_Interp *interp, Tk_Window tkwin, Tk_Uid string)); EXTERN Tk_Cursor Tk_GetCursorFromData _ANSI_ARGS_((Tcl_Interp *interp, Tk_Window tkwin, char *source, char *mask, int width, int height, int xHot, int yHot, Tk_Uid fg, Tk_Uid bg)); EXTERN Tk_Font Tk_GetFont _ANSI_ARGS_((Tcl_Interp *interp, Tk_Window tkwin, CONST char *string)); EXTERN Tk_Font Tk_GetFontFromObj _ANSI_ARGS_((Tcl_Interp *interp, Tk_Window tkwin, Tcl_Obj *objPtr)); EXTERN void Tk_GetFontMetrics _ANSI_ARGS_((Tk_Font font, Tk_FontMetrics *fmPtr)); EXTERN GC Tk_GetGC _ANSI_ARGS_((Tk_Window tkwin, unsigned long valueMask, XGCValues *valuePtr)); EXTERN Tk_Image Tk_GetImage _ANSI_ARGS_((Tcl_Interp *interp, Tk_Window tkwin, char *name, Tk_ImageChangedProc *changeProc, ClientData clientData)); EXTERN ClientData Tk_GetImageMasterData _ANSI_ARGS_ ((Tcl_Interp *interp, char *name, Tk_ImageType **typePtrPtr)); EXTERN Tk_ItemType * Tk_GetItemTypes _ANSI_ARGS_((void)); EXTERN int Tk_GetJoinStyle _ANSI_ARGS_((Tcl_Interp *interp, char *string, int *joinPtr)); EXTERN int Tk_GetJustify _ANSI_ARGS_((Tcl_Interp *interp, char *string, Tk_Justify *justifyPtr)); EXTERN int Tk_GetNumMainWindows _ANSI_ARGS_((void)); EXTERN Tk_Uid Tk_GetOption _ANSI_ARGS_((Tk_Window tkwin, char *name, char *className)); EXTERN int Tk_GetPixels _ANSI_ARGS_((Tcl_Interp *interp, Tk_Window tkwin, char *string, int *intPtr)); EXTERN Pixmap Tk_GetPixmap _ANSI_ARGS_((Display *display, Drawable d, int width, int height, int depth)); EXTERN int Tk_GetRelief _ANSI_ARGS_((Tcl_Interp *interp, char *name, int *reliefPtr)); EXTERN void Tk_GetRootCoords _ANSI_ARGS_ ((Tk_Window tkwin, int *xPtr, int *yPtr)); EXTERN int Tk_GetScrollInfo _ANSI_ARGS_((Tcl_Interp *interp, int argc, char **argv, double *dblPtr, int *intPtr)); EXTERN int Tk_GetScreenMM _ANSI_ARGS_((Tcl_Interp *interp, Tk_Window tkwin, char *string, double *doublePtr)); EXTERN int Tk_GetSelection _ANSI_ARGS_((Tcl_Interp *interp, Tk_Window tkwin, Atom selection, Atom target, Tk_GetSelProc *proc, ClientData clientData)); EXTERN Tk_Uid Tk_GetUid _ANSI_ARGS_((CONST char *string)); EXTERN Visual * Tk_GetVisual _ANSI_ARGS_((Tcl_Interp *interp, Tk_Window tkwin, char *string, int *depthPtr, Colormap *colormapPtr)); EXTERN void Tk_GetVRootGeometry _ANSI_ARGS_((Tk_Window tkwin, int *xPtr, int *yPtr, int *widthPtr, int *heightPtr)); EXTERN int Tk_Grab _ANSI_ARGS_((Tcl_Interp *interp, Tk_Window tkwin, int grabGlobal)); EXTERN void Tk_HandleEvent _ANSI_ARGS_((XEvent *eventPtr)); EXTERN Tk_Window Tk_IdToWindow _ANSI_ARGS_((Display *display, Window window)); EXTERN void Tk_ImageChanged _ANSI_ARGS_(( Tk_ImageMaster master, int x, int y, int width, int height, int imageWidth, int imageHeight)); EXTERN int Tk_Init _ANSI_ARGS_((Tcl_Interp *interp)); EXTERN Atom Tk_InternAtom _ANSI_ARGS_((Tk_Window tkwin, char *name)); EXTERN int Tk_IntersectTextLayout _ANSI_ARGS_(( Tk_TextLayout layout, int x, int y, int width, int height)); EXTERN void Tk_Main _ANSI_ARGS_((int argc, char **argv, Tcl_AppInitProc *appInitProc)); EXTERN void Tk_MainLoop _ANSI_ARGS_((void)); EXTERN void Tk_MaintainGeometry _ANSI_ARGS_((Tk_Window slave, Tk_Window master, int x, int y, int width, int height)); EXTERN Tk_Window Tk_MainWindow _ANSI_ARGS_((Tcl_Interp *interp)); EXTERN void Tk_MakeWindowExist _ANSI_ARGS_((Tk_Window tkwin)); EXTERN void Tk_ManageGeometry _ANSI_ARGS_((Tk_Window tkwin, Tk_GeomMgr *mgrPtr, ClientData clientData)); EXTERN void Tk_MapWindow _ANSI_ARGS_((Tk_Window tkwin)); EXTERN int Tk_MeasureChars _ANSI_ARGS_((Tk_Font tkfont, CONST char *source, int maxChars, int maxPixels, int flags, int *lengthPtr)); EXTERN void Tk_MoveResizeWindow _ANSI_ARGS_((Tk_Window tkwin, int x, int y, int width, int height)); EXTERN void Tk_MoveWindow _ANSI_ARGS_((Tk_Window tkwin, int x, int y)); EXTERN void Tk_MoveToplevelWindow _ANSI_ARGS_((Tk_Window tkwin, int x, int y)); EXTERN char * Tk_NameOf3DBorder _ANSI_ARGS_((Tk_3DBorder border)); EXTERN char * Tk_NameOfAnchor _ANSI_ARGS_((Tk_Anchor anchor)); EXTERN char * Tk_NameOfBitmap _ANSI_ARGS_((Display *display, Pixmap bitmap)); EXTERN char * Tk_NameOfCapStyle _ANSI_ARGS_((int cap)); EXTERN char * Tk_NameOfColor _ANSI_ARGS_((XColor *colorPtr)); EXTERN char * Tk_NameOfCursor _ANSI_ARGS_((Display *display, Tk_Cursor cursor)); EXTERN char * Tk_NameOfFont _ANSI_ARGS_((Tk_Font font)); EXTERN char * Tk_NameOfImage _ANSI_ARGS_(( Tk_ImageMaster imageMaster)); EXTERN char * Tk_NameOfJoinStyle _ANSI_ARGS_((int join)); EXTERN char * Tk_NameOfJustify _ANSI_ARGS_((Tk_Justify justify)); EXTERN char * Tk_NameOfRelief _ANSI_ARGS_((int relief)); EXTERN Tk_Window Tk_NameToWindow _ANSI_ARGS_((Tcl_Interp *interp, char *pathName, Tk_Window tkwin)); EXTERN void Tk_OwnSelection _ANSI_ARGS_((Tk_Window tkwin, Atom selection, Tk_LostSelProc *proc, ClientData clientData)); EXTERN int Tk_ParseArgv _ANSI_ARGS_((Tcl_Interp *interp, Tk_Window tkwin, int *argcPtr, char **argv, Tk_ArgvInfo *argTable, int flags)); EXTERN void Tk_PhotoPutBlock _ANSI_ARGS_((Tk_PhotoHandle handle, Tk_PhotoImageBlock *blockPtr, int x, int y, int width, int height)); EXTERN void Tk_PhotoPutZoomedBlock _ANSI_ARGS_(( Tk_PhotoHandle handle, Tk_PhotoImageBlock *blockPtr, int x, int y, int width, int height, int zoomX, int zoomY, int subsampleX, int subsampleY)); EXTERN int Tk_PhotoGetImage _ANSI_ARGS_((Tk_PhotoHandle handle, Tk_PhotoImageBlock *blockPtr)); EXTERN void Tk_PhotoBlank _ANSI_ARGS_((Tk_PhotoHandle handle)); EXTERN void Tk_PhotoExpand _ANSI_ARGS_((Tk_PhotoHandle handle, int width, int height )); EXTERN void Tk_PhotoGetSize _ANSI_ARGS_((Tk_PhotoHandle handle, int *widthPtr, int *heightPtr)); EXTERN void Tk_PhotoSetSize _ANSI_ARGS_((Tk_PhotoHandle handle, int width, int height)); EXTERN int Tk_PointToChar _ANSI_ARGS_((Tk_TextLayout layout, int x, int y)); EXTERN int Tk_PostscriptFontName _ANSI_ARGS_((Tk_Font tkfont, Tcl_DString *dsPtr)); EXTERN void Tk_PreserveColormap _ANSI_ARGS_((Display *display, Colormap colormap)); EXTERN void Tk_QueueWindowEvent _ANSI_ARGS_((XEvent *eventPtr, Tcl_QueuePosition position)); EXTERN void Tk_RedrawImage _ANSI_ARGS_((Tk_Image image, int imageX, int imageY, int width, int height, Drawable drawable, int drawableX, int drawableY)); EXTERN void Tk_ResizeWindow _ANSI_ARGS_((Tk_Window tkwin, int width, int height)); EXTERN int Tk_RestackWindow _ANSI_ARGS_((Tk_Window tkwin, int aboveBelow, Tk_Window other)); EXTERN Tk_RestrictProc *Tk_RestrictEvents _ANSI_ARGS_((Tk_RestrictProc *proc, ClientData arg, ClientData *prevArgPtr)); EXTERN int Tk_SafeInit _ANSI_ARGS_((Tcl_Interp *interp)); EXTERN char * Tk_SetAppName _ANSI_ARGS_((Tk_Window tkwin, char *name)); EXTERN void Tk_SetBackgroundFromBorder _ANSI_ARGS_(( Tk_Window tkwin, Tk_3DBorder border)); EXTERN void Tk_SetClass _ANSI_ARGS_((Tk_Window tkwin, char *className)); EXTERN void Tk_SetGrid _ANSI_ARGS_((Tk_Window tkwin, int reqWidth, int reqHeight, int gridWidth, int gridHeight)); EXTERN void Tk_SetInternalBorder _ANSI_ARGS_((Tk_Window tkwin, int width)); EXTERN void Tk_SetWindowBackground _ANSI_ARGS_((Tk_Window tkwin, unsigned long pixel)); EXTERN void Tk_SetWindowBackgroundPixmap _ANSI_ARGS_(( Tk_Window tkwin, Pixmap pixmap)); EXTERN void Tk_SetWindowBorder _ANSI_ARGS_((Tk_Window tkwin, unsigned long pixel)); EXTERN void Tk_SetWindowBorderWidth _ANSI_ARGS_((Tk_Window tkwin, int width)); EXTERN void Tk_SetWindowBorderPixmap _ANSI_ARGS_((Tk_Window tkwin, Pixmap pixmap)); EXTERN void Tk_SetWindowColormap _ANSI_ARGS_((Tk_Window tkwin, Colormap colormap)); EXTERN int Tk_SetWindowVisual _ANSI_ARGS_((Tk_Window tkwin, Visual *visual, int depth, Colormap colormap)); EXTERN void Tk_SizeOfBitmap _ANSI_ARGS_((Display *display, Pixmap bitmap, int *widthPtr, int *heightPtr)); EXTERN void Tk_SizeOfImage _ANSI_ARGS_((Tk_Image image, int *widthPtr, int *heightPtr)); EXTERN int Tk_StrictMotif _ANSI_ARGS_((Tk_Window tkwin)); EXTERN void Tk_TextLayoutToPostscript _ANSI_ARGS_(( Tcl_Interp *interp, Tk_TextLayout layout)); EXTERN int Tk_TextWidth _ANSI_ARGS_((Tk_Font font, CONST char *string, int numChars)); EXTERN void Tk_UndefineCursor _ANSI_ARGS_((Tk_Window window)); EXTERN void Tk_UnderlineChars _ANSI_ARGS_((Display *display, Drawable drawable, GC gc, Tk_Font tkfont, CONST char *source, int x, int y, int firstChar, int lastChar)); EXTERN void Tk_UnderlineTextLayout _ANSI_ARGS_(( Display *display, Drawable drawable, GC gc, Tk_TextLayout layout, int x, int y, int underline)); EXTERN void Tk_Ungrab _ANSI_ARGS_((Tk_Window tkwin)); EXTERN void Tk_UnmaintainGeometry _ANSI_ARGS_((Tk_Window slave, Tk_Window master)); EXTERN void Tk_UnmapWindow _ANSI_ARGS_((Tk_Window tkwin)); EXTERN void Tk_UnsetGrid _ANSI_ARGS_((Tk_Window tkwin)); EXTERN void Tk_UpdatePointer _ANSI_ARGS_((Tk_Window tkwin, int x, int y, int state)); /* * Tcl commands exported by Tk: */ EXTERN int Tk_AfterCmd _ANSI_ARGS_((ClientData clientData, Tcl_Interp *interp, int argc, char **argv)); EXTERN int Tk_BellCmd _ANSI_ARGS_((ClientData clientData, Tcl_Interp *interp, int argc, char **argv)); EXTERN int Tk_BindCmd _ANSI_ARGS_((ClientData clientData, Tcl_Interp *interp, int argc, char **argv)); EXTERN int Tk_BindtagsCmd _ANSI_ARGS_((ClientData clientData, Tcl_Interp *interp, int argc, char **argv)); EXTERN int Tk_ButtonCmd _ANSI_ARGS_((ClientData clientData, Tcl_Interp *interp, int argc, char **argv)); EXTERN int Tk_CanvasCmd _ANSI_ARGS_((ClientData clientData, Tcl_Interp *interp, int argc, char **argv)); EXTERN int Tk_CheckbuttonCmd _ANSI_ARGS_((ClientData clientData, Tcl_Interp *interp, int argc, char **argv)); EXTERN int Tk_ClipboardCmd _ANSI_ARGS_((ClientData clientData, Tcl_Interp *interp, int argc, char **argv)); EXTERN int Tk_ChooseColorCmd _ANSI_ARGS_((ClientData clientData, Tcl_Interp *interp, int argc, char **argv)); EXTERN int Tk_ChooseFontCmd _ANSI_ARGS_((ClientData clientData, Tcl_Interp *interp, int argc, char **argv)); EXTERN int Tk_DestroyCmd _ANSI_ARGS_((ClientData clientData, Tcl_Interp *interp, int argc, char **argv)); EXTERN int Tk_EntryCmd _ANSI_ARGS_((ClientData clientData, Tcl_Interp *interp, int argc, char **argv)); EXTERN int Tk_EventCmd _ANSI_ARGS_((ClientData clientData, Tcl_Interp *interp, int argc, char **argv)); EXTERN int Tk_FileeventCmd _ANSI_ARGS_((ClientData clientData, Tcl_Interp *interp, int argc, char **argv)); EXTERN int Tk_FrameCmd _ANSI_ARGS_((ClientData clientData, Tcl_Interp *interp, int argc, char **argv)); EXTERN int Tk_FocusCmd _ANSI_ARGS_((ClientData clientData, Tcl_Interp *interp, int argc, char **argv)); EXTERN int Tk_FontObjCmd _ANSI_ARGS_((ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])); EXTERN int Tk_GetOpenFileCmd _ANSI_ARGS_((ClientData clientData, Tcl_Interp *interp, int argc, char **argv)); EXTERN int Tk_GetSaveFileCmd _ANSI_ARGS_((ClientData clientData, Tcl_Interp *interp, int argc, char **argv)); EXTERN int Tk_GrabCmd _ANSI_ARGS_((ClientData clientData, Tcl_Interp *interp, int argc, char **argv)); EXTERN int Tk_GridCmd _ANSI_ARGS_((ClientData clientData, Tcl_Interp *interp, int argc, char **argv)); EXTERN int Tk_ImageCmd _ANSI_ARGS_((ClientData clientData, Tcl_Interp *interp, int argc, char **argv)); EXTERN int Tk_LabelCmd _ANSI_ARGS_((ClientData clientData, Tcl_Interp *interp, int argc, char **argv)); EXTERN int Tk_ListboxCmd _ANSI_ARGS_((ClientData clientData, Tcl_Interp *interp, int argc, char **argv)); EXTERN int Tk_LowerCmd _ANSI_ARGS_((ClientData clientData, Tcl_Interp *interp, int argc, char **argv)); EXTERN int Tk_MenuCmd _ANSI_ARGS_((ClientData clientData, Tcl_Interp *interp, int argc, char **argv)); EXTERN int Tk_MenubuttonCmd _ANSI_ARGS_((ClientData clientData, Tcl_Interp *interp, int argc, char **argv)); EXTERN int Tk_MessageBoxCmd _ANSI_ARGS_((ClientData clientData, Tcl_Interp *interp, int argc, char **argv)); EXTERN int Tk_MessageCmd _ANSI_ARGS_((ClientData clientData, Tcl_Interp *interp, int argc, char **argv)); EXTERN int Tk_OptionCmd _ANSI_ARGS_((ClientData clientData, Tcl_Interp *interp, int argc, char **argv)); EXTERN int Tk_PackCmd _ANSI_ARGS_((ClientData clientData, Tcl_Interp *interp, int argc, char **argv)); EXTERN int Tk_PlaceCmd _ANSI_ARGS_((ClientData clientData, Tcl_Interp *interp, int argc, char **argv)); EXTERN int Tk_RadiobuttonCmd _ANSI_ARGS_((ClientData clientData, Tcl_Interp *interp, int argc, char **argv)); EXTERN int Tk_RaiseCmd _ANSI_ARGS_((ClientData clientData, Tcl_Interp *interp, int argc, char **argv)); EXTERN int Tk_ScaleCmd _ANSI_ARGS_((ClientData clientData, Tcl_Interp *interp, int argc, char **argv)); EXTERN int Tk_ScrollbarCmd _ANSI_ARGS_((ClientData clientData, Tcl_Interp *interp, int argc, char **argv)); EXTERN int Tk_SelectionCmd _ANSI_ARGS_((ClientData clientData, Tcl_Interp *interp, int argc, char **argv)); EXTERN int Tk_SendCmd _ANSI_ARGS_((ClientData clientData, Tcl_Interp *interp, int argc, char **argv)); EXTERN int Tk_TextCmd _ANSI_ARGS_((ClientData clientData, Tcl_Interp *interp, int argc, char **argv)); EXTERN int Tk_TkObjCmd _ANSI_ARGS_((ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])); EXTERN int Tk_TkwaitCmd _ANSI_ARGS_((ClientData clientData, Tcl_Interp *interp, int argc, char **argv)); EXTERN int Tk_ToplevelCmd _ANSI_ARGS_((ClientData clientData, Tcl_Interp *interp, int argc, char **argv)); EXTERN int Tk_UpdateCmd _ANSI_ARGS_((ClientData clientData, Tcl_Interp *interp, int argc, char **argv)); EXTERN int Tk_WinfoObjCmd _ANSI_ARGS_((ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])); EXTERN int Tk_WmCmd _ANSI_ARGS_((ClientData clientData, Tcl_Interp *interp, int argc, char **argv)); #endif /* RESOURCE_INCLUDED */ #endif /* _TK */ 0707010009a5d2000041ed00004ccf0000000a0000000333f39e480000000000000020000000d700000000000000000000001600000004reloc/SUNWtcl/8.0/lib070701000779b4000041ed00004ccf0000000a0000000333f39e490000000000000020000000d700000000000000000000001c00000004reloc/SUNWtcl/8.0/lib/tk8.0070701000779b5000081a400004ccf0000000a0000000133f39e1e00000d8900000020000000d700000000000000000000002800000004reloc/SUNWtcl/8.0/lib/tk8.0/bgerror.tcl# bgerror.tcl -- # # This file contains a default version of the bgerror procedure. It # posts a dialog box with the error message and gives the user a chance # to see a more detailed stack trace. # # SCCS: @(#) bgerror.tcl 1.16 97/08/06 09:19:50 # # Copyright (c) 1992-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. # bgerror -- # This is the default version of bgerror. # It tries to execute tkerror, if that fails it posts a dialog box containing # the error message and gives the user a chance to ask to see a stack # trace. # Arguments: # err - The error message. proc bgerror err { global errorInfo tcl_platform # save errorInfo which would be erased in the catch below otherwise. set info $errorInfo ; # For backward compatibility : # Let's try to execute "tkerror" (using catch {tkerror ...} # instead of searching it with info procs so the application gets # a chance to auto load it using its favorite "unknown" mecanism. # (we do the default dialog only if we get a TCL_ERROR (=1) return # code from the tkerror trial, other ret codes are passed back # to our caller (tcl background error handler) so the called "tkerror" # can still use return -code break, to skip remaining messages # in the error queue for instance) -- dl set ret [catch {tkerror $err} msg]; if {$ret != 1} {return -code $ret $msg} # Ok the application's tkerror either failed or was not found # we use the default dialog then : if {$tcl_platform(platform) == "macintosh"} { set ok Ok } else { set ok OK } set button [tk_dialog .bgerrorDialog "Error in Tcl Script" \ "Error: $err" error 0 $ok "Skip Messages" "Stack Trace"] if {$button == 0} { return } elseif {$button == 1} { return -code break } set w .bgerrorTrace catch {destroy $w} toplevel $w -class ErrorTrace wm minsize $w 1 1 wm title $w "Stack Trace for Error" wm iconname $w "Stack Trace" button $w.ok -text OK -command "destroy $w" -default active if {$tcl_platform(platform) == "macintosh"} { text $w.text -relief flat -bd 2 -highlightthickness 0 -setgrid true \ -yscrollcommand "$w.scroll set" -width 60 -height 20 } else { text $w.text -relief sunken -bd 2 -yscrollcommand "$w.scroll set" \ -setgrid true -width 60 -height 20 } scrollbar $w.scroll -relief sunken -command "$w.text yview" pack $w.ok -side bottom -padx 3m -pady 2m pack $w.scroll -side right -fill y pack $w.text -side left -expand yes -fill both $w.text insert 0.0 $info $w.text mark set insert 0.0 bind $w "destroy $w" bind $w.text "destroy $w; break" # Center the window on the screen. wm withdraw $w update idletasks set x [expr [winfo screenwidth $w]/2 - [winfo reqwidth $w]/2 \ - [winfo vrootx [winfo parent $w]]] set y [expr [winfo screenheight $w]/2 - [winfo reqheight $w]/2 \ - [winfo vrooty [winfo parent $w]]] wm geom $w +$x+$y wm deiconify $w # Be sure to release any grabs that might be present on the # screen, since they could make it impossible for the user # to interact with the stack trace. if {[grab current .] != ""} { grab release [grab current .] } } 070701000779b6000081a400004ccf0000000a0000000133f39e1e00002b2000000020000000d700000000000000000000002700000004reloc/SUNWtcl/8.0/lib/tk8.0/button.tcl# button.tcl -- # # This file defines the default bindings for Tk label, button, # checkbutton, and radiobutton widgets and provides procedures # that help in implementing those bindings. # # SCCS: @(#) button.tcl 1.22 96/11/14 14:49:11 # # Copyright (c) 1992-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. # #------------------------------------------------------------------------- # 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 ##################### # 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"} { $w config -state active 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) "" } # 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 config -relief] 4] if {[$w cget -state] != "disabled"} { set tkPriv(buttonWindow) $w $w config -relief sunken } } # 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) "" $w config -relief $tkPriv(relief) if {($w == $tkPriv(window)) && ([$w cget -state] != "disabled")} { uplevel #0 [list $w invoke] } } } } 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 ################## # tkButtonInvoke -- # The procedure below is called when a button is invoked through # the keyboard. It simulate a press of the button via the mouse. # # Arguments: # w - The name of the widget. proc tkButtonInvoke w { if {[$w cget -state] != "disabled"} { set oldRelief [$w cget -relief] set oldState [$w cget -state] $w configure -state active -relief sunken update idletasks after 100 $w configure -state $oldState -relief $oldRelief uplevel #0 [list $w invoke] } } # tkCheckRadioInvoke -- # The procedure below is invoked when the mouse button is pressed in # a checkbutton or radiobutton widget, or when the widget is invoked # through the keyboard. It invokes the widget if it # isn't disabled. # # Arguments: # w - The name of the widget. # cmd - The subcommand to invoke (one of invoke, select, or deselect). proc tkCheckRadioInvoke {w {cmd invoke}} { if {[$w cget -state] != "disabled"} { uplevel #0 [list $w $cmd] } } 070701000779b7000081a400004ccf0000000a0000000133f39e1e00004d3500000020000000d700000000000000000000002800000004reloc/SUNWtcl/8.0/lib/tk8.0/clrpick.tcl# clrpick.tcl -- # # Color selection dialog for platforms that do not support a # standard color selection dialog. # # SCCS: @(#) clrpick.tcl 1.3 96/09/05 09:59:24 # # Copyright (c) 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. # # ToDo: # # (1): Find out how many free colors are left in the colormap and # don't allocate too many colors. # (2): Implement HSV color selection. # # tkColorDialog -- # # Create a color dialog and let the user choose a color. This function # should not be called directly. It is called by the tk_chooseColor # function when a native color selector widget does not exist # proc tkColorDialog {args} { global tkPriv set w .__tk__color upvar #0 $w data # The lines variables track the start and end indices of the line # elements in the colorbar canvases. set data(lines,red,start) 0 set data(lines,red,last) -1 set data(lines,green,start) 0 set data(lines,green,last) -1 set data(lines,blue,start) 0 set data(lines,blue,last) -1 # This is the actual number of lines that are drawn in each color strip. # Note that the bars may be of any width. # However, NUM_COLORBARS must be a number that evenly divides 256. # Such as 256, 128, 64, etc. set data(NUM_COLORBARS) 8 # BARS_WIDTH is the number of pixels wide the color bar portion of the # canvas is. This number must be a multiple of NUM_COLORBARS set data(BARS_WIDTH) 128 # PLGN_WIDTH is the number of pixels wide of the triangular selection # polygon. This also results in the definition of the padding on the # left and right sides which is half of PLGN_WIDTH. Make this number even. set data(PLGN_HEIGHT) 10 # PLGN_HEIGHT is the height of the selection polygon and the height of the # selection rectangle at the bottom of the color bar. No restrictions. set data(PLGN_WIDTH) 10 tkColorDialog_Config $w $args tkColorDialog_InitValues $w if ![winfo exists $w] { toplevel $w -class tkColorDialog tkColorDialog_BuildDialog $w } wm transient $w $data(-parent) # 5. Withdraw the window, then update all the geometry information # so we know how big it wants to be, then center the window in the # display and de-iconify it. wm withdraw $w update idletasks set x [expr [winfo screenwidth $w]/2 - [winfo reqwidth $w]/2 \ - [winfo vrootx [winfo parent $w]]] set y [expr [winfo screenheight $w]/2 - [winfo reqheight $w]/2 \ - [winfo vrooty [winfo parent $w]]] wm geom $w +$x+$y wm deiconify $w wm title $w $data(-title) # 6. Set a grab and claim the focus too. set oldFocus [focus] set oldGrab [grab current $w] if {$oldGrab != ""} { set grabStatus [grab status $oldGrab] } grab $w focus $data(okBtn) # 7. Wait for the user to respond, then restore the focus and # return the index of the selected button. Restore the focus # before deleting the window, since otherwise the window manager # may take the focus away so we can't redirect it. Finally, # restore any grab that was in effect. tkwait variable tkPriv(selectColor) catch {focus $oldFocus} grab release $w destroy $w unset data if {$oldGrab != ""} { if {$grabStatus == "global"} { grab -global $oldGrab } else { grab $oldGrab } } return $tkPriv(selectColor) } # tkColorDialog_InitValues -- # # Get called during initialization or when user resets NUM_COLORBARS # proc tkColorDialog_InitValues {w} { upvar #0 $w data # IntensityIncr is the difference in color intensity between a colorbar # and its neighbors. set data(intensityIncr) [expr 256 / $data(NUM_COLORBARS)] # ColorbarWidth is the width of each colorbar set data(colorbarWidth) \ [expr $data(BARS_WIDTH) / $data(NUM_COLORBARS)] # Indent is the width of the space at the left and right side of the # colorbar. It is always half the selector polygon width, because the # polygon extends into the space. set data(indent) [expr $data(PLGN_WIDTH) / 2] set data(colorPad) 2 set data(selPad) [expr $data(PLGN_WIDTH) / 2] # # minX is the x coordinate of the first colorbar # set data(minX) $data(indent) # # maxX is the x coordinate of the last colorbar # set data(maxX) [expr $data(BARS_WIDTH) + $data(indent)-1] # # canvasWidth is the width of the entire canvas, including the indents # set data(canvasWidth) [expr $data(BARS_WIDTH) + \ $data(PLGN_WIDTH)] # Set the initial color, specified by -initialcolor, or the # color chosen by the user the last time. set data(selection) $data(-initialcolor) set data(finalColor) $data(-initialcolor) set rgb [winfo rgb . $data(selection)] set data(red,intensity) [expr [lindex $rgb 0]/0x100] set data(green,intensity) [expr [lindex $rgb 1]/0x100] set data(blue,intensity) [expr [lindex $rgb 2]/0x100] } # tkColorDialog_Config -- # # Parses the command line arguments to tk_chooseColor # proc tkColorDialog_Config {w argList} { global tkPriv upvar #0 $w data # 1: the configuration specs # set specs { {-initialcolor "" "" ""} {-parent "" "" "."} {-title "" "" "Color"} } # 2: parse the arguments # tclParseConfigSpec $w $specs "" $argList if ![string compare $data(-title) ""] { set data(-title) " " } if ![string compare $data(-initialcolor) ""] { if {[info exists tkPriv(selectColor)] && \ [string compare $tkPriv(selectColor) ""]} { set data(-initialcolor) $tkPriv(selectColor) } else { set data(-initialcolor) [. cget -background] } } else { if [catch {winfo rgb . $data(-initialcolor)} err] { error $err } } if ![winfo exists $data(-parent)] { error "bad window path name \"$data(-parent)\"" } } # tkColorDialog_BuildDialog -- # # Build the dialog. # proc tkColorDialog_BuildDialog {w} { upvar #0 $w data # TopFrame contains the color strips and the color selection # set topFrame [frame $w.top -relief raised -bd 1] # StripsFrame contains the colorstrips and the individual RGB entries set stripsFrame [frame $topFrame.colorStrip] foreach c { Red Green Blue } { set color [string tolower $c] # each f frame contains an [R|G|B] entry and the equiv. color strip. set f [frame $stripsFrame.$color] # The box frame contains the label and entry widget for an [R|G|B] set box [frame $f.box] label $box.label -text $c: -width 6 -under 0 -anchor ne entry $box.entry -textvariable [format %s $w]($color,intensity) \ -width 4 pack $box.label -side left -fill y -padx 2 -pady 3 pack $box.entry -side left -anchor n -pady 0 pack $box -side left -fill both set height [expr \ [winfo reqheight $box.entry] - \ 2*([$box.entry cget -highlightthickness] + [$box.entry cget -bd])] canvas $f.color -height $height\ -width $data(BARS_WIDTH) -relief sunken -bd 2 canvas $f.sel -height $data(PLGN_HEIGHT) \ -width $data(canvasWidth) -highlightthickness 0 pack $f.color -expand yes -fill both pack $f.sel -expand yes -fill both pack $f -side top -fill x -padx 0 -pady 2 set data($color,entry) $box.entry set data($color,col) $f.color set data($color,sel) $f.sel bind $data($color,col) \ "tkColorDialog_DrawColorScale $w $color 1" bind $data($color,col) \ "tkColorDialog_EnterColorBar $w $color" bind $data($color,col) \ "tkColorDialog_LeaveColorBar $w $color" bind $data($color,sel) \ "tkColorDialog_EnterColorBar $w $color" bind $data($color,sel) \ "tkColorDialog_LeaveColorBar $w $color" bind $box.entry "tkColorDialog_HandleRGBEntry $w" } pack $stripsFrame -side left -fill both -padx 4 -pady 10 # The selFrame contains a frame that demonstrates the currently # selected color # set selFrame [frame $topFrame.sel] set lab [label $selFrame.lab -text "Selection:" -under 0 -anchor sw] set ent [entry $selFrame.ent -textvariable [format %s $w](selection) \ -width 16] set f1 [frame $selFrame.f1 -relief sunken -bd 2] set data(finalCanvas) [frame $f1.demo -bd 0 -width 100 -height 70] pack $lab $ent -side top -fill x -padx 4 -pady 2 pack $f1 -expand yes -anchor nw -fill both -padx 6 -pady 10 pack $data(finalCanvas) -expand yes -fill both bind $ent "tkColorDialog_HandleSelEntry $w" pack $selFrame -side left -fill none -anchor nw pack $topFrame -side top -expand yes -fill both -anchor nw # the botFrame frame contains the buttons # set botFrame [frame $w.bot -relief raised -bd 1] button $botFrame.ok -text OK -width 8 -under 0 \ -command "tkColorDialog_OkCmd $w" button $botFrame.cancel -text Cancel -width 8 -under 0 \ -command "tkColorDialog_CancelCmd $w" set data(okBtn) $botFrame.ok set data(cancelBtn) $botFrame.cancel pack $botFrame.ok $botFrame.cancel \ -padx 10 -pady 10 -expand yes -side left pack $botFrame -side bottom -fill x # Accelerator bindings bind $w "focus $data(red,entry)" bind $w "focus $data(green,entry)" bind $w "focus $data(blue,entry)" bind $w "focus $ent" bind $w "tkButtonInvoke $data(cancelBtn)" bind $w "tkButtonInvoke $data(cancelBtn)" bind $w "tkButtonInvoke $data(okBtn)" wm protocol $w WM_DELETE_WINDOW "tkColorDialog_CancelCmd $w" } # tkColorDialog_SetRGBValue -- # # Sets the current selection of the dialog box # proc tkColorDialog_SetRGBValue {w color} { upvar #0 $w data set data(red,intensity) [lindex $color 0] set data(green,intensity) [lindex $color 1] set data(blue,intensity) [lindex $color 2] tkColorDialog_RedrawColorBars $w all # Now compute the new x value of each colorbars pointer polygon foreach color { red green blue } { set x [tkColorDialog_RgbToX $w $data($color,intensity)] tkColorDialog_MoveSelector $w $data($color,sel) $color $x 0 } } # tkColorDialog_XToRgb -- # # Converts a screen coordinate to intensity # proc tkColorDialog_XToRgb {w x} { upvar #0 $w data return [expr ($x * $data(intensityIncr))/ $data(colorbarWidth)] } # tkColorDialog_RgbToX # # Converts an intensity to screen coordinate. # proc tkColorDialog_RgbToX {w color} { upvar #0 $w data return [expr ($color * $data(colorbarWidth)/ $data(intensityIncr))] } # tkColorDialog_DrawColorScale -- # # Draw color scale is called whenever the size of one of the color # scale canvases is changed. # proc tkColorDialog_DrawColorScale {w c {create 0}} { global lines upvar #0 $w data # col: color bar canvas # sel: selector canvas set col $data($c,col) set sel $data($c,sel) # First handle the case that we are creating everything for the first time. if $create { # First remove all the lines that already exist. if { $data(lines,$c,last) > $data(lines,$c,start)} { for {set i $data(lines,$c,start)} \ {$i <= $data(lines,$c,last)} { incr i} { $sel delete $i } } # Delete the selector if it exists if [info exists data($c,index)] { $sel delete $data($c,index) } # Draw the selection polygons tkColorDialog_CreateSelector $w $sel $c $sel bind $data($c,index) \ "tkColorDialog_StartMove $w $sel $c %x $data(selPad) 1" $sel bind $data($c,index) \ "tkColorDialog_MoveSelector $w $sel $c %x $data(selPad)" $sel bind $data($c,index) \ "tkColorDialog_ReleaseMouse $w $sel $c %x $data(selPad)" set height [winfo height $col] # Create an invisible region under the colorstrip to catch mouse clicks # that aren't on the selector. set data($c,clickRegion) [$sel create rectangle 0 0 \ $data(canvasWidth) $height -fill {} -outline {}] bind $col \ "tkColorDialog_StartMove $w $sel $c %x $data(colorPad)" bind $col \ "tkColorDialog_MoveSelector $w $sel $c %x $data(colorPad)" bind $col \ "tkColorDialog_ReleaseMouse $w $sel $c %x $data(colorPad)" $sel bind $data($c,clickRegion) \ "tkColorDialog_StartMove $w $sel $c %x $data(selPad)" $sel bind $data($c,clickRegion) \ "tkColorDialog_MoveSelector $w $sel $c %x $data(selPad)" $sel bind $data($c,clickRegion) \ "tkColorDialog_ReleaseMouse $w $sel $c %x $data(selPad)" } else { # l is the canvas index of the first colorbar. set l $data(lines,$c,start) } # Draw the color bars. set highlightW [expr \ [$col cget -highlightthickness] + [$col cget -bd]] for {set i 0} { $i < $data(NUM_COLORBARS)} { incr i} { set intensity [expr $i * $data(intensityIncr)] set startx [expr $i * $data(colorbarWidth) + $highlightW] if { $c == "red" } { set color [format "#%02x%02x%02x" \ $intensity \ $data(green,intensity) \ $data(blue,intensity)] } elseif { $c == "green" } { set color [format "#%02x%02x%02x" \ $data(red,intensity) \ $intensity \ $data(blue,intensity)] } else { set color [format "#%02x%02x%02x" \ $data(red,intensity) \ $data(green,intensity) \ $intensity] } if $create { set index [$col create rect $startx $highlightW \ [expr $startx +$data(colorbarWidth)] \ [expr [winfo height $col] + $highlightW]\ -fill $color -outline $color] } else { $col itemconf $l -fill $color -outline $color incr l } } $sel raise $data($c,index) if $create { set data(lines,$c,last) $index set data(lines,$c,start) [expr $index - $data(NUM_COLORBARS) + 1 ] } tkColorDialog_RedrawFinalColor $w } # tkColorDialog_CreateSelector -- # # Creates and draws the selector polygon at the position # $data($c,intensity). # proc tkColorDialog_CreateSelector {w sel c } { upvar #0 $w data set data($c,index) [$sel create polygon \ 0 $data(PLGN_HEIGHT) \ $data(PLGN_WIDTH) $data(PLGN_HEIGHT) \ $data(indent) 0] set data($c,x) [tkColorDialog_RgbToX $w $data($c,intensity)] $sel move $data($c,index) $data($c,x) 0 } # tkColorDialog_RedrawFinalColor # # Combines the intensities of the three colors into the final color # proc tkColorDialog_RedrawFinalColor {w} { upvar #0 $w data set color [format "#%02x%02x%02x" $data(red,intensity) \ $data(green,intensity) $data(blue,intensity)] $data(finalCanvas) conf -bg $color set data(finalColor) $color set data(selection) $color set data(finalRGB) [list \ $data(red,intensity) \ $data(green,intensity) \ $data(blue,intensity)] } # tkColorDialog_RedrawColorBars -- # # Only redraws the colors on the color strips that were not manipulated. # Params: color of colorstrip that changed. If color is not [red|green|blue] # Then all colorstrips will be updated # proc tkColorDialog_RedrawColorBars {w colorChanged} { upvar #0 $w data switch $colorChanged { red { tkColorDialog_DrawColorScale $w green tkColorDialog_DrawColorScale $w blue } green { tkColorDialog_DrawColorScale $w red tkColorDialog_DrawColorScale $w blue } blue { tkColorDialog_DrawColorScale $w red tkColorDialog_DrawColorScale $w green } default { tkColorDialog_DrawColorScale $w red tkColorDialog_DrawColorScale $w green tkColorDialog_DrawColorScale $w blue } } tkColorDialog_RedrawFinalColor $w } #---------------------------------------------------------------------- # Event handlers #---------------------------------------------------------------------- # tkColorDialog_StartMove -- # # Handles a mousedown button event over the selector polygon. # Adds the bindings for moving the mouse while the button is # pressed. Sets the binding for the button-release event. # # Params: sel is the selector canvas window, color is the color of the strip. # proc tkColorDialog_StartMove {w sel color x delta {dontMove 0}} { upvar #0 $w data if !$dontMove { tkColorDialog_MoveSelector $w $sel $color $x $delta } } # tkColorDialog_MoveSelector -- # # Moves the polygon selector so that its middle point has the same # x value as the specified x. If x is outside the bounds [0,255], # the selector is set to the closest endpoint. # # Params: sel is the selector canvas, c is [red|green|blue] # x is a x-coordinate. # proc tkColorDialog_MoveSelector {w sel color x delta} { upvar #0 $w data incr x -$delta if { $x < 0 } { set x 0 } elseif { $x >= $data(BARS_WIDTH)} { set x [expr $data(BARS_WIDTH) - 1] } set diff [expr $x - $data($color,x)] $sel move $data($color,index) $diff 0 set data($color,x) [expr $data($color,x) + $diff] # Return the x value that it was actually set at return $x } # tkColorDialog_ReleaseMouse # # Removes mouse tracking bindings, updates the colorbars. # # Params: sel is the selector canvas, color is the color of the strip, # x is the x-coord of the mouse. # proc tkColorDialog_ReleaseMouse {w sel color x delta} { upvar #0 $w data set x [tkColorDialog_MoveSelector $w $sel $color $x $delta] # Determine exactly what color we are looking at. set data($color,intensity) [tkColorDialog_XToRgb $w $x] tkColorDialog_RedrawColorBars $w $color } # tkColorDialog_ResizeColorbars -- # # Completely redraws the colorbars, including resizing the # colorstrips # proc tkColorDialog_ResizeColorBars {w} { upvar #0 $w data if { ($data(BARS_WIDTH) < $data(NUM_COLORBARS)) || (($data(BARS_WIDTH) % $data(NUM_COLORBARS)) != 0)} { set data(BARS_WIDTH) $data(NUM_COLORBARS) } tkColorDialog_InitValues $w foreach color { red green blue } { $data($color,col) conf -width $data(canvasWidth) tkColorDialog_DrawColorScale $w $color 1 } } # tkColorDialog_HandleSelEntry -- # # Handles the return keypress event in the "Selection:" entry # proc tkColorDialog_HandleSelEntry {w} { upvar #0 $w data set text [string trim $data(selection)] # Check to make sure that the color is valid if [catch {set color [winfo rgb . $text]} ] { set data(selection) $data(finalColor) return } set R [expr [lindex $color 0]/0x100] set G [expr [lindex $color 1]/0x100] set B [expr [lindex $color 2]/0x100] tkColorDialog_SetRGBValue $w "$R $G $B" set data(selection) $text } # tkColorDialog_HandleRGBEntry -- # # Handles the return keypress event in the R, G or B entry # proc tkColorDialog_HandleRGBEntry {w} { upvar #0 $w data foreach c {red green blue} { if [catch { set data($c,intensity) [expr int($data($c,intensity))] }] { set data($c,intensity) 0 } if {$data($c,intensity) < 0} { set data($c,intensity) 0 } if {$data($c,intensity) > 255} { set data($c,intensity) 255 } } tkColorDialog_SetRGBValue $w "$data(red,intensity) $data(green,intensity) \ $data(blue,intensity)" } # mouse cursor enters a color bar # proc tkColorDialog_EnterColorBar {w color} { upvar #0 $w data $data($color,sel) itemconfig $data($color,index) -fill red } # mouse leaves enters a color bar # proc tkColorDialog_LeaveColorBar {w color} { upvar #0 $w data $data($color,sel) itemconfig $data($color,index) -fill black } # user hits OK button # proc tkColorDialog_OkCmd {w} { global tkPriv upvar #0 $w data set tkPriv(selectColor) $data(finalColor) } # user hits Cancel button # proc tkColorDialog_CancelCmd {w} { global tkPriv set tkPriv(selectColor) "" } 070701000779b8000081a400004ccf0000000a0000000133f39e1f00001d4200000020000000d700000000000000000000002700000004reloc/SUNWtcl/8.0/lib/tk8.0/comdlg.tcl# comdlg.tcl -- # # Some functions needed for the common dialog boxes. Probably need to go # in a different file. # # SCCS: @(#) comdlg.tcl 1.4 96/09/05 09:07:54 # # Copyright (c) 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. # # tclParseConfigSpec -- # # Parses a list of "-option value" pairs. If all options and # values are legal, the values are stored in # $data($option). Otherwise an error message is returned. When # an error happens, the data() array may have been partially # modified, but all the modified members of the data(0 array are # guaranteed to have valid values. This is different than # Tk_ConfigureWidget() which does not modify the value of a # widget record if any error occurs. # # Arguments: # # w = widget record to modify. Must be the pathname of a widget. # # specs = { # {-commandlineswitch resourceName ResourceClass defaultValue verifier} # {....} # } # # flags = currently unused. # # argList = The list of "-option value" pairs. # proc tclParseConfigSpec {w specs flags argList} { upvar #0 $w data # 1: Put the specs in associative arrays for faster access # foreach spec $specs { if {[llength $spec] < 4} { error "\"spec\" should contain 5 or 4 elements" } set cmdsw [lindex $spec 0] set cmd($cmdsw) "" set rname($cmdsw) [lindex $spec 1] set rclass($cmdsw) [lindex $spec 2] set def($cmdsw) [lindex $spec 3] set verproc($cmdsw) [lindex $spec 4] } if {[expr [llength $argList] %2] != 0} { foreach {cmdsw value} $argList { if ![info exists cmd($cmdsw)] { error "unknown option \"$cmdsw\", must be [tclListValidFlags cmd]" } } error "value for \"[lindex $argList end]\" missing" } # 2: set the default values # foreach cmdsw [array names cmd] { set data($cmdsw) $def($cmdsw) } # 3: parse the argument list # foreach {cmdsw value} $argList { if ![info exists cmd($cmdsw)] { error "unknown option \"$cmdsw\", must be [tclListValidFlags cmd]" } set data($cmdsw) $value } # Done! } proc tclListValidFlags {v} { upvar $v cmd set len [llength [array names cmd]] set i 1 set separator "" set errormsg "" foreach cmdsw [lsort [array names cmd]] { append errormsg "$separator$cmdsw" incr i if {$i == $len} { set separator " or " } else { set separator ", " } } return $errormsg } # This procedure is used to sort strings in a case-insenstive mode. # proc tclSortNoCase {str1 str2} { return [string compare [string toupper $str1] [string toupper $str2]] } # Gives an error if the string does not contain a valid integer # number # proc tclVerifyInteger {string} { lindex {1 2 3} $string } #---------------------------------------------------------------------- # # Focus Group # # Focus groups are used to handle the user's focusing actions inside a # toplevel. # # One example of using focus groups is: when the user focuses on an # entry, the text in the entry is highlighted and the cursor is put to # the end of the text. When the user changes focus to another widget, # the text in the previously focused entry is validated. # #---------------------------------------------------------------------- # tkFocusGroup_Create -- # # Create a focus group. All the widgets in a focus group must be # within the same focus toplevel. Each toplevel can have only # one focus group, which is identified by the name of the # toplevel widget. # proc tkFocusGroup_Create {t} { global tkPriv if [string compare [winfo toplevel $t] $t] { error "$t is not a toplevel window" } if ![info exists tkPriv(fg,$t)] { set tkPriv(fg,$t) 1 set tkPriv(focus,$t) "" bind $t "tkFocusGroup_In $t %W %d" bind $t "tkFocusGroup_Out $t %W %d" bind $t "tkFocusGroup_Destroy $t %W" } } # tkFocusGroup_BindIn -- # # Add a widget into the "FocusIn" list of the focus group. The $cmd will be # called when the widget is focused on by the user. # proc tkFocusGroup_BindIn {t w cmd} { global tkFocusIn tkPriv if ![info exists tkPriv(fg,$t)] { error "focus group \"$t\" doesn't exist" } set tkFocusIn($t,$w) $cmd } # tkFocusGroup_BindOut -- # # Add a widget into the "FocusOut" list of the focus group. The # $cmd will be called when the widget loses the focus (User # types Tab or click on another widget). # proc tkFocusGroup_BindOut {t w cmd} { global tkFocusOut tkPriv if ![info exists tkPriv(fg,$t)] { error "focus group \"$t\" doesn't exist" } set tkFocusOut($t,$w) $cmd } # tkFocusGroup_Destroy -- # # Cleans up when members of the focus group is deleted, or when the # toplevel itself gets deleted. # proc tkFocusGroup_Destroy {t w} { global tkPriv tkFocusIn tkFocusOut if ![string compare $t $w] { unset tkPriv(fg,$t) unset tkPriv(focus,$t) foreach name [array names tkFocusIn $t,*] { unset tkFocusIn($name) } foreach name [array names tkFocusOut $t,*] { unset tkFocusOut($name) } } else { if [info exists tkPriv(focus,$t)] { if ![string compare $tkPriv(focus,$t) $w] { set tkPriv(focus,$t) "" } } catch { unset tkFocusIn($t,$w) } catch { unset tkFocusOut($t,$w) } } } # tkFocusGroup_In -- # # Handles the event. Calls the FocusIn command for the newly # focused widget in the focus group. # proc tkFocusGroup_In {t w detail} { global tkPriv tkFocusIn if ![info exists tkFocusIn($t,$w)] { set tkFocusIn($t,$w) "" return } if ![info exists tkPriv(focus,$t)] { return } if ![string compare $tkPriv(focus,$t) $w] { # This is already in focus # return } else { set tkPriv(focus,$t) $w eval $tkFocusIn($t,$w) } } # tkFocusGroup_Out -- # # Handles the event. Checks if this is really a lose # focus event, not one generated by the mouse moving out of the # toplevel window. Calls the FocusOut command for the widget # who loses its focus. # proc tkFocusGroup_Out {t w detail} { global tkPriv tkFocusOut if {[string compare $detail NotifyNonlinear] && [string compare $detail NotifyNonlinearVirtual]} { # This is caused by mouse moving out of the window return } if ![info exists tkPriv(focus,$t)] { return } if ![info exists tkFocusOut($t,$w)] { return } else { eval $tkFocusOut($t,$w) set tkPriv(focus,$t) "" } } # tkFDGetFileTypes -- # # Process the string given by the -filetypes option of the file # dialogs. Similar to the C function TkGetFileFilters() on the Mac # and Windows platform. # proc tkFDGetFileTypes {string} { foreach t $string { if {[llength $t] < 2 || [llength $t] > 3} { error "bad file type \"$t\", should be \"typeName {extension ?extensions ...?} ?{macType ?macTypes ...?}?\"" } eval lappend [list fileTypes([lindex $t 0])] [lindex $t 1] } set types {} foreach t $string { set label [lindex $t 0] set exts {} if [info exists hasDoneType($label)] { continue } set name "$label (" set sep "" foreach ext $fileTypes($label) { if ![string compare $ext ""] { continue } regsub {^[.]} $ext "*." ext if ![info exists hasGotExt($label,$ext)] { append name $sep$ext lappend exts $ext set hasGotExt($label,$ext) 1 } set sep , } append name ")" lappend types [list $name $exts] set hasDoneType($label) 1 } return $types } 070701000779b9000081a400004ccf0000000a0000000133f39e1f00002ebd00000020000000d700000000000000000000002800000004reloc/SUNWtcl/8.0/lib/tk8.0/console.tcl# console.tcl -- # # This code constructs the console window for an application. It # can be used by non-unix systems that do not have built-in support # for shells. # # SCCS: @(#) console.tcl 1.44 97/06/20 14:10:12 # # Copyright (c) 1995-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. # # TODO: history - remember partially written command # tkConsoleInit -- # This procedure constructs and configures the console windows. # # Arguments: # None. proc tkConsoleInit {} { global tcl_platform if {! [consoleinterp eval {set tcl_interactive}]} { wm withdraw . } if {"$tcl_platform(platform)" == "macintosh"} { set mod "Cmd" } else { set mod "Ctrl" } menu .menubar .menubar add cascade -label File -menu .menubar.file -underline 0 .menubar add cascade -label Edit -menu .menubar.edit -underline 0 menu .menubar.file -tearoff 0 .menubar.file add command -label "Source..." -underline 0 \ -command tkConsoleSource .menubar.file add command -label "Hide Console" -underline 0 \ -command {wm withdraw .} if {"$tcl_platform(platform)" == "macintosh"} { .menubar.file add command -label "Quit" -command exit -accel Cmd-Q } else { .menubar.file add command -label "Exit" -underline 1 -command exit } menu .menubar.edit -tearoff 0 .menubar.edit add command -label "Cut" -underline 2 \ -command { event generate .console <> } -accel "$mod+X" .menubar.edit add command -label "Copy" -underline 0 \ -command { event generate .console <> } -accel "$mod+C" .menubar.edit add command -label "Paste" -underline 1 \ -command { event generate .console <> } -accel "$mod+V" if {"$tcl_platform(platform)" == "windows"} { .menubar.edit add command -label "Delete" -underline 0 \ -command { event generate .console <> } -accel "Del" .menubar add cascade -label Help -menu .menubar.help -underline 0 menu .menubar.help -tearoff 0 .menubar.help add command -label "About..." -underline 0 \ -command tkConsoleAbout } else { .menubar.edit add command -label "Clear" -underline 2 \ -command { event generate .console <> } } . conf -menu .menubar text .console -yscrollcommand ".sb set" -setgrid true scrollbar .sb -command ".console yview" pack .sb -side right -fill both pack .console -fill both -expand 1 -side left if {$tcl_platform(platform) == "macintosh"} { .console configure -font {Monaco 9 normal} -highlightthickness 0 } tkConsoleBind .console .console tag configure stderr -foreground red .console tag configure stdin -foreground blue focus .console wm protocol . WM_DELETE_WINDOW { wm withdraw . } wm title . "Console" flush stdout .console mark set output [.console index "end - 1 char"] tkTextSetCursor .console end .console mark set promptEnd insert .console mark gravity promptEnd left } # tkConsoleSource -- # # Prompts the user for a file to source in the main interpreter. # # Arguments: # None. proc tkConsoleSource {} { set filename [tk_getOpenFile -defaultextension .tcl -parent . \ -title "Select a file to source" \ -filetypes {{"Tcl Scripts" .tcl} {"All Files" *}}] if {"$filename" != ""} { set cmd [list source $filename] if [catch {consoleinterp eval $cmd} result] { tkConsoleOutput stderr "$result\n" } } } # tkConsoleInvoke -- # Processes the command line input. If the command is complete it # is evaled in the main interpreter. Otherwise, the continuation # prompt is added and more input may be added. # # Arguments: # None. proc tkConsoleInvoke {args} { set ranges [.console tag ranges input] set cmd "" if {$ranges != ""} { set pos 0 while {[lindex $ranges $pos] != ""} { set start [lindex $ranges $pos] set end [lindex $ranges [incr pos]] append cmd [.console get $start $end] incr pos } } if {$cmd == ""} { tkConsolePrompt } elseif [info complete $cmd] { .console mark set output end .console tag delete input set result [consoleinterp record $cmd] if {$result != ""} { .console insert insert "$result\n" } tkConsoleHistory reset tkConsolePrompt } else { tkConsolePrompt partial } .console yview -pickplace insert } # tkConsoleHistory -- # This procedure implements command line history for the # console. In general is evals the history command in the # main interpreter to obtain the history. The global variable # histNum is used to store the current location in the history. # # Arguments: # cmd - Which action to take: prev, next, reset. set histNum 1 proc tkConsoleHistory {cmd} { global histNum switch $cmd { prev { incr histNum -1 if {$histNum == 0} { set cmd {history event [expr [history nextid] -1]} } else { set cmd "history event $histNum" } if {[catch {consoleinterp eval $cmd} cmd]} { incr histNum return } .console delete promptEnd end .console insert promptEnd $cmd {input stdin} } next { incr histNum if {$histNum == 0} { set cmd {history event [expr [history nextid] -1]} } elseif {$histNum > 0} { set cmd "" set histNum 1 } else { set cmd "history event $histNum" } if {$cmd != ""} { catch {consoleinterp eval $cmd} cmd } .console delete promptEnd end .console insert promptEnd $cmd {input stdin} } reset { set histNum 1 } } } # tkConsolePrompt -- # This procedure draws the prompt. If tcl_prompt1 or tcl_prompt2 # exists in the main interpreter it will be called to generate the # prompt. Otherwise, a hard coded default prompt is printed. # # Arguments: # partial - Flag to specify which prompt to print. proc tkConsolePrompt {{partial normal}} { if {$partial == "normal"} { set temp [.console index "end - 1 char"] .console mark set output end if [consoleinterp eval "info exists tcl_prompt1"] { consoleinterp eval "eval \[set tcl_prompt1\]" } else { puts -nonewline "% " } } else { set temp [.console index output] .console mark set output end if [consoleinterp eval "info exists tcl_prompt2"] { consoleinterp eval "eval \[set tcl_prompt2\]" } else { puts -nonewline "> " } } flush stdout .console mark set output $temp tkTextSetCursor .console end .console mark set promptEnd insert .console mark gravity promptEnd left } # tkConsoleBind -- # This procedure first ensures that the default bindings for the Text # class have been defined. Then certain bindings are overridden for # the class. # # Arguments: # None. proc tkConsoleBind {win} { bindtags $win "$win Text . all" # Ignore all Alt, Meta, and Control keypresses unless explicitly bound. # Otherwise, if a widget binding for one of these is defined, the # class binding will also fire and insert the character, # which is wrong. Ditto for . bind $win {# nothing } bind $win {# nothing} bind $win {# nothing} bind $win {# nothing} bind $win {# nothing} bind $win { tkConsoleInsert %W \t focus %W break } bind $win { %W mark set insert {end - 1c} tkConsoleInsert %W "\n" tkConsoleInvoke break } bind $win { if {[%W tag nextrange sel 1.0 end] != ""} { %W tag remove sel sel.first promptEnd } else { if [%W compare insert < promptEnd] { break } } } bind $win { if {[%W tag nextrange sel 1.0 end] != ""} { %W tag remove sel sel.first promptEnd } else { if [%W compare insert <= promptEnd] { break } } } foreach left {Control-a Home} { bind $win <$left> { if [%W compare insert < promptEnd] { tkTextSetCursor %W {insert linestart} } else { tkTextSetCursor %W promptEnd } break } } foreach right {Control-e End} { bind $win <$right> { tkTextSetCursor %W {insert lineend} break } } bind $win { if [%W compare insert < promptEnd] { break } } bind $win { if [%W compare insert < promptEnd] { %W mark set insert promptEnd } } bind $win { if [%W compare insert < promptEnd] { break } } bind $win { if [%W compare insert < promptEnd] { break } } bind $win { if [%W compare insert <= promptEnd] { break } } bind $win { if [%W compare insert <= promptEnd] { break } } foreach prev {Control-p Up} { bind $win <$prev> { tkConsoleHistory prev break } } foreach prev {Control-n Down} { bind $win <$prev> { tkConsoleHistory next break } } bind $win { catch {tkConsoleInsert %W [selection get -displayof %W]} break } bind $win { tkConsoleInsert %W %A break } foreach left {Control-b Left} { bind $win <$left> { if [%W compare insert == promptEnd] { break } tkTextSetCursor %W insert-1c break } } foreach right {Control-f Right} { bind $win <$right> { tkTextSetCursor %W insert+1c break } } bind $win { eval destroy [winfo child .] if {$tcl_platform(platform) == "macintosh"} { source -rsrc Console } else { source [file join $tk_library console.tcl] } } bind $win <> { continue } bind $win <> { if {[selection own -displayof %W] == "%W"} { clipboard clear -displayof %W catch { clipboard append -displayof %W [selection get -displayof %W] } } break } bind $win <> { catch { set clip [selection get -displayof %W -selection CLIPBOARD] set list [split $clip \n\r] tkConsoleInsert %W [lindex $list 0] foreach x [lrange $list 1 end] { %W mark set insert {end - 1c} tkConsoleInsert %W "\n" tkConsoleInvoke tkConsoleInsert %W $x } } break } } # tkConsoleInsert -- # Insert a string into a text at the point of the insertion cursor. # If there is a selection in the text, and it covers the point of the # insertion cursor, then delete the selection before inserting. Insertion # is restricted to the prompt area. # # Arguments: # w - The text window in which to insert the string # s - The string to insert (usually just a single character) proc tkConsoleInsert {w s} { if {$s == ""} { return } catch { if {[$w compare sel.first <= insert] && [$w compare sel.last >= insert]} { $w tag remove sel sel.first promptEnd $w delete sel.first sel.last } } if {[$w compare insert < promptEnd]} { $w mark set insert end } $w insert insert $s {input stdin} $w see insert } # tkConsoleOutput -- # # This routine is called directly by ConsolePutsCmd to cause a string # to be displayed in the console. # # Arguments: # dest - The output tag to be used: either "stderr" or "stdout". # string - The string to be displayed. proc tkConsoleOutput {dest string} { .console insert output $string $dest .console see insert } # tkConsoleExit -- # # This routine is called by ConsoleEventProc when the main window of # the application is destroyed. Don't call exit - that probably already # happened. Just delete our window. # # Arguments: # None. proc tkConsoleExit {} { destroy . } # tkConsoleAbout -- # # This routine displays an About box to show Tcl/Tk version info. # # Arguments: # None. proc tkConsoleAbout {} { global tk_patchLevel tk_messageBox -type ok -message "Tcl for Windows Copyright \251 1996 Sun Microsystems, Inc. Tcl [info patchlevel] Tk $tk_patchLevel" } # now initialize the console tkConsoleInit 070701000779ba000081a400004ccf0000000a0000000133f39e1f0000152600000020000000d700000000000000000000002700000004reloc/SUNWtcl/8.0/lib/tk8.0/dialog.tcl# dialog.tcl -- # # This file defines the procedure tk_dialog, which creates a dialog # box containing a bitmap, a message, and one or more buttons. # # SCCS: @(#) dialog.tcl 1.33 97/06/06 11:20:04 # # Copyright (c) 1992-1993 The Regents of the University of California. # Copyright (c) 1994-1997 Sun Microsystems, Inc. # # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # # # tk_dialog: # # This procedure displays a dialog box, waits for a button in the dialog # to be invoked, then returns the index of the selected button. If the # dialog somehow gets destroyed, -1 is returned. # # Arguments: # w - Window to use for dialog top-level. # title - Title to display in dialog's decorative frame. # text - Message to display in dialog. # bitmap - Bitmap to display in dialog (empty string means none). # default - Index of button that is to display the default ring # (-1 means none). # args - One or more strings to display in buttons across the # bottom of the dialog box. proc tk_dialog {w title text bitmap default args} { global tkPriv tcl_platform # 1. Create the top-level window and divide it into top # and bottom parts. catch {destroy $w} toplevel $w -class Dialog wm title $w $title wm iconname $w Dialog wm protocol $w WM_DELETE_WINDOW { } # The following command means that the dialog won't be posted if # [winfo parent $w] is iconified, but it's really needed; otherwise # 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 # 2. Fill the top part with bitmap and message (use the option # database for -wraplength so that it can be overridden by # the caller). option add *Dialog.msg.wrapLength 3i widgetDefault label $w.msg -justify left -text $text if {$tcl_platform(platform) == "macintosh"} { $w.msg configure -font system } else { $w.msg configure -font {Times 18} } pack $w.msg -in $w.top -side right -expand 1 -fill both -padx 3m -pady 3m if {$bitmap != ""} { if {($tcl_platform(platform) == "macintosh") && ($bitmap == "error")} { set bitmap "stop" } label $w.bitmap -bitmap $bitmap pack $w.bitmap -in $w.top -side left -padx 3m -pady 3m } # 3. Create a row of buttons at the bottom of the dialog. set i 0 foreach but $args { button $w.button$i -text $but -command "set tkPriv(button) $i" if {$i == $default} { $w.button$i configure -default active } 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 } # 4. Create a binding for on the dialog if there is a # default button. if {$default >= 0} { bind $w " $w.button$default configure -state active -relief sunken update idletasks after 100 set tkPriv(button) $default " } # 5. Create a binding for the window that sets the # button variable to -1; this is needed in case something happens # that destroys the window, such as its parent window being destroyed. bind $w {set tkPriv(button) -1} # 6. Withdraw the window, then update all the geometry information # so we know how big it wants to be, then center the window in the # display and de-iconify it. wm withdraw $w update idletasks set x [expr [winfo screenwidth $w]/2 - [winfo reqwidth $w]/2 \ - [winfo vrootx [winfo parent $w]]] set y [expr [winfo screenheight $w]/2 - [winfo reqheight $w]/2 \ - [winfo vrooty [winfo parent $w]]] wm geom $w +$x+$y wm deiconify $w # 7. Set a grab and claim the focus too. set oldFocus [focus] set oldGrab [grab current $w] if {$oldGrab != ""} { set grabStatus [grab status $oldGrab] } grab $w if {$default >= 0} { focus $w.button$default } else { focus $w } # 8. Wait for the user to respond, then restore the focus and # return the index of the selected button. Restore the focus # before deleting the window, since otherwise the window manager # may take the focus away so we can't redirect it. Finally, # restore any grab that was in effect. tkwait variable tkPriv(button) catch {focus $oldFocus} catch { # It's possible that the window has already been destroyed, # hence this "catch". Delete the Destroy handler so that # tkPriv(button) doesn't get reset by it. bind $w {} destroy $w } if {$oldGrab != ""} { if {$grabStatus == "global"} { grab -global $oldGrab } else { grab $oldGrab } } return $tkPriv(button) } 070701000779bb000081a400004ccf0000000a0000000133f39e1f00003ada00000020000000d700000000000000000000002600000004reloc/SUNWtcl/8.0/lib/tk8.0/entry.tcl# entry.tcl -- # # This file defines the default bindings for Tk entry widgets and provides # procedures that help in implementing those bindings. # # SCCS: @(#) entry.tcl 1.46 97/08/12 14:28:34 # # Copyright (c) 1992-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. # #------------------------------------------------------------------------- # Elements of tkPriv that are used in this file: # # afterId - If non-null, it means that auto-scanning is underway # and it gives the "after" id for the next auto-scan # command to be executed. # mouseMoved - Non-zero means the mouse has moved a significant # amount since the button went down (so, for example, # start dragging out a selection). # pressX - X-coordinate at which the mouse button was pressed. # selectMode - The style of selection currently underway: # char, word, or line. # x, y - Last known mouse coordinates for scanning # and auto-scanning. #------------------------------------------------------------------------- #------------------------------------------------------------------------- # The code below creates the default class bindings for entries. #------------------------------------------------------------------------- bind Entry <> { clipboard clear -displayof %W catch { clipboard append -displayof %W \ [string range [%W get] [%W index sel.first]\ [expr [%W index sel.last] - 1]] %W delete sel.first sel.last } } bind Entry <> { clipboard clear -displayof %W catch { clipboard append -displayof %W \ [string range [%W get] [%W index sel.first]\ [expr [%W index sel.last] - 1]] } } bind Entry <> { global tcl_platform catch { if {"$tcl_platform(platform)" != "unix"} { catch { %W delete sel.first sel.last } } %W insert insert [selection get -displayof %W -selection CLIPBOARD] tkEntrySeeInsert %W } } bind Entry <> { %W delete sel.first sel.last } # Standard Motif bindings: bind Entry <1> { tkEntryButton1 %W %x %W selection clear } bind Entry { set tkPriv(x) %x tkEntryMouseSelect %W %x } bind Entry { set tkPriv(selectMode) word tkEntryMouseSelect %W %x catch {%W icursor sel.first} } bind Entry { set tkPriv(selectMode) line tkEntryMouseSelect %W %x %W icursor 0 } bind Entry { set tkPriv(selectMode) char %W selection adjust @%x } bind Entry { set tkPriv(selectMode) word tkEntryMouseSelect %W %x } bind Entry { set tkPriv(selectMode) line tkEntryMouseSelect %W %x } bind Entry { set tkPriv(x) %x tkEntryAutoScan %W } bind Entry { tkCancelRepeat } bind Entry { tkCancelRepeat } bind Entry { %W icursor @%x } bind Entry { if {!$tkPriv(mouseMoved) || $tk_strictMotif} { tkEntryPaste %W %x } } bind Entry { tkEntrySetCursor %W [expr [%W index insert] - 1] } bind Entry { tkEntrySetCursor %W [expr [%W index insert] + 1] } bind Entry { tkEntryKeySelect %W [expr [%W index insert] - 1] tkEntrySeeInsert %W } bind Entry { tkEntryKeySelect %W [expr [%W index insert] + 1] tkEntrySeeInsert %W } bind Entry { tkEntrySetCursor %W [tkEntryPreviousWord %W insert] } bind Entry { tkEntrySetCursor %W [tkEntryNextWord %W insert] } bind Entry { tkEntryKeySelect %W [tkEntryPreviousWord %W insert] tkEntrySeeInsert %W } bind Entry { tkEntryKeySelect %W [tkEntryNextWord %W insert] tkEntrySeeInsert %W } bind Entry { tkEntrySetCursor %W 0 } bind Entry { tkEntryKeySelect %W 0 tkEntrySeeInsert %W } bind Entry { tkEntrySetCursor %W end } bind Entry { tkEntryKeySelect %W end tkEntrySeeInsert %W } bind Entry { if [%W selection present] { %W delete sel.first sel.last } else { %W delete insert } } bind Entry { tkEntryBackspace %W } bind Entry { %W selection from insert } bind Entry { tkListboxBeginSelect %W [%W index active] } bind Listbox { tkListboxBeginExtend %W [%W index active] } bind Listbox { tkListboxBeginExtend %W [%W index active] } bind Listbox { tkListboxCancel %W } bind Listbox { tkListboxSelectAll %W } bind Listbox { if {[%W cget -selectmode] != "browse"} { %W selection clear 0 end } } # Additional Tk bindings that aren't part of the Motif look and feel: bind Listbox <2> { %W scan mark %x %y } bind Listbox { %W scan dragto %x %y } # tkListboxBeginSelect -- # # This procedure is typically invoked on button-1 presses. It begins # the process of making a selection in the listbox. Its exact behavior # depends on the selection mode currently in effect for the listbox; # see the Motif documentation for details. # # Arguments: # w - The listbox widget. # el - The element for the selection operation (typically the # one under the pointer). Must be in numerical form. proc tkListboxBeginSelect {w el} { global tkPriv if {[$w cget -selectmode] == "multiple"} { if [$w selection includes $el] { $w selection clear $el } else { $w selection set $el } } else { $w selection clear 0 end $w selection set $el $w selection anchor $el set tkPriv(listboxSelection) {} set tkPriv(listboxPrev) $el } } # tkListboxMotion -- # # This procedure is called to process mouse motion events while # button 1 is down. It may move or extend the selection, depending # on the listbox's selection mode. # # Arguments: # w - The listbox widget. # el - The element under the pointer (must be a number). proc tkListboxMotion {w el} { global tkPriv if {$el == $tkPriv(listboxPrev)} { return } set anchor [$w index anchor] switch [$w cget -selectmode] { browse { $w selection clear 0 end $w selection set $el set tkPriv(listboxPrev) $el } extended { set i $tkPriv(listboxPrev) if [$w selection includes anchor] { $w selection clear $i $el $w selection set anchor $el } else { $w selection clear $i $el $w selection clear anchor $el } while {($i < $el) && ($i < $anchor)} { if {[lsearch $tkPriv(listboxSelection) $i] >= 0} { $w selection set $i } incr i } while {($i > $el) && ($i > $anchor)} { if {[lsearch $tkPriv(listboxSelection) $i] >= 0} { $w selection set $i } incr i -1 } set tkPriv(listboxPrev) $el } } } # tkListboxBeginExtend -- # # This procedure is typically invoked on shift-button-1 presses. It # begins the process of extending a selection in the listbox. Its # exact behavior depends on the selection mode currently in effect # for the listbox; see the Motif documentation for details. # # Arguments: # w - The listbox widget. # el - The element for the selection operation (typically the # one under the pointer). Must be in numerical form. proc tkListboxBeginExtend {w el} { if {[$w cget -selectmode] == "extended"} { if {[$w selection includes anchor]} { tkListboxMotion $w $el } else { # No selection yet; simulate the begin-select operation. tkListboxBeginSelect $w $el } } } # tkListboxBeginToggle -- # # This procedure is typically invoked on control-button-1 presses. It # begins the process of toggling a selection in the listbox. Its # exact behavior depends on the selection mode currently in effect # for the listbox; see the Motif documentation for details. # # Arguments: # w - The listbox widget. # el - The element for the selection operation (typically the # one under the pointer). Must be in numerical form. proc tkListboxBeginToggle {w el} { global tkPriv if {[$w cget -selectmode] == "extended"} { set tkPriv(listboxSelection) [$w curselection] set tkPriv(listboxPrev) $el $w selection anchor $el if [$w selection includes $el] { $w selection clear $el } else { $w selection set $el } } } # tkListboxAutoScan -- # This procedure is invoked when the mouse leaves an entry window # with button 1 down. It scrolls the window up, down, left, or # right, depending on where the mouse left the window, and reschedules # itself as an "after" command so that the window continues to scroll until # the mouse moves back into the window or the mouse button is released. # # Arguments: # w - The entry window. proc tkListboxAutoScan {w} { global tkPriv if {![winfo exists $w]} return set x $tkPriv(x) set y $tkPriv(y) if {$y >= [winfo height $w]} { $w yview scroll 1 units } elseif {$y < 0} { $w yview scroll -1 units } elseif {$x >= [winfo width $w]} { $w xview scroll 2 units } elseif {$x < 0} { $w xview scroll -2 units } else { return } tkListboxMotion $w [$w index @$x,$y] set tkPriv(afterId) [after 50 tkListboxAutoScan $w] } # tkListboxUpDown -- # # Moves the location cursor (active element) up or down by one element, # and changes the selection if we're in browse or extended selection # mode. # # Arguments: # w - The listbox widget. # amount - +1 to move down one item, -1 to move back one item. proc tkListboxUpDown {w amount} { global tkPriv $w activate [expr [$w index active] + $amount] $w see active switch [$w cget -selectmode] { browse { $w selection clear 0 end $w selection set active } extended { $w selection clear 0 end $w selection set active $w selection anchor active set tkPriv(listboxPrev) [$w index active] set tkPriv(listboxSelection) {} } } } # tkListboxExtendUpDown -- # # Does nothing unless we're in extended selection mode; in this # case it moves the location cursor (active element) up or down by # one element, and extends the selection to that point. # # Arguments: # w - The listbox widget. # amount - +1 to move down one item, -1 to move back one item. proc tkListboxExtendUpDown {w amount} { if {[$w cget -selectmode] != "extended"} { return } $w activate [expr [$w index active] + $amount] $w see active tkListboxMotion $w [$w index active] } # tkListboxDataExtend # # This procedure is called for key-presses such as Shift-KEndData. # If the selection mode isn't multiple or extend then it does nothing. # Otherwise it moves the active element to el and, if we're in # extended mode, extends the selection to that point. # # Arguments: # w - The listbox widget. # el - An integer element number. proc tkListboxDataExtend {w el} { set mode [$w cget -selectmode] if {$mode == "extended"} { $w activate $el $w see $el if [$w selection includes anchor] { tkListboxMotion $w $el } } elseif {$mode == "multiple"} { $w activate $el $w see $el } } # tkListboxCancel # # This procedure is invoked to cancel an extended selection in # progress. If there is an extended selection in progress, it # restores all of the items between the active one and the anchor # to their previous selection state. # # Arguments: # w - The listbox widget. proc tkListboxCancel w { global tkPriv if {[$w cget -selectmode] != "extended"} { return } set first [$w index anchor] set last $tkPriv(listboxPrev) if {$first > $last} { set tmp $first set first $last set last $tmp } $w selection clear $first $last while {$first <= $last} { if {[lsearch $tkPriv(listboxSelection) $first] >= 0} { $w selection set $first } incr first } } # tkListboxSelectAll # # This procedure is invoked to handle the "select all" operation. # For single and browse mode, it just selects the active element. # Otherwise it selects everything in the widget. # # Arguments: # w - The listbox widget. proc tkListboxSelectAll w { set mode [$w cget -selectmode] if {($mode == "single") || ($mode == "browse")} { $w selection clear 0 end $w selection set active } else { $w selection set 0 end } } 070701000779be000081a400004ccf0000000a0000000133f39e2000007f7100000020000000d700000000000000000000002500000004reloc/SUNWtcl/8.0/lib/tk8.0/menu.tcl# menu.tcl -- # # This file defines the default bindings for Tk menus and menubuttons. # It also implements keyboard traversal of menus and implements a few # other utility procedures related to menus. # # SCCS: @(#) menu.tcl 1.97 97/08/13 10:58:34 # # Copyright (c) 1992-1994 The Regents of the University of California. # Copyright (c) 1994-1997 Sun Microsystems, Inc. # # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # #------------------------------------------------------------------------- # Elements of tkPriv that are used in this file: # # cursor - Saves the -cursor option for the posted menubutton. # focus - Saves the focus during a menu selection operation. # Focus gets restored here when the menu is unposted. # grabGlobal - Used in conjunction with tkPriv(oldGrab): if # tkPriv(oldGrab) is non-empty, then tkPriv(grabGlobal) # contains either an empty string or "-global" to # indicate whether the old grab was a local one or # a global one. # inMenubutton - The name of the menubutton widget containing # the mouse, or an empty string if the mouse is # not over any menubutton. # menuBar - The name of the menubar that is the root # of the cascade hierarchy which is currently # posted. This is null when there is no menu currently # being pulled down from a menu bar. # oldGrab - Window that had the grab before a menu was posted. # Used to restore the grab state after the menu # is unposted. Empty string means there was no # grab previously set. # popup - If a menu has been popped up via tk_popup, this # gives the name of the menu. Otherwise this # value is empty. # postedMb - Name of the menubutton whose menu is currently # posted, or an empty string if nothing is posted # A grab is set on this widget. # relief - Used to save the original relief of the current # menubutton. # window - When the mouse is over a menu, this holds the # name of the menu; it's cleared when the mouse # leaves the menu. # tearoff - Whether the last menu posted was a tearoff or not. # This is true always for unix, for tearoffs for Mac # and Windows. #------------------------------------------------------------------------- #------------------------------------------------------------------------- # Overall note: # This file is tricky because there are four different ways that menus # can be used: # # 1. As a pulldown from a menubutton. This is the most common usage. # In this style, the variable tkPriv(postedMb) identifies the posted # menubutton. # 2. As a torn-off menu copied from some other menu. In this style # tkPriv(postedMb) is empty, and the top-level menu is no # override-redirect. # 3. As an option menu, triggered from an option menubutton. In thi # style tkPriv(postedMb) identifies the posted menubutton. # 4. As a popup menu. In this style tkPriv(postedMb) is empty and # the top-level menu is override-redirect. # # The various binding procedures use the state described above to # distinguish the various cases and take different actions in each # case. #------------------------------------------------------------------------- #------------------------------------------------------------------------- # The code below creates the default class bindings for menus # and menubuttons. #------------------------------------------------------------------------- bind Menubutton {} bind Menubutton { tkMbEnter %W } bind Menubutton { tkMbLeave %W } bind Menubutton <1> { if {$tkPriv(inMenubutton) != ""} { tkMbPost $tkPriv(inMenubutton) %X %Y } } bind Menubutton { tkMbMotion %W up %X %Y } bind Menubutton { tkMbMotion %W down %X %Y } bind Menubutton { tkMbButtonUp %W } bind Menubutton { tkMbPost %W tkMenuFirstEntry [%W cget -menu] } # Must set focus when mouse enters a menu, in order to allow # mixed-mode processing using both the mouse and the keyboard. # Don't set the focus if the event comes from a grab release, # though: such an event can happen after as part of unposting # a cascaded chain of menus, after the focus has already been # restored to wherever it was before menu selection started. bind Menu {} bind Menu { set tkPriv(window) %W if {[%W cget -type] == "tearoff"} { if {"%m" != "NotifyUngrab"} { if {$tcl_platform(platform) == "unix"} { tk_menuSetFocus %W } } } tkMenuMotion %W %x %y %s } bind Menu { tkMenuLeave %W %X %Y %s } bind Menu { tkMenuMotion %W %x %y %s } bind Menu { tkMenuButtonDown %W } bind Menu { tkMenuInvoke %W 1 } bind Menu { tkMenuInvoke %W 0 } bind Menu { tkMenuInvoke %W 0 } bind Menu { tkMenuEscape %W } bind Menu { tkMenuLeftArrow %W } bind Menu { tkMenuRightArrow %W } bind Menu { tkMenuUpArrow %W } bind Menu { tkMenuDownArrow %W } bind Menu { tkTraverseWithinMenu %W %A } # The following bindings apply to all windows, and are used to # implement keyboard menu traversal. if {$tcl_platform(platform) == "unix"} { bind all { tkTraverseToMenu %W %A } bind all { tkFirstMenu %W } } else { bind Menubutton { tkTraverseToMenu %W %A } bind Menubutton { tkFirstMenu %W } } # tkMbEnter -- # This procedure is invoked when the mouse enters a menubutton # widget. It activates the widget unless it is disabled. Note: # this procedure is only invoked when mouse button 1 is *not* down. # The procedure tkMbB1Enter is invoked if the button is down. # # Arguments: # w - The name of the widget. proc tkMbEnter w { global tkPriv if {$tkPriv(inMenubutton) != ""} { tkMbLeave $tkPriv(inMenubutton) } set tkPriv(inMenubutton) $w if {[$w cget -state] != "disabled"} { $w configure -state active } } # tkMbLeave -- # This procedure is invoked when the mouse leaves a menubutton widget. # It de-activates the widget, if the widget still exists. # # Arguments: # w - The name of the widget. proc tkMbLeave w { global tkPriv set tkPriv(inMenubutton) {} if ![winfo exists $w] { return } if {[$w cget -state] == "active"} { $w configure -state normal } } # tkMbPost -- # Given a menubutton, this procedure does all the work of posting # its associated menu and unposting any other menu that is currently # posted. # # Arguments: # w - The name of the menubutton widget whose menu # is to be posted. # x, y - Root coordinates of cursor, used for positioning # option menus. If not specified, then the center # of the menubutton is used for an option menu. proc tkMbPost {w {x {}} {y {}}} { global tkPriv errorInfo global tcl_platform if {([$w cget -state] == "disabled") || ($w == $tkPriv(postedMb))} { return } set menu [$w cget -menu] if {$menu == ""} { return } set tearoff [expr {($tcl_platform(platform) == "unix") \ || ([$menu cget -type] == "tearoff")}] if {[string first $w $menu] != 0} { error "can't post $menu: it isn't a descendant of $w (this is a new requirement in Tk versions 3.0 and later)" } set cur $tkPriv(postedMb) if {$cur != ""} { tkMenuUnpost {} } set tkPriv(cursor) [$w cget -cursor] set tkPriv(relief) [$w cget -relief] $w configure -cursor arrow $w configure -relief raised set tkPriv(postedMb) $w set tkPriv(focus) [focus] $menu activate none event generate $menu <> # If this looks like an option menubutton then post the menu so # that the current entry is on top of the mouse. Otherwise post # the menu just below the menubutton, as for a pull-down. update idletasks if [catch { switch [$w cget -direction] { above { set x [winfo rootx $w] set y [expr [winfo rooty $w] - [winfo reqheight $menu]] $menu post $x $y } below { set x [winfo rootx $w] set y [expr [winfo rooty $w] + [winfo height $w]] $menu post $x $y } left { set x [expr [winfo rootx $w] - [winfo reqwidth $menu]] set y [expr (2 * [winfo rooty $w] + [winfo height $w]) / 2] set entry [tkMenuFindName $menu [$w cget -text]] if [$w cget -indicatoron] { if {$entry == [$menu index last]} { incr y [expr -([$menu yposition $entry] \ + [winfo reqheight $menu])/2] } else { incr y [expr -([$menu yposition $entry] \ + [$menu yposition [expr $entry+1]])/2] } } $menu post $x $y if {($entry != {}) && ([$menu entrycget $entry -state] != "disabled")} { $menu activate $entry event generate $menu <> } } right { set x [expr [winfo rootx $w] + [winfo width $w]] set y [expr (2 * [winfo rooty $w] + [winfo height $w]) / 2] set entry [tkMenuFindName $menu [$w cget -text]] if [$w cget -indicatoron] { if {$entry == [$menu index last]} { incr y [expr -([$menu yposition $entry] \ + [winfo reqheight $menu])/2] } else { incr y [expr -([$menu yposition $entry] \ + [$menu yposition [expr $entry+1]])/2] } } $menu post $x $y if {($entry != {}) && ([$menu entrycget $entry -state] != "disabled")} { $menu activate $entry event generate $menu <> } } default { if [$w cget -indicatoron] { if {$y == ""} { set x [expr [winfo rootx $w] + [winfo width $w]/2] set y [expr [winfo rooty $w] + [winfo height $w]/2] } tkPostOverPoint $menu $x $y [tkMenuFindName $menu [$w cget -text]] } else { $menu post [winfo rootx $w] [expr [winfo rooty $w]+[winfo height $w]] } } } } msg] { # Error posting menu (e.g. bogus -postcommand). Unpost it and # reflect the error. set savedInfo $errorInfo tkMenuUnpost {} error $msg $savedInfo } set tkPriv(tearoff) $tearoff if {$tearoff != 0} { focus $menu tkSaveGrabInfo $w grab -global $w } } # tkMenuUnpost -- # This procedure unposts a given menu, plus all of its ancestors up # to (and including) a menubutton, if any. It also restores various # values to what they were before the menu was posted, and releases # a grab if there's a menubutton involved. Special notes: # 1. It's important to unpost all menus before releasing the grab, so # that any Enter-Leave events (e.g. from menu back to main # application) have mode NotifyGrab. # 2. Be sure to enclose various groups of commands in "catch" so that # the procedure will complete even if the menubutton or the menu # or the grab window has been deleted. # # Arguments: # menu - Name of a menu to unpost. Ignored if there # is a posted menubutton. proc tkMenuUnpost menu { global tcl_platform global tkPriv set mb $tkPriv(postedMb) # Restore focus right away (otherwise X will take focus away when # the menu is unmapped and under some window managers (e.g. olvwm) # we'll lose the focus completely). catch {focus $tkPriv(focus)} set tkPriv(focus) "" # Unpost menu(s) and restore some stuff that's dependent on # what was posted. catch { if {$mb != ""} { set menu [$mb cget -menu] $menu unpost set tkPriv(postedMb) {} $mb configure -cursor $tkPriv(cursor) $mb configure -relief $tkPriv(relief) } elseif {$tkPriv(popup) != ""} { $tkPriv(popup) unpost set tkPriv(popup) {} } elseif {(!([$menu cget -type] == "menubar") && !([$menu cget -type] == "tearoff")) || [wm overrideredirect $menu]} { # We're in a cascaded sub-menu from a torn-off menu or popup. # Unpost all the menus up to the toplevel one (but not # including the top-level torn-off one) and deactivate the # top-level torn off menu if there is one. while 1 { set parent [winfo parent $menu] if {([winfo class $parent] != "Menu") || ![winfo ismapped $parent]} { break } $parent activate none $parent postcascade none event generate $parent <> if {([$parent cget -type] == "menubar") || ![wm overrideredirect $parent]} { break } set menu $parent } if {[$menu cget -type] != "menubar"} { $menu unpost } } } if {($tkPriv(tearoff) != 0) || ($tkPriv(menuBar) != "")} { # Release grab, if any, and restore the previous grab, if there # was one. if {$menu != ""} { set grab [grab current $menu] if {$grab != ""} { grab release $grab } } tkRestoreOldGrab if {$tkPriv(menuBar) != ""} { $tkPriv(menuBar) configure -cursor $tkPriv(cursor) set tkPriv(menuBar) {} } if {$tcl_platform(platform) != "unix"} { set tkPriv(tearoff) 0 } } } # tkMbMotion -- # This procedure handles mouse motion events inside menubuttons, and # also outside menubuttons when a menubutton has a grab (e.g. when a # menu selection operation is in progress). # # Arguments: # w - The name of the menubutton widget. # upDown - "down" means button 1 is pressed, "up" means # it isn't. # rootx, rooty - Coordinates of mouse, in (virtual?) root window. proc tkMbMotion {w upDown rootx rooty} { global tkPriv if {$tkPriv(inMenubutton) == $w} { return } set new [winfo containing $rootx $rooty] if {($new != $tkPriv(inMenubutton)) && (($new == "") || ([winfo toplevel $new] == [winfo toplevel $w]))} { if {$tkPriv(inMenubutton) != ""} { tkMbLeave $tkPriv(inMenubutton) } if {($new != "") && ([winfo class $new] == "Menubutton") && ([$new cget -indicatoron] == 0) && ([$w cget -indicatoron] == 0)} { if {$upDown == "down"} { tkMbPost $new $rootx $rooty } else { tkMbEnter $new } } } } # tkMbButtonUp -- # This procedure is invoked to handle button 1 releases for menubuttons. # If the release happens inside the menubutton then leave its menu # posted with element 0 activated. Otherwise, unpost the menu. # # Arguments: # w - The name of the menubutton widget. proc tkMbButtonUp w { global tkPriv global tcl_platform set tearoff [expr {($tcl_platform(platform) == "unix") \ || ([[$w cget -menu] cget -type] == "tearoff")}] if {($tearoff != 0) && ($tkPriv(postedMb) == $w) && ($tkPriv(inMenubutton) == $w)} { tkMenuFirstEntry [$tkPriv(postedMb) cget -menu] } else { tkMenuUnpost {} } } # tkMenuMotion -- # This procedure is called to handle mouse motion events for menus. # It does two things. First, it resets the active element in the # menu, if the mouse is over the menu. Second, if a mouse button # is down, it posts and unposts cascade entries to match the mouse # position. # # Arguments: # menu - The menu window. # x - The x position of the mouse. # y - The y position of the mouse. # state - Modifier state (tells whether buttons are down). proc tkMenuMotion {menu x y state} { global tkPriv if {$menu == $tkPriv(window)} { if {[$menu cget -type] == "menubar"} { if {[info exists tkPriv(focus)] && \ ([string compare $menu $tkPriv(focus)] != 0)} { $menu activate @$x,$y event generate $menu <> } } else { $menu activate @$x,$y event generate $menu <> } } if {($state & 0x1f00) != 0} { $menu postcascade active } } # tkMenuButtonDown -- # Handles button presses in menus. There are a couple of tricky things # here: # 1. Change the posted cascade entry (if any) to match the mouse position. # 2. If there is a posted menubutton, must grab to the menubutton; this # overrrides the implicit grab on button press, so that the menu # button can track mouse motions over other menubuttons and change # the posted menu. # 3. If there's no posted menubutton (e.g. because we're a torn-off menu # or one of its descendants) must grab to the top-level menu so that # we can track mouse motions across the entire menu hierarchy. # # Arguments: # menu - The menu window. proc tkMenuButtonDown menu { global tkPriv global tcl_platform $menu postcascade active if {$tkPriv(postedMb) != ""} { grab -global $tkPriv(postedMb) } else { while {(([$menu cget -type] != "menubar") && [wm overrideredirect $menu]) && ([winfo class [winfo parent $menu]] == "Menu") && [winfo ismapped [winfo parent $menu]]} { set menu [winfo parent $menu] } if {$tkPriv(menuBar) == {}} { set tkPriv(menuBar) $menu set tkPriv(cursor) [$menu cget -cursor] $menu configure -cursor arrow } # Don't update grab information if the grab window isn't changing. # Otherwise, we'll get an error when we unpost the menus and # restore the grab, since the old grab window will not be viewable # anymore. if {$menu != [grab current $menu]} { tkSaveGrabInfo $menu } # Must re-grab even if the grab window hasn't changed, in order # to release the implicit grab from the button press. if {$tcl_platform(platform) == "unix"} { grab -global $menu } } } # tkMenuLeave -- # This procedure is invoked to handle Leave events for a menu. It # deactivates everything unless the active element is a cascade element # and the mouse is now over the submenu. # # Arguments: # menu - The menu window. # rootx, rooty - Root coordinates of mouse. # state - Modifier state. proc tkMenuLeave {menu rootx rooty state} { global tkPriv set tkPriv(window) {} if {[$menu index active] == "none"} { return } if {([$menu type active] == "cascade") && ([winfo containing $rootx $rooty] == [$menu entrycget active -menu])} { return } $menu activate none event generate $menu <> } # tkMenuInvoke -- # This procedure is invoked when button 1 is released over a menu. # It invokes the appropriate menu action and unposts the menu if # it came from a menubutton. # # Arguments: # w - Name of the menu widget. # buttonRelease - 1 means this procedure is called because of # a button release; 0 means because of keystroke. proc tkMenuInvoke {w buttonRelease} { global tkPriv if {$buttonRelease && ($tkPriv(window) == "")} { # Mouse was pressed over a menu without a menu button, then # dragged off the menu (possibly with a cascade posted) and # released. Unpost everything and quit. $w postcascade none $w activate none event generate $w <> tkMenuUnpost $w return } if {[$w type active] == "cascade"} { $w postcascade active set menu [$w entrycget active -menu] tkMenuFirstEntry $menu } elseif {[$w type active] == "tearoff"} { tkMenuUnpost $w tkTearOffMenu $w } elseif {[$w cget -type] == "menubar"} { $w postcascade none $w activate none event generate $w <> tkMenuUnpost $w } else { tkMenuUnpost $w uplevel #0 [list $w invoke active] } } # tkMenuEscape -- # This procedure is invoked for the Cancel (or Escape) key. It unposts # the given menu and, if it is the top-level menu for a menu button, # unposts the menu button as well. # # Arguments: # menu - Name of the menu window. proc tkMenuEscape menu { set parent [winfo parent $menu] if {([winfo class $parent] != "Menu")} { tkMenuUnpost $menu } elseif {([$parent cget -type] == "menubar")} { tkMenuUnpost $menu tkRestoreOldGrab } else { tkMenuNextMenu $menu left } } # The following routines handle arrow keys. Arrow keys behave # differently depending on whether the menu is a menu bar or not. proc tkMenuUpArrow {menu} { if {[$menu cget -type] == "menubar"} { tkMenuNextMenu $menu left } else { tkMenuNextEntry $menu -1 } } proc tkMenuDownArrow {menu} { if {[$menu cget -type] == "menubar"} { tkMenuNextMenu $menu right } else { tkMenuNextEntry $menu 1 } } proc tkMenuLeftArrow {menu} { if {[$menu cget -type] == "menubar"} { tkMenuNextEntry $menu -1 } else { tkMenuNextMenu $menu left } } proc tkMenuRightArrow {menu} { if {[$menu cget -type] == "menubar"} { tkMenuNextEntry $menu 1 } else { tkMenuNextMenu $menu right } } # tkMenuNextMenu -- # This procedure is invoked to handle "left" and "right" traversal # motions in menus. It traverses to the next menu in a menu bar, # or into or out of a cascaded menu. # # Arguments: # menu - The menu that received the keyboard # event. # direction - Direction in which to move: "left" or "right" proc tkMenuNextMenu {menu direction} { global tkPriv # First handle traversals into and out of cascaded menus. if {$direction == "right"} { set count 1 set parent [winfo parent $menu] set class [winfo class $parent] if {[$menu type active] == "cascade"} { $menu postcascade active set m2 [$menu entrycget active -menu] if {$m2 != ""} { tkMenuFirstEntry $m2 } return } else { set parent [winfo parent $menu] while {($parent != ".")} { if {([winfo class $parent] == "Menu") && ([$parent cget -type] == "menubar")} { tk_menuSetFocus $parent tkMenuNextEntry $parent 1 return } set parent [winfo parent $parent] } } } else { set count -1 set m2 [winfo parent $menu] if {[winfo class $m2] == "Menu"} { $menu activate none event generate $menu <> tk_menuSetFocus $m2 # This code unposts any posted submenu in the parent. set tmp [$m2 index active] $m2 activate none $m2 activate $tmp return } } # Can't traverse into or out of a cascaded menu. Go to the next # or previous menubutton, if that makes sense. set w $tkPriv(postedMb) if {$w == ""} { return } set buttons [winfo children [winfo parent $w]] set length [llength $buttons] set i [expr [lsearch -exact $buttons $w] + $count] while 1 { while {$i < 0} { incr i $length } while {$i >= $length} { incr i -$length } set mb [lindex $buttons $i] if {([winfo class $mb] == "Menubutton") && ([$mb cget -state] != "disabled") && ([$mb cget -menu] != "") && ([[$mb cget -menu] index last] != "none")} { break } if {$mb == $w} { return } incr i $count } tkMbPost $mb tkMenuFirstEntry [$mb cget -menu] } # tkMenuNextEntry -- # Activate the next higher or lower entry in the posted menu, # wrapping around at the ends. Disabled entries are skipped. # # Arguments: # menu - Menu window that received the keystroke. # count - 1 means go to the next lower entry, # -1 means go to the next higher entry. proc tkMenuNextEntry {menu count} { global tkPriv if {[$menu index last] == "none"} { return } set length [expr [$menu index last]+1] set quitAfter $length set active [$menu index active] if {$active == "none"} { set i 0 } else { set i [expr $active + $count] } while 1 { if {$quitAfter <= 0} { # We've tried every entry in the menu. Either there are # none, or they're all disabled. Just give up. return } while {$i < 0} { incr i $length } while {$i >= $length} { incr i -$length } if {[catch {$menu entrycget $i -state} state] == 0} { if {$state != "disabled"} { break } } if {$i == $active} { return } incr i $count incr quitAfter -1 } $menu activate $i event generate $menu <> $menu postcascade $i } # tkMenuFind -- # This procedure searches the entire window hierarchy under w for # a menubutton that isn't disabled and whose underlined character # is "char" or an entry in a menubar that isn't disabled and whose # underlined character is "char". # It returns the name of that window, if found, or an # empty string if no matching window was found. If "char" is an # empty string then the procedure returns the name of the first # menubutton found that isn't disabled. # # Arguments: # w - Name of window where key was typed. # char - Underlined character to search for; # may be either upper or lower case, and # will match either upper or lower case. proc tkMenuFind {w char} { global tkPriv set char [string tolower $char] set windowlist [winfo child $w] foreach child $windowlist { switch [winfo class $child] { Menu { if {[$child cget -type] == "menubar"} { if {$char == ""} { return $child } set last [$child index last] for {set i [$child cget -tearoff]} {$i <= $last} {incr i} { set char2 [string index [$child entrycget $i -label] \ [$child entrycget $i -underline]] if {([string compare $char [string tolower $char2]] \ == 0) || ($char == "")} { if {[$child entrycget $i -state] != "disabled"} { return $child } } } } } } } foreach child $windowlist { switch [winfo class $child] { Menubutton { set char2 [string index [$child cget -text] \ [$child cget -underline]] if {([string compare $char [string tolower $char2]] == 0) || ($char == "")} { if {[$child cget -state] != "disabled"} { return $child } } } default { set match [tkMenuFind $child $char] if {$match != ""} { return $match } } } } return {} } # tkTraverseToMenu -- # This procedure implements keyboard traversal of menus. Given an # ASCII character "char", it looks for a menubutton with that character # underlined. If one is found, it posts the menubutton's menu # # Arguments: # w - Window in which the key was typed (selects # a toplevel window). # char - Character that selects a menu. The case # is ignored. If an empty string, nothing # happens. proc tkTraverseToMenu {w char} { global tkPriv if {$char == ""} { return } while {[winfo class $w] == "Menu"} { if {([$w cget -type] != "menubar") && ($tkPriv(postedMb) == "")} { return } if {[$w cget -type] == "menubar"} { break } set w [winfo parent $w] } set w [tkMenuFind [winfo toplevel $w] $char] if {$w != ""} { if {[winfo class $w] == "Menu"} { tk_menuSetFocus $w set tkPriv(window) $w tkSaveGrabInfo $w grab -global $w tkTraverseWithinMenu $w $char } else { tkMbPost $w tkMenuFirstEntry [$w cget -menu] } } } # tkFirstMenu -- # This procedure traverses to the first menubutton in the toplevel # for a given window, and posts that menubutton's menu. # # Arguments: # w - Name of a window. Selects which toplevel # to search for menubuttons. proc tkFirstMenu w { set w [tkMenuFind [winfo toplevel $w] ""] if {$w != ""} { if {[winfo class $w] == "Menu"} { tk_menuSetFocus $w set tkPriv(window) $w tkSaveGrabInfo $w grab -global $w tkMenuFirstEntry $w } else { tkMbPost $w tkMenuFirstEntry [$w cget -menu] } } } # tkTraverseWithinMenu # This procedure implements keyboard traversal within a menu. It # searches for an entry in the menu that has "char" underlined. If # such an entry is found, it is invoked and the menu is unposted. # # Arguments: # w - The name of the menu widget. # char - The character to look for; case is # ignored. If the string is empty then # nothing happens. proc tkTraverseWithinMenu {w char} { if {$char == ""} { return } set char [string tolower $char] set last [$w index last] if {$last == "none"} { return } for {set i 0} {$i <= $last} {incr i} { if [catch {set char2 [string index \ [$w entrycget $i -label] \ [$w entrycget $i -underline]]}] { continue } if {[string compare $char [string tolower $char2]] == 0} { if {[$w type $i] == "cascade"} { $w activate $i $w postcascade active event generate $w <> set m2 [$w entrycget $i -menu] if {$m2 != ""} { tkMenuFirstEntry $m2 } } else { tkMenuUnpost $w uplevel #0 [list $w invoke $i] } return } } } # tkMenuFirstEntry -- # Given a menu, this procedure finds the first entry that isn't # disabled or a tear-off or separator, and activates that entry. # However, if there is already an active entry in the menu (e.g., # because of a previous call to tkPostOverPoint) then the active # entry isn't changed. This procedure also sets the input focus # to the menu. # # Arguments: # menu - Name of the menu window (possibly empty). proc tkMenuFirstEntry menu { if {$menu == ""} { return } tk_menuSetFocus $menu if {[$menu index active] != "none"} { return } set last [$menu index last] if {$last == "none"} { return } for {set i 0} {$i <= $last} {incr i} { if {([catch {set state [$menu entrycget $i -state]}] == 0) && ($state != "disabled") && ([$menu type $i] != "tearoff")} { $menu activate $i event generate $menu <> return } } } # tkMenuFindName -- # Given a menu and a text string, return the index of the menu entry # that displays the string as its label. If there is no such entry, # return an empty string. This procedure is tricky because some names # like "active" have a special meaning in menu commands, so we can't # always use the "index" widget command. # # Arguments: # menu - Name of the menu widget. # s - String to look for. proc tkMenuFindName {menu s} { set i "" if {![regexp {^active$|^last$|^none$|^[0-9]|^@} $s]} { catch {set i [$menu index $s]} return $i } set last [$menu index last] if {$last == "none"} { return } for {set i 0} {$i <= $last} {incr i} { if ![catch {$menu entrycget $i -label} label] { if {$label == $s} { return $i } } } return "" } # tkPostOverPoint -- # This procedure posts a given menu such that a given entry in the # menu is centered over a given point in the root window. It also # activates the given entry. # # Arguments: # menu - Menu to post. # x, y - Root coordinates of point. # entry - Index of entry within menu to center over (x,y). # If omitted or specified as {}, then the menu's # upper-left corner goes at (x,y). proc tkPostOverPoint {menu x y {entry {}}} { global tcl_platform if {$entry != {}} { if {$entry == [$menu index last]} { incr y [expr -([$menu yposition $entry] \ + [winfo reqheight $menu])/2] } else { incr y [expr -([$menu yposition $entry] \ + [$menu yposition [expr $entry+1]])/2] } incr x [expr -[winfo reqwidth $menu]/2] } $menu post $x $y if {($entry != {}) && ([$menu entrycget $entry -state] != "disabled")} { $menu activate $entry event generate $menu <> } } # tkSaveGrabInfo -- # Sets the variables tkPriv(oldGrab) and tkPriv(grabStatus) to record # the state of any existing grab on the w's display. # # Arguments: # w - Name of a window; used to select the display # whose grab information is to be recorded. proc tkSaveGrabInfo w { global tkPriv set tkPriv(oldGrab) [grab current $w] if {$tkPriv(oldGrab) != ""} { set tkPriv(grabStatus) [grab status $tkPriv(oldGrab)] } } # tkRestoreOldGrab -- # Restores the grab to what it was before TkSaveGrabInfo was called. # proc tkRestoreOldGrab {} { global tkPriv if {$tkPriv(oldGrab) != ""} { # Be careful restoring the old grab, since it's window may not # be visible anymore. catch { if {$tkPriv(grabStatus) == "global"} { grab set -global $tkPriv(oldGrab) } else { grab set $tkPriv(oldGrab) } } set tkPriv(oldGrab) "" } } proc tk_menuSetFocus {menu} { global tkPriv if {![info exists tkPriv(focus)] || [string length $tkPriv(focus)] == 0} { set tkPriv(focus) [focus] } focus $menu } # tk_popup -- # This procedure pops up a menu and sets things up for traversing # the menu and its submenus. # # Arguments: # menu - Name of the menu to be popped up. # x, y - Root coordinates at which to pop up the # menu. # entry - Index of a menu entry to center over (x,y). # If omitted or specified as {}, then menu's # upper-left corner goes at (x,y). proc tk_popup {menu x y {entry {}}} { global tkPriv global tcl_platform if {($tkPriv(popup) != "") || ($tkPriv(postedMb) != "")} { tkMenuUnpost {} } tkPostOverPoint $menu $x $y $entry if {$tcl_platform(platform) == "unix"} { tkSaveGrabInfo $menu grab -global $menu set tkPriv(popup) $menu tk_menuSetFocus($menu); } } 070701000779bf000081a400004ccf0000000a0000000133f39e2100001b2200000020000000d700000000000000000000002700000004reloc/SUNWtcl/8.0/lib/tk8.0/msgbox.tcl# msgbox.tcl -- # # Implements messageboxes for platforms that do not have native # messagebox support. # # SCCS: @(#) msgbox.tcl 1.8 97/07/28 17:20:01 # # Copyright (c) 1994-1997 Sun Microsystems, Inc. # # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # # tkMessageBox -- # # Pops up a messagebox with an application-supplied message with # an icon and a list of buttons. This procedure will be called # by tk_messageBox if the platform does not have native # messagebox support, or if the particular type of messagebox is # not supported natively. # # This procedure is a private procedure shouldn't be called # directly. Call tk_messageBox instead. # # See the user documentation for details on what tk_messageBox does. # proc tkMessageBox {args} { global tkPriv tcl_platform set w tkPrivMsgBox upvar #0 $w data # # The default value of the title is space (" ") not the empty string # because for some window managers, a # wm title .foo "" # causes the window title to be "foo" instead of the empty string. # set specs { {-default "" "" ""} {-icon "" "" "info"} {-message "" "" ""} {-parent "" "" .} {-title "" "" " "} {-type "" "" "ok"} } tclParseConfigSpec $w $specs "" $args 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)\"" } case $data(-type) { abortretryignore { set buttons { {abort -width 6 -text Abort -under 0} {retry -width 6 -text Retry -under 0} {ignore -width 6 -text Ignore -under 0} } } ok { set buttons { {ok -width 6 -text OK -under 0} } if {$data(-default) == ""} { set data(-default) "ok" } } okcancel { set buttons { {ok -width 6 -text OK -under 0} {cancel -width 6 -text Cancel -under 0} } } retrycancel { set buttons { {retry -width 6 -text Retry -under 0} {cancel -width 6 -text Cancel -under 0} } } yesno { set buttons { {yes -width 6 -text Yes -under 0} {no -width 6 -text No -under 0} } } yesnocancel { set buttons { {yes -width 6 -text Yes -under 0} {no -width 6 -text No -under 0} {cancel -width 6 -text Cancel -under 0} } } default { error "invalid message box type \"$data(-type)\", must be abortretryignore, ok, okcancel, retrycancel, yesno or yesnocancel" } } if [string compare $data(-default) ""] { set valid 0 foreach btn $buttons { if ![string compare [lindex $btn 0] $data(-default)] { set valid 1 break } } if !$valid { error "invalid default button \"$data(-default)\"" } } # 2. Set the dialog to be a child window of $parent # # if [string compare $data(-parent) .] { set w $data(-parent).__tk__messagebox } else { set w .__tk__messagebox } # 3. Create the top-level window and divide it into top # and bottom parts. catch {destroy $w} toplevel $w -class Dialog wm title $w $data(-title) 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 # the caller). option add *Dialog.msg.wrapLength 3i widgetDefault label $w.msg -justify left -text $data(-message) catch {$w.msg configure -font \ -Adobe-Times-Medium-R-Normal--*-180-*-*-*-*-*-* } pack $w.msg -in $w.top -side right -expand 1 -fill both -padx 3m -pady 3m if {$data(-icon) != ""} { label $w.bitmap -bitmap $data(-icon) pack $w.bitmap -in $w.top -side left -padx 3m -pady 3m } # 5. Create a row of buttons at the bottom of the dialog. set i 0 foreach but $buttons { set name [lindex $but 0] set opts [lrange $but 1 end] if ![string compare $opts {}] { # Capitalize the first letter of $name set capName \ [string toupper \ [string index $name 0]][string range $name 1 end] set opts [list -text $capName] } eval button $w.$name $opts -command [list "set tkPriv(button) $name"] if ![string compare $name $data(-default)] { $w.$name configure -default active } pack $w.$name -in $w.bot -side left -expand 1 \ -padx 3m -pady 2m # create the binding for the key accelerator, based on the underline # set underIdx [$w.$name cget -under] if {$underIdx >= 0} { set key [string index [$w.$name cget -text] $underIdx] bind $w "$w.$name invoke" bind $w "$w.$name invoke" } incr i } # 6. Create a binding for on the dialog if there is a # default button. if [string compare $data(-default) ""] { bind $w "tkButtonInvoke $w.$data(-default)" } # 7. Withdraw the window, then update all the geometry information # so we know how big it wants to be, then center the window in the # display and de-iconify it. wm withdraw $w update idletasks set x [expr [winfo screenwidth $w]/2 - [winfo reqwidth $w]/2 \ - [winfo vrootx [winfo parent $w]]] set y [expr [winfo screenheight $w]/2 - [winfo reqheight $w]/2 \ - [winfo vrooty [winfo parent $w]]] wm geom $w +$x+$y wm deiconify $w # 8. Set a grab and claim the focus too. set oldFocus [focus] set oldGrab [grab current $w] if {$oldGrab != ""} { set grabStatus [grab status $oldGrab] } grab $w if [string compare $data(-default) ""] { focus $w.$data(-default) } else { focus $w } # 9. Wait for the user to respond, then restore the focus and # return the index of the selected button. Restore the focus # before deleting the window, since otherwise the window manager # may take the focus away so we can't redirect it. Finally, # restore any grab that was in effect. tkwait variable tkPriv(button) catch {focus $oldFocus} destroy $w if {$oldGrab != ""} { if {$grabStatus == "global"} { grab -global $oldGrab } else { grab $oldGrab } } return $tkPriv(button) } 070701000779c0000081a400004ccf0000000a0000000133f39e210000030d00000020000000d700000000000000000000002900000004reloc/SUNWtcl/8.0/lib/tk8.0/obsolete.tcl# obsolete.tcl -- # # This file contains obsolete procedures that people really shouldn't # be using anymore, but which are kept around for backward compatibility. # # SCCS: @(#) obsolete.tcl 1.3 96/02/16 10:48:19 # # Copyright (c) 1994 The Regents of the University of California. # Copyright (c) 1994 Sun Microsystems, Inc. # # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # # The procedures below are here strictly for backward compatibility with # Tk version 3.6 and earlier. The procedures are no longer needed, so # they are no-ops. You should not use these procedures anymore, since # they may be removed in some future release. proc tk_menuBar args {} proc tk_bindForTraversal args {} 070701000779c1000081a400004ccf0000000a0000000133f39e210000064c00000020000000d700000000000000000000002800000004reloc/SUNWtcl/8.0/lib/tk8.0/optMenu.tcl# optMenu.tcl -- # # This file defines the procedure tk_optionMenu, which creates # an option button and its associated menu. # # SCCS: @(#) optMenu.tcl 1.10 96/12/11 16:02:12 # # Copyright (c) 1994 The Regents of the University of California. # Copyright (c) 1994 Sun Microsystems, Inc. # # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # # tk_optionMenu -- # This procedure creates an option button named $w and an associated # menu. Together they provide the functionality of Motif option menus: # they can be used to select one of many values, and the current value # appears in the global variable varName, as well as in the text of # the option menubutton. The name of the menu is returned as the # procedure's result, so that the caller can use it to change configuration # options on the menu or otherwise manipulate it. # # Arguments: # w - The name to use for the menubutton. # varName - Global variable to hold the currently selected value. # firstValue - First of legal values for option (must be >= 1). # args - Any number of additional values. proc tk_optionMenu {w varName firstValue args} { upvar #0 $varName var if ![info exists var] { set var $firstValue } menubutton $w -textvariable $varName -indicatoron 1 -menu $w.menu \ -relief raised -bd 2 -highlightthickness 2 -anchor c menu $w.menu -tearoff 0 $w.menu add radiobutton -label $firstValue -variable $varName foreach i $args { $w.menu add radiobutton -label $i -variable $varName } return $w.menu } 070701000779c2000081a400004ccf0000000a0000000133f39e2100001c7500000020000000d700000000000000000000002800000004reloc/SUNWtcl/8.0/lib/tk8.0/palette.tcl# palette.tcl -- # # This file contains procedures that change the color palette used # by Tk. # # SCCS: @(#) palette.tcl 1.11 97/06/23 20:35:44 # # Copyright (c) 1995-1997 Sun Microsystems, Inc. # # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # # tk_setPalette -- # Changes the default color scheme for a Tk application by setting # default colors in the option database and by modifying all of the # color options for existing widgets that have the default value. # # Arguments: # The arguments consist of either a single color name, which # will be used as the new background color (all other colors will # be computed from this) or an even number of values consisting of # option names and values. The name for an option is the one used # for the option database, such as activeForeground, not -activeforeground. proc tk_setPalette {args} { global tkPalette # Create an array that has the complete new palette. If some colors # aren't specified, compute them from other colors that are specified. if {[llength $args] == 1} { set new(background) [lindex $args 0] } else { array set new $args } if ![info exists new(background)] { error "must specify a background color" } if ![info exists new(foreground)] { set new(foreground) black } set bg [winfo rgb . $new(background)] set fg [winfo rgb . $new(foreground)] set darkerBg [format #%02x%02x%02x [expr (9*[lindex $bg 0])/2560] \ [expr (9*[lindex $bg 1])/2560] [expr (9*[lindex $bg 2])/2560]] foreach i {activeForeground insertBackground selectForeground \ highlightColor} { if ![info exists new($i)] { set new($i) $new(foreground) } } if ![info exists new(disabledForeground)] { set new(disabledForeground) [format #%02x%02x%02x \ [expr (3*[lindex $bg 0] + [lindex $fg 0])/1024] \ [expr (3*[lindex $bg 1] + [lindex $fg 1])/1024] \ [expr (3*[lindex $bg 2] + [lindex $fg 2])/1024]] } if ![info exists new(highlightBackground)] { set new(highlightBackground) $new(background) } if ![info exists new(activeBackground)] { # Pick a default active background that islighter than the # normal background. To do this, round each color component # up by 15% or 1/3 of the way to full white, whichever is # greater. foreach i {0 1 2} { set light($i) [expr [lindex $bg $i]/256] set inc1 [expr ($light($i)*15)/100] set inc2 [expr (255-$light($i))/3] if {$inc1 > $inc2} { incr light($i) $inc1 } else { incr light($i) $inc2 } if {$light($i) > 255} { set light($i) 255 } } set new(activeBackground) [format #%02x%02x%02x $light(0) \ $light(1) $light(2)] } if ![info exists new(selectBackground)] { set new(selectBackground) $darkerBg } if ![info exists new(troughColor)] { set new(troughColor) $darkerBg } if ![info exists new(selectColor)] { set new(selectColor) #b03060 } # let's make one of each of the widgets so we know what the # defaults are currently for this platform. toplevel .___tk_set_palette wm withdraw .___tk_set_palette foreach q {button canvas checkbutton entry frame label listbox menubutton menu message \ radiobutton scale scrollbar text} { $q .___tk_set_palette.$q } # Walk the widget hierarchy, recoloring all existing windows. # The option database must be set according to what we do here, # but it breaks things if we set things in the database while # we are changing colors...so, tkRecolorTree now returns the # option database changes that need to be made, and they # need to be evalled here to take effect. # We have to walk the whole widget tree instead of just # relying on the widgets we've created above to do the work # because different extensions may provide other kinds # of widgets that we don't currently know about, so we'll # walk the whole hierarchy just in case. eval [tkRecolorTree . new] catch {destroy .___tk_set_palette} # Change the option database so that future windows will get the # same colors. foreach option [array names new] { option add *$option $new($option) widgetDefault } # Save the options in the global variable tkPalette, for use the # next time we change the options. array set tkPalette [array get new] } # tkRecolorTree -- # This procedure changes the colors in a window and all of its # descendants, according to information provided by the colors # argument. This looks at the defaults provided by the option # database, if it exists, and if not, then it looks at the default # value of the widget itself. # # Arguments: # w - The name of a window. This window and all its # descendants are recolored. # colors - The name of an array variable in the caller, # which contains color information. Each element # is named after a widget configuration option, and # each value is the value for that option. proc tkRecolorTree {w colors} { global tkPalette upvar $colors c set result {} foreach dbOption [array names c] { set option -[string tolower $dbOption] if {![catch {$w config $option} value]} { # if the option database has a preference for this # dbOption, then use it, otherwise use the defaults # for the widget. set defaultcolor [option get $w $dbOption widgetDefault] if {[string match {} $defaultcolor]} { set defaultcolor [winfo rgb . [lindex $value 3]] } else { set defaultcolor [winfo rgb . $defaultcolor] } set chosencolor [winfo rgb . [lindex $value 4]] if {[string match $defaultcolor $chosencolor]} { # Change the option database so that future windows will get # the same colors. append result ";\noption add [list \ *[winfo class $w].$dbOption $c($dbOption) 60]" $w configure $option $c($dbOption) } } } foreach child [winfo children $w] { append result ";\n[tkRecolorTree $child c]" } return $result } # tkDarken -- # Given a color name, computes a new color value that darkens (or # brightens) the given color by a given percent. # # Arguments: # color - Name of starting color. # perecent - Integer telling how much to brighten or darken as a # percent: 50 means darken by 50%, 110 means brighten # by 10%. proc tkDarken {color percent} { set l [winfo rgb . $color] set red [expr [lindex $l 0]/256] set green [expr [lindex $l 1]/256] set blue [expr [lindex $l 2]/256] set red [expr ($red*$percent)/100] if {$red > 255} { set red 255 } set green [expr ($green*$percent)/100] if {$green > 255} { set green 255 } set blue [expr ($blue*$percent)/100] if {$blue > 255} { set blue 255 } format #%02x%02x%02x $red $green $blue } # tk_bisque -- # Reset the Tk color palette to the old "bisque" colors. # # Arguments: # None. proc tk_bisque {} { tk_setPalette activeBackground #e6ceb1 activeForeground black \ background #ffe4c4 disabledForeground #b0b0b0 foreground black \ highlightBackground #ffe4c4 highlightColor black \ insertBackground black selectColor #b03060 \ selectBackground #e6ceb1 selectForeground black \ troughColor #cdb79e } 070701000779c3000081a400004ccf0000000a0000000133f39e240000254a00000020000000d700000000000000000000002600000004reloc/SUNWtcl/8.0/lib/tk8.0/prolog.ps%%BeginProlog 50 dict begin % This is a standard prolog for Postscript generated by Tk's canvas % widget. % SCCS: @(#) prolog.ps 1.7 96/07/08 17:52:14 % The definitions below just define all of the variables used in % any of the procedures here. This is needed for obscure reasons % explained on p. 716 of the Postscript manual (Section H.2.7, % "Initializing Variables," in the section on Encapsulated Postscript). /baseline 0 def /stipimage 0 def /height 0 def /justify 0 def /lineLength 0 def /spacing 0 def /stipple 0 def /strings 0 def /xoffset 0 def /yoffset 0 def /tmpstip null def % Define the array ISOLatin1Encoding (which specifies how characters are % encoded for ISO-8859-1 fonts), if it isn't already present (Postscript % level 2 is supposed to define it, but level 1 doesn't). systemdict /ISOLatin1Encoding known not { /ISOLatin1Encoding [ /space /space /space /space /space /space /space /space /space /space /space /space /space /space /space /space /space /space /space /space /space /space /space /space /space /space /space /space /space /space /space /space /space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quoteright /parenleft /parenright /asterisk /plus /comma /minus /period /slash /zero /one /two /three /four /five /six /seven /eight /nine /colon /semicolon /less /equal /greater /question /at /A /B /C /D /E /F /G /H /I /J /K /L /M /N /O /P /Q /R /S /T /U /V /W /X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore /quoteleft /a /b /c /d /e /f /g /h /i /j /k /l /m /n /o /p /q /r /s /t /u /v /w /x /y /z /braceleft /bar /braceright /asciitilde /space /space /space /space /space /space /space /space /space /space /space /space /space /space /space /space /space /dotlessi /grave /acute /circumflex /tilde /macron /breve /dotaccent /dieresis /space /ring /cedilla /space /hungarumlaut /ogonek /caron /space /exclamdown /cent /sterling /currency /yen /brokenbar /section /dieresis /copyright /ordfeminine /guillemotleft /logicalnot /hyphen /registered /macron /degree /plusminus /twosuperior /threesuperior /acute /mu /paragraph /periodcentered /cedillar /onesuperior /ordmasculine /guillemotright /onequarter /onehalf /threequarters /questiondown /Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla /Egrave /Eacute /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex /Idieresis /Eth /Ntilde /Ograve /Oacute /Ocircumflex /Otilde /Odieresis /multiply /Oslash /Ugrave /Uacute /Ucircumflex /Udieresis /Yacute /Thorn /germandbls /agrave /aacute /acircumflex /atilde /adieresis /aring /ae /ccedilla /egrave /eacute /ecircumflex /edieresis /igrave /iacute /icircumflex /idieresis /eth /ntilde /ograve /oacute /ocircumflex /otilde /odieresis /divide /oslash /ugrave /uacute /ucircumflex /udieresis /yacute /thorn /ydieresis ] def } if % font ISOEncode font % This procedure changes the encoding of a font from the default % Postscript encoding to ISOLatin1. It's typically invoked just % before invoking "setfont". The body of this procedure comes from % Section 5.6.1 of the Postscript book. /ISOEncode { dup length dict begin {1 index /FID ne {def} {pop pop} ifelse} forall /Encoding ISOLatin1Encoding def currentdict end % I'm not sure why it's necessary to use "definefont" on this new % font, but it seems to be important; just use the name "Temporary" % for the font. /Temporary exch definefont } bind def % StrokeClip % % This procedure converts the current path into a clip area under % the assumption of stroking. It's a bit tricky because some Postscript % interpreters get errors during strokepath for dashed lines. If % this happens then turn off dashes and try again. /StrokeClip { {strokepath} stopped { (This Postscript printer gets limitcheck overflows when) = (stippling dashed lines; lines will be printed solid instead.) = [] 0 setdash strokepath} if clip } bind def % desiredSize EvenPixels closestSize % % The procedure below is used for stippling. Given the optimal size % of a dot in a stipple pattern in the current user coordinate system, % compute the closest size that is an exact multiple of the device's % pixel size. This allows stipple patterns to be displayed without % aliasing effects. /EvenPixels { % Compute exact number of device pixels per stipple dot. dup 0 matrix currentmatrix dtransform dup mul exch dup mul add sqrt % Round to an integer, make sure the number is at least 1, and compute % user coord distance corresponding to this. dup round dup 1 lt {pop 1} if exch div mul } bind def % width height string StippleFill -- % % Given a path already set up and a clipping region generated from % it, this procedure will fill the clipping region with a stipple % pattern. "String" contains a proper image description of the % stipple pattern and "width" and "height" give its dimensions. Each % stipple dot is assumed to be about one unit across in the current % user coordinate system. This procedure trashes the graphics state. /StippleFill { % The following code is needed to work around a NeWSprint bug. /tmpstip 1 index def % Change the scaling so that one user unit in user coordinates % corresponds to the size of one stipple dot. 1 EvenPixels dup scale % Compute the bounding box occupied by the path (which is now % the clipping region), and round the lower coordinates down % to the nearest starting point for the stipple pattern. Be % careful about negative numbers, since the rounding works % differently on them. pathbbox 4 2 roll 5 index div dup 0 lt {1 sub} if cvi 5 index mul 4 1 roll 6 index div dup 0 lt {1 sub} if cvi 6 index mul 3 2 roll % Stack now: width height string y1 y2 x1 x2 % Below is a doubly-nested for loop to iterate across this area % in units of the stipple pattern size, going up columns then % across rows, blasting out a stipple-pattern-sized rectangle at % each position 6 index exch { 2 index 5 index 3 index { % Stack now: width height string y1 y2 x y gsave 1 index exch translate 5 index 5 index true matrix tmpstip imagemask grestore } for pop } for pop pop pop pop pop } bind def % -- AdjustColor -- % Given a color value already set for output by the caller, adjusts % that value to a grayscale or mono value if requested by the CL % variable. /AdjustColor { CL 2 lt { currentgray CL 0 eq { .5 lt {0} {1} ifelse } if setgray } if } bind def % x y strings spacing xoffset yoffset justify stipple DrawText -- % This procedure does all of the real work of drawing text. The % color and font must already have been set by the caller, and the % following arguments must be on the stack: % % x, y - Coordinates at which to draw text. % strings - An array of strings, one for each line of the text item, % in order from top to bottom. % spacing - Spacing between lines. % xoffset - Horizontal offset for text bbox relative to x and y: 0 for % nw/w/sw anchor, -0.5 for n/center/s, and -1.0 for ne/e/se. % yoffset - Vertical offset for text bbox relative to x and y: 0 for % nw/n/ne anchor, +0.5 for w/center/e, and +1.0 for sw/s/se. % justify - 0 for left justification, 0.5 for center, 1 for right justify. % stipple - Boolean value indicating whether or not text is to be % drawn in stippled fashion. If text is stippled, % procedure StippleText must have been defined to call % StippleFill in the right way. % % Also, when this procedure is invoked, the color and font must already % have been set for the text. /DrawText { /stipple exch def /justify exch def /yoffset exch def /xoffset exch def /spacing exch def /strings exch def % First scan through all of the text to find the widest line. /lineLength 0 def strings { stringwidth pop dup lineLength gt {/lineLength exch def} {pop} ifelse newpath } forall % Compute the baseline offset and the actual font height. 0 0 moveto (TXygqPZ) false charpath pathbbox dup /baseline exch def exch pop exch sub /height exch def pop newpath % Translate coordinates first so that the origin is at the upper-left % corner of the text's bounding box. Remember that x and y for % positioning are still on the stack. translate lineLength xoffset mul strings length 1 sub spacing mul height add yoffset mul translate % Now use the baseline and justification information to translate so % that the origin is at the baseline and positioning point for the % first line of text. justify lineLength mul baseline neg translate % Iterate over each of the lines to output it. For each line, % compute its width again so it can be properly justified, then % display it. strings { dup stringwidth pop justify neg mul 0 moveto stipple { % The text is stippled, so turn it into a path and print % by calling StippledText, which in turn calls StippleFill. % Unfortunately, many Postscript interpreters will get % overflow errors if we try to do the whole string at % once, so do it a character at a time. gsave /char (X) def { char 0 3 -1 roll put currentpoint gsave char true charpath clip StippleText grestore char stringwidth translate moveto } forall grestore } {show} ifelse 0 spacing neg translate } forall } bind def %%EndProlog 070701000779c4000081a400004ccf0000000a0000000133f39e21000011dc00000020000000d700000000000000000000002700000004reloc/SUNWtcl/8.0/lib/tk8.0/safetk.tcl# safetk.tcl -- # # Support procs to use Tk in safe interpreters. # # SCCS: @(#) safetk.tcl 1.6 97/08/13 16:08:18 # # Copyright (c) 1997 Sun Microsystems, Inc. # # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # see safetk.n for documentation # # # Note: It is UNSAFE to let any untrusted code being executed # between the creation of the interp and the actual loading # of Tk in that interp. # You should "loadTk $slave" right after safe::tkInterpCreate # Otherwise, if you are using an application with Tk # and don't want safe slaves to have access to Tk, potentially # in a malevolent way, you should use # ::safe::interpCreate -nostatics -accesspath {directories...} # where the directory list does NOT contain any Tk dynamically # loadable library # # We use opt (optional arguments parsing) package require opt 0.1; namespace eval ::safe { # counter for safe toplevels variable tkSafeId 0; # # tkInterpInit : prepare the slave interpreter for tk loading # # returns the slave name (tkInterpInit does) # proc ::safe::tkInterpInit {slave} { global env tk_library if {[info exists env(DISPLAY)]} { $slave eval [list set env(DISPLAY) $env(DISPLAY)]; } # there seems to be an obscure case where the tk_library # variable value is changed to point to a sym link destination # dir instead of the sym link itself, and thus where the $tk_library # would then not be anymore one of the auto_path dir, so we use # the addToAccessPath which adds if it's not already in instead # of the more conventional findInAccessPath ::interp eval $slave [list set tk_library [::safe::interpAddToAccessPath $slave $tk_library]] return $slave; } # tkInterpLoadTk : # Do additional configuration as needed (calling tkInterpInit) # and actually load Tk into the slave. # # Either contained in the specified windowId (-use) or # creating a decorated toplevel for it. # empty definition for auto_mkIndex proc ::safe::loadTk {} {} ::tcl::OptProc loadTk { {slave -interp "name of the slave interpreter"} {-use -windowId {} "window Id to use (new toplevel otherwise)"} } { if {![::tcl::OptProcArgGiven "-use"]} { # create a decorated toplevel ::tcl::Lassign [tkTopLevel $slave] w use; # set our delete hook (slave arg is added by interpDelete) Set [DeleteHookName $slave] [list tkDelete {} $w]; } tkInterpInit $slave; ::interp eval $slave [list set argv [list "-use" $use]]; ::interp eval $slave [list set argc 2]; load {} Tk $slave return $slave } proc ::safe::tkDelete {W window slave} { # we are going to be called for each widget... skip untill it's # top level Log $slave "Called tkDelete $W $window" NOTICE; if {[::interp exists $slave]} { if {[catch {::safe::interpDelete $slave} msg]} { Log $slave "Deletion error : $msg"; } } if {[winfo exists $window]} { Log $slave "Destroy toplevel $window" NOTICE; destroy $window; } } proc ::safe::tkTopLevel {slave} { variable tkSafeId; incr tkSafeId; set w ".safe$tkSafeId"; if {[catch {toplevel $w -class SafeTk} msg]} { return -code error "Unable to create toplevel for\ safe slave \"$slave\" ($msg)"; } Log $slave "New toplevel $w" NOTICE set msg "Untrusted Tcl applet ($slave)" wm title $w $msg; # Control frame set wc $w.fc frame $wc -bg red -borderwidth 3 -relief ridge ; # We will destroy the interp when the window is destroyed bindtags $wc [concat Safe$wc [bindtags $wc]] bind Safe$wc [list ::safe::tkDelete %W $w $slave]; label $wc.l -text $msg \ -padx 2 -pady 0 -anchor w; # We want the button to be the last visible item # (so be packed first) and at the right and not resizing horizontally # frame the button so it does not expand horizontally # but still have the default background instead of red one from the parent frame $wc.fb -bd 0 ; button $wc.fb.b -text "Delete" \ -bd 2 -padx 2 -pady 0 \ -command [list ::safe::tkDelete $w $w $slave] pack $wc.fb.b -side right -fill both ; pack $wc.fb -side right -fill both -expand 1; pack $wc.l -side left -fill both -expand 1; pack $wc -side bottom -fill x ; # Container frame frame $w.c -container 1; pack $w.c -fill both -expand 1; # return both the toplevel window name and the id to use for embedding list $w [winfo id $w.c] ; } } 070701000779c5000081a400004ccf0000000a0000000133f39e2200001a7400000020000000d700000000000000000000002600000004reloc/SUNWtcl/8.0/lib/tk8.0/scale.tcl# scale.tcl -- # # This file defines the default bindings for Tk scale widgets and provides # procedures that help in implementing the bindings. # # SCCS: @(#) scale.tcl 1.12 96/04/16 11:42:25 # # Copyright (c) 1994 The Regents of the University of California. # Copyright (c) 1994-1995 Sun Microsystems, Inc. # # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # #------------------------------------------------------------------------- # The code below creates the default class bindings for entries. #------------------------------------------------------------------------- # Standard Motif bindings: bind Scale { if $tk_strictMotif { set tkPriv(activeBg) [%W cget -activebackground] %W config -activebackground [%W cget -background] } tkScaleActivate %W %x %y } bind Scale { tkScaleActivate %W %x %y } bind Scale { if $tk_strictMotif { %W config -activebackground $tkPriv(activeBg) } if {[%W cget -state] == "active"} { %W configure -state normal } } bind Scale <1> { tkScaleButtonDown %W %x %y } bind Scale { tkScaleDrag %W %x %y } bind Scale { } bind Scale { } bind Scale { tkCancelRepeat tkScaleEndDrag %W tkScaleActivate %W %x %y } bind Scale <2> { tkScaleButton2Down %W %x %y } bind Scale { tkScaleDrag %W %x %y } bind Scale { } bind Scale { } bind Scale { tkCancelRepeat tkScaleEndDrag %W tkScaleActivate %W %x %y } bind Scale { tkScaleControlPress %W %x %y } bind Scale { tkScaleIncrement %W up little noRepeat } bind Scale { tkScaleIncrement %W down little noRepeat } bind Scale { tkScaleIncrement %W up little noRepeat } bind Scale { tkScaleIncrement %W down little noRepeat } bind Scale { tkScaleIncrement %W up big noRepeat } bind Scale { tkScaleIncrement %W down big noRepeat } bind Scale { tkScaleIncrement %W up big noRepeat } bind Scale { tkScaleIncrement %W down big noRepeat } bind Scale { %W set [%W cget -from] } bind Scale { %W set [%W cget -to] } # tkScaleActivate -- # This procedure is invoked to check a given x-y position in the # scale and activate the slider if the x-y position falls within # the slider. # # Arguments: # w - The scale widget. # x, y - Mouse coordinates. proc tkScaleActivate {w x y} { global tkPriv if {[$w cget -state] == "disabled"} { return; } if {[$w identify $x $y] == "slider"} { $w configure -state active } else { $w configure -state normal } } # tkScaleButtonDown -- # This procedure is invoked when a button is pressed in a scale. It # takes different actions depending on where the button was pressed. # # Arguments: # w - The scale widget. # x, y - Mouse coordinates of button press. proc tkScaleButtonDown {w x y} { global tkPriv set tkPriv(dragging) 0 set el [$w identify $x $y] if {$el == "trough1"} { tkScaleIncrement $w up little initial } elseif {$el == "trough2"} { tkScaleIncrement $w down little initial } elseif {$el == "slider"} { set tkPriv(dragging) 1 set tkPriv(initValue) [$w get] set coords [$w coords] set tkPriv(deltaX) [expr $x - [lindex $coords 0]] set tkPriv(deltaY) [expr $y - [lindex $coords 1]] $w configure -sliderrelief sunken } } # tkScaleDrag -- # This procedure is called when the mouse is dragged with # mouse button 1 down. If the drag started inside the slider # (i.e. the scale is active) then the scale's value is adjusted # to reflect the mouse's position. # # Arguments: # w - The scale widget. # x, y - Mouse coordinates. proc tkScaleDrag {w x y} { global tkPriv if !$tkPriv(dragging) { return } $w set [$w get [expr $x - $tkPriv(deltaX)] \ [expr $y - $tkPriv(deltaY)]] } # tkScaleEndDrag -- # This procedure is called to end an interactive drag of the # slider. It just marks the drag as over. # # Arguments: # w - The scale widget. proc tkScaleEndDrag {w} { global tkPriv set tkPriv(dragging) 0 $w configure -sliderrelief raised } # tkScaleIncrement -- # This procedure is invoked to increment the value of a scale and # to set up auto-repeating of the action if that is desired. The # way the value is incremented depends on the "dir" and "big" # arguments. # # Arguments: # w - The scale widget. # dir - "up" means move value towards -from, "down" means # move towards -to. # big - Size of increments: "big" or "little". # repeat - Whether and how to auto-repeat the action: "noRepeat" # means don't auto-repeat, "initial" means this is the # first action in an auto-repeat sequence, and "again" # means this is the second repetition or later. proc tkScaleIncrement {w dir big repeat} { global tkPriv if {![winfo exists $w]} return if {$big == "big"} { set inc [$w cget -bigincrement] if {$inc == 0} { set inc [expr abs([$w cget -to] - [$w cget -from])/10.0] } if {$inc < [$w cget -resolution]} { set inc [$w cget -resolution] } } else { set inc [$w cget -resolution] } if {([$w cget -from] > [$w cget -to]) ^ ($dir == "up")} { set inc [expr -$inc] } $w set [expr [$w get] + $inc] if {$repeat == "again"} { set tkPriv(afterId) [after [$w cget -repeatinterval] \ tkScaleIncrement $w $dir $big again] } elseif {$repeat == "initial"} { set delay [$w cget -repeatdelay] if {$delay > 0} { set tkPriv(afterId) [after $delay \ tkScaleIncrement $w $dir $big again] } } } # tkScaleControlPress -- # This procedure handles button presses that are made with the Control # key down. Depending on the mouse position, it adjusts the scale # value to one end of the range or the other. # # Arguments: # w - The scale widget. # x, y - Mouse coordinates where the button was pressed. proc tkScaleControlPress {w x y} { set el [$w identify $x $y] if {$el == "trough1"} { $w set [$w cget -from] } elseif {$el == "trough2"} { $w set [$w cget -to] } } # tkScaleButton2Down # This procedure is invoked when button 2 is pressed over a scale. # It sets the value to correspond to the mouse position and starts # a slider drag. # # Arguments: # w - The scrollbar widget. # x, y - Mouse coordinates within the widget. proc tkScaleButton2Down {w x y} { global tkPriv if {[$w cget -state] == "disabled"} { return; } $w configure -state active $w set [$w get $x $y] set tkPriv(dragging) 1 set tkPriv(initValue) [$w get] set coords "$x $y" set tkPriv(deltaX) 0 set tkPriv(deltaY) 0 } 070701000779c6000081a400004ccf0000000a0000000133f39e2200002d2200000020000000d700000000000000000000002800000004reloc/SUNWtcl/8.0/lib/tk8.0/scrlbar.tcl# scrlbar.tcl -- # # This file defines the default bindings for Tk scrollbar widgets. # It also provides procedures that help in implementing the bindings. # # SCCS: @(#) scrlbar.tcl 1.26 96/11/30 17:19:16 # # 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. # #------------------------------------------------------------------------- # The code below creates the default class bindings for scrollbars. #------------------------------------------------------------------------- # Standard Motif bindings: if {($tcl_platform(platform) != "windows") && ($tcl_platform(platform) != "macintosh")} { bind Scrollbar { if $tk_strictMotif { set tkPriv(activeBg) [%W cget -activebackground] %W config -activebackground [%W cget -background] } %W activate [%W identify %x %y] } bind Scrollbar { %W activate [%W identify %x %y] } # The "info exists" command in the following binding handles the # situation where a Leave event occurs for a scrollbar without the Enter # event. This seems to happen on some systems (such as Solaris 2.4) for # unknown reasons. bind Scrollbar { if {$tk_strictMotif && [info exists tkPriv(activeBg)]} { %W config -activebackground $tkPriv(activeBg) } %W activate {} } bind Scrollbar <1> { tkScrollButtonDown %W %x %y } bind Scrollbar { tkScrollDrag %W %x %y } bind Scrollbar { tkScrollDrag %W %x %y } bind Scrollbar { tkScrollButtonUp %W %x %y } bind Scrollbar { # Prevents binding from being invoked. } bind Scrollbar { # Prevents binding from being invoked. } bind Scrollbar <2> { tkScrollButton2Down %W %x %y } bind Scrollbar { # Do nothing, since button 1 is already down. } bind Scrollbar { # Do nothing, since button 2 is already down. } bind Scrollbar { tkScrollDrag %W %x %y } bind Scrollbar { tkScrollButtonUp %W %x %y } bind Scrollbar { # Do nothing: B1 release will handle it. } bind Scrollbar { # Do nothing: B2 release will handle it. } bind Scrollbar { # Prevents binding from being invoked. } bind Scrollbar { # Prevents binding from being invoked. } bind Scrollbar { tkScrollTopBottom %W %x %y } bind Scrollbar { tkScrollTopBottom %W %x %y } bind Scrollbar { tkScrollByUnits %W v -1 } bind Scrollbar { tkScrollByUnits %W v 1 } bind Scrollbar { tkScrollByPages %W v -1 } bind Scrollbar { tkScrollByPages %W v 1 } bind Scrollbar { tkScrollByUnits %W h -1 } bind Scrollbar { tkScrollByUnits %W h 1 } bind Scrollbar { tkScrollByPages %W h -1 } bind Scrollbar { tkScrollByPages %W h 1 } bind Scrollbar { tkScrollByPages %W hv -1 } bind Scrollbar { tkScrollByPages %W hv 1 } bind Scrollbar { tkScrollToPos %W 0 } bind Scrollbar { tkScrollToPos %W 1 } } # tkScrollButtonDown -- # This procedure is invoked when a button is pressed in a scrollbar. # It changes the way the scrollbar is displayed and takes actions # depending on where the mouse is. # # Arguments: # w - The scrollbar widget. # 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 { tkScrollSelect $w $element initial } } # tkScrollButtonUp -- # This procedure is invoked when a button is released in a scrollbar. # It cancels scans and auto-repeats that were in progress, and restores # the way the active element is displayed. # # Arguments: # w - The scrollbar widget. # 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] } # tkScrollSelect -- # This procedure is invoked when a button is pressed over the scrollbar. # It invokes one of several scrolling actions depending on where in # the scrollbar the button was pressed. # # Arguments: # w - The scrollbar widget. # element - The element of the scrollbar that was selected, such # as "arrow1" or "trough2". Shouldn't be "slider". # repeat - Whether and how to auto-repeat the action: "noRepeat" # means don't auto-repeat, "initial" means this is the # first action in an auto-repeat sequence, and "again" # means this is the second repetition or later. proc tkScrollSelect {w element repeat} { global tkPriv if {![winfo exists $w]} return if {$element == "arrow1"} { tkScrollByUnits $w hv -1 } elseif {$element == "trough1"} { tkScrollByPages $w hv -1 } elseif {$element == "trough2"} { tkScrollByPages $w hv 1 } elseif {$element == "arrow2"} { tkScrollByUnits $w hv 1 } else { return } if {$repeat == "again"} { set tkPriv(afterId) [after [$w cget -repeatinterval] \ tkScrollSelect $w $element again] } elseif {$repeat == "initial"} { set delay [$w cget -repeatdelay] if {$delay > 0} { set tkPriv(afterId) [after $delay tkScrollSelect $w $element again] } } } # tkScrollStartDrag -- # This procedure is called to initiate a drag of the slider. It just # remembers the starting position of the mouse and slider. # # Arguments: # w - The scrollbar widget. # x, y - The mouse position at the start of the drag operation. proc tkScrollStartDrag {w x y} { global tkPriv if {[$w cget -command] == ""} { return } set tkPriv(pressX) $x set tkPriv(pressY) $y set tkPriv(initValues) [$w get] set iv0 [lindex $tkPriv(initValues) 0] if {[llength $tkPriv(initValues)] == 2} { set tkPriv(initPos) $iv0 } else { if {$iv0 == 0} { set tkPriv(initPos) 0.0 } else { set tkPriv(initPos) [expr (double([lindex $tkPriv(initValues) 2])) \ / [lindex $tkPriv(initValues) 0]] } } } # tkScrollDrag -- # This procedure is called for each mouse motion even when the slider # is being dragged. It notifies the associated widget if we're not # jump scrolling, and it just updates the scrollbar if we are jump # scrolling. # # Arguments: # w - The scrollbar widget. # x, y - The current mouse position. proc tkScrollDrag {w x y} { global tkPriv if {$tkPriv(initPos) == ""} { return } set delta [$w delta [expr $x - $tkPriv(pressX)] [expr $y - $tkPriv(pressY)]] if [$w cget -jump] { if {[llength $tkPriv(initValues)] == 2} { $w set [expr [lindex $tkPriv(initValues) 0] + $delta] \ [expr [lindex $tkPriv(initValues) 1] + $delta] } else { set delta [expr round($delta * [lindex $tkPriv(initValues) 0])] eval $w set [lreplace $tkPriv(initValues) 2 3 \ [expr [lindex $tkPriv(initValues) 2] + $delta] \ [expr [lindex $tkPriv(initValues) 3] + $delta]] } } else { tkScrollToPos $w [expr $tkPriv(initPos) + $delta] } } # tkScrollEndDrag -- # This procedure is called to end an interactive drag of the slider. # It scrolls the window if we're in jump mode, otherwise it does nothing. # # Arguments: # w - The scrollbar widget. # x, y - The mouse position at the end of the drag operation. proc tkScrollEndDrag {w x y} { global tkPriv if {$tkPriv(initPos) == ""} { return } if [$w cget -jump] { set delta [$w delta [expr $x - $tkPriv(pressX)] \ [expr $y - $tkPriv(pressY)]] tkScrollToPos $w [expr $tkPriv(initPos) + $delta] } set tkPriv(initPos) "" } # tkScrollByUnits -- # This procedure tells the scrollbar's associated widget to scroll up # or down by a given number of units. It notifies the associated widget # in different ways for old and new command syntaxes. # # Arguments: # w - The scrollbar widget. # orient - Which kinds of scrollbars this applies to: "h" for # horizontal, "v" for vertical, "hv" for both. # amount - How many units to scroll: typically 1 or -1. proc tkScrollByUnits {w orient amount} { set cmd [$w cget -command] if {($cmd == "") || ([string first \ [string index [$w cget -orient] 0] $orient] < 0)} { return } set info [$w get] if {[llength $info] == 2} { uplevel #0 $cmd scroll $amount units } else { uplevel #0 $cmd [expr [lindex $info 2] + $amount] } } # tkScrollByPages -- # This procedure tells the scrollbar's associated widget to scroll up # or down by a given number of screenfuls. It notifies the associated # widget in different ways for old and new command syntaxes. # # Arguments: # w - The scrollbar widget. # orient - Which kinds of scrollbars this applies to: "h" for # horizontal, "v" for vertical, "hv" for both. # amount - How many screens to scroll: typically 1 or -1. proc tkScrollByPages {w orient amount} { set cmd [$w cget -command] if {($cmd == "") || ([string first \ [string index [$w cget -orient] 0] $orient] < 0)} { return } set info [$w get] if {[llength $info] == 2} { uplevel #0 $cmd scroll $amount pages } else { uplevel #0 $cmd [expr [lindex $info 2] + $amount*([lindex $info 1] - 1)] } } # tkScrollToPos -- # This procedure tells the scrollbar's associated widget to scroll to # a particular location, given by a fraction between 0 and 1. It notifies # the associated widget in different ways for old and new command syntaxes. # # Arguments: # w - The scrollbar widget. # pos - A fraction between 0 and 1 indicating a desired position # in the document. proc tkScrollToPos {w pos} { set cmd [$w cget -command] if {($cmd == "")} { return } set info [$w get] if {[llength $info] == 2} { uplevel #0 $cmd moveto $pos } else { uplevel #0 $cmd [expr round([lindex $info 0]*$pos)] } } # tkScrollTopBottom # Scroll to the top or bottom of the document, depending on the mouse # position. # # Arguments: # w - The scrollbar widget. # x, y - Mouse coordinates within the widget. proc tkScrollTopBottom {w x y} { global tkPriv set element [$w identify $x $y] if [string match *1 $element] { tkScrollToPos $w 0 } elseif [string match *2 $element] { tkScrollToPos $w 1 } # Set tkPriv(relief), since it's needed by tkScrollButtonUp. set tkPriv(relief) [$w cget -activerelief] } # tkScrollButton2Down # This procedure is invoked when button 2 is pressed over a scrollbar. # If the button is over the trough or slider, it sets the scrollbar to # the mouse position and starts a slider drag. Otherwise it just # behaves the same as button 1. # # Arguments: # w - The scrollbar widget. # x, y - Mouse coordinates within the widget. proc tkScrollButton2Down {w x y} { global tkPriv set element [$w identify $x $y] if {($element == "arrow1") || ($element == "arrow2")} { tkScrollButtonDown $w $x $y return } tkScrollToPos $w [$w fraction $x $y] set tkPriv(relief) [$w cget -activerelief] # Need the "update idletasks" below so that the widget calls us # back to reset the actual scrollbar position before we start the # slider drag. update idletasks $w configure -activerelief sunken $w activate slider tkScrollStartDrag $w $x $y } 070701000779c7000081a400004ccf0000000a0000000133f39e240000460b00000020000000d700000000000000000000002500000004reloc/SUNWtcl/8.0/lib/tk8.0/tclIndex# Tcl autoload index file, version 2.0 # This file is generated by the "auto_mkindex" command # and sourced to set up indexing information for one or # more commands. Typically each line is a command that # sets an element in the auto_index array, where the # element name is the name of a command and the value is # a script that loads the command. set auto_index(tkButtonEnter) [list source [file join $dir button.tcl]] set auto_index(tkButtonLeave) [list source [file join $dir button.tcl]] set auto_index(tkCheckRadioEnter) [list source [file join $dir button.tcl]] set auto_index(tkButtonDown) [list source [file join $dir button.tcl]] set auto_index(tkCheckRadioDown) [list source [file join $dir button.tcl]] set auto_index(tkButtonUp) [list source [file join $dir button.tcl]] set auto_index(tkButtonEnter) [list source [file join $dir button.tcl]] set auto_index(tkButtonLeave) [list source [file join $dir button.tcl]] set auto_index(tkButtonDown) [list source [file join $dir button.tcl]] set auto_index(tkButtonUp) [list source [file join $dir button.tcl]] set auto_index(tkButtonEnter) [list source [file join $dir button.tcl]] set auto_index(tkButtonLeave) [list source [file join $dir button.tcl]] set auto_index(tkButtonDown) [list source [file join $dir button.tcl]] set auto_index(tkButtonUp) [list source [file join $dir button.tcl]] set auto_index(tkButtonInvoke) [list source [file join $dir button.tcl]] set auto_index(tkCheckRadioInvoke) [list source [file join $dir button.tcl]] set auto_index(tk_dialog) [list source [file join $dir dialog.tcl]] set auto_index(tkEntryClosestGap) [list source [file join $dir entry.tcl]] set auto_index(tkEntryButton1) [list source [file join $dir entry.tcl]] set auto_index(tkEntryMouseSelect) [list source [file join $dir entry.tcl]] set auto_index(tkEntryPaste) [list source [file join $dir entry.tcl]] set auto_index(tkEntryAutoScan) [list source [file join $dir entry.tcl]] set auto_index(tkEntryKeySelect) [list source [file join $dir entry.tcl]] set auto_index(tkEntryInsert) [list source [file join $dir entry.tcl]] set auto_index(tkEntryBackspace) [list source [file join $dir entry.tcl]] 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(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]] set auto_index(tkListboxBeginExtend) [list source [file join $dir listbox.tcl]] set auto_index(tkListboxBeginToggle) [list source [file join $dir listbox.tcl]] set auto_index(tkListboxAutoScan) [list source [file join $dir listbox.tcl]] set auto_index(tkListboxUpDown) [list source [file join $dir listbox.tcl]] set auto_index(tkListboxExtendUpDown) [list source [file join $dir listbox.tcl]] set auto_index(tkListboxDataExtend) [list source [file join $dir listbox.tcl]] set auto_index(tkListboxCancel) [list source [file join $dir listbox.tcl]] set auto_index(tkListboxSelectAll) [list source [file join $dir listbox.tcl]] set auto_index(tkMbEnter) [list source [file join $dir menu.tcl]] set auto_index(tkMbLeave) [list source [file join $dir menu.tcl]] set auto_index(tkMbPost) [list source [file join $dir menu.tcl]] set auto_index(tkMenuUnpost) [list source [file join $dir menu.tcl]] set auto_index(tkMbMotion) [list source [file join $dir menu.tcl]] set auto_index(tkMbButtonUp) [list source [file join $dir menu.tcl]] set auto_index(tkMenuMotion) [list source [file join $dir menu.tcl]] set auto_index(tkMenuButtonDown) [list source [file join $dir menu.tcl]] set auto_index(tkMenuLeave) [list source [file join $dir menu.tcl]] set auto_index(tkMenuInvoke) [list source [file join $dir menu.tcl]] set auto_index(tkMenuEscape) [list source [file join $dir menu.tcl]] set auto_index(tkMenuUpArrow) [list source [file join $dir menu.tcl]] set auto_index(tkMenuDownArrow) [list source [file join $dir menu.tcl]] set auto_index(tkMenuLeftArrow) [list source [file join $dir menu.tcl]] set auto_index(tkMenuRightArrow) [list source [file join $dir menu.tcl]] set auto_index(tkMenuNextMenu) [list source [file join $dir menu.tcl]] set auto_index(tkMenuNextEntry) [list source [file join $dir menu.tcl]] set auto_index(tkMenuFind) [list source [file join $dir menu.tcl]] set auto_index(tkTraverseToMenu) [list source [file join $dir menu.tcl]] set auto_index(tkFirstMenu) [list source [file join $dir menu.tcl]] set auto_index(tkTraverseWithinMenu) [list source [file join $dir menu.tcl]] set auto_index(tkMenuFirstEntry) [list source [file join $dir menu.tcl]] set auto_index(tkMenuFindName) [list source [file join $dir menu.tcl]] set auto_index(tkPostOverPoint) [list source [file join $dir menu.tcl]] set auto_index(tkSaveGrabInfo) [list source [file join $dir menu.tcl]] set auto_index(tkRestoreOldGrab) [list source [file join $dir menu.tcl]] set auto_index(tk_menuSetFocus) [list source [file join $dir menu.tcl]] set auto_index(tk_popup) [list source [file join $dir menu.tcl]] set auto_index(tkScrollButtonDown) [list source [file join $dir scrlbar.tcl]] set auto_index(tkScrollButtonUp) [list source [file join $dir scrlbar.tcl]] set auto_index(tkScrollSelect) [list source [file join $dir scrlbar.tcl]] set auto_index(tkScrollStartDrag) [list source [file join $dir scrlbar.tcl]] set auto_index(tkScrollDrag) [list source [file join $dir scrlbar.tcl]] set auto_index(tkScrollEndDrag) [list source [file join $dir scrlbar.tcl]] set auto_index(tkScrollByUnits) [list source [file join $dir scrlbar.tcl]] set auto_index(tkScrollByPages) [list source [file join $dir scrlbar.tcl]] set auto_index(tkScrollToPos) [list source [file join $dir scrlbar.tcl]] set auto_index(tkScrollTopBottom) [list source [file join $dir scrlbar.tcl]] set auto_index(tkScrollButton2Down) [list source [file join $dir scrlbar.tcl]] set auto_index(tkTextClosestGap) [list source [file join $dir text.tcl]] set auto_index(tkTextButton1) [list source [file join $dir text.tcl]] set auto_index(tkTextSelectTo) [list source [file join $dir text.tcl]] set auto_index(tkTextKeyExtend) [list source [file join $dir text.tcl]] set auto_index(tkTextPaste) [list source [file join $dir text.tcl]] set auto_index(tkTextAutoScan) [list source [file join $dir text.tcl]] set auto_index(tkTextSetCursor) [list source [file join $dir text.tcl]] set auto_index(tkTextKeySelect) [list source [file join $dir text.tcl]] set auto_index(tkTextResetAnchor) [list source [file join $dir text.tcl]] set auto_index(tkTextInsert) [list source [file join $dir text.tcl]] set auto_index(tkTextUpDownLine) [list source [file join $dir text.tcl]] set auto_index(tkTextPrevPara) [list source [file join $dir text.tcl]] set auto_index(tkTextNextPara) [list source [file join $dir text.tcl]] set auto_index(tkTextScrollPages) [list source [file join $dir text.tcl]] set auto_index(tkTextTranspose) [list source [file join $dir text.tcl]] set auto_index(tk_textCopy) [list source [file join $dir text.tcl]] set auto_index(tk_textCut) [list source [file join $dir text.tcl]] set auto_index(tk_textPaste) [list source [file join $dir text.tcl]] set auto_index(tkTextNextPos) [list source [file join $dir text.tcl]] set auto_index(tkTextPrevPos) [list source [file join $dir text.tcl]] set auto_index(tkScreenChanged) [list source [file join $dir tk.tcl]] set auto_index(tkEventMotifBindings) [list source [file join $dir tk.tcl]] set auto_index(tkCancelRepeat) [list source [file join $dir tk.tcl]] set auto_index(tkTabToWindow) [list source [file join $dir tk.tcl]] set auto_index(bgerror) [list source [file join $dir bgerror.tcl]] set auto_index(tkScaleActivate) [list source [file join $dir scale.tcl]] set auto_index(tkScaleButtonDown) [list source [file join $dir scale.tcl]] set auto_index(tkScaleDrag) [list source [file join $dir scale.tcl]] set auto_index(tkScaleEndDrag) [list source [file join $dir scale.tcl]] set auto_index(tkScaleIncrement) [list source [file join $dir scale.tcl]] set auto_index(tkScaleControlPress) [list source [file join $dir scale.tcl]] set auto_index(tkScaleButton2Down) [list source [file join $dir scale.tcl]] set auto_index(tk_optionMenu) [list source [file join $dir optMenu.tcl]] set auto_index(tkTearOffMenu) [list source [file join $dir tearoff.tcl]] set auto_index(tkMenuDup) [list source [file join $dir tearoff.tcl]] set auto_index(tk_menuBar) [list source [file join $dir obsolete.tcl]] set auto_index(tk_bindForTraversal) [list source [file join $dir obsolete.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(tkConsoleInit) [list source [file join $dir console.tcl]] set auto_index(tkConsoleSource) [list source [file join $dir console.tcl]] set auto_index(tkConsoleInvoke) [list source [file join $dir console.tcl]] set auto_index(tkConsoleHistory) [list source [file join $dir console.tcl]] set auto_index(tkConsolePrompt) [list source [file join $dir console.tcl]] set auto_index(tkConsoleBind) [list source [file join $dir console.tcl]] set auto_index(tkConsoleInsert) [list source [file join $dir console.tcl]] set auto_index(tkConsoleOutput) [list source [file join $dir console.tcl]] set auto_index(tkConsoleExit) [list source [file join $dir console.tcl]] set auto_index(tkConsoleAbout) [list source [file join $dir console.tcl]] set auto_index(tk_setPalette) [list source [file join $dir palette.tcl]] set auto_index(tkRecolorTree) [list source [file join $dir palette.tcl]] set auto_index(tkDarken) [list source [file join $dir palette.tcl]] set auto_index(tk_bisque) [list source [file join $dir palette.tcl]] set auto_index(tkColorDialog) [list source [file join $dir clrpick.tcl]] set auto_index(tkColorDialog_InitValues) [list source [file join $dir clrpick.tcl]] set auto_index(tkColorDialog_Config) [list source [file join $dir clrpick.tcl]] set auto_index(tkColorDialog_BuildDialog) [list source [file join $dir clrpick.tcl]] set auto_index(tkColorDialog_SetRGBValue) [list source [file join $dir clrpick.tcl]] set auto_index(tkColorDialog_XToRgb) [list source [file join $dir clrpick.tcl]] set auto_index(tkColorDialog_RgbToX) [list source [file join $dir clrpick.tcl]] set auto_index(tkColorDialog_DrawColorScale) [list source [file join $dir clrpick.tcl]] set auto_index(tkColorDialog_CreateSelector) [list source [file join $dir clrpick.tcl]] set auto_index(tkColorDialog_RedrawFinalColor) [list source [file join $dir clrpick.tcl]] set auto_index(tkColorDialog_RedrawColorBars) [list source [file join $dir clrpick.tcl]] set auto_index(tkColorDialog_StartMove) [list source [file join $dir clrpick.tcl]] set auto_index(tkColorDialog_MoveSelector) [list source [file join $dir clrpick.tcl]] set auto_index(tkColorDialog_ReleaseMouse) [list source [file join $dir clrpick.tcl]] set auto_index(tkColorDialog_ResizeColorBars) [list source [file join $dir clrpick.tcl]] set auto_index(tkColorDialog_HandleSelEntry) [list source [file join $dir clrpick.tcl]] set auto_index(tkColorDialog_HandleRGBEntry) [list source [file join $dir clrpick.tcl]] set auto_index(tkColorDialog_EnterColorBar) [list source [file join $dir clrpick.tcl]] set auto_index(tkColorDialog_LeaveColorBar) [list source [file join $dir clrpick.tcl]] set auto_index(tkColorDialog_OkCmd) [list source [file join $dir clrpick.tcl]] set auto_index(tkColorDialog_CancelCmd) [list source [file join $dir clrpick.tcl]] set auto_index(tclParseConfigSpec) [list source [file join $dir comdlg.tcl]] set auto_index(tclListValidFlags) [list source [file join $dir comdlg.tcl]] set auto_index(tclSortNoCase) [list source [file join $dir comdlg.tcl]] set auto_index(tclVerifyInteger) [list source [file join $dir comdlg.tcl]] set auto_index(tkFocusGroup_Create) [list source [file join $dir comdlg.tcl]] set auto_index(tkFocusGroup_BindIn) [list source [file join $dir comdlg.tcl]] set auto_index(tkFocusGroup_BindOut) [list source [file join $dir comdlg.tcl]] set auto_index(tkFocusGroup_Destroy) [list source [file join $dir comdlg.tcl]] set auto_index(tkFocusGroup_In) [list source [file join $dir comdlg.tcl]] set auto_index(tkFocusGroup_Out) [list source [file join $dir comdlg.tcl]] set auto_index(tkFDGetFileTypes) [list source [file join $dir comdlg.tcl]] set auto_index(::safe::loadTk) [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(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]] set auto_index(tkIconList_AutoScan) [list source [file join $dir tkfbox.tcl]] set auto_index(tkIconList_DeleteAll) [list source [file join $dir tkfbox.tcl]] set auto_index(tkIconList_Add) [list source [file join $dir tkfbox.tcl]] set auto_index(tkIconList_Arrange) [list source [file join $dir tkfbox.tcl]] set auto_index(tkIconList_Invoke) [list source [file join $dir tkfbox.tcl]] set auto_index(tkIconList_See) [list source [file join $dir tkfbox.tcl]] set auto_index(tkIconList_SelectAtXY) [list source [file join $dir tkfbox.tcl]] set auto_index(tkIconList_Select) [list source [file join $dir tkfbox.tcl]] set auto_index(tkIconList_Unselect) [list source [file join $dir tkfbox.tcl]] set auto_index(tkIconList_Get) [list source [file join $dir tkfbox.tcl]] set auto_index(tkIconList_Btn1) [list source [file join $dir tkfbox.tcl]] set auto_index(tkIconList_Motion1) [list source [file join $dir tkfbox.tcl]] set auto_index(tkIconList_Double1) [list source [file join $dir tkfbox.tcl]] set auto_index(tkIconList_ReturnKey) [list source [file join $dir tkfbox.tcl]] set auto_index(tkIconList_Leave1) [list source [file join $dir tkfbox.tcl]] set auto_index(tkIconList_FocusIn) [list source [file join $dir tkfbox.tcl]] set auto_index(tkIconList_UpDown) [list source [file join $dir tkfbox.tcl]] set auto_index(tkIconList_LeftRight) [list source [file join $dir tkfbox.tcl]] set auto_index(tkIconList_KeyPress) [list source [file join $dir tkfbox.tcl]] set auto_index(tkIconList_Goto) [list source [file join $dir tkfbox.tcl]] set auto_index(tkIconList_Reset) [list source [file join $dir tkfbox.tcl]] set auto_index(tkFDialog) [list source [file join $dir tkfbox.tcl]] set auto_index(tkFDialog_Config) [list source [file join $dir tkfbox.tcl]] set auto_index(tkFDialog_Create) [list source [file join $dir tkfbox.tcl]] set auto_index(tkFDialog_UpdateWhenIdle) [list source [file join $dir tkfbox.tcl]] set auto_index(tkFDialog_Update) [list source [file join $dir tkfbox.tcl]] set auto_index(tkFDialog_SetPathSilently) [list source [file join $dir tkfbox.tcl]] set auto_index(tkFDialog_SetPath) [list source [file join $dir tkfbox.tcl]] set auto_index(tkFDialog_SetFilter) [list source [file join $dir tkfbox.tcl]] set auto_index(tkFDialogResolveFile) [list source [file join $dir tkfbox.tcl]] set auto_index(tkFDialog_EntFocusIn) [list source [file join $dir tkfbox.tcl]] set auto_index(tkFDialog_EntFocusOut) [list source [file join $dir tkfbox.tcl]] set auto_index(tkFDialog_ActivateEnt) [list source [file join $dir tkfbox.tcl]] set auto_index(tkFDialog_InvokeBtn) [list source [file join $dir tkfbox.tcl]] set auto_index(tkFDialog_UpDirCmd) [list source [file join $dir tkfbox.tcl]] set auto_index(tkFDialog_JoinFile) [list source [file join $dir tkfbox.tcl]] set auto_index(tkFDialog_OkCmd) [list source [file join $dir tkfbox.tcl]] set auto_index(tkFDialog_CancelCmd) [list source [file join $dir tkfbox.tcl]] set auto_index(tkFDialog_ListBrowse) [list source [file join $dir tkfbox.tcl]] set auto_index(tkFDialog_ListInvoke) [list source [file join $dir tkfbox.tcl]] set auto_index(tkFDialog_Done) [list source [file join $dir tkfbox.tcl]] set auto_index(tkMotifFDialog) [list source [file join $dir xmfbox.tcl]] set auto_index(tkMotifFDialog_Config) [list source [file join $dir xmfbox.tcl]] set auto_index(tkMotifFDialog_Create) [list source [file join $dir xmfbox.tcl]] set auto_index(tkMotifFDialog_MakeSList) [list source [file join $dir xmfbox.tcl]] set auto_index(tkMotifFDialog_BrowseDList) [list source [file join $dir xmfbox.tcl]] set auto_index(tkMotifFDialog_ActivateDList) [list source [file join $dir xmfbox.tcl]] set auto_index(tkMotifFDialog_BrowseFList) [list source [file join $dir xmfbox.tcl]] set auto_index(tkMotifFDialog_ActivateFList) [list source [file join $dir xmfbox.tcl]] set auto_index(tkMotifFDialog_ActivateFEnt) [list source [file join $dir xmfbox.tcl]] set auto_index(tkMotifFDialog_InterpFilter) [list source [file join $dir xmfbox.tcl]] set auto_index(tkMotifFDialog_ActivateSEnt) [list source [file join $dir xmfbox.tcl]] set auto_index(tkMotifFDialog_OkCmd) [list source [file join $dir xmfbox.tcl]] set auto_index(tkMotifFDialog_FilterCmd) [list source [file join $dir xmfbox.tcl]] set auto_index(tkMotifFDialog_CancelCmd) [list source [file join $dir xmfbox.tcl]] set auto_index(tkMotifFDialog_Update) [list source [file join $dir xmfbox.tcl]] set auto_index(tkMotifFDialog_LoadFiles) [list source [file join $dir xmfbox.tcl]] set auto_index(tkListBoxKeyAccel_Set) [list source [file join $dir xmfbox.tcl]] set auto_index(tkListBoxKeyAccel_Unset) [list source [file join $dir xmfbox.tcl]] set auto_index(tkListBoxKeyAccel_Key) [list source [file join $dir xmfbox.tcl]] set auto_index(tkListBoxKeyAccel_Goto) [list source [file join $dir xmfbox.tcl]] set auto_index(tkListBoxKeyAccel_Reset) [list source [file join $dir xmfbox.tcl]] 070701000779c8000081a400004ccf0000000a0000000133f39e2200000fbd00000020000000d700000000000000000000002800000004reloc/SUNWtcl/8.0/lib/tk8.0/tearoff.tcl# tearoff.tcl -- # # This file contains procedures that implement tear-off menus. # # SCCS: @(#) tearoff.tcl 1.19 97/03/26 15:08:05 # # Copyright (c) 1994 The Regents of the University of California. # Copyright (c) 1994-1997 Sun Microsystems, Inc. # # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # # tkTearoffMenu -- # Given the name of a menu, this procedure creates a torn-off menu # that is identical to the given menu (including nested submenus). # The new torn-off menu exists as a toplevel window managed by the # window manager. The return value is the name of the new menu. # The window is created at the point specified by x and y # # Arguments: # w - The menu to be torn-off (duplicated). # x - x coordinate where window is created # y - y coordinate where window is created proc tkTearOffMenu {w {x 0} {y 0}} { # Find a unique name to use for the torn-off menu. Find the first # ancestor of w that is a toplevel but not a menu, and use this as # the parent of the new menu. This guarantees that the torn off # menu will be on the same screen as the original menu. By making # it a child of the ancestor, rather than a child of the menu, it # can continue to live even if the menu is deleted; it will go # away when the toplevel goes away. if {$x == 0} { set x [winfo rootx $w] } if {$y == 0} { set x [winfo rooty $w] } set parent [winfo parent $w] while {([winfo toplevel $parent] != $parent) || ([winfo class $parent] == "Menu")} { set parent [winfo parent $parent] } if {$parent == "."} { set parent "" } for {set i 1} 1 {incr i} { set menu $parent.tearoff$i if ![winfo exists $menu] { break } } $w clone $menu tearoff # Pick a title for the new menu by looking at the parent of the # original: if the parent is a menu, then use the text of the active # entry. If it's a menubutton then use its text. set parent [winfo parent $w] if {[$menu cget -title] != ""} { wm title $menu [$menu cget -title] } else { switch [winfo class $parent] { Menubutton { wm title $menu [$parent cget -text] } Menu { wm title $menu [$parent entrycget active -label] } } } $menu post $x $y if {[winfo exists $menu] == 0} { return "" } # Set tkPriv(focus) on entry: otherwise the focus will get lost # after keyboard invocation of a sub-menu (it will stay on the # submenu). bind $menu { set tkPriv(focus) %W } # If there is a -tearoffcommand option for the menu, invoke it # now. set cmd [$w cget -tearoffcommand] if {$cmd != ""} { uplevel #0 $cmd $w $menu } return $menu } # tkMenuDup -- # Given a menu (hierarchy), create a duplicate menu (hierarchy) # in a given window. # # Arguments: # src - Source window. Must be a menu. It and its # menu descendants will be duplicated at dst. # dst - Name to use for topmost menu in duplicate # hierarchy. proc tkMenuDup {src dst type} { set cmd [list menu $dst -type $type] foreach option [$src configure] { if {[llength $option] == 2} { continue } if {[string compare [lindex $option 0] "-type"] == 0} { continue } lappend cmd [lindex $option 0] [lindex $option 4] } eval $cmd set last [$src index last] if {$last == "none"} { return } for {set i [$src cget -tearoff]} {$i <= $last} {incr i} { set cmd [list $dst add [$src type $i]] foreach option [$src entryconfigure $i] { lappend cmd [lindex $option 0] [lindex $option 4] } eval $cmd } # Duplicate the binding tags and bindings from the source menu. regsub -all . $src {\\&} quotedSrc regsub -all . $dst {\\&} quotedDst regsub -all $quotedSrc [bindtags $src] $dst x bindtags $dst $x foreach event [bind $src] { regsub -all $quotedSrc [bind $src $event] $dst x bind $dst $event $x } } 070701000779c9000081a400004ccf0000000a0000000133f39e22000065fc00000020000000d700000000000000000000002500000004reloc/SUNWtcl/8.0/lib/tk8.0/text.tcl# text.tcl -- # # This file defines the default bindings for Tk text widgets and provides # procedures that help in implementing the bindings. # # SCCS: @(#) text.tcl 1.55 97/08/12 14:28:23 # # Copyright (c) 1992-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. # #------------------------------------------------------------------------- # Elements of tkPriv that are used in this file: # # afterId - If non-null, it means that auto-scanning is underway # and it gives the "after" id for the next auto-scan # command to be executed. # char - Character position on the line; kept in order # to allow moving up or down past short lines while # still remembering the desired position. # mouseMoved - Non-zero means the mouse has moved a significant # amount since the button went down (so, for example, # start dragging out a selection). # prevPos - Used when moving up or down lines via the keyboard. # Keeps track of the previous insert position, so # we can distinguish a series of ups and downs, all # in a row, from a new up or down. # selectMode - The style of selection currently underway: # char, word, or line. # x, y - Last known mouse coordinates for scanning # and auto-scanning. #------------------------------------------------------------------------- #------------------------------------------------------------------------- # The code below creates the default class bindings for entries. #------------------------------------------------------------------------- # Standard Motif bindings: bind Text <1> { tkTextButton1 %W %x %y %W tag remove sel 0.0 end } bind Text { set tkPriv(x) %x set tkPriv(y) %y tkTextSelectTo %W %x %y } bind Text { set tkPriv(selectMode) word tkTextSelectTo %W %x %y catch {%W mark set insert sel.first} } bind Text { set tkPriv(selectMode) line tkTextSelectTo %W %x %y catch {%W mark set insert sel.first} } bind Text { tkTextResetAnchor %W @%x,%y set tkPriv(selectMode) char tkTextSelectTo %W %x %y } bind Text { set tkPriv(selectMode) word tkTextSelectTo %W %x %y } bind Text { set tkPriv(selectMode) line tkTextSelectTo %W %x %y } bind Text { set tkPriv(x) %x set tkPriv(y) %y tkTextAutoScan %W } bind Text { tkCancelRepeat } bind Text { tkCancelRepeat } bind Text { %W mark set insert @%x,%y } bind Text { if {!$tkPriv(mouseMoved) || $tk_strictMotif} { tkTextPaste %W %x %y } } bind Text { tkTextSetCursor %W insert-1c } bind Text { tkTextSetCursor %W insert+1c } bind Text { tkTextSetCursor %W [tkTextUpDownLine %W -1] } bind Text { tkTextSetCursor %W [tkTextUpDownLine %W 1] } bind Text { tkTextKeySelect %W [%W index {insert - 1c}] } bind Text { tkTextKeySelect %W [%W index {insert + 1c}] } bind Text { tkTextKeySelect %W [tkTextUpDownLine %W -1] } bind Text { tkTextKeySelect %W [tkTextUpDownLine %W 1] } bind Text { tkTextSetCursor %W [tkTextPrevPos %W insert tcl_startOfPreviousWord] } bind Text { tkTextSetCursor %W [tkTextNextWord %W insert] } bind Text { tkTextSetCursor %W [tkTextPrevPara %W insert] } bind Text { tkTextSetCursor %W [tkTextNextPara %W insert] } bind Text { tkTextKeySelect %W [tkTextPrevPos %W insert tcl_startOfPreviousWord] } bind Text { tkTextKeySelect %W [tkTextNextWord %W insert] } bind Text { tkTextKeySelect %W [tkTextPrevPara %W insert] } bind Text { tkTextKeySelect %W [tkTextNextPara %W insert] } bind Text { tkTextSetCursor %W [tkTextScrollPages %W -1] } bind Text { tkTextKeySelect %W [tkTextScrollPages %W -1] } bind Text { tkTextSetCursor %W [tkTextScrollPages %W 1] } bind Text { tkTextKeySelect %W [tkTextScrollPages %W 1] } bind Text { %W xview scroll -1 page } bind Text { %W xview scroll 1 page } bind Text { tkTextSetCursor %W {insert linestart} } bind Text { tkTextKeySelect %W {insert linestart} } bind Text { tkTextSetCursor %W {insert lineend} } bind Text { tkTextKeySelect %W {insert lineend} } bind Text { tkTextSetCursor %W 1.0 } bind Text { tkTextKeySelect %W 1.0 } bind Text { tkTextSetCursor %W {end - 1 char} } bind Text { tkTextKeySelect %W {end - 1 char} } bind Text { tkTextInsert %W \t focus %W break } bind Text { # Needed only to keep binding from triggering; doesn't # have to actually do anything. break } bind Text { focus [tk_focusNext %W] } bind Text { focus [tk_focusPrev %W] } bind Text { tkTextInsert %W \t } bind Text { tkTextInsert %W \n } bind Text { if {[%W tag nextrange sel 1.0 end] != ""} { %W delete sel.first sel.last } else { %W delete insert %W see insert } } bind Text { if {[%W tag nextrange sel 1.0 end] != ""} { %W delete sel.first sel.last } elseif [%W compare insert != 1.0] { %W delete insert-1c %W see insert } } bind Text { %W mark set anchor insert } bind Text