chiark / gitweb /
setimage
[chiark-tcl-applet.git] / applet.tcl
index 8a0193f47e3e518dff545bf7b9274857fb835ce1..e660bce7acbba766981b75cf9a68ab5052ee2c6c 100644 (file)
@@ -30,6 +30,12 @@ package require tktray
 #      applet::tooltip-set TEXT-MAYBE-MULTILINE
 #   whenever they like.
 #
+# Icon:
+#
+#  Caller should call:
+#      applet::setimage IMAGE
+#  as necessary.
+#
 # Inner window subprocess:
 #
 #  Caller that needs access to inner window should define
@@ -47,6 +53,9 @@ package require tktray
 #    Alternatively caller may call  applet::setup-button-menu $b
 #    which will generate a menu .m$b which the user can configure
 #    and which will automatically be posted and unposted etc.
+#    In this case the caller should arrange that all of their
+#    menus, when an item is selected, call
+#      applet::msel
 
 wm withdraw .
 
@@ -159,6 +168,12 @@ proc tooltip-show {x y} {
     uplevel #0 $tooltip_on_vis
 }
 
+#----- simple images -----
+
+proc setimage {image} {
+    .i configure -image $image
+}
+
 }
 
 
@@ -212,9 +227,3 @@ proc setupinnerwindow {w} {
     destroy [frame .i.i.make-exist]
     bind .i <<IconConfigure>> { innerwindow-resetup-required IconConfigure }
 }
-
-
-
-proc setimage {image} {
-    .i configure -image $image
-}