This page is a site for multiple Tk extensions that provide platform-native enhancements for Tk on OS X. All of these packages are compatible with the new Cocoa-based version of Tk, the default for Tk starting with version 8.6. They are not compatible with the older, Carbon-based version of Tk-OS X.
The cocoaprint package allows a Tcl/Tk application to configure a printer and print data using Mac-native print dialogs. It prints by sending a PDF file directly to the chosen printer. The package does not provide support for generating PDF data.
This package implements Mac-native "sheet" windows for Tk. "Sheet" windows are dialogs or toplevel windows that slide down from the top of a Mac toplevel window, and then slide back up when they are dismissed. Tk on the Mac has long supported the "sheet" effect for system dialogs, such as tk_messageBox, when a "-parent" option is passed to the call. The macsheet package adds the ability to create customized dialogs or windows with a similar effect.
This package implements Mac-native "drawer" windows for Tk. "Drawer" windows are windows are attached to the side of a toplevel window, and whose visibility can be toggled with a button. Drawers contain frequently accessed controls that do not need to be visible at all times.
This package creates a Mac-native toolbar (based on the Cocoa NSToolbar) for use in Tk windows. The mactoolbar package offers a basic implementation of the NSToolbar library; it displays toolbar buttons, with labels and images, and does not display other Mac-native widgets such as the Cocoa searchfield. It does not allow customization, nor can it display Tk widgets.
This package creates a Mac-native toolbar (based on the Cocoa NSToolbar) for use in Tk windows. The The toolbar items are selectable, as in standard Cocoa preferences windows. The package offers a basic implementation of the NSToolbar library; it displays toolbar buttons, with labels and images, and does not display other Mac-native widgets such as the Cocoa searchfield. It does not allow customization, nor can it display Tk widgets.
The quicklook package displays a native QuickLook preview panel in a Tk application. The quicklook::quicklook path takes a file path as an argument and then displays a QuickLook panel of the file.
The tclservices package provides access to the Mac's Services menu, allowing Tcl/Tk applications built against the Cocoa frameworks (Tk-Cocoa) to function as both providers and consumers of services. (Tk-Carbon is not supported.) With tclservices, Tcl/Tk applications can send data to other applications via the Services menu, and can also provide functionality that can be accessed from the Services menu.
The tkdock package allows a Tcl/Tk application to manipulate the Dock icon. The package allows an application to change its icon on the OS X Dock while running; it also allows the application to set a badge label to the Dock.
The tkmacicon package renders platform-native icons on OS X as Tk images. The ::tkmacicon::retrieveicon command takes three arguments: a file path or file extension, width, and height. If a file path is specified, then the package will return the specific icon for that file as defined by the Mac OS, in the width and height specified in the arguments. If a file extension is specified, then the package will return the specific icon for that file type as defined by the Mac OS, in the width and height specified in the arguments. Specifying the file extension rather than the actual file can yield faster performance for large numbers of files.
The appstorereceipt package, based on code from https://github.com/roddi/ValidateStoreReceipt, enables integration between Tcl/Tk applications and the Mac App Store by providing a mechanism to validate receipts from the App Store.
All packages are available as file releases from SourceForge, or alternatively, from SourceForge's SVN server. They are available under the standard BSD-style Tcl license. All packages are authored by Kevin Walzer.