chiark / gitweb /
changelog: start 1.0-3
[chiark-tcl-applet.git] / example
diff --git a/example b/example
deleted file mode 100755 (executable)
index fe97943..0000000
--- a/example
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/usr/bin/wish8.4
-
-#----- general machinery -----
-
-package require tktray
-
-wm withdraw .
-
-image create bitmap ims -file /usr/share/ghostscript/8.71/lib/gs_s.xbm   
-
-tktray::icon .i -class example
-.i configure -docked 1
-
-set posted 0
-
-foreach b {1 3} {
-    menu .m$b -tearoff 0
-}
-
-proc pressed {b x y} {
-    global posted
-    if {$posted == $b} {
-       puts "unpost $posted toggle"
-       .m$posted unpost
-       set posted 0
-    } elseif {[winfo exists .m$b]} {
-       if {$posted} {
-           .m$posted unpost
-           puts "unpost $posted other"
-       }
-       puts "post $b"
-       set posted $b
-       .m$b post $x $y
-    }
-}
-
-proc msel {} {
-    global posted
-    set posted 0
-}
-
-bind .i <ButtonPress> { pressed %b %X %Y }
-
-#----- specifics -----
-
-.i configure -image ims
-.m1 add command -command { msel; puts hi } -label hi
-.m3 add command -command { msel; puts boo } -label boo
-