chiark / gitweb /
reorg widgets wip
[chiark-tcl-applet.git] / example
diff --git a/example b/example
index 57e87083d5bf1a19d295895efac94dbd50749e6a..b9f1c64a966cc614c720c41e90ba20b42fa46775 100755 (executable)
--- a/example
+++ b/example
@@ -1,14 +1,28 @@
-#!/usr/bin/wish8.4
+#!/usr/bin/wish8.4 -f
+# -*- 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
+}
 
-image create bitmap ims -file /usr/share/ghostscript/8.71/lib/gs_s.xbm   
-setimage ims
+.m1 add command -command { applet::msel; puts hi } -label hi
+.m3 add command -command { applet::msel; puts boo } -label boo
 
-setuptooltip
-settooltip "line\nanother"
+#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
+
+applet::setup-tooltip { puts VIS } { puts INVIS }
+applet::tooltip-set "line\nanother"
+
+proc cmdline {id} {
+    return [list xacpi-simple -into $id]
+}
+
+applet::setup-subproc 40 cmdline