Updated 2013-11-04 17:45:23 by st3ve

GUI construct in the lower right-hand corner, not the taskbar, that ... (RS adds:) holds little icons with mouse-over balloon behavior, and on double-click bring up minimized windows. Typically there are at least speaker volume control and clock; the Task manager also makes a tray icon that indicates CPU usage.

KDE

see KDE

Freedesktop System Tray [1]

freedock http://tcl.arieslabs.com/saved/freedock-20051001.tgz

Microsoft Windows link name winico or Win32api are necessary to manage the system tray. TWAPI 3.1 systemtray command also provides for manipulating system tray icons and balloon help.

Tom Wilkason posted to comp.lang.tcl: "Here is an example from an http server that hides itself in the [taskbar] ...
    ;##
    ;# Callback to handle taskbar icon events
    ;#
    proc ht:iconCallback { message ico wparam lparam x y } {
       switch -- $message {
          WM_LBUTTONDOWN {
             wm deiconify .
          }
          WM_RBUTTONDOWN {
             wm withdraw .
          }
          default {}
       } ;# End Switch
    }
    ;##
    ;# Make window dissapear when it is minimized
    ;#
    if {[catch {
       package require Winico
       if {[winico info] == ""} {  
          ;# Let GUI settle before setting icon
          update
          set ico [winico_seticon . [file join $home .. bin tclhttp.ico]]
          winico text $ico {tchHttp Web Server}
          winico taskbar add $ico \
             -callback [list ht:iconCallback %m %i %w %l %x %y]
          proc Minimize {w} {
             wm withdraw .
             console hide
          }
       } ;# end if
    } result]} {
       console show
       puts stderr "$result"
    } else {
       wm withdraw .
    }

TFW Mar 3, 2004 Incidently, there are distributions of winico that contain much more than is needed. You can use the following script to interface to the dll. Just save it as winico.tcl and create a package entry in the pkgindex file for Wincio 0.3.
''pkgIndex.tcl''
 package ifneeded Winico 0.3 [list source [file join $dir winico.tcl]]

''winico.tcl''
 ;# *************************************************************************
 ;# * File   : winico.tcl
 ;# * Purpose: Provide wrapper functions for the winico package
 ;# *          Loads the winico dll first.
 ;# *************************************************************************
 load [file join [file dirname [info script]] winico03.dll]
 ###############################################################################
 # Function   : winico_seticon
 # Description: Be smart about selecting the most appropriate icon from the
 #              icon file.
 ###############################################################################
 proc winico_seticon { w icofile } {
    set ico [winico create $icofile]
    set screendepth [winfo screendepth .]
    set bigsize "32x32"
    set bigpos -1
    set bigdepth 0
    set smallsize "16x16"
    set smallpos -1
    set smalldepth 0
    foreach i [winico info $ico] {
       array set opts $i
       set depth    $opts(-bpp)
       set pos      $opts(-pos)
       set geometry $opts(-geometry)
       if { $geometry=="$bigsize" && $depth<=$screendepth } {
          if { $depth>$bigdepth } {
             set bigpos $pos
             set bigdepth $depth
          }
       } elseif { $geometry=="$smallsize" && $depth<=$screendepth } {
          if { $depth>$smalldepth } {
             set smallpos $pos
             set smalldepth $depth
          }
       }
    }
    if { $bigpos==-1 && $smallpos==-1 } {
       puts stderr "couldn't find $bigsize and $smallsize icons in $icofile"
       return $ico
    } elseif { $bigpos==-1 } {
       set bigpos $smallpos
       puts stderr "couldn't find $bigsize icons in $icofile"
    } elseif { $smallpos==-1 } {
       set smallpos $bigpos
       puts stderr "couldn't find $smallsize icons in $icofile"
    }
    puts stderr "big icon is $bigsize,bpp:$bigdepth,pos:$bigpos"
    puts stderr "small icon is $smallsize,bpp:$smalldepth,pos:$smallpos"
    winico setwindow $w $ico big   $bigpos
    winico setwindow $w $ico small $smallpos
    return $ico
 }
 ###############################################################################
 # Function   : winico_delall
 # Description: Remove all icon instances
 ###############################################################################
 proc winico_delall {} {
    foreach i [winico info] { winico delete $i }
 }
 ###############################################################################
 # Function   : winico_loadicon
 # Description: Set up all big/small icons for a specified window
 ###############################################################################
 proc winico_loadicon { w symbol } {
    set ico [winico load $symbol]
    winico setwindow $w $ico big
    winico setwindow $w $ico small
 }
 package provide Winico 0.3

Note that there is a proposal to integrate this into Tk, but it looks like it won't go anywhere - there has been no action on it in two years.

http://www.tcl.tk/cgi-bin/tct/tip/325.html