TIP #325: SYSTEM TRAY ACCESS ============================== Version: $Revision: 1.2 $ Author: David N. Welton State: Draft Type: Project Tcl-Version: 8.7 Vote: Pending Created: Monday, 25 August 2008 URL: https://tip.tcl-lang.org325.html Post-History: ------------------------------------------------------------------------- ABSTRACT ========== Modern operating systems have a "system tray", where programs may place an icon to indicate program status. This TIP proposes that Tk should adopt some existing code in order to permit cross platform access to this functionality. EXISTING CODE =============== * Windows: winico * Linux: tktray * Mac: ??? Existing code is sufficient, and utilizes an acceptable license in order to repurpose it for a systray command. INTERFACE =========== To be determined by the TCT, but along the lines of what tktray provides: *tktray::icon* /pathName/ ?/options/? Create a new icon for the system tray. The application managing the system tray is notified about the new icon. It normally results in the icon being added to the tray. If there is no system tray at the icon creation time, the icon will be invisible. When a new system tray appears, the icon will be added to it. Options: -class: WM_CLASS attribute for the icon window. Tray manager may use class name to remember icon position or other attributes. -image: image to show in the system tray. The value must be the name of a photo image. Transparency data of the photo are used to set the window's shape. The icon will be automatically redrawn or resized appropriately on any image modifications. -visible: boolean value indicating whether the icon must be visible. The system tray manager continues to manage the icon whether it is visible or not. Thus when invisible icon becomes visible, its position on the system tray is likely to remain the same. COPYRIGHT =========== This document has been placed in the public domain. ------------------------------------------------------------------------- TIP AutoGenerator - written by Donal K. Fellows