chiark / gitweb /
changelog: start 1.0-3
[chiark-tcl-applet.git] / example
1 #!/usr/bin/wish8.4 -f
2 # -*- Tcl -*-
3
4 # usage:
5 #  xbatmon-simple-tray
6
7 source applet.tcl
8 source subproc.tcl
9 source utils.tcl
10
11 set debug::debug puts
12
13 foreach b {1 3} {
14     applet::setup-button-menu $b
15 }
16
17 .m1 add command -command { applet::msel; puts hi } -label hi
18 .m3 add command -command { applet::msel; puts boo } -label boo
19
20 #image create bitmap ims -file gs_s.xbm   
21 #image create bitmap ims -file /usr/share/ghostscript/8.71/lib/gs_s.xbm   
22 #setimage ims
23 #setimage ims
24
25 applet::setup-tooltip { puts VIS } { puts INVIS }
26 applet::tooltip-set "line\nanother"
27
28 proc cmdline {id orientation} {
29     global argv
30     return [concat $argv $id]
31 }
32
33 applet::setup-subproc cmdline