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