# -*- Tcl -*-
source applet.tcl
+source subproc.tcl
-#----- specifics -----
+#----- menu -----
-.m1 add command -command { msel; puts hi } -label hi
-.m3 add command -command { msel; puts boo } -label boo
+foreach b {1 3} {
+ applet::setup-button-menu $b
+}
+
+.m1 add command -command { applet::msel; puts hi } -label hi
+.m3 add command -command { applet::msel; puts boo } -label boo
-image create bitmap ims -file gs_s.xbm
+#image create bitmap ims -file gs_s.xbm
#image create bitmap ims -file /usr/share/ghostscript/8.71/lib/gs_s.xbm
#setimage ims
#setimage ims
-setuptooltip
-settooltip "line\nanother"
-
-proc innerwindow {id} {
- puts IICONFIG
- puts "IC $id"
+applet::setup-tooltip { puts VIS } { puts INVIS }
+applet::tooltip-set "line\nanother"
- .i.i.b configure -background darkblue -bd 1
-exec /home/ian/things/Chiark-utils/chiark-utils.git/cprogs/xacpi-simple \
- -into $id &
+proc cmdline {id} {
+ return [list xacpi-simple -into $id]
}
-setupinnerwindow 40
+applet::setup-subproc 40 cmdline